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

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

Issue 10411085: Build AVC decoder configuration record (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compontent build Created 8 years, 6 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 | « content/common/gpu/media/h264_parser.cc ('k') | content/common/gpu/media/mac_video_decode_accelerator.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/mac_video_decode_accelerator.h
diff --git a/content/common/gpu/media/mac_video_decode_accelerator.h b/content/common/gpu/media/mac_video_decode_accelerator.h
index cc3e00cadc63a83b4a0f0dde7a44a3f1f0646bec..6fa4e7359db0f1be558660d91999e8ccff4b22cc 100644
--- a/content/common/gpu/media/mac_video_decode_accelerator.h
+++ b/content/common/gpu/media/mac_video_decode_accelerator.h
@@ -13,6 +13,8 @@
#include "base/memory/ref_counted.h"
#include "base/threading/non_thread_safe.h"
#include "content/common/content_export.h"
+#include "content/common/gpu/media/avc_config_record_builder.h"
+#include "content/common/gpu/media/h264_parser.h"
#include "media/video/video_decode_accelerator.h"
namespace base {
@@ -35,12 +37,6 @@ class CONTENT_EXPORT MacVideoDecodeAccelerator
// Set the OpenGL context to use.
void SetCGLContext(CGLContextObj cgl_context);
- // Set extra data required to initialize the H.264 video decoder.
- // TODO(sail): Move this into Initialize.
- bool SetConfigInfo(uint32_t frame_width,
- uint32_t frame_height,
- const std::vector<uint8_t>& avc_data);
-
// media::VideoDecodeAccelerator implementation.
virtual bool Initialize(media::VideoCodecProfile profile) OVERRIDE;
virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE;
@@ -66,6 +62,13 @@ class CONTENT_EXPORT MacVideoDecodeAccelerator
// Stop the component when any error is detected.
void StopOnError(media::VideoDecodeAccelerator::Error error);
+ // Create the decoder.
+ bool CreateDecoder(const std::vector<uint8_t>& extra_data);
+
+ // Send the given NALU to the decoder.
+ void DecodeNALU(const content::H264NALU& nalu,
+ int32 bitstream_buffer_id);
+
// Calls the client's initialize completed callback.
void NotifyInitializeDone();
@@ -112,14 +115,14 @@ class CONTENT_EXPORT MacVideoDecodeAccelerator
// The context to use to perform OpenGL operations.
CGLContextObj cgl_context_;
- // The number of bytes used to store the frame buffer size.
- size_t nalu_len_field_size_;
+ // Flag to check if AVC decoder configuration record has been built.
+ bool did_build_config_record_;
- // Size of a video frame.
- gfx::Size frame_size_;
+ // Parser for the H264 stream.
+ content::H264Parser h264_parser_;
- // Flag to check if pictures have been requested from the client.
- bool did_request_pictures_;
+ // Utility to build the AVC configuration record.
+ content::AVCConfigRecordBuilder config_record_builder_;
};
#endif // CONTENT_COMMON_GPU_MEDIA_VIDEO_DECODE_ACCELERATOR_MAC_H_
« no previous file with comments | « content/common/gpu/media/h264_parser.cc ('k') | content/common/gpu/media/mac_video_decode_accelerator.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698