Format /sdk

git ls-files | grep -e  "\(\.h\|\.cc\)$" | grep -e  "^sdk/" | xargs clang-format -i ; git cl format
after landing: add to .git-blame-ignore-revs

Bug: webrtc:15082
Change-Id: If05d3c7555c4f2bf25e387249932787a93aa39c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302060
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39913}
This commit is contained in:
Jared Siskin 2023-04-20 13:49:21 -07:00 committed by WebRTC LUCI CQ
parent 7c0525b98b
commit 6f86f6af00
72 changed files with 147 additions and 147 deletions

View File

@ -12,6 +12,7 @@
#define SDK_ANDROID_NATIVE_API_CODECS_WRAPPER_H_ #define SDK_ANDROID_NATIVE_API_CODECS_WRAPPER_H_
#include <jni.h> #include <jni.h>
#include <memory> #include <memory>
#include <vector> #include <vector>

View File

@ -19,6 +19,7 @@
#include <ucontext.h> #include <ucontext.h>
#include <unistd.h> #include <unistd.h>
#include <unwind.h> #include <unwind.h>
#include <atomic> #include <atomic>
// ptrace.h is polluting the namespace. Clean up to avoid conflicts with rtc. // ptrace.h is polluting the namespace. Clean up to avoid conflicts with rtc.

View File

@ -12,6 +12,7 @@
#define SDK_ANDROID_NATIVE_API_VIDEO_WRAPPER_H_ #define SDK_ANDROID_NATIVE_API_VIDEO_WRAPPER_H_
#include <jni.h> #include <jni.h>
#include <memory> #include <memory>
#include "api/media_stream_interface.h" #include "api/media_stream_interface.h"

View File

@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "sdk/android/native_api/codecs/wrapper.h"
#include <memory> #include <memory>
#include "absl/memory/memory.h" #include "absl/memory/memory.h"
#include "media/base/media_constants.h" #include "media/base/media_constants.h"
#include "sdk/android/generated_native_unittests_jni/CodecsWrapperTestHelper_jni.h" #include "sdk/android/generated_native_unittests_jni/CodecsWrapperTestHelper_jni.h"
#include "sdk/android/native_api/codecs/wrapper.h"
#include "sdk/android/src/jni/video_encoder_wrapper.h" #include "sdk/android/src/jni/video_encoder_wrapper.h"
#include "test/gtest.h" #include "test/gtest.h"

View File

@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "sdk/android/native_api/jni/java_types.h"
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "sdk/android/generated_native_unittests_jni/JavaTypesTestHelper_jni.h" #include "sdk/android/generated_native_unittests_jni/JavaTypesTestHelper_jni.h"
#include "sdk/android/native_api/jni/java_types.h"
#include "test/gtest.h" #include "test/gtest.h"
namespace webrtc { namespace webrtc {
@ -26,7 +27,9 @@ TEST(JavaTypesTest, TestJavaToNativeStringMap) {
std::map<std::string, std::string> output = JavaToNativeStringMap(env, j_map); std::map<std::string, std::string> output = JavaToNativeStringMap(env, j_map);
std::map<std::string, std::string> expected{ std::map<std::string, std::string> expected{
{"one", "1"}, {"two", "2"}, {"three", "3"}, {"one", "1"},
{"two", "2"},
{"three", "3"},
}; };
EXPECT_EQ(expected, output); EXPECT_EQ(expected, output);
} }

View File

@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "sdk/android/native_api/video/video_source.h"
#include <vector> #include <vector>
#include "api/video/video_sink_interface.h" #include "api/video/video_sink_interface.h"
#include "sdk/android/generated_native_unittests_jni/JavaVideoSourceTestHelper_jni.h" #include "sdk/android/generated_native_unittests_jni/JavaVideoSourceTestHelper_jni.h"
#include "sdk/android/native_api/video/video_source.h"
#include "test/gtest.h" #include "test/gtest.h"
namespace webrtc { namespace webrtc {

View File

@ -38,9 +38,7 @@ static jlong JNI_Histogram_CreateEnumeration(
return jlongFromPointer(metrics::HistogramFactoryGetEnumeration(name, max)); return jlongFromPointer(metrics::HistogramFactoryGetEnumeration(name, max));
} }
static void JNI_Histogram_AddSample(JNIEnv* jni, static void JNI_Histogram_AddSample(JNIEnv* jni, jlong histogram, jint sample) {
jlong histogram,
jint sample) {
if (histogram) { if (histogram) {
HistogramAdd(reinterpret_cast<metrics::Histogram*>(histogram), sample); HistogramAdd(reinterpret_cast<metrics::Histogram*>(histogram), sample);
} }

View File

@ -58,8 +58,7 @@ absl::optional<bool> AndroidVideoTrackSource::needs_denoising() const {
return false; return false;
} }
void AndroidVideoTrackSource::SetState(JNIEnv* env, void AndroidVideoTrackSource::SetState(JNIEnv* env, jboolean j_is_live) {
jboolean j_is_live) {
const SourceState state = j_is_live ? kLive : kEnded; const SourceState state = j_is_live ? kLive : kEnded;
if (state_.exchange(state) != state) { if (state_.exchange(state) != state) {
if (rtc::Thread::Current() == signaling_thread_) { if (rtc::Thread::Current() == signaling_thread_) {

View File

@ -70,8 +70,7 @@ class AndroidVideoTrackSource : public rtc::AdaptedVideoTrackSource {
jlong j_timestamp_ns, jlong j_timestamp_ns,
const JavaRef<jobject>& j_video_frame_buffer); const JavaRef<jobject>& j_video_frame_buffer);
void SetState(JNIEnv* env, void SetState(JNIEnv* env, jboolean j_is_live);
jboolean j_is_live);
void AdaptOutputFormat(JNIEnv* env, void AdaptOutputFormat(JNIEnv* env,
jint j_landscape_width, jint j_landscape_width,

View File

@ -244,8 +244,7 @@ void AudioTrackJni::CacheDirectBufferAddress(
// This method is called on a high-priority thread from Java. The name of // This method is called on a high-priority thread from Java. The name of
// the thread is 'AudioRecordTrack'. // the thread is 'AudioRecordTrack'.
void AudioTrackJni::GetPlayoutData(JNIEnv* env, void AudioTrackJni::GetPlayoutData(JNIEnv* env, size_t length) {
size_t length) {
RTC_DCHECK(thread_checker_java_.IsCurrent()); RTC_DCHECK(thread_checker_java_.IsCurrent());
const size_t bytes_per_frame = audio_parameters_.channels() * sizeof(int16_t); const size_t bytes_per_frame = audio_parameters_.channels() * sizeof(int16_t);
RTC_DCHECK_EQ(frames_per_buffer_, length / bytes_per_frame); RTC_DCHECK_EQ(frames_per_buffer_, length / bytes_per_frame);

View File

@ -8,12 +8,11 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "sdk/android/generated_builtin_audio_codecs_jni/BuiltinAudioDecoderFactoryFactory_jni.h" #include "sdk/android/generated_builtin_audio_codecs_jni/BuiltinAudioDecoderFactoryFactory_jni.h"
#include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/native_api/jni/java_types.h"
#include "sdk/android/src/jni/jni_helpers.h" #include "sdk/android/src/jni/jni_helpers.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
namespace webrtc { namespace webrtc {
namespace jni { namespace jni {

View File

@ -8,12 +8,11 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "sdk/android/generated_builtin_audio_codecs_jni/BuiltinAudioEncoderFactoryFactory_jni.h" #include "sdk/android/generated_builtin_audio_codecs_jni/BuiltinAudioEncoderFactoryFactory_jni.h"
#include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/native_api/jni/java_types.h"
#include "sdk/android/src/jni/jni_helpers.h" #include "sdk/android/src/jni/jni_helpers.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
namespace webrtc { namespace webrtc {
namespace jni { namespace jni {

View File

@ -12,10 +12,10 @@
#define SDK_ANDROID_SRC_JNI_ENCODED_IMAGE_H_ #define SDK_ANDROID_SRC_JNI_ENCODED_IMAGE_H_
#include <jni.h> #include <jni.h>
#include <vector> #include <vector>
#include "api/video/video_frame_type.h" #include "api/video/video_frame_type.h"
#include "sdk/android/native_api/jni/scoped_java_ref.h" #include "sdk/android/native_api/jni/scoped_java_ref.h"
namespace webrtc { namespace webrtc {

View File

@ -27,9 +27,8 @@ static void JNI_JniCommon_ReleaseRef(JNIEnv* jni,
->Release(); ->Release();
} }
static ScopedJavaLocalRef<jobject> JNI_JniCommon_AllocateByteBuffer( static ScopedJavaLocalRef<jobject> JNI_JniCommon_AllocateByteBuffer(JNIEnv* jni,
JNIEnv* jni, jint size) {
jint size) {
void* new_data = ::operator new(size); void* new_data = ::operator new(size);
return NewDirectByteBuffer(jni, new_data, size); return NewDirectByteBuffer(jni, new_data, size);
} }

View File

@ -15,6 +15,7 @@
#define SDK_ANDROID_SRC_JNI_JNI_GENERATOR_HELPER_H_ #define SDK_ANDROID_SRC_JNI_JNI_GENERATOR_HELPER_H_
#include <jni.h> #include <jni.h>
#include <atomic> #include <atomic>
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
@ -82,9 +83,9 @@ namespace android {
using webrtc::JavaParamRef; using webrtc::JavaParamRef;
using webrtc::JavaRef; using webrtc::JavaRef;
using webrtc::ScopedJavaLocalRef;
using webrtc::LazyGetClass; using webrtc::LazyGetClass;
using webrtc::MethodID; using webrtc::MethodID;
using webrtc::ScopedJavaLocalRef;
} // namespace android } // namespace android
} // namespace base } // namespace base

View File

@ -15,6 +15,7 @@
#define SDK_ANDROID_SRC_JNI_JNI_HELPERS_H_ #define SDK_ANDROID_SRC_JNI_JNI_HELPERS_H_
#include <jni.h> #include <jni.h>
#include <string> #include <string>
#include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/native_api/jni/java_types.h"

View File

@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "modules/video_coding/codecs/av1/libaom_av1_encoder.h"
#include <jni.h> #include <jni.h>
#include "modules/video_coding/codecs/av1/libaom_av1_encoder.h"
#include "sdk/android/generated_libaom_av1_encoder_jni/LibaomAv1Encoder_jni.h" #include "sdk/android/generated_libaom_av1_encoder_jni/LibaomAv1Encoder_jni.h"
#include "sdk/android/src/jni/jni_helpers.h" #include "sdk/android/src/jni/jni_helpers.h"

View File

@ -9,13 +9,13 @@
*/ */
#include <jni.h> #include <jni.h>
#include <vector>
#include "third_party/libyuv/include/libyuv/convert.h" #include <vector>
#include "third_party/libyuv/include/libyuv/scale.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
#include "sdk/android/generated_video_jni/NV12Buffer_jni.h" #include "sdk/android/generated_video_jni/NV12Buffer_jni.h"
#include "third_party/libyuv/include/libyuv/convert.h"
#include "third_party/libyuv/include/libyuv/scale.h"
namespace webrtc { namespace webrtc {
namespace jni { namespace jni {

View File

@ -9,14 +9,14 @@
*/ */
#include <jni.h> #include <jni.h>
#include <vector>
#include "third_party/libyuv/include/libyuv/convert.h" #include <vector>
#include "third_party/libyuv/include/libyuv/scale.h"
#include "common_video/libyuv/include/webrtc_libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
#include "sdk/android/generated_video_jni/NV21Buffer_jni.h" #include "sdk/android/generated_video_jni/NV21Buffer_jni.h"
#include "third_party/libyuv/include/libyuv/convert.h"
#include "third_party/libyuv/include/libyuv/scale.h"
namespace webrtc { namespace webrtc {
namespace jni { namespace jni {

View File

@ -14,9 +14,7 @@
namespace webrtc { namespace webrtc {
namespace jni { namespace jni {
static void JNI_AudioTrack_SetVolume(JNIEnv*, static void JNI_AudioTrack_SetVolume(JNIEnv*, jlong j_p, jdouble volume) {
jlong j_p,
jdouble volume) {
rtc::scoped_refptr<AudioSourceInterface> source( rtc::scoped_refptr<AudioSourceInterface> source(
reinterpret_cast<AudioTrackInterface*>(j_p)->GetSource()); reinterpret_cast<AudioTrackInterface*>(j_p)->GetSource());
source->SetVolume(volume); source->SetVolume(volume);

View File

@ -36,9 +36,8 @@ static jlong JNI_CallSessionFileRotatingLogSink_AddSink(
return jlongFromPointer(sink); return jlongFromPointer(sink);
} }
static void JNI_CallSessionFileRotatingLogSink_DeleteSink( static void JNI_CallSessionFileRotatingLogSink_DeleteSink(JNIEnv* jni,
JNIEnv* jni, jlong j_sink) {
jlong j_sink) {
rtc::CallSessionFileRotatingLogSink* sink = rtc::CallSessionFileRotatingLogSink* sink =
reinterpret_cast<rtc::CallSessionFileRotatingLogSink*>(j_sink); reinterpret_cast<rtc::CallSessionFileRotatingLogSink*>(j_sink);
rtc::LogMessage::RemoveLogToStream(sink); rtc::LogMessage::RemoveLogToStream(sink);

View File

@ -8,16 +8,16 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include <memory> #include "sdk/android/src/jni/pc/data_channel.h"
#include <limits> #include <limits>
#include <memory>
#include "api/data_channel_interface.h" #include "api/data_channel_interface.h"
#include "rtc_base/logging.h" #include "rtc_base/logging.h"
#include "sdk/android/generated_peerconnection_jni/DataChannel_jni.h" #include "sdk/android/generated_peerconnection_jni/DataChannel_jni.h"
#include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/native_api/jni/java_types.h"
#include "sdk/android/src/jni/jni_helpers.h" #include "sdk/android/src/jni/jni_helpers.h"
#include "sdk/android/src/jni/pc/data_channel.h"
namespace webrtc { namespace webrtc {
namespace jni { namespace jni {

View File

@ -11,6 +11,9 @@
#ifndef SDK_ANDROID_SRC_JNI_PC_DATA_CHANNEL_H_ #ifndef SDK_ANDROID_SRC_JNI_PC_DATA_CHANNEL_H_
#define SDK_ANDROID_SRC_JNI_PC_DATA_CHANNEL_H_ #define SDK_ANDROID_SRC_JNI_PC_DATA_CHANNEL_H_
#include "api/data_channel_interface.h"
#include "sdk/android/src/jni/jni_helpers.h"
namespace webrtc { namespace webrtc {
namespace jni { namespace jni {

View File

@ -39,8 +39,7 @@ static ScopedJavaLocalRef<jstring> JNI_DtmfSender_Tones(
reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->tones()); reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->tones());
} }
static jint JNI_DtmfSender_Duration(JNIEnv* jni, static jint JNI_DtmfSender_Duration(JNIEnv* jni, jlong j_dtmf_sender_pointer) {
jlong j_dtmf_sender_pointer) {
return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer) return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)
->duration(); ->duration();
} }

View File

@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "rtc_base/logging.h"
#include <memory> #include <memory>
#include "rtc_base/logging.h"
#include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/native_api/jni/java_types.h"
#include "sdk/android/src/jni/jni_helpers.h" #include "sdk/android/src/jni/jni_helpers.h"

View File

@ -12,6 +12,7 @@
#define SDK_ANDROID_SRC_JNI_PC_MEDIA_CONSTRAINTS_H_ #define SDK_ANDROID_SRC_JNI_PC_MEDIA_CONSTRAINTS_H_
#include <jni.h> #include <jni.h>
#include <memory> #include <memory>
#include "sdk/android/native_api/jni/scoped_java_ref.h" #include "sdk/android/native_api/jni/scoped_java_ref.h"

View File

@ -12,6 +12,7 @@
#define SDK_ANDROID_SRC_JNI_PC_MEDIA_STREAM_H_ #define SDK_ANDROID_SRC_JNI_PC_MEDIA_STREAM_H_
#include <jni.h> #include <jni.h>
#include <memory> #include <memory>
#include "api/media_stream_interface.h" #include "api/media_stream_interface.h"

View File

@ -30,28 +30,24 @@ cricket::MediaType JavaToNativeMediaType(JNIEnv* jni,
Java_MediaType_getNative(jni, j_media_type)); Java_MediaType_getNative(jni, j_media_type));
} }
static ScopedJavaLocalRef<jstring> JNI_MediaStreamTrack_GetId( static ScopedJavaLocalRef<jstring> JNI_MediaStreamTrack_GetId(JNIEnv* jni,
JNIEnv* jni, jlong j_p) {
jlong j_p) {
return NativeToJavaString( return NativeToJavaString(
jni, reinterpret_cast<MediaStreamTrackInterface*>(j_p)->id()); jni, reinterpret_cast<MediaStreamTrackInterface*>(j_p)->id());
} }
static ScopedJavaLocalRef<jstring> JNI_MediaStreamTrack_GetKind( static ScopedJavaLocalRef<jstring> JNI_MediaStreamTrack_GetKind(JNIEnv* jni,
JNIEnv* jni, jlong j_p) {
jlong j_p) {
return NativeToJavaString( return NativeToJavaString(
jni, reinterpret_cast<MediaStreamTrackInterface*>(j_p)->kind()); jni, reinterpret_cast<MediaStreamTrackInterface*>(j_p)->kind());
} }
static jboolean JNI_MediaStreamTrack_GetEnabled(JNIEnv* jni, static jboolean JNI_MediaStreamTrack_GetEnabled(JNIEnv* jni, jlong j_p) {
jlong j_p) {
return reinterpret_cast<MediaStreamTrackInterface*>(j_p)->enabled(); return reinterpret_cast<MediaStreamTrackInterface*>(j_p)->enabled();
} }
static ScopedJavaLocalRef<jobject> JNI_MediaStreamTrack_GetState( static ScopedJavaLocalRef<jobject> JNI_MediaStreamTrack_GetState(JNIEnv* jni,
JNIEnv* jni, jlong j_p) {
jlong j_p) {
return Java_State_fromNativeIndex( return Java_State_fromNativeIndex(
jni, reinterpret_cast<MediaStreamTrackInterface*>(j_p)->state()); jni, reinterpret_cast<MediaStreamTrackInterface*>(j_p)->state());
} }

View File

@ -12,6 +12,7 @@
#define SDK_ANDROID_SRC_JNI_PC_OWNED_FACTORY_AND_THREADS_H_ #define SDK_ANDROID_SRC_JNI_PC_OWNED_FACTORY_AND_THREADS_H_
#include <jni.h> #include <jni.h>
#include <memory> #include <memory>
#include <utility> #include <utility>

View File

@ -350,8 +350,7 @@ JNI_PeerConnectionFactory_CreatePeerConnectionFactory(
TakeOwnershipOfUniquePtr<NetEqFactory>(native_neteq_factory)); TakeOwnershipOfUniquePtr<NetEqFactory>(native_neteq_factory));
} }
static void JNI_PeerConnectionFactory_FreeFactory(JNIEnv*, static void JNI_PeerConnectionFactory_FreeFactory(JNIEnv*, jlong j_p) {
jlong j_p) {
delete reinterpret_cast<OwnedFactoryAndThreads*>(j_p); delete reinterpret_cast<OwnedFactoryAndThreads*>(j_p);
field_trial::InitFieldTrialsFromString(nullptr); field_trial::InitFieldTrialsFromString(nullptr);
GetStaticObjects().field_trials_init_string = nullptr; GetStaticObjects().field_trials_init_string = nullptr;

View File

@ -12,6 +12,7 @@
#define SDK_ANDROID_SRC_JNI_PC_PEER_CONNECTION_FACTORY_H_ #define SDK_ANDROID_SRC_JNI_PC_PEER_CONNECTION_FACTORY_H_
#include <jni.h> #include <jni.h>
#include "api/peer_connection_interface.h" #include "api/peer_connection_interface.h"
#include "rtc_base/thread.h" #include "rtc_base/thread.h"

View File

@ -9,7 +9,6 @@
*/ */
#include "sdk/android/src/jni/pc/rtc_certificate.h" #include "sdk/android/src/jni/pc/rtc_certificate.h"
#include "sdk/android/src/jni/pc/ice_candidate.h"
#include "rtc_base/ref_count.h" #include "rtc_base/ref_count.h"
#include "rtc_base/rtc_certificate.h" #include "rtc_base/rtc_certificate.h"
@ -17,6 +16,7 @@
#include "sdk/android/generated_peerconnection_jni/RtcCertificatePem_jni.h" #include "sdk/android/generated_peerconnection_jni/RtcCertificatePem_jni.h"
#include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/native_api/jni/java_types.h"
#include "sdk/android/src/jni/jni_helpers.h" #include "sdk/android/src/jni/jni_helpers.h"
#include "sdk/android/src/jni/pc/ice_candidate.h"
namespace webrtc { namespace webrtc {
namespace jni { namespace jni {

View File

@ -35,8 +35,7 @@ static jboolean JNI_RtpSender_SetTrack(JNIEnv* jni,
->SetTrack(reinterpret_cast<MediaStreamTrackInterface*>(j_track_pointer)); ->SetTrack(reinterpret_cast<MediaStreamTrackInterface*>(j_track_pointer));
} }
jlong JNI_RtpSender_GetTrack(JNIEnv* jni, jlong JNI_RtpSender_GetTrack(JNIEnv* jni, jlong j_rtp_sender_pointer) {
jlong j_rtp_sender_pointer) {
// MediaStreamTrack will have shared ownership by the MediaStreamTrack Java // MediaStreamTrack will have shared ownership by the MediaStreamTrack Java
// object. // object.
return jlongFromPointer( return jlongFromPointer(
@ -65,8 +64,7 @@ ScopedJavaLocalRef<jobject> JNI_RtpSender_GetStreams(
convert_function); convert_function);
} }
jlong JNI_RtpSender_GetDtmfSender(JNIEnv* jni, jlong JNI_RtpSender_GetDtmfSender(JNIEnv* jni, jlong j_rtp_sender_pointer) {
jlong j_rtp_sender_pointer) {
return jlongFromPointer( return jlongFromPointer(
reinterpret_cast<RtpSenderInterface*>(j_rtp_sender_pointer) reinterpret_cast<RtpSenderInterface*>(j_rtp_sender_pointer)
->GetDtmfSender() ->GetDtmfSender()

View File

@ -12,6 +12,7 @@
#define SDK_ANDROID_SRC_JNI_PC_SESSION_DESCRIPTION_H_ #define SDK_ANDROID_SRC_JNI_PC_SESSION_DESCRIPTION_H_
#include <jni.h> #include <jni.h>
#include <memory> #include <memory>
#include <string> #include <string>

View File

@ -9,6 +9,7 @@
*/ */
#include "sdk/android/src/jni/pc/ssl_certificate_verifier_wrapper.h" #include "sdk/android/src/jni/pc/ssl_certificate_verifier_wrapper.h"
#include "sdk/android/generated_peerconnection_jni/SSLCertificateVerifier_jni.h" #include "sdk/android/generated_peerconnection_jni/SSLCertificateVerifier_jni.h"
#include "sdk/android/native_api/jni/class_loader.h" #include "sdk/android/native_api/jni/class_loader.h"
#include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/native_api/jni/java_types.h"

View File

@ -12,6 +12,7 @@
#define SDK_ANDROID_SRC_JNI_PC_SSL_CERTIFICATE_VERIFIER_WRAPPER_H_ #define SDK_ANDROID_SRC_JNI_PC_SSL_CERTIFICATE_VERIFIER_WRAPPER_H_
#include <jni.h> #include <jni.h>
#include <vector> #include <vector>
#include "rtc_base/ssl_certificate.h" #include "rtc_base/ssl_certificate.h"

View File

@ -9,6 +9,7 @@
*/ */
#include "api/turn_customizer.h" #include "api/turn_customizer.h"
#include "sdk/android/generated_peerconnection_jni/TurnCustomizer_jni.h" #include "sdk/android/generated_peerconnection_jni/TurnCustomizer_jni.h"
#include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/native_api/jni/java_types.h"
#include "sdk/android/src/jni/jni_helpers.h" #include "sdk/android/src/jni/jni_helpers.h"

View File

@ -8,10 +8,11 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "rtc_base/timestamp_aligner.h"
#include <jni.h> #include <jni.h>
#include "rtc_base/time_utils.h" #include "rtc_base/time_utils.h"
#include "rtc_base/timestamp_aligner.h"
#include "sdk/android/generated_video_jni/TimestampAligner_jni.h" #include "sdk/android/generated_video_jni/TimestampAligner_jni.h"
#include "sdk/android/src/jni/jni_helpers.h" #include "sdk/android/src/jni/jni_helpers.h"
@ -32,10 +33,9 @@ static void JNI_TimestampAligner_ReleaseTimestampAligner(
delete reinterpret_cast<rtc::TimestampAligner*>(timestamp_aligner); delete reinterpret_cast<rtc::TimestampAligner*>(timestamp_aligner);
} }
static jlong JNI_TimestampAligner_TranslateTimestamp( static jlong JNI_TimestampAligner_TranslateTimestamp(JNIEnv* env,
JNIEnv* env, jlong timestamp_aligner,
jlong timestamp_aligner, jlong camera_time_ns) {
jlong camera_time_ns) {
return reinterpret_cast<rtc::TimestampAligner*>(timestamp_aligner) return reinterpret_cast<rtc::TimestampAligner*>(timestamp_aligner)
->TranslateTimestamp(camera_time_ns / rtc::kNumNanosecsPerMicrosec, ->TranslateTimestamp(camera_time_ns / rtc::kNumNanosecsPerMicrosec,
rtc::TimeMicros()) * rtc::TimeMicros()) *

View File

@ -87,10 +87,9 @@ bool VideoDecoderWrapper::ConfigureInternal(JNIEnv* jni) {
return status == WEBRTC_VIDEO_CODEC_OK; return status == WEBRTC_VIDEO_CODEC_OK;
} }
int32_t VideoDecoderWrapper::Decode( int32_t VideoDecoderWrapper::Decode(const EncodedImage& image_param,
const EncodedImage& image_param, bool missing_frames,
bool missing_frames, int64_t render_time_ms) {
int64_t render_time_ms) {
RTC_DCHECK_RUN_ON(&decoder_thread_checker_); RTC_DCHECK_RUN_ON(&decoder_thread_checker_);
if (!initialized_) { if (!initialized_) {
// Most likely initializing the codec failed. // Most likely initializing the codec failed.

View File

@ -12,6 +12,7 @@
#define SDK_ANDROID_SRC_JNI_VIDEO_ENCODER_FACTORY_WRAPPER_H_ #define SDK_ANDROID_SRC_JNI_VIDEO_ENCODER_FACTORY_WRAPPER_H_
#include <jni.h> #include <jni.h>
#include <vector> #include <vector>
#include "api/video_codecs/sdp_video_format.h" #include "api/video_codecs/sdp_video_format.h"

View File

@ -51,8 +51,7 @@ class VideoEncoderWrapper : public VideoEncoder {
EncoderInfo GetEncoderInfo() const override; EncoderInfo GetEncoderInfo() const override;
// Should only be called by JNI. // Should only be called by JNI.
void OnEncodedFrame(JNIEnv* jni, void OnEncodedFrame(JNIEnv* jni, const JavaRef<jobject>& j_encoded_image);
const JavaRef<jobject>& j_encoded_image);
private: private:
struct FrameExtraInfo { struct FrameExtraInfo {

View File

@ -40,8 +40,7 @@ static jlong JNI_VideoTrack_WrapSink(JNIEnv* jni,
return jlongFromPointer(new VideoSinkWrapper(jni, sink)); return jlongFromPointer(new VideoSinkWrapper(jni, sink));
} }
static void JNI_VideoTrack_FreeSink(JNIEnv* jni, static void JNI_VideoTrack_FreeSink(JNIEnv* jni, jlong j_native_sink) {
jlong j_native_sink) {
delete reinterpret_cast<rtc::VideoSinkInterface<VideoFrame>*>(j_native_sink); delete reinterpret_cast<rtc::VideoSinkInterface<VideoFrame>*>(j_native_sink);
} }

View File

@ -17,6 +17,7 @@
#define SDK_MEDIA_CONSTRAINTS_H_ #define SDK_MEDIA_CONSTRAINTS_H_
#include <stddef.h> #include <stddef.h>
#include <string> #include <string>
#include <utility> #include <utility>
#include <vector> #include <vector>
@ -59,10 +60,10 @@ class MediaConstraints {
// These keys are google specific. // These keys are google specific.
static const char kGoogEchoCancellation[]; // googEchoCancellation static const char kGoogEchoCancellation[]; // googEchoCancellation
static const char kAutoGainControl[]; // googAutoGainControl static const char kAutoGainControl[]; // googAutoGainControl
static const char kNoiseSuppression[]; // googNoiseSuppression static const char kNoiseSuppression[]; // googNoiseSuppression
static const char kHighpassFilter[]; // googHighpassFilter static const char kHighpassFilter[]; // googHighpassFilter
static const char kAudioMirroring[]; // googAudioMirroring static const char kAudioMirroring[]; // googAudioMirroring
static const char static const char
kAudioNetworkAdaptorConfig[]; // googAudioNetworkAdaptorConfig kAudioNetworkAdaptorConfig[]; // googAudioNetworkAdaptorConfig
static const char kInitAudioRecordingOnSend[]; // InitAudioRecordingOnSend; static const char kInitAudioRecordingOnSend[]; // InitAudioRecordingOnSend;

View File

@ -32,7 +32,7 @@ RTC_OBJC_EXPORT
// to implement dispatching to some other queue. // to implement dispatching to some other queue.
- (void)start:(nullable RTCCallbackLoggerMessageHandler)handler; - (void)start:(nullable RTCCallbackLoggerMessageHandler)handler;
- (void)startWithMessageAndSeverityHandler: - (void)startWithMessageAndSeverityHandler:
(nullable RTCCallbackLoggerMessageAndSeverityHandler)handler; (nullable RTCCallbackLoggerMessageAndSeverityHandler)handler;
- (void)stop; - (void)stop;

View File

@ -21,39 +21,39 @@ NS_ASSUME_NONNULL_BEGIN
: (RTCIceTransportPolicy)policy; : (RTCIceTransportPolicy)policy;
+ (RTCIceTransportPolicy)transportPolicyForTransportsType: + (RTCIceTransportPolicy)transportPolicyForTransportsType:
(webrtc::PeerConnectionInterface::IceTransportsType)nativeType; (webrtc::PeerConnectionInterface::IceTransportsType)nativeType;
+ (NSString *)stringForTransportPolicy:(RTCIceTransportPolicy)policy; + (NSString *)stringForTransportPolicy:(RTCIceTransportPolicy)policy;
+ (webrtc::PeerConnectionInterface::BundlePolicy)nativeBundlePolicyForPolicy: + (webrtc::PeerConnectionInterface::BundlePolicy)nativeBundlePolicyForPolicy:
(RTCBundlePolicy)policy; (RTCBundlePolicy)policy;
+ (RTCBundlePolicy)bundlePolicyForNativePolicy: + (RTCBundlePolicy)bundlePolicyForNativePolicy:
(webrtc::PeerConnectionInterface::BundlePolicy)nativePolicy; (webrtc::PeerConnectionInterface::BundlePolicy)nativePolicy;
+ (NSString *)stringForBundlePolicy:(RTCBundlePolicy)policy; + (NSString *)stringForBundlePolicy:(RTCBundlePolicy)policy;
+ (webrtc::PeerConnectionInterface::RtcpMuxPolicy)nativeRtcpMuxPolicyForPolicy: + (webrtc::PeerConnectionInterface::RtcpMuxPolicy)nativeRtcpMuxPolicyForPolicy:
(RTCRtcpMuxPolicy)policy; (RTCRtcpMuxPolicy)policy;
+ (RTCRtcpMuxPolicy)rtcpMuxPolicyForNativePolicy: + (RTCRtcpMuxPolicy)rtcpMuxPolicyForNativePolicy:
(webrtc::PeerConnectionInterface::RtcpMuxPolicy)nativePolicy; (webrtc::PeerConnectionInterface::RtcpMuxPolicy)nativePolicy;
+ (NSString *)stringForRtcpMuxPolicy:(RTCRtcpMuxPolicy)policy; + (NSString *)stringForRtcpMuxPolicy:(RTCRtcpMuxPolicy)policy;
+ (webrtc::PeerConnectionInterface::TcpCandidatePolicy)nativeTcpCandidatePolicyForPolicy: + (webrtc::PeerConnectionInterface::TcpCandidatePolicy)nativeTcpCandidatePolicyForPolicy:
(RTCTcpCandidatePolicy)policy; (RTCTcpCandidatePolicy)policy;
+ (RTCTcpCandidatePolicy)tcpCandidatePolicyForNativePolicy: + (RTCTcpCandidatePolicy)tcpCandidatePolicyForNativePolicy:
(webrtc::PeerConnectionInterface::TcpCandidatePolicy)nativePolicy; (webrtc::PeerConnectionInterface::TcpCandidatePolicy)nativePolicy;
+ (NSString *)stringForTcpCandidatePolicy:(RTCTcpCandidatePolicy)policy; + (NSString *)stringForTcpCandidatePolicy:(RTCTcpCandidatePolicy)policy;
+ (webrtc::PeerConnectionInterface::CandidateNetworkPolicy)nativeCandidateNetworkPolicyForPolicy: + (webrtc::PeerConnectionInterface::CandidateNetworkPolicy)nativeCandidateNetworkPolicyForPolicy:
(RTCCandidateNetworkPolicy)policy; (RTCCandidateNetworkPolicy)policy;
+ (RTCCandidateNetworkPolicy)candidateNetworkPolicyForNativePolicy: + (RTCCandidateNetworkPolicy)candidateNetworkPolicyForNativePolicy:
(webrtc::PeerConnectionInterface::CandidateNetworkPolicy)nativePolicy; (webrtc::PeerConnectionInterface::CandidateNetworkPolicy)nativePolicy;
+ (NSString *)stringForCandidateNetworkPolicy:(RTCCandidateNetworkPolicy)policy; + (NSString *)stringForCandidateNetworkPolicy:(RTCCandidateNetworkPolicy)policy;
@ -72,7 +72,7 @@ NS_ASSUME_NONNULL_BEGIN
- (nullable webrtc::PeerConnectionInterface::RTCConfiguration *)createNativeConfiguration; - (nullable webrtc::PeerConnectionInterface::RTCConfiguration *)createNativeConfiguration;
- (instancetype)initWithNativeConfiguration: - (instancetype)initWithNativeConfiguration:
(const webrtc::PeerConnectionInterface::RTCConfiguration &)config NS_DESIGNATED_INITIALIZER; (const webrtc::PeerConnectionInterface::RTCConfiguration &)config NS_DESIGNATED_INITIALIZER;
@end @end

View File

@ -40,10 +40,10 @@ NS_ASSUME_NONNULL_BEGIN
: (rtc::scoped_refptr<webrtc::DataChannelInterface>)nativeDataChannel NS_DESIGNATED_INITIALIZER; : (rtc::scoped_refptr<webrtc::DataChannelInterface>)nativeDataChannel NS_DESIGNATED_INITIALIZER;
+ (webrtc::DataChannelInterface::DataState)nativeDataChannelStateForState: + (webrtc::DataChannelInterface::DataState)nativeDataChannelStateForState:
(RTCDataChannelState)state; (RTCDataChannelState)state;
+ (RTCDataChannelState)dataChannelStateForNativeState: + (RTCDataChannelState)dataChannelStateForNativeState:
(webrtc::DataChannelInterface::DataState)nativeState; (webrtc::DataChannelInterface::DataState)nativeState;
+ (NSString *)stringForState:(RTCDataChannelState)state; + (NSString *)stringForState:(RTCDataChannelState)state;

View File

@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
/** Initialize an RTCDtmfSender with a native DtmfSenderInterface. */ /** Initialize an RTCDtmfSender with a native DtmfSenderInterface. */
- (instancetype)initWithNativeDtmfSender: - (instancetype)initWithNativeDtmfSender:
(rtc::scoped_refptr<webrtc::DtmfSenderInterface>)nativeDtmfSender NS_DESIGNATED_INITIALIZER; (rtc::scoped_refptr<webrtc::DtmfSenderInterface>)nativeDtmfSender NS_DESIGNATED_INITIALIZER;
@end @end

View File

@ -14,14 +14,14 @@
/** The only valid value for the following if set is kRTCFieldTrialEnabledValue. */ /** The only valid value for the following if set is kRTCFieldTrialEnabledValue. */
RTC_EXTERN NSString *const kRTCFieldTrialAudioForceABWENoTWCCKey; RTC_EXTERN NSString *const kRTCFieldTrialAudioForceABWENoTWCCKey;
RTC_EXTERN NSString * const kRTCFieldTrialFlexFec03AdvertisedKey; RTC_EXTERN NSString *const kRTCFieldTrialFlexFec03AdvertisedKey;
RTC_EXTERN NSString * const kRTCFieldTrialFlexFec03Key; RTC_EXTERN NSString *const kRTCFieldTrialFlexFec03Key;
RTC_EXTERN NSString * const kRTCFieldTrialH264HighProfileKey; RTC_EXTERN NSString *const kRTCFieldTrialH264HighProfileKey;
RTC_EXTERN NSString * const kRTCFieldTrialMinimizeResamplingOnMobileKey; RTC_EXTERN NSString *const kRTCFieldTrialMinimizeResamplingOnMobileKey;
RTC_EXTERN NSString *const kRTCFieldTrialUseNWPathMonitor; RTC_EXTERN NSString *const kRTCFieldTrialUseNWPathMonitor;
/** The valid value for field trials above. */ /** The valid value for field trials above. */
RTC_EXTERN NSString * const kRTCFieldTrialEnabledValue; RTC_EXTERN NSString *const kRTCFieldTrialEnabledValue;
/** Initialize field trials using a dictionary mapping field trial keys to their /** Initialize field trials using a dictionary mapping field trial keys to their
* values. See above for valid keys and values. Must be called before any other * values. See above for valid keys and values. Must be called before any other

View File

@ -46,10 +46,10 @@ NS_ASSUME_NONNULL_BEGIN
- (BOOL)isEqualToTrack:(RTC_OBJC_TYPE(RTCMediaStreamTrack) *)track; - (BOOL)isEqualToTrack:(RTC_OBJC_TYPE(RTCMediaStreamTrack) *)track;
+ (webrtc::MediaStreamTrackInterface::TrackState)nativeTrackStateForState: + (webrtc::MediaStreamTrackInterface::TrackState)nativeTrackStateForState:
(RTCMediaStreamTrackState)state; (RTCMediaStreamTrackState)state;
+ (RTCMediaStreamTrackState)trackStateForNativeState: + (RTCMediaStreamTrackState)trackStateForNativeState:
(webrtc::MediaStreamTrackInterface::TrackState)nativeState; (webrtc::MediaStreamTrackInterface::TrackState)nativeState;
+ (NSString *)stringForState:(RTCMediaStreamTrackState)state; + (NSString *)stringForState:(RTCMediaStreamTrackState)state;

View File

@ -104,39 +104,39 @@ class PeerConnectionDelegateAdapter : public PeerConnectionObserver {
NS_DESIGNATED_INITIALIZER; NS_DESIGNATED_INITIALIZER;
+ (webrtc::PeerConnectionInterface::SignalingState)nativeSignalingStateForState: + (webrtc::PeerConnectionInterface::SignalingState)nativeSignalingStateForState:
(RTCSignalingState)state; (RTCSignalingState)state;
+ (RTCSignalingState)signalingStateForNativeState: + (RTCSignalingState)signalingStateForNativeState:
(webrtc::PeerConnectionInterface::SignalingState)nativeState; (webrtc::PeerConnectionInterface::SignalingState)nativeState;
+ (NSString *)stringForSignalingState:(RTCSignalingState)state; + (NSString *)stringForSignalingState:(RTCSignalingState)state;
+ (webrtc::PeerConnectionInterface::IceConnectionState)nativeIceConnectionStateForState: + (webrtc::PeerConnectionInterface::IceConnectionState)nativeIceConnectionStateForState:
(RTCIceConnectionState)state; (RTCIceConnectionState)state;
+ (webrtc::PeerConnectionInterface::PeerConnectionState)nativeConnectionStateForState: + (webrtc::PeerConnectionInterface::PeerConnectionState)nativeConnectionStateForState:
(RTCPeerConnectionState)state; (RTCPeerConnectionState)state;
+ (RTCIceConnectionState)iceConnectionStateForNativeState: + (RTCIceConnectionState)iceConnectionStateForNativeState:
(webrtc::PeerConnectionInterface::IceConnectionState)nativeState; (webrtc::PeerConnectionInterface::IceConnectionState)nativeState;
+ (RTCPeerConnectionState)connectionStateForNativeState: + (RTCPeerConnectionState)connectionStateForNativeState:
(webrtc::PeerConnectionInterface::PeerConnectionState)nativeState; (webrtc::PeerConnectionInterface::PeerConnectionState)nativeState;
+ (NSString *)stringForIceConnectionState:(RTCIceConnectionState)state; + (NSString *)stringForIceConnectionState:(RTCIceConnectionState)state;
+ (NSString *)stringForConnectionState:(RTCPeerConnectionState)state; + (NSString *)stringForConnectionState:(RTCPeerConnectionState)state;
+ (webrtc::PeerConnectionInterface::IceGatheringState)nativeIceGatheringStateForState: + (webrtc::PeerConnectionInterface::IceGatheringState)nativeIceGatheringStateForState:
(RTCIceGatheringState)state; (RTCIceGatheringState)state;
+ (RTCIceGatheringState)iceGatheringStateForNativeState: + (RTCIceGatheringState)iceGatheringStateForNativeState:
(webrtc::PeerConnectionInterface::IceGatheringState)nativeState; (webrtc::PeerConnectionInterface::IceGatheringState)nativeState;
+ (NSString *)stringForIceGatheringState:(RTCIceGatheringState)state; + (NSString *)stringForIceGatheringState:(RTCIceGatheringState)state;
+ (webrtc::PeerConnectionInterface::StatsOutputLevel)nativeStatsOutputLevelForLevel: + (webrtc::PeerConnectionInterface::StatsOutputLevel)nativeStatsOutputLevelForLevel:
(RTCStatsOutputLevel)level; (RTCStatsOutputLevel)level;
@end @end

View File

@ -82,9 +82,8 @@ typedef NS_ENUM(NSInteger, RTCStatsOutputLevel) {
RTCStatsOutputLevelDebug, RTCStatsOutputLevelDebug,
}; };
typedef void (^RTCCreateSessionDescriptionCompletionHandler)(RTC_OBJC_TYPE(RTCSessionDescription) * typedef void (^RTCCreateSessionDescriptionCompletionHandler)(
_Nullable sdp, RTC_OBJC_TYPE(RTCSessionDescription) *_Nullable sdp, NSError *_Nullable error);
NSError *_Nullable error);
typedef void (^RTCSetSessionDescriptionCompletionHandler)(NSError *_Nullable error); typedef void (^RTCSetSessionDescriptionCompletionHandler)(NSError *_Nullable error);

View File

@ -45,7 +45,7 @@ class RtpReceiverDelegateAdapter : public RtpReceiverObserverInterface {
+ (cricket::MediaType)nativeMediaTypeForMediaType:(RTCRtpMediaType)mediaType; + (cricket::MediaType)nativeMediaTypeForMediaType:(RTCRtpMediaType)mediaType;
+ (NSString*)stringForMediaType:(RTCRtpMediaType)mediaType; + (NSString *)stringForMediaType:(RTCRtpMediaType)mediaType;
@end @end

View File

@ -21,8 +21,8 @@ RTC_OBJC_EXPORT
@protocol RTC_OBJC_TYPE @protocol RTC_OBJC_TYPE
(RTCRtpSender)<NSObject> (RTCRtpSender)<NSObject>
/** A unique identifier for this sender. */ /** A unique identifier for this sender. */
@property(nonatomic, readonly) NSString *senderId; @property(nonatomic, readonly) NSString *senderId;
/** The currently active RTCRtpParameters, as defined in /** The currently active RTCRtpParameters, as defined in
* https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters. * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters.

View File

@ -36,10 +36,10 @@ NS_ASSUME_NONNULL_BEGIN
NS_DESIGNATED_INITIALIZER; NS_DESIGNATED_INITIALIZER;
+ (webrtc::RtpTransceiverDirection)nativeRtpTransceiverDirectionFromDirection: + (webrtc::RtpTransceiverDirection)nativeRtpTransceiverDirectionFromDirection:
(RTCRtpTransceiverDirection)direction; (RTCRtpTransceiverDirection)direction;
+ (RTCRtpTransceiverDirection)rtpTransceiverDirectionFromNativeDirection: + (RTCRtpTransceiverDirection)rtpTransceiverDirectionFromNativeDirection:
(webrtc::RtpTransceiverDirection)nativeDirection; (webrtc::RtpTransceiverDirection)nativeDirection;
@end @end

View File

@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
* description. * description.
*/ */
- (instancetype)initWithNativeDescription: - (instancetype)initWithNativeDescription:
(const webrtc::SessionDescriptionInterface *)nativeDescription; (const webrtc::SessionDescriptionInterface *)nativeDescription;
+ (std::string)stdStringForType:(RTCSdpType)type; + (std::string)stdStringForType:(RTCSdpType)type;

View File

@ -12,8 +12,9 @@
#include "api/stats/rtc_stats_report.h" #include "api/stats/rtc_stats_report.h"
@interface RTC_OBJC_TYPE (RTCStatisticsReport) (Private) @interface RTC_OBJC_TYPE (RTCStatisticsReport)
(Private)
- (instancetype)initWithReport : (const webrtc::RTCStatsReport &)report; - (instancetype)initWithReport : (const webrtc::RTCStatsReport &)report;
@end @end

View File

@ -34,9 +34,12 @@ RTC_EXTERN NSString* RTCFileName(const char* filePath);
// Some convenience macros. // Some convenience macros.
#define RTCLogString(format, ...) \ #define RTCLogString(format, ...) \
[NSString stringWithFormat:@"(%@:%d %s): " format, RTCFileName(__FILE__), \ [NSString stringWithFormat:@"(%@:%d %s): " format, \
__LINE__, __FUNCTION__, ##__VA_ARGS__] RTCFileName(__FILE__), \
__LINE__, \
__FUNCTION__, \
##__VA_ARGS__]
#define RTCLogFormat(severity, format, ...) \ #define RTCLogFormat(severity, format, ...) \
do { \ do { \
@ -44,17 +47,13 @@ RTC_EXTERN NSString* RTCFileName(const char* filePath);
RTCLogEx(severity, log_string); \ RTCLogEx(severity, log_string); \
} while (false) } while (false)
#define RTCLogVerbose(format, ...) \ #define RTCLogVerbose(format, ...) RTCLogFormat(RTCLoggingSeverityVerbose, format, ##__VA_ARGS__)
RTCLogFormat(RTCLoggingSeverityVerbose, format, ##__VA_ARGS__)
#define RTCLogInfo(format, ...) \ #define RTCLogInfo(format, ...) RTCLogFormat(RTCLoggingSeverityInfo, format, ##__VA_ARGS__)
RTCLogFormat(RTCLoggingSeverityInfo, format, ##__VA_ARGS__)
#define RTCLogWarning(format, ...) \ #define RTCLogWarning(format, ...) RTCLogFormat(RTCLoggingSeverityWarning, format, ##__VA_ARGS__)
RTCLogFormat(RTCLoggingSeverityWarning, format, ##__VA_ARGS__)
#define RTCLogError(format, ...) \ #define RTCLogError(format, ...) RTCLogFormat(RTCLoggingSeverityError, format, ##__VA_ARGS__)
RTCLogFormat(RTCLoggingSeverityError, format, ##__VA_ARGS__)
#if !defined(NDEBUG) #if !defined(NDEBUG)
#define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__) #define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__)

View File

@ -28,7 +28,7 @@ RTC_OBJC_EXPORT
@protocol RTC_OBJC_TYPE @protocol RTC_OBJC_TYPE
(RTCVideoEncoder)<NSObject> (RTCVideoEncoder)<NSObject>
- (void)setCallback:(nullable RTCVideoEncoderCallback)callback; - (void)setCallback : (nullable RTCVideoEncoderCallback)callback;
- (NSInteger)startEncodeWithSettings:(RTC_OBJC_TYPE(RTCVideoEncoderSettings) *)settings - (NSInteger)startEncodeWithSettings:(RTC_OBJC_TYPE(RTCVideoEncoderSettings) *)settings
numberOfCores:(int)numberOfCores; numberOfCores:(int)numberOfCores;
- (NSInteger)releaseEncoder; - (NSInteger)releaseEncoder;

View File

@ -45,7 +45,7 @@ RTC_OBJC_EXPORT
@property(nonatomic, readonly) id<RTC_OBJC_TYPE(RTCVideoFrameBuffer)> buffer; @property(nonatomic, readonly) id<RTC_OBJC_TYPE(RTCVideoFrameBuffer)> buffer;
- (instancetype)init NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE;
- (instancetype) new NS_UNAVAILABLE; - (instancetype)new NS_UNAVAILABLE;
/** Initialize an RTCVideoFrame from a pixel buffer, rotation, and timestamp. /** Initialize an RTCVideoFrame from a pixel buffer, rotation, and timestamp.
* Deprecated - initialize with a RTCCVPixelBuffer instead * Deprecated - initialize with a RTCCVPixelBuffer instead

View File

@ -14,6 +14,7 @@
#include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#include <VideoToolbox/VideoToolbox.h> #include <VideoToolbox/VideoToolbox.h>
#include <string> #include <string>
// Convenience function for creating a dictionary. // Convenience function for creating a dictionary.

View File

@ -12,6 +12,7 @@
#include "sdk/objc/components/video_codec/nalu_rewriter.h" #include "sdk/objc/components/video_codec/nalu_rewriter.h"
#include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#include <memory> #include <memory>
#include <vector> #include <vector>

View File

@ -12,12 +12,12 @@
#ifndef SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOX_NALU_REWRITER_H_ #ifndef SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOX_NALU_REWRITER_H_
#define SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOX_NALU_REWRITER_H_ #define SDK_OBJC_FRAMEWORK_CLASSES_VIDEOTOOLBOX_NALU_REWRITER_H_
#include "modules/video_coding/codecs/h264/include/h264.h"
#include <CoreMedia/CoreMedia.h> #include <CoreMedia/CoreMedia.h>
#include <vector> #include <vector>
#include "common_video/h264/h264_common.h" #include "common_video/h264/h264_common.h"
#include "modules/video_coding/codecs/h264/include/h264.h"
#include "rtc_base/buffer.h" #include "rtc_base/buffer.h"
using webrtc::H264::NaluIndex; using webrtc::H264::NaluIndex;

View File

@ -11,8 +11,10 @@
#ifndef SDK_OBJC_NATIVE_API_VIDEO_CAPTURER_H_ #ifndef SDK_OBJC_NATIVE_API_VIDEO_CAPTURER_H_
#define SDK_OBJC_NATIVE_API_VIDEO_CAPTURER_H_ #define SDK_OBJC_NATIVE_API_VIDEO_CAPTURER_H_
// import
#import "base/RTCVideoCapturer.h" #import "base/RTCVideoCapturer.h"
// include
#include "api/media_stream_interface.h" #include "api/media_stream_interface.h"
#include "api/scoped_refptr.h" #include "api/scoped_refptr.h"
#include "rtc_base/thread.h" #include "rtc_base/thread.h"

View File

@ -13,9 +13,8 @@
#include <memory> #include <memory>
#import "base/RTCVideoDecoderFactory.h"
#include "api/video_codecs/video_decoder_factory.h" #include "api/video_codecs/video_decoder_factory.h"
#import "base/RTCVideoDecoderFactory.h"
namespace webrtc { namespace webrtc {

View File

@ -13,9 +13,8 @@
#include <memory> #include <memory>
#import "base/RTCVideoEncoderFactory.h"
#include "api/video_codecs/video_encoder_factory.h" #include "api/video_codecs/video_encoder_factory.h"
#import "base/RTCVideoEncoderFactory.h"
namespace webrtc { namespace webrtc {

View File

@ -11,9 +11,8 @@
#ifndef SDK_OBJC_NATIVE_API_VIDEO_FRAME_H_ #ifndef SDK_OBJC_NATIVE_API_VIDEO_FRAME_H_
#define SDK_OBJC_NATIVE_API_VIDEO_FRAME_H_ #define SDK_OBJC_NATIVE_API_VIDEO_FRAME_H_
#import "base/RTCVideoFrame.h"
#include "api/video/video_frame.h" #include "api/video/video_frame.h"
#import "base/RTCVideoFrame.h"
namespace webrtc { namespace webrtc {

View File

@ -11,8 +11,10 @@
#ifndef SDK_OBJC_NATIVE_API_VIDEO_FRAME_BUFFER_H_ #ifndef SDK_OBJC_NATIVE_API_VIDEO_FRAME_BUFFER_H_
#define SDK_OBJC_NATIVE_API_VIDEO_FRAME_BUFFER_H_ #define SDK_OBJC_NATIVE_API_VIDEO_FRAME_BUFFER_H_
// import
#import "base/RTCVideoFrameBuffer.h" #import "base/RTCVideoFrameBuffer.h"
// include
#include "api/scoped_refptr.h" #include "api/scoped_refptr.h"
#include "common_video/include/video_frame_buffer.h" #include "common_video/include/video_frame_buffer.h"

View File

@ -11,12 +11,11 @@
#ifndef SDK_OBJC_NATIVE_API_VIDEO_RENDERER_H_ #ifndef SDK_OBJC_NATIVE_API_VIDEO_RENDERER_H_
#define SDK_OBJC_NATIVE_API_VIDEO_RENDERER_H_ #define SDK_OBJC_NATIVE_API_VIDEO_RENDERER_H_
#import "base/RTCVideoRenderer.h"
#include <memory> #include <memory>
#include "api/video/video_frame.h" #include "api/video/video_frame.h"
#include "api/video/video_sink_interface.h" #include "api/video/video_sink_interface.h"
#import "base/RTCVideoRenderer.h"
namespace webrtc { namespace webrtc {

View File

@ -13,9 +13,8 @@
#include <memory> #include <memory>
#include "audio_device_ios.h"
#include "api/task_queue/task_queue_factory.h" #include "api/task_queue/task_queue_factory.h"
#include "audio_device_ios.h"
#include "modules/audio_device/audio_device_buffer.h" #include "modules/audio_device/audio_device_buffer.h"
#include "modules/audio_device/include/audio_device.h" #include "modules/audio_device/include/audio_device.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"

View File

@ -29,8 +29,7 @@ class ObjCVideoDecoderFactory : public VideoDecoderFactory {
id<RTC_OBJC_TYPE(RTCVideoDecoderFactory)> wrapped_decoder_factory() const; id<RTC_OBJC_TYPE(RTCVideoDecoderFactory)> wrapped_decoder_factory() const;
std::vector<SdpVideoFormat> GetSupportedFormats() const override; std::vector<SdpVideoFormat> GetSupportedFormats() const override;
std::unique_ptr<VideoDecoder> CreateVideoDecoder( std::unique_ptr<VideoDecoder> CreateVideoDecoder(const SdpVideoFormat& format) override;
const SdpVideoFormat& format) override;
private: private:
id<RTC_OBJC_TYPE(RTCVideoDecoderFactory)> decoder_factory_; id<RTC_OBJC_TYPE(RTCVideoDecoderFactory)> decoder_factory_;

View File

@ -31,8 +31,7 @@ class ObjCVideoEncoderFactory : public VideoEncoderFactory {
std::vector<SdpVideoFormat> GetSupportedFormats() const override; std::vector<SdpVideoFormat> GetSupportedFormats() const override;
std::vector<SdpVideoFormat> GetImplementations() const override; std::vector<SdpVideoFormat> GetImplementations() const override;
std::unique_ptr<VideoEncoder> CreateVideoEncoder( std::unique_ptr<VideoEncoder> CreateVideoEncoder(const SdpVideoFormat& format) override;
const SdpVideoFormat& format) override;
std::unique_ptr<EncoderSelectorInterface> GetEncoderSelector() const override; std::unique_ptr<EncoderSelectorInterface> GetEncoderSelector() const override;
private: private:

View File

@ -11,9 +11,8 @@
#ifndef SDK_OBJC_NATIVE_SRC_OBJC_VIDEO_FRAME_H_ #ifndef SDK_OBJC_NATIVE_SRC_OBJC_VIDEO_FRAME_H_
#define SDK_OBJC_NATIVE_SRC_OBJC_VIDEO_FRAME_H_ #define SDK_OBJC_NATIVE_SRC_OBJC_VIDEO_FRAME_H_
#import "base/RTCVideoFrame.h"
#include "api/video/video_frame.h" #include "api/video/video_frame.h"
#import "base/RTCVideoFrame.h"
namespace webrtc { namespace webrtc {