summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-04-26 13:47:38 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-04-26 13:47:38 +0000
commit46c2655999759820618416f245c06816c33a4e02 (patch)
tree9b29fa2d6f7219979ba6e7dac95f46c5e90f4f24
parent7d92cdad319d1cd80aee32c7fd25b3862af2d929 (diff)
fix jpeg getcaps so it negotiates correctly
Original commit message from CVS: fix jpeg getcaps so it negotiates correctly
-rw-r--r--ChangeLog7
-rw-r--r--ext/jpeg/gstjpegenc.c9
2 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index dea300d5..fd3c7aae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* gst/audioconvert/gstaudioconvert.c: (_fixate_caps_to_int):
diff --git a/ext/jpeg/gstjpegenc.c b/ext/jpeg/gstjpegenc.c
index 4e646198..57eaaf91 100644
--- a/ext/jpeg/gstjpegenc.c
+++ b/ext/jpeg/gstjpegenc.c
@@ -230,8 +230,10 @@ gst_jpegenc_getcaps (GstPad * pad)
GstCaps *caps;
const char *name;
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;
caps = gst_pad_get_allowed_caps (otherpad);
if (pad == jpegenc->srcpad) {
@@ -246,6 +248,11 @@ gst_jpegenc_getcaps (GstPad * pad)
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;
}