| OLD | NEW |
| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 int32_t Start(); | 50 int32_t Start(); |
| 51 int32_t Stop(); | 51 int32_t Stop(); |
| 52 | 52 |
| 53 // Clear all buffers. | 53 // Clear all buffers. |
| 54 int32_t Reset(); | 54 int32_t Reset(); |
| 55 | 55 |
| 56 // Properties. | 56 // Properties. |
| 57 uint32_t StreamId() const; | 57 uint32_t StreamId() const; |
| 58 uint32_t IncomingRate() const; | 58 uint32_t IncomingRate() const; |
| 59 | 59 |
| 60 void SetStartImage(const VideoFrame& video_frame); | |
| 61 | |
| 62 void SetTimeoutImage(const VideoFrame& video_frame, | |
| 63 const uint32_t timeout); | |
| 64 | |
| 65 int32_t SetExpectedRenderDelay(int32_t delay_ms); | 60 int32_t SetExpectedRenderDelay(int32_t delay_ms); |
| 66 | 61 |
| 67 protected: | 62 protected: |
| 68 static bool IncomingVideoStreamThreadFun(void* obj); | 63 static bool IncomingVideoStreamThreadFun(void* obj); |
| 69 bool IncomingVideoStreamProcess(); | 64 bool IncomingVideoStreamProcess(); |
| 70 | 65 |
| 71 private: | 66 private: |
| 72 enum { kEventStartupTimeMs = 10 }; | 67 enum { kEventStartupTimeMs = 10 }; |
| 73 enum { kEventMaxWaitTimeMs = 100 }; | 68 enum { kEventMaxWaitTimeMs = 100 }; |
| 74 enum { kFrameRatePeriodMs = 1000 }; | 69 enum { kFrameRatePeriodMs = 1000 }; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 89 | 84 |
| 90 bool running_ GUARDED_BY(stream_critsect_); | 85 bool running_ GUARDED_BY(stream_critsect_); |
| 91 VideoRenderCallback* external_callback_ GUARDED_BY(thread_critsect_); | 86 VideoRenderCallback* external_callback_ GUARDED_BY(thread_critsect_); |
| 92 VideoRenderCallback* render_callback_ GUARDED_BY(thread_critsect_); | 87 VideoRenderCallback* render_callback_ GUARDED_BY(thread_critsect_); |
| 93 const std::unique_ptr<VideoRenderFrames> render_buffers_ | 88 const std::unique_ptr<VideoRenderFrames> render_buffers_ |
| 94 GUARDED_BY(buffer_critsect_); | 89 GUARDED_BY(buffer_critsect_); |
| 95 | 90 |
| 96 uint32_t incoming_rate_ GUARDED_BY(stream_critsect_); | 91 uint32_t incoming_rate_ GUARDED_BY(stream_critsect_); |
| 97 int64_t last_rate_calculation_time_ms_ GUARDED_BY(stream_critsect_); | 92 int64_t last_rate_calculation_time_ms_ GUARDED_BY(stream_critsect_); |
| 98 uint16_t num_frames_since_last_calculation_ GUARDED_BY(stream_critsect_); | 93 uint16_t num_frames_since_last_calculation_ GUARDED_BY(stream_critsect_); |
| 99 int64_t last_render_time_ms_ GUARDED_BY(thread_critsect_); | |
| 100 VideoFrame temp_frame_ GUARDED_BY(thread_critsect_); | |
| 101 VideoFrame start_image_ GUARDED_BY(thread_critsect_); | |
| 102 VideoFrame timeout_image_ GUARDED_BY(thread_critsect_); | |
| 103 uint32_t timeout_time_ GUARDED_BY(thread_critsect_); | |
| 104 }; | 94 }; |
| 105 | 95 |
| 106 } // namespace webrtc | 96 } // namespace webrtc |
| 107 | 97 |
| 108 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_ | 98 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_INCOMING_VIDEO_STREAM_H_ |
| OLD | NEW |