multifilesink

multifilesink — Write buffers to a sequentially named set of files

Synopsis

struct              GstMultiFileSink;

Object Hierarchy

  GObject
   +----GstObject
         +----GstElement
               +----GstBaseSink
                     +----GstMultiFileSink

Properties

  "location"                 gchar*                : Read / Write
  "index"                    gint                  : Read / Write
  "next-file"                GstMultiFileSinkNext  : Read / Write
  "post-messages"            gboolean              : Read / Write

Description

Write incoming data to a series of sequentially-named files.

The filename property should contain a string with a %d placeholder that will be substituted with the index for each filename.

If the "post-messages" property is TRUE, it sends an application message named "GstMultiFileSink" after writing each buffer.

The message's structure contains these fields:

  • gchar * "filename": the filename where the buffer was written.

  • gint "index": the index of the buffer.

  • GstClockTime "timestamp": the timestamp of the buffer.

  • GstClockTime "stream-time": the stream time of the buffer.

  • GstClockTime "running-time": the running_time of the buffer.

  • GstClockTime "duration": the duration of the buffer.

  • guint64 "offset": the offset of the buffer that triggered the message.

  • guint64 "offset-end": the offset-end of the buffer that triggered the message.

Example launch line

1
2
gst-launch audiotestsrc ! multifilesink
gst-launch videotestsrc ! multifilesink post-messages=true filename="frame%d"

Last reviewed on 2009-09-11 (0.10.17)

Synopsis

Element Information

plugin

multifile

author

David Schleef <ds@schleef.org>

class

Sink/File

Element Pads

name

sink

direction

sink

presence

always

details

ANY

Details

struct GstMultiFileSink

struct GstMultiFileSink;

Property Details

The "location" property

  "location"                 gchar*                : Read / Write

Location of the file to write.

Default value: NULL


The "index" property

  "index"                    gint                  : Read / Write

Index to use with location property to create file names. The index is incremented by one for each buffer written.

Allowed values: >= 0

Default value: 0


The "next-file" property

  "next-file"                GstMultiFileSinkNext  : Read / Write

When to start a new file.

Default value: New file for each buffer

Since 0.10.17


The "post-messages" property

  "post-messages"            gboolean              : Read / Write

Post a message on the GstBus for each file.

Default value: FALSE

Since 0.10.17

See Also

GstFileSrc