Index: content/common/gpu/media/exynos_video_decode_accelerator.h |
diff --git a/content/common/gpu/media/exynos_video_decode_accelerator.h b/content/common/gpu/media/exynos_video_decode_accelerator.h |
index b1b9375686846896caca83a88f3d374cb0505b9b..dbeda7c589ec41e946994c646c750eb47b2263d4 100644 |
--- a/content/common/gpu/media/exynos_video_decode_accelerator.h |
+++ b/content/common/gpu/media/exynos_video_decode_accelerator.h |
@@ -102,6 +102,8 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator : |
kDecoding, // DecodeBufferInitial() successful; decoding frames. |
kResetting, // Presently resetting. |
kAfterReset, // After Reset(), ready to start decoding again. |
+ kChangingResolution, // Performing resolution change, all remaining |
+ // pre-change frames decoded and processed. |
kError, // Error in kDecoding state. |
}; |
@@ -205,12 +207,13 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator : |
// Service I/O on the V4L2 devices. This task should only be scheduled from |
// DevicePollTask(). |
- void ServiceDeviceTask(); |
+ void ServiceDeviceTask(bool event_pending); |
// Handle the various device queues. |
void EnqueueMfc(); |
void DequeueMfc(); |
void EnqueueGsc(); |
void DequeueGsc(); |
+ void DequeueEvents(); |
// Enqueue a buffer on the corresponding queue. |
bool EnqueueMfcInputRecord(); |
bool EnqueueMfcOutputRecord(); |
@@ -245,11 +248,19 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator : |
// Attempt to start/stop device_poll_thread_. |
bool StartDevicePoll(); |
- bool StopDevicePoll(); |
+ // |keep_mfc_input| if true, don't reset MFC input state, used during |
+ // resolution change. |
+ bool StopDevicePoll(bool keep_mfc_input); |
// Set/clear the device poll interrupt (using device_poll_interrupt_fd_). |
bool SetDevicePollInterrupt(); |
bool ClearDevicePollInterrupt(); |
+ void StartResolutionChangeIfNeeded(); |
+ bool GetFormatInfo(struct v4l2_format* format, bool* again); |
+ void ResolutionChangeDestroyBuffers(); |
sheu
2013/08/09 10:41:49
If you're not removing this just yet it would be n
Pawel Osciak
2013/08/09 11:42:36
Done.
|
+ void FinishResolutionChangeTask(); |
+ void ResumeAfterResolutionChangeTask(); |
+ |
// |
// Device tasks, to be run on device_poll_thread_. |
// |
@@ -275,6 +286,7 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator : |
// |
// Create the buffers we need. |
+ bool CreateBuffersForFormat(const struct v4l2_format& format); |
sheu
2013/08/09 10:41:49
Also: I kept the function definitions and declarat
Pawel Osciak
2013/08/09 11:42:36
Done.
|
bool CreateMfcInputBuffers(); |
bool CreateMfcOutputBuffers(); |
bool CreateGscInputBuffers(); |
@@ -331,6 +343,9 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator : |
int decoder_frames_at_client_; |
// Are we flushing? |
bool decoder_flushing_; |
+ // Got a notification from driver that it reached resolution change point |
+ // in the stream. |
+ bool resolution_change_pending_; |
// Input queue for decoder_thread_: BitstreamBuffers in. |
std::list<linked_ptr<BitstreamBufferRef> > decoder_input_queue_; |
// For H264 decode, hardware requires that we send it frame-sized chunks. |