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

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: Rename encoded_video_source_messages to encoded_video_capture_messages. Add buffer_size in OnOpened… 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/weak_ptr.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:
20 RtcEncodingVideoCapturerFactory();
21
22 // WebRtcVideoEncoderFactory interface.
23 virtual webrtc::VideoEncoder* CreateVideoEncoder(
24 webrtc::VideoCodecType type) OVERRIDE;
25 virtual void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) OVERRIDE;
26
27 virtual const std::vector<VideoCodec>& codecs() const OVERRIDE;
28
29 // Callback for RequestCapabilities().
30 void OnCapabilitiesAvailable(const media::VideoEncodingCapabilities& caps);
31
32 // Invoked when an EncodedVideoSource is added/removed.
33 void OnEncodedVideoSourceAdded(media::EncodedVideoSource* source);
34 void OnEncodedVideoSourceRemoved(media::EncodedVideoSource* source);
35
36 private:
37 virtual ~RtcEncodingVideoCapturerFactory();
38
39 // Set of registered encoding capable video capturers.
40 typedef std::set<webrtc::VideoEncoder*> EncoderSet;
41
42 media::EncodedVideoSource* encoded_video_source_;
43 std::vector<VideoCodec> codecs_;
44
45 EncoderSet encoder_set_;
46
47 // For callbacks may be run after destruction.
48 base::WeakPtrFactory<RtcEncodingVideoCapturerFactory> weak_ptr_factory_;
49
50 DISALLOW_COPY_AND_ASSIGN(RtcEncodingVideoCapturerFactory);
51 };
52
53 } // namespace content
54
55 #endif // CONTENT_RENDERER_MEDIA_RTC_ENCODING_VIDEO_CAPTURER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698