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

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

Issue 10703095: New PeerConnection handler in Chrome to support latest PeerConnection draft (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed broken unittes. Created 8 years, 3 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 namespace webrtc { 32 namespace webrtc {
33 class PeerConnection; 33 class PeerConnection;
34 } 34 }
35 35
36 namespace WebKit { 36 namespace WebKit {
37 class WebMediaStreamDescriptor; 37 class WebMediaStreamDescriptor;
38 class WebPeerConnection00Handler; 38 class WebPeerConnection00Handler;
39 class WebPeerConnection00HandlerClient; 39 class WebPeerConnection00HandlerClient;
40 class WebRTCPeerConnectionHandler;
41 class WebRTCPeerConnectionHandlerClient;
40 } 42 }
41 43
42 class WebRtcAudioDeviceImpl; 44 class WebRtcAudioDeviceImpl;
43 class VideoCaptureImplManager; 45 class VideoCaptureImplManager;
44 46
45 // Object factory for RTC MediaStreams and RTC PeerConnections. 47 // Object factory for RTC MediaStreams and RTC PeerConnections.
46 class CONTENT_EXPORT MediaStreamDependencyFactory 48 class CONTENT_EXPORT MediaStreamDependencyFactory
47 : NON_EXPORTED_BASE(public base::NonThreadSafe) { 49 : NON_EXPORTED_BASE(public base::NonThreadSafe) {
48 public: 50 public:
49 MediaStreamDependencyFactory( 51 MediaStreamDependencyFactory(
50 VideoCaptureImplManager* vc_manager, 52 VideoCaptureImplManager* vc_manager,
51 content::P2PSocketDispatcher* p2p_socket_dispatcher); 53 content::P2PSocketDispatcher* p2p_socket_dispatcher);
52 virtual ~MediaStreamDependencyFactory(); 54 virtual ~MediaStreamDependencyFactory();
53 55
54 // Create a a PeerConnectionHandlerJsep object that implements the 56 // Create a PeerConnectionHandlerJsep object that implements the
55 // WebKit WebPeerConnection00Handler interface. 57 // WebKit WebPeerConnection00Handler interface.
56 WebKit::WebPeerConnection00Handler* CreatePeerConnectionHandlerJsep( 58 WebKit::WebPeerConnection00Handler* CreatePeerConnectionHandlerJsep(
57 WebKit::WebPeerConnection00HandlerClient* client); 59 WebKit::WebPeerConnection00HandlerClient* client);
58 60
61 // Create a RTCPeerConnectionHandler object that implements the
62 // WebKit WebRTCPeerConnectionHandler interface.
63 WebKit::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler(
64 WebKit::WebRTCPeerConnectionHandlerClient* client);
65
59 // Creates a libjingle representation of a MediaStream and stores 66 // Creates a libjingle representation of a MediaStream and stores
60 // it in the extra data field of |description| 67 // it in the extra data field of |description|
61 bool CreateNativeLocalMediaStream( 68 bool CreateNativeLocalMediaStream(
62 WebKit::WebMediaStreamDescriptor* description); 69 WebKit::WebMediaStreamDescriptor* description);
63 70
64 // Asks the libjingle PeerConnection factory to create a libjingle 71 // Asks the libjingle PeerConnection factory to create a libjingle
65 // PeerConnection object. 72 // PeerConnection object.
66 // The PeerConnection object is owned by PeerConnectionHandler. 73 // The PeerConnection object is owned by PeerConnectionHandler.
67 virtual talk_base::scoped_refptr<webrtc::PeerConnectionInterface> 74 virtual talk_base::scoped_refptr<webrtc::PeerConnectionInterface>
68 CreatePeerConnection(const std::string& config, 75 CreatePeerConnection(const std::string& config,
69 webrtc::PeerConnectionObserver* observer); 76 webrtc::PeerConnectionObserver* observer);
70 77
71 // Creates a libjingle representation of a Session description. 78 virtual talk_base::scoped_refptr<webrtc::PeerConnectionInterface>
tommi (sloooow) - chröme 2012/09/13 12:20:14 does this need to be talk_base::scoped_refptr or c
perkj_chrome 2012/09/13 13:41:34 Done.
79 CreatePeerConnection(const webrtc::JsepInterface::IceServers& ice_servers,
80 const webrtc::MediaConstraintsInterface* constraints,
81 webrtc::PeerConnectionObserver* observer);
82
83 // Creates a libjingle representation of a Session description. Used by a
84 // PeerConnectionHandlerJsep instance.
72 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription( 85 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription(
73 const std::string& sdp); 86 const std::string& sdp);
74 87
88 // Creates a libjingle representation of a Session description. Used by a
89 // RTCPeerConnectionHandler instance.
90 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription(
91 const std::string& type,
92 const std::string& sdp);
93
75 // Creates a libjingle representation of an ice candidate. 94 // Creates a libjingle representation of an ice candidate.
76 virtual webrtc::IceCandidateInterface* CreateIceCandidate( 95 virtual webrtc::IceCandidateInterface* CreateIceCandidate(
77 const std::string& sdp_mid, 96 const std::string& sdp_mid,
78 int sdp_mline_index, 97 int sdp_mline_index,
79 const std::string& sdp); 98 const std::string& sdp);
80 99
81 protected: 100 protected:
82 // Asks the PeerConnection factory to create a Local MediaStream object. 101 // Asks the PeerConnection factory to create a Local MediaStream object.
83 virtual talk_base::scoped_refptr<webrtc::LocalMediaStreamInterface> 102 virtual talk_base::scoped_refptr<webrtc::LocalMediaStreamInterface>
84 CreateLocalMediaStream(const std::string& label); 103 CreateLocalMediaStream(const std::string& label);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // PeerConnection threads. signaling_thread_ is created from the 147 // PeerConnection threads. signaling_thread_ is created from the
129 // "current" chrome thread. 148 // "current" chrome thread.
130 talk_base::Thread* signaling_thread_; 149 talk_base::Thread* signaling_thread_;
131 talk_base::Thread* worker_thread_; 150 talk_base::Thread* worker_thread_;
132 base::Thread chrome_worker_thread_; 151 base::Thread chrome_worker_thread_;
133 152
134 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); 153 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory);
135 }; 154 };
136 155
137 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 156 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698