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

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

Issue 955253002: Add metadata to media::VideoFrame and plumb it through IPC/MediaStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tommi's nits addressed Created 5 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_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_
7 7
8 #include "content/renderer/media/media_stream_video_source.h" 8 #include "content/renderer/media/media_stream_video_source.h"
9 9
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 int max_requested_height() const { return max_requested_height_; } 43 int max_requested_height() const { return max_requested_height_; }
44 int max_requested_width() const { return max_requested_width_; } 44 int max_requested_width() const { return max_requested_width_; }
45 double max_requested_frame_rate() const { return max_requested_frame_rate_; } 45 double max_requested_frame_rate() const { return max_requested_frame_rate_; }
46 46
47 virtual void SetMutedState(bool muted_state) override { 47 virtual void SetMutedState(bool muted_state) override {
48 MediaStreamVideoSource::SetMutedState(muted_state); 48 MediaStreamVideoSource::SetMutedState(muted_state);
49 DoSetMutedState(muted_state); 49 DoSetMutedState(muted_state);
50 } 50 }
51 51
52 protected: 52 protected:
53 void DeliverVideoFrameOnIO(const scoped_refptr<media::VideoFrame>& frame,
54 media::VideoCaptureFormat format,
55 const base::TimeTicks& estimated_capture_time,
56 const VideoCaptureDeliverFrameCB& frame_callback);
57
58 // Implements MediaStreamVideoSource. 53 // Implements MediaStreamVideoSource.
59 virtual void GetCurrentSupportedFormats( 54 virtual void GetCurrentSupportedFormats(
60 int max_requested_height, 55 int max_requested_height,
61 int max_requested_width, 56 int max_requested_width,
62 double max_requested_frame_rate, 57 double max_requested_frame_rate,
63 const VideoCaptureDeviceFormatsCB& callback) override; 58 const VideoCaptureDeviceFormatsCB& callback) override;
64 virtual void StartSourceImpl( 59 virtual void StartSourceImpl(
65 const media::VideoCaptureFormat& format, 60 const media::VideoCaptureFormat& format,
66 const VideoCaptureDeliverFrameCB& frame_callback) override; 61 const VideoCaptureDeliverFrameCB& frame_callback) override;
67 virtual void StopSourceImpl() override; 62 virtual void StopSourceImpl() override;
68 63
69 private: 64 private:
70 media::VideoCaptureFormat format_; 65 media::VideoCaptureFormat format_;
71 media::VideoCaptureFormats supported_formats_; 66 media::VideoCaptureFormats supported_formats_;
72 bool manual_get_supported_formats_; 67 bool manual_get_supported_formats_;
73 int max_requested_height_; 68 int max_requested_height_;
74 int max_requested_width_; 69 int max_requested_width_;
75 double max_requested_frame_rate_; 70 double max_requested_frame_rate_;
76 bool attempted_to_start_; 71 bool attempted_to_start_;
77 VideoCaptureDeviceFormatsCB formats_callback_; 72 VideoCaptureDeviceFormatsCB formats_callback_;
78 VideoCaptureDeliverFrameCB frame_callback_; 73 VideoCaptureDeliverFrameCB frame_callback_;
79 74
80 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamVideoSource); 75 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamVideoSource);
81 }; 76 };
82 77
83 } // namespace content 78 } // namespace content
84 79
85 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_ 80 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SOURCE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/mock_media_stream_video_sink.cc ('k') | content/renderer/media/mock_media_stream_video_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698