From fff46da0c3619f8e042a8b0f54c6fa73f55395e1 Mon Sep 17 00:00:00 2001 From: arpi Date: Sat, 8 Sep 2001 20:48:02 +0000 Subject: Mpeg PES added git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1872 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/Makefile | 2 +- libvo/img_format.h | 9 +++++++ libvo/video_out.c | 3 +++ libvo/vo_mpegpes.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 libvo/vo_mpegpes.c (limited to 'libvo') diff --git a/libvo/Makefile b/libvo/Makefile index 91037be03d..bdcad4156c 100644 --- a/libvo/Makefile +++ b/libvo/Makefile @@ -3,7 +3,7 @@ include config.mak LIBNAME = libvo.a -SRCS=aclib.c osd.c font_load.c yuv2rgb.c video_out.c vo_null.c vo_pgm.c vo_md5.c vo_odivx.c x11_common.c $(OPTIONAL_SRCS) +SRCS=aclib.c osd.c font_load.c yuv2rgb.c video_out.c vo_null.c vo_pgm.c vo_md5.c vo_mpegpes.c vo_odivx.c x11_common.c $(OPTIONAL_SRCS) OBJS=$(SRCS:.c=.o) ifeq ($(TARGET_ARCH_X86),yes) diff --git a/libvo/img_format.h b/libvo/img_format.h index 7d5b9c6a30..0ff8eae610 100644 --- a/libvo/img_format.h +++ b/libvo/img_format.h @@ -50,5 +50,14 @@ #define IMGFMT_YUVP 0x50565559 #define IMGFMT_UYVP 0x50565955 +/* Compressed Formats */ +#define IMGFMT_MPEGPES (('M'<<24)|('P'<<16)|('E'<<8)|('S')) + +typedef struct { + void* data; + int size; + int id; // stream id. usually 0x1E0 + int timestamp; // pts, 90000 Hz counter based +} vo_mpegpes_t; #endif diff --git a/libvo/video_out.c b/libvo/video_out.c index bd9234b2fb..98d7848117 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -67,6 +67,7 @@ extern vo_functions_t video_out_svga; extern vo_functions_t video_out_png; extern vo_functions_t video_out_ggi; extern vo_functions_t video_out_aa; +extern vo_functions_t video_out_mpegpes; vo_functions_t* video_out_drivers[] = { @@ -118,6 +119,7 @@ vo_functions_t* video_out_drivers[] = &video_out_odivx, &video_out_pgm, &video_out_md5, + &video_out_mpegpes, NULL }; @@ -160,6 +162,7 @@ char *vo_format_name(int format) case IMGFMT_CLJR: return("Packed CLJR"); case IMGFMT_YUVP: return("Packed YUVP"); case IMGFMT_UYVP: return("Packed UYVP"); + case IMGFMT_MPEGPES: return("Mpeg PES"); } return("Unknown"); } diff --git a/libvo/vo_mpegpes.c b/libvo/vo_mpegpes.c new file mode 100644 index 0000000000..fd08823549 --- /dev/null +++ b/libvo/vo_mpegpes.c @@ -0,0 +1,70 @@ + +#include +#include +#include + +#include "config.h" +#include "video_out.h" +#include "video_out_internal.h" + +LIBVO_EXTERN (mpegpes) + +static vo_info_t vo_info = +{ + "Mpeg-PES file", + "mpgpes", + "A'rpi", + "" +}; + +static uint32_t +init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format) +{ + + return 0; +} + +static const vo_info_t* +get_info(void) +{ + return &vo_info; +} + +static void draw_osd(void) +{ +} + +static void flip_page (void) +{ +} + +static uint32_t draw_slice(uint8_t *srcimg[], int stride[], int w,int h,int x,int y) +{ + return 0; +} + + +static uint32_t draw_frame(uint8_t * src[]) +{ + + + return 0; +} + +static uint32_t +query_format(uint32_t format) +{ + if(format==IMGFMT_MPEGPES) return 1; + return 0; +} + +static void +uninit(void) +{ +} + + +static void check_events(void) +{ +} + -- cgit v1.2.3