| OLD | NEW |
| 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_ENCODER_FACTORY_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_FACTORY_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_FACTORY_H_ | 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_FACTORY_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideoencoderfacto
ry.h" | 13 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideoencoderfacto
ry.h" |
| 14 | 14 |
| 15 namespace media { | 15 namespace content { |
| 16 | 16 |
| 17 class GpuVideoAcceleratorFactories; | 17 class RendererGpuVideoAcceleratorFactories; |
| 18 | |
| 19 } // namespace media | |
| 20 | |
| 21 namespace content { | |
| 22 | 18 |
| 23 // This class creates RTCVideoEncoder instances (each wrapping a | 19 // This class creates RTCVideoEncoder instances (each wrapping a |
| 24 // media::VideoEncodeAccelerator) on behalf of the WebRTC stack. | 20 // media::VideoEncodeAccelerator) on behalf of the WebRTC stack. |
| 25 class CONTENT_EXPORT RTCVideoEncoderFactory | 21 class CONTENT_EXPORT RTCVideoEncoderFactory |
| 26 : NON_EXPORTED_BASE(public cricket::WebRtcVideoEncoderFactory) { | 22 : NON_EXPORTED_BASE(public cricket::WebRtcVideoEncoderFactory) { |
| 27 public: | 23 public: |
| 28 explicit RTCVideoEncoderFactory( | 24 explicit RTCVideoEncoderFactory( |
| 29 const scoped_refptr<media::GpuVideoAcceleratorFactories>& gpu_factories); | 25 const scoped_refptr<RendererGpuVideoAcceleratorFactories>& gpu_factories); |
| 30 virtual ~RTCVideoEncoderFactory(); | 26 virtual ~RTCVideoEncoderFactory(); |
| 31 | 27 |
| 32 // cricket::WebRtcVideoEncoderFactory implementation. | 28 // cricket::WebRtcVideoEncoderFactory implementation. |
| 33 virtual webrtc::VideoEncoder* CreateVideoEncoder( | 29 virtual webrtc::VideoEncoder* CreateVideoEncoder( |
| 34 webrtc::VideoCodecType type) OVERRIDE; | 30 webrtc::VideoCodecType type) OVERRIDE; |
| 35 virtual void AddObserver(Observer* observer) OVERRIDE; | 31 virtual void AddObserver(Observer* observer) OVERRIDE; |
| 36 virtual void RemoveObserver(Observer* observer) OVERRIDE; | 32 virtual void RemoveObserver(Observer* observer) OVERRIDE; |
| 37 virtual const std::vector<VideoCodec>& codecs() const OVERRIDE; | 33 virtual const std::vector<VideoCodec>& codecs() const OVERRIDE; |
| 38 virtual void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) OVERRIDE; | 34 virtual void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) OVERRIDE; |
| 39 | 35 |
| 40 private: | 36 private: |
| 41 const scoped_refptr<media::GpuVideoAcceleratorFactories> gpu_factories_; | 37 const scoped_refptr<RendererGpuVideoAcceleratorFactories> gpu_factories_; |
| 42 | 38 |
| 43 // Codec support list of cricket::WebRtcVideoEncoderFactory::VideoCodec | 39 // Codec support list of cricket::WebRtcVideoEncoderFactory::VideoCodec |
| 44 // instances. | 40 // instances. |
| 45 std::vector<VideoCodec> codecs_; | 41 std::vector<VideoCodec> codecs_; |
| 46 | 42 |
| 47 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoderFactory); | 43 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoderFactory); |
| 48 }; | 44 }; |
| 49 | 45 |
| 50 } // namespace content | 46 } // namespace content |
| 51 | 47 |
| 52 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_FACTORY_H_ | 48 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_FACTORY_H_ |
| OLD | NEW |