mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-30 17:00:57 +02:00
Merge branch 'master' of https://github.com/TangoCash/libstb-hal-cst-next
Origin commit data
------------------
Branch: master
Commit: b91e928122
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-11-03 (Fri, 03 Nov 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -36,7 +36,9 @@ if ENABLE_GSTREAMER_10
|
||||
libgeneric_la_SOURCES += \
|
||||
playback_gst_10.cpp
|
||||
AM_LDFLAGS += \
|
||||
-lgstreamer-1.0
|
||||
-lgstreamer-1.0 \
|
||||
-lgsttag-1.0 \
|
||||
-lgstmpegts-1.0
|
||||
else
|
||||
libgeneric_la_SOURCES += \
|
||||
playback.cpp
|
||||
|
@@ -26,7 +26,8 @@
|
||||
#include <config.h>
|
||||
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
STATE_STOP,
|
||||
STATE_PLAY,
|
||||
STATE_PAUSE,
|
||||
@@ -35,55 +36,67 @@ typedef enum {
|
||||
STATE_SLOW
|
||||
} playstate_t;
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
PLAYMODE_TS = 0,
|
||||
PLAYMODE_FILE,
|
||||
} playmode_t;
|
||||
|
||||
struct AVFormatContext;
|
||||
|
||||
class cPlayback
|
||||
{
|
||||
private:
|
||||
bool playing;
|
||||
private:
|
||||
bool playing, first;
|
||||
bool decoders_closed;
|
||||
|
||||
int mSpeed;
|
||||
int mAudioStream;
|
||||
int mSpeed;
|
||||
int mAudioStream;
|
||||
int init_jump;
|
||||
|
||||
public:
|
||||
playstate_t playstate;
|
||||
public:
|
||||
playstate_t playstate;
|
||||
|
||||
cPlayback(int);
|
||||
bool Open(playmode_t PlayMode);
|
||||
void Close(void);
|
||||
bool Start(char *filename, int vpid, int vtype, int apid, int ac3, int duration, std::string headers = "");
|
||||
bool Start(std::string filename, std::string headers = "");
|
||||
bool Play(void);
|
||||
bool SyncAV(void);
|
||||
cPlayback(int);
|
||||
bool Open(playmode_t PlayMode);
|
||||
void Close(void);
|
||||
bool Start(char *filename, int vpid, int vtype, int apid, int ac3, int duration, std::string headers = "");
|
||||
bool Start(std::string filename, std::string headers = "");
|
||||
bool Play(void);
|
||||
bool SyncAV(void);
|
||||
|
||||
bool Stop(void);
|
||||
bool SetAPid(int pid, bool ac3);
|
||||
bool SetSubtitlePid(int pid);
|
||||
bool SetTeletextPid(int pid);
|
||||
bool Stop(void);
|
||||
bool SetAPid(int pid, bool ac3);
|
||||
bool SetSubtitlePid(int pid);
|
||||
bool SetTeletextPid(int pid);
|
||||
|
||||
void trickSeek(int ratio);
|
||||
bool SetSpeed(int speed);
|
||||
bool SetSlow(int slow);
|
||||
bool GetSpeed(int &speed) const;
|
||||
bool GetPosition(int &position, int &duration);
|
||||
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 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);
|
||||
//
|
||||
~cPlayback();
|
||||
void getMeta();
|
||||
void trickSeek(int ratio);
|
||||
bool SetSpeed(int speed);
|
||||
bool SetSlow(int slow);
|
||||
bool GetSpeed(int &speed) const;
|
||||
bool GetPosition(int &position, int &duration);
|
||||
void GetPts(uint64_t &pts);
|
||||
int GetAPid(void);
|
||||
int GetVPid(void);
|
||||
int GetSubtitlePid(void);
|
||||
bool SetPosition(int position, bool absolute = false);
|
||||
void FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *numpida, std::string *language);
|
||||
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);
|
||||
AVFormatContext *GetAVFormatContext();
|
||||
void ReleaseAVFormatContext();
|
||||
std::string extra_headers;
|
||||
std::string user_agent;
|
||||
|
||||
//
|
||||
~cPlayback();
|
||||
void getMeta();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -948,7 +948,15 @@ void cPlayback::FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *nu
|
||||
{
|
||||
if (gst_tag_list_get_string(tags, GST_TAG_LANGUAGE_CODE, &g_lang))
|
||||
{
|
||||
language[i] = std::string(gst_tag_get_language_name(g_lang)).c_str();
|
||||
std::string slang;
|
||||
if (gst_tag_check_language_code(g_lang))
|
||||
slang = gst_tag_get_language_name(g_lang);
|
||||
else
|
||||
slang = g_lang;
|
||||
if (slang.empty())
|
||||
language[i] = "unk";
|
||||
else
|
||||
language[i] = slang.c_str();
|
||||
lt_info("%s: language:%s\n", __FUNCTION__, language[i].c_str());
|
||||
g_free(g_lang);
|
||||
}
|
||||
|
Reference in New Issue
Block a user