mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 07:23:11 +02:00
libeplayer3-arm: Code formatting
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define container_printf(level, x...) do { \
|
#define container_printf(level, x...) do { \
|
||||||
if (debug_level >= level) printf(x); } while (0)
|
if (debug_level >= level) printf(x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define container_printf(level, x...)
|
#define container_printf(level, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -98,11 +98,12 @@ static int32_t selectContainer(Context_t *context, char *extension)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Command(void *_context, ContainerCmd_t command, void *argument)
|
static int Command(void *_context, ContainerCmd_t command, void *argument)
|
||||||
{
|
{
|
||||||
Context_t *context = (Context_t *) _context;
|
Context_t *context = (Context_t *) _context;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
container_printf(10, "%s::%s\n", __FILE__, __FUNCTION__);
|
container_printf(10, "%s::%s\n", __FILE__, __FUNCTION__);
|
||||||
|
|
||||||
switch (command)
|
switch (command)
|
||||||
{
|
{
|
||||||
case CONTAINER_ADD:
|
case CONTAINER_ADD:
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -40,7 +41,6 @@
|
|||||||
#include <sys/poll.h>
|
#include <sys/poll.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <sys/prctl.h>
|
#include <sys/prctl.h>
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include <libavutil/avutil.h>
|
#include <libavutil/avutil.h>
|
||||||
#include <libavutil/time.h>
|
#include <libavutil/time.h>
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
static short debug_level = 1;
|
static short debug_level = 1;
|
||||||
|
|
||||||
#define ffmpeg_printf(level, fmt, x...) do { \
|
#define ffmpeg_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define ffmpeg_printf(level, fmt, x...)
|
#define ffmpeg_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -115,7 +115,7 @@ static short debug_level = 1;
|
|||||||
typedef enum {RTMP_NATIVE, RTMP_LIBRTMP, RTMP_NONE} eRTMPProtoImplType;
|
typedef enum {RTMP_NATIVE, RTMP_LIBRTMP, RTMP_NONE} eRTMPProtoImplType;
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static pthread_mutex_t mutex;
|
static pthread_mutex_t mutex;
|
||||||
@@ -438,8 +438,8 @@ static char *Codec2Encoding(int32_t codec_id, int32_t media_type, uint8_t *extra
|
|||||||
case AV_CODEC_ID_MOV_TEXT:
|
case AV_CODEC_ID_MOV_TEXT:
|
||||||
case AV_CODEC_ID_HDMV_PGS_SUBTITLE:
|
case AV_CODEC_ID_HDMV_PGS_SUBTITLE:
|
||||||
case AV_CODEC_ID_DVB_TELETEXT:
|
case AV_CODEC_ID_DVB_TELETEXT:
|
||||||
// case CODEC_ID_DVB_TELETEXT:
|
// case CODEC_ID_DVB_TELETEXT:
|
||||||
// return "S_TEXT/SRT"; /* fixme */
|
// return "S_TEXT/SRT"; /* fixme */
|
||||||
case AV_CODEC_ID_TEXT: ///< raw UTF-8 text
|
case AV_CODEC_ID_TEXT: ///< raw UTF-8 text
|
||||||
return "S_TEXT/UTF-8";
|
return "S_TEXT/UTF-8";
|
||||||
case AV_CODEC_ID_SRT:
|
case AV_CODEC_ID_SRT:
|
||||||
@@ -2644,9 +2644,9 @@ static int container_ffmpeg_get_metadata(Context_t * context, char ***p)
|
|||||||
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
return cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t Command(void *_context, ContainerCmd_t command, void *argument)
|
static int32_t Command(void *_context, ContainerCmd_t command, void *argument)
|
||||||
{
|
{
|
||||||
Context_t *context = (Context_t *) _context;
|
Context_t *context = (Context_t *) _context;
|
||||||
int ret = cERR_CONTAINER_FFMPEG_NO_ERROR;
|
int ret = cERR_CONTAINER_FFMPEG_NO_ERROR;
|
||||||
ffmpeg_printf(50, "Command %d\n", command);
|
ffmpeg_printf(50, "Command %d\n", command);
|
||||||
if (command != CONTAINER_SET_BUFFER_SEEK_TIME &&
|
if (command != CONTAINER_SET_BUFFER_SEEK_TIME &&
|
||||||
|
@@ -34,8 +34,8 @@ typedef struct Track_s
|
|||||||
int32_t AVIdx;
|
int32_t AVIdx;
|
||||||
|
|
||||||
/* new field for ffmpeg - add at the end so no problem
|
/* new field for ffmpeg - add at the end so no problem
|
||||||
* can occur with not changed srt saa container
|
* can occur with not changed srt saa container
|
||||||
*/
|
*/
|
||||||
char *language;
|
char *language;
|
||||||
|
|
||||||
/* length of track */
|
/* length of track */
|
||||||
|
@@ -86,4 +86,5 @@ Writer_t *getDefaultVideoWriter();
|
|||||||
Writer_t *getDefaultAudioWriter();
|
Writer_t *getDefaultAudioWriter();
|
||||||
ssize_t write_with_retry(int fd, const void *buf, size_t size);
|
ssize_t write_with_retry(int fd, const void *buf, size_t size);
|
||||||
ssize_t writev_with_retry(int fd, const struct iovec *iov, size_t ic);
|
ssize_t writev_with_retry(int fd, const struct iovec *iov, size_t ic);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
#define TRACKWRAP 20
|
#define TRACKWRAP 20
|
||||||
|
|
||||||
//#define SAM_WITH_DEBUG
|
//#define SAM_WITH_DEBUG
|
||||||
@@ -45,7 +46,7 @@
|
|||||||
static short debug_level = 40;
|
static short debug_level = 40;
|
||||||
|
|
||||||
#define audio_mgr_printf(level, fmt, x...) do { \
|
#define audio_mgr_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] \n" fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] \n" fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define audio_mgr_printf(level, x...)
|
#define audio_mgr_printf(level, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -67,7 +68,7 @@ static const char FILENAME[] = __FILE__;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static Track_t *Tracks = NULL;
|
static Track_t *Tracks = NULL;
|
||||||
@@ -82,7 +83,7 @@ static int CurrentTrack = 0; //TRACK[0] as default.
|
|||||||
/* Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int ManagerAdd(Context_t *context, Track_t track)
|
static int ManagerAdd(Context_t *context, Track_t track)
|
||||||
{
|
{
|
||||||
audio_mgr_printf(10, "%s::%s name=\"%s\" encoding=\"%s\" id=%d\n", FILENAME, __FUNCTION__, track.Name, track.Encoding, track.Id);
|
audio_mgr_printf(10, "%s::%s name=\"%s\" encoding=\"%s\" id=%d\n", FILENAME, __FUNCTION__, track.Name, track.Encoding, track.Id);
|
||||||
if (Tracks == NULL)
|
if (Tracks == NULL)
|
||||||
@@ -213,9 +214,9 @@ static int ManagerDel(Context_t *context)
|
|||||||
return cERR_AUDIO_MGR_NO_ERROR;
|
return cERR_AUDIO_MGR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Command(void *_context, ManagerCmd_t command, void *argument)
|
static int Command(void *_context, ManagerCmd_t command, void *argument)
|
||||||
{
|
{
|
||||||
Context_t *context = (Context_t *) _context;
|
Context_t *context = (Context_t *) _context;
|
||||||
int ret = cERR_AUDIO_MGR_NO_ERROR;
|
int ret = cERR_AUDIO_MGR_NO_ERROR;
|
||||||
audio_mgr_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
|
audio_mgr_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
|
||||||
switch (command)
|
switch (command)
|
||||||
|
@@ -61,7 +61,7 @@ static const char FILENAME[] = __FILE__;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static Track_t *Tracks = NULL;
|
static Track_t *Tracks = NULL;
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
extern Manager_t AudioManager;
|
extern Manager_t AudioManager;
|
||||||
@@ -58,6 +58,7 @@ ManagerHandler_t ManagerHandler =
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
void copyTrack(Track_t *to, Track_t *from)
|
void copyTrack(Track_t *to, Track_t *from)
|
||||||
{
|
{
|
||||||
if (NULL != to && NULL != from)
|
if (NULL != to && NULL != from)
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
#define TRACKWRAP 20
|
#define TRACKWRAP 20
|
||||||
|
|
||||||
//#define SAM_WITH_DEBUG
|
//#define SAM_WITH_DEBUG
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
#define TRACKWRAP 4
|
#define TRACKWRAP 4
|
||||||
|
|
||||||
#ifdef SAM_WITH_DEBUG
|
#ifdef SAM_WITH_DEBUG
|
||||||
@@ -43,7 +44,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define video_mgr_printf(level, x...) do { \
|
#define video_mgr_printf(level, x...) do { \
|
||||||
if (debug_level >= level) printf(x); } while (0)
|
if (debug_level >= level) printf(x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define video_mgr_printf(level, x...)
|
#define video_mgr_printf(level, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -65,7 +66,7 @@ static const char FILENAME[] = __FILE__;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static Track_t *Tracks = NULL;
|
static Track_t *Tracks = NULL;
|
||||||
@@ -73,6 +74,7 @@ static int TrackCount = 0;
|
|||||||
static int CurrentTrack = 0; //TRACK[0] as default.
|
static int CurrentTrack = 0; //TRACK[0] as default.
|
||||||
|
|
||||||
static void (* updatedTrackInfoFnc)(void) = NULL;
|
static void (* updatedTrackInfoFnc)(void) = NULL;
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
@@ -81,7 +83,7 @@ static void (* updatedTrackInfoFnc)(void) = NULL;
|
|||||||
/* Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int ManagerAdd(Context_t *context, Track_t track)
|
static int ManagerAdd(Context_t *context, Track_t track)
|
||||||
{
|
{
|
||||||
video_mgr_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
|
video_mgr_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
|
||||||
if (Tracks == NULL)
|
if (Tracks == NULL)
|
||||||
@@ -125,7 +127,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(Context_t *context __attribute__((unused)))
|
||||||
{
|
{
|
||||||
int i = 0, j = 0;
|
int i = 0, j = 0;
|
||||||
char **tracklist = NULL;
|
char **tracklist = NULL;
|
||||||
@@ -181,7 +183,7 @@ static int ManagerDel(Context_t *context)
|
|||||||
return cERR_VIDEO_MGR_NO_ERROR;
|
return cERR_VIDEO_MGR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Command(void *_context, ManagerCmd_t command, void *argument)
|
static int Command(void *_context, ManagerCmd_t command, void *argument)
|
||||||
{
|
{
|
||||||
Context_t *context = (Context_t *) _context;
|
Context_t *context = (Context_t *) _context;
|
||||||
int ret = cERR_VIDEO_MGR_NO_ERROR;
|
int ret = cERR_VIDEO_MGR_NO_ERROR;
|
||||||
|
@@ -48,6 +48,7 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
// SULGE DEBUG
|
// SULGE DEBUG
|
||||||
//#define SAM_WITH_DEBUG
|
//#define SAM_WITH_DEBUG
|
||||||
|
|
||||||
@@ -63,7 +64,7 @@ static const char FILENAME[] = __FILE__;
|
|||||||
|
|
||||||
#ifdef LINUXDVB_DEBUG
|
#ifdef LINUXDVB_DEBUG
|
||||||
#define linuxdvb_printf(level, fmt, x...) do { \
|
#define linuxdvb_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x ); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x ); } while (0)
|
||||||
#else
|
#else
|
||||||
#define linuxdvb_printf(level, fmt, x...)
|
#define linuxdvb_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -77,11 +78,11 @@ static const char FILENAME[] = __FILE__;
|
|||||||
#define cERR_LINUXDVB_NO_ERROR 0
|
#define cERR_LINUXDVB_NO_ERROR 0
|
||||||
#define cERR_LINUXDVB_ERROR -1
|
#define cERR_LINUXDVB_ERROR -1
|
||||||
|
|
||||||
static const char VIDEODEV[] = "/dev/dvb/adapter0/video0";
|
static const char VIDEODEV[] = "/dev/dvb/adapter0/video0";
|
||||||
static const char AUDIODEV[] = "/dev/dvb/adapter0/audio0";
|
static const char AUDIODEV[] = "/dev/dvb/adapter0/audio0";
|
||||||
|
|
||||||
static int videofd = -1;
|
static int videofd = -1;
|
||||||
static int audiofd = -1;
|
static int audiofd = -1;
|
||||||
|
|
||||||
struct DVBApiVideoInfo_s
|
struct DVBApiVideoInfo_s
|
||||||
{
|
{
|
||||||
@@ -99,10 +100,11 @@ pthread_mutex_t LinuxDVBmutex;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
int LinuxDvbStop(Context_t *context, char *type);
|
|
||||||
|
int LinuxDvbStop(Context_t *context, char *type);
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
void getLinuxDVBMutex(const char *filename __attribute__((unused)), const char *function __attribute__((unused)), int line __attribute__((unused)))
|
void getLinuxDVBMutex(const char *filename __attribute__((unused)), const char *function __attribute__((unused)), int line __attribute__((unused)))
|
||||||
@@ -127,7 +129,7 @@ static int LinuxDvbMapBypassMode(int bypass)
|
|||||||
return bypass;
|
return bypass;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbOpen(Context_t *context __attribute__((unused)), char *type)
|
int LinuxDvbOpen(Context_t *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);
|
||||||
@@ -185,7 +187,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(Context_t *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);
|
||||||
@@ -210,7 +212,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(Context_t *context, char *type)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
Writer_t *writer;
|
Writer_t *writer;
|
||||||
@@ -313,7 +315,7 @@ int LinuxDvbPlay(Context_t *context, char *type)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbStop(Context_t *context __attribute__((unused)), char *type)
|
int LinuxDvbStop(Context_t *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);
|
||||||
@@ -362,7 +364,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(Context_t *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);
|
||||||
@@ -391,7 +393,7 @@ int LinuxDvbPause(Context_t *context __attribute__((unused)), char *type)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbContinue(Context_t *context __attribute__((unused)), char *type)
|
int LinuxDvbContinue(Context_t *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);
|
||||||
@@ -419,7 +421,7 @@ int LinuxDvbContinue(Context_t *context __attribute__((unused)), char *type)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbReverseDiscontinuity(Context_t *context __attribute__((unused)), int *surplus)
|
int LinuxDvbReverseDiscontinuity(Context_t *context __attribute__((unused)), int *surplus)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
// int dis_type = VIDEO_DISCONTINUITY_CONTINUOUS_REVERSE | *surplus;
|
// int dis_type = VIDEO_DISCONTINUITY_CONTINUOUS_REVERSE | *surplus;
|
||||||
@@ -433,7 +435,7 @@ int LinuxDvbReverseDiscontinuity(Context_t *context __attribute__((unused)), in
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbAudioMute(Context_t *context __attribute__((unused)), char *flag)
|
int LinuxDvbAudioMute(Context_t *context __attribute__((unused)), char *flag)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
linuxdvb_printf(10, "\n");
|
linuxdvb_printf(10, "\n");
|
||||||
@@ -468,7 +470,7 @@ int LinuxDvbAudioMute(Context_t *context __attribute__((unused)), char *flag)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbFlush(Context_t *context __attribute__((unused)), char *type)
|
int LinuxDvbFlush(Context_t *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);
|
||||||
@@ -496,7 +498,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(Context_t *context, 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);
|
||||||
@@ -527,7 +529,7 @@ static unsigned int SpeedList[] =
|
|||||||
125, 250, 500, 700, 800, 900
|
125, 250, 500, 700, 800, 900
|
||||||
};
|
};
|
||||||
|
|
||||||
int LinuxDvbFastForward(Context_t *context, char *type)
|
int LinuxDvbFastForward(Context_t *context, char *type)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
int speedIndex;
|
int speedIndex;
|
||||||
@@ -565,13 +567,13 @@ int LinuxDvbFastForward(Context_t *context, char *type)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int LinuxDvbReverse(Context_t *context __attribute__((unused)), char *type __attribute__((unused)))
|
int LinuxDvbReverse(Context_t *context __attribute__((unused)), char *type __attribute__((unused)))
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbSlowMotion(Context_t *context, char *type)
|
int LinuxDvbSlowMotion(Context_t *context, 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);
|
||||||
@@ -595,7 +597,7 @@ int LinuxDvbSlowMotion(Context_t *context, char *type)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbAVSync(Context_t *context, char *type __attribute__((unused)))
|
int LinuxDvbAVSync(Context_t *context, char *type __attribute__((unused)))
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
/* konfetti: this one is dedicated to audiofd so we
|
/* konfetti: this one is dedicated to audiofd so we
|
||||||
@@ -618,7 +620,7 @@ int LinuxDvbAVSync(Context_t *context, char *type __attribute__((unused)))
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbClear(Context_t *context __attribute__((unused)), char *type)
|
int LinuxDvbClear(Context_t *context __attribute__((unused)), char *type)
|
||||||
{
|
{
|
||||||
int32_t ret = cERR_LINUXDVB_NO_ERROR;
|
int32_t ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
uint8_t video = !strcmp("video", type);
|
uint8_t video = !strcmp("video", type);
|
||||||
@@ -651,7 +653,7 @@ int LinuxDvbClear(Context_t *context __attribute__((unused)), char *type)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbPts(Context_t *context __attribute__((unused)), unsigned long long int *pts)
|
int LinuxDvbPts(Context_t *context __attribute__((unused)), unsigned long long int *pts)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_ERROR;
|
int ret = cERR_LINUXDVB_ERROR;
|
||||||
linuxdvb_printf(50, "\n");
|
linuxdvb_printf(50, "\n");
|
||||||
@@ -691,7 +693,7 @@ int LinuxDvbGetFrameCount(Context_t *context __attribute__((unused)), unsigned
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbSwitch(Context_t *context, char *type)
|
int LinuxDvbSwitch(Context_t *context, char *type)
|
||||||
{
|
{
|
||||||
unsigned char audio = !strcmp("audio", type);
|
unsigned char audio = !strcmp("audio", type);
|
||||||
unsigned char video = !strcmp("video", type);
|
unsigned char video = !strcmp("video", type);
|
||||||
@@ -801,7 +803,7 @@ int LinuxDvbSwitch(Context_t *context, char *type)
|
|||||||
return cERR_LINUXDVB_NO_ERROR;
|
return cERR_LINUXDVB_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Write(void *_context, void *_out)
|
static int Write(void *_context, void *_out)
|
||||||
{
|
{
|
||||||
Context_t *context = (Context_t *) _context;
|
Context_t *context = (Context_t *) _context;
|
||||||
AudioVideoOut_t *out = (AudioVideoOut_t *) _out;
|
AudioVideoOut_t *out = (AudioVideoOut_t *) _out;
|
||||||
@@ -953,10 +955,10 @@ static int Write(void *_context, void *_out)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int reset(Context_t *context)
|
static int reset(Context_t *context)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
Writer_t *writer;
|
Writer_t *writer;
|
||||||
char *Encoding = NULL;
|
char *Encoding = NULL;
|
||||||
context->manager->video->Command(context, MANAGER_GETENCODING, &Encoding);
|
context->manager->video->Command(context, MANAGER_GETENCODING, &Encoding);
|
||||||
writer = getWriter(Encoding);
|
writer = getWriter(Encoding);
|
||||||
@@ -985,7 +987,7 @@ static int reset(Context_t *context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Command(void *_context, OutputCmd_t command, void *argument)
|
static int Command(void *_context, OutputCmd_t command, void *argument)
|
||||||
{
|
{
|
||||||
Context_t *context = (Context_t *) _context;
|
Context_t *context = (Context_t *) _context;
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
|
@@ -59,7 +59,7 @@ static const char FILENAME[] = __FILE__;
|
|||||||
|
|
||||||
#ifdef LINUXDVB_DEBUG
|
#ifdef LINUXDVB_DEBUG
|
||||||
#define linuxdvb_printf(level, fmt, x...) do { \
|
#define linuxdvb_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x ); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x ); } while (0)
|
||||||
#else
|
#else
|
||||||
#define linuxdvb_printf(x...)
|
#define linuxdvb_printf(x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -73,11 +73,11 @@ static const char FILENAME[] = __FILE__;
|
|||||||
#define cERR_LINUXDVB_NO_ERROR 0
|
#define cERR_LINUXDVB_NO_ERROR 0
|
||||||
#define cERR_LINUXDVB_ERROR -1
|
#define cERR_LINUXDVB_ERROR -1
|
||||||
|
|
||||||
static const char VIDEODEV[] = "/dev/dvb/adapter0/video0";
|
static const char VIDEODEV[] = "/dev/dvb/adapter0/video0";
|
||||||
static const char AUDIODEV[] = "/dev/dvb/adapter0/audio0";
|
static const char AUDIODEV[] = "/dev/dvb/adapter0/audio0";
|
||||||
|
|
||||||
static int videofd = -1;
|
static int videofd = -1;
|
||||||
static int audiofd = -1;
|
static int audiofd = -1;
|
||||||
|
|
||||||
struct DVBApiVideoInfo_s
|
struct DVBApiVideoInfo_s
|
||||||
{
|
{
|
||||||
@@ -95,10 +95,11 @@ pthread_mutex_t LinuxDVBmutex;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
int LinuxDvbStop(Context_t *context, char *type);
|
|
||||||
|
int LinuxDvbStop(Context_t *context, char *type);
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
void getLinuxDVBMutex(const char *filename __attribute__((unused)), const char *function __attribute__((unused)), int line __attribute__((unused)))
|
void getLinuxDVBMutex(const char *filename __attribute__((unused)), const char *function __attribute__((unused)), int line __attribute__((unused)))
|
||||||
@@ -114,7 +115,7 @@ void releaseLinuxDVBMutex(const char *filename __attribute__((unused)), const ch
|
|||||||
linuxdvb_printf(250, "released mutex\n");
|
linuxdvb_printf(250, "released mutex\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbOpen(Context_t *context __attribute__((unused)), char *type)
|
int LinuxDvbOpen(Context_t *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);
|
||||||
@@ -179,7 +180,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(Context_t *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);
|
||||||
@@ -204,7 +205,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(Context_t *context, char *type)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
Writer_t *writer;
|
Writer_t *writer;
|
||||||
@@ -282,7 +283,7 @@ int LinuxDvbPlay(Context_t *context, char *type)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbStop(Context_t *context __attribute__((unused)), char *type)
|
int LinuxDvbStop(Context_t *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);
|
||||||
@@ -333,7 +334,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(Context_t *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);
|
||||||
@@ -362,7 +363,7 @@ int LinuxDvbPause(Context_t *context __attribute__((unused)), char *type)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbContinue(Context_t *context __attribute__((unused)), char *type)
|
int LinuxDvbContinue(Context_t *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);
|
||||||
@@ -390,7 +391,7 @@ int LinuxDvbContinue(Context_t *context __attribute__((unused)), char *type)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbReverseDiscontinuity(Context_t *context __attribute__((unused)), int *surplus)
|
int LinuxDvbReverseDiscontinuity(Context_t *context __attribute__((unused)), int *surplus)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
int dis_type = VIDEO_DISCONTINUITY_CONTINUOUS_REVERSE | *surplus;
|
int dis_type = VIDEO_DISCONTINUITY_CONTINUOUS_REVERSE | *surplus;
|
||||||
@@ -404,7 +405,7 @@ int LinuxDvbReverseDiscontinuity(Context_t *context __attribute__((unused)), in
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbAudioMute(Context_t *context __attribute__((unused)), char *flag)
|
int LinuxDvbAudioMute(Context_t *context __attribute__((unused)), char *flag)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
linuxdvb_printf(10, "\n");
|
linuxdvb_printf(10, "\n");
|
||||||
@@ -439,7 +440,7 @@ int LinuxDvbAudioMute(Context_t *context __attribute__((unused)), char *flag)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbFlush(Context_t *context __attribute__((unused)), char *type)
|
int LinuxDvbFlush(Context_t *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);
|
||||||
@@ -470,7 +471,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(Context_t *context, 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);
|
||||||
@@ -501,7 +502,7 @@ static unsigned int SpeedList[] =
|
|||||||
125, 250, 500, 700, 800, 900
|
125, 250, 500, 700, 800, 900
|
||||||
};
|
};
|
||||||
|
|
||||||
int LinuxDvbFastForward(Context_t *context, char *type)
|
int LinuxDvbFastForward(Context_t *context, char *type)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
int speedIndex;
|
int speedIndex;
|
||||||
@@ -539,13 +540,13 @@ int LinuxDvbFastForward(Context_t *context, char *type)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int LinuxDvbReverse(Context_t *context __attribute__((unused)), char *type __attribute__((unused)))
|
int LinuxDvbReverse(Context_t *context __attribute__((unused)), char *type __attribute__((unused)))
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbSlowMotion(Context_t *context, char *type)
|
int LinuxDvbSlowMotion(Context_t *context, 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);
|
||||||
@@ -569,7 +570,7 @@ int LinuxDvbSlowMotion(Context_t *context, char *type)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbAVSync(Context_t *context, char *type __attribute__((unused)))
|
int LinuxDvbAVSync(Context_t *context, char *type __attribute__((unused)))
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
/* konfetti: this one is dedicated to audiofd so we
|
/* konfetti: this one is dedicated to audiofd so we
|
||||||
@@ -592,7 +593,7 @@ int LinuxDvbAVSync(Context_t *context, char *type __attribute__((unused)))
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbClear(Context_t *context __attribute__((unused)), char *type)
|
int LinuxDvbClear(Context_t *context __attribute__((unused)), char *type)
|
||||||
{
|
{
|
||||||
int32_t ret = cERR_LINUXDVB_NO_ERROR;
|
int32_t ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
uint8_t video = !strcmp("video", type);
|
uint8_t video = !strcmp("video", type);
|
||||||
@@ -625,7 +626,7 @@ int LinuxDvbClear(Context_t *context __attribute__((unused)), char *type)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbPts(Context_t *context __attribute__((unused)), unsigned long long int *pts)
|
int LinuxDvbPts(Context_t *context __attribute__((unused)), unsigned long long int *pts)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_ERROR;
|
int ret = cERR_LINUXDVB_ERROR;
|
||||||
linuxdvb_printf(50, "\n");
|
linuxdvb_printf(50, "\n");
|
||||||
@@ -659,7 +660,7 @@ int LinuxDvbPts(Context_t *context __attribute__((unused)), unsigned long long
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbGetFrameCount(Context_t *context __attribute__((unused)), unsigned long long int *frameCount)
|
int LinuxDvbGetFrameCount(Context_t *context __attribute__((unused)), unsigned long long int *frameCount)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
dvb_play_info_t playInfo;
|
dvb_play_info_t playInfo;
|
||||||
@@ -695,7 +696,7 @@ int LinuxDvbGetFrameCount(Context_t *context __attribute__((unused)), unsigned
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LinuxDvbSwitch(Context_t *context, char *type)
|
int LinuxDvbSwitch(Context_t *context, char *type)
|
||||||
{
|
{
|
||||||
unsigned char audio = !strcmp("audio", type);
|
unsigned char audio = !strcmp("audio", type);
|
||||||
unsigned char video = !strcmp("video", type);
|
unsigned char video = !strcmp("video", type);
|
||||||
@@ -805,7 +806,7 @@ int LinuxDvbSwitch(Context_t *context, char *type)
|
|||||||
return cERR_LINUXDVB_NO_ERROR;
|
return cERR_LINUXDVB_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Write(void *_context, void *_out)
|
static int Write(void *_context, void *_out)
|
||||||
{
|
{
|
||||||
Context_t *context = (Context_t *) _context;
|
Context_t *context = (Context_t *) _context;
|
||||||
AudioVideoOut_t *out = (AudioVideoOut_t *) _out;
|
AudioVideoOut_t *out = (AudioVideoOut_t *) _out;
|
||||||
@@ -957,10 +958,10 @@ static int Write(void *_context, void *_out)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int reset(Context_t *context)
|
static int reset(Context_t *context)
|
||||||
{
|
{
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
Writer_t *writer;
|
Writer_t *writer;
|
||||||
char *Encoding = NULL;
|
char *Encoding = NULL;
|
||||||
context->manager->video->Command(context, MANAGER_GETENCODING, &Encoding);
|
context->manager->video->Command(context, MANAGER_GETENCODING, &Encoding);
|
||||||
writer = getWriter(Encoding);
|
writer = getWriter(Encoding);
|
||||||
@@ -989,7 +990,7 @@ static int reset(Context_t *context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Command(void *_context, OutputCmd_t command, void *argument)
|
static int Command(void *_context, OutputCmd_t command, void *argument)
|
||||||
{
|
{
|
||||||
Context_t *context = (Context_t *) _context;
|
Context_t *context = (Context_t *) _context;
|
||||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define output_printf(level, x...) do { \
|
#define output_printf(level, x...) do { \
|
||||||
if (debug_level >= level) fprintf(stderr, x); } while (0)
|
if (debug_level >= level) fprintf(stderr, x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define output_printf(level, x...)
|
#define output_printf(level, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -64,7 +64,7 @@ static const char *FILENAME = "output.c";
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static Output_t *AvailableOutput[] =
|
static Output_t *AvailableOutput[] =
|
||||||
@@ -79,7 +79,7 @@ static Output_t *AvailableOutput[] =
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static void printOutputCapabilities()
|
static void printOutputCapabilities()
|
||||||
@@ -102,7 +102,7 @@ static void printOutputCapabilities()
|
|||||||
/* Output Functions */
|
/* Output Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static void OutputAdd(Context_t *context, char *port)
|
static void OutputAdd(Context_t *context, char *port)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
output_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
|
output_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
|
||||||
@@ -132,7 +132,7 @@ static void OutputAdd(Context_t *context, char *port)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OutputDel(Context_t *context, char *port)
|
static void OutputDel(Context_t *context, char *port)
|
||||||
{
|
{
|
||||||
output_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
|
output_printf(10, "%s::%s\n", FILENAME, __FUNCTION__);
|
||||||
if (!strcmp("audio", port))
|
if (!strcmp("audio", port))
|
||||||
@@ -149,7 +149,7 @@ static void OutputDel(Context_t *context, char *port)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Command(void *_context, OutputCmd_t command, void *argument)
|
static int Command(void *_context, OutputCmd_t command, void *argument)
|
||||||
{
|
{
|
||||||
Context_t *context = (Context_t *) _context;
|
Context_t *context = (Context_t *) _context;
|
||||||
int ret = cERR_OUTPUT_NO_ERROR;
|
int ret = cERR_OUTPUT_NO_ERROR;
|
||||||
|
@@ -53,7 +53,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define subtitle_printf(level, fmt, x...) do { \
|
#define subtitle_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define subtitle_printf(level, fmt, x...)
|
#define subtitle_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -85,7 +85,7 @@ Number, Style, Name,, MarginL, MarginR, MarginV, Effect,, Text
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static pthread_mutex_t mutex;
|
static pthread_mutex_t mutex;
|
||||||
@@ -96,8 +96,9 @@ static int isSubtitleOpened = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static void getMutex(int line)
|
static void getMutex(int line)
|
||||||
{
|
{
|
||||||
subtitle_printf(100, "%d requesting mutex\n", line);
|
subtitle_printf(100, "%d requesting mutex\n", line);
|
||||||
@@ -258,7 +259,7 @@ static int32_t subtitle_Close(Context_t *context __attribute__((unused)))
|
|||||||
return cERR_SUBTITLE_NO_ERROR;
|
return cERR_SUBTITLE_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Command(void *_context, OutputCmd_t command, void *argument)
|
static int Command(void *_context, OutputCmd_t command, void *argument)
|
||||||
{
|
{
|
||||||
Context_t *context = (Context_t *) _context;
|
Context_t *context = (Context_t *) _context;
|
||||||
int ret = cERR_SUBTITLE_NO_ERROR;
|
int ret = cERR_SUBTITLE_NO_ERROR;
|
||||||
|
@@ -70,7 +70,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define aac_printf(level, fmt, x...) do { \
|
#define aac_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define aac_printf(level, fmt, x...)
|
#define aac_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -86,7 +86,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/// ** AAC ADTS format **
|
/// ** AAC ADTS format **
|
||||||
@@ -125,7 +125,7 @@ ADTS = streaming format called Audio Data Transport Stream (ADTS)
|
|||||||
LOAS = Low Overhead Audio Stream (LOAS), a self-synchronizing streaming format
|
LOAS = Low Overhead Audio Stream (LOAS), a self-synchronizing streaming format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static unsigned char DefaultAACHeader[] =
|
static unsigned char DefaultAACHeader[] =
|
||||||
{
|
{
|
||||||
0xff,
|
0xff,
|
||||||
0xf1,
|
0xf1,
|
||||||
@@ -143,7 +143,7 @@ LATMContext *pLATMCtx = NULL;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int reset()
|
static int reset()
|
||||||
|
@@ -61,7 +61,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define ac3_printf(level, fmt, x...) do { \
|
#define ac3_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define ac3_printf(level, fmt, x...)
|
#define ac3_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -77,8 +77,9 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
unsigned char AC3_SYNC_HEADER[] = {0x80, 0x01, 0x00, 0x01};
|
unsigned char AC3_SYNC_HEADER[] = {0x80, 0x01, 0x00, 0x01};
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
@@ -64,7 +64,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define amr_printf(level, fmt, x...) do { \
|
#define amr_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define amr_printf(level, fmt, x...)
|
#define amr_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -80,7 +80,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
@@ -52,6 +52,7 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
#define B_GET_BITS(w,e,b) (((w)>>(b))&(((unsigned)(-1))>>((sizeof(unsigned))*8-(e+1-b))))
|
#define B_GET_BITS(w,e,b) (((w)>>(b))&(((unsigned)(-1))>>((sizeof(unsigned))*8-(e+1-b))))
|
||||||
#define B_SET_BITS(name,v,e,b) (((unsigned)(v))<<(b))
|
#define B_SET_BITS(name,v,e,b) (((unsigned)(v))<<(b))
|
||||||
|
|
||||||
@@ -66,7 +67,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define divx_printf(level, fmt, x...) do { \
|
#define divx_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define divx_printf(level, fmt, x...)
|
#define divx_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -82,8 +83,9 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static uint8_t initialHeader = 1;
|
static uint8_t initialHeader = 1;
|
||||||
static uint8_t brcm_divx311_sequence_header[] =
|
static uint8_t brcm_divx311_sequence_header[] =
|
||||||
{
|
{
|
||||||
@@ -115,7 +117,7 @@ static int writeData(void *_call)
|
|||||||
WriterAVCallData_t *call = (WriterAVCallData_t *) _call;
|
WriterAVCallData_t *call = (WriterAVCallData_t *) _call;
|
||||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE + 4];
|
unsigned char PesHeader[PES_MAX_HEADER_SIZE + 4];
|
||||||
unsigned char Version = 5;
|
unsigned char Version = 5;
|
||||||
unsigned int FakeStartCode = (Version << 8) | PES_VERSION_FAKE_START_CODE;
|
unsigned int FakeStartCode = (Version << 8) | PES_VERSION_FAKE_START_CODE;
|
||||||
divx_printf(10, "\n");
|
divx_printf(10, "\n");
|
||||||
if (call == NULL)
|
if (call == NULL)
|
||||||
{
|
{
|
||||||
|
@@ -68,7 +68,7 @@
|
|||||||
static int16_t debug_level = 0;
|
static int16_t debug_level = 0;
|
||||||
|
|
||||||
#define dts_printf(level, fmt, x...) do { \
|
#define dts_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define dts_printf(level, fmt, x...)
|
#define dts_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -84,7 +84,7 @@ static int16_t debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
@@ -94,6 +94,7 @@ static int16_t debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* MISC Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int32_t reset()
|
static int32_t reset()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -59,7 +59,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define h263_printf(level, fmt, x...) do { \
|
#define h263_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define h263_printf(level, fmt, x...)
|
#define h263_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -74,7 +74,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
@@ -61,7 +61,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define h264_printf(level, fmt, x...) do { \
|
#define h264_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define h264_printf(level, fmt, x...)
|
#define h264_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -79,14 +79,16 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static unsigned char Head[] = {0, 0, 0, 1};
|
static unsigned char Head[] = {0, 0, 0, 1};
|
||||||
static int initialHeader = 1;
|
static int initialHeader = 1;
|
||||||
static unsigned int NalLengthBytes = 1;
|
static unsigned int NalLengthBytes = 1;
|
||||||
static unsigned char *CodecData = NULL;
|
static unsigned char *CodecData = NULL;
|
||||||
static unsigned int CodecDataLen = 0;
|
static unsigned int CodecDataLen = 0;
|
||||||
static int avc3 = 0;
|
static int avc3 = 0;
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
@@ -61,7 +61,7 @@
|
|||||||
static short debug_level = 10;
|
static short debug_level = 10;
|
||||||
|
|
||||||
#define h264_printf(level, fmt, x...) do { \
|
#define h264_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define h264_printf(level, fmt, x...)
|
#define h264_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -79,13 +79,15 @@ static short debug_level = 10;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static unsigned char Head[] = {0, 0, 0, 1};
|
static unsigned char Head[] = {0, 0, 0, 1};
|
||||||
static int initialHeader = 1;
|
static int initialHeader = 1;
|
||||||
static unsigned int NalLengthBytes = 1;
|
static unsigned int NalLengthBytes = 1;
|
||||||
static unsigned char *CodecData = NULL;
|
static unsigned char *CodecData = NULL;
|
||||||
static unsigned int CodecDataLen = 0;
|
static unsigned int CodecDataLen = 0;
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
@@ -57,7 +57,9 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
//#define SAM_WITH_DEBUG
|
//#define SAM_WITH_DEBUG
|
||||||
|
|
||||||
#ifdef SAM_WITH_DEBUG
|
#ifdef SAM_WITH_DEBUG
|
||||||
#define LPCM_DEBUG
|
#define LPCM_DEBUG
|
||||||
#else
|
#else
|
||||||
@@ -69,7 +71,7 @@
|
|||||||
static uint16_t debug_level = 1;
|
static uint16_t debug_level = 1;
|
||||||
|
|
||||||
#define lpcm_printf(level, fmt, x...) do { \
|
#define lpcm_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define lpcm_printf(level, fmt, x...)
|
#define lpcm_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -87,8 +89,9 @@ static uint16_t debug_level = 1;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static uint8_t PesHeader[PES_MAX_HEADER_SIZE];
|
static uint8_t PesHeader[PES_MAX_HEADER_SIZE];
|
||||||
static uint8_t initialHeader = 1;
|
static uint8_t initialHeader = 1;
|
||||||
|
|
||||||
|
@@ -59,7 +59,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define mp3_printf(level, fmt, x...) do { \
|
#define mp3_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define mp3_printf(level, fmt, x...)
|
#define mp3_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -75,7 +75,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
@@ -60,7 +60,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define mpeg2_printf(level, fmt, x...) do { \
|
#define mpeg2_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define mpeg2_printf(level, fmt, x...)
|
#define mpeg2_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -76,7 +76,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
@@ -118,7 +118,7 @@ static int writeData(void *_call)
|
|||||||
while (Position < call->len)
|
while (Position < call->len)
|
||||||
{
|
{
|
||||||
int PacketLength = (call->len - Position) <= MAX_PES_PACKET_SIZE ?
|
int PacketLength = (call->len - Position) <= MAX_PES_PACKET_SIZE ?
|
||||||
(call->len - Position) : MAX_PES_PACKET_SIZE;
|
(call->len - Position) : MAX_PES_PACKET_SIZE;
|
||||||
int Remaining = call->len - Position - PacketLength;
|
int Remaining = call->len - Position - PacketLength;
|
||||||
mpeg2_printf(20, "PacketLength=%d, Remaining=%d, Position=%d\n", PacketLength, Remaining, Position);
|
mpeg2_printf(20, "PacketLength=%d, Remaining=%d, Position=%d\n", PacketLength, Remaining, Position);
|
||||||
struct iovec iov[2];
|
struct iovec iov[2];
|
||||||
|
@@ -65,7 +65,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define mpeg4_printf(level, fmt, x...) do { \
|
#define mpeg4_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define mpeg4_printf(level, fmt, x...)
|
#define mpeg4_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -81,8 +81,9 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int initialHeader = 1;
|
static int initialHeader = 1;
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
@@ -92,6 +93,7 @@ static int initialHeader = 1;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* MISC Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int reset()
|
static int reset()
|
||||||
{
|
{
|
||||||
initialHeader = 1;
|
initialHeader = 1;
|
||||||
|
@@ -55,6 +55,9 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
|
//#define SAM_WITH_DEBUG
|
||||||
|
|
||||||
#ifdef SAM_WITH_DEBUG
|
#ifdef SAM_WITH_DEBUG
|
||||||
#define PCM_DEBUG
|
#define PCM_DEBUG
|
||||||
#else
|
#else
|
||||||
@@ -66,7 +69,7 @@
|
|||||||
static uint16_t debug_level = 0;
|
static uint16_t debug_level = 0;
|
||||||
|
|
||||||
#define pcm_printf(level, fmt, x...) do { \
|
#define pcm_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define pcm_printf(level, fmt, x...)
|
#define pcm_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -82,8 +85,9 @@ static uint16_t debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static uint8_t initialHeader = 1;
|
static uint8_t initialHeader = 1;
|
||||||
static uint8_t codec_data[18];
|
static uint8_t codec_data[18];
|
||||||
static uint64_t fixed_buffertimestamp;
|
static uint64_t fixed_buffertimestamp;
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Includes */
|
/* Includes */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -50,9 +50,10 @@
|
|||||||
#include "writer.h"
|
#include "writer.h"
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
#define VC1_SEQUENCE_LAYER_METADATA_START_CODE 0x80
|
|
||||||
|
#define VC1_SEQUENCE_LAYER_METADATA_START_CODE 0x80
|
||||||
#define VC1_FRAME_START_CODE 0x0d
|
#define VC1_FRAME_START_CODE 0x0d
|
||||||
|
|
||||||
#define SAM_WITH_DEBUG
|
#define SAM_WITH_DEBUG
|
||||||
@@ -67,7 +68,7 @@
|
|||||||
static short debug_level = 10;
|
static short debug_level = 10;
|
||||||
|
|
||||||
#define vc1_printf(level, fmt, x...) do { \
|
#define vc1_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define vc1_printf(level, fmt, x...)
|
#define vc1_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -82,12 +83,13 @@ static short debug_level = 10;
|
|||||||
/* Types */
|
/* Types */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static const unsigned char SequenceLayerStartCode[] = {0x00, 0x00, 0x01, VC1_SEQUENCE_LAYER_METADATA_START_CODE};
|
static const unsigned char SequenceLayerStartCode[] = {0x00, 0x00, 0x01, VC1_SEQUENCE_LAYER_METADATA_START_CODE};
|
||||||
static const uint8_t Vc1FrameStartCode[] = {0, 0, 1, VC1_FRAME_START_CODE};
|
static const uint8_t Vc1FrameStartCode[] = {0, 0, 1, VC1_FRAME_START_CODE};
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int initialHeader = 1;
|
static int initialHeader = 1;
|
||||||
static video_codec_data_t videocodecdata = {0, 0};
|
static video_codec_data_t videocodecdata = {0, 0};
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Includes */
|
/* Includes */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -50,9 +50,11 @@
|
|||||||
#include "writer.h"
|
#include "writer.h"
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
//#define SAM_WITH_DEBUG
|
//#define SAM_WITH_DEBUG
|
||||||
|
|
||||||
#ifdef SAM_WITH_DEBUG
|
#ifdef SAM_WITH_DEBUG
|
||||||
#define VP_DEBUG
|
#define VP_DEBUG
|
||||||
#else
|
#else
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
static short debug_level = 10;
|
static short debug_level = 10;
|
||||||
|
|
||||||
#define vp_printf(level, fmt, x...) do { \
|
#define vp_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define vp_printf(level, fmt, x...)
|
#define vp_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -80,7 +82,7 @@ static short debug_level = 10;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
@@ -90,6 +92,7 @@ static short debug_level = 10;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* MISC Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int reset()
|
static int reset()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -53,6 +53,8 @@
|
|||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
|
//#define SAM_WITH_DEBUG
|
||||||
|
|
||||||
#ifdef SAM_WITH_DEBUG
|
#ifdef SAM_WITH_DEBUG
|
||||||
#define WMA_DEBUG
|
#define WMA_DEBUG
|
||||||
#else
|
#else
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define wma_printf(level, fmt, x...) do { \
|
#define wma_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define wma_printf(level, fmt, x...)
|
#define wma_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -80,7 +82,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int initialHeader = 1;
|
static int initialHeader = 1;
|
||||||
|
@@ -67,7 +67,7 @@
|
|||||||
static short debug_level = 10;
|
static short debug_level = 10;
|
||||||
|
|
||||||
#define wmv_printf(level, fmt, x...) do { \
|
#define wmv_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define wmv_printf(level, fmt, x...)
|
#define wmv_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -85,8 +85,9 @@ static short debug_level = 10;
|
|||||||
static const uint8_t Vc1FrameStartCode[] = {0, 0, 1, WMV_FRAME_START_CODE};
|
static const uint8_t Vc1FrameStartCode[] = {0, 0, 1, WMV_FRAME_START_CODE};
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int initialHeader = 1;
|
static int initialHeader = 1;
|
||||||
static video_codec_data_t videocodecdata = {0, 0};
|
static video_codec_data_t videocodecdata = {0, 0};
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define writer_printf(level, x...) do { \
|
#define writer_printf(level, x...) do { \
|
||||||
if (debug_level >= level) printf(x); } while (0)
|
if (debug_level >= level) printf(x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define writer_printf(level, x...)
|
#define writer_printf(level, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -57,7 +57,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static Writer_t *AvailableWriter[] =
|
static Writer_t *AvailableWriter[] =
|
||||||
|
@@ -68,7 +68,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define aac_printf(level, fmt, x...) do { \
|
#define aac_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define aac_printf(level, fmt, x...)
|
#define aac_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -84,7 +84,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/// ** AAC ADTS format **
|
/// ** AAC ADTS format **
|
||||||
@@ -123,7 +123,7 @@ ADTS = streaming format called Audio Data Transport Stream (ADTS)
|
|||||||
LOAS = Low Overhead Audio Stream (LOAS), a self-synchronizing streaming format
|
LOAS = Low Overhead Audio Stream (LOAS), a self-synchronizing streaming format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static unsigned char DefaultAACHeader[] =
|
static unsigned char DefaultAACHeader[] =
|
||||||
{
|
{
|
||||||
0xff,
|
0xff,
|
||||||
0xf1,
|
0xf1,
|
||||||
|
@@ -63,7 +63,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define ac3_printf(level, fmt, x...) do { \
|
#define ac3_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define ac3_printf(level, fmt, x...)
|
#define ac3_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -79,7 +79,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
@@ -62,7 +62,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define divx_printf(level, fmt, x...) do { \
|
#define divx_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define divx_printf(level, fmt, x...)
|
#define divx_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -78,8 +78,9 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int initialHeader = 1;
|
static int initialHeader = 1;
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
@@ -89,6 +90,7 @@ static int initialHeader = 1;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* MISC Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int reset()
|
static int reset()
|
||||||
{
|
{
|
||||||
initialHeader = 1;
|
initialHeader = 1;
|
||||||
|
@@ -62,7 +62,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define divx_printf(level, fmt, x...) do { \
|
#define divx_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define divx_printf(level, fmt, x...)
|
#define divx_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -78,8 +78,9 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int initialHeader = 1;
|
static int initialHeader = 1;
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
@@ -89,6 +90,7 @@ static int initialHeader = 1;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* MISC Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int reset()
|
static int reset()
|
||||||
{
|
{
|
||||||
initialHeader = 1;
|
initialHeader = 1;
|
||||||
|
@@ -50,6 +50,7 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
#define PES_AUDIO_PRIVATE_HEADER_SIZE 16 // consider maximum private header size.
|
#define PES_AUDIO_PRIVATE_HEADER_SIZE 16 // consider maximum private header size.
|
||||||
#define PES_AUDIO_HEADER_SIZE (32 + PES_AUDIO_PRIVATE_HEADER_SIZE)
|
#define PES_AUDIO_HEADER_SIZE (32 + PES_AUDIO_PRIVATE_HEADER_SIZE)
|
||||||
#define PES_AUDIO_PACKET_SIZE 2028
|
#define PES_AUDIO_PACKET_SIZE 2028
|
||||||
@@ -66,7 +67,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define dts_printf(level, fmt, x...) do { \
|
#define dts_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define dts_printf(level, fmt, x...)
|
#define dts_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -82,7 +83,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
@@ -92,6 +93,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* MISC Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int reset()
|
static int reset()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -50,6 +50,7 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
#ifdef SAM_WITH_DEBUG
|
#ifdef SAM_WITH_DEBUG
|
||||||
#define H263_DEBUG
|
#define H263_DEBUG
|
||||||
#else
|
#else
|
||||||
@@ -61,7 +62,7 @@ static short debug_level = 0;
|
|||||||
static const char *FILENAME = "h263.c";
|
static const char *FILENAME = "h263.c";
|
||||||
|
|
||||||
#define h263_printf(level, fmt, x...) do { \
|
#define h263_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define h263_printf(level, fmt, x...)
|
#define h263_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -71,12 +72,13 @@ static const char *FILENAME = "h263.c";
|
|||||||
#else
|
#else
|
||||||
#define h263_err(fmt, x...)
|
#define h263_err(fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Types */
|
/* Types */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
@@ -63,7 +63,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define h264_printf(level, fmt, x...) do { \
|
#define h264_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define h264_printf(level, fmt, x...)
|
#define h264_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -92,12 +92,14 @@ typedef struct avcC_s
|
|||||||
} avcC_t;
|
} avcC_t;
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
const uint8_t Head[] = {0, 0, 0, 1};
|
const uint8_t Head[] = {0, 0, 0, 1};
|
||||||
static int32_t initialHeader = 1;
|
static int32_t initialHeader = 1;
|
||||||
static uint32_t NalLengthBytes = 1;
|
static uint32_t NalLengthBytes = 1;
|
||||||
static int avc3 = 0;
|
static int avc3 = 0;
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
@@ -50,6 +50,7 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
#ifdef SAM_WITH_DEBUG
|
#ifdef SAM_WITH_DEBUG
|
||||||
#define MP3_DEBUG
|
#define MP3_DEBUG
|
||||||
#else
|
#else
|
||||||
@@ -61,7 +62,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define mp3_printf(level, fmt, x...) do { \
|
#define mp3_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define mp3_printf(level, fmt, x...)
|
#define mp3_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -77,7 +78,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
@@ -96,7 +97,7 @@ static int reset()
|
|||||||
static int writeData(void *_call)
|
static int writeData(void *_call)
|
||||||
{
|
{
|
||||||
WriterAVCallData_t *call = (WriterAVCallData_t *) _call;
|
WriterAVCallData_t *call = (WriterAVCallData_t *) _call;
|
||||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
||||||
mp3_printf(10, "\n");
|
mp3_printf(10, "\n");
|
||||||
if (call == NULL)
|
if (call == NULL)
|
||||||
{
|
{
|
||||||
|
@@ -50,6 +50,7 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
#ifdef SAM_WITH_DEBUG
|
#ifdef SAM_WITH_DEBUG
|
||||||
#define MPEG2_DEBUG
|
#define MPEG2_DEBUG
|
||||||
#else
|
#else
|
||||||
@@ -61,7 +62,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define mpeg2_printf(level, fmt, x...) do { \
|
#define mpeg2_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define mpeg2_printf(level, fmt, x...)
|
#define mpeg2_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -77,7 +78,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
@@ -96,7 +97,7 @@ static int reset()
|
|||||||
static int writeData(void *_call)
|
static int writeData(void *_call)
|
||||||
{
|
{
|
||||||
WriterAVCallData_t *call = (WriterAVCallData_t *) _call;
|
WriterAVCallData_t *call = (WriterAVCallData_t *) _call;
|
||||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
||||||
int len = 0;
|
int len = 0;
|
||||||
unsigned int Position = 0;
|
unsigned int Position = 0;
|
||||||
mpeg2_printf(10, "\n");
|
mpeg2_printf(10, "\n");
|
||||||
|
@@ -53,6 +53,7 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
#ifdef SAM_WITH_DEBUG
|
#ifdef SAM_WITH_DEBUG
|
||||||
#define PCM_DEBUG
|
#define PCM_DEBUG
|
||||||
#else
|
#else
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define pcm_printf(level, fmt, x...) do { \
|
#define pcm_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define pcm_printf(level, fmt, x...)
|
#define pcm_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -80,7 +81,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int32_t initialHeader = 1;
|
static int32_t initialHeader = 1;
|
||||||
|
@@ -55,7 +55,7 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Includes */
|
/* Includes */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
#include "writer.h"
|
#include "writer.h"
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
#define WMV3_PRIVATE_DATA_LENGTH 4
|
#define WMV3_PRIVATE_DATA_LENGTH 4
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define vc1_printf(level, fmt, x...) do { \
|
#define vc1_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define vc1_printf(level, fmt, x...)
|
#define vc1_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -105,6 +105,7 @@ static const unsigned char Metadata[] =
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Varaibles */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int initialHeader = 1;
|
static int initialHeader = 1;
|
||||||
static unsigned char FrameHeaderSeen = 0;
|
static unsigned char FrameHeaderSeen = 0;
|
||||||
|
|
||||||
@@ -115,6 +116,7 @@ static unsigned char FrameHeaderSeen = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* MISC Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int reset()
|
static int reset()
|
||||||
{
|
{
|
||||||
initialHeader = 1;
|
initialHeader = 1;
|
||||||
|
@@ -49,6 +49,9 @@
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
|
//#define SAM_WITH_DEBUG
|
||||||
|
|
||||||
#ifdef SAM_WITH_DEBUG
|
#ifdef SAM_WITH_DEBUG
|
||||||
#define VORBIS_DEBUG
|
#define VORBIS_DEBUG
|
||||||
#else
|
#else
|
||||||
@@ -60,7 +63,7 @@
|
|||||||
static short debug_level = 1;
|
static short debug_level = 1;
|
||||||
|
|
||||||
#define vorbis_printf(level, fmt, x...) do { \
|
#define vorbis_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define vorbis_printf(level, fmt, x...)
|
#define vorbis_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -76,7 +79,7 @@ static short debug_level = 1;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
@@ -95,7 +98,7 @@ static int reset()
|
|||||||
static int writeData(void *_call)
|
static int writeData(void *_call)
|
||||||
{
|
{
|
||||||
WriterAVCallData_t *call = (WriterAVCallData_t *) _call;
|
WriterAVCallData_t *call = (WriterAVCallData_t *) _call;
|
||||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
||||||
vorbis_printf(10, "\n");
|
vorbis_printf(10, "\n");
|
||||||
if (call == NULL)
|
if (call == NULL)
|
||||||
{
|
{
|
||||||
|
@@ -51,6 +51,8 @@
|
|||||||
/* Makros/Constants */
|
/* Makros/Constants */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
|
//#define SAM_WITH_DEBUG
|
||||||
|
|
||||||
#ifdef SAM_WITH_DEBUG
|
#ifdef SAM_WITH_DEBUG
|
||||||
#define WMA_DEBUG
|
#define WMA_DEBUG
|
||||||
#else
|
#else
|
||||||
@@ -62,7 +64,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define wma_printf(level, fmt, x...) do { \
|
#define wma_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define wma_printf(level, fmt, x...)
|
#define wma_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -78,7 +80,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int initialHeader = 1;
|
static int initialHeader = 1;
|
||||||
|
@@ -69,7 +69,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define wmv_printf(level, fmt, x...) do { \
|
#define wmv_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define wmv_printf(level, fmt, x...)
|
#define wmv_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -106,8 +106,9 @@ static const unsigned char Metadata[] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int initialHeader = 1;
|
static int initialHeader = 1;
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
@@ -117,6 +118,7 @@ static int initialHeader = 1;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* MISC Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int reset()
|
static int reset()
|
||||||
{
|
{
|
||||||
initialHeader = 1;
|
initialHeader = 1;
|
||||||
|
@@ -43,7 +43,7 @@
|
|||||||
static short debug_level = 0;
|
static short debug_level = 0;
|
||||||
|
|
||||||
#define writer_printf(level, x...) do { \
|
#define writer_printf(level, x...) do { \
|
||||||
if (debug_level >= level) printf(x); } while (0)
|
if (debug_level >= level) printf(x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define writer_printf(level, x...)
|
#define writer_printf(level, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -59,7 +59,7 @@ static short debug_level = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Varaibles */
|
/* Variables */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static Writer_t *AvailableWriter[] =
|
static Writer_t *AvailableWriter[] =
|
||||||
|
@@ -40,7 +40,7 @@ static short debug_level = 20;
|
|||||||
|
|
||||||
#ifdef PLAYBACK_DEBUG
|
#ifdef PLAYBACK_DEBUG
|
||||||
#define playback_printf(level, fmt, x...) do { \
|
#define playback_printf(level, fmt, x...) do { \
|
||||||
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0)
|
||||||
#else
|
#else
|
||||||
#define playback_printf(level, fmt, x...)
|
#define playback_printf(level, fmt, x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -67,7 +67,7 @@ static int hasThreadStarted = 0;
|
|||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
static int32_t PlaybackTerminate(Context_t *context);
|
static int32_t PlaybackTerminate(Context_t *context);
|
||||||
|
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
/* MISC Functions */
|
/* MISC Functions */
|
||||||
@@ -107,9 +107,9 @@ static void SupervisorThread(Context_t *context)
|
|||||||
/* Functions */
|
/* Functions */
|
||||||
/* ***************************** */
|
/* ***************************** */
|
||||||
|
|
||||||
static int PlaybackStop(Context_t *context);
|
static int PlaybackStop(Context_t *context);
|
||||||
|
|
||||||
static int PlaybackOpen(Context_t *context, PlayFiles_t *pFiles)
|
static int PlaybackOpen(Context_t *context, PlayFiles_t *pFiles)
|
||||||
{
|
{
|
||||||
if (context->playback->isPlaying)
|
if (context->playback->isPlaying)
|
||||||
{
|
{
|
||||||
@@ -186,7 +186,7 @@ static int PlaybackOpen(Context_t *context, PlayFiles_t *pFiles)
|
|||||||
return cERR_PLAYBACK_NO_ERROR;
|
return cERR_PLAYBACK_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackClose(Context_t *context)
|
static int PlaybackClose(Context_t *context)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
playback_printf(10, "\n");
|
playback_printf(10, "\n");
|
||||||
@@ -212,7 +212,7 @@ static int PlaybackClose(Context_t *context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackPlay(Context_t *context)
|
static int PlaybackPlay(Context_t *context)
|
||||||
{
|
{
|
||||||
pthread_attr_t attr;
|
pthread_attr_t attr;
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
@@ -277,7 +277,7 @@ static int PlaybackPlay(Context_t *context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackPause(Context_t *context)
|
static int PlaybackPause(Context_t *context)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
playback_printf(10, "\n");
|
playback_printf(10, "\n");
|
||||||
@@ -302,7 +302,7 @@ static int PlaybackPause(Context_t *context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t PlaybackContinue(Context_t *context)
|
static int32_t PlaybackContinue(Context_t *context)
|
||||||
{
|
{
|
||||||
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
playback_printf(10, "\n");
|
playback_printf(10, "\n");
|
||||||
@@ -329,7 +329,7 @@ static int32_t PlaybackContinue(Context_t *context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t PlaybackStop(Context_t *context)
|
static int32_t PlaybackStop(Context_t *context)
|
||||||
{
|
{
|
||||||
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
int wait_time = 20;
|
int wait_time = 20;
|
||||||
@@ -365,7 +365,7 @@ static int32_t PlaybackStop(Context_t *context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t PlaybackTerminate(Context_t *context)
|
static int32_t PlaybackTerminate(Context_t *context)
|
||||||
{
|
{
|
||||||
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
int wait_time = 20;
|
int wait_time = 20;
|
||||||
@@ -409,7 +409,7 @@ static int32_t PlaybackTerminate(Context_t *context)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t PlaybackSeek(Context_t *context, int64_t *pos, uint8_t absolute)
|
static int32_t PlaybackSeek(Context_t *context, int64_t *pos, uint8_t absolute)
|
||||||
{
|
{
|
||||||
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
playback_printf(10, "pos: %lldd\n", *pos);
|
playback_printf(10, "pos: %lldd\n", *pos);
|
||||||
@@ -436,7 +436,7 @@ static int32_t PlaybackSeek(Context_t *context, int64_t *pos, uint8_t absolute)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t PlaybackPts(Context_t *context, int64_t *pts)
|
static int32_t PlaybackPts(Context_t *context, int64_t *pts)
|
||||||
{
|
{
|
||||||
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
playback_printf(20, "\n");
|
playback_printf(20, "\n");
|
||||||
@@ -454,7 +454,7 @@ static int32_t PlaybackPts(Context_t *context, int64_t *pts)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t PlaybackGetFrameCount(Context_t *context, int64_t *frameCount)
|
static int32_t PlaybackGetFrameCount(Context_t *context, int64_t *frameCount)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
playback_printf(20, "\n");
|
playback_printf(20, "\n");
|
||||||
@@ -472,7 +472,7 @@ static int32_t PlaybackGetFrameCount(Context_t *context, int64_t *frameCount)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t PlaybackLength(Context_t *context, int64_t *length)
|
static int32_t PlaybackLength(Context_t *context, int64_t *length)
|
||||||
{
|
{
|
||||||
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
playback_printf(20, "\n");
|
playback_printf(20, "\n");
|
||||||
@@ -493,7 +493,7 @@ static int32_t PlaybackLength(Context_t *context, int64_t *length)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t PlaybackSwitchAudio(Context_t *context, int32_t *track)
|
static int32_t PlaybackSwitchAudio(Context_t *context, int32_t *track)
|
||||||
{
|
{
|
||||||
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
int32_t curtrackid = 0;
|
int32_t curtrackid = 0;
|
||||||
@@ -535,7 +535,7 @@ static int32_t PlaybackSwitchAudio(Context_t *context, int32_t *track)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t PlaybackSwitchSubtitle(Context_t *context, int32_t *track)
|
static int32_t PlaybackSwitchSubtitle(Context_t *context, int32_t *track)
|
||||||
{
|
{
|
||||||
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
int32_t curtrackid = -1;
|
int32_t curtrackid = -1;
|
||||||
@@ -575,7 +575,7 @@ static int32_t PlaybackSwitchSubtitle(Context_t *context, int32_t *track)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t PlaybackInfo(Context_t *context, char **infoString)
|
static int32_t PlaybackInfo(Context_t *context, char **infoString)
|
||||||
{
|
{
|
||||||
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
int32_t ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
playback_printf(10, "\n");
|
playback_printf(10, "\n");
|
||||||
@@ -592,7 +592,7 @@ static int32_t PlaybackInfo(Context_t *context, char **infoString)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PlaybackMetadata(Context_t * context, char ***metadata)
|
static int PlaybackMetadata(Context_t *context, char ***metadata)
|
||||||
{
|
{
|
||||||
int ret = cERR_PLAYBACK_NO_ERROR;
|
int ret = cERR_PLAYBACK_NO_ERROR;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user