Exemplo n.º 1
0
void freerdp_channels_dummy() 
{
	audin_server_context_new(NULL);
	audin_server_context_free(NULL);

	rdpsnd_server_context_new(NULL);
	rdpsnd_server_context_free(NULL);

	cliprdr_server_context_new(NULL);
	cliprdr_server_context_free(NULL);

	echo_server_context_new(NULL);
	echo_server_context_free(NULL);

	rdpdr_server_context_new(NULL);
	rdpdr_server_context_free(NULL);

	drdynvc_server_context_new(NULL);
	drdynvc_server_context_free(NULL);

	rdpei_server_context_new(NULL);
	rdpei_server_context_free(NULL);

	remdesk_server_context_new(NULL);
	remdesk_server_context_free(NULL);

	encomsp_server_context_new(NULL);
	encomsp_server_context_free(NULL);

	rdpgfx_server_context_new(NULL);
	rdpgfx_server_context_free(NULL);
}
Exemplo n.º 2
0
BOOL wf_peer_rdpsnd_init(wfPeerContext* context)
{
	wfInfo* wfi;
	
	wfi = wf_info_get_instance();

	wfi->snd_mutex = CreateMutex(NULL, FALSE, NULL);
	context->rdpsnd = rdpsnd_server_context_new(context->vcm);
	context->rdpsnd->data = context;

	context->rdpsnd->server_formats = test_audio_formats;
	context->rdpsnd->num_server_formats =
			sizeof(test_audio_formats) / sizeof(test_audio_formats[0]);

	context->rdpsnd->src_format.wFormatTag = 1;
	context->rdpsnd->src_format.nChannels = 2;
	context->rdpsnd->src_format.nSamplesPerSec = 44100;
	context->rdpsnd->src_format.wBitsPerSample = 16;

	context->rdpsnd->Activated = wf_peer_rdpsnd_activated;

	context->rdpsnd->Initialize(context->rdpsnd);

	wf_rdpsnd_set_latest_peer(context);

	wfi->snd_stop = FALSE;
	return TRUE;
}
Exemplo n.º 3
0
int shadow_client_rdpsnd_init(rdpShadowClient* client)
{
	RdpsndServerContext* rdpsnd;

	rdpsnd = client->rdpsnd = rdpsnd_server_context_new(client->vcm);
	if (!rdpsnd)
	{
		return 0;
	}

	rdpsnd->data = client;

	if (client->subsystem->rdpsndFormats)
	{
		rdpsnd->server_formats = client->subsystem->rdpsndFormats;
		rdpsnd->num_server_formats = client->subsystem->nRdpsndFormats;
	}
	else
	{
		/* Set default audio formats. */
		rdpsnd->server_formats = default_supported_audio_formats;
		rdpsnd->num_server_formats =
			sizeof(default_supported_audio_formats) / sizeof(default_supported_audio_formats[0]);
	}

	rdpsnd->src_format = rdpsnd->server_formats[0];

	rdpsnd->Activated = rdpsnd_activated;

	rdpsnd->Initialize(rdpsnd, TRUE);

	return 1;

}
Exemplo n.º 4
0
void freerdp_channels_dummy()
{
	audin_server_context_new(NULL);
	audin_server_context_free(NULL);

	rdpsnd_server_context_new(NULL);
	rdpsnd_server_context_free(NULL);
}
Exemplo n.º 5
0
int freerds_channels_post_connect(rdsConnection* session)
{
	int i;
	rdpSettings* settings = session->settings;

	for (i = 0; i < settings->ChannelCount; i++)
	{

		if (settings->ChannelDefArray[i].joined)
		{
			BOOL allowed = FALSE;

			freerds_icp_IsChannelAllowed(session->id, settings->ChannelDefArray[i].Name, &allowed);
			printf("channel %s is %s\n", settings->ChannelDefArray[i].Name, allowed ? "allowed" : "not allowed");
#if 0
			if (strncmp(settings->ChannelDefArray[i].Name, "cliprdr", 7) == 0)
			{
				printf("Channel %s registered\n", settings->ChannelDefArray[i].Name);
				session->cliprdr = cliprdr_server_context_new(session->vcm);
				session->cliprdr->Start(session->cliprdr);
			}
			else if (strncmp(settings->ChannelDefArray[i].Name, "rdpdr", 5) == 0)
			{
				printf("Channel %s registered\n", settings->ChannelDefArray[i].Name);
				session->rdpdr = rdpdr_server_context_new(session->vcm);
				session->rdpdr->Start(session->rdpdr);
			}
			else if (strncmp(settings->ChannelDefArray[i].Name, "rdpsnd", 6) == 0)
			{
				printf("Channel %s registered\n", settings->ChannelDefArray[i].Name);
				session->rdpsnd = rdpsnd_server_context_new(session->vcm);
				session->rdpsnd->Start(session->rdpsnd);
			}
			else if (strncmp(settings->ChannelDefArray[i].Name, "drdynvc", 7) == 0)
			{
				printf("Channel %s registered\n", settings->ChannelDefArray[i].Name);
				session->drdynvc = drdynvc_server_context_new(session->vcm);
				session->drdynvc->Start(session->drdynvc);
			}
			else
#endif
			{
				printf("Channel %s not registered\n", settings->ChannelDefArray[i].Name);
			}
		}
	}

	return 0;
}
Exemplo n.º 6
0
int xrdp_channels_post_connect(xrdpSession* session)
{
	int i;
	rdpSettings* settings = session->settings;

	for (i = 0; i < settings->ChannelCount; i++)
	{
		if (settings->ChannelDefArray[i].joined)
		{
#if 0
			if (strncmp(settings->ChannelDefArray[i].Name, "cliprdr", 7) == 0)
			{
				printf("Channel %s registered\n", settings->ChannelDefArray[i].Name);
				session->cliprdr = cliprdr_server_context_new(session->vcm);
				session->cliprdr->Start(session->cliprdr);
			}
			else if (strncmp(settings->ChannelDefArray[i].Name, "rdpdr", 5) == 0)
			{
				printf("Channel %s registered\n", settings->ChannelDefArray[i].Name);
				session->rdpdr = rdpdr_server_context_new(session->vcm);
				session->rdpdr->Start(session->rdpdr);
			}
			else if (strncmp(settings->ChannelDefArray[i].Name, "rdpsnd", 6) == 0)
			{
				printf("Channel %s registered\n", settings->ChannelDefArray[i].Name);
				session->rdpsnd = rdpsnd_server_context_new(session->vcm);
				session->rdpsnd->Start(session->rdpsnd);
			}
			else if (strncmp(settings->ChannelDefArray[i].Name, "drdynvc", 7) == 0)
			{
				printf("Channel %s registered\n", settings->ChannelDefArray[i].Name);
				session->drdynvc = drdynvc_server_context_new(session->vcm);
				session->drdynvc->Start(session->drdynvc);
			}
			else
#endif
			{
				printf("Channel %s not registered\n", settings->ChannelDefArray[i].Name);
			}
		}
	}

	return 0;
}
Exemplo n.º 7
0
BOOL mf_peer_rdpsnd_init(mfPeerContext* context)
{
	context->rdpsnd = rdpsnd_server_context_new(context->vcm);
	context->rdpsnd->data = context;
	
	context->rdpsnd->server_formats = supported_audio_formats;
	context->rdpsnd->num_server_formats = sizeof(supported_audio_formats) / sizeof(supported_audio_formats[0]);
	
	context->rdpsnd->src_format.wFormatTag = 1;
	context->rdpsnd->src_format.nChannels = 2;
	context->rdpsnd->src_format.nSamplesPerSec = 44100;
	context->rdpsnd->src_format.wBitsPerSample = 16;
	
	context->rdpsnd->Activated = mf_peer_rdpsnd_activated;
	
	context->rdpsnd->Initialize(context->rdpsnd, TRUE);
	
	return TRUE;
}
Exemplo n.º 8
0
BOOL wf_peer_rdpsnd_init(wfPeerContext* context)
{
	wfInfo* wfi = wf_info_get_instance();

	if (!wfi)
		return FALSE;

	if (!(wfi->snd_mutex = CreateMutex(NULL, FALSE, NULL)))
		return FALSE;

	context->rdpsnd = rdpsnd_server_context_new(context->vcm);
	context->rdpsnd->rdpcontext = &context->_p;
	context->rdpsnd->data = context;
	context->rdpsnd->num_server_formats = server_rdpsnd_get_formats(&context->rdpsnd->server_formats);

	if (context->rdpsnd->num_server_formats > 0)
		context->rdpsnd->src_format = &context->rdpsnd->server_formats[0];

	context->rdpsnd->Activated = wf_peer_rdpsnd_activated;
	context->rdpsnd->Initialize(context->rdpsnd, TRUE);
	wf_rdpsnd_set_latest_peer(context);
	wfi->snd_stop = FALSE;
	return TRUE;
}