![]() |
![]() |
![]() |
Pigment 0.3 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#include <pgm/pgm.h> enum PgmImageSinkEventMask; PgmImageSink; GstElement * pgm_image_sink_new (const gchar *name); PgmError pgm_image_sink_set_image (PgmImageSink *sink, PgmImage *image); PgmError pgm_image_sink_get_image (PgmImageSink *sink, PgmImage **image); PgmError pgm_image_sink_set_events (PgmImageSink *sink, PgmImageSinkEventMask events); PgmError pgm_image_sink_get_events (PgmImageSink *sink, PgmImageSinkEventMask *events);
GObject +----GstObject +----GstElement +----GstBaseSink +----GstVideoSink +----PgmImageSink
PgmImageSink is a GStreamer image sink element allowing to build GStreamer pipelines outputing frames directly to PgmImage.
You can explicitly use the pgm_image_sink_new()
function to instanciate a
new sink, but you can alos use the standard GStreamer functions using
gst_element_factory_make()
or gst_parse_launch()
, the factory name of the
sink being "pgmimagesink".
Internally, the sink is simply outputing GStreamer buffers (GstBuffer) to
images (PgmImage) using the pgm_image_set_from_gst_buffer()
function.
Last reviewed on 2008-01-28 (0.3.4)
typedef enum { PGM_IMAGE_SINK_MOTION = (1 << 0), PGM_IMAGE_SINK_PRESSED = (1 << 1), PGM_IMAGE_SINK_RELEASED = (1 << 2) } PgmImageSinkEventMask;
The event mask flags.
GstElement * pgm_image_sink_new (const gchar *name);
Creates a new image sink with the given name.
|
the name of the new image sink. |
Returns : |
a new PgmImageSink. |
PgmError pgm_image_sink_set_image (PgmImageSink *sink, PgmImage *image);
Sets image
as the PgmImage object which will receive the frames
(GstBuffer) outputed by sink
.
MT Safe.
|
a PgmImageSink object. |
|
the PgmImage object. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_image_sink_get_image (PgmImageSink *sink, PgmImage **image);
Retrieves the PgmImage object in image
which sink
is using to output its
frames (GstBuffer).
MT Safe.
|
a PgmImageSink object. |
|
a pointer to a PgmImage pointer where the image will be stored. Unref after usage. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_image_sink_set_events (PgmImageSink *sink, PgmImageSinkEventMask events);
Sets the mouse events interacting with the currently set image that will be sent upstream in the pipeline.
|
a PgmImageSink object. |
|
a PgmImageSinkEventMask. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_image_sink_get_events (PgmImageSink *sink, PgmImageSinkEventMask *events);
Retrieves in events
the mouse events sent upstream in the pipeline.
|
a PgmImageSink object. |
|
a PgmImageSinkEventMask pointer where the event mask will be stored. |
Returns : |
a PgmError indicating success/failure. |
"events"
property"events" PgmImageSinkEventMask : Read / Write
A PgmImageSinkEventMask specifying what input events should be sent upstream in the pipeline.