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

Unified Diff: media/formats/webm/webm_stream_parser.cc

Issue 1735003004: Implement reading of media track info from WebM and MP4 containers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@demuxer-tracks2
Patch Set: rebase Created 4 years, 9 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/formats/webm/webm_stream_parser.h ('k') | media/formats/webm/webm_stream_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/webm/webm_stream_parser.cc
diff --git a/media/formats/webm/webm_stream_parser.cc b/media/formats/webm/webm_stream_parser.cc
index 3090768a5229ff8a5bdcffc51e6b9026fa601caa..0e82ca230b03391e20e43d3934601c7f983d6c15 100644
--- a/media/formats/webm/webm_stream_parser.cc
+++ b/media/formats/webm/webm_stream_parser.cc
@@ -9,6 +9,7 @@
#include "base/callback.h"
#include "base/callback_helpers.h"
#include "base/logging.h"
+#include "base/strings/string_number_conversions.h"
#include "media/base/media_track.h"
#include "media/base/media_tracks.h"
#include "media/base/timestamp_constants.h"
@@ -224,15 +225,8 @@ int WebMStreamParser::ParseInfoAndTracks(const uint8_t* data, int size) {
if (video_config.is_encrypted())
OnEncryptedMediaInitData(tracks_parser.video_encryption_key_id());
- scoped_ptr<MediaTracks> media_tracks(new MediaTracks());
- // TODO(servolk): Implement proper sourcing of media track info as described
- // in crbug.com/590085
- if (audio_config.IsValidConfig()) {
- media_tracks->AddAudioTrack(audio_config, "audio", "", "", "");
- }
- if (video_config.IsValidConfig()) {
- media_tracks->AddVideoTrack(video_config, "video", "", "", "");
- }
+ scoped_ptr<MediaTracks> media_tracks = tracks_parser.media_tracks();
+ CHECK(media_tracks.get());
if (!config_cb_.Run(std::move(media_tracks), tracks_parser.text_tracks())) {
DVLOG(1) << "New config data isn't allowed.";
return -1;
« no previous file with comments | « media/formats/webm/webm_stream_parser.h ('k') | media/formats/webm/webm_stream_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698