OLD | NEW |
---|---|
(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_FACTORY_H_ | |
6 #define CONTENT_RENDERER_MEDIA_RTC_ENCODING_VIDEO_CAPTURER_FACTORY_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" | |
12 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideoframe.h" | |
13 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvie.h" | |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
I suspect neither of l.12-13 is necessary in this
hshi1
2013/06/10 21:49:35
Done.
| |
14 | |
15 using cricket::WebRtcVideoEncoderFactory; | |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
style: "using" is verboten in headers.
(here & els
hshi1
2013/06/10 21:49:35
Done.
| |
16 | |
17 namespace content { | |
18 | |
19 class RtcEncodingVideoCapturer; | |
20 | |
21 class RtcEncodingVideoCapturerFactory : | |
22 public WebRtcVideoEncoderFactory, | |
23 public media::EncodedVideoSource::Observer, | |
24 public base::RefCountedThreadSafe<RtcEncodingVideoCapturerFactory> { | |
25 public: | |
26 RtcEncodingVideoCapturerFactory(); | |
27 | |
28 // WebRtcVideoEncoderFactory interface. | |
29 virtual webrtc::VideoEncoder* CreateVideoEncoder( | |
30 webrtc::VideoCodecType type) OVERRIDE; | |
31 virtual void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) OVERRIDE; | |
32 | |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
remove newline
hshi1
2013/06/10 21:49:35
Done.
| |
33 virtual const std::vector<WebRtcVideoEncoderFactory::VideoCodec>& codecs() | |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
WebRtcVideoEncoderFactory:: unnecessary
hshi1
2013/06/10 21:49:35
Done.
| |
34 const OVERRIDE; | |
35 | |
36 // EncodedVideoSource::Observer interface. | |
37 virtual void OnCapabilitiesAvailable( | |
38 media::EncodedVideoSource* source) OVERRIDE; | |
39 | |
40 // Invoked when an EncodedVideoSource is added/removed. | |
41 void OnEncodedVideoSourceAdded(media::EncodedVideoSource* source) OVERRIDE; | |
42 void OnEncodedVideoSourceRemoved(media::EncodedVideoSource* source) OVERRIDE; | |
43 | |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
remove one of these two newlines
hshi1
2013/06/10 21:49:35
Done.
| |
44 | |
45 private: | |
46 friend class base::RefCountedThreadSafe<RtcEncodingVideoCapturerFactory>; | |
47 | |
48 // Rebuilds the list of supported video codecs. | |
49 void RebuildCodecsList(); | |
50 | |
51 // Map of registered encoding capable video capturers, key is stream_id. | |
52 typedef std::map<int, RtcEncodingVideoCapturer*> EncoderMap; | |
53 | |
54 virtual ~RtcEncodingVideoCapturerFactory(); | |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
dtor goes at the top of the section
hshi1
2013/06/10 21:49:35
Done.
| |
55 | |
56 media::EncodedVideoSource* encoded_video_source_; | |
57 std::vector<WebRtcVideoEncoderFactory::VideoCodec> codecs_; | |
58 | |
59 int next_stream_id_; | |
60 EncoderMap encoder_map_; | |
61 DISALLOW_COPY_AND_ASSIGN(RtcEncodingVideoCapturerFactory); | |
62 }; | |
63 | |
64 } // namespace content | |
65 | |
66 #endif // CONTENT_RENDERER_MEDIA_RTC_ENCODING_VIDEO_CAPTURER_FACTORY_H_ | |
OLD | NEW |