diff --git a/sdk/android/native_api/codecs/wrapper.h b/sdk/android/native_api/codecs/wrapper.h index 04201699bc..16d32947ed 100644 --- a/sdk/android/native_api/codecs/wrapper.h +++ b/sdk/android/native_api/codecs/wrapper.h @@ -12,6 +12,7 @@ #define SDK_ANDROID_NATIVE_API_CODECS_WRAPPER_H_ #include + #include #include diff --git a/sdk/android/native_api/stacktrace/stacktrace.cc b/sdk/android/native_api/stacktrace/stacktrace.cc index 96e03e0af1..94b9b7b717 100644 --- a/sdk/android/native_api/stacktrace/stacktrace.cc +++ b/sdk/android/native_api/stacktrace/stacktrace.cc @@ -19,6 +19,7 @@ #include #include #include + #include // ptrace.h is polluting the namespace. Clean up to avoid conflicts with rtc. diff --git a/sdk/android/native_api/video/wrapper.h b/sdk/android/native_api/video/wrapper.h index e32cf34806..3cfcb054c6 100644 --- a/sdk/android/native_api/video/wrapper.h +++ b/sdk/android/native_api/video/wrapper.h @@ -12,6 +12,7 @@ #define SDK_ANDROID_NATIVE_API_VIDEO_WRAPPER_H_ #include + #include #include "api/media_stream_interface.h" diff --git a/sdk/android/native_unittests/codecs/wrapper_unittest.cc b/sdk/android/native_unittests/codecs/wrapper_unittest.cc index c858095d05..6a43480164 100644 --- a/sdk/android/native_unittests/codecs/wrapper_unittest.cc +++ b/sdk/android/native_unittests/codecs/wrapper_unittest.cc @@ -8,12 +8,13 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "sdk/android/native_api/codecs/wrapper.h" + #include #include "absl/memory/memory.h" #include "media/base/media_constants.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 "test/gtest.h" diff --git a/sdk/android/native_unittests/java_types_unittest.cc b/sdk/android/native_unittests/java_types_unittest.cc index 4e7a6ed7ca..9e99001d19 100644 --- a/sdk/android/native_unittests/java_types_unittest.cc +++ b/sdk/android/native_unittests/java_types_unittest.cc @@ -8,11 +8,12 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "sdk/android/native_api/jni/java_types.h" + #include #include #include "sdk/android/generated_native_unittests_jni/JavaTypesTestHelper_jni.h" -#include "sdk/android/native_api/jni/java_types.h" #include "test/gtest.h" namespace webrtc { @@ -26,7 +27,9 @@ TEST(JavaTypesTest, TestJavaToNativeStringMap) { std::map output = JavaToNativeStringMap(env, j_map); std::map expected{ - {"one", "1"}, {"two", "2"}, {"three", "3"}, + {"one", "1"}, + {"two", "2"}, + {"three", "3"}, }; EXPECT_EQ(expected, output); } diff --git a/sdk/android/native_unittests/video/video_source_unittest.cc b/sdk/android/native_unittests/video/video_source_unittest.cc index 3c4eed1fc3..36dd5c4573 100644 --- a/sdk/android/native_unittests/video/video_source_unittest.cc +++ b/sdk/android/native_unittests/video/video_source_unittest.cc @@ -8,11 +8,12 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "sdk/android/native_api/video/video_source.h" + #include #include "api/video/video_sink_interface.h" #include "sdk/android/generated_native_unittests_jni/JavaVideoSourceTestHelper_jni.h" -#include "sdk/android/native_api/video/video_source.h" #include "test/gtest.h" namespace webrtc { diff --git a/sdk/android/src/jni/android_histogram.cc b/sdk/android/src/jni/android_histogram.cc index 498f143743..aa4c0a28be 100644 --- a/sdk/android/src/jni/android_histogram.cc +++ b/sdk/android/src/jni/android_histogram.cc @@ -38,9 +38,7 @@ static jlong JNI_Histogram_CreateEnumeration( return jlongFromPointer(metrics::HistogramFactoryGetEnumeration(name, max)); } -static void JNI_Histogram_AddSample(JNIEnv* jni, - jlong histogram, - jint sample) { +static void JNI_Histogram_AddSample(JNIEnv* jni, jlong histogram, jint sample) { if (histogram) { HistogramAdd(reinterpret_cast(histogram), sample); } diff --git a/sdk/android/src/jni/android_video_track_source.cc b/sdk/android/src/jni/android_video_track_source.cc index d553af2445..e7bf5b9423 100644 --- a/sdk/android/src/jni/android_video_track_source.cc +++ b/sdk/android/src/jni/android_video_track_source.cc @@ -58,8 +58,7 @@ absl::optional AndroidVideoTrackSource::needs_denoising() const { return false; } -void AndroidVideoTrackSource::SetState(JNIEnv* env, - jboolean j_is_live) { +void AndroidVideoTrackSource::SetState(JNIEnv* env, jboolean j_is_live) { const SourceState state = j_is_live ? kLive : kEnded; if (state_.exchange(state) != state) { if (rtc::Thread::Current() == signaling_thread_) { diff --git a/sdk/android/src/jni/android_video_track_source.h b/sdk/android/src/jni/android_video_track_source.h index 625633b90b..9099ce698d 100644 --- a/sdk/android/src/jni/android_video_track_source.h +++ b/sdk/android/src/jni/android_video_track_source.h @@ -70,8 +70,7 @@ class AndroidVideoTrackSource : public rtc::AdaptedVideoTrackSource { jlong j_timestamp_ns, const JavaRef& j_video_frame_buffer); - void SetState(JNIEnv* env, - jboolean j_is_live); + void SetState(JNIEnv* env, jboolean j_is_live); void AdaptOutputFormat(JNIEnv* env, jint j_landscape_width, diff --git a/sdk/android/src/jni/audio_device/audio_track_jni.cc b/sdk/android/src/jni/audio_device/audio_track_jni.cc index c1ff4c30e2..512c10f545 100644 --- a/sdk/android/src/jni/audio_device/audio_track_jni.cc +++ b/sdk/android/src/jni/audio_device/audio_track_jni.cc @@ -244,8 +244,7 @@ void AudioTrackJni::CacheDirectBufferAddress( // This method is called on a high-priority thread from Java. The name of // the thread is 'AudioRecordTrack'. -void AudioTrackJni::GetPlayoutData(JNIEnv* env, - size_t length) { +void AudioTrackJni::GetPlayoutData(JNIEnv* env, size_t length) { RTC_DCHECK(thread_checker_java_.IsCurrent()); const size_t bytes_per_frame = audio_parameters_.channels() * sizeof(int16_t); RTC_DCHECK_EQ(frames_per_buffer_, length / bytes_per_frame); diff --git a/sdk/android/src/jni/builtin_audio_decoder_factory_factory.cc b/sdk/android/src/jni/builtin_audio_decoder_factory_factory.cc index d445cc754e..5cd95c6def 100644 --- a/sdk/android/src/jni/builtin_audio_decoder_factory_factory.cc +++ b/sdk/android/src/jni/builtin_audio_decoder_factory_factory.cc @@ -8,12 +8,11 @@ * 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/native_api/jni/java_types.h" #include "sdk/android/src/jni/jni_helpers.h" -#include "api/audio_codecs/builtin_audio_decoder_factory.h" - namespace webrtc { namespace jni { diff --git a/sdk/android/src/jni/builtin_audio_encoder_factory_factory.cc b/sdk/android/src/jni/builtin_audio_encoder_factory_factory.cc index e5a4b10eee..352b8da8e6 100644 --- a/sdk/android/src/jni/builtin_audio_encoder_factory_factory.cc +++ b/sdk/android/src/jni/builtin_audio_encoder_factory_factory.cc @@ -8,12 +8,11 @@ * 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/native_api/jni/java_types.h" #include "sdk/android/src/jni/jni_helpers.h" -#include "api/audio_codecs/builtin_audio_encoder_factory.h" - namespace webrtc { namespace jni { diff --git a/sdk/android/src/jni/encoded_image.h b/sdk/android/src/jni/encoded_image.h index fc6d06243c..2e892861ae 100644 --- a/sdk/android/src/jni/encoded_image.h +++ b/sdk/android/src/jni/encoded_image.h @@ -12,10 +12,10 @@ #define SDK_ANDROID_SRC_JNI_ENCODED_IMAGE_H_ #include + #include #include "api/video/video_frame_type.h" - #include "sdk/android/native_api/jni/scoped_java_ref.h" namespace webrtc { diff --git a/sdk/android/src/jni/jni_common.cc b/sdk/android/src/jni/jni_common.cc index 3764f8deeb..b4ad2d5a6d 100644 --- a/sdk/android/src/jni/jni_common.cc +++ b/sdk/android/src/jni/jni_common.cc @@ -27,9 +27,8 @@ static void JNI_JniCommon_ReleaseRef(JNIEnv* jni, ->Release(); } -static ScopedJavaLocalRef JNI_JniCommon_AllocateByteBuffer( - JNIEnv* jni, - jint size) { +static ScopedJavaLocalRef JNI_JniCommon_AllocateByteBuffer(JNIEnv* jni, + jint size) { void* new_data = ::operator new(size); return NewDirectByteBuffer(jni, new_data, size); } diff --git a/sdk/android/src/jni/jni_generator_helper.h b/sdk/android/src/jni/jni_generator_helper.h index 23695ca8c7..17b5764583 100644 --- a/sdk/android/src/jni/jni_generator_helper.h +++ b/sdk/android/src/jni/jni_generator_helper.h @@ -15,6 +15,7 @@ #define SDK_ANDROID_SRC_JNI_JNI_GENERATOR_HELPER_H_ #include + #include #include "rtc_base/checks.h" @@ -82,9 +83,9 @@ namespace android { using webrtc::JavaParamRef; using webrtc::JavaRef; -using webrtc::ScopedJavaLocalRef; using webrtc::LazyGetClass; using webrtc::MethodID; +using webrtc::ScopedJavaLocalRef; } // namespace android } // namespace base diff --git a/sdk/android/src/jni/jni_helpers.h b/sdk/android/src/jni/jni_helpers.h index 7a2f27b99d..4e5781027a 100644 --- a/sdk/android/src/jni/jni_helpers.h +++ b/sdk/android/src/jni/jni_helpers.h @@ -15,6 +15,7 @@ #define SDK_ANDROID_SRC_JNI_JNI_HELPERS_H_ #include + #include #include "sdk/android/native_api/jni/java_types.h" diff --git a/sdk/android/src/jni/libaom_av1_encoder.cc b/sdk/android/src/jni/libaom_av1_encoder.cc index 400c3124fe..96e0dda169 100644 --- a/sdk/android/src/jni/libaom_av1_encoder.cc +++ b/sdk/android/src/jni/libaom_av1_encoder.cc @@ -8,9 +8,10 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "modules/video_coding/codecs/av1/libaom_av1_encoder.h" + #include -#include "modules/video_coding/codecs/av1/libaom_av1_encoder.h" #include "sdk/android/generated_libaom_av1_encoder_jni/LibaomAv1Encoder_jni.h" #include "sdk/android/src/jni/jni_helpers.h" diff --git a/sdk/android/src/jni/nv12_buffer.cc b/sdk/android/src/jni/nv12_buffer.cc index d0e7972446..4a51f895c1 100644 --- a/sdk/android/src/jni/nv12_buffer.cc +++ b/sdk/android/src/jni/nv12_buffer.cc @@ -9,13 +9,13 @@ */ #include -#include -#include "third_party/libyuv/include/libyuv/convert.h" -#include "third_party/libyuv/include/libyuv/scale.h" +#include #include "rtc_base/checks.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 jni { diff --git a/sdk/android/src/jni/nv21_buffer.cc b/sdk/android/src/jni/nv21_buffer.cc index 10e3316f33..ad43698648 100644 --- a/sdk/android/src/jni/nv21_buffer.cc +++ b/sdk/android/src/jni/nv21_buffer.cc @@ -9,14 +9,14 @@ */ #include -#include -#include "third_party/libyuv/include/libyuv/convert.h" -#include "third_party/libyuv/include/libyuv/scale.h" +#include #include "common_video/libyuv/include/webrtc_libyuv.h" #include "rtc_base/checks.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 jni { diff --git a/sdk/android/src/jni/pc/audio_track.cc b/sdk/android/src/jni/pc/audio_track.cc index b00287eaae..36ed43f1d4 100644 --- a/sdk/android/src/jni/pc/audio_track.cc +++ b/sdk/android/src/jni/pc/audio_track.cc @@ -14,9 +14,7 @@ namespace webrtc { namespace jni { -static void JNI_AudioTrack_SetVolume(JNIEnv*, - jlong j_p, - jdouble volume) { +static void JNI_AudioTrack_SetVolume(JNIEnv*, jlong j_p, jdouble volume) { rtc::scoped_refptr source( reinterpret_cast(j_p)->GetSource()); source->SetVolume(volume); diff --git a/sdk/android/src/jni/pc/call_session_file_rotating_log_sink.cc b/sdk/android/src/jni/pc/call_session_file_rotating_log_sink.cc index b937a0d03a..cef4df500a 100644 --- a/sdk/android/src/jni/pc/call_session_file_rotating_log_sink.cc +++ b/sdk/android/src/jni/pc/call_session_file_rotating_log_sink.cc @@ -36,9 +36,8 @@ static jlong JNI_CallSessionFileRotatingLogSink_AddSink( return jlongFromPointer(sink); } -static void JNI_CallSessionFileRotatingLogSink_DeleteSink( - JNIEnv* jni, - jlong j_sink) { +static void JNI_CallSessionFileRotatingLogSink_DeleteSink(JNIEnv* jni, + jlong j_sink) { rtc::CallSessionFileRotatingLogSink* sink = reinterpret_cast(j_sink); rtc::LogMessage::RemoveLogToStream(sink); diff --git a/sdk/android/src/jni/pc/data_channel.cc b/sdk/android/src/jni/pc/data_channel.cc index 3552974443..c08aed5525 100644 --- a/sdk/android/src/jni/pc/data_channel.cc +++ b/sdk/android/src/jni/pc/data_channel.cc @@ -8,16 +8,16 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include +#include "sdk/android/src/jni/pc/data_channel.h" #include +#include #include "api/data_channel_interface.h" #include "rtc_base/logging.h" #include "sdk/android/generated_peerconnection_jni/DataChannel_jni.h" #include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/src/jni/jni_helpers.h" -#include "sdk/android/src/jni/pc/data_channel.h" namespace webrtc { namespace jni { diff --git a/sdk/android/src/jni/pc/data_channel.h b/sdk/android/src/jni/pc/data_channel.h index 9da1b67dae..c034f2d78b 100644 --- a/sdk/android/src/jni/pc/data_channel.h +++ b/sdk/android/src/jni/pc/data_channel.h @@ -11,6 +11,9 @@ #ifndef 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 jni { diff --git a/sdk/android/src/jni/pc/dtmf_sender.cc b/sdk/android/src/jni/pc/dtmf_sender.cc index 13cb027f6d..cbf1928b13 100644 --- a/sdk/android/src/jni/pc/dtmf_sender.cc +++ b/sdk/android/src/jni/pc/dtmf_sender.cc @@ -39,8 +39,7 @@ static ScopedJavaLocalRef JNI_DtmfSender_Tones( reinterpret_cast(j_dtmf_sender_pointer)->tones()); } -static jint JNI_DtmfSender_Duration(JNIEnv* jni, - jlong j_dtmf_sender_pointer) { +static jint JNI_DtmfSender_Duration(JNIEnv* jni, jlong j_dtmf_sender_pointer) { return reinterpret_cast(j_dtmf_sender_pointer) ->duration(); } diff --git a/sdk/android/src/jni/pc/logging.cc b/sdk/android/src/jni/pc/logging.cc index 7b35ca051c..cbfc99f95b 100644 --- a/sdk/android/src/jni/pc/logging.cc +++ b/sdk/android/src/jni/pc/logging.cc @@ -8,9 +8,10 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "rtc_base/logging.h" + #include -#include "rtc_base/logging.h" #include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/src/jni/jni_helpers.h" diff --git a/sdk/android/src/jni/pc/media_constraints.h b/sdk/android/src/jni/pc/media_constraints.h index 68cedc7f2d..9f8aacba4e 100644 --- a/sdk/android/src/jni/pc/media_constraints.h +++ b/sdk/android/src/jni/pc/media_constraints.h @@ -12,6 +12,7 @@ #define SDK_ANDROID_SRC_JNI_PC_MEDIA_CONSTRAINTS_H_ #include + #include #include "sdk/android/native_api/jni/scoped_java_ref.h" diff --git a/sdk/android/src/jni/pc/media_stream.h b/sdk/android/src/jni/pc/media_stream.h index efa177c43e..a47776499e 100644 --- a/sdk/android/src/jni/pc/media_stream.h +++ b/sdk/android/src/jni/pc/media_stream.h @@ -12,6 +12,7 @@ #define SDK_ANDROID_SRC_JNI_PC_MEDIA_STREAM_H_ #include + #include #include "api/media_stream_interface.h" diff --git a/sdk/android/src/jni/pc/media_stream_track.cc b/sdk/android/src/jni/pc/media_stream_track.cc index 928f10c03a..225b608e1c 100644 --- a/sdk/android/src/jni/pc/media_stream_track.cc +++ b/sdk/android/src/jni/pc/media_stream_track.cc @@ -30,28 +30,24 @@ cricket::MediaType JavaToNativeMediaType(JNIEnv* jni, Java_MediaType_getNative(jni, j_media_type)); } -static ScopedJavaLocalRef JNI_MediaStreamTrack_GetId( - JNIEnv* jni, - jlong j_p) { +static ScopedJavaLocalRef JNI_MediaStreamTrack_GetId(JNIEnv* jni, + jlong j_p) { return NativeToJavaString( jni, reinterpret_cast(j_p)->id()); } -static ScopedJavaLocalRef JNI_MediaStreamTrack_GetKind( - JNIEnv* jni, - jlong j_p) { +static ScopedJavaLocalRef JNI_MediaStreamTrack_GetKind(JNIEnv* jni, + jlong j_p) { return NativeToJavaString( jni, reinterpret_cast(j_p)->kind()); } -static jboolean JNI_MediaStreamTrack_GetEnabled(JNIEnv* jni, - jlong j_p) { +static jboolean JNI_MediaStreamTrack_GetEnabled(JNIEnv* jni, jlong j_p) { return reinterpret_cast(j_p)->enabled(); } -static ScopedJavaLocalRef JNI_MediaStreamTrack_GetState( - JNIEnv* jni, - jlong j_p) { +static ScopedJavaLocalRef JNI_MediaStreamTrack_GetState(JNIEnv* jni, + jlong j_p) { return Java_State_fromNativeIndex( jni, reinterpret_cast(j_p)->state()); } diff --git a/sdk/android/src/jni/pc/owned_factory_and_threads.h b/sdk/android/src/jni/pc/owned_factory_and_threads.h index 7dc9443ea5..865063dbd8 100644 --- a/sdk/android/src/jni/pc/owned_factory_and_threads.h +++ b/sdk/android/src/jni/pc/owned_factory_and_threads.h @@ -12,6 +12,7 @@ #define SDK_ANDROID_SRC_JNI_PC_OWNED_FACTORY_AND_THREADS_H_ #include + #include #include diff --git a/sdk/android/src/jni/pc/peer_connection_factory.cc b/sdk/android/src/jni/pc/peer_connection_factory.cc index 045a2b9d84..4c682089db 100644 --- a/sdk/android/src/jni/pc/peer_connection_factory.cc +++ b/sdk/android/src/jni/pc/peer_connection_factory.cc @@ -350,8 +350,7 @@ JNI_PeerConnectionFactory_CreatePeerConnectionFactory( TakeOwnershipOfUniquePtr(native_neteq_factory)); } -static void JNI_PeerConnectionFactory_FreeFactory(JNIEnv*, - jlong j_p) { +static void JNI_PeerConnectionFactory_FreeFactory(JNIEnv*, jlong j_p) { delete reinterpret_cast(j_p); field_trial::InitFieldTrialsFromString(nullptr); GetStaticObjects().field_trials_init_string = nullptr; diff --git a/sdk/android/src/jni/pc/peer_connection_factory.h b/sdk/android/src/jni/pc/peer_connection_factory.h index b5d5e5dcb7..337d32a46d 100644 --- a/sdk/android/src/jni/pc/peer_connection_factory.h +++ b/sdk/android/src/jni/pc/peer_connection_factory.h @@ -12,6 +12,7 @@ #define SDK_ANDROID_SRC_JNI_PC_PEER_CONNECTION_FACTORY_H_ #include + #include "api/peer_connection_interface.h" #include "rtc_base/thread.h" diff --git a/sdk/android/src/jni/pc/rtc_certificate.cc b/sdk/android/src/jni/pc/rtc_certificate.cc index f305324ac8..db7c150ca5 100644 --- a/sdk/android/src/jni/pc/rtc_certificate.cc +++ b/sdk/android/src/jni/pc/rtc_certificate.cc @@ -9,7 +9,6 @@ */ #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/rtc_certificate.h" @@ -17,6 +16,7 @@ #include "sdk/android/generated_peerconnection_jni/RtcCertificatePem_jni.h" #include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/src/jni/jni_helpers.h" +#include "sdk/android/src/jni/pc/ice_candidate.h" namespace webrtc { namespace jni { diff --git a/sdk/android/src/jni/pc/rtp_sender.cc b/sdk/android/src/jni/pc/rtp_sender.cc index fc83862958..ddb53f69c7 100644 --- a/sdk/android/src/jni/pc/rtp_sender.cc +++ b/sdk/android/src/jni/pc/rtp_sender.cc @@ -35,8 +35,7 @@ static jboolean JNI_RtpSender_SetTrack(JNIEnv* jni, ->SetTrack(reinterpret_cast(j_track_pointer)); } -jlong JNI_RtpSender_GetTrack(JNIEnv* jni, - jlong j_rtp_sender_pointer) { +jlong JNI_RtpSender_GetTrack(JNIEnv* jni, jlong j_rtp_sender_pointer) { // MediaStreamTrack will have shared ownership by the MediaStreamTrack Java // object. return jlongFromPointer( @@ -65,8 +64,7 @@ ScopedJavaLocalRef JNI_RtpSender_GetStreams( convert_function); } -jlong JNI_RtpSender_GetDtmfSender(JNIEnv* jni, - jlong j_rtp_sender_pointer) { +jlong JNI_RtpSender_GetDtmfSender(JNIEnv* jni, jlong j_rtp_sender_pointer) { return jlongFromPointer( reinterpret_cast(j_rtp_sender_pointer) ->GetDtmfSender() diff --git a/sdk/android/src/jni/pc/session_description.h b/sdk/android/src/jni/pc/session_description.h index f0f49cb2ee..6b3b4bc4c3 100644 --- a/sdk/android/src/jni/pc/session_description.h +++ b/sdk/android/src/jni/pc/session_description.h @@ -12,6 +12,7 @@ #define SDK_ANDROID_SRC_JNI_PC_SESSION_DESCRIPTION_H_ #include + #include #include diff --git a/sdk/android/src/jni/pc/ssl_certificate_verifier_wrapper.cc b/sdk/android/src/jni/pc/ssl_certificate_verifier_wrapper.cc index 74ef3b8049..20c0a0fd5b 100644 --- a/sdk/android/src/jni/pc/ssl_certificate_verifier_wrapper.cc +++ b/sdk/android/src/jni/pc/ssl_certificate_verifier_wrapper.cc @@ -9,6 +9,7 @@ */ #include "sdk/android/src/jni/pc/ssl_certificate_verifier_wrapper.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/java_types.h" diff --git a/sdk/android/src/jni/pc/ssl_certificate_verifier_wrapper.h b/sdk/android/src/jni/pc/ssl_certificate_verifier_wrapper.h index 8c883f445b..a9972999df 100644 --- a/sdk/android/src/jni/pc/ssl_certificate_verifier_wrapper.h +++ b/sdk/android/src/jni/pc/ssl_certificate_verifier_wrapper.h @@ -12,6 +12,7 @@ #define SDK_ANDROID_SRC_JNI_PC_SSL_CERTIFICATE_VERIFIER_WRAPPER_H_ #include + #include #include "rtc_base/ssl_certificate.h" diff --git a/sdk/android/src/jni/pc/turn_customizer.cc b/sdk/android/src/jni/pc/turn_customizer.cc index 5c93fcd7c0..94ebf0140d 100644 --- a/sdk/android/src/jni/pc/turn_customizer.cc +++ b/sdk/android/src/jni/pc/turn_customizer.cc @@ -9,6 +9,7 @@ */ #include "api/turn_customizer.h" + #include "sdk/android/generated_peerconnection_jni/TurnCustomizer_jni.h" #include "sdk/android/native_api/jni/java_types.h" #include "sdk/android/src/jni/jni_helpers.h" diff --git a/sdk/android/src/jni/timestamp_aligner.cc b/sdk/android/src/jni/timestamp_aligner.cc index c0c5fd9d9f..19f2f63492 100644 --- a/sdk/android/src/jni/timestamp_aligner.cc +++ b/sdk/android/src/jni/timestamp_aligner.cc @@ -8,10 +8,11 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "rtc_base/timestamp_aligner.h" + #include #include "rtc_base/time_utils.h" -#include "rtc_base/timestamp_aligner.h" #include "sdk/android/generated_video_jni/TimestampAligner_jni.h" #include "sdk/android/src/jni/jni_helpers.h" @@ -32,10 +33,9 @@ static void JNI_TimestampAligner_ReleaseTimestampAligner( delete reinterpret_cast(timestamp_aligner); } -static jlong JNI_TimestampAligner_TranslateTimestamp( - JNIEnv* env, - jlong timestamp_aligner, - jlong camera_time_ns) { +static jlong JNI_TimestampAligner_TranslateTimestamp(JNIEnv* env, + jlong timestamp_aligner, + jlong camera_time_ns) { return reinterpret_cast(timestamp_aligner) ->TranslateTimestamp(camera_time_ns / rtc::kNumNanosecsPerMicrosec, rtc::TimeMicros()) * diff --git a/sdk/android/src/jni/video_decoder_wrapper.cc b/sdk/android/src/jni/video_decoder_wrapper.cc index aa83e82403..22bfe77944 100644 --- a/sdk/android/src/jni/video_decoder_wrapper.cc +++ b/sdk/android/src/jni/video_decoder_wrapper.cc @@ -87,10 +87,9 @@ bool VideoDecoderWrapper::ConfigureInternal(JNIEnv* jni) { return status == WEBRTC_VIDEO_CODEC_OK; } -int32_t VideoDecoderWrapper::Decode( - const EncodedImage& image_param, - bool missing_frames, - int64_t render_time_ms) { +int32_t VideoDecoderWrapper::Decode(const EncodedImage& image_param, + bool missing_frames, + int64_t render_time_ms) { RTC_DCHECK_RUN_ON(&decoder_thread_checker_); if (!initialized_) { // Most likely initializing the codec failed. diff --git a/sdk/android/src/jni/video_encoder_factory_wrapper.h b/sdk/android/src/jni/video_encoder_factory_wrapper.h index 2be6b1b33f..bf6d1e3833 100644 --- a/sdk/android/src/jni/video_encoder_factory_wrapper.h +++ b/sdk/android/src/jni/video_encoder_factory_wrapper.h @@ -12,6 +12,7 @@ #define SDK_ANDROID_SRC_JNI_VIDEO_ENCODER_FACTORY_WRAPPER_H_ #include + #include #include "api/video_codecs/sdp_video_format.h" diff --git a/sdk/android/src/jni/video_encoder_wrapper.h b/sdk/android/src/jni/video_encoder_wrapper.h index 5c5aab7588..d3eb2203f0 100644 --- a/sdk/android/src/jni/video_encoder_wrapper.h +++ b/sdk/android/src/jni/video_encoder_wrapper.h @@ -51,8 +51,7 @@ class VideoEncoderWrapper : public VideoEncoder { EncoderInfo GetEncoderInfo() const override; // Should only be called by JNI. - void OnEncodedFrame(JNIEnv* jni, - const JavaRef& j_encoded_image); + void OnEncodedFrame(JNIEnv* jni, const JavaRef& j_encoded_image); private: struct FrameExtraInfo { diff --git a/sdk/android/src/jni/video_track.cc b/sdk/android/src/jni/video_track.cc index 70bedc12cf..eb343ebdb3 100644 --- a/sdk/android/src/jni/video_track.cc +++ b/sdk/android/src/jni/video_track.cc @@ -40,8 +40,7 @@ static jlong JNI_VideoTrack_WrapSink(JNIEnv* jni, return jlongFromPointer(new VideoSinkWrapper(jni, sink)); } -static void JNI_VideoTrack_FreeSink(JNIEnv* jni, - jlong j_native_sink) { +static void JNI_VideoTrack_FreeSink(JNIEnv* jni, jlong j_native_sink) { delete reinterpret_cast*>(j_native_sink); } diff --git a/sdk/media_constraints.h b/sdk/media_constraints.h index c946e4fab1..a428abdce0 100644 --- a/sdk/media_constraints.h +++ b/sdk/media_constraints.h @@ -17,6 +17,7 @@ #define SDK_MEDIA_CONSTRAINTS_H_ #include + #include #include #include @@ -59,10 +60,10 @@ class MediaConstraints { // These keys are google specific. static const char kGoogEchoCancellation[]; // googEchoCancellation - static const char kAutoGainControl[]; // googAutoGainControl - static const char kNoiseSuppression[]; // googNoiseSuppression - static const char kHighpassFilter[]; // googHighpassFilter - static const char kAudioMirroring[]; // googAudioMirroring + static const char kAutoGainControl[]; // googAutoGainControl + static const char kNoiseSuppression[]; // googNoiseSuppression + static const char kHighpassFilter[]; // googHighpassFilter + static const char kAudioMirroring[]; // googAudioMirroring static const char kAudioNetworkAdaptorConfig[]; // googAudioNetworkAdaptorConfig static const char kInitAudioRecordingOnSend[]; // InitAudioRecordingOnSend; diff --git a/sdk/objc/api/logging/RTCCallbackLogger.h b/sdk/objc/api/logging/RTCCallbackLogger.h index c1aeb825cb..1d178b6d49 100644 --- a/sdk/objc/api/logging/RTCCallbackLogger.h +++ b/sdk/objc/api/logging/RTCCallbackLogger.h @@ -32,7 +32,7 @@ RTC_OBJC_EXPORT // to implement dispatching to some other queue. - (void)start:(nullable RTCCallbackLoggerMessageHandler)handler; - (void)startWithMessageAndSeverityHandler: - (nullable RTCCallbackLoggerMessageAndSeverityHandler)handler; + (nullable RTCCallbackLoggerMessageAndSeverityHandler)handler; - (void)stop; diff --git a/sdk/objc/api/peerconnection/RTCConfiguration+Private.h b/sdk/objc/api/peerconnection/RTCConfiguration+Private.h index 70a6532dbc..6ad780acdc 100644 --- a/sdk/objc/api/peerconnection/RTCConfiguration+Private.h +++ b/sdk/objc/api/peerconnection/RTCConfiguration+Private.h @@ -21,39 +21,39 @@ NS_ASSUME_NONNULL_BEGIN : (RTCIceTransportPolicy)policy; + (RTCIceTransportPolicy)transportPolicyForTransportsType: - (webrtc::PeerConnectionInterface::IceTransportsType)nativeType; + (webrtc::PeerConnectionInterface::IceTransportsType)nativeType; + (NSString *)stringForTransportPolicy:(RTCIceTransportPolicy)policy; + (webrtc::PeerConnectionInterface::BundlePolicy)nativeBundlePolicyForPolicy: - (RTCBundlePolicy)policy; + (RTCBundlePolicy)policy; + (RTCBundlePolicy)bundlePolicyForNativePolicy: - (webrtc::PeerConnectionInterface::BundlePolicy)nativePolicy; + (webrtc::PeerConnectionInterface::BundlePolicy)nativePolicy; + (NSString *)stringForBundlePolicy:(RTCBundlePolicy)policy; + (webrtc::PeerConnectionInterface::RtcpMuxPolicy)nativeRtcpMuxPolicyForPolicy: - (RTCRtcpMuxPolicy)policy; + (RTCRtcpMuxPolicy)policy; + (RTCRtcpMuxPolicy)rtcpMuxPolicyForNativePolicy: - (webrtc::PeerConnectionInterface::RtcpMuxPolicy)nativePolicy; + (webrtc::PeerConnectionInterface::RtcpMuxPolicy)nativePolicy; + (NSString *)stringForRtcpMuxPolicy:(RTCRtcpMuxPolicy)policy; + (webrtc::PeerConnectionInterface::TcpCandidatePolicy)nativeTcpCandidatePolicyForPolicy: - (RTCTcpCandidatePolicy)policy; + (RTCTcpCandidatePolicy)policy; + (RTCTcpCandidatePolicy)tcpCandidatePolicyForNativePolicy: - (webrtc::PeerConnectionInterface::TcpCandidatePolicy)nativePolicy; + (webrtc::PeerConnectionInterface::TcpCandidatePolicy)nativePolicy; + (NSString *)stringForTcpCandidatePolicy:(RTCTcpCandidatePolicy)policy; + (webrtc::PeerConnectionInterface::CandidateNetworkPolicy)nativeCandidateNetworkPolicyForPolicy: - (RTCCandidateNetworkPolicy)policy; + (RTCCandidateNetworkPolicy)policy; + (RTCCandidateNetworkPolicy)candidateNetworkPolicyForNativePolicy: - (webrtc::PeerConnectionInterface::CandidateNetworkPolicy)nativePolicy; + (webrtc::PeerConnectionInterface::CandidateNetworkPolicy)nativePolicy; + (NSString *)stringForCandidateNetworkPolicy:(RTCCandidateNetworkPolicy)policy; @@ -72,7 +72,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable webrtc::PeerConnectionInterface::RTCConfiguration *)createNativeConfiguration; - (instancetype)initWithNativeConfiguration: - (const webrtc::PeerConnectionInterface::RTCConfiguration &)config NS_DESIGNATED_INITIALIZER; + (const webrtc::PeerConnectionInterface::RTCConfiguration &)config NS_DESIGNATED_INITIALIZER; @end diff --git a/sdk/objc/api/peerconnection/RTCDataChannel+Private.h b/sdk/objc/api/peerconnection/RTCDataChannel+Private.h index 2cdbdabec6..d903b0c002 100644 --- a/sdk/objc/api/peerconnection/RTCDataChannel+Private.h +++ b/sdk/objc/api/peerconnection/RTCDataChannel+Private.h @@ -40,10 +40,10 @@ NS_ASSUME_NONNULL_BEGIN : (rtc::scoped_refptr)nativeDataChannel NS_DESIGNATED_INITIALIZER; + (webrtc::DataChannelInterface::DataState)nativeDataChannelStateForState: - (RTCDataChannelState)state; + (RTCDataChannelState)state; + (RTCDataChannelState)dataChannelStateForNativeState: - (webrtc::DataChannelInterface::DataState)nativeState; + (webrtc::DataChannelInterface::DataState)nativeState; + (NSString *)stringForState:(RTCDataChannelState)state; diff --git a/sdk/objc/api/peerconnection/RTCDtmfSender+Private.h b/sdk/objc/api/peerconnection/RTCDtmfSender+Private.h index 49a62164cd..627d02a6c8 100644 --- a/sdk/objc/api/peerconnection/RTCDtmfSender+Private.h +++ b/sdk/objc/api/peerconnection/RTCDtmfSender+Private.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN /** Initialize an RTCDtmfSender with a native DtmfSenderInterface. */ - (instancetype)initWithNativeDtmfSender: - (rtc::scoped_refptr)nativeDtmfSender NS_DESIGNATED_INITIALIZER; + (rtc::scoped_refptr)nativeDtmfSender NS_DESIGNATED_INITIALIZER; @end diff --git a/sdk/objc/api/peerconnection/RTCFieldTrials.h b/sdk/objc/api/peerconnection/RTCFieldTrials.h index 3e8fcc8075..2c00e11721 100644 --- a/sdk/objc/api/peerconnection/RTCFieldTrials.h +++ b/sdk/objc/api/peerconnection/RTCFieldTrials.h @@ -14,14 +14,14 @@ /** The only valid value for the following if set is kRTCFieldTrialEnabledValue. */ RTC_EXTERN NSString *const kRTCFieldTrialAudioForceABWENoTWCCKey; -RTC_EXTERN NSString * const kRTCFieldTrialFlexFec03AdvertisedKey; -RTC_EXTERN NSString * const kRTCFieldTrialFlexFec03Key; -RTC_EXTERN NSString * const kRTCFieldTrialH264HighProfileKey; -RTC_EXTERN NSString * const kRTCFieldTrialMinimizeResamplingOnMobileKey; +RTC_EXTERN NSString *const kRTCFieldTrialFlexFec03AdvertisedKey; +RTC_EXTERN NSString *const kRTCFieldTrialFlexFec03Key; +RTC_EXTERN NSString *const kRTCFieldTrialH264HighProfileKey; +RTC_EXTERN NSString *const kRTCFieldTrialMinimizeResamplingOnMobileKey; RTC_EXTERN NSString *const kRTCFieldTrialUseNWPathMonitor; /** 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 * values. See above for valid keys and values. Must be called before any other diff --git a/sdk/objc/api/peerconnection/RTCMediaStreamTrack+Private.h b/sdk/objc/api/peerconnection/RTCMediaStreamTrack+Private.h index ee51e27b2d..df45c79f44 100644 --- a/sdk/objc/api/peerconnection/RTCMediaStreamTrack+Private.h +++ b/sdk/objc/api/peerconnection/RTCMediaStreamTrack+Private.h @@ -46,10 +46,10 @@ NS_ASSUME_NONNULL_BEGIN - (BOOL)isEqualToTrack:(RTC_OBJC_TYPE(RTCMediaStreamTrack) *)track; + (webrtc::MediaStreamTrackInterface::TrackState)nativeTrackStateForState: - (RTCMediaStreamTrackState)state; + (RTCMediaStreamTrackState)state; + (RTCMediaStreamTrackState)trackStateForNativeState: - (webrtc::MediaStreamTrackInterface::TrackState)nativeState; + (webrtc::MediaStreamTrackInterface::TrackState)nativeState; + (NSString *)stringForState:(RTCMediaStreamTrackState)state; diff --git a/sdk/objc/api/peerconnection/RTCPeerConnection+Private.h b/sdk/objc/api/peerconnection/RTCPeerConnection+Private.h index 00f2ef7834..9714f504ac 100644 --- a/sdk/objc/api/peerconnection/RTCPeerConnection+Private.h +++ b/sdk/objc/api/peerconnection/RTCPeerConnection+Private.h @@ -104,39 +104,39 @@ class PeerConnectionDelegateAdapter : public PeerConnectionObserver { NS_DESIGNATED_INITIALIZER; + (webrtc::PeerConnectionInterface::SignalingState)nativeSignalingStateForState: - (RTCSignalingState)state; + (RTCSignalingState)state; + (RTCSignalingState)signalingStateForNativeState: - (webrtc::PeerConnectionInterface::SignalingState)nativeState; + (webrtc::PeerConnectionInterface::SignalingState)nativeState; + (NSString *)stringForSignalingState:(RTCSignalingState)state; + (webrtc::PeerConnectionInterface::IceConnectionState)nativeIceConnectionStateForState: - (RTCIceConnectionState)state; + (RTCIceConnectionState)state; + (webrtc::PeerConnectionInterface::PeerConnectionState)nativeConnectionStateForState: - (RTCPeerConnectionState)state; + (RTCPeerConnectionState)state; + (RTCIceConnectionState)iceConnectionStateForNativeState: - (webrtc::PeerConnectionInterface::IceConnectionState)nativeState; + (webrtc::PeerConnectionInterface::IceConnectionState)nativeState; + (RTCPeerConnectionState)connectionStateForNativeState: - (webrtc::PeerConnectionInterface::PeerConnectionState)nativeState; + (webrtc::PeerConnectionInterface::PeerConnectionState)nativeState; + (NSString *)stringForIceConnectionState:(RTCIceConnectionState)state; + (NSString *)stringForConnectionState:(RTCPeerConnectionState)state; + (webrtc::PeerConnectionInterface::IceGatheringState)nativeIceGatheringStateForState: - (RTCIceGatheringState)state; + (RTCIceGatheringState)state; + (RTCIceGatheringState)iceGatheringStateForNativeState: - (webrtc::PeerConnectionInterface::IceGatheringState)nativeState; + (webrtc::PeerConnectionInterface::IceGatheringState)nativeState; + (NSString *)stringForIceGatheringState:(RTCIceGatheringState)state; + (webrtc::PeerConnectionInterface::StatsOutputLevel)nativeStatsOutputLevelForLevel: - (RTCStatsOutputLevel)level; + (RTCStatsOutputLevel)level; @end diff --git a/sdk/objc/api/peerconnection/RTCPeerConnection.h b/sdk/objc/api/peerconnection/RTCPeerConnection.h index 55af6868fd..466e053492 100644 --- a/sdk/objc/api/peerconnection/RTCPeerConnection.h +++ b/sdk/objc/api/peerconnection/RTCPeerConnection.h @@ -82,9 +82,8 @@ typedef NS_ENUM(NSInteger, RTCStatsOutputLevel) { RTCStatsOutputLevelDebug, }; -typedef void (^RTCCreateSessionDescriptionCompletionHandler)(RTC_OBJC_TYPE(RTCSessionDescription) * - _Nullable sdp, - NSError *_Nullable error); +typedef void (^RTCCreateSessionDescriptionCompletionHandler)( + RTC_OBJC_TYPE(RTCSessionDescription) *_Nullable sdp, NSError *_Nullable error); typedef void (^RTCSetSessionDescriptionCompletionHandler)(NSError *_Nullable error); diff --git a/sdk/objc/api/peerconnection/RTCRtpReceiver+Private.h b/sdk/objc/api/peerconnection/RTCRtpReceiver+Private.h index 6aed0b4bc5..eccbcbc3a0 100644 --- a/sdk/objc/api/peerconnection/RTCRtpReceiver+Private.h +++ b/sdk/objc/api/peerconnection/RTCRtpReceiver+Private.h @@ -45,7 +45,7 @@ class RtpReceiverDelegateAdapter : public RtpReceiverObserverInterface { + (cricket::MediaType)nativeMediaTypeForMediaType:(RTCRtpMediaType)mediaType; -+ (NSString*)stringForMediaType:(RTCRtpMediaType)mediaType; ++ (NSString *)stringForMediaType:(RTCRtpMediaType)mediaType; @end diff --git a/sdk/objc/api/peerconnection/RTCRtpSender.h b/sdk/objc/api/peerconnection/RTCRtpSender.h index fcdf199869..41bb083d2e 100644 --- a/sdk/objc/api/peerconnection/RTCRtpSender.h +++ b/sdk/objc/api/peerconnection/RTCRtpSender.h @@ -21,8 +21,8 @@ RTC_OBJC_EXPORT @protocol RTC_OBJC_TYPE (RTCRtpSender) -/** A unique identifier for this sender. */ -@property(nonatomic, readonly) NSString *senderId; + /** A unique identifier for this sender. */ + @property(nonatomic, readonly) NSString *senderId; /** The currently active RTCRtpParameters, as defined in * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters. diff --git a/sdk/objc/api/peerconnection/RTCRtpTransceiver+Private.h b/sdk/objc/api/peerconnection/RTCRtpTransceiver+Private.h index 65d45fb88e..868cbd80fe 100644 --- a/sdk/objc/api/peerconnection/RTCRtpTransceiver+Private.h +++ b/sdk/objc/api/peerconnection/RTCRtpTransceiver+Private.h @@ -36,10 +36,10 @@ NS_ASSUME_NONNULL_BEGIN NS_DESIGNATED_INITIALIZER; + (webrtc::RtpTransceiverDirection)nativeRtpTransceiverDirectionFromDirection: - (RTCRtpTransceiverDirection)direction; + (RTCRtpTransceiverDirection)direction; + (RTCRtpTransceiverDirection)rtpTransceiverDirectionFromNativeDirection: - (webrtc::RtpTransceiverDirection)nativeDirection; + (webrtc::RtpTransceiverDirection)nativeDirection; @end diff --git a/sdk/objc/api/peerconnection/RTCSessionDescription+Private.h b/sdk/objc/api/peerconnection/RTCSessionDescription+Private.h index aa087e557f..d01c04b0b5 100644 --- a/sdk/objc/api/peerconnection/RTCSessionDescription+Private.h +++ b/sdk/objc/api/peerconnection/RTCSessionDescription+Private.h @@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN * description. */ - (instancetype)initWithNativeDescription: - (const webrtc::SessionDescriptionInterface *)nativeDescription; + (const webrtc::SessionDescriptionInterface *)nativeDescription; + (std::string)stdStringForType:(RTCSdpType)type; diff --git a/sdk/objc/api/peerconnection/RTCStatisticsReport+Private.h b/sdk/objc/api/peerconnection/RTCStatisticsReport+Private.h index 47c5241d51..e91302a207 100644 --- a/sdk/objc/api/peerconnection/RTCStatisticsReport+Private.h +++ b/sdk/objc/api/peerconnection/RTCStatisticsReport+Private.h @@ -12,8 +12,9 @@ #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 diff --git a/sdk/objc/base/RTCLogging.h b/sdk/objc/base/RTCLogging.h index 754945c8f2..0fa6a91b69 100644 --- a/sdk/objc/base/RTCLogging.h +++ b/sdk/objc/base/RTCLogging.h @@ -34,9 +34,12 @@ RTC_EXTERN NSString* RTCFileName(const char* filePath); // Some convenience macros. -#define RTCLogString(format, ...) \ - [NSString stringWithFormat:@"(%@:%d %s): " format, RTCFileName(__FILE__), \ - __LINE__, __FUNCTION__, ##__VA_ARGS__] +#define RTCLogString(format, ...) \ + [NSString stringWithFormat:@"(%@:%d %s): " format, \ + RTCFileName(__FILE__), \ + __LINE__, \ + __FUNCTION__, \ + ##__VA_ARGS__] #define RTCLogFormat(severity, format, ...) \ do { \ @@ -44,17 +47,13 @@ RTC_EXTERN NSString* RTCFileName(const char* filePath); RTCLogEx(severity, log_string); \ } while (false) -#define RTCLogVerbose(format, ...) \ - RTCLogFormat(RTCLoggingSeverityVerbose, format, ##__VA_ARGS__) +#define RTCLogVerbose(format, ...) RTCLogFormat(RTCLoggingSeverityVerbose, format, ##__VA_ARGS__) -#define RTCLogInfo(format, ...) \ - RTCLogFormat(RTCLoggingSeverityInfo, format, ##__VA_ARGS__) +#define RTCLogInfo(format, ...) RTCLogFormat(RTCLoggingSeverityInfo, format, ##__VA_ARGS__) -#define RTCLogWarning(format, ...) \ - RTCLogFormat(RTCLoggingSeverityWarning, format, ##__VA_ARGS__) +#define RTCLogWarning(format, ...) RTCLogFormat(RTCLoggingSeverityWarning, format, ##__VA_ARGS__) -#define RTCLogError(format, ...) \ - RTCLogFormat(RTCLoggingSeverityError, format, ##__VA_ARGS__) +#define RTCLogError(format, ...) RTCLogFormat(RTCLoggingSeverityError, format, ##__VA_ARGS__) #if !defined(NDEBUG) #define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__) diff --git a/sdk/objc/base/RTCVideoEncoder.h b/sdk/objc/base/RTCVideoEncoder.h index 2445d432d6..27e6927ae2 100644 --- a/sdk/objc/base/RTCVideoEncoder.h +++ b/sdk/objc/base/RTCVideoEncoder.h @@ -28,7 +28,7 @@ RTC_OBJC_EXPORT @protocol RTC_OBJC_TYPE (RTCVideoEncoder) -- (void)setCallback:(nullable RTCVideoEncoderCallback)callback; + - (void)setCallback : (nullable RTCVideoEncoderCallback)callback; - (NSInteger)startEncodeWithSettings:(RTC_OBJC_TYPE(RTCVideoEncoderSettings) *)settings numberOfCores:(int)numberOfCores; - (NSInteger)releaseEncoder; diff --git a/sdk/objc/base/RTCVideoFrame.h b/sdk/objc/base/RTCVideoFrame.h index f5638d27cf..edf074b682 100644 --- a/sdk/objc/base/RTCVideoFrame.h +++ b/sdk/objc/base/RTCVideoFrame.h @@ -45,7 +45,7 @@ RTC_OBJC_EXPORT @property(nonatomic, readonly) id buffer; - (instancetype)init NS_UNAVAILABLE; -- (instancetype) new NS_UNAVAILABLE; +- (instancetype)new NS_UNAVAILABLE; /** Initialize an RTCVideoFrame from a pixel buffer, rotation, and timestamp. * Deprecated - initialize with a RTCCVPixelBuffer instead diff --git a/sdk/objc/components/video_codec/helpers.h b/sdk/objc/components/video_codec/helpers.h index 7c9ef1cd87..9dc05c8d59 100644 --- a/sdk/objc/components/video_codec/helpers.h +++ b/sdk/objc/components/video_codec/helpers.h @@ -14,6 +14,7 @@ #include #include + #include // Convenience function for creating a dictionary. diff --git a/sdk/objc/components/video_codec/nalu_rewriter.cc b/sdk/objc/components/video_codec/nalu_rewriter.cc index b7330e1f9c..73c0ed0abd 100644 --- a/sdk/objc/components/video_codec/nalu_rewriter.cc +++ b/sdk/objc/components/video_codec/nalu_rewriter.cc @@ -12,6 +12,7 @@ #include "sdk/objc/components/video_codec/nalu_rewriter.h" #include + #include #include diff --git a/sdk/objc/components/video_codec/nalu_rewriter.h b/sdk/objc/components/video_codec/nalu_rewriter.h index c6474971e2..c2b9e4875e 100644 --- a/sdk/objc/components/video_codec/nalu_rewriter.h +++ b/sdk/objc/components/video_codec/nalu_rewriter.h @@ -12,12 +12,12 @@ #ifndef 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 + #include #include "common_video/h264/h264_common.h" +#include "modules/video_coding/codecs/h264/include/h264.h" #include "rtc_base/buffer.h" using webrtc::H264::NaluIndex; diff --git a/sdk/objc/native/api/video_capturer.h b/sdk/objc/native/api/video_capturer.h index 9847d8148b..c1dfb07868 100644 --- a/sdk/objc/native/api/video_capturer.h +++ b/sdk/objc/native/api/video_capturer.h @@ -11,8 +11,10 @@ #ifndef SDK_OBJC_NATIVE_API_VIDEO_CAPTURER_H_ #define SDK_OBJC_NATIVE_API_VIDEO_CAPTURER_H_ +// import #import "base/RTCVideoCapturer.h" +// include #include "api/media_stream_interface.h" #include "api/scoped_refptr.h" #include "rtc_base/thread.h" diff --git a/sdk/objc/native/api/video_decoder_factory.h b/sdk/objc/native/api/video_decoder_factory.h index 03d8af3cfe..9ba11d65a3 100644 --- a/sdk/objc/native/api/video_decoder_factory.h +++ b/sdk/objc/native/api/video_decoder_factory.h @@ -13,9 +13,8 @@ #include -#import "base/RTCVideoDecoderFactory.h" - #include "api/video_codecs/video_decoder_factory.h" +#import "base/RTCVideoDecoderFactory.h" namespace webrtc { diff --git a/sdk/objc/native/api/video_encoder_factory.h b/sdk/objc/native/api/video_encoder_factory.h index 6e551b288d..ecd9ab090b 100644 --- a/sdk/objc/native/api/video_encoder_factory.h +++ b/sdk/objc/native/api/video_encoder_factory.h @@ -13,9 +13,8 @@ #include -#import "base/RTCVideoEncoderFactory.h" - #include "api/video_codecs/video_encoder_factory.h" +#import "base/RTCVideoEncoderFactory.h" namespace webrtc { diff --git a/sdk/objc/native/api/video_frame.h b/sdk/objc/native/api/video_frame.h index b4416ffabe..4ca469f2f2 100644 --- a/sdk/objc/native/api/video_frame.h +++ b/sdk/objc/native/api/video_frame.h @@ -11,9 +11,8 @@ #ifndef 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" +#import "base/RTCVideoFrame.h" namespace webrtc { diff --git a/sdk/objc/native/api/video_frame_buffer.h b/sdk/objc/native/api/video_frame_buffer.h index 204d65d850..68a8543d26 100644 --- a/sdk/objc/native/api/video_frame_buffer.h +++ b/sdk/objc/native/api/video_frame_buffer.h @@ -11,8 +11,10 @@ #ifndef SDK_OBJC_NATIVE_API_VIDEO_FRAME_BUFFER_H_ #define SDK_OBJC_NATIVE_API_VIDEO_FRAME_BUFFER_H_ +// import #import "base/RTCVideoFrameBuffer.h" +// include #include "api/scoped_refptr.h" #include "common_video/include/video_frame_buffer.h" diff --git a/sdk/objc/native/api/video_renderer.h b/sdk/objc/native/api/video_renderer.h index 04796b8049..279857a860 100644 --- a/sdk/objc/native/api/video_renderer.h +++ b/sdk/objc/native/api/video_renderer.h @@ -11,12 +11,11 @@ #ifndef SDK_OBJC_NATIVE_API_VIDEO_RENDERER_H_ #define SDK_OBJC_NATIVE_API_VIDEO_RENDERER_H_ -#import "base/RTCVideoRenderer.h" - #include #include "api/video/video_frame.h" #include "api/video/video_sink_interface.h" +#import "base/RTCVideoRenderer.h" namespace webrtc { diff --git a/sdk/objc/native/src/audio/audio_device_module_ios.h b/sdk/objc/native/src/audio/audio_device_module_ios.h index 9bcf114e32..189d7e6c9c 100644 --- a/sdk/objc/native/src/audio/audio_device_module_ios.h +++ b/sdk/objc/native/src/audio/audio_device_module_ios.h @@ -13,9 +13,8 @@ #include -#include "audio_device_ios.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/include/audio_device.h" #include "rtc_base/checks.h" diff --git a/sdk/objc/native/src/objc_video_decoder_factory.h b/sdk/objc/native/src/objc_video_decoder_factory.h index 30ad8c2a4b..19c997e503 100644 --- a/sdk/objc/native/src/objc_video_decoder_factory.h +++ b/sdk/objc/native/src/objc_video_decoder_factory.h @@ -29,8 +29,7 @@ class ObjCVideoDecoderFactory : public VideoDecoderFactory { id wrapped_decoder_factory() const; std::vector GetSupportedFormats() const override; - std::unique_ptr CreateVideoDecoder( - const SdpVideoFormat& format) override; + std::unique_ptr CreateVideoDecoder(const SdpVideoFormat& format) override; private: id decoder_factory_; diff --git a/sdk/objc/native/src/objc_video_encoder_factory.h b/sdk/objc/native/src/objc_video_encoder_factory.h index 38db5e6ae7..85a1e5319d 100644 --- a/sdk/objc/native/src/objc_video_encoder_factory.h +++ b/sdk/objc/native/src/objc_video_encoder_factory.h @@ -31,8 +31,7 @@ class ObjCVideoEncoderFactory : public VideoEncoderFactory { std::vector GetSupportedFormats() const override; std::vector GetImplementations() const override; - std::unique_ptr CreateVideoEncoder( - const SdpVideoFormat& format) override; + std::unique_ptr CreateVideoEncoder(const SdpVideoFormat& format) override; std::unique_ptr GetEncoderSelector() const override; private: diff --git a/sdk/objc/native/src/objc_video_frame.h b/sdk/objc/native/src/objc_video_frame.h index c2931cb2f8..0781d47ee6 100644 --- a/sdk/objc/native/src/objc_video_frame.h +++ b/sdk/objc/native/src/objc_video_frame.h @@ -11,9 +11,8 @@ #ifndef 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" +#import "base/RTCVideoFrame.h" namespace webrtc {