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

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

Issue 16320005: Define EncodedVideoSource and RtcCapturedEncodingVideoCapturer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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 (c) 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/webrtcvideoencoderfacto ry.h"
Ami GONE FROM CHROMIUM 2013/06/08 00:18:01 unused
hshi1 2013/06/10 19:12:31 Done.
12 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideoframe.h"
Ami GONE FROM CHROMIUM 2013/06/08 00:18:01 unnecessary in this .h - this file doesn't make an
hshi1 2013/06/10 19:12:31 Done.
13 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvie.h"
14
15 using cricket::WebRtcVideoEncoderFactory;
Ami GONE FROM CHROMIUM 2013/06/08 00:18:01 unused
hshi1 2013/06/10 19:12:31 Done.
16
17 namespace content {
18
19 // Class to represent an encoding capable video capture interface for the
20 // WebRTC component. This class expects to be registered as an encoder with
21 // an internal source to the WebRTC stack and will not be able to function as
22 // an encoder for uncompressed video frames.
23 class RtcEncodingVideoCapturer : public webrtc::VideoEncoder {
24 public:
25 RtcEncodingVideoCapturer(int stream_id,
26 media::EncodedVideoSource* encoded_video_source);
27 virtual ~RtcEncodingVideoCapturer();
28
29 // webrtc::VideoEncoder implementation.
30 virtual int32_t InitEncode(const webrtc::VideoCodec* codecSettings,
31 int32_t numberOfCores,
32 uint32_t maxPayloadSize) OVERRIDE;
33 virtual int32_t Encode(
34 const webrtc::I420VideoFrame& inputImage,
Ami GONE FROM CHROMIUM 2013/06/08 00:18:01 ignored params should be like this: /* inputImage
hshi1 2013/06/10 19:12:31 Done.
35 const webrtc::CodecSpecificInfo* codecSpecificInfo,
36 const std::vector<webrtc::VideoFrameType>* frame_types) OVERRIDE;
37 virtual int32_t RegisterEncodeCompleteCallback(
38 webrtc::EncodedImageCallback* callback) OVERRIDE;
39 virtual int32_t Release() OVERRIDE;
40 virtual int32_t SetChannelParameters(uint32_t packetLoss,
41 int rtt_in_ms) OVERRIDE;
42 virtual int32_t SetRates(uint32_t newBitRate,
43 uint32_t frameRate) OVERRIDE;
44 private:
45 // Forward declaration for private implementation to represent the
46 // encapsulated bitstream;
47 class Bitstream;
48 int stream_id_;
Ami GONE FROM CHROMIUM 2013/06/08 00:18:01 write-only variable?
hshi1 2013/06/10 19:12:31 Removed.
49 scoped_refptr<Bitstream> bitstream_;
50
51 // Pointer to the underlying EncodedVideoSource object. It is guaranteed to
52 // outlive the RtcEncodingVideoCapturer.
53 media::EncodedVideoSource* encoded_video_source_;
54 DISALLOW_COPY_AND_ASSIGN(RtcEncodingVideoCapturer);
Ami GONE FROM CHROMIUM 2013/06/08 00:18:01 nit: extra new line before this
hshi1 2013/06/10 19:12:31 Done.
55 };
56
57 } // namespace content
58
59 #endif // CONTENT_RENDERER_MEDIA_RTC_ENCODING_VIDEO_CAPTURER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698