mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
libeplayer3: rename Content_t => Player
Origin commit data
------------------
Branch: master
Commit: dd527fdfba
Author: martii <m4rtii@gmx.de>
Date: 2014-04-06 (Sun, 06 Apr 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -41,7 +41,7 @@ if (debug_level >= level) printf(x); } while (0)
|
|||||||
#define container_err(x...)
|
#define container_err(x...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int Command(Context_t *context, ContainerCmd_t command, const char *argument __attribute__((unused)))
|
static int Command(Player *context, ContainerCmd_t command, const char *argument __attribute__((unused)))
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
@@ -138,7 +138,7 @@ extern "C" void teletext_write(int pid, uint8_t *data, int size);
|
|||||||
|
|
||||||
static void *FFMPEGThread(void *arg)
|
static void *FFMPEGThread(void *arg)
|
||||||
{
|
{
|
||||||
Context_t *context = (Context_t *) arg;
|
Player *context = (Player *) arg;
|
||||||
char threadname[17];
|
char threadname[17];
|
||||||
strncpy(threadname, __func__, sizeof(threadname));
|
strncpy(threadname, __func__, sizeof(threadname));
|
||||||
threadname[16] = 0;
|
threadname[16] = 0;
|
||||||
@@ -359,7 +359,7 @@ static void log_callback(void *ptr __attribute__ ((unused)), int lvl __attribute
|
|||||||
vfprintf(stderr, format, ap);
|
vfprintf(stderr, format, ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void container_ffmpeg_read_subtitle(Context_t * context, const char *filename, const char *format, int pid) {
|
static void container_ffmpeg_read_subtitle(Player * context, const char *filename, const char *format, int pid) {
|
||||||
const char *lastDot = strrchr(filename, '.');
|
const char *lastDot = strrchr(filename, '.');
|
||||||
if (!lastDot)
|
if (!lastDot)
|
||||||
return;
|
return;
|
||||||
@@ -416,7 +416,7 @@ static void container_ffmpeg_read_subtitle(Context_t * context, const char *file
|
|||||||
context->manager->subtitle->Command(context, MANAGER_ADD, &track);
|
context->manager->subtitle->Command(context, MANAGER_ADD, &track);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void container_ffmpeg_read_subtitles(Context_t * context, const char *filename) {
|
static void container_ffmpeg_read_subtitles(Player * context, const char *filename) {
|
||||||
if (strncmp(filename, "file://", 7))
|
if (strncmp(filename, "file://", 7))
|
||||||
return;
|
return;
|
||||||
filename += 7;
|
filename += 7;
|
||||||
@@ -429,7 +429,7 @@ static void container_ffmpeg_read_subtitles(Context_t * context, const char *fil
|
|||||||
extern AVStream *audioStream;
|
extern AVStream *audioStream;
|
||||||
extern AVStream *videoStream;
|
extern AVStream *videoStream;
|
||||||
|
|
||||||
int container_ffmpeg_init(Context_t * context, const char *filename)
|
int container_ffmpeg_init(Player * context, const char *filename)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
@@ -537,7 +537,7 @@ videoStream = NULL;
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
int container_ffmpeg_update_tracks(Context_t * context, const char *filename)
|
int container_ffmpeg_update_tracks(Player * context, const char *filename)
|
||||||
{
|
{
|
||||||
if (terminating)
|
if (terminating)
|
||||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||||
@@ -732,7 +732,7 @@ int container_ffmpeg_update_tracks(Context_t * context, const char *filename)
|
|||||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int container_ffmpeg_play(Context_t * context)
|
static int container_ffmpeg_play(Player * context)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@@ -766,7 +766,7 @@ static int container_ffmpeg_play(Context_t * context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int container_ffmpeg_stop(Context_t * context)
|
static int container_ffmpeg_stop(Player * context)
|
||||||
{
|
{
|
||||||
int ret = cERR_CONTAINER_FFMPEG_NO_ERROR;
|
int ret = cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||||
|
|
||||||
@@ -794,7 +794,7 @@ static int container_ffmpeg_stop(Context_t * context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int container_ffmpeg_seek(Context_t * context __attribute__ ((unused)), float sec, int absolute)
|
static int container_ffmpeg_seek(Player * context __attribute__ ((unused)), float sec, int absolute)
|
||||||
{
|
{
|
||||||
if (absolute)
|
if (absolute)
|
||||||
seek_sec_abs = sec, seek_sec_rel = 0.0;
|
seek_sec_abs = sec, seek_sec_rel = 0.0;
|
||||||
@@ -803,7 +803,7 @@ static int container_ffmpeg_seek(Context_t * context __attribute__ ((unused)), f
|
|||||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int container_ffmpeg_get_length(Context_t * context, double *length)
|
static int container_ffmpeg_get_length(Player * context, double *length)
|
||||||
{
|
{
|
||||||
ffmpeg_printf(50, "\n");
|
ffmpeg_printf(50, "\n");
|
||||||
Track_t *videoTrack = NULL;
|
Track_t *videoTrack = NULL;
|
||||||
@@ -846,7 +846,7 @@ static int container_ffmpeg_get_length(Context_t * context, double *length)
|
|||||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int container_ffmpeg_switch_audio(Context_t * context, int *arg)
|
static int container_ffmpeg_switch_audio(Player * context, int *arg)
|
||||||
{
|
{
|
||||||
Track_t *audioTrack = NULL;
|
Track_t *audioTrack = NULL;
|
||||||
context->manager->audio->Command(context, MANAGER_GET_TRACK, &arg);
|
context->manager->audio->Command(context, MANAGER_GET_TRACK, &arg);
|
||||||
@@ -860,18 +860,18 @@ static int container_ffmpeg_switch_audio(Context_t * context, int *arg)
|
|||||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int container_ffmpeg_switch_subtitle(Context_t * context __attribute__ ((unused)), int *arg __attribute__ ((unused)))
|
static int container_ffmpeg_switch_subtitle(Player * context __attribute__ ((unused)), int *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
/* Hellmaster1024: nothing to do here! */
|
/* Hellmaster1024: nothing to do here! */
|
||||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int container_ffmpeg_switch_teletext(Context_t * context __attribute__ ((unused)), int *arg __attribute__ ((unused)))
|
static int container_ffmpeg_switch_teletext(Player * context __attribute__ ((unused)), int *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int container_ffmpeg_get_metadata(Context_t * context, char ***p)
|
static int container_ffmpeg_get_metadata(Player * context, char ***p)
|
||||||
{
|
{
|
||||||
Track_t *videoTrack = NULL;
|
Track_t *videoTrack = NULL;
|
||||||
Track_t *audioTrack = NULL;
|
Track_t *audioTrack = NULL;
|
||||||
@@ -932,7 +932,7 @@ static int container_ffmpeg_get_metadata(Context_t * context, char ***p)
|
|||||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Command(Context_t *context, ContainerCmd_t command, const char *argument)
|
static int Command(Player *context, ContainerCmd_t command, const char *argument)
|
||||||
{
|
{
|
||||||
int ret = cERR_CONTAINER_FFMPEG_NO_ERROR;
|
int ret = cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||||
|
|
||||||
|
@@ -8,13 +8,13 @@
|
|||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
typedef struct Context_s {
|
struct Player {
|
||||||
PlaybackHandler_t *playback;
|
PlaybackHandler_t *playback;
|
||||||
ContainerHandler_t *container;
|
ContainerHandler_t *container;
|
||||||
OutputHandler_t *output;
|
OutputHandler_t *output;
|
||||||
ManagerHandler_t *manager;
|
ManagerHandler_t *manager;
|
||||||
int64_t *currentAudioPtsP;
|
int64_t *currentAudioPtsP;
|
||||||
} Context_t;
|
};
|
||||||
|
|
||||||
int container_ffmpeg_update_tracks(Context_t * context, const char *filename);
|
int container_ffmpeg_update_tracks(Player * context, const char *filename);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -18,12 +18,11 @@ typedef enum {
|
|||||||
CONTAINER_METADATA,
|
CONTAINER_METADATA,
|
||||||
} ContainerCmd_t;
|
} ContainerCmd_t;
|
||||||
|
|
||||||
struct Context_s;
|
struct Player;
|
||||||
typedef struct Context_s Context_t;
|
|
||||||
|
|
||||||
typedef struct Container_s {
|
typedef struct Container_s {
|
||||||
const char *Name;
|
const char *Name;
|
||||||
int (*Command) (Context_t *, ContainerCmd_t, const char *);
|
int (*Command) (Player *, ContainerCmd_t, const char *);
|
||||||
const char **Capabilities;
|
const char **Capabilities;
|
||||||
} Container_t;
|
} Container_t;
|
||||||
|
|
||||||
@@ -33,7 +32,7 @@ extern Container_t FFMPEGContainer;
|
|||||||
typedef struct ContainerHandler_s {
|
typedef struct ContainerHandler_s {
|
||||||
const char *Name;
|
const char *Name;
|
||||||
Container_t *selectedContainer;
|
Container_t *selectedContainer;
|
||||||
int (*Command) (Context_t *, ContainerCmd_t, const char *);
|
int (*Command) (Player *, ContainerCmd_t, const char *);
|
||||||
} ContainerHandler_t;
|
} ContainerHandler_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -56,12 +56,11 @@ typedef struct Track_s {
|
|||||||
Track_s() : Id(-1), language(NULL), duration(-1), avfc(NULL), stream(NULL), pending(0), is_static(0), chapter_start(0), chapter_end(0), ac3flags(-1) {}
|
Track_s() : Id(-1), language(NULL), duration(-1), avfc(NULL), stream(NULL), pending(0), is_static(0), chapter_start(0), chapter_end(0), ac3flags(-1) {}
|
||||||
} Track_t;
|
} Track_t;
|
||||||
|
|
||||||
struct Context_s;
|
struct Player;
|
||||||
typedef struct Context_s Context_t;
|
|
||||||
|
|
||||||
typedef struct Manager_s {
|
typedef struct Manager_s {
|
||||||
const char *Name;
|
const char *Name;
|
||||||
int (*Command) ( Context_t *, ManagerCmd_t, void *);
|
int (*Command) (Player *, ManagerCmd_t, void *);
|
||||||
const char **Capabilities;
|
const char **Capabilities;
|
||||||
|
|
||||||
} Manager_t;
|
} Manager_t;
|
||||||
|
@@ -34,12 +34,11 @@ typedef enum {
|
|||||||
OUTPUT_GET_FRAME_COUNT,
|
OUTPUT_GET_FRAME_COUNT,
|
||||||
} OutputCmd_t;
|
} OutputCmd_t;
|
||||||
|
|
||||||
struct Context_s;
|
struct Player;
|
||||||
typedef struct Context_s Context_t;
|
|
||||||
|
|
||||||
typedef struct Output_s {
|
typedef struct Output_s {
|
||||||
const char *Name;
|
const char *Name;
|
||||||
int (*Command) (Context_t *, OutputCmd_t, const char *);
|
int (*Command) (Player *, OutputCmd_t, const char *);
|
||||||
bool (*Write) (AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int64_t &Pts);
|
bool (*Write) (AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int64_t &Pts);
|
||||||
const char **Capabilities;
|
const char **Capabilities;
|
||||||
|
|
||||||
@@ -52,7 +51,7 @@ typedef struct OutputHandler_s {
|
|||||||
const char *Name;
|
const char *Name;
|
||||||
Output_t *audio;
|
Output_t *audio;
|
||||||
Output_t *video;
|
Output_t *video;
|
||||||
int (*Command) (Context_t *, OutputCmd_t, const char *);
|
int (*Command) (Player *, OutputCmd_t, const char *);
|
||||||
} OutputHandler_t;
|
} OutputHandler_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -12,8 +12,7 @@ typedef enum { PLAYBACK_OPEN, PLAYBACK_CLOSE, PLAYBACK_PLAY, PLAYBACK_STOP,
|
|||||||
PLAYBACK_SWITCH_TELETEXT
|
PLAYBACK_SWITCH_TELETEXT
|
||||||
} PlaybackCmd_t;
|
} PlaybackCmd_t;
|
||||||
|
|
||||||
struct Context_s;
|
struct Player;
|
||||||
typedef struct Context_s Context_t;
|
|
||||||
|
|
||||||
typedef struct PlaybackHandler_s {
|
typedef struct PlaybackHandler_s {
|
||||||
const char *Name;
|
const char *Name;
|
||||||
@@ -37,7 +36,7 @@ typedef struct PlaybackHandler_s {
|
|||||||
unsigned char abortRequested;
|
unsigned char abortRequested;
|
||||||
unsigned char abortPlayback;
|
unsigned char abortPlayback;
|
||||||
|
|
||||||
int (*Command) ( Context_t *, PlaybackCmd_t, void *);
|
int (*Command) ( Player *, PlaybackCmd_t, void *);
|
||||||
std::string uri;
|
std::string uri;
|
||||||
unsigned char noprobe; /* hack: only minimal probing in av_find_stream_info */
|
unsigned char noprobe; /* hack: only minimal probing in av_find_stream_info */
|
||||||
unsigned long long readCount;
|
unsigned long long readCount;
|
||||||
|
@@ -75,7 +75,7 @@ static int CurrentPid = -1;
|
|||||||
/* Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int ManagerAdd(Context_t * context, Track_t track)
|
static int ManagerAdd(Player * context, Track_t track)
|
||||||
{
|
{
|
||||||
Tracks[track.Id] = track;
|
Tracks[track.Id] = track;
|
||||||
context->playback->isAudio = 1;
|
context->playback->isAudio = 1;
|
||||||
@@ -86,7 +86,7 @@ static int ManagerAdd(Context_t * context, Track_t track)
|
|||||||
return cERR_AUDIO_MGR_NO_ERROR;
|
return cERR_AUDIO_MGR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char **ManagerList(Context_t * context __attribute__ ((unused)))
|
static char **ManagerList(Player * context __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
int j = 0;
|
int j = 0;
|
||||||
char **tracklist = (char **) malloc(sizeof(char *) * ((Tracks.size() * 2) + 1));
|
char **tracklist = (char **) malloc(sizeof(char *) * ((Tracks.size() * 2) + 1));
|
||||||
@@ -106,7 +106,7 @@ static char **ManagerList(Context_t * context __attribute__ ((unused)))
|
|||||||
return tracklist;
|
return tracklist;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ManagerDel(Context_t * context)
|
static int ManagerDel(Player * context)
|
||||||
{
|
{
|
||||||
Tracks.clear();
|
Tracks.clear();
|
||||||
CurrentPid = -1;
|
CurrentPid = -1;
|
||||||
@@ -115,7 +115,7 @@ static int ManagerDel(Context_t * context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
static int Command(Player *context, ManagerCmd_t command, void *argument)
|
||||||
{
|
{
|
||||||
int ret = cERR_AUDIO_MGR_NO_ERROR;
|
int ret = cERR_AUDIO_MGR_NO_ERROR;
|
||||||
|
|
||||||
|
@@ -74,14 +74,14 @@ static std::map<int,Track_t> Tracks;
|
|||||||
/* Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int ManagerAdd(Context_t * context __attribute__((unused)), Track_t track)
|
static int ManagerAdd(Player * context __attribute__((unused)), Track_t track)
|
||||||
{
|
{
|
||||||
Tracks[track.Id] = track;
|
Tracks[track.Id] = track;
|
||||||
|
|
||||||
return cERR_CHAPTER_MGR_NO_ERROR;
|
return cERR_CHAPTER_MGR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char **ManagerList(Context_t * context __attribute__ ((unused)))
|
static char **ManagerList(Player * context __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
int j = 0;
|
int j = 0;
|
||||||
char **tracklist = (char **) malloc(sizeof(char *) * ((Tracks.size() * 2) + 1));
|
char **tracklist = (char **) malloc(sizeof(char *) * ((Tracks.size() * 2) + 1));
|
||||||
@@ -100,13 +100,13 @@ static char **ManagerList(Context_t * context __attribute__ ((unused)))
|
|||||||
return tracklist;
|
return tracklist;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ManagerDel(Context_t * context __attribute__((unused)))
|
static int ManagerDel(Player * context __attribute__((unused)))
|
||||||
{
|
{
|
||||||
Tracks.clear();
|
Tracks.clear();
|
||||||
return cERR_CHAPTER_MGR_NO_ERROR;
|
return cERR_CHAPTER_MGR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
static int Command(Player *context, ManagerCmd_t command, void *argument)
|
||||||
{
|
{
|
||||||
int ret = cERR_CHAPTER_MGR_NO_ERROR;
|
int ret = cERR_CHAPTER_MGR_NO_ERROR;
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ static int CurrentPid = -1;
|
|||||||
/* Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int ManagerAdd(Context_t * context __attribute__((unused)), Track_t track)
|
static int ManagerAdd(Player * context __attribute__((unused)), Track_t track)
|
||||||
{
|
{
|
||||||
Tracks[track.Id] = track;
|
Tracks[track.Id] = track;
|
||||||
context->playback->isAudio = 1;
|
context->playback->isAudio = 1;
|
||||||
@@ -83,7 +83,7 @@ static int ManagerAdd(Context_t * context __attribute__((unused)), Track_t track
|
|||||||
return cERR_SUBTITLE_MGR_NO_ERROR;
|
return cERR_SUBTITLE_MGR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char **ManagerList(Context_t * context __attribute__ ((unused)))
|
static char **ManagerList(Player * context __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
int j = 0;
|
int j = 0;
|
||||||
char **tracklist = (char **) malloc(sizeof(char *) * ((Tracks.size() * 2) + 1));
|
char **tracklist = (char **) malloc(sizeof(char *) * ((Tracks.size() * 2) + 1));
|
||||||
@@ -102,14 +102,14 @@ static char **ManagerList(Context_t * context __attribute__ ((unused)))
|
|||||||
return tracklist;
|
return tracklist;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ManagerDel(Context_t * context __attribute__((unused)))
|
static int ManagerDel(Player * context __attribute__((unused)))
|
||||||
{
|
{
|
||||||
Tracks.clear();
|
Tracks.clear();
|
||||||
CurrentPid = -1;
|
CurrentPid = -1;
|
||||||
return cERR_SUBTITLE_MGR_NO_ERROR;
|
return cERR_SUBTITLE_MGR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
static int Command(Player *context, ManagerCmd_t command, void *argument)
|
||||||
{
|
{
|
||||||
int ret = cERR_SUBTITLE_MGR_NO_ERROR;
|
int ret = cERR_SUBTITLE_MGR_NO_ERROR;
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ static int CurrentPid = -1;
|
|||||||
/* Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int ManagerAdd(Context_t * context __attribute__((unused)), Track_t track)
|
static int ManagerAdd(Player * context __attribute__((unused)), Track_t track)
|
||||||
{
|
{
|
||||||
Tracks[track.Id] = track;
|
Tracks[track.Id] = track;
|
||||||
context->playback->isAudio = 1;
|
context->playback->isAudio = 1;
|
||||||
@@ -83,7 +83,7 @@ static int ManagerAdd(Context_t * context __attribute__((unused)), Track_t track
|
|||||||
return cERR_TELETEXT_MGR_NO_ERROR;
|
return cERR_TELETEXT_MGR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char **ManagerList(Context_t * context __attribute__ ((unused)))
|
static char **ManagerList(Player * context __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
int j = 0;
|
int j = 0;
|
||||||
char **tracklist = (char **) malloc(sizeof(char *) * ((Tracks.size() * 2) + 1));
|
char **tracklist = (char **) malloc(sizeof(char *) * ((Tracks.size() * 2) + 1));
|
||||||
@@ -102,7 +102,7 @@ static char **ManagerList(Context_t * context __attribute__ ((unused)))
|
|||||||
return tracklist;
|
return tracklist;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ManagerDel(Context_t * context __attribute__((unused)))
|
static int ManagerDel(Player * context __attribute__((unused)))
|
||||||
{
|
{
|
||||||
Tracks.clear();
|
Tracks.clear();
|
||||||
CurrentPid = -1;
|
CurrentPid = -1;
|
||||||
@@ -110,7 +110,7 @@ static int ManagerDel(Context_t * context __attribute__((unused)))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
static int Command(Player *context, ManagerCmd_t command, void *argument)
|
||||||
{
|
{
|
||||||
int ret = cERR_TELETEXT_MGR_NO_ERROR;
|
int ret = cERR_TELETEXT_MGR_NO_ERROR;
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ static int CurrentPid = -1;
|
|||||||
/* Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int ManagerAdd(Context_t * context, Track_t track)
|
static int ManagerAdd(Player * context, Track_t track)
|
||||||
{
|
{
|
||||||
Tracks[track.Id] = track;
|
Tracks[track.Id] = track;
|
||||||
context->playback->isVideo = 1;
|
context->playback->isVideo = 1;
|
||||||
@@ -86,7 +86,7 @@ static int ManagerAdd(Context_t * context, Track_t track)
|
|||||||
return cERR_VIDEO_MGR_NO_ERROR;
|
return cERR_VIDEO_MGR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char **ManagerList(Context_t * context __attribute__ ((unused)))
|
static char **ManagerList(Player * context __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
int j = 0;
|
int j = 0;
|
||||||
char **tracklist = (char **) malloc(sizeof(char *) * ((Tracks.size() * 2) + 1));
|
char **tracklist = (char **) malloc(sizeof(char *) * ((Tracks.size() * 2) + 1));
|
||||||
@@ -105,7 +105,7 @@ static char **ManagerList(Context_t * context __attribute__ ((unused)))
|
|||||||
return tracklist;
|
return tracklist;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ManagerDel(Context_t * context)
|
static int ManagerDel(Player * context)
|
||||||
{
|
{
|
||||||
Tracks.clear();
|
Tracks.clear();
|
||||||
CurrentPid = -1;
|
CurrentPid = -1;
|
||||||
@@ -113,7 +113,7 @@ static int ManagerDel(Context_t * context)
|
|||||||
return cERR_VIDEO_MGR_NO_ERROR;
|
return cERR_VIDEO_MGR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
static int Command(Player *context, ManagerCmd_t command, void *argument)
|
||||||
{
|
{
|
||||||
int ret = cERR_VIDEO_MGR_NO_ERROR;
|
int ret = cERR_VIDEO_MGR_NO_ERROR;
|
||||||
|
|
||||||
|
@@ -100,7 +100,7 @@ pthread_mutex_t LinuxDVBmutex;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
int LinuxDvbStop(Context_t * context, char *type);
|
int LinuxDvbStop(Player * context, char *type);
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* MISC Functions */
|
||||||
@@ -130,7 +130,7 @@ void releaseLinuxDVBMutex(const char *filename
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbOpen(Context_t * context __attribute__ ((unused)), char *type)
|
int LinuxDvbOpen(Player * context __attribute__ ((unused)), char *type)
|
||||||
{
|
{
|
||||||
unsigned char video = !strcmp("video", type);
|
unsigned char video = !strcmp("video", type);
|
||||||
unsigned char audio = !strcmp("audio", type);
|
unsigned char audio = !strcmp("audio", type);
|
||||||
@@ -174,7 +174,7 @@ int LinuxDvbOpen(Context_t * context __attribute__ ((unused)), char *type)
|
|||||||
return cERR_LINUXDVB_NO_ERROR;
|
return cERR_LINUXDVB_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbClose(Context_t * context, char *type)
|
int LinuxDvbClose(Player * context, char *type)
|
||||||
{
|
{
|
||||||
unsigned char video = !strcmp("video", type);
|
unsigned char video = !strcmp("video", type);
|
||||||
unsigned char audio = !strcmp("audio", type);
|
unsigned char audio = !strcmp("audio", type);
|
||||||
@@ -202,7 +202,7 @@ int LinuxDvbClose(Context_t * context, char *type)
|
|||||||
return cERR_LINUXDVB_NO_ERROR;
|
return cERR_LINUXDVB_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbPlay(Context_t * context, char *type)
|
int LinuxDvbPlay(Player * context, char *type)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@ int LinuxDvbPlay(Context_t * context, char *type)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbStop(Context_t * context __attribute__ ((unused)), char *type)
|
int LinuxDvbStop(Player * context __attribute__ ((unused)), char *type)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
unsigned char video = !strcmp("video", type);
|
unsigned char video = !strcmp("video", type);
|
||||||
@@ -267,7 +267,7 @@ int LinuxDvbStop(Context_t * context __attribute__ ((unused)), char *type)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbPause(Context_t * context __attribute__ ((unused)), char *type)
|
int LinuxDvbPause(Player * context __attribute__ ((unused)), char *type)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
unsigned char video = !strcmp("video", type);
|
unsigned char video = !strcmp("video", type);
|
||||||
@@ -291,7 +291,7 @@ int LinuxDvbPause(Context_t * context __attribute__ ((unused)), char *type)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbContinue(Context_t * context
|
int LinuxDvbContinue(Player * context
|
||||||
__attribute__ ((unused)), char *type)
|
__attribute__ ((unused)), char *type)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
@@ -315,7 +315,7 @@ int LinuxDvbContinue(Context_t * context
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbReverseDiscontinuity(Context_t * context
|
int LinuxDvbReverseDiscontinuity(Player * context
|
||||||
__attribute__ ((unused)), int *surplus)
|
__attribute__ ((unused)), int *surplus)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
@@ -330,7 +330,7 @@ int LinuxDvbReverseDiscontinuity(Context_t * context
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbAudioMute(Context_t * context
|
int LinuxDvbAudioMute(Player * context
|
||||||
__attribute__ ((unused)), char *flag)
|
__attribute__ ((unused)), char *flag)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
@@ -357,7 +357,7 @@ int LinuxDvbAudioMute(Context_t * context
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int LinuxDvbFlush(Context_t * context __attribute__ ((unused)), char *type)
|
int LinuxDvbFlush(Player * context __attribute__ ((unused)), char *type)
|
||||||
{
|
{
|
||||||
unsigned char video = !strcmp("video", type);
|
unsigned char video = !strcmp("video", type);
|
||||||
unsigned char audio = !strcmp("audio", type);
|
unsigned char audio = !strcmp("audio", type);
|
||||||
@@ -382,7 +382,7 @@ int LinuxDvbFlush(Context_t * context __attribute__ ((unused)), char *type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef use_set_speed_instead_ff
|
#ifndef use_set_speed_instead_ff
|
||||||
int LinuxDvbFastForward(Context_t * context, char *type)
|
int LinuxDvbFastForward(Player * context, char *type)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
|
|
||||||
@@ -412,7 +412,7 @@ int LinuxDvbFastForward(Context_t * context, char *type)
|
|||||||
|
|
||||||
static unsigned int SpeedList[] = { 1000, 1100, 1200, 1300, 1500, 2000, 3000, 4000, 5000, 8000, 12000, 16000, 125, 250, 500, 700, 800, 900 };
|
static unsigned int SpeedList[] = { 1000, 1100, 1200, 1300, 1500, 2000, 3000, 4000, 5000, 8000, 12000, 16000, 125, 250, 500, 700, 800, 900 };
|
||||||
|
|
||||||
int LinuxDvbFastForward(Context_t * context, char *type)
|
int LinuxDvbFastForward(Player * context, char *type)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
int speedIndex;
|
int speedIndex;
|
||||||
@@ -458,7 +458,7 @@ int LinuxDvbFastForward(Context_t * context, char *type)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
int LinuxDvbReverse(Context_t * context
|
int LinuxDvbReverse(Player * context
|
||||||
__attribute__ ((unused)), char *type
|
__attribute__ ((unused)), char *type
|
||||||
__attribute__ ((unused)))
|
__attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
@@ -466,7 +466,7 @@ int LinuxDvbReverse(Context_t * context
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbSlowMotion(Context_t * context, char *type)
|
int LinuxDvbSlowMotion(Player * context, char *type)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
|
|
||||||
@@ -492,7 +492,7 @@ int LinuxDvbSlowMotion(Context_t * context, char *type)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbAVSync(Context_t * context, char *type
|
int LinuxDvbAVSync(Player * context, char *type
|
||||||
__attribute__ ((unused)))
|
__attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
@@ -514,7 +514,7 @@ int LinuxDvbAVSync(Context_t * context, char *type
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbClear(Context_t * context __attribute__ ((unused)), char *type)
|
int LinuxDvbClear(Player * context __attribute__ ((unused)), char *type)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
unsigned char video = !strcmp("video", type);
|
unsigned char video = !strcmp("video", type);
|
||||||
@@ -542,7 +542,7 @@ int LinuxDvbClear(Context_t * context __attribute__ ((unused)), char *type)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbPts(Context_t * context
|
int LinuxDvbPts(Player * context
|
||||||
__attribute__ ((unused)), unsigned long long int *pts)
|
__attribute__ ((unused)), unsigned long long int *pts)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_ERROR;
|
int ret = cERR_LINUXDVB_ERROR;
|
||||||
@@ -565,7 +565,7 @@ int LinuxDvbPts(Context_t * context
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbGetFrameCount(Context_t * context
|
int LinuxDvbGetFrameCount(Player * context
|
||||||
__attribute__ ((unused)),
|
__attribute__ ((unused)),
|
||||||
unsigned long long int *frameCount)
|
unsigned long long int *frameCount)
|
||||||
{
|
{
|
||||||
@@ -642,7 +642,7 @@ static bool Write(AVFormatContext *avfc, AVStream *stream, AVPacket *packet, int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int reset(Context_t * context)
|
static int reset(Player * context)
|
||||||
{
|
{
|
||||||
if (videoWriter)
|
if (videoWriter)
|
||||||
videoWriter->Init();
|
videoWriter->Init();
|
||||||
@@ -651,7 +651,7 @@ static int reset(Context_t * context)
|
|||||||
return cERR_LINUXDVB_NO_ERROR;
|
return cERR_LINUXDVB_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Command(Context_t *context, OutputCmd_t command, const char *argument)
|
static int Command(Player *context, OutputCmd_t command, const char *argument)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
|
|
||||||
|
@@ -72,7 +72,7 @@ static Output_t *AvailableOutput[] = {
|
|||||||
/* Output Functions */
|
/* Output Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static void OutputAdd(Context_t * context, char *port)
|
static void OutputAdd(Player * context, char *port)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ static void OutputAdd(Context_t * context, char *port)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OutputDel(Context_t * context, char *port)
|
static void OutputDel(Player * context, char *port)
|
||||||
{
|
{
|
||||||
output_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
|
output_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ static void OutputDel(Context_t * context, char *port)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Command(Context_t *context, OutputCmd_t command, const char *argument)
|
static int Command(Player *context, OutputCmd_t command, const char *argument)
|
||||||
{
|
{
|
||||||
int ret = cERR_OUTPUT_NO_ERROR;
|
int ret = cERR_OUTPUT_NO_ERROR;
|
||||||
|
|
||||||
|
@@ -61,7 +61,7 @@ static int hasThreadStarted = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
static int PlaybackTerminate(Context_t * context);
|
static int PlaybackTerminate(Player * context);
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* MISC Functions */
|
||||||
@@ -73,7 +73,7 @@ static int PlaybackTerminate(Context_t * context);
|
|||||||
|
|
||||||
static void *SupervisorThread(void *arg)
|
static void *SupervisorThread(void *arg)
|
||||||
{
|
{
|
||||||
Context_t *context = (Context_t *) arg;
|
Player *context = (Player *) arg;
|
||||||
hasThreadStarted = 1;
|
hasThreadStarted = 1;
|
||||||
|
|
||||||
playback_printf(10, ">\n");
|
playback_printf(10, ">\n");
|
||||||
@@ -96,9 +96,9 @@ static void *SupervisorThread(void *arg)
|
|||||||
/* Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int PlaybackStop(Context_t * context);
|
static int PlaybackStop(Player * context);
|
||||||
|
|
||||||
static int PlaybackOpen(Context_t * context, char *uri)
|
static int PlaybackOpen(Player * context, char *uri)
|
||||||
{
|
{
|
||||||
if (context->playback->isPlaying)
|
if (context->playback->isPlaying)
|
||||||
PlaybackStop(context);
|
PlaybackStop(context);
|
||||||
@@ -143,7 +143,7 @@ static int PlaybackOpen(Context_t * context, char *uri)
|
|||||||
return cERR_PLAYBACK_NO_ERROR;
|
return cERR_PLAYBACK_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackClose(Context_t * context)
|
static int PlaybackClose(Player * context)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ static int PlaybackClose(Context_t * context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackPlay(Context_t * context)
|
static int PlaybackPlay(Player * context)
|
||||||
{
|
{
|
||||||
pthread_attr_t attr;
|
pthread_attr_t attr;
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
@@ -244,7 +244,7 @@ static int PlaybackPlay(Context_t * context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackPause(Context_t * context)
|
static int PlaybackPause(Player * context)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
|
|
||||||
@@ -276,7 +276,7 @@ static int PlaybackPause(Context_t * context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackContinue(Context_t * context)
|
static int PlaybackContinue(Player * context)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
|
|
||||||
@@ -311,7 +311,7 @@ static int PlaybackContinue(Context_t * context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackStop(Context_t * context)
|
static int PlaybackStop(Player * context)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
int wait_time = 20;
|
int wait_time = 20;
|
||||||
@@ -359,7 +359,7 @@ static int PlaybackStop(Context_t * context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackTerminate(Context_t * context)
|
static int PlaybackTerminate(Player * context)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
int wait_time = 20;
|
int wait_time = 20;
|
||||||
@@ -413,7 +413,7 @@ static int PlaybackTerminate(Context_t * context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackFastForward(Context_t * context, int *speed)
|
static int PlaybackFastForward(Player * context, int *speed)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
|
|
||||||
@@ -448,7 +448,7 @@ static int PlaybackFastForward(Context_t * context, int *speed)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackFastBackward(Context_t * context, int *speed)
|
static int PlaybackFastBackward(Player * context, int *speed)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
|
|
||||||
@@ -495,7 +495,7 @@ static int PlaybackFastBackward(Context_t * context, int *speed)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackSlowMotion(Context_t * context, int *speed)
|
static int PlaybackSlowMotion(Player * context, int *speed)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
|
|
||||||
@@ -533,7 +533,7 @@ static int PlaybackSlowMotion(Context_t * context, int *speed)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackSeek(Context_t * context, float *pos, int absolute)
|
static int PlaybackSeek(Player * context, float *pos, int absolute)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
|
|
||||||
@@ -551,7 +551,7 @@ static int PlaybackSeek(Context_t * context, float *pos, int absolute)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackPts(Context_t * context, unsigned long long int *pts)
|
static int PlaybackPts(Player * context, unsigned long long int *pts)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
|
|
||||||
@@ -571,7 +571,7 @@ static int PlaybackPts(Context_t * context, unsigned long long int *pts)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackGetFrameCount(Context_t * context,
|
static int PlaybackGetFrameCount(Player * context,
|
||||||
unsigned long long int *frameCount)
|
unsigned long long int *frameCount)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
@@ -594,7 +594,7 @@ static int PlaybackGetFrameCount(Context_t * context,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackLength(Context_t * context, double *length)
|
static int PlaybackLength(Player * context, double *length)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
|
|
||||||
@@ -617,7 +617,7 @@ static int PlaybackLength(Context_t * context, double *length)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackSwitchAudio(Context_t * context, int *track)
|
static int PlaybackSwitchAudio(Player * context, int *track)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
int curtrackid = 0;
|
int curtrackid = 0;
|
||||||
@@ -659,7 +659,7 @@ extern bool output_switch_audio(AVStream*);
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackSwitchSubtitle(Context_t * context, int *track)
|
static int PlaybackSwitchSubtitle(Player * context, int *track)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
|
|
||||||
@@ -689,7 +689,7 @@ static int PlaybackSwitchSubtitle(Context_t * context, int *track)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackSwitchTeletext(Context_t * context, int *pid)
|
static int PlaybackSwitchTeletext(Player * context, int *pid)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
|
|
||||||
@@ -713,7 +713,7 @@ static int PlaybackSwitchTeletext(Context_t * context, int *pid)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackMetadata(Context_t * context, char ***metadata)
|
static int PlaybackMetadata(Player * context, char ***metadata)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
|
|
||||||
@@ -724,7 +724,7 @@ static int PlaybackMetadata(Context_t * context, char ***metadata)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Command(Context_t *context, PlaybackCmd_t command, void *argument)
|
static int Command(Player *context, PlaybackCmd_t command, void *argument)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@ extern ManagerHandler_t ManagerHandler;
|
|||||||
|
|
||||||
#include "playback_libeplayer3.h"
|
#include "playback_libeplayer3.h"
|
||||||
|
|
||||||
static Context_t *player = NULL;
|
static Player *player = NULL;
|
||||||
|
|
||||||
extern cAudio *audioDecoder;
|
extern cAudio *audioDecoder;
|
||||||
extern cVideo *videoDecoder;
|
extern cVideo *videoDecoder;
|
||||||
@@ -51,7 +51,7 @@ bool cPlayback::Open(playmode_t PlayMode)
|
|||||||
nPlaybackSpeed = 0;
|
nPlaybackSpeed = 0;
|
||||||
init_jump = -1;
|
init_jump = -1;
|
||||||
|
|
||||||
player = (Context_t*) malloc(sizeof(Context_t));
|
player = new Player();
|
||||||
|
|
||||||
if(player) {
|
if(player) {
|
||||||
player->playback = &PlaybackHandler;
|
player->playback = &PlaybackHandler;
|
||||||
@@ -252,9 +252,10 @@ bool cPlayback::Stop(void)
|
|||||||
|
|
||||||
if(player && player->playback)
|
if(player && player->playback)
|
||||||
player->playback->Command(player,PLAYBACK_CLOSE, NULL);
|
player->playback->Command(player,PLAYBACK_CLOSE, NULL);
|
||||||
if(player)
|
if(player) {
|
||||||
free(player);
|
delete player;
|
||||||
player = NULL;
|
player = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
playing=false;
|
playing=false;
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user