OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_BASE_MEDIA_TRACK_H_ | 5 #ifndef MEDIA_BASE_MEDIA_TRACK_H_ |
6 #define MEDIA_BASE_MEDIA_TRACK_H_ | 6 #define MEDIA_BASE_MEDIA_TRACK_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
| 11 #include "media/base/stream_parser.h" |
11 | 12 |
12 namespace media { | 13 namespace media { |
13 | 14 |
14 class MEDIA_EXPORT MediaTrack { | 15 class MEDIA_EXPORT MediaTrack { |
15 public: | 16 public: |
16 enum Type { Text, Audio, Video }; | 17 enum Type { Text, Audio, Video }; |
17 MediaTrack(Type type, | 18 MediaTrack(Type type, |
18 const std::string& id, | 19 StreamParser::TrackId bytestream_track_id, |
19 const std::string& kind, | 20 const std::string& kind, |
20 const std::string& label, | 21 const std::string& label, |
21 const std::string& lang); | 22 const std::string& lang); |
22 ~MediaTrack(); | 23 ~MediaTrack(); |
23 | 24 |
24 Type type() const { return type_; } | 25 Type type() const { return type_; } |
25 | 26 |
26 const std::string& id() const { return id_; } | 27 StreamParser::TrackId bytestream_track_id() const { |
| 28 return bytestream_track_id_; |
| 29 } |
27 const std::string& kind() const { return kind_; } | 30 const std::string& kind() const { return kind_; } |
28 const std::string& label() const { return label_; } | 31 const std::string& label() const { return label_; } |
29 const std::string& language() const { return language_; } | 32 const std::string& language() const { return language_; } |
30 | 33 |
31 private: | 34 private: |
32 Type type_; | 35 Type type_; |
33 std::string id_; | 36 StreamParser::TrackId bytestream_track_id_; |
34 std::string kind_; | 37 std::string kind_; |
35 std::string label_; | 38 std::string label_; |
36 std::string language_; | 39 std::string language_; |
37 }; | 40 }; |
38 | 41 |
39 } // namespace media | 42 } // namespace media |
40 | 43 |
41 #endif // MEDIA_BASE_MEDIA_TRACK_H_ | 44 #endif // MEDIA_BASE_MEDIA_TRACK_H_ |
OLD | NEW |