gstlal_frhistory

gstlal_frhistory — GValue type for holding FrHistory information.

Functions

Types and Values

Object Hierarchy

    GBoxed
    ╰── GstLALFrHistory

Includes

#include <gstlal/gstlal_frhistory.h>

Description

GstLALFrHistory is a GValue type that carries a name, a timestamp and a comment.

Functions

gstlal_frhistory_new ()

GstLALFrHistory *
gstlal_frhistory_new (const gchar *name);

Creates a new GstLALFrHistory object. The object returned should be freed with gstlal_frhistory_free().

Parameters

name

The name to give the new GstLALFrHistory. The calling code retains ownership of the string.

[transfer none]

Returns

A new GstLALFrHistory. Free with gstlal_frhistory_free().

[transfer full]


gstlal_frhistory_copy ()

GstLALFrHistory *
gstlal_frhistory_copy (const GstLALFrHistory *self);

Creates a deep copy of the GstLALFrHistory object self .

Parameters

self

GstLALFrHistory object to copy.

[transfer none]

Returns

A new GstLALFrHistory. Free with gstlal_frhistory_free().

[transfer full]


gstlal_frhistory_to_string ()

gchar *
gstlal_frhistory_to_string (const GstLALFrHistory *self);

Creates a human-readable string representation of the contents of a GstLALFrHistory object.

Parameters

self

GstLALFrHistory object to represent as a string.

[transfer none]

Returns

A newly-allocated string holding the result. Free with g_free().

[transfer full]


gstlal_frhistory_set_timestamp ()

void
gstlal_frhistory_set_timestamp (GstLALFrHistory *self,
                                GstClockTime time);

FrHistory objects can only store 32-bit integer second timestamps. This function adapts GStreamer's native 64-bit integer nanosecond timestamps to a value suitable for an FrHistory by truncating to the largest integer second not greater than the timestamp.

Parameters

self

GstLALFrHistory object whose timestamp is to be set.

[transfer none]

time

GstClockTime value to which to set timestamp.

 

gstlal_frhistory_get_timestamp ()

GstClockTime
gstlal_frhistory_get_timestamp (const GstLALFrHistory *self);

Parameters

self

GstLALFrHistory object whose timestamp is to be retrieved.

[transfer none]

Returns

GstClockTime timestamp.


gstlal_frhistory_set_comment ()

void
gstlal_frhistory_set_comment (GstLALFrHistory *self,
                              const gchar *comment);

Sets the comment string of the self to a copy of comment . Any previous value will be g_free()ed.

Parameters

self

GstLALFrHistory object whose comment is to be set.

[transfer none]

comment

Comment string or NULL. Calling code retains ownership.

[transfer none][nullable]

gstlal_frhistory_get_comment ()

const gchar *
gstlal_frhistory_get_comment (const GstLALFrHistory *self);

Returns a borrowed reference to the comment string stored in the GstLALFrHistory. The calling code does not own the string and should not free it.

Parameters

self

GstLALFrHistory object whose comment is to be retrieved.

[transfer none]

Returns

A borrowed reference to the comment string. Do not free.

[transfer none]


gstlal_frhistory_get_name ()

const gchar *
gstlal_frhistory_get_name (const GstLALFrHistory *self);

Returns a borrowed reference to the name string stored in the GstLALFrHistory. The calling code does not own the string and should not free it.

Parameters

self

GstLALFrHistory object whose name is to be retrieved.

[transfer none]

Returns

A borrowed reference to the name string. Do not free.

[transfer none]


gstlal_frhistory_free ()

void
gstlal_frhistory_free (GstLALFrHistory *self);

Frees all memory associated with self .

Parameters

self

GstLALFrHistory object to free.

[transfer none]

gstlal_frhistory_compare_by_time ()

gint
gstlal_frhistory_compare_by_time (gconstpointer a,
                                  gconstpointer b);

Parameters

a

Address of GstLALFrHistory a.

[transfer none]

b

Address of GstLALFrHistory b.

[transfer none]

Returns

<0, 0, >0 if a 's timestamp is less than, equal to, or greater than, respectively, b 's timestamp. Use with g_list_sort() to put a GValueArray of GstLALFrHistory objects into time order. Uninitialized timestamps are treated as being less than all other timestamps. If either or both of a and b is NULL the return value is undefined.

Types and Values

GSTLAL_FRHISTORY_TYPE

#define             GSTLAL_FRHISTORY_TYPE

struct GstLALFrHistory

struct GstLALFrHistory {
	guint32 time;
	gchar *comment;
};

Members

guint32 time;

Raw FrHistory time entry. Use gstlal_frhistory_set_timestamp() and gstlal_frhistory_get_timestamp() to access as a GstClockTime.

 

gchar *comment;

Comment string.