Files
recycled-ni-libstb-hal/libspark/playback_libeplayer3.h
martii 826a826f82 libeplayer3: add support for teletext and dvbsubtitle streams
Origin commit data
------------------
Branch: master
Commit: 92731e6fe3
Author: martii <you@example.com>
Date: 2012-08-04 (Sat, 04 Aug 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
2012-08-04 13:31:28 +02:00

60 lines
1.6 KiB
C++

#ifndef __HAL_PLAYBACK_H
#define __HAL_PLAYBACK_H
#include <string>
typedef enum {
PLAYMODE_TS = 0,
PLAYMODE_FILE
} playmode_t;
class cPlayback
{
private:
bool enabled;
bool playing;
int nPlaybackSpeed;
int mAudioStream;
#ifdef MARTII
int mDvbsubtitleStream;
int mTeletextStream;
#endif
bool Stop(void);
public:
cPlayback(int num = 0);
~cPlayback();
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 SetAPid(unsigned short pid, bool ac3);
#ifdef MARTII
bool SetDvbsubtitlePid(unsigned short pid);
bool SetTeletextPid(unsigned short pid);
unsigned short GetAPid(void) { return mAudioStream; }
unsigned short GetDvbsubtitlePid(void) { return mDvbsubtitleStream; }
unsigned short GetTeletextPid(void) { return mTeletextStream; }
#endif
bool SetSpeed(int speed);
bool GetSpeed(int &speed) const;
bool GetPosition(int &position, int &duration);
bool SetPosition(int position, bool absolute = false);
void FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t *numpida, std::string *language);
#ifdef MARTII
void FindAllDvbsubtitlePids(uint16_t *pids, uint16_t *numpids, std::string *language);
#endif
#if 0
// Functions that are not used by movieplayer.cpp:
bool GetOffset(off64_t &offset);
bool IsPlaying(void) const;
bool IsEnabled(void) const;
void * GetHandle(void);
void * GetDmHandle(void);
int GetCurrPlaybackSpeed(void) const;
void PlaybackNotify (int Event, void *pData, void *pTag);
void DMNotify(int Event, void *pTsBuf, void *Tag);
#endif
};
#endif