ext/: Fix mimetype on smoke encoder.

Original commit message from CVS:
* ext/dv/gstdvdec.c: (gst_dvdec_video_getcaps),
(gst_dvdec_video_link), (gst_dvdec_push):
* ext/jpeg/gstsmokeenc.c: (gst_smokeenc_class_init),
(gst_smokeenc_resync), (gst_smokeenc_chain):
Fix mimetype on smoke encoder.
Add aspect ratio to dvdec. Not sure if these
values are correct though....
This commit is contained in:
Wim Taymans 2004-10-18 14:02:51 +00:00
parent 85f417a19a
commit b464238497
3 changed files with 61 additions and 5 deletions

View file

@ -1,3 +1,13 @@
2004-10-18 Wim Taymans <wim@fluendo.com>
* ext/dv/gstdvdec.c: (gst_dvdec_video_getcaps),
(gst_dvdec_video_link), (gst_dvdec_push):
* ext/jpeg/gstsmokeenc.c: (gst_smokeenc_class_init),
(gst_smokeenc_resync), (gst_smokeenc_chain):
Fix mimetype on smoke encoder.
Add aspect ratio to dvdec. Not sure if these
values are correct though....
2004-10-18 Wim Taymans <wim@fluendo.com>
* ext/vorbis/vorbisenc.c: (gst_vorbisenc_class_init):

View file

@ -35,6 +35,16 @@
#define PAL_BUFFER 144000
#define PAL_FRAMERATE 25.0
#define PAL_NORMAL_PAR_X 16
#define PAL_NORMAL_PAR_Y 15
#define PAL_WIDE_PAR_X 64
#define PAL_WIDE_PAR_Y 45
#define NTSC_NORMAL_PAR_X 80
#define NTSC_NORMAL_PAR_Y 89
#define NTSC_WIDE_PAR_X 320
#define NTSC_WIDE_PAR_Y 267
/* The ElementDetails structure gives a human-readable description
* of the plugin, as well as author and version data.
*/
@ -98,7 +108,13 @@ static GstStaticPadTemplate video_src_temp = GST_STATIC_PAD_TEMPLATE ("video",
"width = (int) 720, "
"height = (int) { "
G_STRINGIFY (NTSC_HEIGHT) ", " G_STRINGIFY (PAL_HEIGHT)
" }, " "framerate = (double) [ 1.0, 60.0 ];"
" }, "
"pixel-aspect-ratio=(fraction) { "
G_STRINGIFY (PAL_NORMAL_PAR_X) "/" G_STRINGIFY (PAL_NORMAL_PAR_Y) ","
G_STRINGIFY (PAL_WIDE_PAR_X) "/" G_STRINGIFY (PAL_WIDE_PAR_Y) ","
G_STRINGIFY (NTSC_NORMAL_PAR_X) "/" G_STRINGIFY (NTSC_NORMAL_PAR_Y) ","
G_STRINGIFY (NTSC_WIDE_PAR_X) "/" G_STRINGIFY (NTSC_WIDE_PAR_Y) "},"
"framerate = (double) [ 1.0, 60.0 ];"
//"framerate = (double) { "
//G_STRINGIFY (PAL_FRAMERATE) ", " G_STRINGIFY (NTSC_FRAMERATE)
//" }; "
@ -112,7 +128,13 @@ static GstStaticPadTemplate video_src_temp = GST_STATIC_PAD_TEMPLATE ("video",
"width = (int) 720, "
"height = (int) { "
G_STRINGIFY (NTSC_HEIGHT) ", " G_STRINGIFY (PAL_HEIGHT)
" }, " "framerate = (double) [ 1.0, 60.0 ];"
" }, "
"pixel-aspect-ratio=(fraction) { "
G_STRINGIFY (PAL_NORMAL_PAR_X) "/" G_STRINGIFY (PAL_NORMAL_PAR_Y) ","
G_STRINGIFY (PAL_WIDE_PAR_X) "/" G_STRINGIFY (PAL_WIDE_PAR_Y) ","
G_STRINGIFY (NTSC_NORMAL_PAR_X) "/" G_STRINGIFY (NTSC_NORMAL_PAR_Y) ","
G_STRINGIFY (NTSC_WIDE_PAR_X) "/" G_STRINGIFY (NTSC_WIDE_PAR_Y) "},"
"framerate = (double) [ 1.0, 60.0 ];"
//"framerate = (double) { "
//G_STRINGIFY (PAL_FRAMERATE) ", " G_STRINGIFY (NTSC_FRAMERATE)
//" }; "
@ -126,7 +148,13 @@ static GstStaticPadTemplate video_src_temp = GST_STATIC_PAD_TEMPLATE ("video",
"width = (int) 720, "
"height = (int) { "
G_STRINGIFY (NTSC_HEIGHT) ", " G_STRINGIFY (PAL_HEIGHT)
" }, " "framerate = (double) [ 1.0, 60.0 ]"
" }, "
"pixel-aspect-ratio=(fraction) { "
G_STRINGIFY (PAL_NORMAL_PAR_X) "/" G_STRINGIFY (PAL_NORMAL_PAR_Y) ","
G_STRINGIFY (PAL_WIDE_PAR_X) "/" G_STRINGIFY (PAL_WIDE_PAR_Y) ","
G_STRINGIFY (NTSC_NORMAL_PAR_X) "/" G_STRINGIFY (NTSC_NORMAL_PAR_Y) ","
G_STRINGIFY (NTSC_WIDE_PAR_X) "/" G_STRINGIFY (NTSC_WIDE_PAR_Y) "},"
"framerate = (double) [ 1.0, 60.0 ]"
//"framerate = (double) { "
//G_STRINGIFY (PAL_FRAMERATE) ", " G_STRINGIFY (NTSC_FRAMERATE)
//" }"
@ -740,7 +768,25 @@ gst_dvdec_video_getcaps (GstPad * pad)
if (dvdec->found_header) {
int i;
gint par_x, par_y;
if (dvdec->PAL) {
if (dv_format_wide (dvdec->decoder)) {
par_x = PAL_WIDE_PAR_X;
par_y = PAL_WIDE_PAR_Y;
} else {
par_x = PAL_NORMAL_PAR_X;
par_y = PAL_NORMAL_PAR_Y;
}
} else {
if (dv_format_wide (dvdec->decoder)) {
par_x = NTSC_WIDE_PAR_X;
par_y = NTSC_WIDE_PAR_Y;
} else {
par_x = NTSC_NORMAL_PAR_X;
par_y = NTSC_NORMAL_PAR_Y;
}
}
/* set the height */
for (i = 0; i < gst_caps_get_size (caps); i++) {
GstStructure *structure = gst_caps_get_structure (caps, i);
@ -748,7 +794,7 @@ gst_dvdec_video_getcaps (GstPad * pad)
gst_structure_set (structure,
"height", G_TYPE_INT, dvdec->height,
"framerate", G_TYPE_DOUBLE, dvdec->framerate / dvdec->drop_factor,
NULL);
"pixel-aspect-ratio", GST_TYPE_FRACTION, par_x, par_y, NULL);
}
}

View file

@ -114,7 +114,7 @@ static GstStaticPadTemplate gst_smokeenc_src_pad_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("image/x-smoke, "
GST_STATIC_CAPS ("video/x-smoke, "
"width = (int) [ 16, 4096 ], "
"height = (int) [ 16, 4096 ], " "framerate = (double) [ 1, MAX ]")
);