Commit 5be62b88 authored by Wim Taymans's avatar Wim Taymans
Browse files

gst/gstsegment.*: Make binding friendly.

Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_copy), (gst_segment_get_type),
(gst_segment_new), (gst_segment_free), (gst_segment_init),
(gst_segment_set_duration), (gst_segment_set_last_stop),
(gst_segment_set_seek), (gst_segment_set_newsegment),
(gst_segment_to_stream_time), (gst_segment_to_running_time),
(gst_segment_clip):
* gst/gstsegment.h:
Make binding friendly.
parent fd6ca019
2005-11-21 Wim Taymans <wim@fluendo.com>
* gst/gstsegment.c: (gst_segment_copy), (gst_segment_get_type),
(gst_segment_new), (gst_segment_free), (gst_segment_init),
(gst_segment_set_duration), (gst_segment_set_last_stop),
(gst_segment_set_seek), (gst_segment_set_newsegment),
(gst_segment_to_stream_time), (gst_segment_to_running_time),
(gst_segment_clip):
* gst/gstsegment.h:
Make binding friendly.
2005-11-21 Andy Wingo <wingo@pobox.com>
* gst/gsttagsetter.h:
......
......@@ -37,6 +37,62 @@
* Last reviewed on 2005-20-09 (0.9.5)
*/
static GstSegment *
gst_segment_copy (GstSegment * segment)
{
GstSegment *result = NULL;
if (segment) {
result = gst_segment_new ();
memcpy (result, segment, sizeof (GstSegment));
}
return NULL;
}
GType
gst_segment_get_type (void)
{
static GType gst_segment_type = 0;
if (!gst_segment_type) {
gst_segment_type = g_boxed_type_register_static ("GstSegment",
(GBoxedCopyFunc) gst_segment_copy, (GBoxedFreeFunc) gst_segment_free);
}
return gst_segment_type;
}
/**
* gst_segment_new:
*
* Allocate a new #GstSegment structure and initialize it using
* gst_segment_init().
*
* Returns: a new #GstSegment, free with gst_segment_free().
*/
GstSegment *
gst_segment_new (void)
{
GstSegment *result;
result = g_new0 (GstSegment, 1);
gst_segment_init (result, GST_FORMAT_UNDEFINED);
return result;
}
/**
* gst_segment_free:
* @segment: a #GstSegment
*
* Free the allocated segment @segment.
*/
void
gst_segment_free (GstSegment * segment)
{
g_free (segment);
}
/**
* gst_segment_init:
* @segment: a #GstSegment structure.
......
......@@ -64,6 +64,11 @@ struct _GstSegment {
gpointer _gst_reserved[GST_PADDING];
};
GType gst_segment_get_type (void);
GstSegment * gst_segment_new (void);
void gst_segment_free (GstSegment *segment);
void gst_segment_init (GstSegment *segment, GstFormat format);
void gst_segment_set_duration (GstSegment *segment, GstFormat format, gint64 duration);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment