Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37802544
en ru br
Репозитории ALT

Группа :: Система/Библиотеки
Пакет: libmediastreamer

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: libmediastreamer-2.16.1-alt5.patch
Скачать


 .empty                                             |   0
 .gear/rules                                        |   2 +
 .../tags/9469e85da6389f3e2add46f5d970f5120f8a5bf5  |   6 +
 .gear/tags/list                                    |   1 +
 CMakeLists.txt                                     |   9 +-
 configure.ac                                       |   2 +-
 libmediastreamer.spec                              | 189 +++++++++++++++++++++
 src/Makefile.am                                    |   3 +-
 src/base/msfactory.c                               |   6 +-
 src/voip/audiostream.c                             |  47 +++--
 src/voip/ice.c                                     |  34 +++-
 src/voip/mediastream.c                             |  13 +-
 src/voip/videostream.c                             |  21 +++
 tester/mediastreamer2_tester_private.h             |   4 +-
 14 files changed, 309 insertions(+), 28 deletions(-)
diff --git a/.empty b/.empty
new file mode 100644
index 00000000..e69de29b
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 00000000..4fcfd994
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,2 @@
+tar: @version@:.
+diff: @version@:. .
diff --git a/.gear/tags/9469e85da6389f3e2add46f5d970f5120f8a5bf5 b/.gear/tags/9469e85da6389f3e2add46f5d970f5120f8a5bf5
new file mode 100644
index 00000000..78b8c898
--- /dev/null
+++ b/.gear/tags/9469e85da6389f3e2add46f5d970f5120f8a5bf5
@@ -0,0 +1,6 @@
+object f0411b1d7ade88cd5c4b868e6a025740a464bfea
+type commit
+tag 2.16.1
+tagger Ghislain MARY <ghislain.mary@belledonne-communications.com> 1500642066 +0200
+
+2.16.1
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 00000000..ab8f650f
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+9469e85da6389f3e2add46f5d970f5120f8a5bf5 2.16.1
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 98dc9d92..0992a8ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -567,10 +567,15 @@ if(MSVC)
 else()
 	list(APPEND STRICT_OPTIONS_CPP "-Wall" "-Wuninitialized")
 	list(APPEND STRICT_OPTIONS_C "-Wdeclaration-after-statement" "-Wstrict-prototypes" "-Wno-error=strict-prototypes")
-	if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
+	if(CMAKE_C_COMPILER_ID MATCHES "Clang")
 		list(APPEND STRICT_OPTIONS_CPP "-Qunused-arguments" "-Wno-unused-function" "-Wno-array-bounds")
 	elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
-		list(APPEND STRICT_OPTIONS_CPP "-Wno-format-truncation")
+		if(${CMAKE_C_COMPILER_VERSION} VERSION_GREATER "7")
+		    list(APPEND STRICT_OPTIONS_CPP "-Wno-format-truncation")
+		endif()
+		if(${CMAKE_C_COMPILER_VERSION} VERSION_GREATER "8")
+			list(APPEND STRICT_OPTIONS_CPP "-Wno-error=stringop-truncation")
+		endif()
 	endif()
 	if(APPLE)
 		list(APPEND STRICT_OPTIONS_CPP "-Wno-error=unknown-warning-option" "-Qunused-arguments" "-Wno-tautological-compare" "-Wno-unused-function" "-Wno-array-bounds")
diff --git a/configure.ac b/configure.ac
index f57a4551..fd03c731 100644
--- a/configure.ac
+++ b/configure.ac
@@ -600,7 +600,7 @@ AC_ARG_WITH(gsm,
 if test x"$gsmdir" != xno ; then
 	test x"$gmsdir" = xyes && gsmdir=/usr
 	MS_CHECK_DEP([gsm codec],[GSM],[${gsmdir}/include],
-		[${gsmdir}/lib],[gsm/gsm.h],[gsm],[gsm_create])
+		[${gsmdir}/lib],[gsm.h],[gsm],[gsm_create])
 	if test "$GSM_found" = "yes" ; then
 		build_gsm=yes
 	elif test "$gsm" = "true"; then
diff --git a/libmediastreamer.spec b/libmediastreamer.spec
new file mode 100644
index 00000000..7f5bd3c0
--- /dev/null
+++ b/libmediastreamer.spec
@@ -0,0 +1,189 @@
+Name: libmediastreamer
+Version: 2.16.1
+Release: alt5
+
+Group: System/Libraries
+Summary: Audio/Video real-time streaming
+License: GPLv2+
+Url: http://www.linphone.org/eng/documentation/dev/mediastreamer2.html
+
+Requires: %name-common = %version-%release
+
+Source: %name-%version.tar
+Patch0: %name-%version-%release.patch
+
+BuildRequires: intltool doxygen gcc-c++ libSDL-devel libX11-devel libalsa-devel
+BuildRequires: libavcodec-devel libpulseaudio-devel libspeex-devel libspeexdsp-devel
+BuildRequires: libswscale-devel libtheora-devel libv4l-devel libgsm-devel
+BuildRequires: libXv-devel libjack-devel libsamplerate-devel libglew-devel
+BuildRequires: libvpx-devel libortp-devel >= 0.17 vim-common libzrtp-devel
+BuildRequires: libsrtp-devel
+
+%description
+Mediastreamer2 is a GPL licensed library to make audio and video
+real-time streaming and processing. Written in pure C, it is based
+upon the oRTP library.
+
+%package common
+Summary: Common data for the mediastreamer2 library
+Group: Communications
+BuildArch: noarch
+
+%description common
+Common data for the mediastreamer2 library
+
+%package devel
+Summary: Headers, libraries and docs for the mediastreamer2 library
+Group: Development/C
+Requires: %name = %version-%release
+%description devel
+Mediastreamer2 is a GPL licensed library to make audio and video
+real-time streaming and processing. Written in pure C, it is based
+upon the ortp library.
+
+This package contains header files and development libraries needed to
+develop programs using the mediastreamer2 library.
+
+%prep
+%setup
+%patch0 -p1
+
+%build
+%define _optlevel 3
+%add_optflags %optflags_shared %optflags_strict %optflags_notraceback -fno-schedule-insns -fschedule-insns2
+%ifarch %ix86
+%add_optflags -malign-double
+%endif
+%autoreconf
+%configure \
+    --datadir=%_datadir/mediastreamer \
+    --disable-static \
+    --disable-documentation \
+    --disable-strict \
+    --with-srtp \
+    --enable-zrtp \
+    --enable-shared
+%make_build CFLAGS="%optflags" CXXFLAGS="%optflags"
+
+%install
+%make install DESTDIR=%buildroot
+mkdir -p %buildroot/%_libdir/mediastreamer/plugins
+
+%find_lang mediastreamer
+
+%files -f mediastreamer.lang
+%doc AUTHORS ChangeLog NEWS README.md
+%dir %_libdir/mediastreamer
+%dir %_libdir/mediastreamer/plugins
+%_libdir/*.so.*
+
+%files common
+%_datadir/mediastreamer
+
+%files devel
+# TODO remove if unneeded
+#%%doc help/doc/html
+%_libdir/*.so
+%_libdir/pkgconfig/*.pc
+%_libdir/mediastreamer
+%_includedir/*
+
+%changelog
+* Fri Dec 25 2020 Dmitry V. Levin <ldv@altlinux.org> 2.16.1-alt5
+- NMU.
+- Updated to 2.16.1-4-g2ce4104a.
+- Built with default version of gcc.
+
+* Sat Jun 16 2018 Alexei Takaseev <taf@altlinux.org> 2.16.1-alt4
+- rebuilt with ffmpeg-4.0
+
+* Wed Apr 25 2018 Alexei Takaseev <taf@altlinux.org> 2.16.1-alt3
+- Build with libzrtp and libsrtp
+
+* Tue Mar 13 2018 Alexei Takaseev <taf@altlinux.org> 2.16.1-alt2
+- Build with gcc5
+
+* Sat Jul 22 2017 Alexei Takaseev <taf@altlinux.org> 2.16.1-alt1
+- 2.16.1
+
+* Mon Jun 05 2017 Alexei Takaseev <taf@altlinux.org> 2.15.1-alt2
+- Rebuild with ffmpeg
+
+* Fri Mar 03 2017 Alexei Takaseev <taf@altlinux.org> 2.15.1-alt1
+- 2.15.1
+
+* Fri Mar 03 2017 Alexei Takaseev <taf@altlinux.org> 2.15.0-alt1
+- 2.15.0
+
+* Tue Aug 09 2016 Alexei Takaseev <taf@altlinux.org> 2.14.0-alt1
+- 2.14.0
+
+* Mon Nov 30 2015 Igor Vlasenko <viy@altlinux.ru> 2.12.1-alt1.1
+- fixed build - added BR: libspeexdsp-devel
+
+* Tue Nov 17 2015 Alexei Takaseev <taf@altlinux.org> 2.12.1-alt1
+- 2.12.1
+
+* Tue Nov 03 2015 Alexei Takaseev <taf@altlinux.org> 2.12.0-alt1
+- 2.12.0
+
+* Fri May 08 2015 Alexei Takaseev <taf@altlinux.org> 2.11.2-alt1
+- 2.11.2
+
+* Thu Apr 02 2015 Alexei Takaseev <taf@altlinux.org> 2.11.1-alt1
+- 2.11.1
+
+* Thu Mar 12 2015 Alexei Takaseev <taf@altlinux.org> 2.11.0-alt1
+- 2.11.0
+
+* Mon Dec 29 2014 Alexei Takaseev <taf@altlinux.org> 2.10.0-alt4
+- Fix build with libav-11
+
+* Tue Jun 10 2014 Alexei Takaseev <taf@altlinux.org> 2.10.0-alt3
+- Fix build with libav-10
+
+* Mon Mar 03 2014 Alexei Takaseev <taf@altlinux.org> 2.10.0-alt2
+- update from git:0e6be4c7cad7ce3d3cb4feed9a6ad52439ba365e
+
+* Fri Feb 21 2014 Alexei Takaseev <taf@altlinux.org> 2.10.0-alt1
+- 2.10.0
+
+* Wed Oct 23 2013 Alexei Takaseev <taf@altlinux.org> 2.9.1-alt2
+- Fix build with libavcodec54
+
+* Thu Jun 27 2013 Alexei Takaseev <taf@altlinux.org> 2.9.1-alt1
+- 2.9.1
+
+* Fri Jun 14 2013 Alexei Takaseev <taf@altlinux.org> 2.9.0-alt1
+- 2.9.0
+
+* Sun Jun 24 2012 Alexei Takaseev <taf@altlinux.org> 2.8.2-alt1
+- 2.8.2
+
+* Tue Jan 31 2012 Sergey Bolshakov <sbolshakov@altlinux.ru> 2.8.0-alt2
+- built witn libvpx
+
+* Sat Jan 28 2012 Sergey Bolshakov <sbolshakov@altlinux.ru> 2.8.0-alt1
+- 2.8.0
+
+* Mon Aug 01 2011 Sergey Bolshakov <sbolshakov@altlinux.ru> 2.7.3-alt1.1
+- rebuilt with recent libav/x264
+
+* Fri Jul 22 2011 Egor Glukhov <kaman@altlinux.org> 2.7.3-alt1
+- 2.7.3
+
+* Thu Mar 24 2011 Egor Glukhov <kaman@altlinux.org> 2.7.0-alt2
+- Rebuilt with gsm codec
+
+* Sat Feb 12 2011 Egor Glukhov <kaman@altlinux.org> 2.7.0-alt1
+- 2.7.0
+
+* Wed Nov 24 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.6.0-alt1.git.5480453d.1
+- Rebuilt for soname set-versions
+
+* Wed Jul 28 2010 Egor Glukhov <kaman@altlinux.org> 2.6.0-alt1.git.5480453d
+- 2.6.0
+
+* Thu Apr 01 2010 Sergey V Turchin <zerg@altlinux.org> 2.3.0-alt1
+- initial specfile
+
diff --git a/src/Makefile.am b/src/Makefile.am
index b084dcfb..56c11d21 100755
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -57,7 +57,8 @@ libmediastreamer_voip_la_LIBADD=	libmediastreamer_base.la \
 					$(PCAP_LIBS) \
 					$(OPUS_LIBS) \
 					$(SRTP_LIBS) \
-					$(BCTOOLBOX_LIBS)
+					$(BCTOOLBOX_LIBS) \
+					-lXext
 
 
 if LIBBZRTP
diff --git a/src/base/msfactory.c b/src/base/msfactory.c
index 11d56275..94a29e52 100644
--- a/src/base/msfactory.c
+++ b/src/base/msfactory.c
@@ -24,8 +24,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 #   ifndef MEDIASTREAMER_VERSION
 #   define MEDIASTREAMER_VERSION "unknown"
 #   endif
-#	ifndef MS2_GIT_VERSION
-#	define MS2_GIT_VERSION "unknown"
+#	ifndef GIT_VERSION
+#	define GIT_VERSION "unknown"
 #	endif
 #endif
 
@@ -174,7 +174,7 @@ void ms_factory_init(MSFactory *obj){
 		ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
 	}
 
-	ms_message("Mediastreamer2 factory " MEDIASTREAMER_VERSION " (git: " MS2_GIT_VERSION ") initialized.");
+	ms_message("Mediastreamer2 factory " MEDIASTREAMER_VERSION " (git: " GIT_VERSION ") initialized.");
 	/* register builtin MSFilter's */
 	for (i=0;ms_base_filter_descs[i]!=NULL;i++){
 		ms_factory_register_filter(obj,ms_base_filter_descs[i]);
diff --git a/src/voip/audiostream.c b/src/voip/audiostream.c
index a7bc5932..f7c96293 100644
--- a/src/voip/audiostream.c
+++ b/src/voip/audiostream.c
@@ -202,7 +202,7 @@ static void audio_stream_configure_resampler(AudioStream *st, MSFilter *resample
 	ms_filter_call_method(resampler, MS_FILTER_SET_NCHANNELS, &from_channels);
 	ms_filter_call_method(resampler, MS_FILTER_SET_OUTPUT_NCHANNELS, &to_channels);
 	ms_message("configuring %s:%p-->%s:%p from rate [%i] to rate [%i] and from channel [%i] to channel [%i]",
-			   from->desc->name, from, to->desc->name, to, from_rate, to_rate, from_channels, to_channels);
+				 from->desc->name, from, to->desc->name, to, from_rate, to_rate, from_channels, to_channels);
 }
 
 static void audio_stream_process_rtcp(MediaStream *media_stream, mblk_t *m){
@@ -263,7 +263,7 @@ void audio_stream_prepare_sound(AudioStream *stream, MSSndCard *playcard, MSSndC
 	} else {
 		stream->ms.voidsink=ms_factory_create_filter(stream->ms.factory,  MS_VOID_SINK_ID);
 		ms_filter_link(stream->dummy,0,stream->ms.voidsink,0);
-		
+
 	}
 	if (stream->ms.sessions.ticker == NULL) media_stream_start_ticker(&stream->ms);
 	ms_ticker_attach(stream->ms.sessions.ticker,stream->dummy);
@@ -813,9 +813,20 @@ int audio_stream_start_from_io(AudioStream *stream, RtpProfile *profile, const c
 		stream->dtmfgen=ms_factory_create_filter(stream->ms.factory, MS_DTMF_GEN_ID);
 	else
 		stream->dtmfgen=NULL;
+
+	/* FIXME: Temporary workaround for -Wcast-function-type. */
+	#if __GNUC__ >= 8
+		_Pragma("GCC diagnostic push")
+		_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
+	#endif // if __GNUC__ >= 8
+
 	rtp_session_signal_connect(rtps,"telephone-event",(RtpCallback)on_dtmf_received,stream);
 	rtp_session_signal_connect(rtps,"payload_type_changed",(RtpCallback)audio_stream_payload_type_changed,stream);
 
+	#if __GNUC__ >= 8
+		_Pragma("GCC diagnostic pop")
+	#endif // if __GNUC__ >= 8
+
 	if (stream->ms.state==MSStreamPreparing){
 		/*we were using the dummy preload graph, destroy it but keep sound filters unless no soundcard is given*/
 		_audio_stream_unprepare_sound(stream, io->input.type == MSResourceSoundcard);
@@ -865,7 +876,7 @@ int audio_stream_start_from_io(AudioStream *stream, RtpProfile *profile, const c
 	if ((stream->features & AUDIO_STREAM_FEATURE_DTMF) != 0 && (tev_pt == -1)
 		&& ( strcasecmp(pt->mime_type,"pcmu")==0 || strcasecmp(pt->mime_type,"pcma")==0)){
 		/*if no telephone-event payload is usable and pcma or pcmu is used, we will generate
-		  inband dtmf*/
+			inband dtmf*/
 		stream->dtmfgen_rtp=ms_factory_create_filter (stream->ms.factory, MS_DTMF_GEN_ID);
 
 	} else {
@@ -878,7 +889,7 @@ int audio_stream_start_from_io(AudioStream *stream, RtpProfile *profile, const c
 		ms_error("Sample rate is unknown for RTP side !");
 		return -1;
 	}
-	
+
 	if (stream->features == 0) {
 		MSPinFormat sndread_format = {0};
 		MSPinFormat rtpsend_format = {0};
@@ -894,7 +905,7 @@ int audio_stream_start_from_io(AudioStream *stream, RtpProfile *profile, const c
 	}
 	do_ts_adjustments = !skip_encoder_and_decoder;
 	ms_filter_call_method(stream->ms.rtpsend, MS_RTP_SEND_ENABLE_TS_ADJUSTMENT, &do_ts_adjustments);
-	
+
 	if (!skip_encoder_and_decoder) {
 		stream->ms.encoder=ms_factory_create_encoder(stream->ms.factory, pt->mime_type);
 		stream->ms.decoder=ms_factory_create_decoder(stream->ms.factory, pt->mime_type);
@@ -1003,7 +1014,7 @@ int audio_stream_start_from_io(AudioStream *stream, RtpProfile *profile, const c
 		if (stream->write_resampler == NULL) stream->write_resampler = ms_factory_create_filter(stream->ms.factory, MS_RESAMPLE_ID);
 		resampler_missing = stream->write_resampler == NULL;
 	}
-	
+
 	if (resampler_missing){
 		ms_fatal("AudioStream: no resampler implementation found, but resampler is required to perform the AudioStream. "
 			"Does mediastreamer2 was compiled with libspeex dependency ?");
@@ -1078,7 +1089,7 @@ int audio_stream_start_from_io(AudioStream *stream, RtpProfile *profile, const c
 		/*configure equalizer if needed*/
 		MSDevicesInfo *devices = ms_factory_get_devices_info(stream->ms.factory);
 		SoundDeviceDescription *device = ms_devices_info_get_sound_device_description(devices);
-		
+
 		audio_stream_set_mic_gain_db(stream, 0);
 		audio_stream_set_spk_gain_db(stream, 0);
 		if (device && device->hacks) {
@@ -1165,7 +1176,7 @@ int audio_stream_start_from_io(AudioStream *stream, RtpProfile *profile, const c
 			if (ms_filter_call_method(stream->ms.decoder, MS_DECODER_ENABLE_PLC, &decoder_enable_plc) != 0) {
 				ms_warning(" MS_DECODER_ENABLE_PLC on stream %p function error ", stream);
 			}
-			
+
 		}
 		stream->plc = NULL;
 	}
@@ -1476,7 +1487,7 @@ AudioStream *audio_stream_new_with_sessions(MSFactory *factory, const MSMediaStr
 
 	stream->ms.type = MSAudio;
 	media_stream_init(&stream->ms,factory, sessions);
-	
+
 	ms_factory_enable_statistics(factory, TRUE);
 	ms_factory_reset_statistics(factory);
 
@@ -1780,10 +1791,23 @@ void audio_stream_stop(AudioStream * stream){
 		}
 	}
 	rtp_session_set_rtcp_xr_media_callbacks(stream->ms.sessions.rtp_session, NULL);
+
+	/* FIXME: Temporary workaround for -Wcast-function-type. */
+	#if __GNUC__ >= 8
+		_Pragma("GCC diagnostic push")
+		_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
+	#endif // if __GNUC__ >= 8
+
 	rtp_session_signal_disconnect_by_callback(stream->ms.sessions.rtp_session,"telephone-event",(RtpCallback)on_dtmf_received);
 	rtp_session_signal_disconnect_by_callback(stream->ms.sessions.rtp_session,"payload_type_changed",(RtpCallback)audio_stream_payload_type_changed);
-	/*before destroying the filters, pump the event queue so that pending events have a chance to reach their listeners.
-	 * When the filter are destroyed, all their pending events in the event queue will be cancelled*/
+
+	#if __GNUC__ >= 8
+		_Pragma("GCC diagnostic pop")
+	#endif // if __GNUC__ >= 8
+
+	// Before destroying the filters, pump the event queue so that pending events have a chance
+	// to reach their listeners. When the filter are destroyed, all their pending events in the
+	// event queue will be cancelled.
 	evq = ms_factory_get_event_queue(stream->ms.factory);
 	if (evq) ms_event_queue_pump(evq);
 	ms_factory_log_statistics(stream->ms.factory);
@@ -1918,4 +1942,3 @@ void audio_stream_set_audio_route(AudioStream *stream, MSAudioRoute route) {
 		}
 	}
 }
-
diff --git a/src/voip/ice.c b/src/voip/ice.c
index 0719e712..9538777a 100644
--- a/src/voip/ice.c
+++ b/src/voip/ice.c
@@ -1269,11 +1269,11 @@ static int ice_send_message_to_socket(RtpTransport * rtptp, char* buf, size_t le
 	mblk_t *m = rtp_session_create_packet_raw((const uint8_t *)buf, len);
 	int err;
 	struct addrinfo *v6ai = NULL;
-	
+
 	memcpy(&m->net_addr, from, fromlen);
 	m->net_addrlen = fromlen;
 	if ((rtptp->session->rtp.gs.sockfamily == AF_INET6) && (to->sa_family == AF_INET)) {
-		
+
 		char to_addr_str[64];
 		int to_port = 0;
 		memset(to_addr_str, 0, sizeof(to_addr_str));
@@ -2396,7 +2396,7 @@ static bool_t ice_handle_received_turn_allocate_success_response(IceCheckList *c
 						candidate = ice_add_local_candidate(cl, "srflx", ms_stun_family_to_af(srflx_addr.family), srflx_addr_str, srflx_port, componentID, candidate);
 						ms_stun_address_to_printable_ip_address(&srflx_addr, srflx_addr_str, sizeof(srflx_addr_str));
 						ms_message("ice: Add candidate obtained by STUN/TURN: %s:srflx", srflx_addr_str);
-						
+
 						if (cl->session->turn_enabled) {
 							request->turn_context->stats.nb_successful_allocate++;
 							ice_schedule_turn_allocation_refresh(cl, componentID, ms_stun_message_get_lifetime(msg));
@@ -2706,7 +2706,7 @@ void ice_handle_stun_packet(IceCheckList *cl, RtpSession *rtp_session, const Ort
 				ms_warning("ice: Recv unknown STUN success response: %s <-- %s [%s]", recv_addr_str, source_addr_str, tr_id_str);
 				break;
 		}
-		
+
 	} else if (ms_stun_message_is_error_response(msg)) {
 		ice_set_transaction_response_time(cl, &tr_id, evt_data->ts);
 		ms_message("ice: Recv error response: %s <-- %s [%s]", recv_addr_str, source_addr_str, tr_id_str);
@@ -2912,7 +2912,7 @@ void ice_add_losing_pair(IceCheckList *cl, uint16_t componentID, int local_famil
 	elem = bctbx_list_find_custom(cl->local_candidates, (bctbx_compare_func)ice_find_candidate_from_transport_address, &taddr);
 	if (elem == NULL) {
 		/* Workaround to detect if the local candidate that has not been found has been added by the proxy server.
-		   If that is the case, add it to the local candidates now. */
+			 If that is the case, add it to the local candidates now. */
 		elem = bctbx_list_find_custom(cl->remote_candidates, (bctbx_compare_func)ice_find_candidate_from_ip_address, local_addr);
 		if (elem != NULL) {
 			tc.componentID = componentID;
@@ -3451,7 +3451,7 @@ static void ice_conclude_waiting_frozen_and_inprogress_pairs(const IceValidCandi
 		bctbx_list_t *elem;
 		ice_remove_waiting_and_frozen_pairs_from_list(&cl->check_list, valid_pair->valid->local->componentID);
 		ice_remove_waiting_and_frozen_pairs_from_list(&cl->triggered_checks_queue, valid_pair->valid->local->componentID);
-		
+
 		for (elem = cl->check_list ; elem != NULL; elem = elem->next){
 			IceCandidatePair *pair = (IceCandidatePair*) elem->data;
 			if ((pair->state == ICP_InProgress) && (pair->local->componentID == valid_pair->valid->local->componentID)
@@ -3774,7 +3774,18 @@ static int ice_find_gathering_stun_server_request(const IceStunServerRequest *re
 static void ice_remove_gathering_stun_server_requests(IceCheckList *cl) {
 	bctbx_list_t *elem = cl->stun_server_requests;
 	while (elem != NULL) {
+		/* FIXME: Temporary workaround for -Wcast-function-type. */
+		#if __GNUC__ >= 8
+			_Pragma("GCC diagnostic push")
+			_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
+		#endif // if __GNUC__ >= 8
+
 		elem = bctbx_list_find_custom(cl->stun_server_requests, (bctbx_compare_func)ice_find_gathering_stun_server_request, NULL);
+
+		#if __GNUC__ >= 8
+			_Pragma("GCC diagnostic pop")
+		#endif // if __GNUC__ >= 8
+
 		if (elem != NULL) {
 			IceStunServerRequest *request = (IceStunServerRequest *)elem->data;
 			ice_stun_server_request_free(request);
@@ -3893,8 +3904,19 @@ void ice_check_list_process(IceCheckList *cl, RtpSession *rtp_session)
 
 	/* Send STUN/TURN server requests (to gather candidates, create/refresh TURN permissions, refresh TURN allocations or bind TURN channels). */
 	bctbx_list_for_each2(cl->stun_server_requests, (void (*)(void*,void*))ice_send_stun_server_requests, cl);
+
+	/* FIXME: Temporary workaround for -Wcast-function-type. */
+	#if __GNUC__ >= 8
+		_Pragma("GCC diagnostic push")
+		_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
+	#endif // if __GNUC__ >= 8
+
 	cl->stun_server_requests = bctbx_list_remove_custom(cl->stun_server_requests, (bctbx_compare_func)ice_compare_stun_server_requests_to_remove, NULL);
 
+	#if __GNUC__ >= 8
+		_Pragma("GCC diagnostic pop")
+	#endif // if __GNUC__ >= 8
+
 	/* Send event if needed. */
 	if ((cl->session->send_event == TRUE) && (ice_compare_time(curtime, cl->session->event_time) >= 0)) {
 		OrtpEvent *ev;
diff --git a/src/voip/mediastream.c b/src/voip/mediastream.c
index 8b53ed2b..23506956 100644
--- a/src/voip/mediastream.c
+++ b/src/voip/mediastream.c
@@ -137,8 +137,20 @@ RtpSession * ms_create_duplex_rtp_session(const char* local_ip, int loc_rtp_port
 	rtp_session_enable_adaptive_jitter_compensation(rtpr, TRUE);
 	rtp_session_set_symmetric_rtp(rtpr, TRUE);
 	rtp_session_set_local_addr(rtpr, local_ip, loc_rtp_port, loc_rtcp_port);
+
+	/* FIXME: Temporary workaround for -Wcast-function-type. */
+	#if __GNUC__ >= 8
+		_Pragma("GCC diagnostic push")
+		_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
+	#endif // if __GNUC__ >= 8
+
 	rtp_session_signal_connect(rtpr, "timestamp_jump", (RtpCallback)rtp_session_resync, NULL);
 	rtp_session_signal_connect(rtpr, "ssrc_changed", (RtpCallback)rtp_session_resync, NULL);
+
+	#if __GNUC__ >= 8
+		_Pragma("GCC diagnostic pop")
+	#endif // if __GNUC__ >= 8
+
 	rtp_session_set_ssrc_changed_threshold(rtpr, 0);
 	rtp_session_set_rtcp_report_interval(rtpr, 2500);	/* At the beginning of the session send more reports. */
 	rtp_session_set_multicast_loopback(rtpr,TRUE); /*very useful, specially for testing purposes*/
@@ -646,7 +658,6 @@ static void apply_bitrate_limit(MediaStream *obj, int br_limit){
 		MSVideoConfiguration *vconf_list = NULL;
 		MSVideoSize vsize;
 		MSVideoConfiguration vconf1, vconf2;
-		
 		ms_filter_call_method(obj->encoder, MS_VIDEO_ENCODER_GET_CONFIGURATION_LIST, &vconf_list);
 		ms_filter_call_method(obj->encoder, MS_FILTER_GET_VIDEO_SIZE, &vsize);
 
diff --git a/src/voip/videostream.c b/src/voip/videostream.c
index fe2de4a8..8b93f737 100644
--- a/src/voip/videostream.c
+++ b/src/voip/videostream.c
@@ -899,9 +899,19 @@ static int video_stream_start_with_source_and_output(VideoStream *stream, RtpPro
 		rtp_session_set_jitter_compensation(rtps, jitt_comp);
 	}
 
+	/* FIXME: Temporary workaround for -Wcast-function-type. */
+	#if __GNUC__ >= 8
+		_Pragma("GCC diagnostic push")
+		_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
+	#endif // if __GNUC__ >= 8
+
 	rtp_session_signal_connect(stream->ms.sessions.rtp_session,"payload_type_changed",
 			(RtpCallback)video_stream_payload_type_changed,&stream->ms);
 
+	#if __GNUC__ >= 8
+		_Pragma("GCC diagnostic pop")
+	#endif // if __GNUC__ >= 8
+
 	rtp_session_get_jitter_buffer_params(stream->ms.sessions.rtp_session,&jbp);
 	jbp.max_packets=1000;//needed for high resolution video
 	rtp_session_set_jitter_buffer_params(stream->ms.sessions.rtp_session,&jbp);
@@ -1443,8 +1453,19 @@ static MSFilter* _video_stream_stop(VideoStream * stream, bool_t keep_source)
 		}
 	}
 	rtp_session_set_rtcp_xr_media_callbacks(stream->ms.sessions.rtp_session, NULL);
+
+	/* FIXME: Temporary workaround for -Wcast-function-type. */
+	#if __GNUC__ >= 8
+		_Pragma("GCC diagnostic push")
+		_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
+	#endif // if __GNUC__ >= 8
+
 	rtp_session_signal_disconnect_by_callback(stream->ms.sessions.rtp_session,"payload_type_changed",(RtpCallback)video_stream_payload_type_changed);
 
+	#if __GNUC__ >= 8
+		_Pragma("GCC diagnostic pop")
+	#endif // if __GNUC__ >= 8
+
 	/*Automatically the video recorder if it was opened previously*/
 	if (stream->recorder_output && ms_filter_implements_interface(stream->recorder_output, MSFilterRecorderInterface)){
 		MSRecorderState state = MSRecorderClosed;
diff --git a/tester/mediastreamer2_tester_private.h b/tester/mediastreamer2_tester_private.h
index 8498b458..89e5ba09 100644
--- a/tester/mediastreamer2_tester_private.h
+++ b/tester/mediastreamer2_tester_private.h
@@ -52,7 +52,7 @@ extern MSFilter *ms_tester_soundread;
 extern MSFilter *ms_tester_videocapture;
 extern char *ms_tester_codec_mime;
 
-enum {
+enum filter_mask_enum {
 	FILTER_MASK_FILEPLAY = (1 << 0),
 	FILTER_MASK_FILEREC = (1 << 1),
 	FILTER_MASK_DTMFGEN = (1 << 2),
@@ -67,7 +67,7 @@ enum {
 	FILTER_MASK_SOUNDWRITE = (1 << 11),
 	FILTER_MASK_SOUNDREAD = (1 << 12),
 	FILTER_MASK_VIDEOCAPTURE = (1 << 13)
-} filter_mask_enum;
+};
 
 
 extern unsigned char ms_tester_tone_detected;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin