mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
fix jpeg getcaps so it negotiates correctly
Original commit message from CVS: fix jpeg getcaps so it negotiates correctly
This commit is contained in:
parent
7d92cdad31
commit
46c2655999
2 changed files with 15 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2004-04-26 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* Makefile.am:
|
||||||
|
* ext/jpeg/gstjpegenc.c: (gst_jpegenc_get_type),
|
||||||
|
(gst_jpegenc_class_init), (gst_jpegenc_getcaps):
|
||||||
|
fix _getcaps so it only negotiates to its supported format
|
||||||
|
|
||||||
2004-04-25 Benjamin Otte <otte@gnome.org>
|
2004-04-25 Benjamin Otte <otte@gnome.org>
|
||||||
|
|
||||||
* gst/audioconvert/gstaudioconvert.c: (_fixate_caps_to_int):
|
* gst/audioconvert/gstaudioconvert.c: (_fixate_caps_to_int):
|
||||||
|
|
|
@ -230,8 +230,10 @@ gst_jpegenc_getcaps (GstPad * pad)
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
const char *name;
|
const char *name;
|
||||||
int i;
|
int i;
|
||||||
GstStructure *structure;
|
GstStructure *structure = NULL;
|
||||||
|
|
||||||
|
/* we want to proxy properties like width, height and framerate from the
|
||||||
|
other end of the element */
|
||||||
otherpad = (pad == jpegenc->srcpad) ? jpegenc->sinkpad : jpegenc->srcpad;
|
otherpad = (pad == jpegenc->srcpad) ? jpegenc->sinkpad : jpegenc->srcpad;
|
||||||
caps = gst_pad_get_allowed_caps (otherpad);
|
caps = gst_pad_get_allowed_caps (otherpad);
|
||||||
if (pad == jpegenc->srcpad) {
|
if (pad == jpegenc->srcpad) {
|
||||||
|
@ -246,6 +248,11 @@ gst_jpegenc_getcaps (GstPad * pad)
|
||||||
gst_structure_remove_field (structure, "format");
|
gst_structure_remove_field (structure, "format");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ... but for the sink pad, we only do I420 anyway, so add that */
|
||||||
|
if (pad == jpegenc->sinkpad) {
|
||||||
|
gst_structure_set (structure, "format", GST_TYPE_FOURCC,
|
||||||
|
GST_STR_FOURCC ("I420"), NULL);
|
||||||
|
}
|
||||||
return caps;
|
return caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue