2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 // ViESyncModule is responsible for synchronization audio and video for a given
12 // VoE and ViE channel couple.
14 #ifndef WEBRTC_VIDEO_ENGINE_VIE_SYNC_MODULE_H_
15 #define WEBRTC_VIDEO_ENGINE_VIE_SYNC_MODULE_H_
17 #include "modules/interface/module.h"
18 #include "system_wrappers/interface/scoped_ptr.h"
19 #include "system_wrappers/interface/tick_util.h"
23 class CriticalSectionWrapper
;
25 class StreamSynchronization
;
26 class VideoCodingModule
;
29 class ViESyncModule
: public Module
{
31 ViESyncModule(const int32_t channel_id
, VideoCodingModule
* vcm
);
34 int ConfigureSync(int voe_channel_id
,
35 VoEVideoSync
* voe_sync_interface
,
36 RtpRtcp
* video_rtcp_module
);
41 virtual WebRtc_Word32
TimeUntilNextProcess();
42 virtual WebRtc_Word32
Process();
45 scoped_ptr
<CriticalSectionWrapper
> data_cs_
;
46 const int32_t channel_id_
;
47 VideoCodingModule
* vcm_
;
48 RtpRtcp
* video_rtcp_module_
;
50 VoEVideoSync
* voe_sync_interface_
;
51 TickTime last_sync_time_
;
52 scoped_ptr
<StreamSynchronization
> sync_
;
57 #endif // WEBRTC_VIDEO_ENGINE_VIE_SYNC_MODULE_H_