| 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 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 void ConfigureSync(int voe_channel_id, | 40 void ConfigureSync(int voe_channel_id, |
| 41 VoEVideoSync* voe_sync_interface); | 41 VoEVideoSync* voe_sync_interface); |
| 42 | 42 |
| 43 // Implements Module. | 43 // Implements Module. |
| 44 int64_t TimeUntilNextProcess() override; | 44 int64_t TimeUntilNextProcess() override; |
| 45 void Process() override; | 45 void Process() override; |
| 46 | 46 |
| 47 // Gets the sync offset between the current played out audio frame and the | 47 // Gets the sync offset between the current played out audio frame and the |
| 48 // video |frame|. Returns true on success, false otherwise. | 48 // video |frame|. Returns true on success, false otherwise. |
| 49 // The estimated frequency is the frequency used in the RTP to NTP timestamp |
| 50 // conversion. |
| 49 bool GetStreamSyncOffsetInMs(const VideoFrame& frame, | 51 bool GetStreamSyncOffsetInMs(const VideoFrame& frame, |
| 50 int64_t* stream_offset_ms) const; | 52 int64_t* stream_offset_ms, |
| 53 double* estimated_freq_khz) const; |
| 51 | 54 |
| 52 private: | 55 private: |
| 53 Clock* const clock_; | 56 Clock* const clock_; |
| 54 vcm::VideoReceiver* const video_receiver_; | 57 vcm::VideoReceiver* const video_receiver_; |
| 55 RtpReceiver* const video_rtp_receiver_; | 58 RtpReceiver* const video_rtp_receiver_; |
| 56 RtpRtcp* const video_rtp_rtcp_; | 59 RtpRtcp* const video_rtp_rtcp_; |
| 57 | 60 |
| 58 rtc::CriticalSection crit_; | 61 rtc::CriticalSection crit_; |
| 59 int voe_channel_id_ GUARDED_BY(crit_); | 62 int voe_channel_id_ GUARDED_BY(crit_); |
| 60 VoEVideoSync* voe_sync_interface_ GUARDED_BY(crit_); | 63 VoEVideoSync* voe_sync_interface_ GUARDED_BY(crit_); |
| 61 RtpReceiver* audio_rtp_receiver_ GUARDED_BY(crit_); | 64 RtpReceiver* audio_rtp_receiver_ GUARDED_BY(crit_); |
| 62 RtpRtcp* audio_rtp_rtcp_ GUARDED_BY(crit_); | 65 RtpRtcp* audio_rtp_rtcp_ GUARDED_BY(crit_); |
| 63 std::unique_ptr<StreamSynchronization> sync_ GUARDED_BY(crit_); | 66 std::unique_ptr<StreamSynchronization> sync_ GUARDED_BY(crit_); |
| 64 StreamSynchronization::Measurements audio_measurement_ GUARDED_BY(crit_); | 67 StreamSynchronization::Measurements audio_measurement_ GUARDED_BY(crit_); |
| 65 StreamSynchronization::Measurements video_measurement_ GUARDED_BY(crit_); | 68 StreamSynchronization::Measurements video_measurement_ GUARDED_BY(crit_); |
| 66 | 69 |
| 67 rtc::ThreadChecker process_thread_checker_; | 70 rtc::ThreadChecker process_thread_checker_; |
| 68 int64_t last_sync_time_ ACCESS_ON(&process_thread_checker_); | 71 int64_t last_sync_time_ ACCESS_ON(&process_thread_checker_); |
| 69 }; | 72 }; |
| 70 | 73 |
| 71 } // namespace webrtc | 74 } // namespace webrtc |
| 72 | 75 |
| 73 #endif // WEBRTC_VIDEO_RTP_STREAMS_SYNCHRONIZER_H_ | 76 #endif // WEBRTC_VIDEO_RTP_STREAMS_SYNCHRONIZER_H_ |
| OLD | NEW |