#include <image_gstreamerinput.h>
Inheritance diagram for mimas::image_gstreamerinput< T >:
Public Member Functions | |
image_gstreamerinput (int _shmkey, int _semkey) throw (mimasexception) | |
Constructor. | |
virtual | ~image_gstreamerinput (void) |
Destructor. | |
virtual void | read (image< T > &image) throw (mimasexception) |
Read image from shared memory. | |
Protected Attributes | |
int | semkey |
Key to access semaphores. | |
int | shmkey |
Key to access shared memory. | |
int | semid |
Id of semaphores. | |
int | shmid |
Id of shared memory. | |
void * | shmem |
Pointer to shared memory. |
gstreamer is an ongoing project, which will provide programmers with access to arbitrary video sources under GNU/Linux. mimas comes with a gstreamer-plugin (mimasimagesink) and this class, which provides shared memory access to video-frames obtained by gstreamer.
Run examples/gstreamer/runMe to test gstreamer-input.
Definition at line 25 of file image_gstreamerinput.h.
mimas::image_gstreamerinput< T >::image_gstreamerinput | ( | int | _shmkey, | |
int | _semkey | |||
) | throw (mimasexception) |
Constructor.
The constructor requires a shared-memory-key and a semaphore-key to access the images provided by the plugin mimasimagesink. If the shared resources are not existing, an exception is issued.
_shmkey | Key to access shared memory. | |
_semkey | Key to access semaphores for synchronisation. |
virtual mimas::image_gstreamerinput< T >::~image_gstreamerinput | ( | void | ) | [virtual] |
Destructor.
virtual void mimas::image_gstreamerinput< T >::read | ( | image< T > & | image | ) | throw (mimasexception) [virtual] |
Read image from shared memory.
The image is read from shared memory. The semaphores are updated to allow the plugin to collect a new video-frame.
image | Object to store image in. |
Implements mimas::image_input< T >.
int mimas::image_gstreamerinput< T >::semkey [protected] |
int mimas::image_gstreamerinput< T >::shmkey [protected] |
int mimas::image_gstreamerinput< T >::semid [protected] |
int mimas::image_gstreamerinput< T >::shmid [protected] |
void* mimas::image_gstreamerinput< T >::shmem [protected] |