mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
Trivial fixes for GstBuffer->GstData migration
Original commit message from CVS: Trivial fixes for GstBuffer->GstData migration
This commit is contained in:
parent
7f220280ae
commit
a6df126cb9
2 changed files with 9 additions and 9 deletions
|
@ -19,7 +19,7 @@ class ArtsStereoSink_impl : virtual public ArtsStereoSink_skel,
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
unsigned long remainingsamples;
|
unsigned long remainingsamples;
|
||||||
GstBuffer *inbuf;
|
GstData *inbuf;
|
||||||
unsigned char *dataptr;
|
unsigned char *dataptr;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -41,8 +41,8 @@ public:
|
||||||
if (remainingsamples == 0) {
|
if (remainingsamples == 0) {
|
||||||
//fprintf(stderr,"need to get a buffer\n");
|
//fprintf(stderr,"need to get a buffer\n");
|
||||||
if (inbuf) {
|
if (inbuf) {
|
||||||
gst_buffer_unref(inbuf);
|
gst_data_unref(inbuf);
|
||||||
inbuf = 0;
|
inbuf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// start by pulling a buffer from GStreamer
|
// start by pulling a buffer from GStreamer
|
||||||
|
@ -54,12 +54,12 @@ public:
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
gst_pad_event_default (srcpad, (GstEvent*)inbuf);
|
gst_pad_event_default (srcpad, GST_EVENT(inbuf));
|
||||||
inbuf = gst_pad_pull (sinkpad);
|
inbuf = gst_pad_pull (sinkpad);
|
||||||
}
|
}
|
||||||
|
|
||||||
dataptr = GST_BUFFER_DATA(inbuf);
|
dataptr = GST_BUFFER_DATA(GST_BUFFER(inbuf));
|
||||||
remainingsamples = GST_BUFFER_SIZE(inbuf) / 4;
|
remainingsamples = GST_BUFFER_SIZE(GST_BUFFER(inbuf)) / 4;
|
||||||
//fprintf(stderr,"got a buffer with %d samples\n",remainingsamples);
|
//fprintf(stderr,"got a buffer with %d samples\n",remainingsamples);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ public:
|
||||||
convert_stereo_2float_i16le(samples,inleft,inright,GST_BUFFER_DATA(outbuf));
|
convert_stereo_2float_i16le(samples,inleft,inright,GST_BUFFER_DATA(outbuf));
|
||||||
//s = (gint16 *)GST_BUFFER_DATA(outbuf);
|
//s = (gint16 *)GST_BUFFER_DATA(outbuf);
|
||||||
//fprintf(stderr,"samples in are %f and %f, out are %d and %d\n",inleft[0],inright[0],s[0],s[1]);
|
//fprintf(stderr,"samples in are %f and %f, out are %d and %d\n",inleft[0],inright[0],s[0],s[1]);
|
||||||
gst_pad_push(srcpad,outbuf);
|
gst_pad_push(srcpad,GST_DATA(outbuf));
|
||||||
outbuf = NULL;
|
outbuf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ speed_sink_factory (void)
|
||||||
template = gst_pad_template_new
|
template = gst_pad_template_new
|
||||||
("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
||||||
gst_caps_append(gst_caps_new ("sink_int", "audio/x-raw-int",
|
gst_caps_append(gst_caps_new ("sink_int", "audio/x-raw-int",
|
||||||
GST_AUDIO_INT_STANDARD_PAD_TEMPLATE_PROPS),
|
GST_AUDIO_INT_PAD_TEMPLATE_PROPS),
|
||||||
gst_caps_new ("sink_float", "audio/x-raw-float",
|
gst_caps_new ("sink_float", "audio/x-raw-float",
|
||||||
GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_PROPS)),
|
GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_PROPS)),
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -86,7 +86,7 @@ speed_src_factory (void)
|
||||||
gst_caps_append (gst_caps_new ("src_float", "audio/x-raw-float",
|
gst_caps_append (gst_caps_new ("src_float", "audio/x-raw-float",
|
||||||
GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_PROPS),
|
GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_PROPS),
|
||||||
gst_caps_new ("src_int", "audio/x-raw-int",
|
gst_caps_new ("src_int", "audio/x-raw-int",
|
||||||
GST_AUDIO_INT_STANDARD_PAD_TEMPLATE_PROPS)),
|
GST_AUDIO_INT_PAD_TEMPLATE_PROPS)),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
return template;
|
return template;
|
||||||
|
|
Loading…
Reference in a new issue