Exemple #1
0
int tsmf_ifman_set_source_video_rect(TSMF_IFMAN* ifman)
{
	int status = 0;
	float Left, Top;
	float Right, Bottom;
	TSMF_PRESENTATION* presentation;

	DEBUG_DVC("");

	presentation = tsmf_presentation_find_by_id(Stream_Pointer(ifman->input));
	Stream_Seek(ifman->input, 16);

	if (!presentation)
	{
		status = 1;
	}
	else
	{
		Left = tsmf_stream_read_float(ifman->input); /* Left (4 bytes) */
		Top = tsmf_stream_read_float(ifman->input); /* Top (4 bytes) */
		Right = tsmf_stream_read_float(ifman->input); /* Right (4 bytes) */
		Bottom = tsmf_stream_read_float(ifman->input); /* Bottom (4 bytes) */

		DEBUG_DVC("SetSourceVideoRect: Left: %f Top: %f Right: %f Bottom: %f",
				Left, Top, Right, Bottom);
	}

	ifman->output_pending = TRUE;

	return status;
}
Exemple #2
0
/**
 * Function description
 *
 * @return 0 on success, otherwise a Win32 error code
 */
UINT tsmf_ifman_set_source_video_rect(TSMF_IFMAN* ifman)
{
	UINT status = CHANNEL_RC_OK;
	float Left, Top;
	float Right, Bottom;
	TSMF_PRESENTATION* presentation;

	DEBUG_TSMF("");

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

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

	Stream_Seek(ifman->input, GUID_SIZE);

	if (!presentation)
	{
		status = ERROR_NOT_FOUND;
	}
	else
	{
		Left = tsmf_stream_read_float(ifman->input); /* Left (4 bytes) */
		Top = tsmf_stream_read_float(ifman->input); /* Top (4 bytes) */
		Right = tsmf_stream_read_float(ifman->input); /* Right (4 bytes) */
		Bottom = tsmf_stream_read_float(ifman->input); /* Bottom (4 bytes) */
		DEBUG_TSMF("SetSourceVideoRect: Left: %f Top: %f Right: %f Bottom: %f",
				   Left, Top, Right, Bottom);
	}

	ifman->output_pending = TRUE;

	return status;
}