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

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

Issue 10928043: Media Related changes for TabCapture API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial Created 8 years, 2 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_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/threading/non_thread_safe.h" 16 #include "base/threading/non_thread_safe.h"
17 #include "content/common/content_export.h" 17 #include "content/common/content_export.h"
18 #include "content/public/renderer/render_view_observer.h" 18 #include "content/public/renderer/render_view_observer.h"
19 #include "content/renderer/media/media_stream_dispatcher_eventhandler.h" 19 #include "content/renderer/media/media_stream_dispatcher_eventhandler.h"
20 #include "third_party/libjingle/source/talk/app/webrtc/mediastream.h" 20 #include "third_party/libjingle/source/talk/app/webrtc/mediastream.h"
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h" 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h"
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeviceMediaRequest .h"
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaRequest.h " 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaRequest.h "
23 #include "webkit/media/media_stream_client.h" 24 #include "webkit/media/media_stream_client.h"
24 25
25 namespace WebKit { 26 namespace WebKit {
26 class WebMediaStreamDescriptor; 27 class WebMediaStreamDescriptor;
27 } 28 }
28 29
29 class MediaStreamDispatcher; 30 class MediaStreamDispatcher;
30 class MediaStreamDependencyFactory; 31 class MediaStreamDependencyFactory;
31 class VideoCaptureImplManager; 32 class VideoCaptureImplManager;
(...skipping 18 matching lines...) Expand all
50 VideoCaptureImplManager* vc_manager, 51 VideoCaptureImplManager* vc_manager,
51 MediaStreamDependencyFactory* dependency_factory); 52 MediaStreamDependencyFactory* dependency_factory);
52 virtual ~MediaStreamImpl(); 53 virtual ~MediaStreamImpl();
53 54
54 // WebKit::WebUserMediaClient implementation 55 // WebKit::WebUserMediaClient implementation
55 virtual void requestUserMedia( 56 virtual void requestUserMedia(
56 const WebKit::WebUserMediaRequest& user_media_request, 57 const WebKit::WebUserMediaRequest& user_media_request,
57 const WebKit::WebVector<WebKit::WebMediaStreamSource>& audio_sources, 58 const WebKit::WebVector<WebKit::WebMediaStreamSource>& audio_sources,
58 const WebKit::WebVector<WebKit::WebMediaStreamSource>& video_sources) 59 const WebKit::WebVector<WebKit::WebMediaStreamSource>& video_sources)
59 OVERRIDE; 60 OVERRIDE;
61 virtual void requestDeviceMedia(
62 const WebKit::WebDeviceMediaRequest& user_media_request) OVERRIDE;
60 virtual void cancelUserMediaRequest( 63 virtual void cancelUserMediaRequest(
61 const WebKit::WebUserMediaRequest& user_media_request) OVERRIDE; 64 const WebKit::WebUserMediaRequest& user_media_request) OVERRIDE;
62 65
63 // webkit_media::MediaStreamClient implementation. 66 // webkit_media::MediaStreamClient implementation.
64 virtual bool IsMediaStream(const GURL& url) OVERRIDE; 67 virtual bool IsMediaStream(const GURL& url) OVERRIDE;
65 virtual scoped_refptr<webkit_media::VideoFrameProvider> GetVideoFrameProvider( 68 virtual scoped_refptr<webkit_media::VideoFrameProvider> GetVideoFrameProvider(
66 const GURL& url, 69 const GURL& url,
67 const base::Closure& error_cb, 70 const base::Closure& error_cb,
68 const webkit_media::VideoFrameProvider::RepaintCB& repaint_cb) OVERRIDE; 71 const webkit_media::VideoFrameProvider::RepaintCB& repaint_cb) OVERRIDE;
69 virtual scoped_refptr<media::VideoDecoder> GetVideoDecoder( 72 virtual scoped_refptr<media::VideoDecoder> GetVideoDecoder(
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 webrtc::MediaStreamInterface* stream, 141 webrtc::MediaStreamInterface* stream,
139 const base::Closure& error_cb, 142 const base::Closure& error_cb,
140 const webkit_media::VideoFrameProvider::RepaintCB& repaint_cb); 143 const webkit_media::VideoFrameProvider::RepaintCB& repaint_cb);
141 scoped_refptr<media::VideoDecoder> CreateLocalVideoDecoder( 144 scoped_refptr<media::VideoDecoder> CreateLocalVideoDecoder(
142 webrtc::MediaStreamInterface* stream, 145 webrtc::MediaStreamInterface* stream,
143 media::MessageLoopFactory* message_loop_factory); 146 media::MessageLoopFactory* message_loop_factory);
144 scoped_refptr<media::VideoDecoder> CreateRemoteVideoDecoder( 147 scoped_refptr<media::VideoDecoder> CreateRemoteVideoDecoder(
145 webrtc::MediaStreamInterface* stream, 148 webrtc::MediaStreamInterface* stream,
146 media::MessageLoopFactory* message_loop_factory); 149 media::MessageLoopFactory* message_loop_factory);
147 150
151 void GenerateStreamForMedia(
152 const WebKit::WebUserMediaRequest& user_media_request,
153 const content::MediaStreamDeviceType audio,
154 const content::MediaStreamDeviceType video,
155 const std::string* device_id);
156
148 // Weak ref to a MediaStreamDependencyFactory, owned by the RenderThread. 157 // Weak ref to a MediaStreamDependencyFactory, owned by the RenderThread.
149 // It's valid for the lifetime of RenderThread. 158 // It's valid for the lifetime of RenderThread.
150 MediaStreamDependencyFactory* dependency_factory_; 159 MediaStreamDependencyFactory* dependency_factory_;
151 160
152 // media_stream_dispatcher_ is a weak reference, owned by RenderView. It's 161 // media_stream_dispatcher_ is a weak reference, owned by RenderView. It's
153 // valid for the lifetime of RenderView. 162 // valid for the lifetime of RenderView.
154 MediaStreamDispatcher* media_stream_dispatcher_; 163 MediaStreamDispatcher* media_stream_dispatcher_;
155 164
156 scoped_refptr<VideoCaptureImplManager> vc_manager_; 165 scoped_refptr<VideoCaptureImplManager> vc_manager_;
157 166
158 MediaRequestMap user_media_requests_; 167 MediaRequestMap user_media_requests_;
159 LocalNativeStreamMap local_media_streams_; 168 LocalNativeStreamMap local_media_streams_;
160 169
161 DISALLOW_COPY_AND_ASSIGN(MediaStreamImpl); 170 DISALLOW_COPY_AND_ASSIGN(MediaStreamImpl);
162 }; 171 };
163 172
164 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_ 173 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698