| 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 30 matching lines...) Expand all Loading... |
| 41 // Returns 0 if more data is needed. | 41 // Returns 0 if more data is needed. |
| 42 // Returns the number of bytes parsed on success. | 42 // Returns the number of bytes parsed on success. |
| 43 int Parse(const uint8_t* buf, int size); | 43 int Parse(const uint8_t* buf, int size); |
| 44 | 44 |
| 45 int64_t audio_track_num() const { return audio_track_num_; } | 45 int64_t audio_track_num() const { return audio_track_num_; } |
| 46 int64_t video_track_num() const { return video_track_num_; } | 46 int64_t video_track_num() const { return video_track_num_; } |
| 47 | 47 |
| 48 // If TrackEntry DefaultDuration field existed for the associated audio or | 48 // If TrackEntry DefaultDuration field existed for the associated audio or |
| 49 // video track, returns that value converted from ns to base::TimeDelta with | 49 // video track, returns that value converted from ns to base::TimeDelta with |
| 50 // precision not greater than |timecode_scale_in_us|. Defaults to | 50 // precision not greater than |timecode_scale_in_us|. Defaults to |
| 51 // kNoTimestamp(). | 51 // kNoTimestamp. |
| 52 base::TimeDelta GetAudioDefaultDuration( | 52 base::TimeDelta GetAudioDefaultDuration( |
| 53 const double timecode_scale_in_us) const; | 53 const double timecode_scale_in_us) const; |
| 54 base::TimeDelta GetVideoDefaultDuration( | 54 base::TimeDelta GetVideoDefaultDuration( |
| 55 const double timecode_scale_in_us) const; | 55 const double timecode_scale_in_us) const; |
| 56 | 56 |
| 57 const std::set<int64_t>& ignored_tracks() const { return ignored_tracks_; } | 57 const std::set<int64_t>& ignored_tracks() const { return ignored_tracks_; } |
| 58 | 58 |
| 59 const std::string& audio_encryption_key_id() const { | 59 const std::string& audio_encryption_key_id() const { |
| 60 return audio_encryption_key_id_; | 60 return audio_encryption_key_id_; |
| 61 } | 61 } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 int detected_video_track_count_; | 138 int detected_video_track_count_; |
| 139 int detected_text_track_count_; | 139 int detected_text_track_count_; |
| 140 std::unique_ptr<MediaTracks> media_tracks_; | 140 std::unique_ptr<MediaTracks> media_tracks_; |
| 141 | 141 |
| 142 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser); | 142 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser); |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 } // namespace media | 145 } // namespace media |
| 146 | 146 |
| 147 #endif // MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ | 147 #endif // MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ |
| OLD | NEW |