Mpeg PES added

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1872 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-09-08 20:48:02 +00:00
parent 7cb9ad6b11
commit fff46da0c3
5 changed files with 85 additions and 1 deletions

View File

@ -124,6 +124,8 @@ static int add_to_format(char *s, unsigned int *fourcc, unsigned int *fourccmap)
{"BGR16", IMGFMT_BGR|16},
{"BGR24", IMGFMT_BGR|24},
{"BGR32", IMGFMT_BGR|32},
{"MPES", IMGFMT_MPEGPES},
{NULL, 0}
};

View File

@ -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)

View File

@ -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

View File

@ -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");
}

70
libvo/vo_mpegpes.c Normal file
View File

@ -0,0 +1,70 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#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)
{
}