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

Side by Side Diff: webrtc/common_video/include/incoming_video_stream.h

Issue 2032003002: Minor cleanup in IncomingVideoStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | webrtc/common_video/incoming_video_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 13 matching lines...) Expand all
24 24
25 25
26 class IncomingVideoStream : public rtc::VideoSinkInterface<VideoFrame> { 26 class IncomingVideoStream : public rtc::VideoSinkInterface<VideoFrame> {
27 public: 27 public:
28 explicit IncomingVideoStream(bool disable_prerenderer_smoothing); 28 explicit IncomingVideoStream(bool disable_prerenderer_smoothing);
29 ~IncomingVideoStream(); 29 ~IncomingVideoStream();
30 30
31 // Overrides VideoSinkInterface 31 // Overrides VideoSinkInterface
32 void OnFrame(const VideoFrame& video_frame) override; 32 void OnFrame(const VideoFrame& video_frame) override;
33 33
34 // Set callback to the platform dependent code.
35 void SetRenderCallback(rtc::VideoSinkInterface<VideoFrame>* render_callback);
36
37 // Callback for file recording, snapshot, ... 34 // Callback for file recording, snapshot, ...
38 void SetExternalCallback(rtc::VideoSinkInterface<VideoFrame>* render_object); 35 void SetExternalCallback(rtc::VideoSinkInterface<VideoFrame>* render_object);
39 36
40 // Start/Stop. 37 // Start/Stop.
41 int32_t Start(); 38 int32_t Start();
42 int32_t Stop(); 39 int32_t Stop();
43 40
44 // Clear all buffers. 41 // Clear all buffers.
45 int32_t Reset(); 42 int32_t Reset();
46 43
(...skipping 20 matching lines...) Expand all
67 rtc::CriticalSection buffer_critsect_; 64 rtc::CriticalSection buffer_critsect_;
68 // TODO(pbos): Make plain member and stop resetting this thread, just 65 // TODO(pbos): Make plain member and stop resetting this thread, just
69 // start/stoping it is enough. 66 // start/stoping it is enough.
70 std::unique_ptr<rtc::PlatformThread> incoming_render_thread_ 67 std::unique_ptr<rtc::PlatformThread> incoming_render_thread_
71 GUARDED_BY(thread_critsect_); 68 GUARDED_BY(thread_critsect_);
72 std::unique_ptr<EventTimerWrapper> deliver_buffer_event_; 69 std::unique_ptr<EventTimerWrapper> deliver_buffer_event_;
73 70
74 bool running_ GUARDED_BY(stream_critsect_); 71 bool running_ GUARDED_BY(stream_critsect_);
75 rtc::VideoSinkInterface<VideoFrame>* external_callback_ 72 rtc::VideoSinkInterface<VideoFrame>* external_callback_
76 GUARDED_BY(thread_critsect_); 73 GUARDED_BY(thread_critsect_);
77 rtc::VideoSinkInterface<VideoFrame>* render_callback_
78 GUARDED_BY(thread_critsect_);
79 const std::unique_ptr<VideoRenderFrames> render_buffers_ 74 const std::unique_ptr<VideoRenderFrames> render_buffers_
80 GUARDED_BY(buffer_critsect_); 75 GUARDED_BY(buffer_critsect_);
81 76
82 uint32_t incoming_rate_ GUARDED_BY(stream_critsect_); 77 uint32_t incoming_rate_ GUARDED_BY(stream_critsect_);
83 int64_t last_rate_calculation_time_ms_ GUARDED_BY(stream_critsect_); 78 int64_t last_rate_calculation_time_ms_ GUARDED_BY(stream_critsect_);
84 uint16_t num_frames_since_last_calculation_ GUARDED_BY(stream_critsect_); 79 uint16_t num_frames_since_last_calculation_ GUARDED_BY(stream_critsect_);
85 }; 80 };
86 81
87 } // namespace webrtc 82 } // namespace webrtc
88 83
89 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_ 84 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/common_video/incoming_video_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698