gstlal_frhistory

gstlal_frhistory — GValue type for holding FrHistory information.

Synopsis

#include <gstlal/gstlal_frhistory.h>

#define             GSTLAL_FRHISTORY_TYPE
struct              GstLALFrHistory;
gint                gstlal_frhistory_compare_by_time    (gconstpointer a,
                                                         gconstpointer b);
GstLALFrHistory *   gstlal_frhistory_copy               (const GstLALFrHistory *self);
void                gstlal_frhistory_free               (GstLALFrHistory *self);
const gchar *       gstlal_frhistory_get_comment        (const GstLALFrHistory *self);
const gchar *       gstlal_frhistory_get_name           (const GstLALFrHistory *self);
GstClockTime        gstlal_frhistory_get_timestamp      (const GstLALFrHistory *self);
GstLALFrHistory *   gstlal_frhistory_new                (const gchar *name);
void                gstlal_frhistory_set_comment        (GstLALFrHistory *self,
                                                         const gchar *comment);
void                gstlal_frhistory_set_timestamp      (GstLALFrHistory *self,
                                                         GstClockTime time);
gchar *             gstlal_frhistory_to_string          (const GstLALFrHistory *self);

Object Hierarchy

  GBoxed
   +----GstLALFrHistory

Description

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

Details

GSTLAL_FRHISTORY_TYPE

#define             GSTLAL_FRHISTORY_TYPE


struct GstLALFrHistory

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

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.

gstlal_frhistory_compare_by_time ()

gint                gstlal_frhistory_compare_by_time    (gconstpointer a,
                                                         gconstpointer b);

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.

gstlal_frhistory_copy ()

GstLALFrHistory *   gstlal_frhistory_copy               (const GstLALFrHistory *self);

Creates a deep copy of the GstLALFrHistory object self.

self :

GstLALFrHistory object to copy. [transfer none]

Returns :

A new GstLALFrHistory. Free with #gstlal_frhistory_free(). [transfer full]

gstlal_frhistory_free ()

void                gstlal_frhistory_free               (GstLALFrHistory *self);

Frees all memory associated with self.

self :

GstLALFrHistory object to free. [transfer none]

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.

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.

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_get_timestamp ()

GstClockTime        gstlal_frhistory_get_timestamp      (const GstLALFrHistory *self);

self :

GstLALFrHistory object whose timestamp is to be retrieved. [transfer none]

Returns :

GstClockTime timestamp.

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().

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_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.

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_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.

self :

GstLALFrHistory object whose timestamp is to be set. [transfer none]

time :

GstClockTime value to which to set timestamp.

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.

self :

GstLALFrHistory object to represent as a string. [transfer none]

Returns :

A newly-allocated string holding the result. Free with #g_free(). [transfer full]