mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
lib cleanup and sync for mips vu support
This commit is contained in:
68
libeplayer3/include/aac.h
Normal file
68
libeplayer3/include/aac.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* aac helper
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef acc_123
|
||||
#define acc_123
|
||||
|
||||
#define AAC_HEADER_LENGTH 7
|
||||
|
||||
static inline int HasADTSHeader(uint8_t *data, int size)
|
||||
{
|
||||
if (size >= AAC_HEADER_LENGTH && 0xFF == data[0] && 0xF0 == (0xF0 & data[1]) &&
|
||||
size == ((data[3] & 0x3) << 11 | data[4] << 3 | data[5] >> 5))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int aac_get_sample_rate_index(uint32_t sample_rate)
|
||||
{
|
||||
if (96000 <= sample_rate)
|
||||
return 0;
|
||||
else if (88200 <= sample_rate)
|
||||
return 1;
|
||||
else if (64000 <= sample_rate)
|
||||
return 2;
|
||||
else if (48000 <= sample_rate)
|
||||
return 3;
|
||||
else if (44100 <= sample_rate)
|
||||
return 4;
|
||||
else if (32000 <= sample_rate)
|
||||
return 5;
|
||||
else if (24000 <= sample_rate)
|
||||
return 6;
|
||||
else if (22050 <= sample_rate)
|
||||
return 7;
|
||||
else if (16000 <= sample_rate)
|
||||
return 8;
|
||||
else if (12000 <= sample_rate)
|
||||
return 9;
|
||||
else if (11025 <= sample_rate)
|
||||
return 10;
|
||||
else if (8000 <= sample_rate)
|
||||
return 11;
|
||||
else if (7350 <= sample_rate)
|
||||
return 12;
|
||||
else
|
||||
return 13;
|
||||
}
|
||||
|
||||
#endif
|
86
libeplayer3/include/bcm_ioctls.h
Normal file
86
libeplayer3/include/bcm_ioctls.h
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* bcm_ioctls.h
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef H_DVB_BCM_H
|
||||
#define H_DVB_BCM_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct video_codec_data
|
||||
{
|
||||
int32_t length;
|
||||
uint8_t *data;
|
||||
} video_codec_data_t;
|
||||
#define VIDEO_SET_CODEC_DATA _IOW('o', 80, video_codec_data_t)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CT_MPEG1,
|
||||
CT_MPEG2,
|
||||
CT_H264,
|
||||
CT_DIVX311,
|
||||
CT_DIVX4,
|
||||
CT_MPEG4_PART2,
|
||||
CT_VC1,
|
||||
CT_VC1_SM,
|
||||
CT_H265,
|
||||
CT_SPARK,
|
||||
CT_VP6,
|
||||
CT_VP8,
|
||||
CT_VP9
|
||||
} video_codec_type_t;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
STREAMTYPE_UNKNOWN = -1,
|
||||
STREAMTYPE_MPEG2 = 0,
|
||||
STREAMTYPE_MPEG4_H264 = 1,
|
||||
STREAMTYPE_H263 = 2,
|
||||
STREAMTYPE_VC1 = 3,
|
||||
STREAMTYPE_MPEG4_Part2 = 4,
|
||||
STREAMTYPE_VC1_SM = 5,
|
||||
STREAMTYPE_MPEG1 = 6,
|
||||
STREAMTYPE_MPEG4_H265 = 7,
|
||||
STREAMTYPE_VB8 = 8,
|
||||
STREAMTYPE_VB9 = 9,
|
||||
STREAMTYPE_XVID = 10,
|
||||
STREAMTYPE_DIVX311 = 13,
|
||||
STREAMTYPE_DIVX4 = 14,
|
||||
STREAMTYPE_DIVX5 = 15,
|
||||
STREAMTYPE_VB6 = 18,
|
||||
STREAMTYPE_SPARK = 21,
|
||||
STREAMTYPE_MJPEG = 30,
|
||||
} video_stream_type_t;
|
||||
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
AUDIOTYPE_UNKNOWN = -1,
|
||||
AUDIOTYPE_AC3 = 0,
|
||||
AUDIOTYPE_MPEG = 1,
|
||||
AUDIOTYPE_DTS = 2,
|
||||
AUDIOTYPE_LPCM = 6,
|
||||
AUDIOTYPE_AAC = 8,
|
||||
AUDIOTYPE_AAC_HE = 9,
|
||||
AUDIOTYPE_MP3 = 0xa,
|
||||
AUDIOTYPE_AAC_PLUS = 0xb,
|
||||
AUDIOTYPE_DTS_HD = 0x10,
|
||||
AUDIOTYPE_WMA = 0x20,
|
||||
AUDIOTYPE_WMA_PRO = 0x21,
|
||||
AUDIOTYPE_AC3_PLUS = 0x22,
|
||||
AUDIOTYPE_AMR = 0x23,
|
||||
AUDIOTYPE_RAW = 0x30
|
||||
} audio_stream_type_t;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* H_DVB_BCM_H */
|
||||
|
34
libeplayer3/include/common.h
Normal file
34
libeplayer3/include/common.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef COMMON_H_
|
||||
#define COMMON_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "container.h"
|
||||
#include "output.h"
|
||||
#include "manager.h"
|
||||
#include "playback.h"
|
||||
#include <pthread.h>
|
||||
|
||||
typedef struct PlayFiles_t
|
||||
{
|
||||
char *szFirstFile;
|
||||
char *szSecondFile;
|
||||
char *szFirstMoovAtomFile;
|
||||
char *szSecondMoovAtomFile;
|
||||
uint64_t iFirstFileSize;
|
||||
uint64_t iSecondFileSize;
|
||||
uint64_t iFirstMoovAtomOffset;
|
||||
uint64_t iSecondMoovAtomOffset;
|
||||
} PlayFiles_t;
|
||||
|
||||
typedef struct Context_s
|
||||
{
|
||||
PlaybackHandler_t *playback;
|
||||
ContainerHandler_t *container;
|
||||
OutputHandler_t *output;
|
||||
ManagerHandler_t *manager;
|
||||
} Context_t;
|
||||
|
||||
int container_ffmpeg_update_tracks(Context_t *context, char *filename, int initial);
|
||||
|
||||
#endif
|
51
libeplayer3/include/container.h
Normal file
51
libeplayer3/include/container.h
Normal file
@@ -0,0 +1,51 @@
|
||||
#ifndef CONTAINER_H_
|
||||
#define CONTAINER_H_
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CONTAINER_INIT,
|
||||
CONTAINER_ADD,
|
||||
CONTAINER_CAPABILITIES,
|
||||
CONTAINER_PLAY,
|
||||
CONTAINER_STOP,
|
||||
CONTAINER_SEEK,
|
||||
CONTAINER_SEEK_ABS,
|
||||
CONTAINER_LENGTH,
|
||||
CONTAINER_DEL,
|
||||
CONTAINER_SWITCH_AUDIO,
|
||||
CONTAINER_SWITCH_SUBTITLE,
|
||||
CONTAINER_INFO,
|
||||
CONTAINER_STATUS,
|
||||
CONTAINER_LAST_PTS,
|
||||
CONTAINER_DATA,
|
||||
CONTAINER_SET_BUFFER_SEEK_TIME,
|
||||
CONTAINER_SET_BUFFER_SIZE,
|
||||
CONTAINER_GET_BUFFER_SIZE,
|
||||
CONTAINER_GET_BUFFER_STATUS,
|
||||
CONTAINER_STOP_BUFFER,
|
||||
CONTAINER_GET_METADATA
|
||||
} ContainerCmd_t;
|
||||
|
||||
struct Context_s;
|
||||
typedef struct Context_s Context_t;
|
||||
|
||||
typedef struct Container_s
|
||||
{
|
||||
char *Name;
|
||||
int (* Command)(Context_t *, ContainerCmd_t, void *);
|
||||
char **Capabilities;
|
||||
|
||||
} Container_t;
|
||||
|
||||
extern Container_t FFMPEGContainer;
|
||||
|
||||
typedef struct ContainerHandler_s
|
||||
{
|
||||
char *Name;
|
||||
Container_t *selectedContainer;
|
||||
int (* Command)(Context_t *, ContainerCmd_t, void *);
|
||||
} ContainerHandler_t;
|
||||
|
||||
#endif
|
548
libeplayer3/include/debug.h
Normal file
548
libeplayer3/include/debug.h
Normal file
@@ -0,0 +1,548 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
|
||||
|
||||
#define log_error(fmt, x...) do { printf("[%s:%s] " fmt, __FILENAME__, __FUNCTION__, ## x); } while (0)
|
||||
#define log_printf(maxlevel, level, fmt, x...) do { if (maxlevel >= level) printf("[%s:%s] " fmt, __FILENAME__, __FUNCTION__, ## x); } while (0)
|
||||
|
||||
|
||||
/*******************************************
|
||||
* ffmpeg
|
||||
*******************************************/
|
||||
#define FFMPEG_DEBUG_LEVEL 0
|
||||
#define FFMPEG_SILENT
|
||||
|
||||
#if FFMPEG_DEBUG_LEVEL
|
||||
#define ffmpeg_printf(...) log_printf(FFMPEG_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define ffmpeg_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef FFMPEG_SILENT
|
||||
#define ffmpeg_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define ffmpeg_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* container
|
||||
*******************************************/
|
||||
#define CONTAINER_DEBUG_LEVEL 0
|
||||
#define CONTAINER_SILENT
|
||||
|
||||
#if CONTAINER_DEBUG_LEVEL
|
||||
#define container_printf(...) log_printf(CONTAINER_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define container_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef CONTAINER_SILENT
|
||||
#define container_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define container_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* latmenc
|
||||
*******************************************/
|
||||
#define LATMENC_DEBUG_LEVEL 0
|
||||
#define LATMENC_SILENT
|
||||
|
||||
#if LATMENC_DEBUG_LEVEL
|
||||
#define latmenc_printf(...) log_printf(LATMENC_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define latmenc_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef LATMENC_SILENT
|
||||
#define latmenc_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define latmenc_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* audio_mgr
|
||||
*******************************************/
|
||||
#define AUDIO_MGR_DEBUG_LEVEL 0
|
||||
#define AUDIO_MGR_SILENT
|
||||
|
||||
#if AUDIO_MGR_DEBUG_LEVEL
|
||||
#define audio_mgr_printf(...) log_printf(AUDIO_MGR_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define audio_mgr_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef AUDIO_MGR_SILENT
|
||||
#define audio_mgr_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define audio_mgr_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* subtitle_mgr
|
||||
*******************************************/
|
||||
#define SUBTITLE_MGR_DEBUG_LEVEL 0
|
||||
#define SUBTITLE_MGR_SILENT
|
||||
|
||||
#if SUBTITLE_MGR_DEBUG_LEVEL
|
||||
#define subtitle_mgr_printf(...) log_printf(SUBTITLE_MGR_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define subtitle_mgr_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef SUBTITLE_MGR_SILENT
|
||||
#define subtitle_mgr_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define subtitle_mgr_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* video_mgr
|
||||
*******************************************/
|
||||
#define VIDEO_MGR_DEBUG_LEVEL 0
|
||||
#define VIDEO_MGR_SILENT
|
||||
|
||||
#if VIDEO_MGR_DEBUG_LEVEL
|
||||
#define video_mgr_printf(...) log_printf(VIDEO_MGR_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define video_mgr_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef VIDEO_MGR_SILENT
|
||||
#define video_mgr_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define video_mgr_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* linuxdvb
|
||||
*******************************************/
|
||||
#define LINUXDVB_DEBUG_LEVEL 0
|
||||
#define LINUXDVB_SILENT
|
||||
|
||||
#if LINUXDVB_DEBUG_LEVEL
|
||||
#define linuxdvb_printf(...) log_printf(LINUXDVB_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define linuxdvb_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef LINUXDVB_SILENT
|
||||
#define linuxdvb_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define linuxdvb_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* buff
|
||||
*******************************************/
|
||||
#define BUFF_DEBUG_LEVEL 0
|
||||
#define BUFF_SILENT
|
||||
|
||||
#if BUFF_DEBUG_LEVEL
|
||||
#define buff_printf(...) log_printf(BUFF_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define buff_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef BUFF_SILENT
|
||||
#define buff_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define buff_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* output
|
||||
*******************************************/
|
||||
#define OUTPUT_DEBUG_LEVEL 0
|
||||
#define OUTPUT_SILENT
|
||||
|
||||
#if OUTPUT_DEBUG_LEVEL
|
||||
#define output_printf(...) log_printf(OUTPUT_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define output_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef OUTPUT_SILENT
|
||||
#define output_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define output_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* subtitle
|
||||
*******************************************/
|
||||
#define SUBTITLE_DEBUG_LEVEL 0
|
||||
#define SUBTITLE_SILENT
|
||||
|
||||
#if SUBTITLE_DEBUG_LEVEL
|
||||
#define subtitle_printf(...) log_printf(SUBTITLE_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define subtitle_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef SUBTITLE_SILENT
|
||||
#define subtitle_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define subtitle_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* writer
|
||||
*******************************************/
|
||||
#define WRITER_DEBUG_LEVEL 0
|
||||
#define WRITER_SILENT
|
||||
|
||||
#if WRITER_DEBUG_LEVEL
|
||||
#define writer_printf(...) log_printf(WRITER_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define writer_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef WRITER_SILENT
|
||||
#define writer_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define writer_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* playback
|
||||
*******************************************/
|
||||
#define PLAYBACK_DEBUG_LEVEL 0
|
||||
#define PLAYBACK_SILENT
|
||||
|
||||
#if PLAYBACK_DEBUG_LEVEL
|
||||
#define playback_printf(...) log_printf(PLAYBACK_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define playback_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef PLAYBACK_SILENT
|
||||
#define playback_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define playback_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* aac
|
||||
*******************************************/
|
||||
#define AAC_DEBUG_LEVEL 0
|
||||
#define AAC_SILENT
|
||||
|
||||
#if AAC_DEBUG_LEVEL
|
||||
#define aac_printf(...) log_printf(AAC_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define aac_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef AAC_SILENT
|
||||
#define aac_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define aac_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* ac3
|
||||
*******************************************/
|
||||
#define AC3_DEBUG_LEVEL 0
|
||||
#define AC3_SILENT
|
||||
|
||||
#if AC3_DEBUG_LEVEL
|
||||
#define ac3_printf(...) log_printf(AC3_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define ac3_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef AC3_SILENT
|
||||
#define ac3_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define ac3_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* amr
|
||||
*******************************************/
|
||||
#define AMR_DEBUG_LEVEL 0
|
||||
#define AMR_SILENT
|
||||
|
||||
#if AMR_DEBUG_LEVEL
|
||||
#define amr_printf(...) log_printf(AMR_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define amr_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef AMR_SILENT
|
||||
#define amr_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define amr_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* divx
|
||||
*******************************************/
|
||||
#define DIVX_DEBUG_LEVEL 0
|
||||
#define DIVX_SILENT
|
||||
|
||||
#if DIVX_DEBUG_LEVEL
|
||||
#define divx_printf(...) log_printf(DIVX_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define divx_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef DIVX_SILENT
|
||||
#define divx_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define divx_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* dts
|
||||
*******************************************/
|
||||
#define DTS_DEBUG_LEVEL 0
|
||||
#define DTS_SILENT
|
||||
|
||||
#if DTS_DEBUG_LEVEL
|
||||
#define dts_printf(...) log_printf(DTS_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define dts_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef DTS_SILENT
|
||||
#define dts_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define dts_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* h263
|
||||
*******************************************/
|
||||
#define H263_DEBUG_LEVEL 0
|
||||
#define H263_SILENT
|
||||
|
||||
#if H263_DEBUG_LEVEL
|
||||
#define h263_printf(...) log_printf(H263_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define h263_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef H263_SILENT
|
||||
#define h263_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define h263_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* h264
|
||||
*******************************************/
|
||||
#define H264_DEBUG_LEVEL 0
|
||||
#define H264_SILENT
|
||||
|
||||
#if H264_DEBUG_LEVEL
|
||||
#define h264_printf(...) log_printf(H264_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define h264_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef H264_SILENT
|
||||
#define h264_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define h264_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* h265
|
||||
*******************************************/
|
||||
#define H265_DEBUG_LEVEL 0
|
||||
#define H265_SILENT
|
||||
|
||||
#if H265_DEBUG_LEVEL
|
||||
#define h265_printf(...) log_printf(H265_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define h265_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef H265_SILENT
|
||||
#define h265_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define h265_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* lpcm
|
||||
*******************************************/
|
||||
#define LPCM_DEBUG_LEVEL 0
|
||||
#define LPCM_SILENT
|
||||
|
||||
#if LPCM_DEBUG_LEVEL
|
||||
#define lpcm_printf(...) log_printf(LPCM_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define lpcm_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef LPCM_SILENT
|
||||
#define lpcm_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define lpcm_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* mp3
|
||||
*******************************************/
|
||||
#define MP3_DEBUG_LEVEL 0
|
||||
#define MP3_SILENT
|
||||
|
||||
#if MP3_DEBUG_LEVEL
|
||||
#define mp3_printf(...) log_printf(MP3_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define mp3_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef MP3_SILENT
|
||||
#define mp3_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define mp3_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* mpeg2
|
||||
*******************************************/
|
||||
#define MPEG2_DEBUG_LEVEL 0
|
||||
#define MPEG2_SILENT
|
||||
|
||||
#if MPEG2_DEBUG_LEVEL
|
||||
#define mpeg2_printf(...) log_printf(MPEG2_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define mpeg2_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef MPEG2_SILENT
|
||||
#define mpeg2_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define mpeg2_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* mpeg4
|
||||
*******************************************/
|
||||
#define MPEG4_DEBUG_LEVEL 0
|
||||
#define MPEG4_SILENT
|
||||
|
||||
#if MPEG4_DEBUG_LEVEL
|
||||
#define mpeg4_printf(...) log_printf(MPEG4_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define mpeg4_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef MPEG4_SILENT
|
||||
#define mpeg4_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define mpeg4_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* pcm
|
||||
*******************************************/
|
||||
#define PCM_DEBUG_LEVEL 0
|
||||
#define PCM_SILENT
|
||||
|
||||
#if PCM_DEBUG_LEVEL
|
||||
#define pcm_printf(...) log_printf(PCM_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define pcm_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef PCM_SILENT
|
||||
#define pcm_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define pcm_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* vc1
|
||||
*******************************************/
|
||||
#define VC1_DEBUG_LEVEL 0
|
||||
#define VC1_SILENT
|
||||
|
||||
#if VC1_DEBUG_LEVEL
|
||||
#define vc1_printf(...) log_printf(VC1_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define vc1_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef VC1_SILENT
|
||||
#define vc1_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define vc1_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* vp
|
||||
*******************************************/
|
||||
#define VP_DEBUG_LEVEL 0
|
||||
#define VP_SILENT
|
||||
|
||||
#if VP_DEBUG_LEVEL
|
||||
#define vp_printf(...) log_printf(VP_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define vp_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef VP_SILENT
|
||||
#define vp_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define vp_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* wma
|
||||
*******************************************/
|
||||
#define WMA_DEBUG_LEVEL 0
|
||||
#define WMA_SILENT
|
||||
|
||||
#if WMA_DEBUG_LEVEL
|
||||
#define wma_printf(...) log_printf(WMA_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define wma_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef WMA_SILENT
|
||||
#define wma_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define wma_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* wmv
|
||||
*******************************************/
|
||||
#define WMV_DEBUG_LEVEL 0
|
||||
#define WMV_SILENT
|
||||
|
||||
#if WMV_DEBUG_LEVEL
|
||||
#define wmv_printf(...) log_printf(WMV_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define wmv_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef WMV_SILENT
|
||||
#define wmv_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define wmv_err(...)
|
||||
#endif
|
||||
|
||||
/*******************************************
|
||||
* mjpeg
|
||||
*******************************************/
|
||||
#define MJPEG_DEBUG_LEVEL 0
|
||||
#define MJPEG_SILENT
|
||||
|
||||
#if MJPEG_DEBUG_LEVEL
|
||||
#define mjpeg_printf(...) log_printf(MJPEG_DEBUG_LEVEL, __VA_ARGS__)
|
||||
#else
|
||||
#define mjpeg_printf(...)
|
||||
#endif
|
||||
|
||||
#ifndef MJPEG_SILENT
|
||||
#define mjpeg_err(...) log_error(__VA_ARGS__)
|
||||
#else
|
||||
#define mjpeg_err(...)
|
||||
#endif
|
45
libeplayer3/include/ffmpeg_metadata.h
Normal file
45
libeplayer3/include/ffmpeg_metadata.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#ifndef _ffmpeg_metadata_123
|
||||
#define _ffmpeg_metadata_123
|
||||
|
||||
/* these file contains a list of metadata tags which can be used by applications
|
||||
* to stream specific information. it maps the tags to ffmpeg specific tags.
|
||||
*
|
||||
* fixme: if we add other container for some resons later (maybe some other libs
|
||||
* support better demuxing or something like this), then we should think on a
|
||||
* more generic mechanism!
|
||||
*/
|
||||
|
||||
/* metatdata map list:
|
||||
*/
|
||||
char *metadata_map[] =
|
||||
{
|
||||
/* our tags ffmpeg tag / id3v2 */
|
||||
"Title", "TIT2",
|
||||
"Title", "TT2",
|
||||
"Artist", "TPE1",
|
||||
"Artist", "TP1",
|
||||
"AlbumArtist", "TPE2",
|
||||
"AlbumArtist", "TP2",
|
||||
"Album", "TALB",
|
||||
"Album", "TAL",
|
||||
"Year", "TDRL", /* fixme */
|
||||
"Year", "TDRC", /* fixme */
|
||||
"Comment", "unknown",
|
||||
"Track", "TRCK",
|
||||
"Track", "TRK",
|
||||
"Copyright", "TCOP",
|
||||
"Composer", "TCOM",
|
||||
"Genre", "TCON",
|
||||
"Genre", "TCO",
|
||||
"EncodedBy", "TENC",
|
||||
"EncodedBy", "TEN",
|
||||
"Language", "TLAN",
|
||||
"Performer", "TPE3",
|
||||
"Performer", "TP3",
|
||||
"Publisher", "TPUB",
|
||||
"Encoder", "TSSE",
|
||||
"Disc", "TPOS",
|
||||
NULL
|
||||
};
|
||||
|
||||
#endif
|
123
libeplayer3/include/manager.h
Normal file
123
libeplayer3/include/manager.h
Normal file
@@ -0,0 +1,123 @@
|
||||
#ifndef MANAGER_H_
|
||||
#define MANAGER_H_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <libavutil/avutil.h>
|
||||
#include <libavutil/time.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libswresample/swresample.h>
|
||||
#include <libavutil/opt.h>
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MANAGER_ADD,
|
||||
MANAGER_LIST,
|
||||
MANAGER_GET,
|
||||
MANAGER_GETNAME,
|
||||
MANAGER_SET,
|
||||
MANAGER_GETENCODING,
|
||||
MANAGER_DEL,
|
||||
MANAGER_GET_TRACK,
|
||||
MANAGER_GET_TRACK_DESC,
|
||||
MANAGER_INIT_UPDATE,
|
||||
MANAGER_UPDATED_TRACK_INFO,
|
||||
MANAGER_REGISTER_UPDATED_TRACK_INFO,
|
||||
MANAGER_REF_LIST,
|
||||
MANAGER_REF_LIST_SIZE,
|
||||
} ManagerCmd_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
eTypeES,
|
||||
eTypePES
|
||||
} eTrackTypeEplayer;
|
||||
|
||||
typedef struct Track_s
|
||||
{
|
||||
char *Name;
|
||||
char *Encoding;
|
||||
int32_t Id;
|
||||
int32_t AVIdx;
|
||||
|
||||
/* new field for ffmpeg - add at the end so no problem
|
||||
* can occur with not changed srt saa container
|
||||
*/
|
||||
char *language;
|
||||
|
||||
/* length of track */
|
||||
int64_t duration;
|
||||
uint32_t frame_rate;
|
||||
uint32_t TimeScale;
|
||||
int32_t version;
|
||||
long long int pts;
|
||||
long long int dts;
|
||||
|
||||
/* for later use: */
|
||||
eTrackTypeEplayer type;
|
||||
int width;
|
||||
int height;
|
||||
int32_t aspect_ratio_num;
|
||||
int32_t aspect_ratio_den;
|
||||
|
||||
/* stream from ffmpeg */
|
||||
AVStream *stream;
|
||||
/* AVCodecContext for steam */
|
||||
void *avCodecCtx;
|
||||
/* codec extra data (header or some other stuff) */
|
||||
uint8_t *extraData;
|
||||
int extraSize;
|
||||
|
||||
uint8_t *aacbuf;
|
||||
unsigned int aacbuflen;
|
||||
int have_aacheader;
|
||||
|
||||
/* If player2 or the elf do not support decoding of audio codec set this.
|
||||
* AVCodec is than used for softdecoding and stream will be injected as PCM */
|
||||
int inject_as_pcm;
|
||||
int inject_raw_pcm;
|
||||
|
||||
int pending;
|
||||
long long int chapter_start;
|
||||
long long int chapter_end;
|
||||
} Track_t;
|
||||
|
||||
typedef struct TrackDescription_s
|
||||
{
|
||||
int Id;
|
||||
char *Name;
|
||||
char *Encoding;
|
||||
unsigned int frame_rate;
|
||||
int width;
|
||||
int height;
|
||||
int32_t aspect_ratio_num;
|
||||
int32_t aspect_ratio_den;
|
||||
int progressive;
|
||||
|
||||
} TrackDescription_t;
|
||||
|
||||
struct Context_s;
|
||||
typedef struct Context_s Context_t;
|
||||
|
||||
typedef struct Manager_s
|
||||
{
|
||||
char *Name;
|
||||
int (* Command)(Context_t *, ManagerCmd_t, void *);
|
||||
char **Capabilities;
|
||||
|
||||
} Manager_t;
|
||||
|
||||
typedef struct ManagerHandler_s
|
||||
{
|
||||
char *Name;
|
||||
Manager_t *audio;
|
||||
Manager_t *video;
|
||||
Manager_t *subtitle;
|
||||
Manager_t *chapter;
|
||||
} ManagerHandler_t;
|
||||
|
||||
void freeTrack(Track_t *track);
|
||||
void copyTrack(Track_t *to, Track_t *from);
|
||||
|
||||
#endif
|
80
libeplayer3/include/misc.h
Normal file
80
libeplayer3/include/misc.h
Normal file
@@ -0,0 +1,80 @@
|
||||
#ifndef _exteplayer3_misc_
|
||||
#define _exteplayer3_misc_
|
||||
|
||||
#include <dirent.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* some useful things needed by many files ... */
|
||||
|
||||
/* ***************************** */
|
||||
/* Types */
|
||||
/* ***************************** */
|
||||
|
||||
typedef struct BitPacker_s
|
||||
{
|
||||
uint8_t *Ptr; /* write pointer */
|
||||
uint32_t BitBuffer; /* bitreader shifter */
|
||||
int32_t Remaining; /* number of remaining in the shifter */
|
||||
} BitPacker_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
STB_UNKNOWN,
|
||||
STB_DREAMBOX,
|
||||
STB_VUPLUS,
|
||||
STB_HISILICON,
|
||||
STB_OTHER = 999,
|
||||
} stb_type_t;
|
||||
|
||||
/* ***************************** */
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
#define INVALID_PTS_VALUE 0x200000000ull
|
||||
|
||||
/* ***************************** */
|
||||
/* Prototypes */
|
||||
/* ***************************** */
|
||||
|
||||
void PutBits(BitPacker_t *ld, uint32_t code, uint32_t length);
|
||||
void FlushBits(BitPacker_t *ld);
|
||||
int8_t PlaybackDieNow(int8_t val);
|
||||
stb_type_t GetSTBType();
|
||||
|
||||
/* ***************************** */
|
||||
/* MISC Functions */
|
||||
/* ***************************** */
|
||||
|
||||
static inline char *getExtension(char *name)
|
||||
{
|
||||
if (name)
|
||||
{
|
||||
char *ext = strrchr(name, '.');
|
||||
if (ext)
|
||||
{
|
||||
return ext + 1;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline uint32_t ReadUint32(uint8_t *buffer)
|
||||
{
|
||||
uint32_t num = (uint32_t)buffer[0] << 24 |
|
||||
(uint32_t)buffer[1] << 16 |
|
||||
(uint32_t)buffer[2] << 8 |
|
||||
(uint32_t)buffer[3];
|
||||
return num;
|
||||
}
|
||||
|
||||
static inline uint16_t ReadUInt16(uint8_t *buffer)
|
||||
{
|
||||
uint16_t num = (uint16_t)buffer[0] << 8 |
|
||||
(uint16_t)buffer[1];
|
||||
return num;
|
||||
}
|
||||
|
||||
#endif // _exteplayer3_misc_
|
93
libeplayer3/include/output.h
Normal file
93
libeplayer3/include/output.h
Normal file
@@ -0,0 +1,93 @@
|
||||
#ifndef OUTPUT_H_
|
||||
#define OUTPUT_H_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum
|
||||
{
|
||||
OUTPUT_INIT,
|
||||
OUTPUT_ADD,
|
||||
OUTPUT_DEL,
|
||||
OUTPUT_CAPABILITIES,
|
||||
OUTPUT_PLAY,
|
||||
OUTPUT_STOP,
|
||||
OUTPUT_PAUSE,
|
||||
OUTPUT_OPEN,
|
||||
OUTPUT_CLOSE,
|
||||
OUTPUT_FLUSH,
|
||||
OUTPUT_CONTINUE,
|
||||
OUTPUT_FASTFORWARD,
|
||||
OUTPUT_AVSYNC,
|
||||
OUTPUT_CLEAR,
|
||||
OUTPUT_PTS,
|
||||
OUTPUT_SWITCH,
|
||||
OUTPUT_SLOWMOTION,
|
||||
OUTPUT_AUDIOMUTE,
|
||||
OUTPUT_REVERSE,
|
||||
OUTPUT_DISCONTINUITY_REVERSE,
|
||||
OUTPUT_GET_FRAME_COUNT,
|
||||
OUTPUT_GET_PROGRESSIVE,
|
||||
OUTPUT_SET_BUFFER_SIZE,
|
||||
OUTPUT_GET_BUFFER_SIZE,
|
||||
} OutputCmd_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t *data;
|
||||
uint32_t len;
|
||||
|
||||
uint8_t *extradata;
|
||||
uint32_t extralen;
|
||||
|
||||
int64_t pts;
|
||||
int64_t dts;
|
||||
|
||||
uint32_t frameRate;
|
||||
uint32_t timeScale;
|
||||
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
|
||||
uint32_t infoFlags;
|
||||
|
||||
char *type;
|
||||
} AudioVideoOut_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t trackId;
|
||||
uint8_t *data;
|
||||
uint32_t len;
|
||||
|
||||
int64_t pts;
|
||||
int64_t durationMS; // duration in miliseconds
|
||||
|
||||
char *type;
|
||||
} SubtitleOut_t;
|
||||
|
||||
struct Context_s;
|
||||
typedef struct Context_s Context_t;
|
||||
|
||||
typedef struct Output_s
|
||||
{
|
||||
char *Name;
|
||||
int32_t (* Command)(Context_t *, OutputCmd_t, void *);
|
||||
int32_t (* Write)(Context_t *, void *);
|
||||
char **Capabilities;
|
||||
|
||||
} Output_t;
|
||||
|
||||
extern Output_t LinuxDvbOutput;
|
||||
extern Output_t SubtitleOutput;
|
||||
|
||||
typedef struct OutputHandler_s
|
||||
{
|
||||
char *Name;
|
||||
Output_t *audio;
|
||||
Output_t *video;
|
||||
Output_t *subtitle;
|
||||
int32_t (* Command)(Context_t *, OutputCmd_t, void *);
|
||||
} OutputHandler_t;
|
||||
|
||||
#endif
|
36
libeplayer3/include/pcm.h
Normal file
36
libeplayer3/include/pcm.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* pcm helper
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef pcm_h_
|
||||
#define pcm_h_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct pcmPrivateData_s
|
||||
{
|
||||
uint8_t bResampling;
|
||||
|
||||
/* Field taken direct from stream->codec */
|
||||
int32_t channels;
|
||||
int32_t bits_per_coded_sample;
|
||||
int32_t sample_rate;
|
||||
int32_t bit_rate;
|
||||
int32_t ffmpeg_codec_id;
|
||||
} pcmPrivateData_t;
|
||||
#endif
|
34
libeplayer3/include/pes.h
Normal file
34
libeplayer3/include/pes.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef pes_123
|
||||
#define pes_123
|
||||
|
||||
#define PES_HEADER_SIZE 9 ///< size of pes header
|
||||
#define PES_MAX_HEADER_SIZE (PES_HEADER_SIZE + 256) ///< maximal header size
|
||||
#define PES_PRIVATE_DATA_FLAG 0x80
|
||||
#define PES_PRIVATE_DATA_LENGTH 8
|
||||
#define PES_LENGTH_BYTE_0 5
|
||||
#define PES_LENGTH_BYTE_1 4
|
||||
#define PES_FLAGS_BYTE 7
|
||||
#define PES_EXTENSION_DATA_PRESENT 0x01
|
||||
#define PES_HEADER_DATA_LENGTH_BYTE 8
|
||||
#define PES_START_CODE_RESERVED_4 0xfd
|
||||
#define PES_VERSION_FAKE_START_CODE 0x31
|
||||
|
||||
|
||||
#define MAX_PES_PACKET_SIZE (65535)
|
||||
|
||||
|
||||
/* start codes */
|
||||
#define PCM_PES_START_CODE 0xbd
|
||||
#define PRIVATE_STREAM_1_PES_START_CODE 0xbd
|
||||
#define H263_VIDEO_PES_START_CODE 0xfe
|
||||
#define H264_VIDEO_PES_START_CODE 0xe2
|
||||
#define MPEG_VIDEO_PES_START_CODE 0xe0
|
||||
#define MPEG_AUDIO_PES_START_CODE 0xc0
|
||||
#define VC1_VIDEO_PES_START_CODE 0xfd
|
||||
#define AAC_AUDIO_PES_START_CODE 0xcf
|
||||
|
||||
int32_t InsertPesHeader(uint8_t *data, int32_t size, uint8_t stream_id, uint64_t pts, int32_t pic_start_code);
|
||||
int32_t InsertVideoPrivateDataHeader(uint8_t *data, int32_t payload_size);
|
||||
void UpdatePesHeaderPayloadSize(uint8_t *data, int32_t size);
|
||||
|
||||
#endif
|
70
libeplayer3/include/playback.h
Normal file
70
libeplayer3/include/playback.h
Normal file
@@ -0,0 +1,70 @@
|
||||
#ifndef PLAYBACK_H_
|
||||
#define PLAYBACK_H_
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef void(* PlaybackDieNowCallback)();
|
||||
bool PlaybackDieNowRegisterCallback(PlaybackDieNowCallback callback);
|
||||
|
||||
typedef enum {
|
||||
PLAYBACK_OPEN,
|
||||
PLAYBACK_CLOSE,
|
||||
PLAYBACK_PLAY,
|
||||
PLAYBACK_STOP,
|
||||
PLAYBACK_PAUSE,
|
||||
PLAYBACK_CONTINUE,
|
||||
PLAYBACK_FLUSH,
|
||||
PLAYBACK_TERM,
|
||||
PLAYBACK_FASTFORWARD,
|
||||
PLAYBACK_SEEK,
|
||||
PLAYBACK_SEEK_ABS,
|
||||
PLAYBACK_PTS,
|
||||
PLAYBACK_LENGTH,
|
||||
PLAYBACK_SWITCH_AUDIO,
|
||||
PLAYBACK_SWITCH_SUBTITLE,
|
||||
PLAYBACK_INFO,
|
||||
PLAYBACK_SLOWMOTION,
|
||||
PLAYBACK_FASTBACKWARD,
|
||||
PLAYBACK_GET_FRAME_COUNT,
|
||||
PLAYBACK_METADATA
|
||||
} PlaybackCmd_t;
|
||||
|
||||
struct Context_s;
|
||||
typedef struct Context_s Context_t;
|
||||
|
||||
typedef struct PlaybackHandler_s
|
||||
{
|
||||
char *Name;
|
||||
|
||||
int32_t fd;
|
||||
|
||||
uint8_t isFile;
|
||||
uint8_t isHttp;
|
||||
|
||||
uint8_t isPlaying;
|
||||
uint8_t isPaused;
|
||||
uint8_t isForwarding;
|
||||
uint8_t isSeeking;
|
||||
uint8_t isCreationPhase;
|
||||
|
||||
int32_t BackWard;
|
||||
int32_t SlowMotion;
|
||||
int32_t Speed;
|
||||
uint64_t readCount;
|
||||
int32_t AVSync;
|
||||
|
||||
uint8_t isVideo;
|
||||
uint8_t isAudio;
|
||||
uint8_t isSubtitle;
|
||||
uint8_t abortRequested;
|
||||
|
||||
int32_t (* Command)(Context_t *, PlaybackCmd_t, void *);
|
||||
char *uri;
|
||||
off_t size;
|
||||
uint8_t noprobe; /* hack: only minimal probing in av_find_stream_info */
|
||||
uint8_t isLoopMode;
|
||||
uint8_t isTSLiveMode;
|
||||
} PlaybackHandler_t;
|
||||
|
||||
#endif
|
335
libeplayer3/include/stm_ioctls.h
Normal file
335
libeplayer3/include/stm_ioctls.h
Normal file
@@ -0,0 +1,335 @@
|
||||
/*
|
||||
* stm_ioctls.h
|
||||
*
|
||||
* Copyright (C) STMicroelectronics Limited 2005. All rights reserved.
|
||||
*
|
||||
* Extensions to the LinuxDVB API (v3) implemented by the Havana implemenation.
|
||||
*/
|
||||
|
||||
#ifndef H_STM_IOCTLS
|
||||
#define H_STM_IOCTLS
|
||||
|
||||
/*
|
||||
* Whenever a sequence of values is extended (define or enum) always add the new values
|
||||
* So that old values are unchange to maintain binary compatibility.
|
||||
*/
|
||||
|
||||
#define DVB_SPEED_NORMAL_PLAY 1000
|
||||
#define DVB_SPEED_STOPPED 0
|
||||
#define DVB_SPEED_REVERSE_STOPPED 0x80000000
|
||||
#define DVB_FRAME_RATE_MULTIPLIER 1000
|
||||
|
||||
#define VIDEO_FULL_SCREEN (VIDEO_CENTER_CUT_OUT+1)
|
||||
|
||||
#define DMX_FILTER_BY_PRIORITY_LOW 0x00010000 /* These flags tell the transport pes filter whether to filter */
|
||||
#define DMX_FILTER_BY_PRIORITY_HIGH 0x00020000 /* using the ts priority bit and, if so, whether to filter on */
|
||||
#define DMX_FILTER_BY_PRIORITY_MASK 0x00030000 /* bit set or bit clear */
|
||||
|
||||
/*
|
||||
* Extra events
|
||||
*/
|
||||
|
||||
#define VIDEO_EVENT_FIRST_FRAME_ON_DISPLAY 5 /*(VIDEO_EVENT_VSYNC+1)*/
|
||||
#define VIDEO_EVENT_FRAME_DECODED_LATE (VIDEO_EVENT_FIRST_FRAME_ON_DISPLAY+1)
|
||||
#define VIDEO_EVENT_DATA_DELIVERED_LATE (VIDEO_EVENT_FRAME_DECODED_LATE+1)
|
||||
#define VIDEO_EVENT_STREAM_UNPLAYABLE (VIDEO_EVENT_DATA_DELIVERED_LATE+1)
|
||||
#define VIDEO_EVENT_TRICK_MODE_CHANGE (VIDEO_EVENT_STREAM_UNPLAYABLE+1)
|
||||
#define VIDEO_EVENT_VSYNC_OFFSET_MEASURED (VIDEO_EVENT_TRICK_MODE_CHANGE+1)
|
||||
#define VIDEO_EVENT_FATAL_ERROR (VIDEO_EVENT_VSYNC_OFFSET_MEASURED+1)
|
||||
#define VIDEO_EVENT_OUTPUT_SIZE_CHANGED (VIDEO_EVENT_FATAL_ERROR+1)
|
||||
#define VIDEO_EVENT_FATAL_HARDWARE_FAILURE (VIDEO_EVENT_OUTPUT_SIZE_CHANGED+1)
|
||||
|
||||
/*
|
||||
* List of possible container types - used to select demux.. If stream_source is VIDEO_SOURCE_DEMUX
|
||||
* then default is TRANSPORT, if stream_source is VIDEO_SOURCE_MEMORY then default is PES
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
STREAM_TYPE_NONE, /* Deprecated */
|
||||
STREAM_TYPE_TRANSPORT,/* Use latest PTI driver so it can be Deprecated */
|
||||
STREAM_TYPE_PES,
|
||||
STREAM_TYPE_ES, /* Deprecated */
|
||||
STREAM_TYPE_PROGRAM, /* Deprecated */
|
||||
STREAM_TYPE_SYSTEM, /* Deprecated */
|
||||
STREAM_TYPE_SPU, /* Deprecated */
|
||||
STREAM_TYPE_NAVI, /* Deprecated */
|
||||
STREAM_TYPE_CSS, /* Deprecated */
|
||||
STREAM_TYPE_AVI, /* Deprecated */
|
||||
STREAM_TYPE_MP3, /* Deprecated */
|
||||
STREAM_TYPE_H264, /* Deprecated */
|
||||
STREAM_TYPE_ASF, /* Needs work so it can be deprecated */
|
||||
STREAM_TYPE_MP4, /* Deprecated */
|
||||
STREAM_TYPE_RAW /* Deprecated */
|
||||
} stream_type_t;
|
||||
|
||||
/*
|
||||
* List of possible video encodings - used to select frame parser and codec.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
VIDEO_ENCODING_AUTO,
|
||||
VIDEO_ENCODING_MPEG1,
|
||||
VIDEO_ENCODING_MPEG2,
|
||||
VIDEO_ENCODING_MJPEG,
|
||||
VIDEO_ENCODING_DIVX3,
|
||||
VIDEO_ENCODING_DIVX4,
|
||||
VIDEO_ENCODING_DIVX5,
|
||||
VIDEO_ENCODING_MPEG4P2,
|
||||
VIDEO_ENCODING_H264,
|
||||
VIDEO_ENCODING_WMV,
|
||||
VIDEO_ENCODING_VC1,
|
||||
VIDEO_ENCODING_RAW,
|
||||
VIDEO_ENCODING_H263,
|
||||
VIDEO_ENCODING_FLV1,
|
||||
VIDEO_ENCODING_VP6,
|
||||
VIDEO_ENCODING_RMV,
|
||||
VIDEO_ENCODING_DIVXHD,
|
||||
VIDEO_ENCODING_AVS,
|
||||
VIDEO_ENCODING_VP3,
|
||||
VIDEO_ENCODING_THEORA,
|
||||
VIDEO_ENCODING_COMPOCAP,
|
||||
VIDEO_ENCODING_NONE,
|
||||
VIDEO_ENCODING_PRIVATE
|
||||
} video_encoding_t;
|
||||
|
||||
|
||||
/*
|
||||
* List of possible audio encodings - used to select frame parser and codec.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
AUDIO_ENCODING_AUTO,
|
||||
AUDIO_ENCODING_PCM,
|
||||
AUDIO_ENCODING_LPCM,
|
||||
AUDIO_ENCODING_MPEG1,
|
||||
AUDIO_ENCODING_MPEG2,
|
||||
AUDIO_ENCODING_MP3,
|
||||
AUDIO_ENCODING_AC3,
|
||||
AUDIO_ENCODING_DTS,
|
||||
AUDIO_ENCODING_AAC,
|
||||
AUDIO_ENCODING_WMA,
|
||||
AUDIO_ENCODING_RAW,
|
||||
AUDIO_ENCODING_LPCMA,
|
||||
AUDIO_ENCODING_LPCMH,
|
||||
AUDIO_ENCODING_LPCMB,
|
||||
AUDIO_ENCODING_SPDIF, /*<! Data coming through SPDIF link :: compressed or PCM data */
|
||||
AUDIO_ENCODING_DTS_LBR,
|
||||
AUDIO_ENCODING_MLP,
|
||||
AUDIO_ENCODING_RMA,
|
||||
AUDIO_ENCODING_AVS,
|
||||
AUDIO_ENCODING_VORBIS,
|
||||
AUDIO_ENCODING_NONE,
|
||||
AUDIO_ENCODING_PRIVATE
|
||||
} audio_encoding_t;
|
||||
|
||||
/*
|
||||
* List of possible sources for SP/DIF output.
|
||||
*/
|
||||
typedef enum audio_spdif_source
|
||||
{
|
||||
AUDIO_SPDIF_SOURCE_PP, /*<! normal decoder output */
|
||||
AUDIO_SPDIF_SOURCE_DEC, /*<! decoder output w/o post-proc */
|
||||
AUDIO_SPDIF_SOURCE_ES, /*<! raw elementary stream data */
|
||||
} audio_spdif_source_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
} video_window_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DVB_DISCONTINUITY_SKIP = 0x01,
|
||||
DVB_DISCONTINUITY_CONTINUOUS_REVERSE = 0x02,
|
||||
DVB_DISCONTINUITY_SURPLUS_DATA = 0x04
|
||||
} dvb_discontinuity_t;
|
||||
|
||||
/*
|
||||
* audio discontinuity
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
AUDIO_DISCONTINUITY_SKIP = DVB_DISCONTINUITY_SKIP,
|
||||
AUDIO_DISCONTINUITY_CONTINUOUS_REVERSE = DVB_DISCONTINUITY_CONTINUOUS_REVERSE,
|
||||
AUDIO_DISCONTINUITY_SURPLUS_DATA = DVB_DISCONTINUITY_SURPLUS_DATA,
|
||||
} audio_discontinuity_t;
|
||||
|
||||
/*
|
||||
* video discontinuity
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
VIDEO_DISCONTINUITY_SKIP = DVB_DISCONTINUITY_SKIP,
|
||||
VIDEO_DISCONTINUITY_CONTINUOUS_REVERSE = DVB_DISCONTINUITY_CONTINUOUS_REVERSE,
|
||||
VIDEO_DISCONTINUITY_SURPLUS_DATA = DVB_DISCONTINUITY_SURPLUS_DATA,
|
||||
} video_discontinuity_t;
|
||||
|
||||
#define DVB_TIME_NOT_BOUNDED 0xfedcba9876543210ULL
|
||||
|
||||
typedef struct dvb_play_interval_s
|
||||
{
|
||||
unsigned long long start;
|
||||
unsigned long long end;
|
||||
} dvb_play_interval_t;
|
||||
|
||||
typedef dvb_play_interval_t video_play_interval_t;
|
||||
typedef dvb_play_interval_t audio_play_interval_t;
|
||||
|
||||
typedef struct dvb_play_time_s
|
||||
{
|
||||
unsigned long long system_time;
|
||||
unsigned long long presentation_time;
|
||||
unsigned long long pts;
|
||||
} dvb_play_time_t;
|
||||
|
||||
typedef dvb_play_time_t video_play_time_t;
|
||||
typedef dvb_play_time_t audio_play_time_t;
|
||||
|
||||
typedef struct dvb_play_info_s
|
||||
{
|
||||
unsigned long long system_time;
|
||||
unsigned long long presentation_time;
|
||||
unsigned long long pts;
|
||||
unsigned long long frame_count;
|
||||
} dvb_play_info_t;
|
||||
|
||||
typedef dvb_play_info_t video_play_info_t;
|
||||
typedef dvb_play_info_t audio_play_info_t;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
#define DVB_OPTION_VALUE_DISABLE 0
|
||||
#define DVB_OPTION_VALUE_ENABLE 1
|
||||
|
||||
DVB_OPTION_TRICK_MODE_AUDIO = 0,
|
||||
DVB_OPTION_PLAY_24FPS_VIDEO_AT_25FPS = 1,
|
||||
|
||||
#define DVB_OPTION_VALUE_VIDEO_CLOCK_MASTER 0
|
||||
#define DVB_OPTION_VALUE_AUDIO_CLOCK_MASTER 1
|
||||
#define DVB_OPTION_VALUE_SYSTEM_CLOCK_MASTER 2
|
||||
DVB_OPTION_MASTER_CLOCK = 2,
|
||||
|
||||
DVB_OPTION_EXTERNAL_TIME_MAPPING = 3,
|
||||
DVB_OPTION_EXTERNAL_TIME_MAPPING_VSYNC_LOCKED = 31,
|
||||
DVB_OPTION_AV_SYNC = 4,
|
||||
DVB_OPTION_DISPLAY_FIRST_FRAME_EARLY = 5,
|
||||
DVB_OPTION_VIDEO_BLANK = 6,
|
||||
DVB_OPTION_STREAM_ONLY_KEY_FRAMES = 7,
|
||||
DVB_OPTION_STREAM_SINGLE_GROUP_BETWEEN_DISCONTINUITIES = 8,
|
||||
DVB_OPTION_CLAMP_PLAYBACK_INTERVAL_ON_PLAYBACK_DIRECTION_CHANGE = 9,
|
||||
|
||||
#define DVB_OPTION_VALUE_PLAYOUT 0
|
||||
#define DVB_OPTION_VALUE_DISCARD 1
|
||||
DVB_OPTION_PLAYOUT_ON_TERMINATE = 10,
|
||||
DVB_OPTION_PLAYOUT_ON_SWITCH = 11,
|
||||
DVB_OPTION_PLAYOUT_ON_DRAIN = 12,
|
||||
|
||||
DVB_OPTION_VIDEO_ASPECT_RATIO = 13,
|
||||
DVB_OPTION_VIDEO_DISPLAY_FORMAT = 14,
|
||||
|
||||
#define DVB_OPTION_VALUE_TRICK_MODE_AUTO 0
|
||||
#define DVB_OPTION_VALUE_TRICK_MODE_DECODE_ALL 1
|
||||
#define DVB_OPTION_VALUE_TRICK_MODE_DECODE_ALL_DEGRADE_NON_REFERENCE_FRAMES 2
|
||||
#define DVB_OPTION_VALUE_TRICK_MODE_START_DISCARDING_NON_REFERENCE_FRAMES 3
|
||||
#define DVB_OPTION_VALUE_TRICK_MODE_DECODE_REFERENCE_FRAMES_DEGRADE_NON_KEY_FRAMES 4
|
||||
#define DVB_OPTION_VALUE_TRICK_MODE_DECODE_KEY_FRAMES 5
|
||||
#define DVB_OPTION_VALUE_TRICK_MODE_DISCONTINUOUS_KEY_FRAMES 6
|
||||
DVB_OPTION_TRICK_MODE_DOMAIN = 15,
|
||||
|
||||
#define DVB_OPTION_VALUE_DISCARD_LATE_FRAMES_NEVER 0
|
||||
#define DVB_OPTION_VALUE_DISCARD_LATE_FRAMES_ALWAYS 1
|
||||
#define DVB_OPTION_VALUE_DISCARD_LATE_FRAMES_AFTER_SYNCHRONIZE 2
|
||||
DVB_OPTION_DISCARD_LATE_FRAMES = 16,
|
||||
DVB_OPTION_VIDEO_START_IMMEDIATE = 17,
|
||||
DVB_OPTION_REBASE_ON_DATA_DELIVERY_LATE = 18,
|
||||
DVB_OPTION_REBASE_ON_FRAME_DECODE_LATE = 19,
|
||||
DVB_OPTION_LOWER_CODEC_DECODE_LIMITS_ON_FRAME_DECODE_LATE = 20,
|
||||
DVB_OPTION_H264_ALLOW_NON_IDR_RESYNCHRONIZATION = 21,
|
||||
DVB_OPTION_MPEG2_IGNORE_PROGESSIVE_FRAME_FLAG = 22,
|
||||
DVB_OPTION_AUDIO_SPDIF_SOURCE = 23,
|
||||
|
||||
DVB_OPTION_H264_ALLOW_BAD_PREPROCESSED_FRAMES = 24,
|
||||
DVB_OPTION_CLOCK_RATE_ADJUSTMENT_LIMIT_2_TO_THE_N_PARTS_PER_MILLION = 25, /* Value = N */
|
||||
DVB_OPTION_LIMIT_INPUT_INJECT_AHEAD = 26,
|
||||
|
||||
#define DVB_OPTION_VALUE_MPEG2_APPLICATION_MPEG2 0
|
||||
#define DVB_OPTION_VALUE_MPEG2_APPLICATION_ATSC 1
|
||||
#define DVB_OPTION_VALUE_MPEG2_APPLICATION_DVB 2
|
||||
DVB_OPTION_MPEG2_APPLICATION_TYPE = 27,
|
||||
|
||||
#define DVB_OPTION_VALUE_DECIMATE_DECODER_OUTPUT_DISABLED 0
|
||||
#define DVB_OPTION_VALUE_DECIMATE_DECODER_OUTPUT_HALF 1
|
||||
#define DVB_OPTION_VALUE_DECIMATE_DECODER_OUTPUT_QUARTER 2
|
||||
DVB_OPTION_DECIMATE_DECODER_OUTPUT = 28,
|
||||
|
||||
DVB_OPTION_PTS_FORWARD_JUMP_DETECTION_THRESHOLD = 29,
|
||||
DVB_OPTION_H264_TREAT_DUPLICATE_DPB_AS_NON_REFERENCE_FRAME_FIRST = 30,
|
||||
|
||||
DVB_OPTION_PIXEL_ASPECT_RATIO_CORRECTION = 32,
|
||||
|
||||
DVB_OPTION_H264_FORCE_PIC_ORDER_CNT_IGNORE_DPB_DISPLAY_FRAME_ORDERING = 33,
|
||||
|
||||
DVB_OPTION_PTS_SYMMETRIC_JUMP_DETECTION = 34,
|
||||
|
||||
DVB_OPTION_ALLOW_FRAME_DISCARD_AT_NORMAL_SPEED = 35,
|
||||
|
||||
/* OPTION_MAX must always be one greater than largest option - currently DVB_OPTION_ALLOW_FRAME_DISCARD_AT_NORMAL_SPEED */
|
||||
|
||||
DVB_OPTION_MAX = 35
|
||||
} dvb_option_t;
|
||||
|
||||
// Legacy typo correction
|
||||
#define DVP_OPTION_H264_FORCE_PIC_ORDER_CNT_IGNORE_DPB_DISPLAY_FRAME_ORDERING DVB_OPTION_H264_FORCE_PIC_ORDER_CNT_IGNORE_DPB_DISPLAY_FRAME_ORDERING
|
||||
|
||||
|
||||
typedef dvb_option_t video_option_t;
|
||||
|
||||
/* Decoder commands */
|
||||
#define VIDEO_CMD_PLAY (0)
|
||||
#define VIDEO_CMD_STOP (1)
|
||||
#define VIDEO_CMD_FREEZE (2)
|
||||
#define VIDEO_CMD_CONTINUE (3)
|
||||
#define VIDEO_CMD_SET_OPTION (4)
|
||||
#define VIDEO_CMD_GET_OPTION (5)
|
||||
|
||||
|
||||
/* Flags for VIDEO_CMD_FREEZE */
|
||||
#define VIDEO_CMD_FREEZE_TO_BLACK (1 << 0)
|
||||
|
||||
/* Flags for VIDEO_CMD_STOP */
|
||||
#define VIDEO_CMD_STOP_TO_BLACK (1 << 0)
|
||||
#define VIDEO_CMD_STOP_IMMEDIATELY (1 << 1)
|
||||
|
||||
/* Play input formats: */
|
||||
/* The decoder has no special format requirements */
|
||||
#define VIDEO_PLAY_FMT_NONE (0)
|
||||
/* The decoder requires full GOPs */
|
||||
#define VIDEO_PLAY_FMT_GOP (1)
|
||||
|
||||
/* ST specific video ioctls */
|
||||
#define VIDEO_SET_ENCODING _IO('o', 81)
|
||||
#define VIDEO_FLUSH _IO('o', 82)
|
||||
#define VIDEO_SET_SPEED _IO('o', 83)
|
||||
#define VIDEO_DISCONTINUITY _IO('o', 84)
|
||||
#define VIDEO_STEP _IO('o', 85)
|
||||
#define VIDEO_SET_PLAY_INTERVAL _IOW('o', 86, video_play_interval_t)
|
||||
#define VIDEO_SET_SYNC_GROUP _IO('o', 87)
|
||||
#define VIDEO_GET_PLAY_TIME _IOR('o', 88, video_play_time_t)
|
||||
#define VIDEO_GET_PLAY_INFO _IOR('o', 89, video_play_info_t)
|
||||
|
||||
/* ST specific audio ioctls */
|
||||
#define AUDIO_SET_ENCODING _IO('o', 70)
|
||||
#define AUDIO_FLUSH _IO('o', 71)
|
||||
#define AUDIO_SET_SPDIF_SOURCE _IO('o', 72)
|
||||
#define AUDIO_SET_SPEED _IO('o', 73)
|
||||
#define AUDIO_DISCONTINUITY _IO('o', 74)
|
||||
#define AUDIO_SET_PLAY_INTERVAL _IOW('o', 75, audio_play_interval_t)
|
||||
#define AUDIO_SET_SYNC_GROUP _IO('o', 76)
|
||||
#define AUDIO_GET_PLAY_TIME _IOR('o', 77, audio_play_time_t)
|
||||
#define AUDIO_GET_PLAY_INFO _IOR('o', 78, audio_play_info_t)
|
||||
|
||||
#endif /* H_DVB_STM_H */
|
99
libeplayer3/include/writer.h
Normal file
99
libeplayer3/include/writer.h
Normal file
@@ -0,0 +1,99 @@
|
||||
#ifndef WRITER_H_
|
||||
#define WRITER_H_
|
||||
|
||||
#include <sys/uio.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include "common.h"
|
||||
|
||||
typedef enum { eNone, eAudio, eVideo} eWriterType_t;
|
||||
typedef ssize_t (* WriteV_t)(int, const struct iovec *, int);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int fd;
|
||||
uint8_t *data;
|
||||
unsigned int len;
|
||||
uint64_t Pts;
|
||||
unsigned long long int Dts;
|
||||
uint8_t *private_data;
|
||||
unsigned int private_size;
|
||||
unsigned int FrameRate;
|
||||
unsigned int FrameScale;
|
||||
unsigned int Width;
|
||||
unsigned int Height;
|
||||
unsigned char Version;
|
||||
unsigned int InfoFlags;
|
||||
WriteV_t WriteV;
|
||||
} WriterAVCallData_t;
|
||||
|
||||
|
||||
|
||||
typedef struct WriterCaps_s
|
||||
{
|
||||
char *name;
|
||||
eWriterType_t type;
|
||||
char *textEncoding;
|
||||
/* fixme: revise if this is an enum! */
|
||||
int dvbEncoding; /* For sh4 */
|
||||
int dvbStreamType; /* For mipsel */
|
||||
int dvbCodecType; /* For mipsel */
|
||||
} WriterCaps_t;
|
||||
|
||||
typedef struct Writer_s
|
||||
{
|
||||
int (* reset)();
|
||||
int (* writeData)(WriterAVCallData_t *);
|
||||
WriterCaps_t *caps;
|
||||
} Writer_t;
|
||||
|
||||
extern Writer_t WriterAudioLPCM;
|
||||
extern Writer_t WriterAudioIPCM;
|
||||
extern Writer_t WriterAudioPCM;
|
||||
extern Writer_t WriterAudioMP3;
|
||||
extern Writer_t WriterAudioMPEGL3;
|
||||
extern Writer_t WriterAudioAC3;
|
||||
extern Writer_t WriterAudioEAC3;
|
||||
extern Writer_t WriterAudioAAC;
|
||||
extern Writer_t WriterAudioAACLATM;
|
||||
extern Writer_t WriterAudioAACPLUS;
|
||||
extern Writer_t WriterAudioDTS;
|
||||
extern Writer_t WriterAudioWMA;
|
||||
extern Writer_t WriterAudioWMAPRO;
|
||||
extern Writer_t WriterAudioFLAC;
|
||||
extern Writer_t WriterAudioVORBIS;
|
||||
extern Writer_t WriterAudioAMR;
|
||||
|
||||
extern Writer_t WriterVideoMPEG1;
|
||||
extern Writer_t WriterVideoMPEG2;
|
||||
extern Writer_t WriterVideoMPEG4;
|
||||
extern Writer_t WriterVideoMPEGH264;
|
||||
extern Writer_t WriterVideoH264;
|
||||
extern Writer_t WriterVideoDIVX3;
|
||||
extern Writer_t WriterVideoWMV;
|
||||
extern Writer_t WriterVideoDIVX;
|
||||
extern Writer_t WriterVideoFOURCC;
|
||||
extern Writer_t WriterVideoMSCOMP;
|
||||
extern Writer_t WriterVideoH263;
|
||||
extern Writer_t WriterVideoH265;
|
||||
extern Writer_t WriterVideoFLV;
|
||||
extern Writer_t WriterVideoVC1;
|
||||
extern Writer_t WriterVideoVP6;
|
||||
extern Writer_t WriterVideoVP8;
|
||||
extern Writer_t WriterVideoVP9;
|
||||
extern Writer_t WriterVideoMJPEG;
|
||||
extern Writer_t WriterFramebuffer;
|
||||
extern Writer_t WriterPipe;
|
||||
|
||||
Writer_t *getWriter(char *encoding);
|
||||
|
||||
Writer_t *getDefaultVideoWriter();
|
||||
Writer_t *getDefaultAudioWriter();
|
||||
ssize_t write_with_retry(int fd, const void *buf, int size);
|
||||
ssize_t writev_with_retry(int fd, const struct iovec *iov, int ic);
|
||||
|
||||
ssize_t WriteWithRetry(Context_t *context, int pipefd, int fd, void *pDVBMtx, const void *buf, int size);
|
||||
void FlushPipe(int pipefd);
|
||||
|
||||
ssize_t WriteExt(WriteV_t _call, int fd, void *data, size_t size);
|
||||
#endif
|
Reference in New Issue
Block a user