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

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

Issue 131763002: Adds MediaStreamSource, MediaStreamAudioSource and MediaStreamVideoCaptureDeviceSource (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added MediaStreamAudioSource. 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_video_capture_device_source.h
diff --git a/content/renderer/media/media_stream_video_capture_device_source.h b/content/renderer/media/media_stream_video_capture_device_source.h
new file mode 100644
index 0000000000000000000000000000000000000000..30141bacfe598ec9ca03812cb5a3fadb22161dea
--- /dev/null
+++ b/content/renderer/media/media_stream_video_capture_device_source.h
@@ -0,0 +1,50 @@
+// Copyright 2013 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_VIDEO_CAPTURE_DEVICE_SOURCE_H_
+#define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURE_DEVICE_SOURCE_H_
+
+#include <vector>
+
+#include "base/compiler_specific.h"
+#include "content/common/content_export.h"
+#include "content/renderer/media/media_stream_video_source.h"
+
+namespace content {
+
+// MediaStreamVideoCaptureDeviceSource is an implementation of
+// MediaStreamVideoSource for local video capture.
+// TODO(perkj): Currently, this use RTCVideoCapturer and a libjingle
+// implementation of webrt::MediaStreamSourceInterface. Implement this class
+// without using cricket::VideoCapturer and webrtc::VideoSourceInterface as
+// part of project Piranha Plant.
+class CONTENT_EXPORT MediaStreamVideoCaptureDeviceSource
Alpha Left Google 2014/01/15 01:57:47 It looks like we need an implementation of MediaSt
perkj_chrome 2014/01/16 15:48:08 What do you mean by pepper in this case? The exten
+ : public MediaStreamVideoSource,
+ NON_EXPORTED_BASE(public webrtc::ObserverInterface),
+ NON_EXPORTED_BASE(public base::NonThreadSafe) {
+ public:
+ MediaStreamVideoCaptureDeviceSource(const StreamDeviceInfo& device_info,
+ const SourceStopCallback& stop_callback,
+ MediaStreamDependencyFactory* factory);
+ virtual ~MediaStreamVideoCaptureDeviceSource();
+
+ virtual void ApplyConstraints(const blink::WebMediaStreamTrack& track,
+ const blink::WebMediaConstraints& constraints,
+ const ConstraintsCallback& callback) OVERRIDE;
+ protected:
+ // Implements webrtc::Notifier.
+ virtual void OnChanged() OVERRIDE;
+
+ private:
+ void CheckIfWebRtcSourceIsLive();
+
+ bool initializing_;
+ blink::WebMediaConstraints current_constraints_;
+ std::vector<ConstraintsCallback> constraints_callbacks_;
+ DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoCaptureDeviceSource);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_CAPTURE_DEVICE_SOURCE_H_

Powered by Google App Engine
This is Rietveld 408576698