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

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

Issue 242013002: Refactor video capturing code in the render process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge again :( 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 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_VIDEO_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 protected: 76 protected:
77 virtual void DoStopSource() OVERRIDE; 77 virtual void DoStopSource() OVERRIDE;
78 78
79 // Sets ready state and notifies the ready state to all registered tracks. 79 // Sets ready state and notifies the ready state to all registered tracks.
80 virtual void SetReadyState(blink::WebMediaStreamSource::ReadyState state); 80 virtual void SetReadyState(blink::WebMediaStreamSource::ReadyState state);
81 81
82 // Delivers |frame| to registered tracks according to their constraints. 82 // Delivers |frame| to registered tracks according to their constraints.
83 // Note: current implementation assumes |frame| be contiguous layout of image 83 // Note: current implementation assumes |frame| be contiguous layout of image
84 // planes and I420. 84 // planes and I420.
85 virtual void DeliverVideoFrame(const scoped_refptr<media::VideoFrame>& frame); 85 // |format| contains extra information like the frame rate of this source.
86 virtual void DeliverVideoFrame(const scoped_refptr<media::VideoFrame>& frame,
87 const media::VideoCaptureFormat& format);
86 88
87 // An implementation must fetch the formats that can currently be used by 89 // An implementation must fetch the formats that can currently be used by
88 // the source and call OnSupportedFormats when done. 90 // the source and call OnSupportedFormats when done.
89 // |max_requested_height| and |max_requested_width| is the max height and 91 // |max_requested_height| and |max_requested_width| is the max height and
90 // width set as a mandatory constraint if set when calling 92 // width set as a mandatory constraint if set when calling
91 // MediaStreamVideoSource::AddTrack. If max height and max width is not set 93 // MediaStreamVideoSource::AddTrack. If max height and max width is not set
92 // |max_requested_height| and |max_requested_width| are 0. 94 // |max_requested_height| and |max_requested_width| are 0.
93 virtual void GetCurrentSupportedFormats(int max_requested_width, 95 virtual void GetCurrentSupportedFormats(int max_requested_width,
94 int max_requested_height) = 0; 96 int max_requested_height) = 0;
95 void OnSupportedFormats(const media::VideoCaptureFormats& formats); 97 void OnSupportedFormats(const media::VideoCaptureFormats& formats);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 165
164 // Tracks that currently are receiving video frames. 166 // Tracks that currently are receiving video frames.
165 std::vector<MediaStreamVideoTrack*> tracks_; 167 std::vector<MediaStreamVideoTrack*> tracks_;
166 168
167 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); 169 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource);
168 }; 170 };
169 171
170 } // namespace content 172 } // namespace content
171 173
172 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ 174 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_capturer_source.cc ('k') | content/renderer/media/media_stream_video_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698