libeplayer3: cleanup, indent

This commit is contained in:
martii
2013-12-09 16:47:15 +01:00
parent f840fb0c60
commit 3df4924af5
5 changed files with 331 additions and 543 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -14,6 +14,5 @@ typedef struct Context_s {
ManagerHandler_t *manager; ManagerHandler_t *manager;
} Context_t; } Context_t;
int container_ffmpeg_update_tracks(Context_t * context, char *filename, int container_ffmpeg_update_tracks(Context_t * context, char *filename, int initial);
int initial);
#endif #endif

View File

@@ -26,8 +26,7 @@
#define VC1_VIDEO_PES_START_CODE 0xfd #define VC1_VIDEO_PES_START_CODE 0xfd
#define AAC_AUDIO_PES_START_CODE 0xcf #define AAC_AUDIO_PES_START_CODE 0xcf
int InsertPesHeader(unsigned char *data, int size, unsigned char stream_id, int InsertPesHeader(unsigned char *data, int size, unsigned char stream_id, unsigned long long int pts, int pic_start_code);
unsigned long long int pts, int pic_start_code);
int InsertVideoPrivateDataHeader(unsigned char *data, int payload_size); int InsertVideoPrivateDataHeader(unsigned char *data, int payload_size);
#endif #endif

View File

@@ -3,14 +3,15 @@
#include <sys/types.h> #include <sys/types.h>
typedef enum { PLAYBACK_OPEN, PLAYBACK_CLOSE, PLAYBACK_PLAY, PLAYBACK_STOP, typedef enum { PLAYBACK_OPEN, PLAYBACK_CLOSE, PLAYBACK_PLAY, PLAYBACK_STOP,
PLAYBACK_PAUSE, PLAYBACK_CONTINUE, PLAYBACK_FLUSH, PLAYBACK_TERM, PLAYBACK_PAUSE, PLAYBACK_CONTINUE, PLAYBACK_FLUSH, PLAYBACK_TERM,
PLAYBACK_FASTFORWARD, PLAYBACK_SEEK, PLAYBACK_SEEK_ABS, PLAYBACK_FASTFORWARD, PLAYBACK_SEEK, PLAYBACK_SEEK_ABS,
PLAYBACK_PTS, PLAYBACK_LENGTH, PLAYBACK_SWITCH_AUDIO, PLAYBACK_PTS, PLAYBACK_LENGTH, PLAYBACK_SWITCH_AUDIO,
PLAYBACK_SWITCH_SUBTITLE, PLAYBACK_INFO, PLAYBACK_SLOWMOTION, PLAYBACK_SWITCH_SUBTITLE, PLAYBACK_INFO, PLAYBACK_SLOWMOTION,
PLAYBACK_FASTBACKWARD, PLAYBACK_GET_FRAME_COUNT, PLAYBACK_FASTBACKWARD, PLAYBACK_GET_FRAME_COUNT,
PLAYBACK_SWITCH_TELETEXT, PLAYBACK_SWITCH_DVBSUBTITLE, PLAYBACK_SWITCH_TELETEXT, PLAYBACK_SWITCH_DVBSUBTITLE,
PLAYBACK_FRAMEBUFFER_LOCK, PLAYBACK_FRAMEBUFFER_LOCK,
PLAYBACK_FRAMEBUFFER_UNLOCK } PlaybackCmd_t; PLAYBACK_FRAMEBUFFER_UNLOCK
} PlaybackCmd_t;
typedef struct PlaybackHandler_s { typedef struct PlaybackHandler_s {
char *Name; char *Name;

View File

@@ -33,8 +33,7 @@ Style: Default,Arial,64,16777215,0,16777215,0,0,0,2,2,2,2,20,20,10,0\n\n\
[Events]\n\ [Events]\n\
Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\n\n\n" Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\n\n\n"
static inline unsigned char *text_to_ass(char *text, long long int pts, static inline unsigned char *text_to_ass(char *text, long long int pts, double duration)
double duration)
{ {
char buf[1024]; char buf[1024];
unsigned int x, pos = 0; unsigned int x, pos = 0;
@@ -64,9 +63,7 @@ static inline unsigned char *text_to_ass(char *text, long long int pts,
ec -= 6000 * em; ec -= 6000 * em;
es = ec / 100; es = ec / 100;
ec -= 100 * es; ec -= 100 * es;
snprintf(line, len, snprintf(line, len, "Dialogue: Marked=0,%d:%02d:%02d.%02d,%d:%02d:%02d.%02d,Default,NTP,0000,0000,0000,!Effect,%s\n", sh, sm, ss, sc, eh, em, es, ec, buf);
"Dialogue: Marked=0,%d:%02d:%02d.%02d,%d:%02d:%02d.%02d,Default,NTP,0000,0000,0000,!Effect,%s\n",
sh, sm, ss, sc, eh, em, es, ec, buf);
return (unsigned char *) line; return (unsigned char *) line;