|---------+------------------------------->
|         |           Stephan Assmus      |
|         |           <[email protected]>|
|         |           Sent by:            |
|         |           libav-user-boun...@m|
|         |           playerhq.hu         |
|         |                               |
|         |                               |
|         |           09/29/2009 03:19 PM |
|         |           Please respond to   |
|         |           Libav* user         |
|         |           questions and       |
|         |           discussions         |
|         |                               |
|---------+------------------------------->
  
>------------------------------------------------------------------------------------------------------------------------------|
  |                                                                             
                                                 |
  |       To:       Libav* user questions and discussions 
<[email protected]>                                              |
  |       cc:                                                                   
                                                 |
  |       Subject:  Re: [libav-user] Multistream with FFMPEG !!                 
                                                 |
  
>------------------------------------------------------------------------------------------------------------------------------|









On 2009-09-27 at 01:38:27 [+0200], Michael Conrad <[email protected]>

wrote:
> On Fri, 25 Sep 2009 08:58:48 -0400, <[email protected]> wrote:
> > Hi to all,
> > I'm realizing an application to displaying more than one MPEG4 network
> > streaming. I used ffmpeg library to decode the streaming, but if  I try

> > to decode two streams in  the same time, it doesn't work fine. Is it
> > possible to use ffmpeg libraries to make this kind of application ?
>
> It works fine if you use only one thread.  In order to have multiple
> threads each decoding their own stream, you need to synchronize access to

> several functions.  One important one is "avcodec_open".  Search this
> list to find more details.

I've tried to find a way to search this list, but could not find one from
the link at the bottom of every mail to this list.

In any case, I've looked into the code, so far it seems the "lockmgr"
callback is indeed only used when opening or closing codecs. What other
calls are not thread-safe? In my application, I am decoding in one thread
per stream, but I am using completely independent AVFormatContext and
AVCodecContext instances per thread (i.e. calling av_open_input_stream()
not per file, but per every stream of the file). Each of my threads is
setup to ignore all the packets of any other stream. Therefor I can read
and decode each stream completely independent from each other. However, I
don't protect calls into the library by any locks, since I figured it is
re-entrant (demuxer and decoder data is completely contained within the
contexts, or so I hope). I do make sure that av_register_all() is only
called once. What other potential pitfalls should I be aware of?

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






Help save paper - do you need to print this email ? 
     
This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual(s) or entity addressed above. If you are 
not the intended recipient of this e-mail, then (i) please notify us at 
[email protected] (ii) do not use the information contained  & 
(iii) delete it from your system . E-mail communications are not secure. Though 
efforts have been taken to ensure that this communication has not been tampered 
with; however,  Canon India Pvt Ltd. is not responsible for any changes made to 
the contents of or any attachments to this message without its consent. 
All information contained in this message which are not of an official nature 
shall not be deemed as given or endorsed by Canon India Pvt. Ltd.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to