GtuberManifestGenerator

GtuberManifestGenerator — generates adaptive streams manifest from media info

Functions

Properties

guint indent Read / Write
GtuberAdaptiveStreamManifest manifest-type Read / Write
gboolean pretty Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GtuberManifestGenerator

Description

Functions

GtuberAdaptiveStreamFilter ()

gboolean
(*GtuberAdaptiveStreamFilter) (GtuberAdaptiveStream *stream,
                               gpointer user_data);

A function to be used with gtuber_manifest_generator_set_filter_func() in order to get a manifest only with streams that match certain criteria.

Parameters

stream

a GtuberAdaptiveStream to check

 

user_data

the user data that has been passed on.

[nullable]

Returns

TRUE if adaptive stream should be added, FALSE otherwise


gtuber_manifest_generator_new ()

GtuberManifestGenerator *
gtuber_manifest_generator_new (void);

Creates a new GtuberManifestGenerator instance.

Returns

a new GtuberManifestGenerator instance.

[transfer full]


gtuber_manifest_generator_get_pretty ()

gboolean
gtuber_manifest_generator_get_pretty (GtuberManifestGenerator *gen);

Parameters

Returns

TRUE if pretty printing is enabled, FALSE otherwise.


gtuber_manifest_generator_set_pretty ()

void
gtuber_manifest_generator_set_pretty (GtuberManifestGenerator *gen,
                                      gboolean pretty);

Sets the pretty printing mode.

Parameters

gen

a GtuberManifestGenerator

 

pretty

TRUE to enable pretty printing, FALSE otherwise

 

gtuber_manifest_generator_get_indent ()

guint
gtuber_manifest_generator_get_indent (GtuberManifestGenerator *gen);

Parameters

Returns

amount of indent in spaces for prettifying.


gtuber_manifest_generator_set_indent ()

void
gtuber_manifest_generator_set_indent (GtuberManifestGenerator *gen,
                                      guint indent);

gtuber_manifest_generator_get_manifest_type ()

GtuberAdaptiveStreamManifest
gtuber_manifest_generator_get_manifest_type
                               (GtuberManifestGenerator *gen);

Parameters

Returns

a GtuberAdaptiveStreamManifest representing requested type of the manifest to generate.


gtuber_manifest_generator_set_manifest_type ()

void
gtuber_manifest_generator_set_manifest_type
                               (GtuberManifestGenerator *gen,
                                GtuberAdaptiveStreamManifest type);

Sets the adaptive stream manifest type to use for generation.

Generator will only try to generate data of the requested type. Adaptive streams array must include streams supporting this type for generation to be successful.

Setting this option to GTUBER_ADAPTIVE_STREAM_MANIFEST_UNKNOWN, results in auto behavior (i.e. any possible manifest type will be generated). Do that if your app does not distinguish (supports all) types.


gtuber_manifest_generator_set_media_info ()

void
gtuber_manifest_generator_set_media_info
                               (GtuberManifestGenerator *gen,
                                GtuberMediaInfo *info);

Set media info used to generate the manifest data. Generator will take a reference on the passed media info object.

Parameters


gtuber_manifest_generator_set_filter_func ()

void
gtuber_manifest_generator_set_filter_func
                               (GtuberManifestGenerator *gen,
                                GtuberAdaptiveStreamFilter filter,
                                gpointer user_data,
                                GDestroyNotify destroy);

Sets the GtuberAdaptiveStream filtering function.

The filter function will be called for each GtuberAdaptiveStream that generator considers adding during manifest generation.

Parameters

gen

a GtuberManifestGenerator

 

filter

the filter function to use.

[nullable]

user_data

user data passed to the filter function.

[nullable]

destroy

destroy notifier for user_data .

[nullable]

gtuber_manifest_generator_to_data ()

gchar *
gtuber_manifest_generator_to_data (GtuberManifestGenerator *gen);

Generates manifest data from GtuberMediaInfo currently set in GtuberManifestGenerator and returns it as a buffer.

Parameters

Returns

a newly allocated string holding manifest data.

[transfer full]


gtuber_manifest_generator_to_file ()

gboolean
gtuber_manifest_generator_to_file (GtuberManifestGenerator *gen,
                                   const gchar *filename,
                                   GError **error);

Generates manifest data from GtuberMediaInfo currently set in GtuberManifestGenerator and puts it inside filename, overwriting the file's current contents.

This operation is atomic, in the sense that the data is written to a temporary file which is then renamed to the given filename.

Parameters

gen

a GtuberManifestGenerator

 

filename

the path to the target file.

[type filename]

error

return location for a GError, or NULL

 

Returns

TRUE if saving was successful, FALSE otherwise.


gtuber_manifest_generator_error_quark ()

GQuark
gtuber_manifest_generator_error_quark (void);

Types and Values

GTUBER_MANIFEST_GENERATOR_ERROR

#define GTUBER_MANIFEST_GENERATOR_ERROR           (gtuber_manifest_generator_error_quark ())

GtuberManifestGenerator

typedef struct _GtuberManifestGenerator GtuberManifestGenerator;

Gtuber manifest generator

Property Details

The “indent” property

  “indent”                   guint

Amount of spaces used for indent.

Owner: GtuberManifestGenerator

Flags: Read / Write

Default value: 0


The “manifest-type” property

  “manifest-type”            GtuberAdaptiveStreamManifest

The manifest type to generate.

Owner: GtuberManifestGenerator

Flags: Read / Write

Default value: GTUBER_ADAPTIVE_STREAM_MANIFEST_UNKNOWN


The “pretty” property

  “pretty”                   gboolean

Apply new lines and indentation to manifests that support them.

Owner: GtuberManifestGenerator

Flags: Read / Write

Default value: FALSE