Index: media/base/stream_parser.h |
diff --git a/media/base/stream_parser.h b/media/base/stream_parser.h |
index 33a336def8bc4e418750fc5f472856469b54dece..806d959babf101360ba651330b55d900237d654a 100644 |
--- a/media/base/stream_parser.h |
+++ b/media/base/stream_parser.h |
@@ -59,12 +59,14 @@ class MEDIA_EXPORT StreamParser { |
const BufferQueue&)> NewBuffersCB; |
// New stream buffers of inband text have been parsed. |
- // First parameter - The text track to which these cues will be added. |
+ // First parameter - The (number of the) text track to which these cues will |
+ // be added. |
// Second parameter - A queue of newly parsed buffers. |
// Return value - True indicates that the buffers are accepted. |
// False if something was wrong with the buffers and a parsing |
// error should be signalled. |
- typedef base::Callback<bool(TextTrack*, const BufferQueue&)> NewTextBuffersCB; |
+ typedef base::Callback<bool(int track_number, |
+ const BufferQueue&)> NewTextBuffersCB; |
// Signals the beginning of a new media segment. |
typedef base::Callback<void()> NewMediaSegmentCB; |
@@ -76,6 +78,16 @@ class MEDIA_EXPORT StreamParser { |
typedef base::Callback<void(const std::string&, |
const std::vector<uint8>&)> NeedKeyCB; |
+ // New text track has been parsed. |
+ // First parameter - The track number (from the Track element). |
+ // Second parameter - The track kind (inferred from the CodecID). |
+ // Third parameter - The track name sub-element value. |
+ // Fourth parameter - The track language sub-element value. |
+ typedef base::Callback<void(int track_number, |
+ TextKind kind, |
+ const std::string& name, |
+ const std::string& language)> NewTextTrackCB; |
+ |
// Initialize 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 |
@@ -85,7 +97,7 @@ class MEDIA_EXPORT StreamParser { |
const NewBuffersCB& new_buffers_cb, |
const NewTextBuffersCB& text_cb, |
const NeedKeyCB& need_key_cb, |
- const AddTextTrackCB& add_text_track_cb, |
+ const NewTextTrackCB& new_text_track_cb, |
const NewMediaSegmentCB& new_segment_cb, |
const base::Closure& end_of_segment_cb, |
const LogCB& log_cb) = 0; |