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

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

Issue 246433006: Change MediaStreamVideoSource to output different resolutions to different tracks depending on the … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments. 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/media_stream_video_source.h
diff --git a/content/renderer/media/media_stream_video_source.h b/content/renderer/media/media_stream_video_source.h
index 34b917033548bf10bb6c5a94a047710d627ee936..5469ae88d4411b19898ec2165b7fc52e0669ddab 100644
--- a/content/renderer/media/media_stream_video_source.h
+++ b/content/renderer/media/media_stream_video_source.h
@@ -14,7 +14,6 @@
#include "content/common/content_export.h"
#include "content/common/media/video_capture.h"
#include "content/renderer/media/media_stream_source.h"
-#include "content/renderer/media/video_frame_deliverer.h"
#include "media/base/video_frame.h"
#include "media/video/capture/video_capture_types.h"
#include "third_party/WebKit/public/platform/WebMediaConstraints.h"
@@ -24,6 +23,7 @@
namespace content {
class MediaStreamVideoTrack;
+class VideoTrackAdapter;
// MediaStreamVideoSource is an interface used for sending video frames to a
// MediaStreamVideoTrack.
@@ -128,14 +128,10 @@ class CONTENT_EXPORT MediaStreamVideoSource
// Finds the first constraints in |requested_constraints_| that can be
// fulfilled. |best_format| is set to the video resolution that can be
- // fulfilled. |frame_output_size| is the requested frame size after cropping.
- // |resulting_constraints| is set to the found constraints in
- // |requested_constraints_|.
+ // fulfilled.
bool FindBestFormatWithConstraints(
const media::VideoCaptureFormats& formats,
- media::VideoCaptureFormat* best_format,
- gfx::Size* frame_output_size,
- blink::WebMediaConstraints* resulting_constraints);
+ media::VideoCaptureFormat* best_format);
// Trigger all cached callbacks from AddTrack. AddTrack is successful
// if the capture delegate has started and the constraints provided in
@@ -149,10 +145,6 @@ class CONTENT_EXPORT MediaStreamVideoSource
State state_;
media::VideoCaptureFormat current_format_;
- blink::WebMediaConstraints current_constraints_;
- // |max_frame_output_size_| is the maximum frame size allowed by
- // |current_constraints_|.
- gfx::Size max_frame_output_size_;
struct RequestedConstraints {
RequestedConstraints(MediaStreamVideoTrack* track,
@@ -170,12 +162,10 @@ class CONTENT_EXPORT MediaStreamVideoSource
media::VideoCaptureFormats supported_formats_;
- // |FrameDeliverer| is an internal helper object used for delivering video
- // frames using callbacks to all registered tracks on the IO thread.
- class FrameDeliverer;
- scoped_refptr<FrameDeliverer> frame_deliverer_;
+ // |track_adapter_| delivers video frames to the tracks on the IO-thread.
+ scoped_refptr<VideoTrackAdapter> track_adapter_;
- // Tracks that currently are receiving video frames.
+ // Tracks that currently are connected to this source.
std::vector<MediaStreamVideoTrack*> tracks_;
// NOTE: Weak pointers must be invalidated before all other member variables.

Powered by Google App Engine
This is Rietveld 408576698