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

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

Issue 2742893003: Let getSettings() return the constrained track resolution, not source. (Closed)
Patch Set: Added bug # for non-working test Created 3 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
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_VIDEO_TRACK_ADAPTER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_
6 #define CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ 6 #define CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 return io_task_runner_.get(); 58 return io_task_runner_.get();
59 } 59 }
60 60
61 // Start monitor that frames are delivered to this object. I.E, that 61 // Start monitor that frames are delivered to this object. I.E, that
62 // |DeliverFrameOnIO| is called with a frame rate of |source_frame_rate|. 62 // |DeliverFrameOnIO| is called with a frame rate of |source_frame_rate|.
63 // |on_muted_callback| is triggered on the main render thread. 63 // |on_muted_callback| is triggered on the main render thread.
64 void StartFrameMonitoring(double source_frame_rate, 64 void StartFrameMonitoring(double source_frame_rate,
65 const OnMutedCallback& on_muted_callback); 65 const OnMutedCallback& on_muted_callback);
66 void StopFrameMonitoring(); 66 void StopFrameMonitoring();
67 67
68 static void CalculateTargetSize(const gfx::Size& input_size,
69 const gfx::Size& max_frame_size,
70 double min_aspect_ratio,
71 double max_aspect_ratio,
72 gfx::Size* desired_size);
73
68 private: 74 private:
69 virtual ~VideoTrackAdapter(); 75 virtual ~VideoTrackAdapter();
70 friend class base::RefCountedThreadSafe<VideoTrackAdapter>; 76 friend class base::RefCountedThreadSafe<VideoTrackAdapter>;
71 77
72 void AddTrackOnIO( 78 void AddTrackOnIO(
73 const MediaStreamVideoTrack* track, 79 const MediaStreamVideoTrack* track,
74 VideoCaptureDeliverFrameCB frame_callback, 80 VideoCaptureDeliverFrameCB frame_callback,
75 const gfx::Size& max_frame_size, 81 const gfx::Size& max_frame_size,
76 double min_aspect_ratio, 82 double min_aspect_ratio,
77 double max_aspect_ratio, 83 double max_aspect_ratio,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 124
119 // Frame rate configured on the video source, accessed on the IO-thread. 125 // Frame rate configured on the video source, accessed on the IO-thread.
120 float source_frame_rate_; 126 float source_frame_rate_;
121 127
122 DISALLOW_COPY_AND_ASSIGN(VideoTrackAdapter); 128 DISALLOW_COPY_AND_ASSIGN(VideoTrackAdapter);
123 }; 129 };
124 130
125 } // namespace content 131 } // namespace content
126 132
127 #endif // CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ 133 #endif // CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_track.cc ('k') | content/renderer/media/video_track_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698