diff options
author | erikchen@chromium.org <erikchen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-26 00:05:16 +0000 |
---|---|---|
committer | erikchen@chromium.org <erikchen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-26 00:05:16 +0000 |
commit | 0b3bf8a498bf255197f21ddba0f645a2a3a9e3bc (patch) | |
tree | b24da4514899327a1a9870464cb7076389edc39a /media/tools | |
parent | 923c7ad68f067f57afcb4edec224ac346f792ad3 (diff) | |
download | chromium_src-0b3bf8a498bf255197f21ddba0f645a2a3a9e3bc.zip chromium_src-0b3bf8a498bf255197f21ddba0f645a2a3a9e3bc.tar.gz chromium_src-0b3bf8a498bf255197f21ddba0f645a2a3a9e3bc.tar.bz2 |
Revert of Remove Has{Audio,Video}(), GetInitialNaturalSize() from media::Pipeline. (https://codereview.chromium.org/211313004/)
Reason for revert:
This CL breaks Linux Clang (dbg) Build
http://build.chromium.org/p/chromium.linux/builders/Linux%20Clang%20%28dbg%29/builds/57597
http://build.chromium.org/p/chromium.linux/builders/Linux%20Clang%20%28dbg%29/builds/57598
from thakis: the problem is probably that ffmpeg_regression_tests doesn't link in gfx_geometry and you're missing a dep on that
Original issue's description:
> Remove Has{Audio,Video}(), GetInitialNaturalSize() from media::Pipeline.
>
> This splits PipelineBufferingStateCB in two: PipelineMetadataCB, which
> includes the available tracks and natural size in a PipelineMetadata
> struct; and PipelinePrerollCompleted, with no parameters. Now
> WebMediaPlayerImpl can cache the metadata and the accessors are not
> required.
>
> This was previously committed as r259154.
>
> BUG=148541
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=259385
TBR=scherkus@chromium.org,dalecurtis@chromium.org,sandersd@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=148541
Review URL: https://codereview.chromium.org/209043005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259402 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/tools')
-rw-r--r-- | media/tools/player_x11/player_x11.cc | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/media/tools/player_x11/player_x11.cc b/media/tools/player_x11/player_x11.cc index 26834ea..32e5019 100644 --- a/media/tools/player_x11/player_x11.cc +++ b/media/tools/player_x11/player_x11.cc @@ -93,11 +93,7 @@ void Paint(base::MessageLoop* message_loop, const PaintCB& paint_cb, paint_cb.Run(video_frame.get()); } -static void DoNothing() {} - -static void OnStatus(media::PipelineStatus status) {} - -static void OnMetadata(media::PipelineMetadata metadata) {} +static void OnBufferingState(media::Pipeline::BufferingState buffering_state) {} static void NeedKey(const std::string& type, const std::vector<uint8>& init_data) { @@ -148,10 +144,9 @@ void InitPipeline( media::PipelineStatus status; pipeline->Start( - collection.Pass(), base::Bind(&DoNothing), base::Bind(&OnStatus), + collection.Pass(), base::Closure(), media::PipelineStatusCB(), base::Bind(&SaveStatusAndSignal, &event, &status), - base::Bind(&OnMetadata), base::Bind(&DoNothing), - base::Bind(&DoNothing)); + base::Bind(&OnBufferingState), base::Closure()); // Wait until the pipeline is fully initialized. event.Wait(); @@ -167,7 +162,8 @@ void TerminateHandler(int signal) { void PeriodicalUpdate( media::Pipeline* pipeline, - base::MessageLoop* message_loop) { + base::MessageLoop* message_loop, + bool audio_only) { if (!g_running) { // interrupt signal was received during last time period. // Quit message_loop only when pipeline is fully stopped. @@ -195,7 +191,7 @@ void PeriodicalUpdate( &border_width, &depth); base::TimeDelta time = pipeline->GetMediaDuration(); - pipeline->Seek(time*e.xbutton.x/width, base::Bind(&OnStatus)); + pipeline->Seek(time*e.xbutton.x/width, media::PipelineStatusCB()); } break; case KeyPress: @@ -223,7 +219,8 @@ void PeriodicalUpdate( FROM_HERE, base::Bind(&PeriodicalUpdate, base::Unretained(pipeline), - message_loop), + message_loop, + audio_only), base::TimeDelta::FromMilliseconds(10)); } @@ -294,7 +291,8 @@ int main(int argc, char** argv) { g_running = true; message_loop.PostTask(FROM_HERE, base::Bind( - &PeriodicalUpdate, base::Unretained(&pipeline), &message_loop)); + &PeriodicalUpdate, base::Unretained(&pipeline), &message_loop, + !pipeline.HasVideo())); message_loop.Run(); // Cleanup tasks. |