Esempio n. 1
0
int eServiceDVD::getCurrentTrack()
{
	int audio_id,audio_type;
	uint16_t audio_lang;
	ddvd_get_last_audio(m_ddvdconfig, &audio_id, &audio_lang, &audio_type);
	return audio_id;
}
Esempio n. 2
0
int eServiceDVD::getCurrentTrack()
{
	int audio_id,audio_type;
	uint16_t audio_lang;
	ddvd_get_last_audio(m_ddvdconfig, &audio_id, &audio_lang, &audio_type);
	eDebug("[eServiceDVD] getCurrentTracks: id=%d lang=%X type=%d", audio_id, audio_lang, audio_type);
	return audio_id;
}
Esempio n. 3
0
PyObject *eServiceDVD::getInfoObject(int w)
{
	switch(w)
	{
		case sUser+6:
		{
			ePyObject tuple = PyTuple_New(3);
			int audio_id,audio_type;
			uint16_t audio_lang;
			ddvd_get_last_audio(m_ddvdconfig, &audio_id, &audio_lang, &audio_type);
			char audio_string[3]={audio_lang >> 8, audio_lang, 0};
			PyTuple_SetItem(tuple, 0, PyInt_FromLong(audio_id+1));
			PyTuple_SetItem(tuple, 1, PyString_FromString(audio_string));
			switch(audio_type)
			{
				case DDVD_MPEG:
					PyTuple_SetItem(tuple, 2, PyString_FromString("MPEG"));
					break;
				case DDVD_AC3:
					PyTuple_SetItem(tuple, 2, PyString_FromString("AC3"));
					break;
				case DDVD_DTS:
					PyTuple_SetItem(tuple, 2, PyString_FromString("DTS"));
					break;
				case DDVD_LPCM:
					PyTuple_SetItem(tuple, 2, PyString_FromString("LPCM"));
					break;
				default:
					PyTuple_SetItem(tuple, 2, PyString_FromString(""));
			}
			return tuple;
		}
		case sUser+7:
		{
			ePyObject tuple = PyTuple_New(2);
			int spu_id;
			uint16_t spu_lang;
			ddvd_get_last_spu(m_ddvdconfig, &spu_id, &spu_lang);
			char spu_string[3]={spu_lang >> 8, spu_lang, 0};
			if (spu_id == -1)
			{
				PyTuple_SetItem(tuple, 0, PyInt_FromLong(0));
				PyTuple_SetItem(tuple, 1, PyString_FromString(""));
			}
			else
			{
				PyTuple_SetItem(tuple, 0, PyInt_FromLong(spu_id+1));
				PyTuple_SetItem(tuple, 1, PyString_FromString(spu_string));
			}				
			return tuple;
		}
		case sUser+8:
		{
			ePyObject tuple = PyTuple_New(2);
			int current, num;
			ddvd_get_angle_info(m_ddvdconfig, &current, &num);
			PyTuple_SetItem(tuple, 0, PyInt_FromLong(current));
			PyTuple_SetItem(tuple, 1, PyInt_FromLong(num));

			return tuple;
		}
		default:
			eDebug("unhandled getInfoObject(%d)", w);
	}
	Py_RETURN_NONE;
}
Esempio n. 4
0
ePtr<iServiceInfoContainer> eServiceDVD::getInfoObject(int w)
{
	eServiceDVDInfoContainer *container = new eServiceDVDInfoContainer;
	ePtr<iServiceInfoContainer> retval = container;
	switch (w)
	{
		case sUser + 6:
		{
			int audio_id,audio_type;
			uint16_t audio_lang;
			ddvd_get_last_audio(m_ddvdconfig, &audio_id, &audio_lang, &audio_type);
			char audio_string[3] = {audio_lang >> 8, audio_lang, 0};
	                eDebug("[eServiceDVD] getInfoObject sUser+6:  audio_id=%d lang=%X type=%d", audio_id, audio_lang, audio_type);
			container->addInteger(audio_id + 1);
			container->addString(audio_string);
			switch (audio_type)
			{
			case DDVD_MPEG:
				container->addString("MPEG");
				break;
			case DDVD_AC3:
				container->addString("AC3");
				break;
			case DDVD_DTS:
				container->addString("DTS");
				break;
			case DDVD_LPCM:
				container->addString("LPCM");
				break;
			}
			break;
		}
		case sUser + 7:
		{
			int spu_id;
			uint16_t spu_lang;
			ddvd_get_last_spu(m_ddvdconfig, &spu_id, &spu_lang);
	                eDebug("[eServiceDVD] getInfoObject sUser+7:  spu_id=%d lang=%X", spu_id, spu_lang);
			char spu_string[3] = {spu_lang >> 8, spu_lang, 0};
			if (spu_id == -1)
			{
				container->addInteger(0);
				container->addString("");
			}
			else
			{
				container->addInteger(spu_id + 1);
				container->addString(spu_string);
			}
			break;
		}
		case sUser + 8:
		{
			int current, num;
			ddvd_get_angle_info(m_ddvdconfig, &current, &num);
	                eDebug("[eServiceDVD] getInfoObject sUser+8:  angle=%d num=%X", current, num);
			container->addInteger(current);
			container->addInteger(num);
			break;
		}
		default:
			eDebug("[eServiceDVD] getInfoObject %d unsupported", w);
	}
	return retval;
}