Chromium Code Reviews| Index: content/renderer/media/rtc_video_encoder_factory.h |
| diff --git a/content/renderer/media/rtc_video_encoder_factory.h b/content/renderer/media/rtc_video_encoder_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1ac052c8f6353cb03dc0e5553d4b79eb0cfc0986 |
| --- /dev/null |
| +++ b/content/renderer/media/rtc_video_encoder_factory.h |
| @@ -0,0 +1,51 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_FACTORY_H_ |
| +#define CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_FACTORY_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/threading/thread.h" |
| +#include "content/common/content_export.h" |
| +#include "third_party/libjingle/source/talk/media/webrtc/webrtcvideoencoderfactory.h" |
| + |
| +namespace media { |
| + |
| +class GpuVideoAcceleratorFactories; |
| + |
| +} // namespace media |
| + |
| +namespace content { |
| + |
| +// This classes creates RTCVideoEncoder instances (each wrapping a |
| +// media::VideoEncodeAccelerator) on behalf of the WebRTC stack. |
| +class CONTENT_EXPORT RTCVideoEncoderFactory |
| + : NON_EXPORTED_BASE(public cricket::WebRtcVideoEncoderFactory) { |
| + public: |
| + RTCVideoEncoderFactory( |
|
Ami GONE FROM CHROMIUM
2013/07/31 23:01:12
explicit
sheu
2013/08/02 01:27:49
Done.
|
| + const scoped_refptr<media::GpuVideoAcceleratorFactories>& gpu_factories); |
| + virtual ~RTCVideoEncoderFactory(); |
| + |
| + // cricket::WebRtcVideoEncoderFactory implementation. |
| + virtual webrtc::VideoEncoder* CreateVideoEncoder( |
| + webrtc::VideoCodecType type) OVERRIDE; |
| + virtual void AddObserver(Observer* observer) OVERRIDE; |
| + virtual void RemoveObserver(Observer* observer) OVERRIDE; |
| + virtual const std::vector<VideoCodec>& codecs() const OVERRIDE; |
| + virtual void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) OVERRIDE; |
| + |
| + private: |
| + const scoped_refptr<media::GpuVideoAcceleratorFactories> gpu_factories_; |
| + |
| + // Codec support list of cricket::WebRtcVideoEncoderFactory::VideoCodec |
| + // instances. |
| + std::vector<VideoCodec> codecs_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoderFactory); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_FACTORY_H_ |