GstFakeSrc

GstFakeSrc — Push empty (no data) buffers around

Synopsis


#include <gst/elements/gstfakesrc.h>


            GstFakeSrc;
enum        GstFakeSrcDataType;
enum        GstFakeSrcFillType;
enum        GstFakeSrcOutputType;
enum        GstFakeSrcSizeType;


Object Hierarchy


  GObject
   +----GstObject
         +----GstElement
               +----GstBaseSrc
                     +----GstFakeSrc

Properties


  "can-activate-pull"    gboolean              : Read / Write / Construct
  "can-activate-push"    gboolean              : Read / Write / Construct
  "data"                 GstFakeSrcData        : Read / Write
  "datarate"             gint                  : Read / Write
  "dump"                 gboolean              : Read / Write
  "filltype"             GstFakeSrcFillType    : Read / Write
  "is-live"              gboolean              : Read / Write / Construct
  "last-message"         gchararray            : Read
  "parentsize"           gint                  : Read / Write
  "pattern"              gchararray            : Read / Write
  "signal-handoffs"      gboolean              : Read / Write
  "silent"               gboolean              : Read / Write
  "sizemax"              gint                  : Read / Write
  "sizemin"              gint                  : Read / Write
  "sizetype"             GstFakeSrcSizeType    : Read / Write
  "sync"                 gboolean              : Read / Write

Signal Prototypes


"handoff"   void        user_function      (GstFakeSrc *fakesrc,
                                            GstBuffer buffer,
                                            GstPad *pad,
                                            gpointer user_data);

Description

Dummy source that generates empty buffers.

Details

GstFakeSrc

typedef struct _GstFakeSrc GstFakeSrc;


enum GstFakeSrcDataType

typedef enum {
  FAKE_SRC_DATA_ALLOCATE = 1,
  FAKE_SRC_DATA_SUBBUFFER
} GstFakeSrcDataType;


enum GstFakeSrcFillType

typedef enum {
  FAKE_SRC_FILLTYPE_NOTHING = 1,
  FAKE_SRC_FILLTYPE_ZERO,
  FAKE_SRC_FILLTYPE_RANDOM,
  FAKE_SRC_FILLTYPE_PATTERN,
  FAKE_SRC_FILLTYPE_PATTERN_CONT
} GstFakeSrcFillType;


enum GstFakeSrcOutputType

typedef enum {
  FAKE_SRC_FIRST_LAST_LOOP = 1,
  FAKE_SRC_LAST_FIRST_LOOP,
  FAKE_SRC_PING_PONG,
  FAKE_SRC_ORDERED_RANDOM,
  FAKE_SRC_RANDOM,
  FAKE_SRC_PATTERN_LOOP,
  FAKE_SRC_PING_PONG_PATTERN,
  FAKE_SRC_GET_ALWAYS_SUCEEDS
} GstFakeSrcOutputType;


enum GstFakeSrcSizeType

typedef enum {
  FAKE_SRC_SIZETYPE_EMPTY = 1,
  FAKE_SRC_SIZETYPE_FIXED,
  FAKE_SRC_SIZETYPE_RANDOM
} GstFakeSrcSizeType;

Properties

The "can-activate-pull" property

  "can-activate-pull"    gboolean              : Read / Write / Construct

Can activate in pull mode.

Default value: TRUE


The "can-activate-push" property

  "can-activate-push"    gboolean              : Read / Write / Construct

Can activate in push mode.

Default value: TRUE


The "data" property

  "data"                 GstFakeSrcData        : Read / Write

Data allocation method.

Default value: Allocate data


The "datarate" property

  "datarate"             gint                  : Read / Write

Timestamps buffers with number of bytes per second (0 = none).

Allowed values: >= 0

Default value: 0


The "dump" property

  "dump"                 gboolean              : Read / Write

Dump produced bytes to stdout.

Default value: FALSE


The "filltype" property

  "filltype"             GstFakeSrcFillType    : Read / Write

How to fill the buffer, if at all.

Default value: Fill buffers with zeros


The "is-live" property

  "is-live"              gboolean              : Read / Write / Construct

True if the element cannot produce data in PAUSED.

Default value: FALSE


The "last-message" property

  "last-message"         gchararray            : Read

The last status message.

Default value: NULL


The "parentsize" property

  "parentsize"           gint                  : Read / Write

Size of parent buffer for sub-buffered allocation.

Allowed values: >= 0

Default value: 40960


The "pattern" property

  "pattern"              gchararray            : Read / Write

pattern.

Default value: NULL


The "signal-handoffs" property

  "signal-handoffs"      gboolean              : Read / Write

Send a signal before pushing the buffer.

Default value: FALSE


The "silent" property

  "silent"               gboolean              : Read / Write

Don't produce last_message events.

Default value: FALSE


The "sizemax" property

  "sizemax"              gint                  : Read / Write

Maximum buffer size.

Allowed values: >= 0

Default value: 4096


The "sizemin" property

  "sizemin"              gint                  : Read / Write

Minimum buffer size.

Allowed values: >= 0

Default value: 0


The "sizetype" property

  "sizetype"             GstFakeSrcSizeType    : Read / Write

How to determine buffer sizes.

Default value: Send empty buffers


The "sync" property

  "sync"                 gboolean              : Read / Write

Sync to the clock to the datarate.

Default value: FALSE

Signals

The "handoff" signal

void        user_function                  (GstFakeSrc *fakesrc,
                                            GstBuffer buffer,
                                            GstPad *pad,
                                            gpointer user_data);

This signal gets emitted before sending the buffer.

fakesrc : the fakesrc instance
buffer : the buffer that will be pushed
pad : the pad that will sent it
user_data : user data set when the signal handler was connected.

See Also

GstFakeSink