mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 07:23:11 +02:00
copy api changes from spark to generic
This commit is contained in:
@@ -13,7 +13,11 @@ void cPlayback::Close(void)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MARTII
|
||||||
|
bool cPlayback::Start(char * filename, unsigned short vpid, int vtype, unsigned short apid, bool ac3, int duration, bool /*noprobe*/)
|
||||||
|
#else
|
||||||
bool cPlayback::Start(char * filename, unsigned short vpid, int vtype, unsigned short apid, bool ac3, int duration)
|
bool cPlayback::Start(char * filename, unsigned short vpid, int vtype, unsigned short apid, bool ac3, int duration)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
printf("%s:%s - filename=%s vpid=%u vtype=%d apid=%u ac3=%d duration=%i\n",
|
printf("%s:%s - filename=%s vpid=%u vtype=%d apid=%u ac3=%d duration=%i\n",
|
||||||
FILENAME, __func__, filename, vpid, vtype, apid, ac3, duration);
|
FILENAME, __func__, filename, vpid, vtype, apid, ac3, duration);
|
||||||
@@ -26,11 +30,13 @@ bool cPlayback::SetAPid(unsigned short pid, bool /*ac3*/)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef MARTII
|
||||||
bool cPlayback::SetSPid(int pid)
|
bool cPlayback::SetSPid(int pid)
|
||||||
{
|
{
|
||||||
printf("%s:%s pid %i\n", FILENAME, __func__, pid);
|
printf("%s:%s pid %i\n", FILENAME, __func__, pid);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool cPlayback::SetSpeed(int speed)
|
bool cPlayback::SetSpeed(int speed)
|
||||||
{
|
{
|
||||||
@@ -62,6 +68,49 @@ void cPlayback::FindAllPids(uint16_t *, unsigned short *, uint16_t *numpida, std
|
|||||||
printf("%s:%s\n", FILENAME, __func__);
|
printf("%s:%s\n", FILENAME, __func__);
|
||||||
*numpida = 0;
|
*numpida = 0;
|
||||||
}
|
}
|
||||||
|
#ifdef MARTII
|
||||||
|
void cPlayback::FindAllSubtitlePids(uint16_t * /*pids*/, uint16_t *numpids, std::string * /*language*/)
|
||||||
|
{
|
||||||
|
*numpids = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cPlayback::SetSubtitlePid(unsigned short /*pid*/)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cPlayback::SetDvbsubtitlePid(unsigned short /*pid*/)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cPlayback::SetTeletextPid(unsigned short /*pid*/)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cPlayback::FindAllDvbsubtitlePids(uint16_t * /*pids*/, uint16_t *numpids, std::string * /*language*/)
|
||||||
|
{
|
||||||
|
*numpids = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cPlayback::FindAllTeletextsubtitlePids(uint16_t * /*pids*/, uint16_t *numpids, std::string * /*language*/)
|
||||||
|
{
|
||||||
|
*numpids = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cPlayback::SuspendSubtitle(bool /*b*/)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void cPlayback::RequestAbort()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned short cPlayback::GetTeletextPid(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
cPlayback::cPlayback(int /*num*/)
|
cPlayback::cPlayback(int /*num*/)
|
||||||
{
|
{
|
||||||
|
@@ -13,19 +13,52 @@ class cPlayback
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
bool playing;
|
bool playing;
|
||||||
|
#ifdef MARTII
|
||||||
|
int mAudioStream;
|
||||||
|
int mSubtitleStream;
|
||||||
|
int mDvbsubtitleStream;
|
||||||
|
int mTeletextStream;
|
||||||
|
void (*framebuffer_callback)(unsigned char **, unsigned int *, unsigned int *, unsigned int *, int *);
|
||||||
|
#endif
|
||||||
public:
|
public:
|
||||||
|
#ifdef MARTII
|
||||||
|
cPlayback(int num __attribute__((unused))= 0, void (* /*fbcb*/)(unsigned char **, unsigned int *, unsigned int *, unsigned int *, int *) = NULL) { };
|
||||||
|
#endif
|
||||||
bool Open(playmode_t PlayMode);
|
bool Open(playmode_t PlayMode);
|
||||||
void Close(void);
|
void Close(void);
|
||||||
|
#ifdef MARTII
|
||||||
|
bool Start(char * filename, unsigned short vpid, int vtype, unsigned short apid, bool ac3, int duration, bool no_probe = true);
|
||||||
|
#else
|
||||||
bool Start(char * filename, unsigned short vpid, int vtype, unsigned short apid, bool ac3, int duration);
|
bool Start(char * filename, unsigned short vpid, int vtype, unsigned short apid, bool ac3, int duration);
|
||||||
|
#endif
|
||||||
bool Stop(void);
|
bool Stop(void);
|
||||||
bool SetAPid(unsigned short pid, bool ac3);
|
bool SetAPid(unsigned short pid, bool ac3);
|
||||||
|
#ifdef MARTII
|
||||||
|
bool SetSubtitlePid(unsigned short pid);
|
||||||
|
bool SetDvbsubtitlePid(unsigned short pid);
|
||||||
|
bool SetTeletextPid(unsigned short pid);
|
||||||
|
unsigned short GetAPid(void) { return mAudioStream; }
|
||||||
|
unsigned short GetSubtitlePid(void) { return mSubtitleStream; }
|
||||||
|
unsigned short GetDvbsubtitlePid(void) { return mDvbsubtitleStream; }
|
||||||
|
unsigned short GetTeletextPid(void);
|
||||||
|
void SuspendSubtitle(bool);
|
||||||
|
#else
|
||||||
bool SetSPid(int pid);
|
bool SetSPid(int pid);
|
||||||
|
#endif
|
||||||
bool SetSpeed(int speed);
|
bool SetSpeed(int speed);
|
||||||
bool GetSpeed(int &speed) const;
|
bool GetSpeed(int &speed) const;
|
||||||
bool GetPosition(int &position, int &duration);
|
bool GetPosition(int &position, int &duration);
|
||||||
bool SetPosition(int position, bool absolute = false);
|
bool SetPosition(int position, bool absolute = false);
|
||||||
void FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t *numpida, std::string *language);
|
void FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t *numpida, std::string *language);
|
||||||
|
#ifdef MARTII
|
||||||
|
void FindAllSubtitlePids(uint16_t *pids, uint16_t *numpids, std::string *language);
|
||||||
|
void FindAllDvbsubtitlePids(uint16_t *pids, uint16_t *numpids, std::string *language);
|
||||||
|
void FindAllTeletextsubtitlePids(uint16_t *pids, uint16_t *numpidt, std::string *tlanguage);
|
||||||
|
|
||||||
|
void RequestAbort(void);
|
||||||
|
#else
|
||||||
void FindAllSPids(int *spids, uint16_t *numpids, std::string *language);
|
void FindAllSPids(int *spids, uint16_t *numpids, std::string *language);
|
||||||
|
#endif
|
||||||
//
|
//
|
||||||
cPlayback(int num = 0);
|
cPlayback(int num = 0);
|
||||||
~cPlayback();
|
~cPlayback();
|
||||||
|
@@ -211,7 +211,11 @@ void cVideo::SetVideoMode(analog_mode_t)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MARTII
|
||||||
|
void cVideo::ShowPicture(const char *fname, bool)
|
||||||
|
#else
|
||||||
void cVideo::ShowPicture(const char *fname)
|
void cVideo::ShowPicture(const char *fname)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
lt_info("%s(%s)\n", __func__, fname);
|
lt_info("%s(%s)\n", __func__, fname);
|
||||||
if (access(fname, R_OK))
|
if (access(fname, R_OK))
|
||||||
@@ -326,7 +330,11 @@ int cVideo::getBlank(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MARTII
|
||||||
|
void cVideo::Pig(int x, int y, int w, int h, int /*osd_w*/, int /*osd_h*/, int /*startx*/, int /*starty*/, int /*endx*/, int /*endy*/)
|
||||||
|
#else
|
||||||
void cVideo::Pig(int x, int y, int w, int h, int, int)
|
void cVideo::Pig(int x, int y, int w, int h, int, int)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
pig_x = x;
|
pig_x = x;
|
||||||
pig_y = y;
|
pig_y = y;
|
||||||
|
@@ -178,10 +178,18 @@ class cVideo : public OpenThreads::Thread
|
|||||||
bool SetCECMode(VIDEO_HDMI_CEC_MODE) { return true; };
|
bool SetCECMode(VIDEO_HDMI_CEC_MODE) { return true; };
|
||||||
void SetCECAutoView(bool) { return; };
|
void SetCECAutoView(bool) { return; };
|
||||||
void SetCECAutoStandby(bool) { return; };
|
void SetCECAutoStandby(bool) { return; };
|
||||||
|
#ifdef MARTII
|
||||||
|
void ShowPicture(const char * fname, bool isM2V = false);
|
||||||
|
#else
|
||||||
void ShowPicture(const char * fname);
|
void ShowPicture(const char * fname);
|
||||||
|
#endif
|
||||||
void StopPicture();
|
void StopPicture();
|
||||||
void Standby(unsigned int bOn);
|
void Standby(unsigned int bOn);
|
||||||
|
#ifdef MARTII
|
||||||
|
void Pig(int x, int y, int w, int h, int osd_w = 1064, int osd_h = 600, int startx = 0, int starty = 0, int endx = 1279, int endy = 719);
|
||||||
|
#else
|
||||||
void Pig(int x, int y, int w, int h, int osd_w = 1064, int osd_h = 600);
|
void Pig(int x, int y, int w, int h, int osd_w = 1064, int osd_h = 600);
|
||||||
|
#endif
|
||||||
void SetControl(int, int) { return; };
|
void SetControl(int, int) { return; };
|
||||||
void setContrast(int val);
|
void setContrast(int val);
|
||||||
void SetVideoMode(analog_mode_t mode);
|
void SetVideoMode(analog_mode_t mode);
|
||||||
|
Reference in New Issue
Block a user