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

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

Issue 21421002: Revert EVS revisions 209760, 298753, 213143. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased at 216225, prepare to land Created 7 years, 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_MEDIA_RTC_ENCODING_VIDEO_CAPTURER_H_
6 #define CONTENT_RENDERER_MEDIA_RTC_ENCODING_VIDEO_CAPTURER_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "media/video/encoded_video_source.h"
10 #include "media/video/video_encode_types.h"
11 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvie.h"
12
13 namespace content {
14
15 // Class to represent an encoding capable video capture interface for the
16 // WebRTC component. This class expects to be registered as an encoder with
17 // an internal source to the WebRTC stack and will not be able to function as
18 // an encoder for uncompressed video frames.
19 class RtcEncodingVideoCapturer : public webrtc::VideoEncoder {
20 public:
21 RtcEncodingVideoCapturer(media::EncodedVideoSource* encoded_video_source,
22 webrtc::VideoCodecType codec_type);
23 virtual ~RtcEncodingVideoCapturer();
24
25 // webrtc::VideoEncoder implementation.
26 virtual int32_t InitEncode(const webrtc::VideoCodec* codecSettings,
27 int32_t numberOfCores,
28 uint32_t maxPayloadSize) OVERRIDE;
29 virtual int32_t Encode(
30 const webrtc::I420VideoFrame& /* inputImage */,
31 const webrtc::CodecSpecificInfo* codecSpecificInfo,
32 const std::vector<webrtc::VideoFrameType>* frame_types) OVERRIDE;
33 virtual int32_t RegisterEncodeCompleteCallback(
34 webrtc::EncodedImageCallback* callback) OVERRIDE;
35 virtual int32_t Release() OVERRIDE;
36 virtual int32_t SetChannelParameters(uint32_t /* packetLoss */,
37 int rtt_in_ms) OVERRIDE;
38 virtual int32_t SetRates(uint32_t newBitRate,
39 uint32_t frameRate) OVERRIDE;
40 private:
41 // Forward declaration for private implementation to represent the
42 // encoded video source client;
43 class EncodedVideoSourceClient;
44 scoped_ptr<EncodedVideoSourceClient> encoded_video_source_client_;
45
46 // Pointer to the underlying EncodedVideoSource object. It is guaranteed to
47 // outlive the RtcEncodingVideoCapturer.
48 media::EncodedVideoSource* encoded_video_source_;
49 webrtc::VideoCodecType rtc_codec_type_;
50
51 DISALLOW_COPY_AND_ASSIGN(RtcEncodingVideoCapturer);
52 };
53
54 } // namespace content
55
56 #endif // CONTENT_RENDERER_MEDIA_RTC_ENCODING_VIDEO_CAPTURER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_dependency_factory.cc ('k') | content/renderer/media/rtc_encoding_video_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698