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

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 8341033: Remove DemuxerStream::GetAVStream() once and for all. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: now with cmath Created 9 years, 2 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 | « media/filters/ffmpeg_demuxer.h ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 45e5298fa32375bbc7bc7adca19bfc7265e2c537..0c63fde53f090fb6e2f52ca8ba2d4aec1578eb5c 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -73,6 +73,7 @@ FFmpegDemuxerStream::FFmpegDemuxerStream(FFmpegDemuxer* demuxer,
break;
case AVMEDIA_TYPE_VIDEO:
type_ = VIDEO;
+ AVStreamToVideoDecoderConfig(stream, &video_config_);
break;
default:
NOTREACHED();
@@ -254,15 +255,16 @@ void FFmpegDemuxerStream::EnableBitstreamConverter() {
}
}
-AVStream* FFmpegDemuxerStream::GetAVStream() {
- return stream_;
-}
-
const AudioDecoderConfig& FFmpegDemuxerStream::audio_decoder_config() {
CHECK_EQ(type_, AUDIO);
return audio_config_;
}
+const VideoDecoderConfig& FFmpegDemuxerStream::video_decoder_config() {
+ CHECK_EQ(type_, VIDEO);
+ return video_config_;
+}
+
// static
base::TimeDelta FFmpegDemuxerStream::ConvertStreamTimestamp(
const AVRational& time_base, int64 timestamp) {
@@ -684,8 +686,7 @@ void FFmpegDemuxer::DisableAudioStreamTask() {
// If the codec type is audio, remove the reference. DemuxTask() will
// look for such reference, and this will result in deleting the
// audio packets after they are demuxed.
- if (packet_streams_[i]->GetAVStream()->codec->codec_type ==
- AVMEDIA_TYPE_AUDIO) {
+ if (packet_streams_[i]->type() == DemuxerStream::AUDIO) {
packet_streams_[i] = NULL;
}
}
« no previous file with comments | « media/filters/ffmpeg_demuxer.h ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698