PgmImageSink

PgmImageSink — A GStreamer image sink outputing frames to image drawables.

Synopsis


#include <pgm/pgm.h>


                    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);


Object Hierarchy


  GObject
   +----GstObject
         +----GstElement
               +----GstBaseSink
                     +----GstVideoSink
                           +----PgmImageSink

Properties


  "image"                    PgmImage              : Read / Write

Description

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 GstBuffer to the PgmImage object using its pgm_image_set_from_gst_buffer() function.

Last reviewed on 2008-01-08 (0.3.2)

Details

PgmImageSink

typedef struct _PgmImageSink PgmImageSink;

The opaque PgmImageSink data structure.


pgm_image_sink_new ()

GstElement*         pgm_image_sink_new                  (const gchar *name);

Creates a new image sink with the given name.

name : the name of the new image sink.
Returns : a new PgmImageSink.

pgm_image_sink_set_image ()

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.

sink : a PgmImageSink object.
image : the PgmImage object.
Returns : a PgmError indicating success/failure.

pgm_image_sink_get_image ()

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.

sink : a PgmImageSink object.
image : a pointer to a PgmImage pointer where the image will be stored. Unref after usage.
Returns : a PgmError indicating success/failure.

Property Details

The "image" property

  "image"                    PgmImage              : Read / Write

A PgmImage on which the sink ouput video frames.

See Also

PgmImage