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

Unified Diff: media/filters/chunk_demuxer.h

Issue 7538027: Make ChunkDemuxer error handling more consistent and robust. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove MessageLoop usage. Created 9 years, 5 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.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.h
diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h
index b39e7af2cee0bc06bef426766d5cbb75858cb54a..84e224d5173a3e6903de3d91ceb023b0fa991506 100644
--- a/media/filters/chunk_demuxer.h
+++ b/media/filters/chunk_demuxer.h
@@ -41,6 +41,9 @@ class ChunkDemuxer : public Demuxer {
// Methods used by an external object to control this demuxer.
void FlushData();
+
+ // Appends media data to the stream. Returns false if this method
+ // is called in an invalid state.
bool AppendData(const uint8* data, unsigned length);
void EndOfStream(PipelineStatus status);
bool HasEnded();
@@ -52,7 +55,7 @@ class ChunkDemuxer : public Demuxer {
INITIALIZING,
INITIALIZED,
ENDED,
- INIT_ERROR,
+ PARSE_ERROR,
SHUTDOWN,
};
@@ -76,8 +79,9 @@ class ChunkDemuxer : public Demuxer {
// contain one or more WebM Clusters. Returns false if parsing the data fails.
bool ParseAndAppendData_Locked(const uint8* data, int length);
- // Called when initialization fails. Handles calling & clearing init_cb_.
- void InitFailed_Locked();
+ // Reports an error and puts the demuxer in a state where it won't accept more
+ // data.
+ void ReportError_Locked(PipelineStatus error);
base::Lock lock_;
State state_;
« no previous file with comments | « no previous file | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698