Commit 46518426 authored by Simon Morlat's avatar Simon Morlat

improve audio conference (include MSVolume in graph)

fix gitversion.h stub not put in right place
parent 85e43112
......@@ -42,11 +42,11 @@ struct _MSAudioEndpoint{
MSFilter *in_resampler,*out_resampler;
MSCPoint out_cut_point;
MSCPoint in_cut_point;
MSCPoint in_cut_point_prev;
MSCPoint mixer_in;
MSCPoint mixer_out;
MSAudioConference *conference;
int pin;
bool_t is_remote;
};
typedef struct _MSAudioEndpoint MSAudioEndpoint;
......
......@@ -263,8 +263,8 @@ make_gitversion_h:
fi \
&& rm -f $(GITVERSION_FILE_TMP) ;\
fi
if ! test -f $(GITVERSION_FILE) ; then \
$(ECHO) -n "#define GIT_VERSION \"unknown\" " > $(GITVERSION_FILE) ;\
if ! test -f $(srcdir)/$(GITVERSION_FILE) ; then \
$(ECHO) -n "#define GIT_VERSION \"unknown\" " > $(srcdir)/$(GITVERSION_FILE) ;\
fi
$(GITVERSION_FILE): make_gitversion_h
......
......@@ -61,16 +61,23 @@ static void cut_audio_stream_graph(MSAudioEndpoint *ep, bool_t is_remote){
/*stop the audio graph*/
ms_ticker_detach(st->ticker,st->soundread);
if (!st->ec) ms_ticker_detach(st->ticker,st->soundwrite);
ep->in_cut_point=just_after(st->decoder);
ms_filter_unlink(st->decoder,0,ep->in_cut_point.filter, ep->in_cut_point.pin);
ep->in_cut_point_prev.pin=0;
if (is_remote){
/*we would like to keep the volrecv (MSVolume filter) in the graph to measure the output level*/
ep->in_cut_point_prev.filter=st->volrecv;
}else{
ep->in_cut_point_prev.filter=st->decoder;
}
ep->in_cut_point=just_after(ep->in_cut_point_prev.filter);
ms_filter_unlink(ep->in_cut_point_prev.filter,ep->in_cut_point_prev.pin,ep->in_cut_point.filter, ep->in_cut_point.pin);
ep->out_cut_point=just_before(st->encoder);
ms_filter_unlink(ep->out_cut_point.filter,ep->out_cut_point.pin,st->encoder,0);
if (is_remote){
ep->mixer_in.filter=st->decoder;
ep->mixer_in.pin=0;
ep->mixer_in.filter=ep->in_cut_point_prev.filter;
ep->mixer_in.pin=ep->in_cut_point_prev.pin;
ep->mixer_out.filter=st->encoder;
ep->mixer_out.pin=0;
}else{
......@@ -82,7 +89,7 @@ static void cut_audio_stream_graph(MSAudioEndpoint *ep, bool_t is_remote){
static void redo_audio_stream_graph(MSAudioEndpoint *ep){
AudioStream *st=ep->st;
ms_filter_link(st->decoder,0,ep->in_cut_point.filter,ep->in_cut_point.pin);
ms_filter_link(ep->in_cut_point_prev.filter,ep->in_cut_point_prev.pin,ep->in_cut_point.filter,ep->in_cut_point.pin);
ms_filter_link(ep->out_cut_point.filter,ep->out_cut_point.pin,st->encoder,0);
ms_ticker_attach(st->ticker,st->soundread);
if (!st->ec)
......
......@@ -418,10 +418,10 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char
ms_connection_helper_link(&h,stream->rtprecv,-1,0);
ms_connection_helper_link(&h,stream->decoder,0,0);
ms_connection_helper_link(&h,stream->dtmfgen,0,0);
if (stream->equalizer)
ms_connection_helper_link(&h,stream->equalizer,0,0);
if (stream->volrecv)
ms_connection_helper_link(&h,stream->volrecv,0,0);
if (stream->equalizer)
ms_connection_helper_link(&h,stream->equalizer,0,0);
if (stream->ec)
ms_connection_helper_link(&h,stream->ec,0,0);
if (stream->write_resampler)
......@@ -645,10 +645,10 @@ void audio_stream_stop(AudioStream * stream)
ms_connection_helper_unlink(&h,stream->rtprecv,-1,0);
ms_connection_helper_unlink(&h,stream->decoder,0,0);
ms_connection_helper_unlink(&h,stream->dtmfgen,0,0);
if (stream->equalizer)
ms_connection_helper_unlink(&h,stream->equalizer,0,0);
if (stream->volrecv!=NULL)
ms_connection_helper_unlink(&h,stream->volrecv,0,0);
if (stream->equalizer)
ms_connection_helper_unlink(&h,stream->equalizer,0,0);
if (stream->ec!=NULL)
ms_connection_helper_unlink(&h,stream->ec,0,0);
if (stream->write_resampler!=NULL)
......
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