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

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

Issue 1826583003: MSE: Record counts of detected MSE audio, video and text tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 6286b2303e0fa02280e246393fbf6bbc997f2c1c..ae68f362e429ea7fa4753a254a37858a387bb176 100644
--- a/media/formats/webm/webm_tracks_parser.h
+++ b/media/formats/webm/webm_tracks_parser.h
@@ -78,6 +78,12 @@ class MEDIA_EXPORT WebMTracksParser : public WebMParserClient {
return text_tracks_;
}
+ int detected_audio_track_count() const { return detected_audio_track_count_; }
+
+ int detected_video_track_count() const { return detected_video_track_count_; }
+
+ int detected_text_track_count() const { return detected_text_track_count_; }
+
// 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
@@ -96,21 +102,21 @@ class MEDIA_EXPORT WebMTracksParser : public WebMParserClient {
bool OnBinary(int id, const uint8_t* data, int size) override;
bool OnString(int id, const std::string& str) override;
- int64_t track_type_;
- int64_t track_num_;
+ int64_t track_type_ = -1;
+ int64_t track_num_ = -1;
std::string track_name_;
std::string track_language_;
std::string codec_id_;
std::vector<uint8_t> codec_private_;
- int64_t seek_preroll_;
- int64_t codec_delay_;
- int64_t default_duration_;
+ int64_t seek_preroll_ = -1;
+ int64_t codec_delay_ = -1;
+ int64_t default_duration_ = -1;
scoped_ptr<WebMContentEncodingsClient> track_content_encodings_client_;
- int64_t audio_track_num_;
- int64_t audio_default_duration_;
- int64_t video_track_num_;
- int64_t video_default_duration_;
+ int64_t audio_track_num_ = -1;
+ int64_t audio_default_duration_ = -1;
+ int64_t video_track_num_ = -1;
+ int64_t video_default_duration_ = -1;
bool ignore_text_tracks_;
TextTracks text_tracks_;
std::set<int64_t> ignored_tracks_;
@@ -124,6 +130,9 @@ class MEDIA_EXPORT WebMTracksParser : public WebMParserClient {
WebMVideoClient video_client_;
VideoDecoderConfig video_decoder_config_;
+ int detected_audio_track_count_ = 0;
+ int detected_video_track_count_ = 0;
+ int detected_text_track_count_ = 0;
scoped_ptr<MediaTracks> media_tracks_;
DISALLOW_COPY_AND_ASSIGN(WebMTracksParser);

Powered by Google App Engine
This is Rietveld 408576698