| 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 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 id() const { return id_; } |
| 27 const std::string& kind() const { return kind_; } | 28 const std::string& kind() const { return kind_; } |
| 28 const std::string& label() const { return label_; } | 29 const std::string& label() const { return label_; } |
| 29 const std::string& language() const { return language_; } | 30 const std::string& language() const { return language_; } |
| 30 | 31 |
| 31 private: | 32 private: |
| 32 Type type_; | 33 Type type_; |
| 33 std::string id_; | 34 StreamParser::TrackId id_; |
| 34 std::string kind_; | 35 std::string kind_; |
| 35 std::string label_; | 36 std::string label_; |
| 36 std::string language_; | 37 std::string language_; |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 } // namespace media | 40 } // namespace media |
| 40 | 41 |
| 41 #endif // MEDIA_BASE_MEDIA_TRACK_H_ | 42 #endif // MEDIA_BASE_MEDIA_TRACK_H_ |
| OLD | NEW |