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

Unified Diff: media/base/media_track.h

Issue 2050043002: Generate and assign media track ids in demuxers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-streamparser-trackid
Patch Set: Created 4 years, 6 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/base/media_track.h
diff --git a/media/base/media_track.h b/media/base/media_track.h
index 001d18d83c7ad111f2d83b253764793f62876533..f5f64bc11a5704b1e2550978f854d862f9f771fe 100644
--- a/media/base/media_track.h
+++ b/media/base/media_track.h
@@ -11,10 +11,12 @@
#include "media/base/stream_parser.h"
namespace media {
+class DemuxerStream;
xhwang 2016/06/09 06:06:02 Why is this needed?
servolk 2016/06/09 19:14:46 Not needed, leftover from earlier prototyping. Rem
class MEDIA_EXPORT MediaTrack {
public:
enum Type { Text, Audio, Video };
+ using TrackId = std::string;
xhwang 2016/06/09 06:06:02 Will it work if s/Trackid/Id? MediaTrack::TrackId
servolk 2016/06/09 19:14:46 Done.
MediaTrack(Type type,
StreamParser::TrackId byteStreamTrackId,
const std::string& kind,
@@ -29,12 +31,16 @@ class MEDIA_EXPORT MediaTrack {
const std::string& label() const { return label_; }
const std::string& language() const { return language_; }
+ TrackId id() const;
+ void setId(TrackId id);
xhwang 2016/06/09 06:06:02 set_id()
servolk 2016/06/09 19:14:46 Done.
+
private:
Type type_;
StreamParser::TrackId byteStreamTrackId_;
xhwang 2016/06/09 06:06:02 nit: use lower_cast instead of CamelCase
servolk 2016/06/09 19:14:46 Done.
std::string kind_;
std::string label_;
std::string language_;
xhwang 2016/06/09 06:06:02 Can you add comments about what these fields are?
servolk 2016/06/09 19:14:46 Done.
+ TrackId id_;
xhwang 2016/06/09 06:06:02 What's the requirement on the uniqueness of the tr
xhwang 2016/06/09 06:06:02 Can you comment about the difference b/w byteStrea
servolk 2016/06/09 19:14:46 IIUC these need to be unique in the scope of a sin
servolk 2016/06/09 19:14:46 Done.
};
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698