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

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

Issue 264363005: Cast: deliver video frames on the IO thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 6 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_VIDEO_TRACK_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 30 matching lines...) Expand all
41 const blink::WebMediaStreamTrack& track); 41 const blink::WebMediaStreamTrack& track);
42 42
43 // Constructor for local video tracks. 43 // Constructor for local video tracks.
44 MediaStreamVideoTrack( 44 MediaStreamVideoTrack(
45 MediaStreamVideoSource* source, 45 MediaStreamVideoSource* source,
46 const blink::WebMediaConstraints& constraints, 46 const blink::WebMediaConstraints& constraints,
47 const MediaStreamVideoSource::ConstraintsCallback& callback, 47 const MediaStreamVideoSource::ConstraintsCallback& callback,
48 bool enabled); 48 bool enabled);
49 virtual ~MediaStreamVideoTrack(); 49 virtual ~MediaStreamVideoTrack();
50 50
51 // Add |sink| to receive state changes and video frames on the main render
52 // thread.
53 virtual void AddSink(MediaStreamVideoSink* sink);
54 virtual void RemoveSink(MediaStreamVideoSink* sink);
55
56 // Add |sink| to receive state changes on the main render thread and video 51 // Add |sink| to receive state changes on the main render thread and video
57 // frames in the |callback| method on the IO-thread. 52 // frames in the |callback| method on the IO-thread.
58 virtual void AddSink(MediaStreamSink* sink, 53 virtual void AddSink(MediaStreamVideoSink* sink,
59 const VideoCaptureDeliverFrameCB& callback); 54 const VideoCaptureDeliverFrameCB& callback);
60 virtual void RemoveSink(MediaStreamSink* sink); 55 virtual void RemoveSink(MediaStreamVideoSink* sink);
61 56
62 virtual void SetEnabled(bool enabled) OVERRIDE; 57 virtual void SetEnabled(bool enabled) OVERRIDE;
63 virtual void Stop() OVERRIDE; 58 virtual void Stop() OVERRIDE;
64 59
65 void OnReadyStateChanged(blink::WebMediaStreamSource::ReadyState state); 60 void OnReadyStateChanged(blink::WebMediaStreamSource::ReadyState state);
66 61
67 const blink::WebMediaConstraints& constraints() const { 62 const blink::WebMediaConstraints& constraints() const {
68 return constraints_; 63 return constraints_;
69 } 64 }
70 65
(...skipping 13 matching lines...) Expand all
84 // by the blink::WebMediaStreamSource and is guaranteed to outlive the 79 // by the blink::WebMediaStreamSource and is guaranteed to outlive the
85 // track. 80 // track.
86 MediaStreamVideoSource* source_; 81 MediaStreamVideoSource* source_;
87 82
88 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrack); 83 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrack);
89 }; 84 };
90 85
91 } // namespace content 86 } // namespace content
92 87
93 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ 88 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698