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

Unified Diff: media/filters/vpx_video_decoder.h

Issue 114853002: media: Enabling direct rendering for VP9 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 7 years 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 | « no previous file | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/vpx_video_decoder.h
diff --git a/media/filters/vpx_video_decoder.h b/media/filters/vpx_video_decoder.h
index cc02e89aad0b57027818b3f1702c8f8d5e9f2669..205e63b3c649e357b9de9667bf6bf7d16bba7f58 100644
--- a/media/filters/vpx_video_decoder.h
+++ b/media/filters/vpx_video_decoder.h
@@ -14,6 +14,7 @@
#include "media/base/video_frame_pool.h"
struct vpx_codec_ctx;
+struct vpx_codec_frame_buffer;
struct vpx_image;
namespace base {
@@ -41,6 +42,15 @@ class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder {
virtual void Stop(const base::Closure& closure) OVERRIDE;
virtual bool HasAlpha() const OVERRIDE;
+ // Callback that will be called by libvpx if the frame buffer size needs to
+ // increase. Parameters:
+ // user_priv Data passed into libvpx (we pass NULL).
+ // new_size Minimum size needed by libvpx to decompress the next frame.
+ // fb Pointer to the frame buffer to update.
+ // Returns VPX_CODEC_OK on success. Returns < 0 on failure.
+ static int32 ReallocVP9FrameBuffer(void* user_priv, size_t new_size,
fgalligan1 2013/12/17 01:16:54 nit: I think we use int other places.
vignesh 2013/12/17 18:24:25 i tried int first. clang was not happy as libvpx e
+ vpx_codec_frame_buffer* fb);
+
private:
enum DecoderState {
kUninitialized,
@@ -50,6 +60,14 @@ class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder {
kError
};
+ // Maximum number of frame buffers allowed to be used by libvpx for VP9
+ // decoding. 8 (libvpx reference buffers) + 4 (jitter buffers) + 1 (work
+ // buffer) = 13.
fgalligan1 2013/12/17 01:16:54 These have to be static const int.
vignesh 2013/12/17 18:24:25 Done.
+ const int kVP9MaxFrameBuffers = 13;
fgalligan1 2013/12/17 01:16:54 I think you can move this to the .cc file. Or are
vignesh 2013/12/17 18:24:25 Done.
+
+ // Minimum libvpx decoder ABI version required to support direct rendering.
+ const int kVP9MinABIVersion = 6;
fgalligan1 2013/12/17 01:16:54 Move this to the .cc and I would change the name t
vignesh 2013/12/17 18:24:25 Done.
+
// Handles (re-)initializing the decoder with a (new) config.
// Returns true when initialization was successful.
bool ConfigureDecoder(const VideoDecoderConfig& config);
@@ -83,6 +101,9 @@ class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder {
VideoFramePool frame_pool_;
+ // Frame Buffers used for VP9 decoding.
+ vpx_codec_frame_buffer* frame_buffers_;
+
DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder);
};
« no previous file with comments | « no previous file | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698