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

Unified Diff: content/common/gpu/media/exynos_video_decode_accelerator.h

Issue 22590009: EVDA: Add support for dynamic resolution change and MSE players. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 4 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
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..c41acebc2a8006315106ab3c8946c095d186cb1e 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,18 @@ 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();
+ void ResChangeDestroyBuffersOnChildThread();
+ void FinishResolutionChangeTask();
+ void ResumeAfterResolutionChangeTask();
+
//
// Device tasks, to be run on device_poll_thread_.
//
@@ -275,6 +285,8 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator :
//
// Create the buffers we need.
+ bool GetFormatInfo(struct v4l2_format* format, bool* again);
+ bool CreateBuffersForFormat(const struct v4l2_format& format);
bool CreateMfcInputBuffers();
bool CreateMfcOutputBuffers();
bool CreateGscInputBuffers();
@@ -331,6 +343,11 @@ 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_;
+ // Got a reset request while we were performing resolution change.
+ bool reset_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.

Powered by Google App Engine
This is Rietveld 408576698