Fix for instantiate-test (see core). Also remove dead code from jpegenc (which still needs fixing, but that's lower o...

Original commit message from CVS:
2004-01-07  Ronald Bultje  <rbultje@ronald.bitfreak.net>

* ext/audiofile/gstafsink.c: (gst_afsink_init), (gst_afsink_chain),
(gst_afsink_handle_event):
* ext/jpeg/gstjpegenc.c: (gst_jpegenc_init):
* gst/avi/gstavimux.c: (gst_avimux_request_new_pad):
* sys/dxr3/dxr3audiosink.c: (dxr3audiosink_init):
* sys/dxr3/dxr3spusink.c: (dxr3spusink_init):
* sys/dxr3/dxr3videosink.c: (dxr3videosink_init):
Fix for instantiate-test (see core). Also remove dead code from
jpegenc (which still needs fixing, but that's lower on my TODO
list...).
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_getcaps):
Never return NULL as caps.
This commit is contained in:
Ronald S. Bultje 2004-01-07 13:18:08 +00:00
parent b88c80d4be
commit 6ac4353319
4 changed files with 16 additions and 30 deletions

View file

@ -1,3 +1,18 @@
2004-01-07 Ronald Bultje <rbultje@ronald.bitfreak.net>
* ext/audiofile/gstafsink.c: (gst_afsink_init), (gst_afsink_chain),
(gst_afsink_handle_event):
* ext/jpeg/gstjpegenc.c: (gst_jpegenc_init):
* gst/avi/gstavimux.c: (gst_avimux_request_new_pad):
* sys/dxr3/dxr3audiosink.c: (dxr3audiosink_init):
* sys/dxr3/dxr3spusink.c: (dxr3spusink_init):
* sys/dxr3/dxr3videosink.c: (dxr3videosink_init):
Fix for instantiate-test (see core). Also remove dead code from
jpegenc (which still needs fixing, but that's lower on my TODO
list...).
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_getcaps):
Never return NULL as caps.
2004-01-07 David Schleef <ds@schleef.org>
* configure.ac:

View file

@ -53,8 +53,6 @@ static void gst_jpegenc_init (GstJpegEnc *jpegenc);
static void gst_jpegenc_chain (GstPad *pad, GstData *_data);
static GstPadLinkReturn gst_jpegenc_link (GstPad *pad, const GstCaps *caps);
static GstData *gst_jpegenc_get (GstPad *pad);
static void gst_jpegenc_resync (GstJpegEnc *jpegenc);
static GstElementClass *parent_class = NULL;
@ -164,7 +162,6 @@ gst_jpegenc_init (GstJpegEnc *jpegenc)
gst_element_add_pad(GST_ELEMENT(jpegenc),jpegenc->sinkpad);
gst_pad_set_chain_function(jpegenc->sinkpad,gst_jpegenc_chain);
gst_pad_set_link_function(jpegenc->sinkpad, gst_jpegenc_link);
gst_pad_set_get_function(jpegenc->sinkpad,gst_jpegenc_get);
jpegenc->srcpad = gst_pad_new("src",GST_PAD_SRC);
gst_element_add_pad(GST_ELEMENT(jpegenc),jpegenc->srcpad);
@ -276,31 +273,6 @@ gst_jpegenc_resync (GstJpegEnc *jpegenc)
GST_DEBUG ("gst_jpegenc_resync: resync done");
}
static GstData*
gst_jpegenc_get (GstPad *pad)
{
GstJpegEnc *jpegenc;
GstBuffer *newbuf;
GST_DEBUG ("gst_jpegenc_chain: pull buffer");
g_return_val_if_fail (pad != NULL, NULL);
g_return_val_if_fail (GST_IS_PAD (pad), NULL);
jpegenc = GST_JPEGENC (GST_OBJECT_PARENT (pad));
if (jpegenc->buffer == NULL || GST_BUFFER_REFCOUNT_VALUE(jpegenc->buffer) != 1) {
if (jpegenc->buffer) gst_buffer_unref(jpegenc->buffer);
GST_DEBUG ("gst_jpegenc_chain: new buffer");
newbuf = jpegenc->buffer = gst_buffer_new();
GST_BUFFER_DATA(newbuf) = g_malloc(jpegenc->bufsize);
GST_BUFFER_SIZE(newbuf) = jpegenc->bufsize;
}
gst_buffer_ref(jpegenc->buffer);
return GST_DATA (jpegenc->buffer);
}
static void
gst_jpegenc_chain (GstPad *pad, GstData *_data)
{

View file

@ -548,7 +548,6 @@ gst_avimux_request_new_pad (GstElement *element,
g_signal_connect(newpad, "unlinked",
G_CALLBACK(gst_avimux_pad_unlink), (gpointer)avimux);
gst_element_add_pad (element, newpad);
gst_pad_set_event_function(newpad, gst_avimux_handle_event);
gst_pad_set_event_mask_function(newpad, gst_avimux_get_event_masks);
return newpad;

View file

@ -743,7 +743,7 @@ gst_v4l2src_getcaps (GstPad *pad)
int min_w, max_w, min_h, max_h;
if (!GST_V4L2_IS_OPEN(GST_V4L2ELEMENT(v4l2src))) {
return NULL;
return gst_caps_new_any ();
}
/* build our own capslist */