summaryrefslogtreecommitdiffstats
path: root/media/tools
diff options
context:
space:
mode:
authoracolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-17 00:02:39 +0000
committeracolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-17 00:02:39 +0000
commita8e2cb8edaa45c72256f533f246fcfc79055c111 (patch)
treeb96a1223e56e27736653dd1f3ba75b6f761a0a74 /media/tools
parent5f503aa885ec8297a18349d1dd6851cf2393cd1c (diff)
downloadchromium_src-a8e2cb8edaa45c72256f533f246fcfc79055c111.zip
chromium_src-a8e2cb8edaa45c72256f533f246fcfc79055c111.tar.gz
chromium_src-a8e2cb8edaa45c72256f533f246fcfc79055c111.tar.bz2
Allow transitioning to HAVE_METADATA before pipeline initialization completes.
BUG=141429 Review URL: https://chromiumcodereview.appspot.com/10854151 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151988 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/tools')
-rw-r--r--media/tools/player_wtl/movie.cc5
-rw-r--r--media/tools/player_x11/player_x11.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/media/tools/player_wtl/movie.cc b/media/tools/player_wtl/movie.cc
index c29f8a0..984cff1 100644
--- a/media/tools/player_wtl/movie.cc
+++ b/media/tools/player_wtl/movie.cc
@@ -23,6 +23,8 @@
namespace media {
+static void OnBufferingState(media::Pipeline::BufferingState buffering_state) {}
+
Movie::Movie()
: audio_manager_(AudioManager::Create()),
enable_audio_(false),
@@ -95,7 +97,8 @@ bool Movie::Open(const wchar_t* url, VideoRendererBase* video_renderer) {
collection.Pass(),
media::PipelineStatusCB(),
media::PipelineStatusCB(),
- note.Callback());
+ note.Callback(),
+ base::Bind(&OnBufferingState));
// Wait until the pipeline is fully initialized.
note.Wait();
diff --git a/media/tools/player_x11/player_x11.cc b/media/tools/player_x11/player_x11.cc
index 8970b18..d65389d 100644
--- a/media/tools/player_x11/player_x11.cc
+++ b/media/tools/player_x11/player_x11.cc
@@ -97,6 +97,8 @@ void Paint(MessageLoop* message_loop, const PaintCB& paint_cb) {
g_video_renderer->PutCurrentFrame(video_frame);
}
+static void OnBufferingState(media::Pipeline::BufferingState buffering_state) {}
+
// TODO(vrk): Re-enabled audio. (crbug.com/112159)
bool InitPipeline(const scoped_refptr<base::MessageLoopProxy>& message_loop,
const scoped_refptr<media::DataSource>& data_source,
@@ -140,7 +142,7 @@ bool InitPipeline(const scoped_refptr<base::MessageLoopProxy>& message_loop,
media::PipelineStatusNotification note;
(*pipeline)->Start(
collection.Pass(), media::PipelineStatusCB(), media::PipelineStatusCB(),
- note.Callback());
+ note.Callback(), base::Bind(&OnBufferingState));
// Wait until the pipeline is fully initialized.
note.Wait();