Esempio n. 1
0
bool FeMedia::get_decoder_available( VideoDecoder d )
{
	switch ( d )
	{
	case software:
		return true;

	case mmal:
#if defined(USE_GLES)
		ensure_init();

		{
			int i=0;
			while ( mm[i].id != AV_CODEC_ID_NONE )
			{
				if ( mm[i].codec )
					return true;
				i++;
			}
		}
#endif
		return false;

	default:
		return false;
	}
}
Esempio n. 2
0
//
// Try to use a hardware accelerated decoder where readily available...
//
void FeMedia::try_hw_accel( AVCodec *&dec )
{
#if defined( USE_GLES )

	if ( g_decoder != mmal )
		return;

	ensure_init();

	int i=0;
	while ( mm[i].id != AV_CODEC_ID_NONE )
	{
		if (( mm[i].id == dec->id ) && mm[i].codec )
		{
			dec = mm[i].codec;
#ifdef FE_DEBUG
			std::cout << "Using hardware accelerated video decoder: "
				<< dec->long_name << std::endl;
#endif
			break;
		}
		i++;
	}
#endif
}
Esempio n. 3
0
	void MemoryTracker::start() {
		ensure_init();
		impl->is_tracking = true;
		if (impl->is_paused) {
			impl->is_paused = false;
		} else {
			::memset(impl->begin, 0, TRACKING_ARENA_SIZE);
		}
	}