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

Unified Diff: media/gpu/dxva_video_decode_accelerator_win.h

Issue 2345123002: Attach color space information to hardware decoded NV12 video frames. (Closed)
Patch Set: minor bugfix Created 4 years, 2 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/dxva_picture_buffer_win.h ('k') | media/gpu/dxva_video_decode_accelerator_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/dxva_video_decode_accelerator_win.h
diff --git a/media/gpu/dxva_video_decode_accelerator_win.h b/media/gpu/dxva_video_decode_accelerator_win.h
index e44a71909e4808c3db4a0e28afbf11a8d38c0bfb..97f817b83c663c86abb675fec7f2868ffe04fa5b 100644
--- a/media/gpu/dxva_video_decode_accelerator_win.h
+++ b/media/gpu/dxva_video_decode_accelerator_win.h
@@ -36,6 +36,7 @@
#include "media/gpu/gpu_video_decode_accelerator_helpers.h"
#include "media/gpu/media_gpu_export.h"
#include "media/video/video_decode_accelerator.h"
+#include "ui/gfx/color_space.h"
interface IMFSample;
interface IDirect3DSurface9;
@@ -73,6 +74,8 @@ class H264ConfigChangeDetector {
bool config_changed() const { return config_changed_; }
+ gfx::ColorSpace current_color_space() const;
+
private:
// These fields are used to track the SPS/PPS in the H.264 bitstream and
// are eventually compared against the SPS/PPS in the bitstream to detect
@@ -196,12 +199,13 @@ class MEDIA_GPU_EXPORT DXVAVideoDecodeAccelerator
// The bulk of the decoding happens here. This function handles errors,
// format changes and processes decoded output.
- void DoDecode();
+ void DoDecode(const gfx::ColorSpace& color_space);
// Invoked when we have a valid decoded output sample. Retrieves the D3D
// surface and maintains a copy of it which is passed eventually to the
// client when we have a picture buffer to copy the surface contents to.
- bool ProcessOutputSample(IMFSample* sample);
+ bool ProcessOutputSample(IMFSample* sample,
+ const gfx::ColorSpace& color_space);
// Processes pending output samples by copying them to available picture
// slots.
@@ -228,7 +232,9 @@ class MEDIA_GPU_EXPORT DXVAVideoDecodeAccelerator
void RequestPictureBuffers(int width, int height);
// Notifies the client about the availability of a picture.
- void NotifyPictureReady(int picture_buffer_id, int input_buffer_id);
+ void NotifyPictureReady(int picture_buffer_id,
+ int input_buffer_id,
+ const gfx::ColorSpace& color_space);
// Sends pending input buffer processed acks to the client if we don't have
// output samples waiting to be processed.
@@ -394,7 +400,9 @@ class MEDIA_GPU_EXPORT DXVAVideoDecodeAccelerator
// Contains information about a decoded sample.
struct PendingSampleInfo {
- PendingSampleInfo(int32_t buffer_id, IMFSample* sample);
+ PendingSampleInfo(int32_t buffer_id,
+ IMFSample* sample,
+ const gfx::ColorSpace& color_space);
PendingSampleInfo(const PendingSampleInfo& other);
~PendingSampleInfo();
@@ -404,6 +412,9 @@ class MEDIA_GPU_EXPORT DXVAVideoDecodeAccelerator
// Defaults to -1.
int picture_buffer_id;
+ // The color space of this picture.
+ gfx::ColorSpace color_space;
+
base::win::ScopedComPtr<IMFSample> output_sample;
};
« no previous file with comments | « media/gpu/dxva_picture_buffer_win.h ('k') | media/gpu/dxva_video_decode_accelerator_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698