Пример #1
0
static void mpf_mixer_trace(mpf_object_t *object)
{
	mpf_mixer_t *mixer = (mpf_mixer_t*) object;
	apr_size_t i;
	mpf_audio_stream_t *source;
	char buf[2048];
	apr_size_t offset;

	apt_text_stream_t output;
	apt_text_stream_init(&output,buf,sizeof(buf)-1);

	for(i=0; i<mixer->source_count; i++)	{
		source = mixer->source_arr[i];
		if(source) {
			mpf_audio_stream_trace(source,STREAM_DIRECTION_RECEIVE,&output);
			apt_text_char_insert(&output,';');
		}
	}

	offset = output.pos - output.text.buf;
	output.pos += apr_snprintf(output.pos, output.text.length - offset,
		"->Mixer->");

	mpf_audio_stream_trace(mixer->sink,STREAM_DIRECTION_SEND,&output);

	*output.pos = '\0';
	apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Media Path %s %s",
		object->name,
		output.text.buf);
}
Пример #2
0
static void mpf_bridge_trace(mpf_object_t *object)
{
	mpf_bridge_t *bridge = (mpf_bridge_t*) object;
	char buf[1024];
	apr_size_t offset;

	apt_text_stream_t output;
	apt_text_stream_init(&output,buf,sizeof(buf)-1);

	mpf_audio_stream_trace(bridge->source,STREAM_DIRECTION_RECEIVE,&output);
	
	offset = output.pos - output.text.buf;
	output.pos += apr_snprintf(output.pos, output.text.length - offset,
		"->Bridge->");

	mpf_audio_stream_trace(bridge->sink,STREAM_DIRECTION_SEND,&output);

	*output.pos = '\0';
	apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Media Path %s %s",object->name,output.text.buf);
}
Пример #3
0
static void mpf_encoder_trace(mpf_audio_stream_t *stream, mpf_stream_direction_e direction, apt_text_stream_t *output)
{
	apr_size_t offset;
	mpf_codec_descriptor_t *descriptor;
	mpf_encoder_t *encoder = stream->obj;

	descriptor = encoder->base->tx_descriptor;
	if(descriptor) {
		offset = output->pos - output->text.buf;
		output->pos += apr_snprintf(output->pos, output->text.length - offset,
			"[%s/%d/%d]->Encoder->",
			descriptor->name.buf,
			descriptor->sampling_rate,
			descriptor->channel_count);
	}

	mpf_audio_stream_trace(encoder->sink,direction,output);
}