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

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 99160: Clean up FFmpeg media formats and switch to using av_get_bits_per_sample_format(). (Closed)
Patch Set: Created 11 years, 8 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: media/filters/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index e6c08954f0eefd95744c0426f9cc44760274eb1e..077314e6c64179aabfa1777f97174206249c767f 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -60,27 +60,15 @@ FFmpegDemuxerStream::FFmpegDemuxerStream(FFmpegDemuxer* demuxer,
case CODEC_TYPE_AUDIO:
media_format_.SetAsString(MediaFormat::kMimeType,
mime_type::kFFmpegAudio);
- media_format_.SetAsInteger(MediaFormat::kChannels,
- stream->codec->channels);
awong 2009/04/28 23:25:56 do we just not need these values anymore?
scherkus (not reviewing) 2009/04/28 23:31:10 the mime types "audio/x-ffmpeg" and "video/x-ffmpe
- media_format_.SetAsInteger(MediaFormat::kSampleRate,
- stream->codec->sample_rate);
- media_format_.SetAsInteger(MediaFormat::kSampleBits,
- stream->codec->bits_per_raw_sample);
break;
case CODEC_TYPE_VIDEO:
media_format_.SetAsString(MediaFormat::kMimeType,
mime_type::kFFmpegVideo);
- media_format_.SetAsInteger(MediaFormat::kHeight,
- stream->codec->height);
- media_format_.SetAsInteger(MediaFormat::kWidth,
- stream->codec->width);
break;
default:
NOTREACHED();
break;
}
- int codec_id = static_cast<int>(stream->codec->codec_id);
- media_format_.SetAsInteger(kFFmpegCodecID, codec_id);
// Calculate the time base and duration in microseconds.
int64 time_base_us = static_cast<int64>(av_q2d(stream->time_base) *

Powered by Google App Engine
This is Rietveld 408576698