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

Side by Side Diff: content/renderer/media/rtc_video_decoder_factory.h

Issue 19534002: Make RendererGpuVideoDecoderFactories live on arbitrary threads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_
7 7
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideodecoderfacto ry.h" 11 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideodecoderfacto ry.h"
12 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_i nterface.h" 12 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_i nterface.h"
13 13
14 namespace media { 14 namespace media {
15 class GpuVideoDecoderFactories; 15 class GpuVideoDecoderFactories;
16 } 16 }
17 17
18 namespace webrtc { 18 namespace webrtc {
19 class VideoDecoder; 19 class VideoDecoder;
20 } 20 }
21 21
22 namespace content { 22 namespace content {
23 class RendererGpuVideoDecoderFactories;
23 24
25 // TODO(wuchengli): add unittest.
24 class CONTENT_EXPORT RTCVideoDecoderFactory 26 class CONTENT_EXPORT RTCVideoDecoderFactory
25 : NON_EXPORTED_BASE(public cricket::WebRtcVideoDecoderFactory) { 27 : NON_EXPORTED_BASE(public cricket::WebRtcVideoDecoderFactory) {
26 public: 28 public:
27 RTCVideoDecoderFactory( 29 explicit RTCVideoDecoderFactory(
28 const scoped_refptr<media::GpuVideoDecoderFactories>& gpu_factories); 30 const scoped_refptr<RendererGpuVideoDecoderFactories>& gpu_factories);
29 virtual ~RTCVideoDecoderFactory(); 31 virtual ~RTCVideoDecoderFactory();
30 32
31 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while 33 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while
32 // this runs. 34 // this runs.
33 virtual webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type) 35 virtual webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type)
34 OVERRIDE; 36 OVERRIDE;
35 37
36 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while 38 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while
37 // this runs. 39 // this runs.
38 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) OVERRIDE; 40 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) OVERRIDE;
39 41
40 private: 42 private:
41 scoped_refptr<base::MessageLoopProxy> vda_loop_proxy_; 43 scoped_refptr<RendererGpuVideoDecoderFactories> gpu_factories_;
42 scoped_ptr<webrtc::VideoDecoder> decoder_;
43 44
44 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderFactory); 45 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderFactory);
45 }; 46 };
46 47
47 } // namespace content 48 } // namespace content
48 49
49 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ 50 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_video_decoder.cc ('k') | content/renderer/media/rtc_video_decoder_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698