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; |
}; |