mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
- unify handling of playback header
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -76,7 +76,6 @@ pkginclude_HEADERS = \
|
|||||||
include/hardware_caps.h \
|
include/hardware_caps.h \
|
||||||
include/init_td.h \
|
include/init_td.h \
|
||||||
include/mmi.h \
|
include/mmi.h \
|
||||||
include/playback.h \
|
|
||||||
include/playback_hal.h \
|
include/playback_hal.h \
|
||||||
include/pwrmngr.h \
|
include/pwrmngr.h \
|
||||||
include/record_hal.h \
|
include/record_hal.h \
|
||||||
|
@@ -50,7 +50,7 @@
|
|||||||
#define IN_FILE "/tmp/rmfp.in2"
|
#define IN_FILE "/tmp/rmfp.in2"
|
||||||
#define OUT_FILE "/tmp/rmfp.out2"
|
#define OUT_FILE "/tmp/rmfp.out2"
|
||||||
|
|
||||||
#include "playback.h"
|
#include "playback_lib.h"
|
||||||
|
|
||||||
extern "C"{
|
extern "C"{
|
||||||
#include "e2mruainclude.h"
|
#include "e2mruainclude.h"
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#ifndef __PLAYBACK_H
|
#ifndef __PLAYBACK_LIB_H_
|
||||||
#define __PLAYBACK_H
|
#define __PLAYBACK_LIB_H_
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -59,4 +59,4 @@ class cPlayback
|
|||||||
void DMNotify(int Event, void *pTsBuf, void *Tag);
|
void DMNotify(int Event, void *pTsBuf, void *Tag);
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
#endif
|
#endif // __PLAYBACK_LIB_H_
|
@@ -1,6 +1,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "playback.h"
|
#include "playback_lib.h"
|
||||||
|
|
||||||
static const char * FILENAME = "playback-dummy";
|
static const char * FILENAME = "playback-dummy";
|
||||||
|
|
||||||
|
@@ -1,60 +0,0 @@
|
|||||||
#ifndef __PLAYBACK_H
|
|
||||||
#define __PLAYBACK_H
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
PLAYMODE_TS = 0,
|
|
||||||
PLAYMODE_FILE,
|
|
||||||
} playmode_t;
|
|
||||||
|
|
||||||
struct AVFormatContext;
|
|
||||||
class cPlayback
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
bool playing;
|
|
||||||
int mAudioStream;
|
|
||||||
int mSubtitleStream;
|
|
||||||
int mTeletextStream;
|
|
||||||
public:
|
|
||||||
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 SetAPid(int pid, bool ac3);
|
|
||||||
bool SetSubtitlePid(int pid);
|
|
||||||
bool SetTeletextPid(int pid);
|
|
||||||
int GetAPid(void) { return mAudioStream; }
|
|
||||||
int GetVPid(void);
|
|
||||||
int GetSubtitlePid(void) { return mSubtitleStream; }
|
|
||||||
int GetTeletextPid(void);
|
|
||||||
void SuspendSubtitle(bool);
|
|
||||||
int GetFirstTeletextPid(void);
|
|
||||||
bool SetSpeed(int speed);
|
|
||||||
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 FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t *numpida, std::string *language) { FindAllPids((int*) apids, (unsigned int*) ac3flags, (unsigned int*) numpida, 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);
|
|
||||||
bool IsPlaying(void) { return false; }
|
|
||||||
uint64_t GetReadCount(void);
|
|
||||||
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 GetTitles(std::vector<int> &playlists, std::vector<std::string> &titles, int ¤t);
|
|
||||||
void SetTitle(int title);
|
|
||||||
void GetChapters(std::vector<int> &positions, std::vector<std::string> &titles);
|
|
||||||
void GetMetadata(std::vector<std::string> &keys, std::vector<std::string> &values);
|
|
||||||
//
|
|
||||||
~cPlayback();
|
|
||||||
AVFormatContext *GetAVFormatContext(){ return NULL; }
|
|
||||||
void ReleaseAVFormatContext() {}
|
|
||||||
};
|
|
||||||
#endif
|
|
1
generic-pc/playback_lib.h
Symbolic link
1
generic-pc/playback_lib.h
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
playback_lib.h
|
@@ -1,2 +0,0 @@
|
|||||||
#include <config.h>
|
|
||||||
#include "playback_hal.h"
|
|
@@ -12,15 +12,15 @@
|
|||||||
#include "../libarmbox/playback_libeplayer3.h"
|
#include "../libarmbox/playback_libeplayer3.h"
|
||||||
#endif
|
#endif
|
||||||
#elif HAVE_AZBOX_HARDWARE
|
#elif HAVE_AZBOX_HARDWARE
|
||||||
#include "../azbox/playback.h"
|
#include "../azbox/playback_lib.h"
|
||||||
#elif HAVE_GENERIC_HARDWARE
|
#elif HAVE_GENERIC_HARDWARE
|
||||||
#if BOXMODEL_RASPI
|
#if BOXMODEL_RASPI
|
||||||
#include "../raspi/playback.h"
|
#include "../raspi/playback_lib.h"
|
||||||
#else
|
#else
|
||||||
#if ENABLE_GSTREAMER
|
#if ENABLE_GSTREAMER
|
||||||
#include "../generic-pc/playback_gst.h"
|
#include "../generic-pc/playback_gst.h"
|
||||||
#else
|
#else
|
||||||
#include "../generic-pc/playback.h"
|
#include "../generic-pc/playback_lib.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
../generic-pc/playback.h
|
|
1
raspi/playback_lib.h
Symbolic link
1
raspi/playback_lib.h
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../generic-pc/playback_lib.h
|
Reference in New Issue
Block a user