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

Side by Side Diff: content/renderer/media/webrtc/media_stream_remote_video_source.h

Issue 617093003: Add MediaStreamSource frame rate calculation to the tracker. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding type name. Fixing IPC type problem. Created 6 years, 2 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_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_
7 7
8 #include "base/threading/thread_checker.h" 8 #include "base/threading/thread_checker.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/renderer/media/media_stream_video_source.h" 10 #include "content/renderer/media/media_stream_video_source.h"
(...skipping 21 matching lines...) Expand all
32 int max_requested_height, 32 int max_requested_height,
33 double max_requested_frame_rate, 33 double max_requested_frame_rate,
34 const VideoCaptureDeviceFormatsCB& callback) OVERRIDE; 34 const VideoCaptureDeviceFormatsCB& callback) OVERRIDE;
35 35
36 virtual void StartSourceImpl( 36 virtual void StartSourceImpl(
37 const media::VideoCaptureFormat& format, 37 const media::VideoCaptureFormat& format,
38 const VideoCaptureDeliverFrameCB& frame_callback) OVERRIDE; 38 const VideoCaptureDeliverFrameCB& frame_callback) OVERRIDE;
39 39
40 virtual void StopSourceImpl() OVERRIDE; 40 virtual void StopSourceImpl() OVERRIDE;
41 41
42 virtual std::string TypeName() const OVERRIDE;
43
42 // Used by tests to test that a frame can be received and that the 44 // Used by tests to test that a frame can be received and that the
43 // MediaStreamRemoteVideoSource behaves as expected. 45 // MediaStreamRemoteVideoSource behaves as expected.
44 webrtc::VideoRendererInterface* RenderInterfaceForTest(); 46 webrtc::VideoRendererInterface* RenderInterfaceForTest();
45 47
46 private: 48 private:
47 // webrtc::ObserverInterface implementation. 49 // webrtc::ObserverInterface implementation.
48 virtual void OnChanged() OVERRIDE; 50 virtual void OnChanged() OVERRIDE;
49 51
50 scoped_refptr<webrtc::VideoTrackInterface> remote_track_; 52 scoped_refptr<webrtc::VideoTrackInterface> remote_track_;
51 webrtc::MediaStreamTrackInterface::TrackState last_state_; 53 webrtc::MediaStreamTrackInterface::TrackState last_state_;
52 54
53 // Internal class used for receiving frames from the webrtc track on a 55 // Internal class used for receiving frames from the webrtc track on a
54 // libjingle thread and forward it to the IO-thread. 56 // libjingle thread and forward it to the IO-thread.
55 class RemoteVideoSourceDelegate; 57 class RemoteVideoSourceDelegate;
56 scoped_refptr<RemoteVideoSourceDelegate> delegate_; 58 scoped_refptr<RemoteVideoSourceDelegate> delegate_;
57 59
58 // Bound to the render thread. 60 // Bound to the render thread.
59 base::ThreadChecker thread_checker_; 61 base::ThreadChecker thread_checker_;
60 62
61 DISALLOW_COPY_AND_ASSIGN(MediaStreamRemoteVideoSource); 63 DISALLOW_COPY_AND_ASSIGN(MediaStreamRemoteVideoSource);
62 }; 64 };
63 65
64 } // namespace content 66 } // namespace content
65 67
66 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ 68 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/video_track_adapter.cc ('k') | content/renderer/media/webrtc/media_stream_remote_video_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698