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

Unified Diff: media/base/stream_parser.h

Issue 254473006: Add media::StreamParser::StreamParameter struct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « no previous file | media/base/stream_parser.cc » ('j') | media/formats/mpeg/mpeg_audio_stream_parser_base.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/stream_parser.h
diff --git a/media/base/stream_parser.h b/media/base/stream_parser.h
index 8123b4fc3d3deb3183261451e6b1f76ce9fea261..a206a7bea6f168d6a250b7478ded350d955c6e23 100644
--- a/media/base/stream_parser.h
+++ b/media/base/stream_parser.h
@@ -46,24 +46,27 @@ class MEDIA_EXPORT StreamParser {
// Map of text track ID to decode-timestamp-ordered buffers for the track.
typedef std::map<TrackId, const BufferQueue> TextBufferQueueMap;
- StreamParser();
- virtual ~StreamParser();
+ // Stream parameters passed in InitCB
+ struct StreamParameters {
acolwell GONE FROM CHROMIUM 2014/04/24 21:00:55 nit: s/Stream// or s/Stream/Init/ so we don't have
Sergey Ulanov 2014/04/24 22:13:43 Done.
+ StreamParameters();
acolwell GONE FROM CHROMIUM 2014/04/24 21:00:55 nit: I think we should at least force duration to
Sergey Ulanov 2014/04/24 22:13:43 Done.
+
+ // Stream duration.
+ base::TimeDelta duration;
+
+ // Indicates the source time associated with presentation timestamp 0. A
+ // null Time is returned if no mapping to Time exists.
+ base::Time timeline_offset;
+
+ // Indicates that timestampOffset should be updated based on the earliest
+ // end timestamp (audio or video) provided during each NewBuffersCB.
+ bool auto_update_timestamp_offset;
+ };
// Indicates completion of parser initialization.
- // First parameter - Indicates initialization success. Set to true if
- // initialization was successful. False if an error
- // occurred.
- // Second parameter - Indicates the stream duration. Only contains a valid
- // value if the first parameter is true.
- // Third parameter - Indicates the Time associated with
- // presentation timestamp 0 if such a mapping exists in
- // the bytestream. If no mapping exists this parameter
- // contains null Time object. Only contains a valid
- // value if the first parameter is true.
- // Fourth parameters - Indicates that timestampOffset should be updated based
- // on the earliest end timestamp (audio or video) provided
- // during each NewBuffersCB.
- typedef base::Callback<void(bool, base::TimeDelta, base::Time, bool)> InitCB;
+ // success - True if initialization was successful.
+ // params - Stream parameters, in case of successful initialization.
+ typedef base::Callback<void(bool success,
+ const StreamParameters& params)> InitCB;
// Indicates when new stream configurations have been parsed.
// First parameter - The new audio configuration. If the config is not valid
@@ -103,6 +106,9 @@ class MEDIA_EXPORT StreamParser {
typedef base::Callback<void(const std::string&,
const std::vector<uint8>&)> NeedKeyCB;
+ StreamParser();
acolwell GONE FROM CHROMIUM 2014/04/24 21:00:55 Why is this needed? Should we be using a differend
Sergey Ulanov 2014/04/24 22:13:43 I just moved them here from line 49. Style guide s
+ virtual ~StreamParser();
+
// Initializes the parser with necessary callbacks. Must be called before any
// data is passed to Parse(). |init_cb| will be called once enough data has
// been parsed to determine the initial stream configurations, presentation
« no previous file with comments | « no previous file | media/base/stream_parser.cc » ('j') | media/formats/mpeg/mpeg_audio_stream_parser_base.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698