Page 1 of 1

shared memory

Posted: 10 May 2010 20:05
by sharo
Hi there,

I have a video filter which needs to communicate(share resources) with an output access module in VLC. Is there some guidelines in terms of thread communication and shared memory in VLC.

Any help will be greatly appreciated!

Thanks.

Re: shared memory

Posted: 11 May 2010 12:28
by Jean-Baptiste Kempf
You want to output data to memory from VLC or to VLC?

Re: shared memory

Posted: 11 May 2010 16:35
by sharo
I guess both: from a VLC thread to another VLC thread

My video filter is running on a separate thread and every once in a while it receives a message which needs to be forwarded to an output_access module. Note that both the video filter and the output_access module are running at the same time.

Any ideas ?

Re: shared memory

Posted: 11 May 2010 17:59
by Rémi Denis-Courmont
Whatever components starts the video filter and the access_out instances should provide them with a rendez-vous mechanism. VLC thread communications mechanisms are otherwise fairly standard: mutexes, condition variables, recursive mutexes, thread-specific variables, semaphores, spin locks.

Re: shared memory

Posted: 11 May 2010 18:37
by sharo
Hi Remi,

Thanks for your response.

Could you please give me an example of existing code that I can take a look at.

Re: shared memory

Posted: 12 May 2010 17:03
by sharo
Does anybody else have an idea about this.

Or if someone can point me to the right place within the VLC codebase - that will be greatly appreciated.

Thanks

Re: shared memory

Posted: 12 May 2010 19:31
by Rémi Denis-Courmont
You can use the audiobargraph audio and video filters as an example.