Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(953)

Unified Diff: media/gpu/v4l2_video_decode_accelerator.h

Issue 2335573002: V4L2VideoDecodeAccelerator: destroy buffers in decoder thread. (Closed)
Patch Set: address Pawel's nits in PS4 Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/gpu/generic_v4l2_device.cc ('k') | media/gpu/v4l2_video_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/v4l2_video_decode_accelerator.h
diff --git a/media/gpu/v4l2_video_decode_accelerator.h b/media/gpu/v4l2_video_decode_accelerator.h
index ec2a0bdfe51797dada6eec2390817333da264441..5777436b80f2cc9eac8fb068aca646ea5482238a 100644
--- a/media/gpu/v4l2_video_decode_accelerator.h
+++ b/media/gpu/v4l2_video_decode_accelerator.h
@@ -133,8 +133,8 @@ class MEDIA_GPU_EXPORT V4L2VideoDecodeAccelerator
kInitialized, // Initialize() returned true; ready to start decoding.
kDecoding, // DecodeBufferInitial() successful; decoding frames.
kResetting, // Presently resetting.
- // Performing resolution change, all remaining pre-change frames decoded
- // and processed.
+ // Performing resolution change and waiting for image processor to return
+ // all frames.
kChangingResolution,
// Requested new PictureBuffers via ProvidePictureBuffers(), awaiting
// AssignPictureBuffers().
@@ -329,6 +329,15 @@ class MEDIA_GPU_EXPORT V4L2VideoDecodeAccelerator
bool CreateInputBuffers();
bool CreateOutputBuffers();
+ // Destroy buffers.
+ void DestroyInputBuffers();
+ // In contrast to DestroyInputBuffers, which is called only on destruction,
+ // we call DestroyOutputBuffers also during playback, on resolution change.
+ // Even if anything fails along the way, we still want to go on and clean
+ // up as much as possible, so return false if this happens, so that the
+ // caller can error out on resolution change.
+ bool DestroyOutputBuffers();
+
// Set input and output formats before starting decode.
bool SetupFormats();
// Return a usable input format of image processor. Return 0 if not found.
@@ -342,16 +351,6 @@ class MEDIA_GPU_EXPORT V4L2VideoDecodeAccelerator
// Methods run on child thread.
//
- // Destroy buffers.
- void DestroyInputBuffers();
- // In contrast to DestroyInputBuffers, which is called only from destructor,
- // we call DestroyOutputBuffers also during playback, on resolution change.
- // Even if anything fails along the way, we still want to go on and clean
- // up as much as possible, so return false if this happens, so that the
- // caller can error out on resolution change.
- bool DestroyOutputBuffers();
- void ResolutionChangeDestroyBuffers();
-
// Send decoded pictures to PictureReady.
void SendPictureReady();
« no previous file with comments | « media/gpu/generic_v4l2_device.cc ('k') | media/gpu/v4l2_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698