changeset 1376:d1fb303707d3

parse_es moved out from mplayer.c (it was included as .c file)
author arpi
date Sat, 21 Jul 2001 22:38:11 +0000
parents dbcb5b5e1fae
children bde3559c97f0
files Makefile parse_es.c parse_es.h
diffstat 3 files changed, 35 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Jul 21 22:37:55 2001 +0000
+++ b/Makefile	Sat Jul 21 22:38:11 2001 +0000
@@ -16,7 +16,7 @@
 #prefix = /usr/local
 BINDIR = ${prefix}/bin
 # BINDIR = /usr/local/bin
-SRCS = find_sub.c aviprint.c dec_audio.c dec_video.c aviwrite.c aviheader.c asfheader.c demux_avi.c demux_asf.c demux_mpg.c demuxer.c stream.c codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c lirc_mp.c cfgparser.c mixer.c dvdauth.c spudec.c $(STREAM_SRCS)
+SRCS = parse_es.c find_sub.c aviprint.c dec_audio.c dec_video.c aviwrite.c aviheader.c asfheader.c demux_avi.c demux_asf.c demux_mpg.c demuxer.c stream.c codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c lirc_mp.c cfgparser.c mixer.c dvdauth.c spudec.c $(STREAM_SRCS)
 OBJS = $(SRCS:.c=.o)
 CFLAGS = $(OPTFLAGS) -Iloader -Ilibvo $(CSS_INC) $(EXTRA_INC) # -Wall
 A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3 $(ALSA_LIB) $(ESD_LIB)
--- a/parse_es.c	Sat Jul 21 22:37:55 2001 +0000
+++ b/parse_es.c	Sat Jul 21 22:38:11 2001 +0000
@@ -1,14 +1,22 @@
-//=================== VIDEO PARSER =========================
+//=================== MPEG-ES VIDEO PARSER =========================
+
+#include <stdio.h>
+#include <stdlib.h>
+
+extern int verbose; // defined in mplayer.c
 
-#define MAX_VIDEO_PACKET_SIZE (224*1024+4)
-#define VIDEOBUFFER_SIZE 0x100000
+#include "config.h"
+
+#include "stream.h"
+#include "demuxer.h"
+
+#include "parse_es.h"
 
 //static unsigned char videobuffer[MAX_VIDEO_PACKET_SIZE];
-static unsigned char* videobuffer=NULL;
-static int videobuf_len=0;
-
-static unsigned char videobuf_code[4];
-static int videobuf_code_len=0;
+unsigned char* videobuffer=NULL;
+int videobuf_len=0;
+unsigned char videobuf_code[4];
+int videobuf_code_len=0;
 
 // sync video stream, and returns next packet code
 int sync_video_packet(demux_stream_t *ds){
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/parse_es.h	Sat Jul 21 22:38:11 2001 +0000
@@ -0,0 +1,18 @@
+
+#define MAX_VIDEO_PACKET_SIZE (224*1024+4)
+#define VIDEOBUFFER_SIZE 0x100000
+
+extern unsigned char* videobuffer;
+extern int videobuf_len;
+extern unsigned char videobuf_code[4];
+extern int videobuf_code_len;
+
+// sync video stream, and returns next packet code
+int sync_video_packet(demux_stream_t *ds);
+
+// return: packet length
+int read_video_packet(demux_stream_t *ds);
+
+// return: next packet code
+int skip_video_packet(demux_stream_t *ds);
+