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

Unified Diff: media/base/stream_parser.h

Issue 10205004: Refactoring StreamParser & StreamParserHost interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/filters/chunk_demuxer.h » ('j') | media/filters/chunk_demuxer.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 8397fad1177cc58b0c2b45354f755ce7f0b46f88..b64b42584549e1ac3a363041ce85a070fa5dbb21 100644
--- a/media/base/stream_parser.h
+++ b/media/base/stream_parser.h
@@ -27,13 +27,11 @@ class MEDIA_EXPORT StreamParserHost {
StreamParserHost();
virtual ~StreamParserHost();
- // A new audio decoder configuration was encountered. All audio buffers
- // after this call will be associated with this configuration.
- virtual bool OnNewAudioConfig(const AudioDecoderConfig& config) = 0;
-
- // A new video decoder configuration was encountered. All video buffers
- // after this call will be associated with this configuration.
- virtual bool OnNewVideoConfig(const VideoDecoderConfig& config) = 0;
+ // New audio and/or video decoder configurations were encountered. All audio
+ // and video buffers after this call will be associated with these
+ // configurations.
+ virtual bool OnNewConfigs(const AudioDecoderConfig& audio_config,
scherkus (not reviewing) 2012/04/24 01:40:04 what does true/false mean?
acolwell GONE FROM CHROMIUM 2012/04/24 16:25:55 Done.
+ const VideoDecoderConfig& video_config) = 0;
// New audio buffers have been received.
virtual bool OnAudioBuffers(const BufferQueue& buffers) = 0;
@@ -72,10 +70,8 @@ class MEDIA_EXPORT StreamParser {
// Called when there is new data to parse.
//
- // Returns < 0 if the parse fails.
- // Returns 0 if more data is needed.
- // Returning > 0 indicates success & the number of bytes parsed.
- virtual int Parse(const uint8* buf, int size) = 0;
+ // Returns true if the parse succeeds.
+ virtual bool Parse(const uint8* buf, int size) = 0;
private:
DISALLOW_COPY_AND_ASSIGN(StreamParser);
« no previous file with comments | « no previous file | media/filters/chunk_demuxer.h » ('j') | media/filters/chunk_demuxer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698