[mplayerosx-devel] [PATCH] vo_macosx: use mmap instead of shmat for MPlayerOSX
nicolas.plourde at gmail.com
Thu Oct 23 12:11:19 CEST 2008
On 23-Oct-08, at 3:41 AM, Diego Biurrun wrote:
> On Wed, Oct 22, 2008 at 09:43:12PM -0400, Nicolas Plourde wrote:
>> On 12-Oct-08, at 5:32 PM, Adrian Stutz wrote:
>>> MPlayerOSX and vo_macosx use shmget and shmat for the internal video
>>> output to get the video image to the GUI process.
>>> OSX globally limits the shared memory to 4MB and if other
>>> already use shared memory mplayer fails to initialize vo_macosx.
>>> Steps to reproduce:
>>> Either make an application use up most of the shared memory or lower
>>> the limit using:
>>>> sudo sysctl -w kern.sysv.shmall=1
>>> (reset back to default with "sudo sysctl -w kern.sysv.shmall=1024")
>>> Then try to play a video with MPlayerOSX with the internal video
>>> Audio starts to play but there's no video. In the console following
>>> message gets repeated:
>>>> vo_mplayer shmget: : Cannot allocate memory
>>>> FATAL: Cannot initialize video driver.
>>> Solution (see attached patches):
>>> Use shm_open and mmap instead of shmget and shmat.
>>> This seems to be recommended by Apple over shmat and works even with
>>> the low limit set above.
>>> I'm not versed in this an made the patch mostly based on the example
>>> I've tested it on Leopard and will try to test it on Tiger next
>>> The idea of this patch comes from the bug report by Camillo Lists:
>> look good on 10.5 x86, I will apply in mplayerosx branch when its
>> commited to mplayer.
> You are the maintainer, so you need to commit it to MPlayer. When do
> you intend to do this?
Ulion is now maintainer of vo_macosx... Anyway I can commit right away
but I would like Adrian to test on tiger first.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2508 bytes
Desc: not available
More information about the mplayerosx-devel