summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-30 19:05:16 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-30 19:05:16 +0000
commit4269c0b17bcc5e41a3e21c6700d4ae8bc4ce934a (patch)
tree12ada61d5d230932bcc92554af82d1bfc00553db /media
parent36f6d92c99043e3211ff6130e9e2478f10d73413 (diff)
downloadchromium_src-4269c0b17bcc5e41a3e21c6700d4ae8bc4ce934a.zip
chromium_src-4269c0b17bcc5e41a3e21c6700d4ae8bc4ce934a.tar.gz
chromium_src-4269c0b17bcc5e41a3e21c6700d4ae8bc4ce934a.tar.bz2
Enable the mpeg4toannexb bitstream filter.
BUG=none TEST=none Review URL: http://codereview.chromium.org/441024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33307 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/base/mock_ffmpeg.cc21
-rw-r--r--media/base/mock_ffmpeg.h9
2 files changed, 30 insertions, 0 deletions
diff --git a/media/base/mock_ffmpeg.cc b/media/base/mock_ffmpeg.cc
index d9879b1..40be225 100644
--- a/media/base/mock_ffmpeg.cc
+++ b/media/base/mock_ffmpeg.cc
@@ -122,6 +122,27 @@ int avcodec_decode_video2(AVCodecContext* avctx, AVFrame* picture,
AVCodecDecodeVideo2(avctx, picture, got_picture_ptr, avpkt);
}
+AVBitStreamFilterContext* av_bitstream_filter_init(const char* name) {
+ return media::MockFFmpeg::get()->AVBitstreamFilterInit(name);
+}
+
+int av_bitstream_filter_filter(AVBitStreamFilterContext* bsfc,
+ AVCodecContext* avctx,
+ const char* args,
+ uint8_t** poutbuf,
+ int* poutbuf_size,
+ const uint8_t* buf,
+ int buf_size,
+ int keyframe) {
+ return media::MockFFmpeg::get()->
+ AVBitstreamFilterFilter(bsfc, avctx, args, poutbuf, poutbuf_size, buf,
+ buf_size, keyframe);
+}
+
+void av_bitstream_filter_close(AVBitStreamFilterContext* bsf) {
+ return media::MockFFmpeg::get()->AVBitstreamFilterClose(bsf);
+}
+
int av_open_input_file(AVFormatContext** format, const char* filename,
AVInputFormat* input_format, int buffer_size,
AVFormatParameters* parameters) {
diff --git a/media/base/mock_ffmpeg.h b/media/base/mock_ffmpeg.h
index eb3c86b..cfa9a1e 100644
--- a/media/base/mock_ffmpeg.h
+++ b/media/base/mock_ffmpeg.h
@@ -16,6 +16,8 @@ class MockFFmpeg {
MockFFmpeg();
virtual ~MockFFmpeg();
+ // TODO(ajwong): Organize this class, and make sure that all mock entrypoints
+ // are still used.
MOCK_METHOD0(AVCodecInit, void());
MOCK_METHOD1(AVRegisterProtocol, int(URLProtocol* protocol));
MOCK_METHOD0(AVRegisterAll, void());
@@ -29,6 +31,13 @@ class MockFFmpeg {
MOCK_METHOD4(AVCodecDecodeVideo2,
int(AVCodecContext* avctx, AVFrame* picture,
int* got_picture_ptr, AVPacket* avpkt));
+ MOCK_METHOD1(AVBitstreamFilterInit,
+ AVBitStreamFilterContext*(const char *name));
+ MOCK_METHOD8(AVBitstreamFilterFilter,
+ int(AVBitStreamFilterContext* bsfc, AVCodecContext* avctx,
+ const char* args, uint8_t** poutbuf, int* poutbuf_size,
+ const uint8_t* buf, int buf_size, int keyframe));
+ MOCK_METHOD1(AVBitstreamFilterClose, void(AVBitStreamFilterContext* bsf));
MOCK_METHOD5(AVOpenInputFile, int(AVFormatContext** format,
const char* filename,