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

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 2050043002: Generate and assign media track ids in demuxers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-streamparser-trackid
Patch Set: rebase to ToT Created 4 years, 6 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/chunk_demuxer_unittest.cc ('k') | media/filters/frame_processor_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 be8b1d9a687d080a872d5961733685db442b1877..5dc61ea35cbb238c6eaa364b099139f22c9c8d17 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -1223,22 +1223,25 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
// Note when we find our audio/video stream (we only want one of each) and
// record src= playback UMA stats for the stream's decoder config.
+ MediaTrack* media_track = nullptr;
if (codec_type == AVMEDIA_TYPE_AUDIO) {
CHECK(!audio_stream);
audio_stream = stream;
audio_config = streams_[i]->audio_decoder_config();
RecordAudioCodecStats(audio_config);
- media_tracks->AddAudioTrack(audio_config, track_id, "main", track_label,
- track_language);
+ media_track = media_tracks->AddAudioTrack(audio_config, track_id, "main",
+ track_label, track_language);
+ media_track->set_id(base::UintToString(track_id));
} else if (codec_type == AVMEDIA_TYPE_VIDEO) {
CHECK(!video_stream);
video_stream = stream;
video_config = streams_[i]->video_decoder_config();
RecordVideoCodecStats(video_config, stream->codec->color_range);
- media_tracks->AddVideoTrack(video_config, track_id, "main", track_label,
- track_language);
+ media_track = media_tracks->AddVideoTrack(video_config, track_id, "main",
+ track_label, track_language);
+ media_track->set_id(base::UintToString(track_id));
}
max_duration = std::max(max_duration, streams_[i]->duration());
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/filters/frame_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698