| Index: content/renderer/media/media_stream_impl.h
|
| ===================================================================
|
| --- content/renderer/media/media_stream_impl.h (revision 111389)
|
| +++ content/renderer/media/media_stream_impl.h (working copy)
|
| @@ -6,18 +6,23 @@
|
| #define CONTENT_RENDERER_MEDIA_STREAM_MEDIA_STREAM_IMPL_H_
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/compiler_specific.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "content/renderer/media/media_stream_dispatcher_eventhandler.h"
|
| #include "webkit/media/media_stream_client.h"
|
|
|
| +class MediaStreamDispatcher;
|
| class VideoCaptureImplManager;
|
|
|
| // A implementation of StreamClient to provide supporting functions, such as
|
| // GetVideoDecoder.
|
| class MediaStreamImpl
|
| : public webkit_media::MediaStreamClient,
|
| + public MediaStreamDispatcherEventHandler,
|
| public base::RefCountedThreadSafe<MediaStreamImpl> {
|
| public:
|
| - explicit MediaStreamImpl(VideoCaptureImplManager* vc_manager);
|
| + explicit MediaStreamImpl(MediaStreamDispatcher* media_stream_dispatcher_,
|
| + VideoCaptureImplManager* vc_manager);
|
| virtual ~MediaStreamImpl();
|
|
|
| // Implement webkit_media::StreamClient.
|
| @@ -25,8 +30,36 @@
|
| const GURL& url,
|
| media::MessageLoopFactory* message_loop_factory) OVERRIDE;
|
|
|
| + // Implement MediaStreamDispatcherEventHandler.
|
| + virtual void OnStreamGenerated(
|
| + int request_id,
|
| + const std::string& label,
|
| + const media_stream::StreamDeviceInfoArray& audio_array,
|
| + const media_stream::StreamDeviceInfoArray& video_array) OVERRIDE;
|
| + virtual void OnStreamGenerationFailed(int request_id) OVERRIDE;
|
| + virtual void OnVideoDeviceFailed(
|
| + const std::string& label,
|
| + int index) OVERRIDE;
|
| + virtual void OnAudioDeviceFailed(
|
| + const std::string& label,
|
| + int index) OVERRIDE;
|
| + virtual void OnDevicesEnumerated(
|
| + int request_id,
|
| + const media_stream::StreamDeviceInfoArray& device_array) OVERRIDE;
|
| + virtual void OnDevicesEnumerationFailed(int request_id) OVERRIDE;
|
| + virtual void OnDeviceOpened(
|
| + int request_id,
|
| + const std::string& label,
|
| + const media_stream::StreamDeviceInfo& device_info) OVERRIDE;
|
| + virtual void OnDeviceOpenFailed(int request_id) OVERRIDE;
|
| +
|
| private:
|
| + // media_stream_dispatcher_ is a weak reference, owned by RenderView. It's
|
| + // valid for the lifetime of RenderView.
|
| + MediaStreamDispatcher* media_stream_dispatcher_;
|
| +
|
| scoped_refptr<VideoCaptureImplManager> vc_manager_;
|
| + std::string local_label_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(MediaStreamImpl);
|
| };
|
|
|