remove buffer_join and keep buffer_merge but move to gstutils

Original commit message from CVS:
remove buffer_join and keep buffer_merge but move to gstutils
This commit is contained in:
Thomas Vander Stichele 2005-02-11 16:39:14 +00:00
parent 931f43aa54
commit b10117db35
9 changed files with 17 additions and 76 deletions

View file

@ -1,3 +1,15 @@
2005-02-11 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/gstbuffer.sgml:
* docs/gst/tmpl/gstevent.sgml:
* docs/gst/tmpl/gstpipeline.sgml:
* gst/gstbuffer.c:
* gst/gstbuffer.h:
* gst/gstutils.c:
* gst/gstutils.h:
remove buffer_join and keep buffer_merge but move to gstutils
2005-02-11 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/gst/gstreamer-sections.txt:

View file

@ -86,7 +86,6 @@ gst_buffer_copy
gst_buffer_is_writable
gst_buffer_copy_on_write
gst_buffer_create_sub
gst_buffer_join
gst_buffer_span
gst_buffer_is_span_fast
gst_buffer_default_free

View file

@ -301,16 +301,6 @@ If the refcount is 1, this function just returns the original buffer.
@Returns:
<!-- ##### FUNCTION gst_buffer_join ##### -->
<para>
</para>
@buf1:
@buf2:
@Returns:
<!-- ##### FUNCTION gst_buffer_span ##### -->
<para>

View file

@ -48,8 +48,6 @@ The different major types of events.
@GST_EVENT_DISCONTINUOUS: a discontinuous event to indicate the stream has a discontinuity.
@GST_EVENT_QOS: a quality of service event
@GST_EVENT_SEEK: a seek event.
@GST_EVENT_SEEK_SEGMENT: a segment seek with start and stop position
@GST_EVENT_SEGMENT_DONE: the event that will be emited when the segment seek has ended
@GST_EVENT_SIZE: a size suggestion for a peer element
@GST_EVENT_RATE: adjust the output rate of an element
@GST_EVENT_NAVIGATION:

View file

@ -27,8 +27,8 @@ the pipeline, use gst_object_unref() to free its resources.
</para>
@fixed_clock:
@start_time:
@stream_time:
@delay:
@eosed:
<!-- ##### FUNCTION gst_pipeline_new ##### -->

View file

@ -387,61 +387,6 @@ gst_buffer_create_sub (GstBuffer * parent, guint offset, guint size)
return buffer;
}
/**
* gst_buffer_merge:
* @buf1: a first source #GstBuffer to merge.
* @buf2: the second source #GstBuffer to merge.
*
* Create a new buffer that is the concatenation of the two source
* buffers. The original source buffers will not be modified or
* unref'd.
*
* If the buffers point to contiguous areas of memory, the buffer
* is created without copying the data.
*
* Returns: the new #GstBuffer that's the concatenation of the source buffers.
*
* MT safe.
*/
GstBuffer *
gst_buffer_merge (GstBuffer * buf1, GstBuffer * buf2)
{
GstBuffer *result;
/* we're just a specific case of the more general gst_buffer_span() */
result = gst_buffer_span (buf1, 0, buf2, buf1->size + buf2->size);
return result;
}
/**
* gst_buffer_join:
* @buf1: a first source #GstBuffer to merge.
* @buf2: the second source #GstBuffer to merge.
*
* Create a new buffer that is the concatenation of the two source
* buffers. The original source buffers are dereferenced.
*
* If the buffers point to contiguous areas of memory, the buffer
* is created without copying the data.
*
* Returns: the new #GstBuffer that's the concatenation of the source buffers.
*
* MT safe.
*/
GstBuffer *
gst_buffer_join (GstBuffer * buf1, GstBuffer * buf2)
{
GstBuffer *result = gst_buffer_merge (buf1, buf2);
gst_buffer_unref (buf1);
gst_buffer_unref (buf2);
return result;
}
/**
* gst_buffer_is_span_fast:
* @buf1: a first source #GstBuffer.

View file

@ -166,9 +166,7 @@ void gst_buffer_set_caps (GstBuffer *buffer, GstCaps *caps);
/* creating a subbuffer */
GstBuffer* gst_buffer_create_sub (GstBuffer *parent, guint offset, guint size);
/* merge, span, or append two buffers, intelligently */
GstBuffer* gst_buffer_merge (GstBuffer *buf1, GstBuffer *buf2);
GstBuffer* gst_buffer_join (GstBuffer *buf1, GstBuffer *buf2);
/* span, two buffers, intelligently */
gboolean gst_buffer_is_span_fast (GstBuffer *buf1, GstBuffer *buf2);
GstBuffer* gst_buffer_span (GstBuffer *buf1, guint32 offset, GstBuffer *buf2, guint32 len);

View file

@ -1606,10 +1606,8 @@ gst_element_class_install_std_props (GstElementClass * klass,
*
* Create a new buffer that is the concatenation of the two source
* buffers. The original source buffers will not be modified or
* unref'd.
*
* WARNING: Incorrect use of this function can lead to memory leaks.
* It is recommended to use gst_buffer_join() instead of this function.
* unref'd. Make sure you unref the source buffers if they are not used
* anymore afterwards.
*
* If the buffers point to contiguous areas of memory, the buffer
* is created without copying the data.

View file

@ -275,6 +275,7 @@ void gst_bin_remove_many (GstBin *bin, GstElement *eleme
/* buffer functions */
GstBuffer * gst_buffer_merge (GstBuffer * buf1, GstBuffer * buf2);
void gst_buffer_stamp (GstBuffer * dest, const GstBuffer * src);
void gst_buffer_stamp (GstBuffer * dest, const GstBuffer * src);
G_END_DECLS