[MPlayer-dev-eng] PVA format demuxer

Gernot Ziegler gz at lysator.liu.se
Tue Sep 3 14:55:10 CEST 2002


Hej !

> If, as I think, it has to fill in the disp_w and disp_h fields, where
> can I obtain this information?
As soon as you start to fill libmpeg2 with data from the stream, it can
provide you with info on the format of the header.
This is what my rehacked mpeg2dec does (for texmpeg, a project of mine):

		  PSDEBUG2(printf("mpeg2_decode_data %p %p (diff:%d)\n",
tmp1, tmp2, tmp2-tmp1));
		  //fwrite(tmp1, 1, tmp2-tmp1, outstream);
		  num_frames = mpeg2_decode_data (mpeg2dec, tmp1, tmp2);

		  /* store back this information, to let the app process
know about it */
		  surface->mpeg_frametime = 10000.0f/

(float)frameratecode2framerate[mpeg2dec->picture->frame_rate_code];
		  surface->mpeg_framerate =
(float)frameratecode2framerate[mpeg2dec->picture->frame_rate_code];
		  surface->mpeg_width =
mpeg2dec->picture->coded_picture_width;
		  surface->mpeg_height =
mpeg2dec->picture->coded_picture_height;
		  surface->mpeg_bitrate = mpeg2dec->picture->bitrate /
16.0f;
		  //fprintf(stderr, "Internal w:%d, h:%d\n",
surface->mpeg_width, surface->mpeg_height);

Arpi does something similar, he uses his own version of libmpeg2, though;
look under
// ========= Read & process sequence header & extension ============

you find a call there named
	if(header_process_sequence_header (mpeg2dec->picture,
&videobuffer[4]))

that one extracts the data :-)

> As you may ask, the PVA file format has _no_ information at all about
> it, so the only place to get that information would be the video ES
> itself. So, is there any way to let the codec do the job?
>
> Thanks in advance.
> Matteo
>
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>

Servus,
  Gernot

/-----------------------------W-E-L-C-O-M-E------------------------------\
T                 The Austria <=> Sweden connection.....                 T
|                      E-Mail: gz at lysator.liu.se                         H
O                Homepage: http://www.lysator.liu.se/~gz                 E
\------------------------------F-U-T-U-R-E-------------------------------/




More information about the MPlayer-dev-eng mailing list