[MPlayer-dev-eng] demuxer documentation

Alban Bedel albeu at free.fr
Mon Feb 18 09:56:56 CET 2002


Hi Charles Henrich,

on Sun, 17 Feb 2002 23:52:09 -0800 you wrote:

> > each stream found. A fill_buffer function, this one read a packet of data
> > (demux_packet_t) and put it the corresponding demuxer_stream (with
> > ds_add_packet) or throw it.  And finnally a seek function, wich take for
> > argument the demuxer, a float and an integer.  The float is usually a time
> > in seconds, the integer is some flags. bit 1 indicate that the given time is
> > absolute (relative to the begining), the bit 2 indicate that the float is
> > not a time but percentage (ie 0 is the begining and 1 is the end). Don't
> > forget to call resync_audio_stream once you seeked if you have an audio
> > stream. And think that you get your data from a stream wich is no always
> > seekable, so your demuxer shouldn't seek the stream.
> > 
> > Ok I hope it's enougth to get you started, also look the alredy existing
> > demuxer. The demux_audio is the simpler. By curiosity, wich format are you
> 
> Im modifying tv.c to properly handle audio.  Im having all sorts of troubles
> getting the audio encoders to act properly.  For example if I say -oac copy it
> appears to not actually ever do anything, because mux_a->timer never
> increments.  What causes this to increment in other muxers cases?
Dunno, but not the demuxer itself as far as I know.

> All im really doing is creating ds_add_packets()'s, but im not sure what to do
> with the members of the structure other than the buffer.  pts Im guessing is a
> frame counter, but not sure how its really used to set it properly, same iwth
> pos..  
You should create a packet of the wanted length with new_ds_packet.
Then copy your data in the buffer and send it with ds_add_packet. pts mean
packet timestamp I think. So it's a time relative to the begining of the stream,
but I don't know in wich unit, probably in sec. I guess the other fields are for the 
decoder but I'm also beginner with demuxers, I recommend you to look at 
DOCS/tech and search the mailling list.
	Albeu
	Albeu



More information about the MPlayer-dev-eng mailing list