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

Side by Side Diff: media/base/stream_parser.h

Issue 13419002: Media Source dispatches inband text tracks (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_STREAM_PARSER_H_ 5 #ifndef MEDIA_BASE_STREAM_PARSER_H_
6 #define MEDIA_BASE_STREAM_PARSER_H_ 6 #define MEDIA_BASE_STREAM_PARSER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // Initialize the parser with necessary callbacks. Must be called before any 73 // Initialize the parser with necessary callbacks. Must be called before any
74 // data is passed to Parse(). |init_cb| will be called once enough data has 74 // data is passed to Parse(). |init_cb| will be called once enough data has
75 // been parsed to determine the initial stream configurations, presentation 75 // been parsed to determine the initial stream configurations, presentation
76 // start time, and duration. 76 // start time, and duration.
77 virtual void Init(const InitCB& init_cb, 77 virtual void Init(const InitCB& init_cb,
78 const NewConfigCB& config_cb, 78 const NewConfigCB& config_cb,
79 const NewBuffersCB& audio_cb, 79 const NewBuffersCB& audio_cb,
80 const NewBuffersCB& video_cb, 80 const NewBuffersCB& video_cb,
81 const NeedKeyCB& need_key_cb, 81 const NeedKeyCB& need_key_cb,
82 const TextTrackCB& text_track_cb,
83 const NewBuffersCB& text_cb,
82 const NewMediaSegmentCB& new_segment_cb, 84 const NewMediaSegmentCB& new_segment_cb,
83 const base::Closure& end_of_segment_cb, 85 const base::Closure& end_of_segment_cb,
84 const LogCB& log_cb) = 0; 86 const LogCB& log_cb) = 0;
85 87
86 // Called when a seek occurs. This flushes the current parser state 88 // Called when a seek occurs. This flushes the current parser state
87 // and puts the parser in a state where it can receive data for the new seek 89 // and puts the parser in a state where it can receive data for the new seek
88 // point. 90 // point.
89 virtual void Flush() = 0; 91 virtual void Flush() = 0;
90 92
91 // Called when there is new data to parse. 93 // Called when there is new data to parse.
92 // 94 //
93 // Returns true if the parse succeeds. 95 // Returns true if the parse succeeds.
94 virtual bool Parse(const uint8* buf, int size) = 0; 96 virtual bool Parse(const uint8* buf, int size) = 0;
95 97
96 private: 98 private:
97 DISALLOW_COPY_AND_ASSIGN(StreamParser); 99 DISALLOW_COPY_AND_ASSIGN(StreamParser);
98 }; 100 };
99 101
100 } // namespace media 102 } // namespace media
101 103
102 #endif // MEDIA_BASE_STREAM_PARSER_H_ 104 #endif // MEDIA_BASE_STREAM_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698