Commit c5ef50d4 authored by Wim Taymans's avatar Wim Taymans
Browse files

adapter: use gpointer for return types

parent 9fa3f31b
......@@ -406,7 +406,7 @@ gst_adapter_try_to_merge_up (GstAdapter * adapter, gsize size)
* Returns: (transfer none) (array length=size): a pointer to the first
* @size bytes of data, or NULL
*/
const guint8 *
const gpointer
gst_adapter_map (GstAdapter * adapter, gsize size)
{
GstBuffer *cur;
......@@ -515,7 +515,7 @@ gst_adapter_unmap (GstAdapter * adapter, gsize flush)
* Since: 0.10.12
*/
void
gst_adapter_copy (GstAdapter * adapter, guint8 * dest, gsize offset, gsize size)
gst_adapter_copy (GstAdapter * adapter, gpointer dest, gsize offset, gsize size)
{
g_return_if_fail (GST_IS_ADAPTER (adapter));
g_return_if_fail (size > 0);
......@@ -658,10 +658,10 @@ gst_adapter_take_internal (GstAdapter * adapter, gsize nbytes)
* Returns: (transfer full) (array length=nbytes): oven-fresh hot data, or
* #NULL if @nbytes bytes are not available
*/
guint8 *
gpointer
gst_adapter_take (GstAdapter * adapter, gsize nbytes)
{
guint8 *data;
gpointer data;
g_return_val_if_fail (GST_IS_ADAPTER (adapter), NULL);
g_return_val_if_fail (nbytes > 0, NULL);
......
......@@ -57,7 +57,7 @@ struct _GstAdapter {
gsize skip;
/* we keep state of assembled pieces */
guint8 * assembled_data;
gpointer assembled_data;
gsize assembled_size;
gsize assembled_len;
......@@ -79,12 +79,12 @@ GstAdapter * gst_adapter_new (void);
void gst_adapter_clear (GstAdapter *adapter);
void gst_adapter_push (GstAdapter *adapter, GstBuffer* buf);
const guint8 * gst_adapter_map (GstAdapter *adapter, gsize size);
const gpointer gst_adapter_map (GstAdapter *adapter, gsize size);
void gst_adapter_unmap (GstAdapter *adapter, gsize flush);
void gst_adapter_copy (GstAdapter *adapter, guint8 *dest,
void gst_adapter_copy (GstAdapter *adapter, gpointer dest,
gsize offset, gsize size);
void gst_adapter_flush (GstAdapter *adapter, gsize flush);
guint8* gst_adapter_take (GstAdapter *adapter, gsize nbytes);
gpointer gst_adapter_take (GstAdapter *adapter, gsize nbytes);
GstBuffer* gst_adapter_take_buffer (GstAdapter *adapter, gsize nbytes);
GList* gst_adapter_take_list (GstAdapter *adapter, gsize nbytes);
gsize gst_adapter_available (GstAdapter *adapter);
......
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