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

Unified Diff: media/formats/webm/webm_tracks_parser.h

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_unittest.cc ('k') | media/formats/webm/webm_tracks_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/webm/webm_tracks_parser.h
diff --git a/media/formats/webm/webm_tracks_parser.h b/media/formats/webm/webm_tracks_parser.h
index 3569907274c6475dfb64b024f780c6c97d5e764e..6286b2303e0fa02280e246393fbf6bbc997f2c1c 100644
--- a/media/formats/webm/webm_tracks_parser.h
+++ b/media/formats/webm/webm_tracks_parser.h
@@ -18,6 +18,7 @@
#include "base/time/time.h"
#include "media/base/audio_decoder_config.h"
#include "media/base/media_log.h"
+#include "media/base/media_tracks.h"
#include "media/base/text_track_config.h"
#include "media/base/video_decoder_config.h"
#include "media/formats/webm/webm_audio_client.h"
@@ -77,6 +78,15 @@ class MEDIA_EXPORT WebMTracksParser : public WebMParserClient {
return text_tracks_;
}
+ // Note: Calling media_tracks() method passes the ownership of the MediaTracks
+ // object from WebMTracksParser to the caller (which is typically
+ // WebMStreamParser object). So this method must be called only once, after
+ // track parsing has been completed.
+ scoped_ptr<MediaTracks> media_tracks() {
+ CHECK(media_tracks_.get());
+ return std::move(media_tracks_);
+ }
+
private:
// WebMParserClient implementation.
WebMParserClient* OnListStart(int id) override;
@@ -114,6 +124,8 @@ class MEDIA_EXPORT WebMTracksParser : public WebMParserClient {
WebMVideoClient video_client_;
VideoDecoderConfig video_decoder_config_;
+ scoped_ptr<MediaTracks> media_tracks_;
+
DISALLOW_COPY_AND_ASSIGN(WebMTracksParser);
};
« no previous file with comments | « media/formats/webm/webm_stream_parser_unittest.cc ('k') | media/formats/webm/webm_tracks_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698