shm interface problems
mattes
effemm at mykmk.com
Wed Jan 16 08:51:08 PST 2013
I am using shmpipe.c with shmalloc.c, pretty much emulating
what shmsink does.
I looked at the shmsink source. But i can't identify any kind of lock you
mentioned. Any pointers are appreciated.
Here is what I am doing:
threadA:
- create the listener interface.
spipe = sp_writer_create( udSocketName, shmbufLen, FILE_MODE );
- wait for incoming connections
readsocks = select(highsock+1, &socks, (fd_set *) 0, (fd_set *) 0, &timeout);
- start gstreamer encoding pipeline
- receive and prep incoming connection
sblock = sp_writer_alloc_block( spipe, shmbufLen );
shmBuf = sp_writer_block_get_buf( sblock );
to assign a single large shared memory buffer
- then use
rc = sp_writer_recv( spipe, client );
to monitor the connection
ThreadB:
- frame gets fed into shmsink via
memcpy ( shmBuf, frame, shmbufLen );
int nc = sp_writer_send_buf( spipe, shmBuf, shmbufLen );
As of now the 'sink' code supports only one connection at a time.
It is using one large shared memory buffer to have a more efficient
memory copy.
Mat
On Wed, 16 Jan 2013 09:23:15 -0500 Olivier Crête <olivier.crete at collabora.com>
wrote
> On Wed, 2013-01-16 at 00:34 -0800, mattes wrote:
> > Just wondering if anybody does run shm sink/src successfully on
> > Atom based platforms?
>
> We have, are you using shmpipe.c on your sink side? or the entier
> GStreamer element? If you're just using shmpipe.c, you must make sure
> your locking is correct. Otherwise, it sounds like an application
> problem, maybe run it in valgrind ?
>
> --
> Olivier Crête
> olivier.crete at collabora.com
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list