# hlssink2

HTTP Live Streaming sink

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstBin
                        ╰──hlssink2

## Implemented interfaces

    GstChildProxy

## Factory details

Authors: – Alessandro Decina , Sebastian Dröge

Classification: – `Sink`

Rank – none

Plugin – hls

Package – GStreamer Bad Plug-ins

## Pad Templates

### `audio`

    ANY

Presence – request

Direction – sink

Object type – GstPad

### `video`

    ANY

Presence – request

Direction – sink

Object type – GstPad

## Signals

### delete-fragment

    delete_fragment_callback (GstElement * sink,
                              gchararray location,
                              gpointer udata)

    def delete_fragment_callback (sink, location, udata):
        #python callback for the 'delete-fragment' signal

    function delete_fragment_callback(sink: GstElement * sink, location: gchararray location, udata: gpointer udata): {
        // javascript callback for the 'delete-fragment' signal
    }

Requests deletion of an old fragment file that is not needed anymore.

Parameters:

`sink` –

the GstHlsSink2

`location` –

Location for the fragment file to delete

`udata` –
No description available

Flags: Run Last

Since : 1.18

### get-fragment-stream

    GOutputStream *
    get_fragment_stream_callback (GstElement * sink,
                                  gchararray location,
                                  gpointer udata)

    def get_fragment_stream_callback (sink, location, udata):
        #python callback for the 'get-fragment-stream' signal

    function get_fragment_stream_callback(sink: GstElement * sink, location: gchararray location, udata: gpointer udata): {
        // javascript callback for the 'get-fragment-stream' signal
    }

Parameters:

`sink` –

the GstHlsSink2

`location` –

Location for the fragment file

`udata` –
No description available
Returns ( GOutputStream * ) –

GOutputStream for writing the fragment file.

Flags: Run Last

Since : 1.18

### get-playlist-stream

    GOutputStream *
    get_playlist_stream_callback (GstElement * sink,
                                  gchararray location,
                                  gpointer udata)

    def get_playlist_stream_callback (sink, location, udata):
        #python callback for the 'get-playlist-stream' signal

    function get_playlist_stream_callback(sink: GstElement * sink, location: gchararray location, udata: gpointer udata): {
        // javascript callback for the 'get-playlist-stream' signal
    }

Parameters:

`sink` –

the GstHlsSink2

`location` –

Location for the playlist file

`udata` –
No description available
Returns ( GOutputStream * ) –

GOutputStream for writing the playlist file.

Flags: Run Last

Since : 1.18

## Properties

### location

    “location” gchararray

Location of the file to write

Flags : Read / Write

Default value : segment%%05d.ts

### max-files

    “max-files” guint

Maximum number of files to keep on disk. Once the maximum is reached,old files start to be deleted to make room for new ones.

Flags : Read / Write

Default value : 10

### playlist-length

    “playlist-length” guint

Length of HLS playlist. To allow players to conform to section 6.3.3 of the HLS specification, this should be at least 3. If set to 0, the playlist will be infinite.

Flags : Read / Write

Default value : 5

### playlist-location

    “playlist-location” gchararray

Location of the playlist to write

Flags : Read / Write

Default value : playlist.m3u8

### playlist-root

    “playlist-root” gchararray

Location of the playlist to write

Flags : Read / Write

Default value : NULL

### send-keyframe-requests

    “send-keyframe-requests” gboolean

Send keyframe requests to ensure correct fragmentation. If this is disabled then the input must have keyframes in regular intervals

Flags : Read / Write

Default value : true

### target-duration

    “target-duration” guint

The target duration in seconds of a segment/file. (0 - disabled, useful for management of segment duration by the streaming server)

Flags : Read / Write

Default value : 15

The results of the search are