[Ffmpeg-devel] reading data

tkoninck Thomas.Koninckx
Tue Apr 12 22:06:33 CEST 2005


Hi,

Sorry for asking again, but I'm really not getting out...
I try to get a pointer to the buffer which contains the compressed data,
and which if gradually written to an output stream, yields eventually
the correct mediafile. The reason is that I need to write the data
directly to a cd.

I tried to work with  get_buffer... but with very little succes so far.
(What contains exactly what and when it is valid in the ByteIOContext
struct, is rather unclear to me.). 

Alternatively  I worked similarly to what I found in ffserver:

url_open_dyn_packet_buf(&oc->pb, max_packet_size);
av_write_frame(oc, &pkt);
int len = url_close_dyn_buf(&oc->pb, (unsigned char **)(&pb_buffer));
fout.write(pb_buffer, len);

This however is not correct either. The file plays, and has something to
do with the input... but that's it. Every few frames a set of 'blocks'
appears, but in general the file is completely incorrect. (I added the
header the same way as above).


Does anyone has any hints how to do this? I  suppose I'm not the first
who needs something like this. 


Regards,
Thomas







More information about the ffmpeg-devel mailing list