Advertisement
svenhoefer

Untitled

Jan 2nd, 2018
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 5.73 KB | None | 0 0
  1. diff --git a/libarmbox/playback_gst.cpp b/libarmbox/playback_gst.cpp
  2. index 5da0bb8..36d22ce 100644
  3. --- a/libarmbox/playback_gst.cpp
  4. +++ b/libarmbox/playback_gst.cpp
  5. @@ -1021,7 +1021,7 @@ void cPlayback::RequestAbort()
  6.  {
  7.  }
  8.  
  9. -void cPlayback::FindAllSubs(uint16_t *, unsigned short *, uint16_t *numpida, std::string *)
  10. +void cPlayback::FindAllSubs(int * /*pids*/, unsigned int * /*supp*/, unsigned int *num, std::string * /*lang*/)
  11.  {
  12.     printf("%s:%s\n", FILENAME, __func__);
  13.     *numpida = 0;
  14. @@ -1033,7 +1033,18 @@ void cPlayback::GetChapters(std::vector<int> &positions, std::vector<std::string
  15.     titles.clear();
  16.  }
  17.  
  18. -bool cPlayback::SelectSubtitles(int pid)
  19. +void cPlayback::GetTitles(std::vector<int> &playlists, std::vector<std::string> &titles, int &current)
  20. +{
  21. +   playlists.clear();
  22. +   titles.clear();
  23. +   current = 0;
  24. +}
  25. +
  26. +void cPlayback::SetTitle(int /*title*/)
  27. +{
  28. +}
  29. +
  30. +bool cPlayback::SelectSubtitles(int pid, std::string /*charset*/)
  31.  {
  32.     printf("%s:%s pid %i\n", FILENAME, __func__, pid);
  33.     return true;
  34. diff --git a/libarmbox/playback_gst.h b/libarmbox/playback_gst.h
  35. index a58de78..c3e6488 100644
  36. --- a/libarmbox/playback_gst.h
  37. +++ b/libarmbox/playback_gst.h
  38. @@ -81,11 +81,13 @@ public:
  39.     int GetSubtitlePid(void);
  40.     bool SetPosition(int position, bool absolute = false);
  41.     void FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *numpida, std::string *language);
  42. +   void FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t *numpida, std::string *language) { FindAllPids((int*) apids, (unsigned int*) ac3flags, (unsigned int*) numpida, language); };
  43. +   void FindAllSubs(int *pids, unsigned int *supported, unsigned int *numpida, std::string *language);
  44. +   void FindAllSubs(uint16_t *pids, unsigned short *supported, uint16_t *numpida, std::string *language) { FindAllSubs((int*) pids, (unsigned int*) supported, (unsigned int*) numpida, language); };
  45. +   bool SelectSubtitles(int pid, std::string charset = "");
  46.     void FindAllSubtitlePids(int *pids, unsigned int *numpids, std::string *language);
  47.     void FindAllTeletextsubtitlePids(int *pids, unsigned int *numpidt, std::string *tlanguage, int *mags, int *pages);
  48.     void RequestAbort(void);
  49. -   void FindAllSubs(uint16_t *pids, unsigned short *supported, uint16_t *numpida, std::string *language);
  50. -   bool SelectSubtitles(int pid);
  51.     uint64_t GetReadCount(void);
  52.     void GetChapters(std::vector<int> &positions, std::vector<std::string> &titles);
  53.     void GetMetadata(std::vector<std::string> &keys, std::vector<std::string> &values);
  54. @@ -94,6 +96,9 @@ public:
  55.     std::string extra_headers;
  56.     std::string user_agent;
  57.  
  58. +   void GetTitles(std::vector<int> &playlists, std::vector<std::string> &titles, int &current);
  59. +   void SetTitle(int title);
  60. +
  61.     //
  62.     ~cPlayback();
  63.     void getMeta();
  64. diff --git a/libarmbox/playback_libeplayer3.cpp b/libarmbox/playback_libeplayer3.cpp
  65. index 2888121..15c6c51 100644
  66. --- a/libarmbox/playback_libeplayer3.cpp
  67. +++ b/libarmbox/playback_libeplayer3.cpp
  68. @@ -606,18 +606,16 @@ int cPlayback::GetTeletextPid(void)
  69.     return pid;
  70.  }
  71.  
  72. -#if 0
  73.  /* dummy functions for subtitles */
  74. -void cPlayback::FindAllSubs(uint16_t * /*pids*/, unsigned short * /*supp*/, uint16_t *num, std::string * /*lang*/)
  75. +void cPlayback::FindAllSubs(int * /*pids*/, unsigned int * /*supp*/, unsigned int *num, std::string * /*lang*/)
  76.  {
  77.     *num = 0;
  78.  }
  79.  
  80. -bool cPlayback::SelectSubtitles(int /*pid*/)
  81. +bool cPlayback::SelectSubtitles(int /*pid*/, std::string /*charset*/)
  82.  {
  83.     return false;
  84.  }
  85. -#endif
  86.  
  87.  void cPlayback::GetChapters(std::vector<int> &positions, std::vector<std::string> &titles)
  88.  {
  89. @@ -646,6 +644,17 @@ void cPlayback::GetChapters(std::vector<int> &positions, std::vector<std::string
  90.     }
  91.  }
  92.  
  93. +void cPlayback::GetTitles(std::vector<int> &playlists, std::vector<std::string> &titles, int &current)
  94. +{
  95. +   playlists.clear();
  96. +   titles.clear();
  97. +   current = 0;
  98. +}
  99. +
  100. +void cPlayback::SetTitle(int /*title*/)
  101. +{
  102. +}
  103. +
  104.  void cPlayback::GetMetadata(std::vector<std::string> &keys, std::vector<std::string> &values)
  105.  {
  106.     keys.clear();
  107. diff --git a/libarmbox/playback_libeplayer3.h b/libarmbox/playback_libeplayer3.h
  108. index d0f1195..7070f54 100644
  109. --- a/libarmbox/playback_libeplayer3.h
  110. +++ b/libarmbox/playback_libeplayer3.h
  111. @@ -53,6 +53,10 @@ class cPlayback
  112.         void GetPts(uint64_t &pts);
  113.         bool SetPosition(int position, bool absolute = false);
  114.         void FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *numpida, std::string *language);
  115. +       void FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t *numpida, std::string *language) { FindAllPids((int*) apids, (unsigned int*) ac3flags, (unsigned int*) numpida, language); };
  116. +       void FindAllSubs(int *pids, unsigned int *supported, unsigned int *numpida, std::string *language);
  117. +       void FindAllSubs(uint16_t *pids, unsigned short *supported, uint16_t *numpida, std::string *language) { FindAllSubs((int*) pids, (unsigned int*) supported, (unsigned int*) numpida, language); };
  118. +       bool SelectSubtitles(int pid, std::string charset = "");
  119.         void FindAllSubtitlePids(int *pids, unsigned int *numpids, std::string *language);
  120.         void FindAllTeletextsubtitlePids(int *pids, unsigned int *numpidt, std::string *tlanguage, int *mags, int *pages);
  121.         void RequestAbort(void);
  122. @@ -64,10 +68,11 @@ class cPlayback
  123.  
  124.         AVFormatContext *GetAVFormatContext();
  125.         void ReleaseAVFormatContext();
  126. -#if 0
  127. -       void FindAllSubs(uint16_t *pids, unsigned short *supported, uint16_t *numpida, std::string *language);
  128. -       bool SelectSubtitles(int pid);
  129.  
  130. +       void GetTitles(std::vector<int> &playlists, std::vector<std::string> &titles, int &current);
  131. +       void SetTitle(int title);
  132. +
  133. +#if 0
  134.         // Functions that are not used by movieplayer.cpp:
  135.         bool GetOffset(off64_t &offset);
  136.         bool IsPlaying(void) const;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement