Commit d5440930 authored by jehan's avatar jehan

fix compilation with VIDEO_ENABLED not defined and libpcap-dev

parent 643f96d3
...@@ -74,8 +74,7 @@ rm -rf $RPM_BUILD_ROOT ...@@ -74,8 +74,7 @@ rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_bindir}/mediastream %{_bindir}/*
%{_bindir}/msaudiocmp
%{_libdir}/*.so.* %{_libdir}/*.so.*
%{_datadir}/images/nowebcamCIF.jpg %{_datadir}/images/nowebcamCIF.jpg
%{_datadir}/locale/??/LC_MESSAGES/mediastreamer.mo %{_datadir}/locale/??/LC_MESSAGES/mediastreamer.mo
......
...@@ -213,6 +213,7 @@ static void pcap_tester_streams_start(const PcapTesterContext *params, ...@@ -213,6 +213,7 @@ static void pcap_tester_streams_start(const PcapTesterContext *params,
receiver_q = setup_event_queue(&receiver->ms); receiver_q = setup_event_queue(&receiver->ms);
} }
if (use_video) { if (use_video) {
#ifdef VIDEO_ENABLED
JBParameters video_params; JBParameters video_params;
receiverv = video_stream_new(_factory, video_to_port, 0, FALSE); receiverv = video_stream_new(_factory, video_to_port, 0, FALSE);
video_stream_set_direction(receiverv, MediaStreamRecvOnly); video_stream_set_direction(receiverv, MediaStreamRecvOnly);
...@@ -237,6 +238,9 @@ static void pcap_tester_streams_start(const PcapTesterContext *params, ...@@ -237,6 +238,9 @@ static void pcap_tester_streams_start(const PcapTesterContext *params,
rtp_session_set_jitter_buffer_params(receiverv->ms.sessions.rtp_session, &video_params); rtp_session_set_jitter_buffer_params(receiverv->ms.sessions.rtp_session, &video_params);
receiverv_q = setup_event_queue(&receiverv->ms); receiverv_q = setup_event_queue(&receiverv->ms);
#else
ms_fatal("Video support disabled at compilation time");
#endif
} }
/* Let the stream start a few seconds without receiving anything, then send the RTP simulation. /* Let the stream start a few seconds without receiving anything, then send the RTP simulation.
...@@ -292,7 +296,9 @@ void pcap_tester_stop(const PcapTesterContext *params) { ...@@ -292,7 +296,9 @@ void pcap_tester_stop(const PcapTesterContext *params) {
clean_evq(&receiverv->ms, receiverv_q); clean_evq(&receiverv->ms, receiverv_q);
receiverv_q = NULL; receiverv_q = NULL;
memcpy(&final_video_rtp_stats, rtp_session_get_stats(receiverv->ms.sessions.rtp_session), sizeof(rtp_stats_t)); memcpy(&final_video_rtp_stats, rtp_session_get_stats(receiverv->ms.sessions.rtp_session), sizeof(rtp_stats_t));
#ifdef VIDEO_ENABLED
video_stream_stop(receiverv); video_stream_stop(receiverv);
#endif
receiverv = NULL; receiverv = NULL;
} }
if (receiver) { if (receiver) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment