[MPlayer-dev-eng] vo_mpegpes_t->data format

Arpi arpi at thot.banki.hu
Tue Jul 15 19:01:37 CEST 2003


Hi,

> It's a slice layer decoder, so I need to extract some information from 
> the picture header myself and pass it to the driver.
> 
> Right now I'm trying to print the data I get as binary patterns, but it 
> doesn't match anything in the mpeg1/2 standard specification.
> 
> 
> When I try to dump the first 7 bytes of data i get when playing a DVD I get:
> 
> 00000000 00000001 00000000 00000000 00000000 00000000 10000000
> 
> or
> 
> 10110011 00000001 00000000 00000000 00010110 00010110 00010010
> 
> the first 4 bytes looks a bit like some start codes, just "reversed"
> picture start code 00000000 00000000 00000001 00000000
> sequence header code 00000000 00000000 00000001 10110011

dunno how did you got that result, but i'ev just patched vo_null to dump
first 24 bytes of each frame's raw data and i got correct result:

Starting playback...
 00 00 01 B3 2D 01 E0 24 17 ED 23 82 10 20 20 28 20 28 2C 28 28 2C 30 2C
 00 00 01 00 00 97 FF FB 80 00 00 00 00 00 01 B5 86 5F FB 9C 00 00 00 00
 00 00 01 00 00 5F FF FB B8 00 00 00 00 00 01 B5 85 55 5B 9C 00 00 00 00
 00 00 01 00 01 57 FF FB 80 00 00 00 00 00 01 B5 86 5F FB 9C 00 00 00 00
 00 00 01 00 00 DF FF FB B8 00 00 00 00 00 01 B5 85 55 5B 9C 00 00 00 00
 00 00 01 00 01 1F FF FB B8 00 00 00 00 00 01 B5 86 55 4B 9C 00 00 00 00
 00 00 01 00 02 17 FF FB 80 00 00 00 00 00 01 B5 86 5F FB 9C 00 00 00 00
 00 00 01 00 01 9F FF FB B8 00 00 00 00 00 01 B5 85 45 5B 9C 00 00 00 00
 00 00 01 00 01 DF FF FB B8 00 00 00 00 00 01 B5 86 55 4B 9C 00 00 00 00
 00 00 01 00 02 D7 FF FB 80 00 00 00 00 00 01 B5 86 5F FB 9C 00 00 00 00
 00 00 01 00 02 5F FF FB B8 00 00 00 00 00 01 B5 85 45 4B 9C 00 00 00 00
 00 00 01 00 02 9F FF FB B8 00 00 00 00 00 01 B5 85 54 4B 9C 00 00 00 00
 00 00 01 00 03 97 FF FB 80 00 00 00 00 00 01 B5 85 5F FB 9C 00 00 00 00
 00 00 01 00 03 1F FF FB B8 00 00 00 00 00 01 B5 83 45 5B 9C 00 00 00 00
 00 00 01 00 03 5F FF FB B8 00 00 00 00 00 01 B5 85 54 4B 9C 00 00 00 00
 00 00 01 B3 2D 01 E0 24 17 ED 23 82 10 20 20 28 20 28 2C 28 28 2C 30 2C
 00 00 01 00 00 1F FF FB B8 00 00 00 00 00 01 B5 83 45 4B 9C 00 00 00 00
 00 00 01 00 00 5F FF FB B8 00 00 00 00 00 01 B5 83 43 4B 9C 00 00 00 00

and anyway it must be correct as if i send it to the dvb card it displays it
fine.

here is the patched vo_null.c fyi:

Index: vo_null.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_null.c,v
retrieving revision 1.12
diff -u -r1.12 vo_null.c
--- vo_null.c	11 Nov 2002 15:20:26 -0000	1.12
+++ vo_null.c	15 Jul 2003 17:00:40 -0000
@@ -39,7 +39,7 @@
 
 LIBVO_EXTERN(null)
 
-static uint32_t image_width, image_height;
+static uint32_t image_width, image_height, image_format;
 
 //static uint32_t
 static uint32_t draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y)
@@ -60,6 +60,16 @@
 static uint32_t
 draw_frame(uint8_t *src[])
 {
+	if(image_format==IMGFMT_MPEGPES){
+	    // mpeg-pes
+	    vo_mpegpes_t* pack=src[0];
+	    int len= (pack->size < 24) ? pack->size : 24;
+	    unsigned char* data=pack->data;
+	    int i;
+	    for(i=0;i<len;i++)
+		printf(" %02X",data[i]);
+	    printf("\n");
+	}
 	return 0;
 }
 
@@ -74,6 +84,7 @@
 {
 	image_width = width;
 	image_height = height;
+	image_format = format;
 	return 0;
 }
 


A'rpi / Astral & ESP-team

--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list