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

Unified Diff: media/filters/blocking_url_protocol.h

Issue 2738503005: Created battor.tough_energy_cases (without dcurtis's change)
Patch Set: Reupload Created 3 years, 9 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 | « media/base/demuxer_perftest.cc ('k') | media/filters/blocking_url_protocol.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/blocking_url_protocol.h
diff --git a/media/filters/blocking_url_protocol.h b/media/filters/blocking_url_protocol.h
index 7e6a1eb4f314c61d2bee23eb9c2db117d8d0e386..4f9ef4f3507490cf957186a8c937db5da498d42f 100644
--- a/media/filters/blocking_url_protocol.h
+++ b/media/filters/blocking_url_protocol.h
@@ -9,7 +9,6 @@
#include "base/callback.h"
#include "base/macros.h"
-#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
#include "media/filters/ffmpeg_glue.h"
@@ -18,19 +17,19 @@ namespace media {
class DataSource;
// An implementation of FFmpegURLProtocol that blocks until the underlying
-// asynchronous DataSource::Read() operation completes. Generally constructed on
-// the media thread and used by ffmpeg through the AVIO interface from a
-// sequenced blocking pool.
+// asynchronous DataSource::Read() operation completes.
class MEDIA_EXPORT BlockingUrlProtocol : public FFmpegURLProtocol {
public:
// Implements FFmpegURLProtocol using the given |data_source|. |error_cb| is
// fired any time DataSource::Read() returns an error.
+ //
+ // TODO(scherkus): After all blocking operations are isolated on a separate
+ // thread we should be able to eliminate |error_cb|.
BlockingUrlProtocol(DataSource* data_source, const base::Closure& error_cb);
virtual ~BlockingUrlProtocol();
// Aborts any pending reads by returning a read error. After this method
- // returns all subsequent calls to Read() will immediately fail. May be called
- // from any thread and upon return ensures no further use of |data_source_|.
+ // returns all subsequent calls to Read() will immediately fail.
void Abort();
// FFmpegURLProtocol implementation.
@@ -45,14 +44,8 @@ class MEDIA_EXPORT BlockingUrlProtocol : public FFmpegURLProtocol {
// has completed.
void SignalReadCompleted(int size);
- // |data_source_lock_| allows Abort() to be called from any thread and stop
- // all outstanding access to |data_source_|. Typically Abort() is called from
- // the media thread while ffmpeg is operating on another thread.
- base::Lock data_source_lock_;
DataSource* data_source_;
-
base::Closure error_cb_;
- const bool is_streaming_;
// Used to unblock the thread during shutdown and when reads complete.
base::WaitableEvent aborted_;
« no previous file with comments | « media/base/demuxer_perftest.cc ('k') | media/filters/blocking_url_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698