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

Side by Side Diff: content/renderer/media/mock_media_stream_video_sink.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_SINK_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SINK_H_
6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SINK_H_ 6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SINK_H_
7 7
8 #include "content/public/renderer/media_stream_video_sink.h" 8 #include "content/public/renderer/media_stream_video_sink.h"
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 20 matching lines...) Expand all
31 31
32 int number_of_frames() const { return number_of_frames_; } 32 int number_of_frames() const { return number_of_frames_; }
33 media::VideoFrame::Format format() const { return format_; } 33 media::VideoFrame::Format format() const { return format_; }
34 gfx::Size frame_size() const { return frame_size_; } 34 gfx::Size frame_size() const { return frame_size_; }
35 scoped_refptr<media::VideoFrame> last_frame() const { return last_frame_; }; 35 scoped_refptr<media::VideoFrame> last_frame() const { return last_frame_; };
36 36
37 bool enabled() const { return enabled_; } 37 bool enabled() const { return enabled_; }
38 blink::WebMediaStreamSource::ReadyState state() const { return state_; } 38 blink::WebMediaStreamSource::ReadyState state() const { return state_; }
39 39
40 private: 40 private:
41 void DeliverVideoFrame( 41 void DeliverVideoFrame(const scoped_refptr<media::VideoFrame>& frame,
42 const scoped_refptr<media::VideoFrame>& frame, 42 const base::TimeTicks& estimated_capture_time);
43 const media::VideoCaptureFormat& format,
44 const base::TimeTicks& estimated_capture_time);
45 43
46 int number_of_frames_; 44 int number_of_frames_;
47 bool enabled_; 45 bool enabled_;
48 media::VideoFrame::Format format_; 46 media::VideoFrame::Format format_;
49 blink::WebMediaStreamSource::ReadyState state_; 47 blink::WebMediaStreamSource::ReadyState state_;
50 gfx::Size frame_size_; 48 gfx::Size frame_size_;
51 scoped_refptr<media::VideoFrame> last_frame_; 49 scoped_refptr<media::VideoFrame> last_frame_;
52 base::WeakPtrFactory<MockMediaStreamVideoSink> weak_factory_; 50 base::WeakPtrFactory<MockMediaStreamVideoSink> weak_factory_;
53 }; 51 };
54 52
55 } // namespace content 53 } // namespace content
56 54
57 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SINK_H_ 55 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_VIDEO_SINK_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_track_unittest.cc ('k') | content/renderer/media/mock_media_stream_video_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698