## GstTocSetter

GstTocSetter — Element interface that allows setting and retrieval of the TOC

## Synopsis

    #include <gst/gst.h>

                        GstTocSetter;
    struct              GstTocSetterInterface;
    void                gst_toc_setter_set_toc              (GstTocSetter *setter,
                                                             GstToc *toc);
    GstToc *            gst_toc_setter_get_toc              (GstTocSetter *setter);
    void                gst_toc_setter_reset                (GstTocSetter *setter);

## Description

Element interface that allows setting of the TOC.

Elements that support some kind of chapters or editions (or tracks like in the FLAC cue sheet) will implement this interface.

If you just want to retrieve the TOC in your application then all you need to do is watch for TOC messages on your pipeline's bus (or you can perform TOC query). This interface is only for setting TOC data, not for extracting it. To set TOC from the application, find proper tocsetter element and set TOC using `gst_toc_setter_set_toc()`.

Elements implementing the GstTocSetter interface can extend existing TOC by getting extend UID for that (you can use `gst_toc_find_entry()` to retrieve it) with any TOC entries received from downstream.

## Details

### GstTocSetter

    typedef struct _GstTocSetter GstTocSetter;

Opaque GstTocSetter data structure.

### struct GstTocSetterInterface

    struct GstTocSetterInterface {
      GTypeInterface g_iface;

      /* signals */

      /* virtual table */
    };

GstTocSetterInterface interface.

GTypeInterface `g_iface`; | parent interface type.

### gst_toc_setter_set_toc ()

    void                gst_toc_setter_set_toc              (GstTocSetter *setter,
                                                             GstToc *toc);

Set the given TOC on the setter. Previously setted TOC will be unrefed before setting a new one.

`setter` : | a GstTocSetter.
`toc` : | a GstToc to set. [allow-none]

### gst_toc_setter_get_toc ()

    GstToc *            gst_toc_setter_get_toc              (GstTocSetter *setter);

Return current TOC the setter uses. The TOC should not be modified without making it writable first.

`setter` : | a GstTocSetter.
Returns : | TOC set, or NULL. Unref with `gst_toc_unref()` when no longer needed. [transfer full]

### gst_toc_setter_reset ()

    void                gst_toc_setter_reset                (GstTocSetter *setter);

Reset the internal TOC. Elements should call this from within the state-change handler.

`setter` : | a GstTocSetter.