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

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

Issue 16320005: Define EncodedVideoSource and RtcCapturedEncodingVideoCapturer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing Ami's comments - part 5. 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_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
13 namespace content {
14
15 class RtcEncodingVideoCapturer;
16
17 class RtcEncodingVideoCapturerFactory :
18 public cricket::WebRtcVideoEncoderFactory,
19 public base::RefCountedThreadSafe<RtcEncodingVideoCapturerFactory> {
Ami GONE FROM CHROMIUM 2013/06/12 01:44:06 Per convo elsewhere, drop refcounting.
hshi1 2013/06/12 17:52:39 Done. However I still need a weak_ptr_factory_ for
20 public:
21 RtcEncodingVideoCapturerFactory();
22
23 // WebRtcVideoEncoderFactory interface.
24 virtual webrtc::VideoEncoder* CreateVideoEncoder(
25 webrtc::VideoCodecType type) OVERRIDE;
26 virtual void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) OVERRIDE;
27
28 virtual const std::vector<VideoCodec>& codecs()
29 const OVERRIDE;
Ami GONE FROM CHROMIUM 2013/06/12 01:44:06 fits on previous line now?
hshi1 2013/06/12 17:52:39 Done.
30
31 // Callback for RequestCapabilities().
32 void OnCapabilitiesAvailable(const media::VideoEncodingCapabilities& caps);
33
34 // Invoked when an EncodedVideoSource is added/removed.
35 void OnEncodedVideoSourceAdded(media::EncodedVideoSource* source);
36 void OnEncodedVideoSourceRemoved(media::EncodedVideoSource* source);
37
38 private:
39 virtual ~RtcEncodingVideoCapturerFactory();
40
41 friend class base::RefCountedThreadSafe<RtcEncodingVideoCapturerFactory>;
42
43 // Set of registered encoding capable video capturers.
44 typedef std::set<webrtc::VideoEncoder*> EncoderSet;
45
46 media::EncodedVideoSource* encoded_video_source_;
47 std::vector<VideoCodec> codecs_;
48
49 EncoderSet encoder_set_;
50
51 DISALLOW_COPY_AND_ASSIGN(RtcEncodingVideoCapturerFactory);
52 };
53
54 } // namespace content
55
56 #endif // CONTENT_RENDERER_MEDIA_RTC_ENCODING_VIDEO_CAPTURER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698