[svn r182] trunk
authorrenatofilho
Mon Dec 04 13:21:37 2006 +0000 (2006-12-04)
branchtrunk
changeset 181d9628018e9f7
parent 180 60033c7d3bab
child 182 f61807a4a51c
[svn r182]
gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c
     1.1 --- a/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c	Sat Dec 02 04:23:43 2006 +0000
     1.2 +++ b/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c	Mon Dec 04 13:21:37 2006 +0000
     1.3 @@ -264,8 +264,10 @@
     1.4  static void gst_nuv_demux_update_duration (GstNuvDemux *nuv, guint64 current_timestamp);
     1.5  static gint64 gst_nuv_demux_get_bytes_duration (GstNuvDemux *nuv);
     1.6  static gint64 gst_nuv_demux_get_time_duration (GstNuvDemux *nuv);
     1.7 +
     1.8 +#if (GST_VERSION_MINOR == 10) && (GST_VERSION_MICRO < 6) 
     1.9  GstBuffer * gst_nuv_demux_adapter_take_buffer (GstAdapter * adapter, guint nbytes);
    1.10 -
    1.11 +#endif
    1.12  
    1.13  
    1.14  GST_BOILERPLATE (GstNuvDemux, gst_nuv_demux, GstElement, GST_TYPE_ELEMENT);
    1.15 @@ -328,6 +330,8 @@
    1.16    gst_element_class_add_pad_template (element_class,
    1.17        gst_static_pad_template_get (&sink_template));
    1.18    gst_element_class_set_details (element_class, &gst_nuv_demux_details);
    1.19 +
    1.20 +  g_debug ("GST VER: %d.%d", GST_VERSION_MINOR, GST_VERSION_MAJOR);
    1.21  }
    1.22  
    1.23  static void
    1.24 @@ -1058,7 +1062,7 @@
    1.25        return GST_FLOW_ERROR_NO_DATA;
    1.26  
    1.27      if (move) {
    1.28 -      *buffer = gst_nuv_demux_adapter_take_buffer (nuv->priv->adapter, size);
    1.29 +      *buffer = gst_adapter_take_buffer (nuv->priv->adapter, size);
    1.30      } else {
    1.31        guint8 *data = NULL;
    1.32        data = (guint8 *) gst_adapter_peek (nuv->priv->adapter, size);
    1.33 @@ -1349,8 +1353,9 @@
    1.34      return nuv->priv->duration_time;
    1.35  }
    1.36  
    1.37 +#if (GST_VERSION_MINOR == 10) && (GST_VERSION_MICRO < 6) 
    1.38  GstBuffer *
    1.39 -gst_nuv_demux_adapter_take_buffer (GstAdapter * adapter, guint nbytes)
    1.40 +gst_adapter_take_buffer (GstAdapter * adapter, guint nbytes)
    1.41  {
    1.42    GstBuffer *buffer;
    1.43    GstBuffer *cur;
    1.44 @@ -1390,6 +1395,7 @@
    1.45  
    1.46    return buffer;
    1.47  }
    1.48 +#endif
    1.49  
    1.50  
    1.51  static gboolean