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

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

Issue 23072043: Change NeedKeyCB to use std::vector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix seek_tester, demuxer_bench, and player_x11 Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/tools/demuxer_bench/demuxer_bench.cc ('k') | media/tools/seek_tester/seek_tester.cc » ('j') | 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.get()); 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,
99 int init_data_size) { 99 const std::vector<uint8>& init_data) {
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,
104 media::PipelineStatus* status_out, 104 media::PipelineStatus* status_out,
105 media::PipelineStatus status) { 105 media::PipelineStatus status) {
106 *status_out = status; 106 *status_out = status;
107 event->Signal(); 107 event->Signal();
108 } 108 }
109 109
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // Release callback which releases video renderer. Do this before cleaning up 300 // Release callback which releases video renderer. Do this before cleaning up
301 // X below since the video renderer has some X cleanup duties as well. 301 // X below since the video renderer has some X cleanup duties as well.
302 paint_cb.Reset(); 302 paint_cb.Reset();
303 303
304 XDestroyWindow(g_display, g_window); 304 XDestroyWindow(g_display, g_window);
305 XCloseDisplay(g_display); 305 XCloseDisplay(g_display);
306 g_audio_manager = NULL; 306 g_audio_manager = NULL;
307 307
308 return 0; 308 return 0;
309 } 309 }
OLDNEW
« no previous file with comments | « media/tools/demuxer_bench/demuxer_bench.cc ('k') | media/tools/seek_tester/seek_tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698