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

Side by Side Diff: media/tools/player_x11/player_x11.cc

Issue 16297002: Update media/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/tools/demuxer_bench/demuxer_bench.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <signal.h> 5 #include <signal.h>
6 6
7 #include <iostream> // NOLINT 7 #include <iostream> // NOLINT
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 typedef base::Callback<void(media::VideoFrame*)> PaintCB; 84 typedef base::Callback<void(media::VideoFrame*)> PaintCB;
85 void Paint(base::MessageLoop* message_loop, const PaintCB& paint_cb, 85 void Paint(base::MessageLoop* message_loop, const PaintCB& paint_cb,
86 const scoped_refptr<media::VideoFrame>& video_frame) { 86 const scoped_refptr<media::VideoFrame>& video_frame) {
87 if (message_loop != base::MessageLoop::current()) { 87 if (message_loop != base::MessageLoop::current()) {
88 message_loop->PostTask(FROM_HERE, base::Bind( 88 message_loop->PostTask(FROM_HERE, base::Bind(
89 &Paint, message_loop, paint_cb, video_frame)); 89 &Paint, message_loop, paint_cb, video_frame));
90 return; 90 return;
91 } 91 }
92 92
93 paint_cb.Run(video_frame); 93 paint_cb.Run(video_frame.get());
94 } 94 }
95 95
96 static void OnBufferingState(media::Pipeline::BufferingState buffering_state) {} 96 static void OnBufferingState(media::Pipeline::BufferingState buffering_state) {}
97 97
98 static void NeedKey(const std::string& type, scoped_ptr<uint8[]> init_data, 98 static void NeedKey(const std::string& type, scoped_ptr<uint8[]> init_data,
99 int init_data_size) { 99 int init_data_size) {
100 std::cout << "File is encrypted." << std::endl; 100 std::cout << "File is encrypted." << std::endl;
101 } 101 }
102 102
103 static void SaveStatusAndSignal(base::WaitableEvent* event, 103 static void SaveStatusAndSignal(base::WaitableEvent* event,
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // Release callback which releases video renderer. Do this before cleaning up 302 // Release callback which releases video renderer. Do this before cleaning up
303 // X below since the video renderer has some X cleanup duties as well. 303 // X below since the video renderer has some X cleanup duties as well.
304 paint_cb.Reset(); 304 paint_cb.Reset();
305 305
306 XDestroyWindow(g_display, g_window); 306 XDestroyWindow(g_display, g_window);
307 XCloseDisplay(g_display); 307 XCloseDisplay(g_display);
308 g_audio_manager = NULL; 308 g_audio_manager = NULL;
309 309
310 return 0; 310 return 0;
311 } 311 }
OLDNEW
« no previous file with comments | « media/tools/demuxer_bench/demuxer_bench.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698