-
- Downloads
V4L2Decoder: destroy previous VideoFramePool before getting new one
VideoFramePool is used to wrap C2BlockPool and request buffers for V4L2Decoder. When resolution changes, V4L2Decoder creates a new VideoFramePool instance to request buffers with new resolution. Also, C2VdaBqBlockPool is designed to provide buffers with the same resolution. So there only one VideoFramePool could exist at the same time. This CL destroys the previous VideoFramePool before getting the new one, and checks the buffer format passed to C2VdaBqBlockPool::fetchGraphicBlock() is the same as the format requested by requestNewBufferSet(). Also, this CL simplifies the signature of the callback of getting VideoFramePool. Originally we put the returned value at output argument because Chromium callback with WeakPtr doesn't support returned value. But we actually could avoid WeakPtr here because V4L2Decoder is always destroyed before V4L2DecodeComponent. It's safe to use ::base::Unretained(this). Bug: 174287571 Test: android.media.cts.AdaptivePlaybackTest#test{H264,Vp8,Vp9}_* Change-Id: Ib06855e7ccc3db5508a4a3f6403bceedb9b5f59d
Showing
- components/V4L2DecodeComponent.cpp 17 additions, 15 deletionscomponents/V4L2DecodeComponent.cpp
- components/V4L2Decoder.cpp 4 additions, 1 deletioncomponents/V4L2Decoder.cpp
- components/include/v4l2_codec2/components/V4L2DecodeComponent.h 3 additions, 2 deletions...ents/include/v4l2_codec2/components/V4L2DecodeComponent.h
- components/include/v4l2_codec2/components/VideoDecoder.h 2 additions, 3 deletionscomponents/include/v4l2_codec2/components/VideoDecoder.h
- plugin_store/C2VdaBqBlockPool.cpp 9 additions, 0 deletionsplugin_store/C2VdaBqBlockPool.cpp
Loading
Please register or sign in to comment