summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-07-06 20:49:52 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-07-06 20:49:52 +0000
commit95011fd7e8eb3a2ec3a87ff9dad523d18005db42 (patch)
tree6e75f9139c6520126f9344e15e1dea2a49f70f9c /sys
parent85a8dd7ecb04d043be8192e27e3c89ef8ccebe55 (diff)
downloadgst-plugins-bad-95011fd7e8eb3a2ec3a87ff9dad523d18005db42.tar.gz
gst-plugins-bad-95011fd7e8eb3a2ec3a87ff9dad523d18005db42.tar.bz2
gst-plugins-bad-95011fd7e8eb3a2ec3a87ff9dad523d18005db42.zip
New mimetypes gone into effect today - this commit changes all old mimetypes over to the new mimetypes spec as descri...
Original commit message from CVS: New mimetypes gone into effect today - this commit changes all old mimetypes over to the new mimetypes spec as described in the previous commit's document. Note: some plugins will break, some pipelines will break, expect HEAD to be broken or at least not 100% working for a few days, but don't forget to report bugs
Diffstat (limited to 'sys')
-rw-r--r--sys/Makefile.am2
-rw-r--r--sys/cdrom/gstcdplayer.c3
-rw-r--r--sys/dxr3/dxr3audiosink.c9
-rw-r--r--sys/dxr3/dxr3spusink.c6
-rw-r--r--sys/dxr3/dxr3videosink.c2
-rw-r--r--sys/qcam/gstqcamsrc.c15
-rw-r--r--sys/v4l2/gstv4l2src.c90
7 files changed, 84 insertions, 43 deletions
diff --git a/sys/Makefile.am b/sys/Makefile.am
index e7dc9380..074a5bde 100644
--- a/sys/Makefile.am
+++ b/sys/Makefile.am
@@ -34,7 +34,7 @@ else
VCD_DIR=
endif
-if USE_XVIDEO
+if USE_XFREE
XVIDEO_DIR=xvideo
else
XVIDEO_DIR=
diff --git a/sys/cdrom/gstcdplayer.c b/sys/cdrom/gstcdplayer.c
index f36d0bb0..2efeb992 100644
--- a/sys/cdrom/gstcdplayer.c
+++ b/sys/cdrom/gstcdplayer.c
@@ -60,9 +60,10 @@ static guint cdplayer_signals[LAST_SIGNAL] = { 0 };
static GstElementDetails cdplayer_details = {
"CD Player",
"Generic/Bin",
+ "LGPL", /* ? */
"Play CD audio through the CD Drive",
VERSION,
- "Charles Schmidt <cbschmid@uiuc.edu>",
+ "Charles Schmidt <cbschmid@uiuc.edu>\n"
"Wim Taymans <wim.taymans@chello.be>",
"(C) 2002",
};
diff --git a/sys/dxr3/dxr3audiosink.c b/sys/dxr3/dxr3audiosink.c
index fe8853c8..35e9d99c 100644
--- a/sys/dxr3/dxr3audiosink.c
+++ b/sys/dxr3/dxr3audiosink.c
@@ -75,9 +75,7 @@ GST_PAD_TEMPLATE_FACTORY (dxr3audiosink_pcm_sink_factory,
GST_PAD_ALWAYS,
GST_CAPS_NEW (
"dxr3audiosink_pcm_sink",
- "audio/raw",
- "format", GST_PROPS_STRING ("int"),
- "law", GST_PROPS_INT (0),
+ "audio/x-raw-int",
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
"signed", GST_PROPS_BOOLEAN (TRUE),
"width", GST_PROPS_INT (16),
@@ -98,8 +96,9 @@ GST_PAD_TEMPLATE_FACTORY (dxr3audiosink_ac3_sink_factory,
GST_PAD_ALWAYS,
GST_CAPS_NEW (
"dxr3audiosink_ac3_sink",
- "audio/a52",
+ "audio/x-ac3",
NULL
+ /* no parameters needed, we don't need a parsed stream */
)
)
@@ -507,7 +506,7 @@ dxr3audiosink_pcm_sinklink (GstPad *pad, GstCaps *caps)
}
mimetype = gst_caps_get_mime(caps);
- if (strcmp (mimetype, "audio/raw") != 0) {
+ if (strcmp (mimetype, "audio/x-raw-int") != 0) {
return GST_PAD_LINK_REFUSED;
}
diff --git a/sys/dxr3/dxr3spusink.c b/sys/dxr3/dxr3spusink.c
index 04648306..e9142c3c 100644
--- a/sys/dxr3/dxr3spusink.c
+++ b/sys/dxr3/dxr3spusink.c
@@ -68,11 +68,7 @@ GST_PAD_TEMPLATE_FACTORY (dxr3spusink_sink_factory,
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_CAPS_NEW (
- "dxr3spusink_sink",
- "video/mpeg",
- NULL
- )
+ NULL
);
diff --git a/sys/dxr3/dxr3videosink.c b/sys/dxr3/dxr3videosink.c
index 9c4d8d56..5f8f953d 100644
--- a/sys/dxr3/dxr3videosink.c
+++ b/sys/dxr3/dxr3videosink.c
@@ -94,6 +94,8 @@ GST_PAD_TEMPLATE_FACTORY (dxr3videosink_sink_factory,
GST_PROPS_INT (2)
),
"systemstream", GST_PROPS_BOOLEAN (FALSE)
+ /* width/height/framerate omitted, we don't
+ * need a parsed stream */
)
)
diff --git a/sys/qcam/gstqcamsrc.c b/sys/qcam/gstqcamsrc.c
index b0edc998..2c730328 100644
--- a/sys/qcam/gstqcamsrc.c
+++ b/sys/qcam/gstqcamsrc.c
@@ -29,6 +29,7 @@
/*#define DEBUG_ENABLED */
#include <gstqcamsrc.h>
+#include <gst/video/video.h>
#include "qcamip.h"
@@ -63,12 +64,11 @@ GST_PAD_TEMPLATE_FACTORY (gst_qcamsrc_src_factory,
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_CAPS_NEW (
+ gst_caps_new (
"gstqcam_src",
- "video/raw",
- "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")),
- "width", GST_PROPS_INT_RANGE (0, 320),
- "height", GST_PROPS_INT_RANGE (0, 240)
+ "video/x-raw-yuv",
+ GST_VIDEO_YUV_PAD_TEMPLATE_PROPS (
+ GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")))
)
)
@@ -252,10 +252,11 @@ gst_qcamsrc_get (GstPad *pad)
if (!GST_PAD_CAPS (pad)) {
gst_pad_try_set_caps (pad, GST_CAPS_NEW (
"qcam_caps",
- "video/raw",
+ "video/x-raw-yuv",
"format", GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")),
"width", GST_PROPS_INT (qcamsrc->qcam->width / scale),
- "height", GST_PROPS_INT (qcamsrc->qcam->height / scale)
+ "height", GST_PROPS_INT (qcamsrc->qcam->height / scale),
+ "framerate", GST_PROPS_FLOAT (10.) /* bla? */
));
}
scan = qc_scan (qcamsrc->qcam);
diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c
index 7825956b..b7e5daba 100644
--- a/sys/v4l2/gstv4l2src.c
+++ b/sys/v4l2/gstv4l2src.c
@@ -244,12 +244,12 @@ gst_v4l2src_close (GstElement *element,
}
-static gdouble
+static gfloat
gst_v4l2src_get_fps (GstV4l2Src *v4l2src)
{
gint norm;
struct v4l2_standard *std;
- gdouble fps;
+ gfloat fps;
if (!v4l2src->use_fixed_fps &&
v4l2src->clock != NULL &&
@@ -323,6 +323,7 @@ static GstCaps *
gst_v4l2src_v4l2fourcc_to_caps (guint32 fourcc,
GstPropsEntry *width,
GstPropsEntry *height,
+ GstPropsEntry *fps,
gboolean compressed)
{
GstCaps *caps = NULL;
@@ -331,7 +332,7 @@ gst_v4l2src_v4l2fourcc_to_caps (guint32 fourcc,
case V4L2_PIX_FMT_MJPEG: /* Motion-JPEG */
case V4L2_PIX_FMT_JPEG: /* JFIF JPEG */
caps = GST_CAPS_NEW("v4l2src_caps",
- "video/jpeg",
+ "video/x-jpeg",
NULL);
break;
case V4L2_PIX_FMT_RGB332:
@@ -346,7 +347,6 @@ gst_v4l2src_v4l2fourcc_to_caps (guint32 fourcc,
guint depth=0, bpp=0;
gint endianness = 0;
guint32 r_mask = 0, b_mask = 0, g_mask = 0;
- guint32 fcc = GST_MAKE_FOURCC('R','G','B',' ');
switch (fourcc) {
case V4L2_PIX_FMT_RGB332:
@@ -357,30 +357,64 @@ gst_v4l2src_v4l2fourcc_to_caps (guint32 fourcc,
case V4L2_PIX_FMT_RGB555:
case V4L2_PIX_FMT_RGB555X:
bpp = 16; depth = 15;
- endianness = (fourcc == V4L2_PIX_FMT_RGB332) ?
- G_LITTLE_ENDIAN : G_BIG_ENDIAN;
- r_mask = 0x7c00; g_mask = 0x03e0; b_mask = 0x001f;
+ endianness = G_BYTE_ORDER;
+ if ((fourcc == V4L2_PIX_FMT_RGB555 &&
+ G_BYTE_ORDER == G_LITTLE_ENDIAN) ||
+ (fourcc == V4L2_PIX_FMT_RGB555X &&
+ G_BYTE_ORDER == G_BIG_ENDIAN)) {
+ r_mask = 0x7c00;
+ g_mask = 0x03e0;
+ b_mask = 0x001f;
+ } else {
+ r_mask = 0x007c;
+ g_mask = 0xe003;
+ b_mask = 0x1f00;
+ }
break;
case V4L2_PIX_FMT_RGB565:
case V4L2_PIX_FMT_RGB565X:
bpp = depth = 16;
- endianness = (fourcc == V4L2_PIX_FMT_RGB565) ?
- G_LITTLE_ENDIAN : G_BIG_ENDIAN;
- r_mask = 0xf800; g_mask = 0x07e0; b_mask = 0x001f;
+ endianness = G_BYTE_ORDER;
+ if ((fourcc == V4L2_PIX_FMT_RGB565 &&
+ G_BYTE_ORDER == G_LITTLE_ENDIAN) ||
+ (fourcc == V4L2_PIX_FMT_RGB565X &&
+ G_BYTE_ORDER == G_BIG_ENDIAN)) {
+ r_mask = 0xf800;
+ g_mask = 0x07e0;
+ b_mask = 0x001f;
+ } else {
+ r_mask = 0x00f8;
+ g_mask = 0xe007;
+ b_mask = 0x1f00;
+ }
break;
case V4L2_PIX_FMT_RGB24:
case V4L2_PIX_FMT_BGR24:
bpp = depth = 24;
- endianness = (fourcc == V4L2_PIX_FMT_BGR24) ?
- G_LITTLE_ENDIAN : G_BIG_ENDIAN;
- r_mask = 0xff0000; g_mask = 0x00ff00; b_mask = 0x0000ff;
+ endianness = G_BIG_ENDIAN;
+ if (fourcc == V4L2_PIX_FMT_RGB24) {
+ r_mask = 0xff0000;
+ g_mask = 0x00ff00;
+ b_mask = 0x0000ff;
+ } else {
+ r_mask = 0x0000ff;
+ g_mask = 0x00ff00;
+ b_mask = 0xff0000;
+ }
break;
case V4L2_PIX_FMT_RGB32:
case V4L2_PIX_FMT_BGR32:
bpp = depth = 32;
- endianness = (fourcc == V4L2_PIX_FMT_BGR32) ?
- G_LITTLE_ENDIAN : G_BIG_ENDIAN;
- r_mask = 0x00ff0000; g_mask = 0x0000ff00; b_mask = 0x000000ff;
+ endianness = G_BIG_ENDIAN;
+ if (fourcc == V4L2_PIX_FMT_RGB32) {
+ r_mask = 0xff000000;
+ g_mask = 0x00ff0000;
+ b_mask = 0x0000ff00;
+ } else {
+ r_mask = 0x000000ff;
+ g_mask = 0x0000ff00;
+ b_mask = 0x00ff0000;
+ }
break;
default:
g_assert_not_reached();
@@ -388,8 +422,7 @@ gst_v4l2src_v4l2fourcc_to_caps (guint32 fourcc,
}
caps = GST_CAPS_NEW("v4l2src_caps",
- "video/raw",
- "format", GST_PROPS_FOURCC(fcc),
+ "video/x-raw-rgb",
"bpp", GST_PROPS_INT(bpp),
"depth", GST_PROPS_INT(depth),
"red_mask", GST_PROPS_INT(r_mask),
@@ -428,7 +461,7 @@ gst_v4l2src_v4l2fourcc_to_caps (guint32 fourcc,
}
caps = GST_CAPS_NEW("v4l2src_caps",
- "video/raw",
+ "video/x-raw-yuv",
"format", GST_PROPS_FOURCC(fcc),
NULL);
break;
@@ -456,7 +489,7 @@ gst_v4l2src_v4l2fourcc_to_caps (guint32 fourcc,
g_free(string_format);
} else {
caps = GST_CAPS_NEW("v4l2src_caps",
- "video/raw",
+ "video/x-raw-yuv",
"format",GST_PROPS_FOURCC(fourcc),
NULL);
}
@@ -467,16 +500,19 @@ gst_v4l2src_v4l2fourcc_to_caps (guint32 fourcc,
caps->properties = gst_props_empty_new();
gst_props_add_entry(caps->properties, width);
gst_props_add_entry(caps->properties, height);
+ gst_props_add_entry(caps->properties, fps);
return caps;
}
-#define gst_v4l2src_v4l2fourcc_to_caps_fixed(f, width, height,c) \
+#define gst_v4l2src_v4l2fourcc_to_caps_fixed(f, width, height, fps, c) \
gst_v4l2src_v4l2fourcc_to_caps(f, \
gst_props_entry_new("width", \
GST_PROPS_INT(width)), \
gst_props_entry_new("height", \
GST_PROPS_INT(height)), \
+ gst_props_entry_new("framerate", \
+ GST_PROPS_FLOAT(fps)), \
c)
#define gst_v4l2src_v4l2fourcc_to_caps_range(f, min_w, max_w, min_h, max_h, c) \
@@ -485,6 +521,8 @@ gst_v4l2src_v4l2fourcc_to_caps (guint32 fourcc,
GST_PROPS_INT_RANGE(min_w, max_w)), \
gst_props_entry_new("height", \
GST_PROPS_INT_RANGE(min_h, max_h)), \
+ gst_props_entry_new("framerate", \
+ GST_PROPS_FLOAT_RANGE(0, G_MAXFLOAT)), \
c)
static struct v4l2_fmtdesc *
@@ -496,9 +534,12 @@ gst_v4l2_caps_to_v4l2fourcc (GstV4l2Src *v4l2src,
struct v4l2_fmtdesc *end_fmt = NULL;
const gchar *format = gst_caps_get_mime(caps);
- if (!strcmp(format, "video/raw")) {
- /* non-compressed */
- gst_caps_get_fourcc_int(caps, "format", &fourcc);
+ if (!strcmp(format, "video/x-raw-yuv") ||
+ !strcmp(format, "video/x-raw-rgb")) {
+ if (!strcmp(format, "video/x-raw-rgb"))
+ fourcc = GST_MAKE_FOURCC('R','G','B',' ');
+ else
+ gst_caps_get_fourcc_int(caps, "format", &fourcc);
switch (fourcc) {
case GST_MAKE_FOURCC('I','4','2','0'):
@@ -666,6 +707,7 @@ gst_v4l2src_srcconnect (GstPad *pad,
lastcaps = gst_v4l2src_v4l2fourcc_to_caps_fixed(format->pixelformat,
v4l2src->format.fmt.pix.width,
v4l2src->format.fmt.pix.height,
+ gst_v4l2src_get_fps(v4l2src),
format->flags & V4L2_FMT_FLAG_COMPRESSED);
ret_val = gst_pad_try_set_caps(v4l2src->srcpad,