Clapper.Harvest

g Clapper.Harvest Clapper.Harvest GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.Object->Clapper.Harvest

Subclasses:

None

Methods

Inherited:

Gst.Object (27), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

fill (media_type, data)

fill_with_bytes (media_type, bytes)

fill_with_text (media_type, text)

headers_set (key, value)

tags_add (tag, value)

toc_add (type, title, start, end)

Virtual Methods

Inherited:

Gst.Object (1), GObject.Object (7)

Properties

Inherited:

Gst.Object (2)

Signals

Inherited:

Gst.Object (1), GObject.Object (1)

Fields

Inherited:

Gst.Object (1), GObject.Object (1)

Class Details

class Clapper.Harvest(**kwargs)
Bases:

Gst.Object

Abstract:

No

Structure:

Clapper.HarvestClass

An object storing data from enhancers that implement [iface`Clapper`.Extractable] interface.

New in version 0.8.

fill(media_type, data)
Parameters:
  • media_type (str) – media mime type

  • data (bytes) – data to fill self

Returns:

True when filled successfully, False if taken data was empty.

Return type:

bool

Fill harvest with extracted data. It can be anything that GStreamer can parse and play such as single URI or a streaming manifest.

Calling again this function will replace previously filled content.

Commonly used media types are:

  • application/dash+xml

  • application/x-hls

  • text/uri-list

New in version 0.8.

fill_with_bytes(media_type, bytes)
Parameters:
Returns:

True when filled successfully, False if taken data was empty.

Return type:

bool

A convenience method to fill self with data from GLib.Bytes.

For more info, see [method`Clapper`.Harvest.fill] documentation.

New in version 0.8.

fill_with_text(media_type, text)
Parameters:
  • media_type (str) – media mime type

  • text (str) – data to fill self as None terminated string

Returns:

True when filled successfully, False if taken data was empty.

Return type:

bool

A convenience method to fill self using a None terminated string.

For more info, see [method`Clapper`.Harvest.fill] documentation.

New in version 0.8.

headers_set(key, value)
Parameters:

Set another header in the request headers list using GObject.Value.

Setting again the same key will update its value to the new one.

New in version 0.8.

tags_add(tag, value)
Parameters:

Append another tag into the tag list using GObject.Value.

New in version 0.8.

toc_add(type, title, start, end)
Parameters:

Append a chapter or track name into table of contents.

New in version 0.8.