diff options
author | tyoshino@chromium.org <tyoshino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 02:34:54 +0000 |
---|---|---|
committer | tyoshino@chromium.org <tyoshino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 02:34:54 +0000 |
commit | 4a46734e12d09c0fa38a2ce706441a25e5d016c0 (patch) | |
tree | 38534d75bd050fcfd8c14055974e76524b3c39d6 /media/tools | |
parent | 1d124d66343f85bdb54e3cf3fc4ce44ffb2e7cf7 (diff) | |
download | chromium_src-4a46734e12d09c0fa38a2ce706441a25e5d016c0.zip chromium_src-4a46734e12d09c0fa38a2ce706441a25e5d016c0.tar.gz chromium_src-4a46734e12d09c0fa38a2ce706441a25e5d016c0.tar.bz2 |
Revert 77476 - Remove FFmpegVideoDecodeEngine's dependency on AVStream.
This change seems to have caused Linux Heapcheck bot redness.
http://build.chromium.org/p/chromium.memory/builders/Linux%20Heapcheck/builds/4846
First step of many towards removing DemuxerStream::QueryInterface, AVStreamProvider, and MediaFormat.
BUG=28206
TEST=media_unittests
Review URL: http://codereview.chromium.org/6624062
TBR=scherkus@chromium.org
Review URL: http://codereview.chromium.org/6665020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77770 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/tools')
-rw-r--r-- | media/tools/omx_test/omx_test.cc | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/media/tools/omx_test/omx_test.cc b/media/tools/omx_test/omx_test.cc index 2821f08..24cf4cc 100644 --- a/media/tools/omx_test/omx_test.cc +++ b/media/tools/omx_test/omx_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -170,15 +170,26 @@ class TestApp : public base::RefCountedThreadSafe<TestApp>, void Run() { StartProfiler(); - media::VideoCodecConfig config( - media::CodecIDToVideoCodec(av_stream_->codec->codec_id), - av_stream_->codec->coded_width, - av_stream_->codec->coded_height, - av_stream_->r_frame_rate.num, - av_stream_->r_frame_rate.den, - av_stream_->codec->extradata, - av_stream_->codec->extradata_size); - + // Setup the |engine_| with the message loop of the current thread. Also + // setup codec format and callbacks. + media::VideoCodecConfig config; + switch (av_stream_->codec->codec_id) { + case CODEC_ID_VC1: + config.codec = media::kCodecVC1; break; + case CODEC_ID_H264: + config.codec = media::kCodecH264; break; + case CODEC_ID_THEORA: + config.codec = media::kCodecTheora; break; + case CODEC_ID_MPEG2VIDEO: + config.codec = media::kCodecMPEG2; break; + case CODEC_ID_MPEG4: + config.codec = media::kCodecMPEG4; break; + default: + NOTREACHED(); break; + } + config.opaque_context = NULL; + config.width = av_stream_->codec->width; + config.height = av_stream_->codec->height; engine_.reset(new OmxVideoDecodeEngine()); engine_->Initialize(&message_loop_, this, NULL, config); |