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

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

Issue 155853002: Chrome MediaStream VideoTrack implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed whitespaces... Created 6 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 12 matching lines...) Expand all
23 public: 23 public:
24 typedef base::Callback<void(const blink::WebMediaStreamSource& source)> 24 typedef base::Callback<void(const blink::WebMediaStreamSource& source)>
25 SourceStoppedCallback; 25 SourceStoppedCallback;
26 26
27 typedef base::Callback<void(MediaStreamSource* source, 27 typedef base::Callback<void(MediaStreamSource* source,
28 bool success)> ConstraintsCallback; 28 bool success)> ConstraintsCallback;
29 29
30 MediaStreamSource(); 30 MediaStreamSource();
31 virtual ~MediaStreamSource(); 31 virtual ~MediaStreamSource();
32 32
33 virtual void AddTrack(const blink::WebMediaStreamTrack& track,
34 const blink::WebMediaConstraints& constraints,
35 const ConstraintsCallback& callback) = 0;
36 virtual void RemoveTrack(const blink::WebMediaStreamTrack& track) = 0;
37
38 // Returns device information about a source that has been created by a 33 // Returns device information about a source that has been created by a
39 // JavaScript call to GetUserMedia, e.g., a camera or microphone. 34 // JavaScript call to GetUserMedia, e.g., a camera or microphone.
40 const StreamDeviceInfo& device_info() const { 35 const StreamDeviceInfo& device_info() const {
41 return device_info_; 36 return device_info_;
42 } 37 }
43 38
44 // Stops the source (by calling DoStopSource()). This sets the 39 // Stops the source (by calling DoStopSource()). This sets the
45 // WebMediaStreamSource::readyState to ended, triggers the |stop_callback_| 40 // WebMediaStreamSource::readyState to ended, triggers the |stop_callback_|
46 // if set. All pointers to this object are invalid after calling this. 41 // if set. All pointers to this object are invalid after calling this.
47 void StopSource(); 42 void StopSource();
(...skipping 23 matching lines...) Expand all
71 private: 66 private:
72 StreamDeviceInfo device_info_; 67 StreamDeviceInfo device_info_;
73 SourceStoppedCallback stop_callback_; 68 SourceStoppedCallback stop_callback_;
74 69
75 DISALLOW_COPY_AND_ASSIGN(MediaStreamSource); 70 DISALLOW_COPY_AND_ASSIGN(MediaStreamSource);
76 }; 71 };
77 72
78 } // namespace content 73 } // namespace content
79 74
80 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_H_ 75 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_impl.cc ('k') | content/renderer/media/media_stream_track.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698