Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
4da992ba
Commit
4da992ba
authored
May 26, 2014
by
Ghislain MARY
Browse files
Merge branch 'master' of git.linphone.org:mediastreamer2 into dev_avpf
parents
87d793b2
ea6872e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
11 deletions
+12
-11
include/mediastreamer2/mediastream.h
include/mediastreamer2/mediastream.h
+0
-1
src/voip/audiostream.c
src/voip/audiostream.c
+6
-4
src/voip/mediastream.c
src/voip/mediastream.c
+0
-5
src/voip/videostream.c
src/voip/videostream.c
+6
-1
No files found.
include/mediastreamer2/mediastream.h
View file @
4da992ba
...
...
@@ -137,7 +137,6 @@ struct _MediaStream {
time_t
start_time
;
time_t
last_iterate_time
;
bool_t
use_rc
;
bool_t
is_beginning
;
bool_t
owns_sessions
;
bool_t
pad
[
1
];
/**
...
...
src/voip/audiostream.c
View file @
4da992ba
...
...
@@ -192,6 +192,7 @@ void audio_stream_prepare_sound(AudioStream *stream, MSSndCard *playcard, MSSndC
audio_stream_unprepare_sound
(
stream
);
stream
->
dummy
=
ms_filter_new
(
MS_RTP_RECV_ID
);
rtp_session_set_payload_type
(
stream
->
ms
.
sessions
.
rtp_session
,
0
);
rtp_session_enable_rtcp
(
stream
->
ms
.
sessions
.
rtp_session
,
FALSE
);
ms_filter_call_method
(
stream
->
dummy
,
MS_RTP_RECV_SET_SESSION
,
stream
->
ms
.
sessions
.
rtp_session
);
if
(
captcard
&&
playcard
){
...
...
@@ -337,8 +338,10 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char
rtp_session_set_profile
(
rtps
,
profile
);
if
(
rem_rtp_port
>
0
)
rtp_session_set_remote_addr_full
(
rtps
,
rem_rtp_ip
,
rem_rtp_port
,
rem_rtcp_ip
,
rem_rtcp_port
);
if
(
rem_rtcp_port
<=
0
){
rtp_session_enable_rtcp
(
rtps
,
FALSE
);
if
(
rem_rtcp_port
>
0
)
{
rtp_session_enable_rtcp
(
rtps
,
TRUE
);
}
else
{
rtp_session_enable_rtcp
(
rtps
,
FALSE
);
}
rtp_session_set_payload_type
(
rtps
,
payload
);
rtp_session_set_jitter_compensation
(
rtps
,
jitt_comp
);
...
...
@@ -521,7 +524,7 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char
ms_message
(
"Setting audio encoder network bitrate to [%i] on stream [%p]"
,
stream
->
ms
.
target_bitrate
,
stream
);
ms_filter_call_method
(
stream
->
ms
.
encoder
,
MS_FILTER_SET_BITRATE
,
&
stream
->
ms
.
target_bitrate
);
}
rtp_session_set_target_upload_bandwidth
(
stream
->
ms
.
sessions
.
rtp_session
,
stream
->
ms
.
target_bitrate
);
rtp_session_set_target_upload_bandwidth
(
rtps
,
stream
->
ms
.
target_bitrate
);
ms_filter_call_method
(
stream
->
ms
.
encoder
,
MS_FILTER_SET_NCHANNELS
,
&
nchannels
);
ms_filter_call_method
(
stream
->
ms
.
decoder
,
MS_FILTER_SET_SAMPLE_RATE
,
&
sample_rate
);
ms_filter_call_method
(
stream
->
ms
.
decoder
,
MS_FILTER_SET_NCHANNELS
,
&
nchannels
);
...
...
@@ -652,7 +655,6 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char
,
NULL
);
stream
->
ms
.
start_time
=
stream
->
last_packet_time
=
ms_time
(
NULL
);
stream
->
ms
.
is_beginning
=
TRUE
;
stream
->
ms
.
state
=
MSStreamStarted
;
return
0
;
...
...
src/voip/mediastream.c
View file @
4da992ba
...
...
@@ -158,7 +158,6 @@ RtpSession * create_duplex_rtpsession(int loc_rtp_port, int loc_rtcp_port, bool_
rtp_session_signal_connect
(
rtpr
,
"timestamp_jump"
,
(
RtpCallback
)
rtp_session_resync
,
(
long
)
NULL
);
rtp_session_signal_connect
(
rtpr
,
"ssrc_changed"
,
(
RtpCallback
)
rtp_session_resync
,
(
long
)
NULL
);
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. */
disable_checksums
(
rtp_session_get_rtp_socket
(
rtpr
));
return
rtpr
;
}
...
...
@@ -472,10 +471,6 @@ void media_stream_iterate(MediaStream *stream){
if
(
stream
->
ice_check_list
)
ice_check_list_process
(
stream
->
ice_check_list
,
stream
->
sessions
.
rtp_session
);
/*we choose to update the quality indicator as much as possible, since local statistics can be computed realtime. */
if
(
stream
->
state
==
MSStreamStarted
){
if
(
stream
->
is_beginning
&&
(
curtime
-
stream
->
start_time
>
15
)){
rtp_session_set_rtcp_report_interval
(
stream
->
sessions
.
rtp_session
,
5000
);
stream
->
is_beginning
=
FALSE
;
}
if
(
stream
->
qi
&&
curtime
>
stream
->
last_iterate_time
)
ms_quality_indicator_update_local
(
stream
->
qi
);
}
stream
->
last_iterate_time
=
curtime
;
...
...
src/voip/videostream.c
View file @
4da992ba
...
...
@@ -411,6 +411,11 @@ int video_stream_start (VideoStream *stream, RtpProfile *profile, const char *re
rtp_session_set_profile
(
rtps
,
profile
);
if
(
rem_rtp_port
>
0
)
rtp_session_set_remote_addr_full
(
rtps
,
rem_rtp_ip
,
rem_rtp_port
,
rem_rtcp_ip
,
rem_rtcp_port
);
if
(
rem_rtcp_port
>
0
)
{
rtp_session_enable_rtcp
(
rtps
,
TRUE
);
}
else
{
rtp_session_enable_rtcp
(
rtps
,
FALSE
);
}
rtp_session_set_payload_type
(
rtps
,
payload
);
rtp_session_set_jitter_compensation
(
rtps
,
jitt_comp
);
...
...
@@ -595,7 +600,6 @@ int video_stream_start (VideoStream *stream, RtpProfile *profile, const char *re
if
(
stream
->
ms
.
sessions
.
ticker
==
NULL
)
media_stream_start_ticker
(
&
stream
->
ms
);
stream
->
ms
.
start_time
=
ms_time
(
NULL
);
stream
->
ms
.
is_beginning
=
TRUE
;
/* attach the graphs */
if
(
stream
->
source
)
...
...
@@ -611,6 +615,7 @@ void video_stream_prepare_video(VideoStream *stream){
video_stream_unprepare_video
(
stream
);
stream
->
ms
.
rtprecv
=
ms_filter_new
(
MS_RTP_RECV_ID
);
rtp_session_set_payload_type
(
stream
->
ms
.
sessions
.
rtp_session
,
0
);
rtp_session_enable_rtcp
(
stream
->
ms
.
sessions
.
rtp_session
,
FALSE
);
ms_filter_call_method
(
stream
->
ms
.
rtprecv
,
MS_RTP_RECV_SET_SESSION
,
stream
->
ms
.
sessions
.
rtp_session
);
stream
->
ms
.
voidsink
=
ms_filter_new
(
MS_VOID_SINK_ID
);
ms_filter_link
(
stream
->
ms
.
rtprecv
,
0
,
stream
->
ms
.
voidsink
,
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment