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

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

Issue 12084088: Renamed WebMediaStreamComponent and WebMediaStreamDescriptor to WebMediaStreamTrack & WebMediaStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 15 matching lines...) Expand all
26 class Thread; 26 class Thread;
27 } 27 }
28 28
29 namespace webrtc { 29 namespace webrtc {
30 class PeerConnection; 30 class PeerConnection;
31 } 31 }
32 32
33 namespace WebKit { 33 namespace WebKit {
34 class WebFrame; 34 class WebFrame;
35 class WebMediaConstraints; 35 class WebMediaConstraints;
36 class WebMediaStreamDescriptor; 36 class WebMediaStream;
37 class WebPeerConnection00Handler;
38 class WebPeerConnection00HandlerClient;
39 class WebRTCPeerConnectionHandler; 37 class WebRTCPeerConnectionHandler;
40 class WebRTCPeerConnectionHandlerClient; 38 class WebRTCPeerConnectionHandlerClient;
41 } 39 }
42 40
43 namespace content { 41 namespace content {
44 42
45 class IpcNetworkManager; 43 class IpcNetworkManager;
46 class IpcPacketSocketFactory; 44 class IpcPacketSocketFactory;
47 class VideoCaptureImplManager; 45 class VideoCaptureImplManager;
48 class WebRtcAudioDeviceImpl; 46 class WebRtcAudioDeviceImpl;
49 struct StreamDeviceInfo; 47 struct StreamDeviceInfo;
50 48
51 // Object factory for RTC MediaStreams and RTC PeerConnections. 49 // Object factory for RTC MediaStreams and RTC PeerConnections.
52 class CONTENT_EXPORT MediaStreamDependencyFactory 50 class CONTENT_EXPORT MediaStreamDependencyFactory
53 : NON_EXPORTED_BASE(public base::NonThreadSafe) { 51 : NON_EXPORTED_BASE(public base::NonThreadSafe) {
54 public: 52 public:
55 // MediaSourcesCreatedCallback is used in CreateNativeMediaSources. 53 // MediaSourcesCreatedCallback is used in CreateNativeMediaSources.
56 typedef base::Callback<void(WebKit::WebMediaStreamDescriptor* description, 54 typedef base::Callback<void(WebKit::WebMediaStream* description,
57 bool live)> MediaSourcesCreatedCallback; 55 bool live)> MediaSourcesCreatedCallback;
58 MediaStreamDependencyFactory( 56 MediaStreamDependencyFactory(
59 VideoCaptureImplManager* vc_manager, 57 VideoCaptureImplManager* vc_manager,
60 P2PSocketDispatcher* p2p_socket_dispatcher); 58 P2PSocketDispatcher* p2p_socket_dispatcher);
61 virtual ~MediaStreamDependencyFactory(); 59 virtual ~MediaStreamDependencyFactory();
62 60
63 // Create a PeerConnectionHandlerJsep object that implements the
64 // WebKit WebPeerConnection00Handler interface.
65 WebKit::WebPeerConnection00Handler* CreatePeerConnectionHandlerJsep(
66 WebKit::WebPeerConnection00HandlerClient* client);
67
68 // Create a RTCPeerConnectionHandler object that implements the 61 // Create a RTCPeerConnectionHandler object that implements the
69 // WebKit WebRTCPeerConnectionHandler interface. 62 // WebKit WebRTCPeerConnectionHandler interface.
70 WebKit::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler( 63 WebKit::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler(
71 WebKit::WebRTCPeerConnectionHandlerClient* client); 64 WebKit::WebRTCPeerConnectionHandlerClient* client);
72 65
73 // CreateNativeMediaSources creates libjingle representations of 66 // CreateNativeMediaSources creates libjingle representations of
74 // the underlying sources to the tracks in |description|. 67 // the underlying sources to the tracks in |description|.
75 // |sources_created| is invoked when the sources have either been created and 68 // |sources_created| is invoked when the sources have either been created and
76 // transitioned to a live state or failed. 69 // transitioned to a live state or failed.
77 // The libjingle sources is stored in the extra data field of 70 // The libjingle sources is stored in the extra data field of
78 // WebMediaStreamSource. 71 // WebMediaStreamSource.
79 // |audio_constraints| and |video_constraints| set parameters for the sources. 72 // |audio_constraints| and |video_constraints| set parameters for the sources.
80 void CreateNativeMediaSources( 73 void CreateNativeMediaSources(
81 const WebKit::WebMediaConstraints& audio_constraints, 74 const WebKit::WebMediaConstraints& audio_constraints,
82 const WebKit::WebMediaConstraints& video_constraints, 75 const WebKit::WebMediaConstraints& video_constraints,
83 WebKit::WebMediaStreamDescriptor* description, 76 WebKit::WebMediaStream* description,
84 const MediaSourcesCreatedCallback& sources_created); 77 const MediaSourcesCreatedCallback& sources_created);
85 78
86 // Creates a libjingle representation of a MediaStream and stores 79 // Creates a libjingle representation of a MediaStream and stores
87 // it in the extra data field of |description|. 80 // it in the extra data field of |description|.
88 void CreateNativeLocalMediaStream( 81 void CreateNativeLocalMediaStream(
89 WebKit::WebMediaStreamDescriptor* description); 82 WebKit::WebMediaStream* description);
90 83
91 // Creates a libjingle representation of a MediaStream and stores 84 // Creates a libjingle representation of a MediaStream and stores
92 // it in the extra data field of |description|. 85 // it in the extra data field of |description|.
93 // |stream_stopped| is a callback that is run when a MediaStream have been 86 // |stream_stopped| is a callback that is run when a MediaStream have been
94 // stopped. 87 // stopped.
95 void CreateNativeLocalMediaStream( 88 void CreateNativeLocalMediaStream(
96 WebKit::WebMediaStreamDescriptor* description, 89 WebKit::WebMediaStream* description,
97 const MediaStreamExtraData::StreamStopCallback& stream_stop); 90 const MediaStreamExtraData::StreamStopCallback& stream_stop);
98 91
99 // Asks the libjingle PeerConnection factory to create a libjingle 92 // Asks the libjingle PeerConnection factory to create a libjingle
100 // PeerConnection object. 93 // PeerConnection object.
101 // The PeerConnection object is owned by PeerConnectionHandler. 94 // The PeerConnection object is owned by PeerConnectionHandler.
102 virtual scoped_refptr<webrtc::PeerConnectionInterface> 95 virtual scoped_refptr<webrtc::PeerConnectionInterface>
103 CreatePeerConnection(const webrtc::JsepInterface::IceServers& ice_servers, 96 CreatePeerConnection(const webrtc::JsepInterface::IceServers& ice_servers,
104 const webrtc::MediaConstraintsInterface* constraints, 97 const webrtc::MediaConstraintsInterface* constraints,
105 WebKit::WebFrame* web_frame, 98 WebKit::WebFrame* web_frame,
106 webrtc::PeerConnectionObserver* observer); 99 webrtc::PeerConnectionObserver* observer);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 talk_base::Thread* signaling_thread_; 181 talk_base::Thread* signaling_thread_;
189 talk_base::Thread* worker_thread_; 182 talk_base::Thread* worker_thread_;
190 base::Thread chrome_worker_thread_; 183 base::Thread chrome_worker_thread_;
191 184
192 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); 185 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory);
193 }; 186 };
194 187
195 } // namespace content 188 } // namespace content
196 189
197 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 190 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_center.cc ('k') | content/renderer/media/media_stream_dependency_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698