| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ | 5 #ifndef MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ |
| 6 #define MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ | 6 #define MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 const VideoDecoderConfig& video_decoder_config() { | 71 const VideoDecoderConfig& video_decoder_config() { |
| 72 return video_decoder_config_; | 72 return video_decoder_config_; |
| 73 } | 73 } |
| 74 | 74 |
| 75 typedef std::map<int, TextTrackConfig> TextTracks; | 75 typedef std::map<int, TextTrackConfig> TextTracks; |
| 76 | 76 |
| 77 const TextTracks& text_tracks() const { | 77 const TextTracks& text_tracks() const { |
| 78 return text_tracks_; | 78 return text_tracks_; |
| 79 } | 79 } |
| 80 | 80 |
| 81 int detected_audio_track_count() const { return detected_audio_track_count_; } |
| 82 |
| 83 int detected_video_track_count() const { return detected_video_track_count_; } |
| 84 |
| 85 int detected_text_track_count() const { return detected_text_track_count_; } |
| 86 |
| 81 // Note: Calling media_tracks() method passes the ownership of the MediaTracks | 87 // Note: Calling media_tracks() method passes the ownership of the MediaTracks |
| 82 // object from WebMTracksParser to the caller (which is typically | 88 // object from WebMTracksParser to the caller (which is typically |
| 83 // WebMStreamParser object). So this method must be called only once, after | 89 // WebMStreamParser object). So this method must be called only once, after |
| 84 // track parsing has been completed. | 90 // track parsing has been completed. |
| 85 scoped_ptr<MediaTracks> media_tracks() { | 91 scoped_ptr<MediaTracks> media_tracks() { |
| 86 CHECK(media_tracks_.get()); | 92 CHECK(media_tracks_.get()); |
| 87 return std::move(media_tracks_); | 93 return std::move(media_tracks_); |
| 88 } | 94 } |
| 89 | 95 |
| 90 private: | 96 private: |
| (...skipping 30 matching lines...) Expand all Loading... |
| 121 std::string audio_encryption_key_id_; | 127 std::string audio_encryption_key_id_; |
| 122 std::string video_encryption_key_id_; | 128 std::string video_encryption_key_id_; |
| 123 scoped_refptr<MediaLog> media_log_; | 129 scoped_refptr<MediaLog> media_log_; |
| 124 | 130 |
| 125 WebMAudioClient audio_client_; | 131 WebMAudioClient audio_client_; |
| 126 AudioDecoderConfig audio_decoder_config_; | 132 AudioDecoderConfig audio_decoder_config_; |
| 127 | 133 |
| 128 WebMVideoClient video_client_; | 134 WebMVideoClient video_client_; |
| 129 VideoDecoderConfig video_decoder_config_; | 135 VideoDecoderConfig video_decoder_config_; |
| 130 | 136 |
| 137 int detected_audio_track_count_; |
| 138 int detected_video_track_count_; |
| 139 int detected_text_track_count_; |
| 131 scoped_ptr<MediaTracks> media_tracks_; | 140 scoped_ptr<MediaTracks> media_tracks_; |
| 132 | 141 |
| 133 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser); | 142 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser); |
| 134 }; | 143 }; |
| 135 | 144 |
| 136 } // namespace media | 145 } // namespace media |
| 137 | 146 |
| 138 #endif // MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ | 147 #endif // MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ |
| OLD | NEW |