Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/libarmbox/playback_gst.cpp b/libarmbox/playback_gst.cpp
- index 5da0bb8..36d22ce 100644
- --- a/libarmbox/playback_gst.cpp
- +++ b/libarmbox/playback_gst.cpp
- @@ -1021,7 +1021,7 @@ void cPlayback::RequestAbort()
- {
- }
- -void cPlayback::FindAllSubs(uint16_t *, unsigned short *, uint16_t *numpida, std::string *)
- +void cPlayback::FindAllSubs(int * /*pids*/, unsigned int * /*supp*/, unsigned int *num, std::string * /*lang*/)
- {
- printf("%s:%s\n", FILENAME, __func__);
- *numpida = 0;
- @@ -1033,7 +1033,18 @@ void cPlayback::GetChapters(std::vector<int> &positions, std::vector<std::string
- titles.clear();
- }
- -bool cPlayback::SelectSubtitles(int pid)
- +void cPlayback::GetTitles(std::vector<int> &playlists, std::vector<std::string> &titles, int ¤t)
- +{
- + playlists.clear();
- + titles.clear();
- + current = 0;
- +}
- +
- +void cPlayback::SetTitle(int /*title*/)
- +{
- +}
- +
- +bool cPlayback::SelectSubtitles(int pid, std::string /*charset*/)
- {
- printf("%s:%s pid %i\n", FILENAME, __func__, pid);
- return true;
- diff --git a/libarmbox/playback_gst.h b/libarmbox/playback_gst.h
- index a58de78..c3e6488 100644
- --- a/libarmbox/playback_gst.h
- +++ b/libarmbox/playback_gst.h
- @@ -81,11 +81,13 @@ public:
- int GetSubtitlePid(void);
- bool SetPosition(int position, bool absolute = false);
- void FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *numpida, std::string *language);
- + void FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t *numpida, std::string *language) { FindAllPids((int*) apids, (unsigned int*) ac3flags, (unsigned int*) numpida, language); };
- + void FindAllSubs(int *pids, unsigned int *supported, unsigned int *numpida, std::string *language);
- + void FindAllSubs(uint16_t *pids, unsigned short *supported, uint16_t *numpida, std::string *language) { FindAllSubs((int*) pids, (unsigned int*) supported, (unsigned int*) numpida, language); };
- + bool SelectSubtitles(int pid, std::string charset = "");
- void FindAllSubtitlePids(int *pids, unsigned int *numpids, std::string *language);
- void FindAllTeletextsubtitlePids(int *pids, unsigned int *numpidt, std::string *tlanguage, int *mags, int *pages);
- void RequestAbort(void);
- - void FindAllSubs(uint16_t *pids, unsigned short *supported, uint16_t *numpida, std::string *language);
- - bool SelectSubtitles(int pid);
- uint64_t GetReadCount(void);
- void GetChapters(std::vector<int> &positions, std::vector<std::string> &titles);
- void GetMetadata(std::vector<std::string> &keys, std::vector<std::string> &values);
- @@ -94,6 +96,9 @@ public:
- std::string extra_headers;
- std::string user_agent;
- + void GetTitles(std::vector<int> &playlists, std::vector<std::string> &titles, int ¤t);
- + void SetTitle(int title);
- +
- //
- ~cPlayback();
- void getMeta();
- diff --git a/libarmbox/playback_libeplayer3.cpp b/libarmbox/playback_libeplayer3.cpp
- index 2888121..15c6c51 100644
- --- a/libarmbox/playback_libeplayer3.cpp
- +++ b/libarmbox/playback_libeplayer3.cpp
- @@ -606,18 +606,16 @@ int cPlayback::GetTeletextPid(void)
- return pid;
- }
- -#if 0
- /* dummy functions for subtitles */
- -void cPlayback::FindAllSubs(uint16_t * /*pids*/, unsigned short * /*supp*/, uint16_t *num, std::string * /*lang*/)
- +void cPlayback::FindAllSubs(int * /*pids*/, unsigned int * /*supp*/, unsigned int *num, std::string * /*lang*/)
- {
- *num = 0;
- }
- -bool cPlayback::SelectSubtitles(int /*pid*/)
- +bool cPlayback::SelectSubtitles(int /*pid*/, std::string /*charset*/)
- {
- return false;
- }
- -#endif
- void cPlayback::GetChapters(std::vector<int> &positions, std::vector<std::string> &titles)
- {
- @@ -646,6 +644,17 @@ void cPlayback::GetChapters(std::vector<int> &positions, std::vector<std::string
- }
- }
- +void cPlayback::GetTitles(std::vector<int> &playlists, std::vector<std::string> &titles, int ¤t)
- +{
- + playlists.clear();
- + titles.clear();
- + current = 0;
- +}
- +
- +void cPlayback::SetTitle(int /*title*/)
- +{
- +}
- +
- void cPlayback::GetMetadata(std::vector<std::string> &keys, std::vector<std::string> &values)
- {
- keys.clear();
- diff --git a/libarmbox/playback_libeplayer3.h b/libarmbox/playback_libeplayer3.h
- index d0f1195..7070f54 100644
- --- a/libarmbox/playback_libeplayer3.h
- +++ b/libarmbox/playback_libeplayer3.h
- @@ -53,6 +53,10 @@ class cPlayback
- void GetPts(uint64_t &pts);
- bool SetPosition(int position, bool absolute = false);
- void FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *numpida, std::string *language);
- + void FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t *numpida, std::string *language) { FindAllPids((int*) apids, (unsigned int*) ac3flags, (unsigned int*) numpida, language); };
- + void FindAllSubs(int *pids, unsigned int *supported, unsigned int *numpida, std::string *language);
- + void FindAllSubs(uint16_t *pids, unsigned short *supported, uint16_t *numpida, std::string *language) { FindAllSubs((int*) pids, (unsigned int*) supported, (unsigned int*) numpida, language); };
- + bool SelectSubtitles(int pid, std::string charset = "");
- void FindAllSubtitlePids(int *pids, unsigned int *numpids, std::string *language);
- void FindAllTeletextsubtitlePids(int *pids, unsigned int *numpidt, std::string *tlanguage, int *mags, int *pages);
- void RequestAbort(void);
- @@ -64,10 +68,11 @@ class cPlayback
- AVFormatContext *GetAVFormatContext();
- void ReleaseAVFormatContext();
- -#if 0
- - void FindAllSubs(uint16_t *pids, unsigned short *supported, uint16_t *numpida, std::string *language);
- - bool SelectSubtitles(int pid);
- + void GetTitles(std::vector<int> &playlists, std::vector<std::string> &titles, int ¤t);
- + void SetTitle(int title);
- +
- +#if 0
- // Functions that are not used by movieplayer.cpp:
- bool GetOffset(off64_t &offset);
- bool IsPlaying(void) const;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement