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

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: rebase Created 8 years, 7 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/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 2194a7ff8bc8d2d870a05a935542b3a8420c0ba4..657308339d70016c05432040593c33ded276bf53 100644
--- a/content/common/gpu/media/mac_video_decode_accelerator.h
+++ b/content/common/gpu/media/mac_video_decode_accelerator.h
@@ -11,6 +11,8 @@
#include "base/mac/scoped_cftyperef.h"
#include "base/memory/ref_counted.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 {
@@ -31,12 +33,6 @@ class MacVideoDecodeAccelerator : public media::VideoDecodeAccelerator {
// Set the OpenGL context to use.
void SetGLContext(void* gl_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;
@@ -65,6 +61,14 @@ class MacVideoDecodeAccelerator : public media::VideoDecodeAccelerator {
// Calls the client's reset completed callback.
void NotifyResetDone();
+ // Create the decoder.
+ void CreateDecoder();
+
+ // Send the given NALU to the decoder.
+ void DecodeNALU(const content::H264NALU* nalu,
Ami GONE FROM CHROMIUM 2012/05/23 19:41:19 const* is non-idiomatic in chromium (or google) st
sail 2012/05/28 21:45:46 Done.
+ int32 bitstream_buffer_id);
+
+
// To expose client callbacks from VideoDecodeAccelerator.
Client* client_;
// C++ wrapper around the Mac VDA API.
@@ -94,15 +98,14 @@ class MacVideoDecodeAccelerator : public media::VideoDecodeAccelerator {
// 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_;
+
+ // Parser for the H264 stream.
+ content::H264Parser h264_parser_;
- // Width of a video frame.
- uint32_t frame_width_;
- // Height of a video frame.
- uint32_t frame_height_;
- // 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_

Powered by Google App Engine
This is Rietveld 408576698