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

Unified Diff: content/renderer/media/media_stream_source_extra_data.h

Issue 131763002: Adds MediaStreamSource, MediaStreamAudioSource and MediaStreamVideoCaptureDeviceSource (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/media_stream_source_extra_data.h
diff --git a/content/renderer/media/media_stream_source_extra_data.h b/content/renderer/media/media_stream_source_extra_data.h
deleted file mode 100644
index 4b88c147f8be3261cc862317bf124c92efed1931..0000000000000000000000000000000000000000
--- a/content/renderer/media/media_stream_source_extra_data.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_
-#define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_
-
-#include "base/callback.h"
-#include "base/compiler_specific.h"
-#include "content/common/content_export.h"
-#include "content/common/media/media_stream_options.h"
-#include "content/renderer/media/media_stream_source_observer.h"
-#include "content/renderer/media/webrtc_audio_capturer.h"
-#include "third_party/libjingle/source/talk/app/webrtc/videosourceinterface.h"
-#include "third_party/WebKit/public/platform/WebMediaStreamSource.h"
-
-namespace content {
-
-class CONTENT_EXPORT MediaStreamSourceExtraData
- : NON_EXPORTED_BASE(public blink::WebMediaStreamSource::ExtraData) {
- public:
- typedef base::Callback<void(const blink::WebMediaStreamSource& source)>
- SourceStopCallback;
-
- MediaStreamSourceExtraData(const StreamDeviceInfo& device_info,
- const SourceStopCallback& stop_callback);
- MediaStreamSourceExtraData();
- virtual ~MediaStreamSourceExtraData();
-
- // Return device information about the camera or microphone.
- const StreamDeviceInfo& device_info() const {
- return device_info_;
- }
-
- void SetVideoSource(webrtc::VideoSourceInterface* source) {
- video_source_ = source;
- source_observer_.reset(new MediaStreamSourceObserver(source, this));
- }
-
- void SetLocalAudioSource(webrtc::AudioSourceInterface* source) {
- local_audio_source_ = source;
- // TODO(perkj): Implement a local source observer for audio.
- // See |source_observer_|.
- }
-
- void SetAudioCapturer(WebRtcAudioCapturer* capturer) {
- DCHECK(!audio_capturer_);
- audio_capturer_ = capturer;
- }
-
- WebRtcAudioCapturer* GetAudioCapturer() const {
- // TODO(perkj): |audio_capturer_| can currently be reconfigured to use
- // another microphone even after it has been created since only one
- // capturer is supported. See issue crbug/262117.
- // It would make more sense if a WebRtcAudioCapturer represent one and only
- // one audio source.
- if (audio_capturer_ &&
- device_info_.session_id == audio_capturer_->session_id()) {
- return audio_capturer_;
- }
- return NULL;
- }
-
- webrtc::VideoSourceInterface* video_source() { return video_source_.get(); }
- webrtc::AudioSourceInterface* local_audio_source() {
- return local_audio_source_.get();
- }
-
- void OnLocalSourceStop();
-
- private:
- StreamDeviceInfo device_info_;
-
- scoped_refptr<webrtc::VideoSourceInterface> video_source_;
-
- // This member holds an instance of webrtc::LocalAudioSource. This is used
- // as a container for audio options.
- // TODO(hclam): This should be merged with |audio_source_| such that it
- // carries audio options.
- scoped_refptr<webrtc::AudioSourceInterface> local_audio_source_;
- scoped_ptr<MediaStreamSourceObserver> source_observer_;
-
- scoped_refptr<WebRtcAudioCapturer> audio_capturer_;
-
- SourceStopCallback stop_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(MediaStreamSourceExtraData);
-};
-
-} // namespace content
-
-#endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_
« no previous file with comments | « content/renderer/media/media_stream_source.cc ('k') | content/renderer/media/media_stream_source_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698