[FFmpeg-devel] NC4600 camera code
Fri Jan 9 01:04:29 CET 2009
> nicolas martin wrote:
>> Hi there,
>> It's been a long time, but I have been working on my demuxer for my
>> I put all my code in a separate file.
>> However I have a problem.
>> I've seen that you can have a private structure in the priv_data
>> of an AVFormatContext.
>> So I put all my private fields here.
>> But I have to modify the standard get_partial_buffer
> This is a sign that you are doing something wrong.
> You should explain why you need a modified version of
> and then someone may explain you how avoiding it.
>> So I made one myself that takes a pointer on my structure as an
>> But If I want to use standard functions like fill_buffer defined in
>> aviobuf.c, which file should I included ???
> fill_buffer is static in aviobuf.c so you can't use it outside
> aviobuf.c. If you really need to implement modified version
> of get_partial_buffer, you have to do it inside aviobuf.c,
> but I'm pretty sure you don't need to do this.
in get_partial_buffer, when you read a new chunk of data, at most
[size] bytes are copied to the destination buffer.
but the video feed contains header that tells the size of the next
frame, so it's not at most [size] bytes that should be copied, but the
difference between how much is to be read until next frame and how
much has already been copied.
if I let get_partial_buffer copy [size] bytes, then it means, I
sometimes will have to concatenate a chunk of that buffer, to another
piece returned by get_partial_buffer. It's twice as much memory that
should be reserved...
maybe it's the way to go...
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
More information about the ffmpeg-devel