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

Unified Diff: media/tools/player_x11/player_x11.cc

Issue 7484054: Migrate Pipeline & PipelineImpl to PipelineStatusCB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CR nits Created 9 years, 4 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/tools/player_wtl/movie.cc ('k') | webkit/glue/media/buffered_data_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/tools/player_x11/player_x11.cc
diff --git a/media/tools/player_x11/player_x11.cc b/media/tools/player_x11/player_x11.cc
index 4b34a605e6c954d4d4c7bd3a9466003d349f3a35..f142bee320a5d0736f2f153e494001d1e2ab9e8b 100644
--- a/media/tools/player_x11/player_x11.cc
+++ b/media/tools/player_x11/player_x11.cc
@@ -8,6 +8,7 @@
#include <X11/Xlib.h>
#include "base/at_exit.h"
+#include "base/bind.h"
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/memory/scoped_ptr.h"
@@ -116,7 +117,7 @@ bool InitPipeline(MessageLoop* message_loop,
note.Wait();
if (note.status() != media::PIPELINE_OK) {
std::cout << "InitPipeline: " << note.status() << std::endl;
- (*pipeline)->Stop(NULL);
+ (*pipeline)->Stop(media::PipelineStatusCB());
return false;
}
@@ -137,7 +138,8 @@ void PeriodicalUpdate(
// interrupt signal was received during last time period.
// Quit message_loop only when pipeline is fully stopped.
MessageLoopQuitter* quitter = new MessageLoopQuitter(message_loop);
- pipeline->Stop(NewCallback(quitter, &MessageLoopQuitter::Quit));
+ pipeline->Stop(base::Bind(&MessageLoopQuitter::Quit,
+ base::Unretained(quitter)));
return;
}
@@ -161,7 +163,7 @@ void PeriodicalUpdate(
&border_width,
&depth);
base::TimeDelta time = pipeline->GetMediaDuration();
- pipeline->Seek(time*e.xbutton.x/width, NULL);
+ pipeline->Seek(time*e.xbutton.x/width, media::PipelineStatusCB());
}
break;
case KeyPress:
@@ -171,7 +173,8 @@ void PeriodicalUpdate(
g_running = false;
// Quit message_loop only when pipeline is fully stopped.
MessageLoopQuitter* quitter = new MessageLoopQuitter(message_loop);
- pipeline->Stop(NewCallback(quitter, &MessageLoopQuitter::Quit));
+ pipeline->Stop(base::Bind(&MessageLoopQuitter::Quit,
+ base::Unretained(quitter)));
return;
} else if (key == XK_space) {
if (pipeline->GetPlaybackRate() < 0.01f) // paused
« no previous file with comments | « media/tools/player_wtl/movie.cc ('k') | webkit/glue/media/buffered_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698