Exemplo n.º 1
0
BOOL tsmf_check_decoder_available(const char* name)
{
	ITSMFDecoder* decoder = NULL;
	BOOL retValue = FALSE;

	if (name)
	{
		decoder = tsmf_load_decoder_by_name(name);
	}
#if defined(WITH_GSTREAMER_1_0) || defined(WITH_GSTREAMER_0_10)
        if (!decoder)
                decoder = tsmf_load_decoder_by_name("gstreamer");
#endif

#if defined(WITH_FFMPEG)
	if (!decoder)
		decoder = tsmf_load_decoder_by_name("ffmpeg");
#endif

	if (decoder)
	{
		decoder->Free(decoder);
		decoder = NULL;
		retValue = TRUE;
	}

	return retValue;
}
Exemplo n.º 2
0
ITSMFDecoder* tsmf_load_decoder(const char* name, TS_AM_MEDIA_TYPE* media_type)
{
	ITSMFDecoder* decoder = NULL;

	if (name)
	{
		decoder = tsmf_load_decoder_by_name(name);
	}

#if defined(WITH_GSTREAMER_1_0) || defined(WITH_GSTREAMER_0_10)
	if (!decoder)
		decoder = tsmf_load_decoder_by_name("gstreamer");
#endif

#if defined(WITH_FFMPEG)
	if (!decoder)
		decoder = tsmf_load_decoder_by_name("ffmpeg");
#endif

	if (decoder)
	{
		if (!tsmf_decoder_set_format(decoder, media_type))
		{
			decoder->Free(decoder);
			decoder = NULL;
		}
	}

	return decoder;
}
Exemplo n.º 3
0
ITSMFDecoder* tsmf_load_decoder(const char* name, TS_AM_MEDIA_TYPE* media_type)
{
	ITSMFDecoder* decoder;

	if (name)
	{
		decoder = tsmf_load_decoder_by_name(name, media_type);
	}
	else
	{
		decoder = tsmf_load_decoder_by_name("ffmpeg", media_type);
	}

	return decoder;
}