Removed cpplint warnings from all impl-files to be able to add this check as presubmit step. I don't want to change the API right now, will come later, so there are several NOLINT comments added to get around this for now.
BUG=627 TESTS=vie_auto_test Review URL: https://webrtc-codereview.appspot.com/661005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2433 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
2bd8d62d3b
commit
9ba151bdf9
@ -8,25 +8,27 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "video_engine/vie_base_impl.h"
|
||||
|
||||
#include "critical_section_wrapper.h"
|
||||
#include "engine_configurations.h"
|
||||
#include "rtp_rtcp.h"
|
||||
#include "trace.h"
|
||||
#include "video_coding.h"
|
||||
#include "video_processing.h"
|
||||
#include "video_render.h"
|
||||
#include "vie_base_impl.h"
|
||||
#include "vie_channel.h"
|
||||
#include "vie_channel_manager.h"
|
||||
#include "vie_defines.h"
|
||||
#include "vie_encoder.h"
|
||||
#include "vie_errors.h"
|
||||
#include "vie_impl.h"
|
||||
#include "vie_input_manager.h"
|
||||
#include "vie_performance_monitor.h"
|
||||
#include "vie_shared_data.h"
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include "engine_configurations.h" // NOLINT
|
||||
#include "system_wrappers/interface/critical_section_wrapper.h"
|
||||
#include "modules/rtp_rtcp/interface/rtp_rtcp.h"
|
||||
#include "modules/video_coding/main/interface/video_coding.h"
|
||||
#include "modules/video_processing/main/interface/video_processing.h"
|
||||
#include "modules/video_render/main/interface/video_render.h"
|
||||
#include "system_wrappers/interface/trace.h"
|
||||
#include "video_engine/vie_channel.h"
|
||||
#include "video_engine/vie_channel_manager.h"
|
||||
#include "video_engine/vie_defines.h"
|
||||
#include "video_engine/vie_encoder.h"
|
||||
#include "video_engine/include/vie_errors.h"
|
||||
#include "video_engine/vie_impl.h"
|
||||
#include "video_engine/vie_input_manager.h"
|
||||
#include "video_engine/vie_performance_monitor.h"
|
||||
#include "video_engine/vie_shared_data.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -99,7 +101,7 @@ int ViEBaseImpl::SetVoiceEngine(VoiceEngine* voice_engine) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ViEBaseImpl::CreateChannel(int& video_channel) {
|
||||
int ViEBaseImpl::CreateChannel(int& video_channel) { // NOLINT
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo, ViEId(shared_data_.instance_id()),
|
||||
"%s", __FUNCTION__);
|
||||
|
||||
@ -123,11 +125,12 @@ int ViEBaseImpl::CreateChannel(int& video_channel) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ViEBaseImpl::CreateChannel(int& video_channel, int original_channel) {
|
||||
int ViEBaseImpl::CreateChannel(int& video_channel, // NOLINT
|
||||
int original_channel) {
|
||||
return CreateChannel(video_channel, original_channel, true);
|
||||
}
|
||||
|
||||
int ViEBaseImpl::CreateReceiveChannel(int& video_channel,
|
||||
int ViEBaseImpl::CreateReceiveChannel(int& video_channel, // NOLINT
|
||||
int original_channel) {
|
||||
return CreateChannel(video_channel, original_channel, false);
|
||||
}
|
||||
@ -359,7 +362,7 @@ int ViEBaseImpl::StopReceive(const int video_channel) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ViEBaseImpl::RegisterObserver(ViEBaseObserver& observer) {
|
||||
int ViEBaseImpl::RegisterObserver(ViEBaseObserver& observer) { // NOLINT
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo, ViEId(shared_data_.instance_id()),
|
||||
"%s", __FUNCTION__);
|
||||
if (shared_data_.vie_performance_monitor()->ViEBaseObserverRegistered()) {
|
||||
@ -387,47 +390,25 @@ int ViEBaseImpl::GetVersion(char version[1024]) {
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo, ViEId(shared_data_.instance_id()),
|
||||
"GetVersion(version=?)");
|
||||
assert(kViEVersionMaxMessageSize == 1024);
|
||||
|
||||
if (!version) {
|
||||
shared_data_.SetLastError(kViEBaseInvalidArgument);
|
||||
return -1;
|
||||
}
|
||||
|
||||
char version_buf[kViEVersionMaxMessageSize];
|
||||
char* version_ptr = version_buf;
|
||||
// Add WebRTC Version.
|
||||
std::stringstream version_stream;
|
||||
version_stream << "VideoEngine 3.8.0" << std::endl;
|
||||
|
||||
WebRtc_Word32 len = 0; // Does not include NULL termination.
|
||||
WebRtc_Word32 acc_len = 0;
|
||||
// Add build info.
|
||||
version_stream << "Build: svn:" << WEBRTC_SVNREVISION << " " << BUILDINFO
|
||||
<< std::endl;
|
||||
|
||||
len = AddViEVersion(version_ptr);
|
||||
if (len == -1) {
|
||||
shared_data_.SetLastError(kViEBaseUnknownError);
|
||||
return -1;
|
||||
}
|
||||
version_ptr += len;
|
||||
acc_len += len;
|
||||
assert(acc_len < kViEVersionMaxMessageSize);
|
||||
|
||||
len = AddBuildInfo(version_ptr);
|
||||
if (len == -1) {
|
||||
shared_data_.SetLastError(kViEBaseUnknownError);
|
||||
return -1;
|
||||
}
|
||||
version_ptr += len;
|
||||
acc_len += len;
|
||||
assert(acc_len < kViEVersionMaxMessageSize);
|
||||
|
||||
len = AddExternalTransportBuild(version_ptr);
|
||||
if (len == -1) {
|
||||
shared_data_.SetLastError(kViEBaseUnknownError);
|
||||
return -1;
|
||||
}
|
||||
version_ptr += len;
|
||||
acc_len += len;
|
||||
assert(acc_len < kViEVersionMaxMessageSize);
|
||||
|
||||
memcpy(version, version_buf, acc_len);
|
||||
version[acc_len] = '\0';
|
||||
#ifdef WEBRTC_EXTERNAL_TRANSPORT
|
||||
version_stream << "External transport build" << std::endl;
|
||||
#endif
|
||||
int version_length = version_stream.tellp();
|
||||
assert(version_length < 1024);
|
||||
memcpy(version, version_stream.str().c_str(), version_length);
|
||||
|
||||
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo,
|
||||
ViEId(shared_data_.instance_id()), "GetVersion() => %s",
|
||||
@ -439,24 +420,8 @@ int ViEBaseImpl::LastError() {
|
||||
return shared_data_.LastErrorInternal();
|
||||
}
|
||||
|
||||
WebRtc_Word32 ViEBaseImpl::AddBuildInfo(char* str) const {
|
||||
return sprintf(str, "Build: svn:%s %s\n", WEBRTC_SVNREVISION, BUILDINFO);
|
||||
}
|
||||
|
||||
WebRtc_Word32 ViEBaseImpl::AddViEVersion(char* str) const {
|
||||
return sprintf(str, "VideoEngine 3.8.0\n");
|
||||
}
|
||||
|
||||
WebRtc_Word32 ViEBaseImpl::AddExternalTransportBuild(char* str) const {
|
||||
#ifdef WEBRTC_EXTERNAL_TRANSPORT
|
||||
return sprintf(str, "External transport build\n");
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int ViEBaseImpl::CreateChannel(int& video_channel, int original_channel,
|
||||
bool sender) {
|
||||
int ViEBaseImpl::CreateChannel(int& video_channel, // NOLINT
|
||||
int original_channel, bool sender) {
|
||||
if (!(shared_data_.Initialized())) {
|
||||
shared_data_.SetLastError(kViENotInitialized);
|
||||
WEBRTC_TRACE(kTraceError, kTraceVideo, ViEId(shared_data_.instance_id()),
|
||||
|
@ -8,13 +8,13 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_ // NOLINT
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_ // NOLINT
|
||||
|
||||
#include "vie_base.h"
|
||||
#include "vie_defines.h"
|
||||
#include "vie_ref_count.h"
|
||||
#include "vie_shared_data.h"
|
||||
#include "video_engine/include/vie_base.h"
|
||||
#include "video_engine/vie_defines.h"
|
||||
#include "video_engine/vie_ref_count.h"
|
||||
#include "video_engine/vie_shared_data.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -30,9 +30,11 @@ class ViEBaseImpl
|
||||
// Implements ViEBase.
|
||||
virtual int Init();
|
||||
virtual int SetVoiceEngine(VoiceEngine* voice_engine);
|
||||
virtual int CreateChannel(int& video_channel);
|
||||
virtual int CreateChannel(int& video_channel, int original_channel);
|
||||
virtual int CreateReceiveChannel(int& video_channel, int original_channel);
|
||||
virtual int CreateChannel(int& video_channel); // NOLINT
|
||||
virtual int CreateChannel(int& video_channel, // NOLINT
|
||||
int original_channel);
|
||||
virtual int CreateReceiveChannel(int& video_channel, // NOLINT
|
||||
int original_channel);
|
||||
virtual int DeleteChannel(const int video_channel);
|
||||
virtual int ConnectAudioChannel(const int video_channel,
|
||||
const int audio_channel);
|
||||
@ -41,7 +43,7 @@ class ViEBaseImpl
|
||||
virtual int StopSend(const int video_channel);
|
||||
virtual int StartReceive(const int video_channel);
|
||||
virtual int StopReceive(const int video_channel);
|
||||
virtual int RegisterObserver(ViEBaseObserver& observer);
|
||||
virtual int RegisterObserver(ViEBaseObserver& observer); // NOLINT
|
||||
virtual int DeregisterObserver();
|
||||
virtual int GetVersion(char version[1024]);
|
||||
virtual int LastError();
|
||||
@ -58,7 +60,8 @@ class ViEBaseImpl
|
||||
WebRtc_Word32 AddBuildInfo(char* str) const;
|
||||
WebRtc_Word32 AddExternalTransportBuild(char* str) const;
|
||||
|
||||
int CreateChannel(int& video_channel, int original_channel, bool sender);
|
||||
int CreateChannel(int& video_channel, int original_channel, // NOLINT
|
||||
bool sender);
|
||||
|
||||
// ViEBaseImpl owns ViESharedData used by all interface implementations.
|
||||
ViESharedData shared_data_;
|
||||
@ -66,4 +69,4 @@ class ViEBaseImpl
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_ // NOLINT
|
||||
|
@ -149,8 +149,8 @@ int ViECaptureImpl::AllocateExternalCaptureDevice(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ViECaptureImpl::AllocateCaptureDevice(VideoCaptureModule& capture_module,
|
||||
int& capture_id) {
|
||||
int ViECaptureImpl::AllocateCaptureDevice(
|
||||
VideoCaptureModule& capture_module, int& capture_id) { // NOLINT
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo, ViEId(shared_data_->instance_id()),
|
||||
"%s", __FUNCTION__);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
@ -8,10 +8,10 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_CAPTURE_IMPL_H_
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_CAPTURE_IMPL_H_
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_CAPTURE_IMPL_H_ // NOLINT
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_CAPTURE_IMPL_H_ // NOLINT
|
||||
|
||||
#include "typedefs.h"
|
||||
#include "typedefs.h" // NOLINT
|
||||
#include "video_engine/include/vie_capture.h"
|
||||
#include "video_engine/vie_defines.h"
|
||||
#include "video_engine/vie_ref_count.h"
|
||||
@ -34,8 +34,8 @@ class ViECaptureImpl
|
||||
virtual int AllocateCaptureDevice(const char* unique_idUTF8,
|
||||
const unsigned int unique_idUTF8Length,
|
||||
int& capture_id);
|
||||
virtual int AllocateCaptureDevice(VideoCaptureModule& capture_module,
|
||||
int& capture_id);
|
||||
virtual int AllocateCaptureDevice(
|
||||
VideoCaptureModule& capture_module, int& capture_id); // NOLINT
|
||||
virtual int AllocateExternalCaptureDevice(
|
||||
int& capture_id, ViEExternalCapture *&external_capture);
|
||||
virtual int ReleaseCaptureDevice(const int capture_id);
|
||||
@ -69,7 +69,7 @@ class ViECaptureImpl
|
||||
virtual int DeregisterObserver(const int capture_id);
|
||||
|
||||
protected:
|
||||
ViECaptureImpl(ViESharedData* shared_data);
|
||||
explicit ViECaptureImpl(ViESharedData* shared_data);
|
||||
virtual ~ViECaptureImpl();
|
||||
|
||||
private:
|
||||
@ -78,4 +78,4 @@ class ViECaptureImpl
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_CAPTURE_IMPL_H_
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_CAPTURE_IMPL_H_ // NOLINT
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "video_engine/vie_codec_impl.h"
|
||||
|
||||
#include "engine_configurations.h"
|
||||
#include "engine_configurations.h" // NOLINT
|
||||
#include "modules/video_coding/main/interface/video_coding.h"
|
||||
#include "system_wrappers/interface/trace.h"
|
||||
#include "video_engine/include/vie_errors.h"
|
||||
@ -83,12 +83,12 @@ int ViECodecImpl::GetCodec(const unsigned char list_number,
|
||||
list_number, video_codec.codecType);
|
||||
if (list_number == VideoCodingModule::NumberOfCodecs()) {
|
||||
memset(&video_codec, 0, sizeof(VideoCodec));
|
||||
strcpy(video_codec.plName, "red");
|
||||
strncpy(video_codec.plName, "red", 3);
|
||||
video_codec.codecType = kVideoCodecRED;
|
||||
video_codec.plType = VCM_RED_PAYLOAD_TYPE;
|
||||
} else if (list_number == VideoCodingModule::NumberOfCodecs() + 1) {
|
||||
memset(&video_codec, 0, sizeof(VideoCodec));
|
||||
strcpy(video_codec.plName, "ulpfec");
|
||||
strncpy(video_codec.plName, "ulpfec", 6);
|
||||
video_codec.codecType = kVideoCodecULPFEC;
|
||||
video_codec.plType = VCM_ULPFEC_PAYLOAD_TYPE;
|
||||
} else if (VideoCodingModule::Codec(list_number, &video_codec) != VCM_OK) {
|
||||
@ -104,7 +104,7 @@ int ViECodecImpl::GetCodec(const unsigned char list_number,
|
||||
int ViECodecImpl::SetSendCodec(const int video_channel,
|
||||
const VideoCodec& video_codec) {
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(),video_channel),
|
||||
ViEId(shared_data_->instance_id(), video_channel),
|
||||
"%s(video_channel: %d, codec_type: %d)", __FUNCTION__,
|
||||
video_channel, video_codec.codecType);
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceVideo,
|
||||
|
@ -8,10 +8,10 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_CODEC_IMPL_H_
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_CODEC_IMPL_H_
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_CODEC_IMPL_H_ // NOLINT
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_CODEC_IMPL_H_ // NOLINT
|
||||
|
||||
#include "typedefs.h"
|
||||
#include "typedefs.h" // NOLINT
|
||||
#include "video_engine/include/vie_codec.h"
|
||||
#include "video_engine/vie_defines.h"
|
||||
#include "video_engine/vie_ref_count.h"
|
||||
@ -67,7 +67,7 @@ class ViECodecImpl
|
||||
virtual int WaitForFirstKeyFrame(const int video_channel, const bool wait);
|
||||
|
||||
protected:
|
||||
ViECodecImpl(ViESharedData* shared_data);
|
||||
explicit ViECodecImpl(ViESharedData* shared_data);
|
||||
virtual ~ViECodecImpl();
|
||||
|
||||
private:
|
||||
@ -78,4 +78,4 @@ class ViECodecImpl
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_CODEC_IMPL_H_
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_CODEC_IMPL_H_ // NOLINT
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
@ -8,10 +8,10 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_ENCRYPTION_IMPL_H_
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_ENCRYPTION_IMPL_H_
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_ENCRYPTION_IMPL_H_ // NOLINT
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_ENCRYPTION_IMPL_H_ // NOLINT
|
||||
|
||||
#include "typedefs.h"
|
||||
#include "typedefs.h" // NOLINT
|
||||
#include "video_engine/include/vie_encryption.h"
|
||||
#include "video_engine/vie_ref_count.h"
|
||||
|
||||
@ -31,7 +31,7 @@ class ViEEncryptionImpl
|
||||
virtual int DeregisterExternalEncryption(const int video_channel);
|
||||
|
||||
protected:
|
||||
ViEEncryptionImpl(ViESharedData* shared_data);
|
||||
explicit ViEEncryptionImpl(ViESharedData* shared_data);
|
||||
virtual ~ViEEncryptionImpl();
|
||||
|
||||
private:
|
||||
@ -40,4 +40,4 @@ class ViEEncryptionImpl
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_ENCRYPTION_IMPL_H_
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_ENCRYPTION_IMPL_H_ // NOLINT
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "video_engine/vie_external_codec_impl.h"
|
||||
|
||||
#include "engine_configurations.h"
|
||||
#include "engine_configurations.h" // NOLINT
|
||||
#include "system_wrappers/interface/trace.h"
|
||||
#include "video_engine/include/vie_errors.h"
|
||||
#include "video_engine/vie_channel.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
@ -8,8 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_EXTERNAL_CODEC_IMPL_H_
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_EXTERNAL_CODEC_IMPL_H_
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_EXTERNAL_CODEC_IMPL_H_ // NOLINT
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_EXTERNAL_CODEC_IMPL_H_ // NOLINT
|
||||
|
||||
#include "video_engine/include/vie_external_codec.h"
|
||||
#include "video_engine/vie_ref_count.h"
|
||||
@ -38,7 +38,7 @@ class ViEExternalCodecImpl
|
||||
const unsigned char pl_type);
|
||||
|
||||
protected:
|
||||
ViEExternalCodecImpl(ViESharedData* shared_data);
|
||||
explicit ViEExternalCodecImpl(ViESharedData* shared_data);
|
||||
virtual ~ViEExternalCodecImpl();
|
||||
|
||||
private:
|
||||
@ -47,4 +47,4 @@ class ViEExternalCodecImpl
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_EXTERNAL_CODEC_IMPL_H_
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_EXTERNAL_CODEC_IMPL_H_ // NOLINT
|
||||
|
@ -8,10 +8,10 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "engine_configurations.h"
|
||||
|
||||
#include "video_engine/vie_file_impl.h"
|
||||
|
||||
#include "engine_configurations.h" // NOLINT
|
||||
|
||||
#ifdef WEBRTC_VIDEO_ENGINE_FILE_API
|
||||
#include "common_video/jpeg/include/jpeg.h"
|
||||
#include "system_wrappers/interface/condition_variable_wrapper.h"
|
||||
@ -122,7 +122,8 @@ int ViEFileImpl::StopPlayFile(const int file_id) {
|
||||
return shared_data_->input_manager()->DestroyFilePlayer(file_id);
|
||||
}
|
||||
|
||||
int ViEFileImpl::RegisterObserver(int file_id, ViEFileObserver& observer) {
|
||||
int ViEFileImpl::RegisterObserver(int file_id,
|
||||
ViEFileObserver& observer) { // NOLINT
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo, ViEId(shared_data_->instance_id()),
|
||||
"%s(file_id: %d)", __FUNCTION__, file_id);
|
||||
|
||||
@ -152,7 +153,8 @@ int ViEFileImpl::RegisterObserver(int file_id, ViEFileObserver& observer) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ViEFileImpl::DeregisterObserver(int file_id, ViEFileObserver& observer) {
|
||||
int ViEFileImpl::DeregisterObserver(int file_id,
|
||||
ViEFileObserver& observer) { // NOLINT
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo, ViEId(shared_data_->instance_id()),
|
||||
"%s(file_id: %d)", __FUNCTION__, file_id);
|
||||
|
||||
@ -629,7 +631,7 @@ int ViEFileImpl::GetCaptureDeviceSnapshot(const int capture_id,
|
||||
}
|
||||
|
||||
VideoFrame video_frame;
|
||||
if (GetNextCapturedFrame(capture_id, video_frame) == -1) {
|
||||
if (GetNextCapturedFrame(capture_id, &video_frame) == -1) {
|
||||
WEBRTC_TRACE(kTraceError, kTraceVideo, shared_data_->instance_id(),
|
||||
"Could not gain acces to capture device %d video frame "
|
||||
"%s:%d", capture_id, __FUNCTION__);
|
||||
@ -678,7 +680,7 @@ int ViEFileImpl::GetCaptureDeviceSnapshot(const int capture_id,
|
||||
if (!capturer) {
|
||||
return -1;
|
||||
}
|
||||
if (GetNextCapturedFrame(capture_id, video_frame) == -1) {
|
||||
if (GetNextCapturedFrame(capture_id, &video_frame) == -1) {
|
||||
WEBRTC_TRACE(kTraceError, kTraceVideo, shared_data_->instance_id(),
|
||||
"Could not gain acces to capture device %d video frame "
|
||||
"%s:%d", capture_id, __FUNCTION__);
|
||||
@ -698,7 +700,7 @@ int ViEFileImpl::GetCaptureDeviceSnapshot(const int capture_id,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ViEFileImpl::FreePicture(ViEPicture& picture) {
|
||||
int ViEFileImpl::FreePicture(ViEPicture& picture) { // NOLINT
|
||||
if (picture.data) {
|
||||
free(picture.data);
|
||||
}
|
||||
@ -762,7 +764,8 @@ const ViEPicture& picture) {
|
||||
|
||||
VideoFrame capture_image;
|
||||
if (ViEFileImage::ConvertPictureToVideoFrame(
|
||||
ViEId(shared_data_->instance_id(), capture_id), picture, capture_image) != 0) {
|
||||
ViEId(shared_data_->instance_id(), capture_id), picture,
|
||||
capture_image) != 0) {
|
||||
WEBRTC_TRACE(kTraceError, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(), capture_id),
|
||||
"%s(capture_id: %d) Failed to use picture.", __FUNCTION__,
|
||||
@ -792,7 +795,8 @@ const char* file_nameUTF8) {
|
||||
|
||||
VideoFrame start_image;
|
||||
if (ViEFileImage::ConvertJPEGToVideoFrame(
|
||||
ViEId(shared_data_->instance_id(), video_channel), file_nameUTF8, start_image) != 0) {
|
||||
ViEId(shared_data_->instance_id(), video_channel), file_nameUTF8,
|
||||
start_image) != 0) {
|
||||
WEBRTC_TRACE(kTraceError, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(), video_channel),
|
||||
"%s(video_channel: %d) Failed to open file.", __FUNCTION__,
|
||||
@ -830,7 +834,8 @@ int ViEFileImpl::SetRenderStartImage(const int video_channel,
|
||||
|
||||
VideoFrame start_image;
|
||||
if (ViEFileImage::ConvertPictureToVideoFrame(
|
||||
ViEId(shared_data_->instance_id(), video_channel), picture, start_image) != 0) {
|
||||
ViEId(shared_data_->instance_id(), video_channel), picture,
|
||||
start_image) != 0) {
|
||||
WEBRTC_TRACE(kTraceError, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(), video_channel),
|
||||
"%s(video_channel: %d) Failed to use picture.",
|
||||
@ -946,7 +951,7 @@ const unsigned int timeout_ms) {
|
||||
}
|
||||
|
||||
WebRtc_Word32 ViEFileImpl::GetNextCapturedFrame(WebRtc_Word32 capture_id,
|
||||
VideoFrame& video_frame) {
|
||||
VideoFrame* video_frame) {
|
||||
ViEInputManagerScoped is(*(shared_data_->input_manager()));
|
||||
ViECapturer* capturer = is.Capture(capture_id);
|
||||
if (!capturer) {
|
||||
@ -955,8 +960,8 @@ VideoFrame& video_frame) {
|
||||
|
||||
ViECaptureSnapshot* snap_shot = new ViECaptureSnapshot();
|
||||
capturer->RegisterFrameCallback(-1, snap_shot);
|
||||
bool snapshot_taken = snap_shot->GetSnapshot(
|
||||
video_frame, kViECaptureMaxSnapshotWaitTimeMs);
|
||||
bool snapshot_taken = snap_shot->GetSnapshot(kViECaptureMaxSnapshotWaitTimeMs,
|
||||
video_frame);
|
||||
|
||||
// Check once again if it has been destroyed.
|
||||
capturer->DeregisterFrameCallback(snap_shot);
|
||||
@ -982,13 +987,13 @@ ViECaptureSnapshot::~ViECaptureSnapshot() {
|
||||
}
|
||||
}
|
||||
|
||||
bool ViECaptureSnapshot::GetSnapshot(VideoFrame& video_frame,
|
||||
unsigned int max_wait_time) {
|
||||
bool ViECaptureSnapshot::GetSnapshot(unsigned int max_wait_time,
|
||||
VideoFrame* video_frame) {
|
||||
crit_->Enter();
|
||||
video_frame_ = new VideoFrame();
|
||||
if (condition_varaible_->SleepCS(*(crit_.get()), max_wait_time)) {
|
||||
// Snapshot taken.
|
||||
video_frame.SwapFrame(*video_frame_);
|
||||
video_frame->SwapFrame(*video_frame_);
|
||||
delete video_frame_;
|
||||
video_frame_ = NULL;
|
||||
crit_->Leave();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
@ -8,11 +8,11 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_FILE_IMPL_H_
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_FILE_IMPL_H_
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_FILE_IMPL_H_ // NOLINT
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_FILE_IMPL_H_ // NOLINT
|
||||
|
||||
#include "system_wrappers/interface/scoped_ptr.h"
|
||||
#include "typedefs.h"
|
||||
#include "typedefs.h" // NOLINT
|
||||
#include "video_engine/include/vie_file.h"
|
||||
#include "video_engine/vie_defines.h"
|
||||
#include "video_engine/vie_frame_provider_base.h"
|
||||
@ -30,7 +30,7 @@ class ViECaptureSnapshot : public ViEFrameCallback {
|
||||
ViECaptureSnapshot();
|
||||
~ViECaptureSnapshot();
|
||||
|
||||
bool GetSnapshot(VideoFrame& video_frame, unsigned int max_wait_time);
|
||||
bool GetSnapshot(unsigned int max_wait_time, VideoFrame* video_frame);
|
||||
|
||||
// Implements ViEFrameCallback.
|
||||
virtual void DeliverFrame(int id, VideoFrame& video_frame, int num_csrcs = 0,
|
||||
@ -54,12 +54,14 @@ class ViEFileImpl
|
||||
public:
|
||||
// Implements ViEFile.
|
||||
virtual int Release();
|
||||
virtual int StartPlayFile(const char* file_nameUTF8, int& file_id,
|
||||
virtual int StartPlayFile(const char* file_nameUTF8, int& file_id, // NOLINT
|
||||
const bool loop = false,
|
||||
const FileFormats file_format = kFileFormatAviFile);
|
||||
virtual int StopPlayFile(const int file_id);
|
||||
virtual int RegisterObserver(int file_id, ViEFileObserver& observer);
|
||||
virtual int DeregisterObserver(int file_id, ViEFileObserver& observer);
|
||||
virtual int RegisterObserver(int file_id,
|
||||
ViEFileObserver& observer); // NOLINT
|
||||
virtual int DeregisterObserver(int file_id,
|
||||
ViEFileObserver& observer); // NOLINT
|
||||
virtual int SendFileOnChannel(const int file_id, const int video_channel);
|
||||
virtual int StopSendFileOnChannel(const int video_channel);
|
||||
virtual int StartPlayFileAsMicrophone(const int file_id,
|
||||
@ -94,8 +96,9 @@ class ViEFileImpl
|
||||
const FileFormats file_format = kFileFormatAviFile);
|
||||
virtual int GetRenderSnapshot(const int video_channel,
|
||||
const char* file_nameUTF8);
|
||||
virtual int GetRenderSnapshot(const int video_channel, ViEPicture& picture);
|
||||
virtual int FreePicture(ViEPicture& picture);
|
||||
virtual int GetRenderSnapshot(const int video_channel,
|
||||
ViEPicture& picture); // NOLINT
|
||||
virtual int FreePicture(ViEPicture& picture); // NOLINT
|
||||
virtual int GetCaptureDeviceSnapshot(const int capture_id,
|
||||
const char* file_nameUTF8);
|
||||
virtual int GetCaptureDeviceSnapshot(const int capture_id,
|
||||
@ -116,16 +119,16 @@ class ViEFileImpl
|
||||
const unsigned int timeout_ms);
|
||||
|
||||
protected:
|
||||
ViEFileImpl(ViESharedData* shared_data);
|
||||
explicit ViEFileImpl(ViESharedData* shared_data);
|
||||
virtual ~ViEFileImpl();
|
||||
|
||||
private:
|
||||
WebRtc_Word32 GetNextCapturedFrame(WebRtc_Word32 capture_id,
|
||||
VideoFrame& video_frame);
|
||||
VideoFrame* video_frame);
|
||||
|
||||
ViESharedData* shared_data_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_FILE_IMPL_H_
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_FILE_IMPL_H_ // NOLINT
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
@ -8,10 +8,10 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_IMAGE_PROCESS_IMPL_H_
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_IMAGE_PROCESS_IMPL_H_
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_IMAGE_PROCESS_IMPL_H_ // NOLINT
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_IMAGE_PROCESS_IMPL_H_ // NOLINT
|
||||
|
||||
#include "typedefs.h"
|
||||
#include "typedefs.h" // NOLINT
|
||||
#include "video_engine/include/vie_image_process.h"
|
||||
#include "video_engine/vie_ref_count.h"
|
||||
|
||||
@ -40,7 +40,7 @@ class ViEImageProcessImpl
|
||||
const bool enable);
|
||||
|
||||
protected:
|
||||
ViEImageProcessImpl(ViESharedData* shared_data);
|
||||
explicit ViEImageProcessImpl(ViESharedData* shared_data);
|
||||
virtual ~ViEImageProcessImpl();
|
||||
|
||||
private:
|
||||
@ -49,4 +49,4 @@ class ViEImageProcessImpl
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_IMAGE_PROCESS_IMPL_H_
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_IMAGE_PROCESS_IMPL_H_ // NOLINT
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <qos.h>
|
||||
#endif
|
||||
|
||||
#include "engine_configurations.h"
|
||||
#include "engine_configurations.h" // NOLINT
|
||||
#include "system_wrappers/interface/trace.h"
|
||||
#include "video_engine/include/vie_errors.h"
|
||||
#include "video_engine/vie_channel.h"
|
||||
@ -72,8 +72,8 @@ ViENetworkImpl::~ViENetworkImpl() {
|
||||
}
|
||||
|
||||
int ViENetworkImpl::SetLocalReceiver(const int video_channel,
|
||||
const unsigned short rtp_port,
|
||||
const unsigned short rtcp_port,
|
||||
const uint16_t rtp_port,
|
||||
const uint16_t rtcp_port,
|
||||
const char* ip_address) {
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(), video_channel),
|
||||
@ -110,8 +110,8 @@ int ViENetworkImpl::SetLocalReceiver(const int video_channel,
|
||||
}
|
||||
|
||||
int ViENetworkImpl::GetLocalReceiver(const int video_channel,
|
||||
unsigned short& rtp_port,
|
||||
unsigned short& rtcp_port,
|
||||
uint16_t& rtp_port,
|
||||
uint16_t& rtcp_port,
|
||||
char* ip_address) {
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(), video_channel),
|
||||
@ -135,10 +135,10 @@ int ViENetworkImpl::GetLocalReceiver(const int video_channel,
|
||||
|
||||
int ViENetworkImpl::SetSendDestination(const int video_channel,
|
||||
const char* ip_address,
|
||||
const unsigned short rtp_port,
|
||||
const unsigned short rtcp_port,
|
||||
const unsigned short source_rtp_port,
|
||||
const unsigned short source_rtcp_port) {
|
||||
const uint16_t rtp_port,
|
||||
const uint16_t rtcp_port,
|
||||
const uint16_t source_rtp_port,
|
||||
const uint16_t source_rtcp_port) {
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(), video_channel),
|
||||
"%s(channel: %d, ip_address: %s, rtp_port: %u, rtcp_port: %u, "
|
||||
@ -180,10 +180,10 @@ int ViENetworkImpl::SetSendDestination(const int video_channel,
|
||||
|
||||
int ViENetworkImpl::GetSendDestination(const int video_channel,
|
||||
char* ip_address,
|
||||
unsigned short& rtp_port,
|
||||
unsigned short& rtcp_port,
|
||||
unsigned short& source_rtp_port,
|
||||
unsigned short& source_rtcp_port) {
|
||||
uint16_t& rtp_port,
|
||||
uint16_t& rtcp_port,
|
||||
uint16_t& source_rtp_port,
|
||||
uint16_t& source_rtcp_port) {
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(), video_channel),
|
||||
"%s(channel: %d)", __FUNCTION__, video_channel);
|
||||
@ -319,8 +319,8 @@ int ViENetworkImpl::ReceivedRTCPPacket(const int video_channel,
|
||||
}
|
||||
|
||||
int ViENetworkImpl::GetSourceInfo(const int video_channel,
|
||||
unsigned short& rtp_port,
|
||||
unsigned short& rtcp_port, char* ip_address,
|
||||
uint16_t& rtp_port,
|
||||
uint16_t& rtcp_port, char* ip_address,
|
||||
unsigned int ip_address_length) {
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(), video_channel),
|
||||
@ -384,7 +384,8 @@ int ViENetworkImpl::GetLocalIP(char ip_address[64], bool ipv6) {
|
||||
return -1;
|
||||
}
|
||||
// Convert 128-bit address to character string (a:b:c:d:e:f:g:h).
|
||||
sprintf(local_ip_address,
|
||||
// TODO(mflodman) Change sprintf.
|
||||
sprintf(local_ip_address, // NOLINT
|
||||
"%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:"
|
||||
"%.2x%.2x",
|
||||
local_ip[0], local_ip[1], local_ip[2], local_ip[3], local_ip[4],
|
||||
@ -401,13 +402,14 @@ int ViENetworkImpl::GetLocalIP(char ip_address[64], bool ipv6) {
|
||||
return -1;
|
||||
}
|
||||
// Convert 32-bit address to character string (x.y.z.w).
|
||||
sprintf(local_ip_address, "%d.%d.%d.%d",
|
||||
// TODO(mflodman) Change sprintf.
|
||||
sprintf(local_ip_address, "%d.%d.%d.%d", // NOLINT
|
||||
static_cast<int>((local_ip >> 24) & 0x0ff),
|
||||
static_cast<int>((local_ip >> 16) & 0x0ff),
|
||||
static_cast<int>((local_ip >> 8) & 0x0ff),
|
||||
static_cast<int>(local_ip & 0x0ff));
|
||||
}
|
||||
strcpy(ip_address, local_ip_address);
|
||||
strncpy(ip_address, local_ip_address, sizeof(local_ip_address));
|
||||
UdpTransport::Destroy(socket_transport);
|
||||
WEBRTC_TRACE(kTraceStateInfo, kTraceVideo, ViEId(shared_data_->instance_id()),
|
||||
"%s: local ip = %s", __FUNCTION__, local_ip_address);
|
||||
@ -457,8 +459,8 @@ bool ViENetworkImpl::IsIPv6Enabled(int video_channel) {
|
||||
}
|
||||
|
||||
int ViENetworkImpl::SetSourceFilter(const int video_channel,
|
||||
const unsigned short rtp_port,
|
||||
const unsigned short rtcp_port,
|
||||
const uint16_t rtp_port,
|
||||
const uint16_t rtcp_port,
|
||||
const char* ip_address) {
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(), video_channel),
|
||||
@ -481,8 +483,8 @@ int ViENetworkImpl::SetSourceFilter(const int video_channel,
|
||||
}
|
||||
|
||||
int ViENetworkImpl::GetSourceFilter(const int video_channel,
|
||||
unsigned short& rtp_port,
|
||||
unsigned short& rtcp_port,
|
||||
uint16_t& rtp_port,
|
||||
uint16_t& rtcp_port,
|
||||
char* ip_address) {
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(), video_channel),
|
||||
@ -534,8 +536,9 @@ int ViENetworkImpl::SetSendToS(const int video_channel, const int DSCP,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ViENetworkImpl::GetSendToS(const int video_channel, int& DSCP,
|
||||
bool& use_set_sockOpt) {
|
||||
int ViENetworkImpl::GetSendToS(const int video_channel,
|
||||
int& DSCP, // NOLINT
|
||||
bool& use_set_sockOpt) { // NOLINT
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(), video_channel),
|
||||
"%s(channel: %d)", __FUNCTION__, video_channel);
|
||||
@ -626,8 +629,10 @@ int ViENetworkImpl::SetSendGQoS(const int video_channel, const bool enable,
|
||||
#endif
|
||||
}
|
||||
|
||||
int ViENetworkImpl::GetSendGQoS(const int video_channel, bool& enabled,
|
||||
int& service_type, int& overrideDSCP) {
|
||||
int ViENetworkImpl::GetSendGQoS(const int video_channel,
|
||||
bool& enabled, // NOLINT
|
||||
int& service_type, // NOLINT
|
||||
int& overrideDSCP) { // NOLINT
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(), video_channel),
|
||||
"%s(channel: %d)", __FUNCTION__, video_channel);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
@ -8,10 +8,10 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_NETWORK_IMPL_H_
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_NETWORK_IMPL_H_
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_NETWORK_IMPL_H_ // NOLINT
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_NETWORK_IMPL_H_ // NOLINT
|
||||
|
||||
#include "typedefs.h"
|
||||
#include "typedefs.h" // NOLINT
|
||||
#include "video_engine/include/vie_network.h"
|
||||
#include "video_engine/vie_ref_count.h"
|
||||
|
||||
@ -26,25 +26,25 @@ class ViENetworkImpl
|
||||
// Implements ViENetwork.
|
||||
virtual int Release();
|
||||
virtual int SetLocalReceiver(const int video_channel,
|
||||
const unsigned short rtp_port,
|
||||
const unsigned short rtcp_port,
|
||||
const uint16_t rtp_port,
|
||||
const uint16_t rtcp_port,
|
||||
const char* ip_address);
|
||||
virtual int GetLocalReceiver(const int video_channel,
|
||||
unsigned short& rtp_port,
|
||||
unsigned short& rtcp_port,
|
||||
uint16_t& rtp_port,
|
||||
uint16_t& rtcp_port,
|
||||
char* ip_address);
|
||||
virtual int SetSendDestination(const int video_channel,
|
||||
const char* ip_address,
|
||||
const unsigned short rtp_port,
|
||||
const unsigned short rtcp_port,
|
||||
const unsigned short source_rtp_port,
|
||||
const unsigned short source_rtcp_port);
|
||||
const uint16_t rtp_port,
|
||||
const uint16_t rtcp_port,
|
||||
const uint16_t source_rtp_port,
|
||||
const uint16_t source_rtcp_port);
|
||||
virtual int GetSendDestination(const int video_channel,
|
||||
char* ip_address,
|
||||
unsigned short& rtp_port,
|
||||
unsigned short& rtcp_port,
|
||||
unsigned short& source_rtp_port,
|
||||
unsigned short& source_rtcp_port);
|
||||
uint16_t& rtp_port,
|
||||
uint16_t& rtcp_port,
|
||||
uint16_t& source_rtp_port,
|
||||
uint16_t& source_rtcp_port);
|
||||
virtual int RegisterSendTransport(const int video_channel,
|
||||
Transport& transport);
|
||||
virtual int DeregisterSendTransport(const int video_channel);
|
||||
@ -55,20 +55,20 @@ class ViENetworkImpl
|
||||
const void* data,
|
||||
const int length);
|
||||
virtual int GetSourceInfo(const int video_channel,
|
||||
unsigned short& rtp_port,
|
||||
unsigned short& rtcp_port,
|
||||
uint16_t& rtp_port,
|
||||
uint16_t& rtcp_port,
|
||||
char* ip_address,
|
||||
unsigned int ip_address_length);
|
||||
virtual int GetLocalIP(char ip_address[64], bool ipv6);
|
||||
virtual int EnableIPv6(int video_channel);
|
||||
virtual bool IsIPv6Enabled(int video_channel);
|
||||
virtual int SetSourceFilter(const int video_channel,
|
||||
const unsigned short rtp_port,
|
||||
const unsigned short rtcp_port,
|
||||
const uint16_t rtp_port,
|
||||
const uint16_t rtcp_port,
|
||||
const char* ip_address);
|
||||
virtual int GetSourceFilter(const int video_channel,
|
||||
unsigned short& rtp_port,
|
||||
unsigned short& rtcp_port,
|
||||
uint16_t& rtp_port,
|
||||
uint16_t& rtcp_port,
|
||||
char* ip_address);
|
||||
virtual int SetSendToS(const int video_channel,
|
||||
const int DSCP,
|
||||
@ -102,7 +102,7 @@ class ViENetworkImpl
|
||||
bool use_rtcp_socket);
|
||||
|
||||
protected:
|
||||
ViENetworkImpl(ViESharedData* shared_data);
|
||||
explicit ViENetworkImpl(ViESharedData* shared_data);
|
||||
virtual ~ViENetworkImpl();
|
||||
|
||||
private:
|
||||
@ -111,4 +111,4 @@ class ViENetworkImpl
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_NETWORK_IMPL_H_
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_NETWORK_IMPL_H_ // NOLINT
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include "video_engine/vie_render_impl.h"
|
||||
|
||||
#include "engine_configurations.h"
|
||||
#include "engine_configurations.h" // NOLINT
|
||||
#include "modules/video_render/main/interface/video_render.h"
|
||||
#include "modules/video_render/main/interface/video_render_defines.h"
|
||||
#include "system_wrappers/interface/trace.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
@ -8,11 +8,11 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_RENDER_IMPL_H_
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_RENDER_IMPL_H_
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_RENDER_IMPL_H_ // NOLINT
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_RENDER_IMPL_H_ // NOLINT
|
||||
|
||||
#include "modules/video_render/main/interface/video_render_defines.h"
|
||||
#include "typedefs.h"
|
||||
#include "typedefs.h" // NOLINT
|
||||
#include "video_engine/include/vie_render.h"
|
||||
#include "video_engine/vie_ref_count.h"
|
||||
|
||||
@ -26,8 +26,9 @@ class ViERenderImpl
|
||||
public:
|
||||
// Implements ViERender
|
||||
virtual int Release();
|
||||
virtual int RegisterVideoRenderModule(VideoRender& render_module);
|
||||
virtual int DeRegisterVideoRenderModule(VideoRender& render_module);
|
||||
virtual int RegisterVideoRenderModule(VideoRender& render_module); // NOLINT
|
||||
virtual int DeRegisterVideoRenderModule(
|
||||
VideoRender& render_module); // NOLINT
|
||||
virtual int AddRenderer(const int render_id, void* window,
|
||||
const unsigned int z_order, const float left,
|
||||
const float top, const float right,
|
||||
@ -45,7 +46,7 @@ class ViERenderImpl
|
||||
ExternalRenderer* renderer);
|
||||
|
||||
protected:
|
||||
ViERenderImpl(ViESharedData* shared_data);
|
||||
explicit ViERenderImpl(ViESharedData* shared_data);
|
||||
virtual ~ViERenderImpl();
|
||||
|
||||
private:
|
||||
@ -54,4 +55,4 @@ class ViERenderImpl
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_RENDER_IMPL_H_
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_RENDER_IMPL_H_ // NOLINT
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "video_engine/vie_rtp_rtcp_impl.h"
|
||||
|
||||
#include "engine_configurations.h"
|
||||
#include "engine_configurations.h" // NOLINT
|
||||
#include "system_wrappers/interface/file_wrapper.h"
|
||||
#include "system_wrappers/interface/trace.h"
|
||||
#include "video_engine/include/vie_errors.h"
|
||||
@ -233,7 +233,7 @@ int ViERTP_RTCPImpl::GetRemoteCSRCs(const int video_channel,
|
||||
}
|
||||
|
||||
int ViERTP_RTCPImpl::SetStartSequenceNumber(const int video_channel,
|
||||
unsigned short sequence_number) {
|
||||
uint16_t sequence_number) {
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(), video_channel),
|
||||
"%s(channel: %d, sequence_number: %u)", __FUNCTION__,
|
||||
@ -390,7 +390,7 @@ int ViERTP_RTCPImpl::SendApplicationDefinedRTCPPacket(
|
||||
const unsigned char sub_type,
|
||||
unsigned int name,
|
||||
const char* data,
|
||||
unsigned short data_length_in_bytes) {
|
||||
uint16_t data_length_in_bytes) {
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVideo,
|
||||
ViEId(shared_data_->instance_id(), video_channel),
|
||||
"%s(channel: %d, sub_type: %c, name: %d, data: x, length: %u)",
|
||||
@ -614,7 +614,7 @@ int ViERTP_RTCPImpl::SetRembStatus(int video_channel, bool sender,
|
||||
}
|
||||
|
||||
int ViERTP_RTCPImpl::GetReceivedRTCPStatistics(const int video_channel,
|
||||
unsigned short& fraction_lost,
|
||||
uint16_t& fraction_lost,
|
||||
unsigned int& cumulative_lost,
|
||||
unsigned int& extended_max,
|
||||
unsigned int& jitter,
|
||||
@ -644,7 +644,7 @@ int ViERTP_RTCPImpl::GetReceivedRTCPStatistics(const int video_channel,
|
||||
}
|
||||
|
||||
int ViERTP_RTCPImpl::GetSentRTCPStatistics(const int video_channel,
|
||||
unsigned short& fraction_lost,
|
||||
uint16_t& fraction_lost,
|
||||
unsigned int& cumulative_lost,
|
||||
unsigned int& extended_max,
|
||||
unsigned int& jitter,
|
||||
|
@ -8,11 +8,11 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_RTP_RTCP_IMPL_H_
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_RTP_RTCP_IMPL_H_
|
||||
#ifndef WEBRTC_VIDEO_ENGINE_VIE_RTP_RTCP_IMPL_H_ // NOLINT
|
||||
#define WEBRTC_VIDEO_ENGINE_VIE_RTP_RTCP_IMPL_H_ // NOLINT
|
||||
|
||||
#include "modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
|
||||
#include "typedefs.h"
|
||||
#include "typedefs.h" // NOLINT
|
||||
#include "video_engine/include/vie_rtp_rtcp.h"
|
||||
#include "video_engine/vie_ref_count.h"
|
||||
|
||||
@ -30,15 +30,17 @@ class ViERTP_RTCPImpl
|
||||
const unsigned int SSRC,
|
||||
const StreamType usage,
|
||||
const unsigned char simulcast_idx);
|
||||
virtual int GetLocalSSRC(const int video_channel, unsigned int& SSRC) const;
|
||||
virtual int GetLocalSSRC(const int video_channel,
|
||||
unsigned int& SSRC) const; // NOLINT
|
||||
virtual int SetRemoteSSRCType(const int video_channel,
|
||||
const StreamType usage,
|
||||
const unsigned int SSRC) const;
|
||||
virtual int GetRemoteSSRC(const int video_channel, unsigned int& SSRC) const;
|
||||
virtual int GetRemoteSSRC(const int video_channel,
|
||||
unsigned int& SSRC) const; // NOLINT
|
||||
virtual int GetRemoteCSRCs(const int video_channel,
|
||||
unsigned int CSRCs[kRtpCsrcSize]) const;
|
||||
virtual int SetStartSequenceNumber(const int video_channel,
|
||||
unsigned short sequence_number);
|
||||
uint16_t sequence_number);
|
||||
virtual int SetRTCPStatus(const int video_channel,
|
||||
const ViERTCPMode rtcp_mode);
|
||||
virtual int GetRTCPStatus(const int video_channel,
|
||||
@ -54,7 +56,7 @@ class ViERTP_RTCPImpl
|
||||
const unsigned char sub_type,
|
||||
unsigned int name,
|
||||
const char* data,
|
||||
unsigned short data_length_in_bytes);
|
||||
uint16_t data_length_in_bytes);
|
||||
virtual int SetNACKStatus(const int video_channel, const bool enable);
|
||||
virtual int SetFECStatus(const int video_channel, const bool enable,
|
||||
const unsigned char payload_typeRED,
|
||||
@ -67,13 +69,13 @@ class ViERTP_RTCPImpl
|
||||
virtual int SetTMMBRStatus(const int video_channel, const bool enable);
|
||||
virtual int SetRembStatus(int video_channel, bool sender, bool receiver);
|
||||
virtual int GetReceivedRTCPStatistics(const int video_channel,
|
||||
unsigned short& fraction_lost,
|
||||
uint16_t& fraction_lost,
|
||||
unsigned int& cumulative_lost,
|
||||
unsigned int& extended_max,
|
||||
unsigned int& jitter,
|
||||
int& rtt_ms) const;
|
||||
virtual int GetSentRTCPStatistics(const int video_channel,
|
||||
unsigned short& fraction_lost,
|
||||
uint16_t& fraction_lost,
|
||||
unsigned int& cumulative_lost,
|
||||
unsigned int& extended_max,
|
||||
unsigned int& jitter, int& rtt_ms) const;
|
||||
@ -105,7 +107,7 @@ class ViERTP_RTCPImpl
|
||||
virtual int DeregisterRTCPObserver(const int video_channel);
|
||||
|
||||
protected:
|
||||
ViERTP_RTCPImpl(ViESharedData* shared_data);
|
||||
explicit ViERTP_RTCPImpl(ViESharedData* shared_data);
|
||||
virtual ~ViERTP_RTCPImpl();
|
||||
|
||||
private:
|
||||
@ -114,4 +116,4 @@ class ViERTP_RTCPImpl
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_RTP_RTCP_IMPL_H_
|
||||
#endif // WEBRTC_VIDEO_ENGINE_VIE_RTP_RTCP_IMPL_H_ // NOLINT
|
||||
|
Loading…
x
Reference in New Issue
Block a user