2011-07-07 08:21:25 +00:00
|
|
|
/*
|
2012-03-01 18:22:48 +00:00
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
2011-07-07 08:21:25 +00:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2011-11-30 18:31:36 +00:00
|
|
|
// ViESyncModule is responsible for synchronization audio and video for a given
|
|
|
|
|
// VoE and ViE channel couple.
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2011-11-30 18:31:36 +00:00
|
|
|
#ifndef WEBRTC_VIDEO_ENGINE_VIE_SYNC_MODULE_H_
|
|
|
|
|
#define WEBRTC_VIDEO_ENGINE_VIE_SYNC_MODULE_H_
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2015-02-26 14:34:55 +00:00
|
|
|
#include "webrtc/base/scoped_ptr.h"
|
2015-11-04 08:31:52 +01:00
|
|
|
#include "webrtc/modules/include/module.h"
|
2015-10-28 18:17:40 +01:00
|
|
|
#include "webrtc/system_wrappers/include/tick_util.h"
|
2013-05-17 13:44:48 +00:00
|
|
|
#include "webrtc/video_engine/stream_synchronization.h"
|
|
|
|
|
#include "webrtc/voice_engine/include/voe_video_sync.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2011-11-30 18:31:36 +00:00
|
|
|
namespace webrtc {
|
|
|
|
|
|
2011-07-07 08:21:25 +00:00
|
|
|
class CriticalSectionWrapper;
|
|
|
|
|
class RtpRtcp;
|
|
|
|
|
class VideoCodingModule;
|
2012-09-11 07:00:42 +00:00
|
|
|
class ViEChannel;
|
2011-07-07 08:21:25 +00:00
|
|
|
class VoEVideoSync;
|
|
|
|
|
|
2011-11-30 18:31:36 +00:00
|
|
|
class ViESyncModule : public Module {
|
|
|
|
|
public:
|
2015-05-21 17:00:24 +02:00
|
|
|
explicit ViESyncModule(VideoCodingModule* vcm);
|
2011-11-30 18:31:36 +00:00
|
|
|
~ViESyncModule();
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2012-05-11 11:08:54 +00:00
|
|
|
int ConfigureSync(int voe_channel_id,
|
|
|
|
|
VoEVideoSync* voe_sync_interface,
|
2013-08-15 23:38:54 +00:00
|
|
|
RtpRtcp* video_rtcp_module,
|
|
|
|
|
RtpReceiver* video_receiver);
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2012-05-11 11:08:54 +00:00
|
|
|
int VoiceChannel();
|
2012-05-10 23:01:04 +00:00
|
|
|
|
2011-11-30 18:31:36 +00:00
|
|
|
// Implements Module.
|
2015-03-04 12:58:35 +00:00
|
|
|
int64_t TimeUntilNextProcess() override;
|
|
|
|
|
int32_t Process() override;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2011-11-30 18:31:36 +00:00
|
|
|
private:
|
2015-02-26 14:34:55 +00:00
|
|
|
rtc::scoped_ptr<CriticalSectionWrapper> data_cs_;
|
2015-05-21 17:00:24 +02:00
|
|
|
VideoCodingModule* const vcm_;
|
2013-08-15 23:38:54 +00:00
|
|
|
RtpReceiver* video_receiver_;
|
2012-09-11 07:00:42 +00:00
|
|
|
RtpRtcp* video_rtp_rtcp_;
|
2011-11-30 18:31:36 +00:00
|
|
|
int voe_channel_id_;
|
|
|
|
|
VoEVideoSync* voe_sync_interface_;
|
|
|
|
|
TickTime last_sync_time_;
|
2015-02-26 14:34:55 +00:00
|
|
|
rtc::scoped_ptr<StreamSynchronization> sync_;
|
2012-09-11 07:00:42 +00:00
|
|
|
StreamSynchronization::Measurements audio_measurement_;
|
|
|
|
|
StreamSynchronization::Measurements video_measurement_;
|
2011-11-30 18:31:36 +00:00
|
|
|
};
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2011-11-30 18:31:36 +00:00
|
|
|
} // namespace webrtc
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2011-11-30 18:31:36 +00:00
|
|
|
#endif // WEBRTC_VIDEO_ENGINE_VIE_SYNC_MODULE_H_
|