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

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

Issue 27420004: Remove threading from RendererGpuVideoAcceleratorFactories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dthread
Patch Set: d731420c Comment update, 'git cl format', rebase Created 7 years, 1 month 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 webrtc { 14 namespace webrtc {
15 class VideoDecoder; 15 class VideoDecoder;
16 } 16 } // namespace webrtc
17
18 namespace media {
19 class GpuVideoAcceleratorFactories;
20 } // namespace media
17 21
18 namespace content { 22 namespace content {
19 class RendererGpuVideoAcceleratorFactories;
20 23
21 // TODO(wuchengli): add unittest. 24 // TODO(wuchengli): add unittest.
22 class CONTENT_EXPORT RTCVideoDecoderFactory 25 class CONTENT_EXPORT RTCVideoDecoderFactory
23 : NON_EXPORTED_BASE(public cricket::WebRtcVideoDecoderFactory) { 26 : NON_EXPORTED_BASE(public cricket::WebRtcVideoDecoderFactory) {
24 public: 27 public:
25 explicit RTCVideoDecoderFactory( 28 explicit RTCVideoDecoderFactory(
26 const scoped_refptr<RendererGpuVideoAcceleratorFactories>& gpu_factories); 29 const scoped_refptr<media::GpuVideoAcceleratorFactories>& gpu_factories);
27 virtual ~RTCVideoDecoderFactory(); 30 virtual ~RTCVideoDecoderFactory();
28 31
29 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while 32 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while
30 // this runs. 33 // this runs.
31 virtual webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type) 34 virtual webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type)
32 OVERRIDE; 35 OVERRIDE;
33 36
34 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while 37 // Runs on Chrome_libJingle_WorkerThread. The child thread is blocked while
35 // this runs. 38 // this runs.
36 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) OVERRIDE; 39 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) OVERRIDE;
37 40
38 private: 41 private:
39 scoped_refptr<RendererGpuVideoAcceleratorFactories> gpu_factories_; 42 scoped_refptr<media::GpuVideoAcceleratorFactories> gpu_factories_;
40 43
41 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderFactory); 44 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderFactory);
42 }; 45 };
43 46
44 } // namespace content 47 } // namespace content
45 48
46 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_ 49 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698