Ejemplo n.º 1
0
int tsmf_ifman_on_new_presentation(TSMF_IFMAN* ifman)
{
	int status = 0;
	TSMF_PRESENTATION* presentation;

	DEBUG_DVC("");

	presentation = tsmf_presentation_find_by_id(Stream_Pointer(ifman->input));
	if (presentation)
	{
		DEBUG_DVC("Presentation already exists");
		ifman->output_pending = FALSE;
		return 0;

	}

	presentation = tsmf_presentation_new(Stream_Pointer(ifman->input), ifman->channel_callback);

	if (presentation == NULL)
		status = 1;
	else
		tsmf_presentation_set_audio_device(presentation, ifman->audio_name, ifman->audio_device);

	ifman->output_pending = TRUE;

	return status;
}
Ejemplo n.º 2
0
/**
 * Function description
 *
 * @return 0 on success, otherwise a Win32 error code
 */
UINT tsmf_ifman_on_new_presentation(TSMF_IFMAN* ifman)
{
	UINT status = CHANNEL_RC_OK;
	TSMF_PRESENTATION* presentation;

	DEBUG_TSMF("");

	if (Stream_GetRemainingLength(ifman->input) < GUID_SIZE)
		return ERROR_INVALID_DATA;

	presentation = tsmf_presentation_find_by_id(Stream_Pointer(ifman->input));

	if (presentation)
	{
		DEBUG_TSMF("Presentation already exists");
		ifman->output_pending = FALSE;
		return CHANNEL_RC_OK;
	}

	presentation = tsmf_presentation_new(Stream_Pointer(ifman->input), ifman->channel_callback);

	if (!presentation)
		status = ERROR_OUTOFMEMORY;
	else
		tsmf_presentation_set_audio_device(presentation, ifman->audio_name, ifman->audio_device);

	ifman->output_pending = TRUE;

	return status;
}
Ejemplo n.º 3
0
int
tsmf_ifman_on_new_presentation(TSMF_IFMAN * ifman)
{
	TSMF_PRESENTATION * presentation;
	int error = 0;

	LLOGLN(0, ("tsmf_ifman_on_new_presentation:"));
	presentation = tsmf_presentation_new(ifman->input_buffer, ifman->channel_callback);
	if (presentation == NULL)
		error = 1;
	tsmf_presentation_set_audio_device(presentation, ifman->audio_name, ifman->audio_device);
	ifman->output_pending = 1;
	return error;
}