libeplayer3-arm: cleanup types, use Context_t in commands

This commit is contained in:
max_10
2018-03-07 23:59:23 +01:00
committed by Thilo Graf
parent 71905680a6
commit cb275626b1
32 changed files with 195 additions and 183 deletions

View File

@@ -28,10 +28,13 @@ typedef enum
CONTAINER_GET_METADATA
} ContainerCmd_t;
struct Context_s;
typedef struct Context_s Context_t;
typedef struct Container_s
{
char *Name;
int (* Command)(/*Context_t*/void *, ContainerCmd_t, void *);
int (* Command)(Context_t *, ContainerCmd_t, void *);
char **Capabilities;
} Container_t;
@@ -43,7 +46,7 @@ typedef struct ContainerHandler_s
char *Name;
Container_t *selectedContainer;
int (* Command)(/*Context_t*/void *, ContainerCmd_t, void *);
int (* Command)(Context_t *, ContainerCmd_t, void *);
} ContainerHandler_t;
#endif

View File

@@ -4,6 +4,12 @@
#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,
@@ -54,11 +60,11 @@ typedef struct Track_s
int32_t aspect_ratio_den;
/* stream from ffmpeg */
void *stream;
AVStream *stream;
/* AVCodecContext for steam */
void *avCodecCtx;
/* codec extra data (header or some other stuff) */
void *extraData;
uint8_t *extraData;
int extraSize;
uint8_t *aacbuf;
@@ -88,10 +94,13 @@ typedef struct TrackDescription_s
int progressive;
} TrackDescription_t;
struct Context_s;
typedef struct Context_s Context_t;
typedef struct Manager_s
{
char *Name;
int (* Command)(/*Context_t*/void *, ManagerCmd_t, void *);
int (* Command)(Context_t *, ManagerCmd_t, void *);
char **Capabilities;
} Manager_t;

View File

@@ -64,11 +64,14 @@ typedef struct
char *type;
} SubtitleOut_t;
struct Context_s;
typedef struct Context_s Context_t;
typedef struct Output_s
{
char *Name;
int32_t (* Command)(/*Context_t*/void *, OutputCmd_t, void *);
int32_t (* Write)(/*Context_t*/void *, void *privateData);
int32_t (* Command)(Context_t *, OutputCmd_t, void *);
int32_t (* Write)(Context_t *, void *privateData);
char **Capabilities;
} Output_t;
@@ -81,7 +84,7 @@ typedef struct OutputHandler_s
Output_t *audio;
Output_t *video;
Output_t *subtitle;
int32_t (* Command)(/*Context_t*/void *, OutputCmd_t, void *);
int32_t (* Command)(Context_t *, OutputCmd_t, void *);
} OutputHandler_t;
#endif

View File

@@ -26,6 +26,9 @@ typedef enum {
PLAYBACK_METADATA
} PlaybackCmd_t;
struct Context_s;
typedef struct Context_s Context_t;
typedef struct PlaybackHandler_s
{
char *Name;
@@ -51,7 +54,7 @@ typedef struct PlaybackHandler_s
uint8_t isSubtitle;
uint8_t abortRequested;
int32_t (* Command)(/*Context_t*/void *, PlaybackCmd_t, void *);
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 */

View File

@@ -10,11 +10,11 @@ typedef enum { eNone, eAudio, eVideo} eWriterType_t;
typedef struct
{
int fd;
unsigned char *data;
uint8_t *data;
unsigned int len;
unsigned long long int Pts;
uint64_t Pts;
unsigned long long int Dts;
unsigned char *private_data;
uint8_t *private_data;
unsigned int private_size;
unsigned int FrameRate;
unsigned int FrameScale;
@@ -38,7 +38,7 @@ typedef struct WriterCaps_s
typedef struct Writer_s
{
int (* reset)();
int (* writeData)(void *);
int (* writeData)(WriterAVCallData_t *);
WriterCaps_t *caps;
} Writer_t;