File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,6 +76,14 @@ sp<SurfaceType> convertParcelableSurfaceTypeToSurface(const ParcelableSurfaceTyp
7676 return surface;
7777#endif
7878}
79-
8079} // namespace flagtools
80+ namespace mediaflagtools {
81+ sp<MediaSurfaceType> igbpToSurfaceType (const sp<IGraphicBufferProducer>& igbp) {
82+ #if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_MEDIA_MIGRATION)
83+ return new Surface (igbp);
84+ #else
85+ return igbp;
86+ #endif
87+ }
88+ } // namespace mediaflagtools
8189} // namespace android
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ class Surface;
3636 (WB_CAMERA3_AND_PROCESSORS_WITH_DEPENDENCIES && \
3737 COM_ANDROID_GRAPHICS_LIBGUI_FLAGS (WB_LIBCAMERASERVICE))
3838
39+ // Camera
3940#if WB_LIBCAMERASERVICE_WITH_DEPENDENCIES
4041typedef android::Surface SurfaceType;
4142typedef android::view::Surface ParcelableSurfaceType;
@@ -54,4 +55,16 @@ ParcelableSurfaceType convertSurfaceTypeToParcelable(sp<SurfaceType> surface);
5455sp<SurfaceType> convertParcelableSurfaceTypeToSurface (const ParcelableSurfaceType& surface);
5556} // namespace flagtools
5657
58+ // Media
59+ #if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_MEDIA_MIGRATION)
60+ typedef android::Surface MediaSurfaceType;
61+ typedef android::view::Surface MediaParcelableSurfaceType;
62+ #else
63+ typedef android::IGraphicBufferProducer MediaSurfaceType;
64+ typedef android::sp<android::IGraphicBufferProducer> MediaParcelableSurfaceType;
65+ #endif
66+
67+ namespace mediaflagtools {
68+ sp<MediaSurfaceType> igbpToSurfaceType (const sp<IGraphicBufferProducer>& igbp);
69+ } // namespace mediaflagtools
5770} // namespace android
You can’t perform that action at this time.
0 commit comments