Пример #1
0
bool RecorderSession::StartRecorder(mrcp_channel_t* pMrcpChannel)
{
	RecorderChannel* pRecorderChannel = (RecorderChannel*) mrcp_application_channel_object_get(pMrcpChannel);
	/* create and send RECORD request */
	mrcp_message_t* pMrcpMessage = CreateRecordRequest(pMrcpChannel);
	if(pMrcpMessage)
	{
		SendMrcpRequest(pRecorderChannel->m_pMrcpChannel,pMrcpMessage);
	}

	const mpf_codec_descriptor_t* pDescriptor = mrcp_application_source_descriptor_get(pMrcpChannel);
	pRecorderChannel->m_pAudioIn = GetAudioIn(pDescriptor,GetSessionPool());
	return true;
}
Пример #2
0
bool RecorderSession::StartRecorder(mrcp_channel_t* pMrcpChannel)
{
	const mpf_codec_descriptor_t* pDescriptor = mrcp_application_source_descriptor_get(pMrcpChannel);
	if(!pDescriptor)
	{
		apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Media Source Descriptor");
		return Terminate();
	}

	RecorderChannel* pRecorderChannel = (RecorderChannel*) mrcp_application_channel_object_get(pMrcpChannel);
	/* create and send RECORD request */
	mrcp_message_t* pMrcpMessage = CreateRecordRequest(pMrcpChannel);
	if(pMrcpMessage)
	{
		SendMrcpRequest(pRecorderChannel->m_pMrcpChannel,pMrcpMessage);
	}

	pRecorderChannel->m_pAudioIn = GetAudioIn(pDescriptor,GetSessionPool());
	return true;
}