mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
cPlayback: implement new libcoolstream interfaces
a new "Start" and changed "SelectSubtitles" function are implemented to fix compilation (mostly stubbed out, though)
This commit is contained in:
@@ -300,6 +300,11 @@ bool cPlayback::Open(playmode_t PlayMode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool cPlayback::Start(std::string /*filename*/, std::string /*headers*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//Used by Fileplay
|
||||
bool cPlayback::Start(char *filename, unsigned short vpid, int vtype, unsigned short _apid,
|
||||
int ac3, unsigned int duration)
|
||||
@@ -366,7 +371,7 @@ bool cPlayback::SetAPid(unsigned short pid, int /*ac3*/)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cPlayback::SelectSubtitles(int pid)
|
||||
bool cPlayback::SelectSubtitles(int pid, std::string /*charset*/)
|
||||
{
|
||||
lt_info("%s: pid %i\n", __func__, pid);
|
||||
if (pid != pd->subpid)
|
||||
|
@@ -13,6 +13,11 @@ void cPlayback::Close(void)
|
||||
{
|
||||
}
|
||||
|
||||
bool cPlayback::Start(std::string /*filename*/, std::string /*headers*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cPlayback::Start(char * filename, unsigned short vpid, int vtype, unsigned short apid, int ac3, unsigned int duration)
|
||||
{
|
||||
printf("%s:%s - filename=%s vpid=%u vtype=%d apid=%u ac3=%d duration=%i\n",
|
||||
@@ -26,7 +31,7 @@ bool cPlayback::SetAPid(unsigned short pid, int /*ac3*/)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cPlayback::SelectSubtitles(int pid)
|
||||
bool cPlayback::SelectSubtitles(int pid, std::string /*charset*/)
|
||||
{
|
||||
printf("%s:%s pid %i\n", FILENAME, __func__, pid);
|
||||
return true;
|
||||
|
@@ -41,6 +41,7 @@ public:
|
||||
bool Open(playmode_t PlayMode);
|
||||
void Close(void);
|
||||
bool Start(char *filename, unsigned short vpid, int vtype, unsigned short apid, int ac3, unsigned int duration);
|
||||
bool Start(std::string filename, std::string headers = "");
|
||||
bool Stop(void);
|
||||
bool SetAPid(unsigned short pid, int audio_flag);
|
||||
bool SetSpeed(int speed);
|
||||
@@ -49,7 +50,7 @@ public:
|
||||
bool SetPosition(int position, bool absolute = false);
|
||||
void FindAllPids(uint16_t *pids, unsigned short *aud_flags, uint16_t *num, std::string *language);
|
||||
void FindAllSubs(uint16_t *pids, unsigned short *supported, uint16_t *num, std::string *language);
|
||||
bool SelectSubtitles(int pid);
|
||||
bool SelectSubtitles(int pid, std::string charset = "");
|
||||
void GetChapters(std::vector<int> &positions, std::vector<std::string> &titles);
|
||||
void RequestAbort();
|
||||
void GetTitles(std::vector<int> &playlists, std::vector<std::string> &titles, int ¤t);
|
||||
|
@@ -105,6 +105,12 @@ void cPlayback::Close(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: implement cookie stuff */
|
||||
bool cPlayback::Start(std::string filename, std::string /*headers*/)
|
||||
{
|
||||
return Start((char *)filename.c_str(), 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
bool cPlayback::Start(char *filename, unsigned short vpid, int vtype, unsigned short apid, int ac3, unsigned int)
|
||||
{
|
||||
bool ret = false;
|
||||
@@ -444,7 +450,7 @@ void cPlayback::FindAllSubs(uint16_t * /*pids*/, unsigned short * /*supp*/, uint
|
||||
*num = 0;
|
||||
}
|
||||
|
||||
bool cPlayback::SelectSubtitles(int pid)
|
||||
bool cPlayback::SelectSubtitles(int pid, std::string /*charset*/)
|
||||
{
|
||||
lt_info("%s pid %d\n", __func__, pid);
|
||||
return false;
|
||||
|
@@ -241,6 +241,12 @@ bool cPlayback::Start(char *filename, unsigned short vp, int vtype, unsigned sho
|
||||
return pd->Start(filename, vp, vtype, ap, ac3, &audioDemux->fd);
|
||||
}
|
||||
|
||||
/* not implemented */
|
||||
bool cPlayback::Start(std::string /*filename*/, std::string /*headers*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool PBPrivate::Start(char *filename, unsigned short vp, int vtype, unsigned short ap, int _ac3, int *audiofd)
|
||||
{
|
||||
struct stat s;
|
||||
@@ -740,7 +746,7 @@ void cPlayback::FindAllSubs(uint16_t *, unsigned short *, uint16_t *num, std::st
|
||||
*num = 0;
|
||||
}
|
||||
|
||||
bool cPlayback::SelectSubtitles(int)
|
||||
bool cPlayback::SelectSubtitles(int, std::string)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user