mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 10:40:34 +00:00
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.
This commit is contained in:
parent
fd6ca0191b
commit
5be62b88b8
3 changed files with 72 additions and 0 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue