On 2009-09-08 at 13:53:39 [+0200], Michael Georgoulopoulos 
<[email protected]> wrote:
> This seems like the way to do it. Thanks!
> 
> I may not fully understand the method yet though, let me tell you what I 
> understood so far:
> 
> First I have to create a new ByteIOContext struct (ie a new struct for 
> every new file stream I want to load), which is going to represent my 
> open stream for the duration of the playback. Then call  init_put_byte() 
> to fill my ByteIOContext with my I/O routines. Finally call 
> av_open_input_stream() instead of av_open_input_file(), and pass it my 
> ByteIOContext. Then everything is the same.
> 
> The thing that I'm unsure of is when and how is my custom stream actually 
> opened. The ByteIOContext struct does not contain any function pointers 
> to stream open/close functions, so where do I do that?

You do that yourself, before and after using avformat. You pass an opaque 
handle to the init_put_byte() routine, so that you can keep track of or 
reference the object that you opened in the hook functions.

Best regards,
-Stephan
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to