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

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

Issue 14320005: Revert 194993 "Remove reference counting from media::VideoDecode..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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 | « trunk/src/media/filters/vpx_video_decoder.cc ('k') | trunk/src/webkit/media/filter_helpers.h » ('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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 const PaintCB& paint_cb, 106 const PaintCB& paint_cb,
107 bool /* enable_audio */, 107 bool /* enable_audio */,
108 scoped_refptr<media::Pipeline>* pipeline, 108 scoped_refptr<media::Pipeline>* pipeline,
109 MessageLoop* paint_message_loop) { 109 MessageLoop* paint_message_loop) {
110 // Create our filter factories. 110 // Create our filter factories.
111 scoped_ptr<media::FilterCollection> collection( 111 scoped_ptr<media::FilterCollection> collection(
112 new media::FilterCollection()); 112 new media::FilterCollection());
113 media::FFmpegNeedKeyCB need_key_cb = base::Bind(&NeedKey); 113 media::FFmpegNeedKeyCB need_key_cb = base::Bind(&NeedKey);
114 collection->SetDemuxer(new media::FFmpegDemuxer(message_loop, data_source, 114 collection->SetDemuxer(new media::FFmpegDemuxer(message_loop, data_source,
115 need_key_cb)); 115 need_key_cb));
116 collection->GetVideoDecoders()->push_back(new media::FFmpegVideoDecoder(
117 message_loop));
116 118
117 119 // Create our video renderer and save a reference to it for painting.
118 ScopedVector<media::VideoDecoder> video_decoders;
119 video_decoders.push_back(new media::FFmpegVideoDecoder(message_loop));
120 scoped_ptr<media::VideoRenderer> video_renderer(new media::VideoRendererBase( 120 scoped_ptr<media::VideoRenderer> video_renderer(new media::VideoRendererBase(
121 message_loop, 121 message_loop,
122 video_decoders.Pass(),
123 media::SetDecryptorReadyCB(), 122 media::SetDecryptorReadyCB(),
124 base::Bind(&Paint, paint_message_loop, paint_cb), 123 base::Bind(&Paint, paint_message_loop, paint_cb),
125 base::Bind(&SetOpaque), 124 base::Bind(&SetOpaque),
126 true)); 125 true));
127 collection->SetVideoRenderer(video_renderer.Pass()); 126 collection->SetVideoRenderer(video_renderer.Pass());
128 127
129 ScopedVector<media::AudioDecoder> audio_decoders; 128 ScopedVector<media::AudioDecoder> audio_decoders;
130 audio_decoders.push_back(new media::FFmpegAudioDecoder(message_loop)); 129 audio_decoders.push_back(new media::FFmpegAudioDecoder(message_loop));
131 scoped_ptr<media::AudioRenderer> audio_renderer(new media::AudioRendererImpl( 130 scoped_ptr<media::AudioRenderer> audio_renderer(new media::AudioRendererImpl(
132 message_loop, 131 message_loop,
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // Release callback which releases video renderer. Do this before cleaning up 300 // Release callback which releases video renderer. Do this before cleaning up
302 // 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.
303 paint_cb.Reset(); 302 paint_cb.Reset();
304 303
305 XDestroyWindow(g_display, g_window); 304 XDestroyWindow(g_display, g_window);
306 XCloseDisplay(g_display); 305 XCloseDisplay(g_display);
307 g_audio_manager = NULL; 306 g_audio_manager = NULL;
308 307
309 return 0; 308 return 0;
310 } 309 }
OLDNEW
« no previous file with comments | « trunk/src/media/filters/vpx_video_decoder.cc ('k') | trunk/src/webkit/media/filter_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698