Commit b0055313 authored by Ronald S. Bultje's avatar Ronald S. Bultje

New mimetypes gone into effect today - this commit changes all old mimetypes...

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
parent d4d75746
......@@ -409,34 +409,35 @@ dnl FIXME: add check if this platform can support linking to a
dnl non-PIC libXv, if not then don not use Xv.
dnl FIXME: perhaps warn user if they have a shared libXv since
dnl this is an error until XFree86 starts shipping one
translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions], xvideosink, [
if test -z $X_DISPLAY_MISSING; then
HAVE_XVIDEO=yes
translit(dnm, m, l) AM_CONDITIONAL(USE_XFREE, true)
GST_CHECK_FEATURE(XFREE, [X11 XFree86], xvideosink-X, [
if test "-DX_DISPLAY_MISSING" = "$X_CFLAGS"; then
HAVE_XFREE=no
else
HAVE_XVIDEO=no
HAVE_XFREE=yes
fi
])
dnl Check for Xv extension
if test x$HAVE_XVIDEO = xyes; then
AC_CHECK_LIB(Xv_pic, XvQueryExtension, HAVE_XV="yes", HAVE_XV="no", $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
if test x$HAVE_XV = xyes; then
AC_DEFINE(HAVE_XV, 1, [Define if Xv extension is available])
translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions], xvideosink-Xv, [
if test x$HAVE_XFREE = xyes; then
AC_CHECK_LIB(Xv_pic, XvQueryExtension,
HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
XVIDEO_LIBS="-lXv_pic -lXext"
AC_SUBST(XVIDEO_LIBS)
else
AC_CHECK_LIB(Xv, XvQueryExtension, HAVE_XVIDEO="yes", HAVE_XVIDEO="no", $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
if test x$HAVE_XV = xyes; then
AC_DEFINE(HAVE_XV, 1, [Define if Xv extension is available])
dnl try again using something else if we didn't find it first
if test x$HAVE_XVIDEO = xno; then
AC_CHECK_LIB(Xv, XvQueryExtension,
HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
XVIDEO_LIBS="-lXv -lXext"
AC_SUBST(XVIDEO_LIBS)
fi
AC_SUBST(XVIDEO_LIBS)
fi
fi
])
dnl Next, check for the optional libraries:
dnl These are all libraries used in building plug-ins
......
......@@ -1006,7 +1006,7 @@ gst_alsa_src_set_caps (GstAlsaSrc *src, gboolean aggressive)
GstCaps *all_caps, *caps, *walk;
gint channels, min_channels, max_channels;
gint rate, min_rate, max_rate;
gint i, law, endian, width, depth;
gint i, endian, width, depth;
gboolean sign;
GstAlsa *this = GST_ALSA (src);
......@@ -1022,9 +1022,7 @@ gst_alsa_src_set_caps (GstAlsaSrc *src, gboolean aggressive)
}
/* construct caps */
caps = GST_CAPS_NEW ("alsasrc caps", "audio/raw",
"format", GST_PROPS_STRING ("int"),
"law", GST_PROPS_INT (0),
caps = GST_CAPS_NEW ("alsasrc caps", "audio/x-raw-int",
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
"signed", GST_PROPS_BOOLEAN (TRUE),
"width", GST_PROPS_INT (16),
......@@ -1037,13 +1035,12 @@ gst_alsa_src_set_caps (GstAlsaSrc *src, gboolean aggressive)
/* now try to find the best match */
walk = all_caps;
while (walk) {
gst_caps_get (walk, "law", &law, "signed", &sign, "width", &width, "depth", &depth, NULL);
gst_caps_get (walk, "signed", &sign, "width", &width, "depth", &depth, NULL);
if (gst_caps_has_property (walk, "endianness")) {
gst_caps_get_int (walk, "endianness", &endian);
} else {
endian = G_BYTE_ORDER;
}
gst_caps_set (caps, "law", GST_PROPS_INT (law));
gst_caps_set (caps, "endianness", GST_PROPS_INT (endian));
gst_caps_set (caps, "width", GST_PROPS_INT (width));
gst_caps_set (caps, "depth", GST_PROPS_INT (depth));
......@@ -1057,8 +1054,8 @@ gst_alsa_src_set_caps (GstAlsaSrc *src, gboolean aggressive)
gst_caps_set (caps, "rate", GST_PROPS_INT (rate));
for (channels = aggressive ? max_channels : MIN (max_channels, 2); channels >= min_channels; channels--) {
gst_caps_set (caps, "channels", GST_PROPS_INT (channels));
GST_DEBUG ("trying new caps: law %d, %ssigned, endianness: %d, width %d, depth %d, channels %d, rate %d\n",
law, sign ? "" : "un", endian, width, depth, channels, rate);
GST_DEBUG ("trying new caps: %ssigned, endianness: %d, width %d, depth %d, channels %d, rate %d\n",
sign ? "" : "un", endian, width, depth, channels, rate);
if (gst_pad_try_set_caps (this->pad[0], caps) != GST_PAD_LINK_REFUSED)
gst_alsa_link (this->pad[0], caps);
......@@ -1234,25 +1231,23 @@ found_channel:
static GstAlsaFormat *
gst_alsa_get_format (GstCaps *caps)
{
const gchar *format_name;
const gchar *mimetype;
GstAlsaFormat *ret;
if (!(ret = g_new (GstAlsaFormat, 1)))
return NULL;
/* we have to differentiate between int and float formats */
if (!gst_caps_get_string (caps, "format", &format_name))
goto error;
mimetype = gst_caps_get_mime (caps);
if (strncmp (format_name, "int", 3) == 0) {
if (strcmp (mimetype, "audio/x-raw-int") == 0) {
gboolean sign;
gint width, depth, endianness, law;
gint width, depth, endianness;
/* extract the needed information from the caps */
if (!gst_caps_get (caps,
"width", &width,
"depth", &depth,
"law", &law,
"signed", &sign,
NULL))
goto error;
......@@ -1268,33 +1263,13 @@ gst_alsa_get_format (GstCaps *caps)
}
/* find corresponding alsa format */
switch (law) {
case 0:
ret->format = snd_pcm_build_linear_format (depth, width, sign ? 0 : 1, endianness == G_LITTLE_ENDIAN ? 0 : 1);
break;
case 1:
if (width == 8 && depth == 8 && sign == FALSE) {
ret->format = SND_PCM_FORMAT_MU_LAW;
break;
} else {
goto error;
}
case 2:
if (width == 8 && depth == 8 && sign == FALSE) {
ret->format = SND_PCM_FORMAT_A_LAW;
break;
} else {
goto error;
}
default:
goto error;
}
} else if (strncmp (format_name, "float", 5) == 0) {
gchar *layout;
ret->format = snd_pcm_build_linear_format (depth, width, sign ? 0 : 1, endianness == G_LITTLE_ENDIAN ? 0 : 1);
} else if (strcmp (mimetype, "audio/x-raw-float") == 0) {
gint depth;
gfloat intercept, slope;
/* get layout */
if (!gst_caps_get (caps, "layout", &layout,
if (!gst_caps_get (caps, "depth", &depth,
"intercept", &intercept,
"slope", &slope,
NULL))
......@@ -1303,7 +1278,7 @@ gst_alsa_get_format (GstCaps *caps)
goto error;
}
/* match layout to format wrt to endianness */
if (strncmp (layout, "gfloat", 6) == 0) {
if (depth == 32) {
if (G_BYTE_ORDER == G_LITTLE_ENDIAN) {
ret->format = SND_PCM_FORMAT_FLOAT_LE;
} else if (G_BYTE_ORDER == G_BIG_ENDIAN) {
......@@ -1311,7 +1286,7 @@ gst_alsa_get_format (GstCaps *caps)
} else {
ret->format = SND_PCM_FORMAT_FLOAT;
}
} else if (strncmp (layout, "gdouble", 7) == 0) {
} else if (depth == 64) {
if (G_BYTE_ORDER == G_LITTLE_ENDIAN) {
ret->format = SND_PCM_FORMAT_FLOAT64_LE;
} else if (G_BYTE_ORDER == G_BIG_ENDIAN) {
......@@ -1322,7 +1297,11 @@ gst_alsa_get_format (GstCaps *caps)
} else {
goto error;
}
}
} else if (!strcmp (mimetype, "audio/x-alaw")) {
ret->format = SND_PCM_FORMAT_A_LAW;
} else if (!strcmp (mimetype, "audio/x-mulaw")) {
ret->format = SND_PCM_FORMAT_MU_LAW;
}
/* get rate and channels */
if (!gst_caps_get (caps, "rate", &ret->rate,
......@@ -1347,18 +1326,22 @@ gst_alsa_formats_match (GstAlsaFormat *one, GstAlsaFormat *two)
(one->channels == two->channels);
}
/* get props for a spec */
static GstProps *
gst_alsa_get_props (snd_pcm_format_t format)
static GstCaps *
gst_alsa_get_caps_internal (snd_pcm_format_t format)
{
gchar *name = snd_pcm_format_name (format);
if (format == SND_PCM_FORMAT_A_LAW) {
return gst_props_new ("format", GST_PROPS_STRING ("int"),
return GST_CAPS_NEW (name, "audio/x-alaw",
"format", GST_PROPS_STRING ("int"),
"law", GST_PROPS_INT(2),
"width", GST_PROPS_INT(8),
"depth", GST_PROPS_INT(8),
"signed", GST_PROPS_BOOLEAN (FALSE),
NULL);
} else if (format == SND_PCM_FORMAT_MU_LAW) {
return gst_props_new ("format", GST_PROPS_STRING ("int"),
return GST_CAPS_NEW (name, "audio/x-mulaw",
"format", GST_PROPS_STRING ("int"),
"law", GST_PROPS_INT(1),
"width", GST_PROPS_INT(8),
"depth", GST_PROPS_INT(8),
......@@ -1387,16 +1370,17 @@ gst_alsa_get_props (snd_pcm_format_t format)
break;
}
}
return props;
return GST_CAPS_NEW (name, "audio/x-raw-int", props);
} else if (snd_pcm_format_float (format)) {
/* no float with non-platform endianness */
if (!snd_pcm_format_cpu_endian (format))
return NULL;
return gst_props_new ("format", GST_PROPS_STRING ("float"),
"layout", GST_PROPS_STRING (snd_pcm_format_width (format) == 64 ? "gdouble" : "gfloat"),
"intercept", GST_PROPS_FLOAT (0),
"slope", GST_PROPS_FLOAT (1),
return GST_CAPS_NEW (name, "audio/x-raw-float",
"depth", GST_PROPS_INT (snd_pcm_format_width (format)),
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
"intercept", GST_PROPS_FLOAT (0.),
"slope", GST_PROPS_FLOAT (1.),
NULL);
}
return NULL;
......@@ -1433,23 +1417,24 @@ gst_alsa_caps (snd_pcm_format_t format, gint rate, gint channels)
if (format != SND_PCM_FORMAT_UNKNOWN) {
/* there are some caps set already */
GstProps *props = gst_alsa_get_props (format);
ret_caps = gst_alsa_get_caps_internal (format);
/* we can never use a format we can't set caps for */
g_assert (props != NULL);
g_assert (ret_caps != NULL);
g_assert (ret_caps->properties != NULL);
add_channels (props, rate, -1, channels, -1);
ret_caps = gst_caps_new (g_strdup (snd_pcm_format_name (format)), "audio/raw", props);
add_channels (ret_caps->properties, rate, -1, channels, -1);
} else {
int i;
GstProps *props;
GstCaps *temp;
for (i = 0; i <= SND_PCM_FORMAT_LAST; i++) {
props = gst_alsa_get_props (i);
temp = gst_alsa_get_caps_internal (i);
/* can be NULL, because not all alsa formats can be specified as caps */
if (props != NULL) {
add_channels (props, rate, -1, channels, -1);
ret_caps = gst_caps_append (ret_caps, gst_caps_new (g_strdup (snd_pcm_format_name (i)),
"audio/raw", props));
if (temp != NULL && temp->properties != NULL) {
add_channels (temp->props, rate, -1, channels, -1);
ret_caps = gst_caps_append (ret_caps, temp);
}
}
}
......@@ -1485,18 +1470,18 @@ gst_alsa_get_caps (GstPad *pad, GstCaps *caps)
max_channels = -1;
} else {
ERROR_CHECK (snd_pcm_hw_params_get_channels_min (hw_params, &min_rate),
"Couldn't get minimum channel count for device %s: %s", this->device);
"Coulödn't get minimum channel count for device %s: %s", this->device);
ERROR_CHECK (snd_pcm_hw_params_get_channels_max (hw_params, &max_rate),
"Couldn't get maximum channel count for device %s: %s", this->device);
"Coulödn't get maximum channel count for device %s: %s", this->device);
min_channels = min_rate;
max_channels = max_rate > GST_ALSA_MAX_CHANNELS ? GST_ALSA_MAX_CHANNELS : max_rate;
}
ERROR_CHECK (snd_pcm_hw_params_get_rate_min (hw_params, &min_rate, &i),
"Couldn't get minimum rate for device %s: %s", this->device);
"Coulödn't get minimum rate for device %s: %s", this->device);
min_rate = min_rate < GST_ALSA_MIN_RATE ? GST_ALSA_MIN_RATE : min_rate + i;
ERROR_CHECK (snd_pcm_hw_params_get_rate_max (hw_params, &max_rate, &i),
"Couldn't get maximum rate for device %s: %s", this->device);
"Coulödn't get maximum rate for device %s: %s", this->device);
max_rate = max_rate > GST_ALSA_MAX_RATE ? GST_ALSA_MAX_RATE : max_rate + i;
snd_pcm_format_mask_alloca (&mask);
......
......@@ -60,9 +60,7 @@ GST_PAD_TEMPLATE_FACTORY (cdparanoia_src_factory,
GST_PAD_ALWAYS,
GST_CAPS_NEW (
"cdparanoia_src",
"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),
......
......@@ -36,7 +36,7 @@ vorbis_caps_factory (void)
return
gst_caps_new (
"vorbis_vorbis",
"application/x-ogg",
"application/ogg",
NULL);
}
......@@ -46,10 +46,8 @@ raw_caps_factory (void)
return
gst_caps_new (
"vorbis_raw",
"audio/raw",
"audio/x-raw-int",
gst_props_new (
"format", GST_PROPS_STRING ("int"),
"law", GST_PROPS_INT (0),
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
"signed", GST_PROPS_BOOLEAN (TRUE),
"width", GST_PROPS_INT (16),
......@@ -65,10 +63,12 @@ raw_caps2_factory (void)
return
gst_caps_new (
"vorbis_raw_float",
"audio/raw",
"audio/x-raw-float",
gst_props_new (
"format", GST_PROPS_STRING ("float"),
"layout", GST_PROPS_STRING ("IEEE"),
"depth", GST_PROPS_INT (32),
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
"slope", GST_PROPS_FLOAT (1.),
"intercept", GST_PROPS_FLOAT (0.),
"rate", GST_PROPS_INT_RANGE (11025, 48000),
"channels", GST_PROPS_INT (2),
NULL));
......@@ -76,7 +76,7 @@ raw_caps2_factory (void)
static GstTypeDefinition vorbisdefinition = {
"vorbis_audio/x-ogg",
"application/x-ogg",
"application/ogg",
".ogg",
vorbis_type_find,
};
......@@ -98,7 +98,7 @@ vorbis_type_find (GstBuffer *buf, gpointer private)
head = GUINT32_FROM_BE (*((guint32 *)data));
if (head == 0x4F676753) {
return gst_caps_new ("vorbis_type_find", "application/x-ogg", NULL);
return gst_caps_new ("vorbis_type_find", "application/ogg", NULL);
} else {
/* checks for existance of vorbis identification header in case
* there's an ID3 tag */
......@@ -110,7 +110,7 @@ vorbis_type_find (GstBuffer *buf, gpointer private)
data[offset+4] == 'b' &&
data[offset+5] == 'i' &&
data[offset+6] == 's' ) {
return gst_caps_new ("vorbis_type_find", "application/x-ogg", NULL);
return gst_caps_new ("vorbis_type_find", "application/ogg", NULL);
}
}
}
......
......@@ -148,7 +148,7 @@ gst_vorbisenc_class_init (VorbisEncClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_QUALITY,
g_param_spec_float ("quality", "Quality",
"Specify quality instead of specifying a particular bitrate.",
-1.0, 10.0, QUALITY_DEFAULT, G_PARAM_READWRITE));
0.0, 1.0, QUALITY_DEFAULT, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SERIAL,
g_param_spec_int ("serial", "Serial", "Specify a serial number for the stream. (-1 is random)",
-1, G_MAXINT, -1, G_PARAM_READWRITE));
......
......@@ -467,9 +467,7 @@ gst_vorbisfile_new_link (VorbisFile *vorbisfile, gint link)
gst_vorbisfile_update_streaminfo (vorbisfile, link);
caps = GST_CAPS_NEW ("vorbisdec_src",
"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),
......
......@@ -52,8 +52,6 @@
#define GST_AUDIO_INT_PAD_TEMPLATE_PROPS \
gst_props_new (\
"format", GST_PROPS_STRING ("int"),\
"law", GST_PROPS_INT (0),\
"endianness", GST_PROPS_INT (G_BYTE_ORDER),\
"signed", GST_PROPS_LIST (\
GST_PROPS_BOOLEAN (TRUE),\
......@@ -70,8 +68,6 @@
#define GST_AUDIO_INT_MONO_PAD_TEMPLATE_PROPS \
gst_props_new (\
"format", GST_PROPS_STRING ("int"),\
"law", GST_PROPS_INT (0),\
"endianness", GST_PROPS_INT (G_BYTE_ORDER),\
"signed", GST_PROPS_LIST (\
GST_PROPS_BOOLEAN (TRUE),\
......@@ -88,8 +84,8 @@
#define GST_AUDIO_FLOAT_MONO_PAD_TEMPLATE_PROPS \
gst_props_new (\
"format", GST_PROPS_STRING ("float"),\
"layout", GST_PROPS_STRING ("gfloat"),\
"depth", GST_PROPS_INT (32),\
"endianness", GST_PROPS_INT (G_BYTE_ORDER),\
"intercept", GST_PROPS_FLOAT (0.0),\
"slope", GST_PROPS_FLOAT (1.0),\
"rate", GST_PROPS_INT_RANGE (GST_AUDIO_MIN_RATE, \
......
......@@ -20,31 +20,36 @@
#include "video.h"
#define NUM_UNITS 1000000000
/* This is simply a convenience function, nothing more or less */
gdouble
gfloat
gst_video_frame_rate (GstPad *pad)
{
GstFormat dest_format = GST_FORMAT_DEFAULT;
gint64 dest_value = 0;
gdouble fps;
/* do a convert request on the source pad */
if (!gst_pad_convert(pad,
GST_FORMAT_TIME, GST_SECOND * NUM_UNITS,
&dest_format, &dest_value))
{
g_warning("gstvideo: pad %s:%s failed to convert time to unit!\n",
GST_ELEMENT_NAME(gst_pad_get_parent (pad)), GST_PAD_NAME(pad));
gfloat fps = 0.;
GstCaps *caps;
/* get pad caps */
caps = GST_PAD_CAPS (pad);
if (caps == NULL) {
g_warning ("gstvideo: failed to get caps of pad %s:%s",
GST_ELEMENT_NAME (gst_pad_get_parent (pad)),
GST_PAD_NAME(pad));
return 0.;
}
if (!gst_caps_has_property_typed (caps, "framerate",
GST_PROPS_FLOAT_TYPE)) {
g_warning ("gstvideo: failed to get framerate property of pad %s:%s",
GST_ELEMENT_NAME (gst_pad_get_parent (pad)),
GST_PAD_NAME (pad));
return 0.;
}
fps = ((gdouble) dest_value) / NUM_UNITS;
gst_caps_get_float (caps, "framerate", &fps);
GST_DEBUG ("Framerate request on pad %s:%s - %f fps",
GST_ELEMENT_NAME(gst_pad_get_parent (pad)), GST_PAD_NAME(pad), fps);
GST_DEBUG ("Framerate request on pad %s:%s: %f",
GST_ELEMENT_NAME (gst_pad_get_parent (pad)),
GST_PAD_NAME(pad), fps);
return fps;
}
......@@ -56,28 +61,37 @@ gst_video_get_size (GstPad *pad,
{
GstCaps *caps;
g_return_val_if_fail(pad != NULL, FALSE);
g_return_val_if_fail (pad != NULL, FALSE);
caps = GST_PAD_CAPS(pad);
if (!caps) {
g_warning("gstvideo: failed to get caps of pad %s:%s",
GST_ELEMENT_NAME(gst_pad_get_parent (pad)), GST_PAD_NAME(pad));
caps = GST_PAD_CAPS (pad);
if (caps == NULL) {
g_warning ("gstvideo: failed to get caps of pad %s:%s",
GST_ELEMENT_NAME (gst_pad_get_parent (pad)),
GST_PAD_NAME(pad));
return FALSE;
}
if (!gst_caps_has_property(caps, "width") ||
!gst_caps_has_property(caps, "height")) {
g_warning("gstvideo: resulting caps doesn't have width/height properties");
if (!gst_caps_has_property_typed (caps, "width",
GST_PROPS_INT_TYPE) ||
!gst_caps_has_property_typed (caps, "height",
GST_PROPS_FLOAT_TYPE)) {
g_warning ("gstvideo: failed to get size properties on pad %s:%s",
GST_ELEMENT_NAME (gst_pad_get_parent (pad)),
GST_PAD_NAME(pad));
return FALSE;
}
if (width)
gst_caps_get_int(caps, "width", width);
gst_caps_get_int (caps, "width", width);
if (height)
gst_caps_get_int(caps, "height", height);
gst_caps_get_int (caps, "height", height);
GST_DEBUG ("size request on pad %s:%s: %dx%d",
GST_ELEMENT_NAME(gst_pad_get_parent (pad)), GST_PAD_NAME(pad),
width?*width:0, height?*height:0);
GST_ELEMENT_NAME (gst_pad_get_parent (pad)),
GST_PAD_NAME (pad),
width ? *width : -1,
height ? *height : -1);
return TRUE;
}
......
......@@ -23,7 +23,155 @@
#include <gst/gst.h>
gdouble gst_video_frame_rate (GstPad *pad);
#if (G_BYTE_ORDER == G_BIG_ENDIAN)
#define R_MASK_32 0xff000000
#define G_MASK_32 0x00ff0000
#define B_MASK_32 0x0000ff00
#define R_MASK_24 0xff0000
#define G_MASK_24 0x00ff00
#define B_MASK_24 0x0000ff
#else
#define R_MASK_32 0x000000ff
#define G_MASK_32 0x0000ff00
#define B_MASK_32 0x00ff0000
#define R_MASK_24 0x0000ff
#define G_MASK_24 0x00ff00
#define B_MASK_24 0xff0000
#endif
#define R_MASK_16 0xf800
#define G_MASK_16 0x07e0
#define B_MASK_16 0x001f
#define R_MASK_15 0x8c00
#define G_MASK_15 0x03e0
#define B_MASK_15 0x001f
#define SIZE_RANGE GST_PROPS_INT_RANGE (16, 4096)
#define FPS_RANGE GST_PROPS_FLOAT_RANGE (0, G_MAXFLOAT)
/* properties for pad templates */
#define GST_VIDEO_RGB_PAD_TEMPLATE_PROPS_24_32 \
gst_props_new ( \
"bpp", GST_PROPS_LIST ( \
GST_PROPS_INT (24), \
GST_PROPS_INT (32) \
), \
"depth", GST_PROPS_LIST ( \
GST_PROPS_INT (24), \
GST_PROPS_INT (32) \
), \
"endianness", GST_PROPS_INT (G_BIG_ENDIAN), \
"red_mask", GST_PROPS_LIST ( \
GST_PROPS_INT (R_MASK_32), \
GST_PROPS_INT (R_MASK_24) \
), \
"green_mask", GST_PROPS_LIST ( \
GST_PROPS_INT (G_MASK_32), \
GST_PROPS_INT (G_MASK_24) \
), \
"blue_mask", GST_PROPS_LIST ( \
GST_PROPS_INT (B_MASK_32), \
GST_PROPS_INT (B_MASK_24) \
), \
"width", SIZE_RANGE, \
"height", SIZE_RANGE, \
"framerate", FPS_RANGE, \
NULL)
#define GST_VIDEO_RGB_PAD_TEMPLATE_PROPS_32 \
gst_props_new ( \
"bpp", GST_PROPS_INT (32), \
"depth", GST_PROPS_INT (32), \
"endianness", GST_PROPS_INT (G_BIG_ENDIAN), \
"red_mask", GST_PROPS_INT (R_MASK_32), \
"green_mask", GST_PROPS_INT (G_MASK_32), \
"blue_mask", GST_PROPS_INT (B_MASK_32), \
"width", SIZE_RANGE, \
"height", SIZE_RANGE, \
"framerate", FPS_RANGE, \
NULL)
#define GST_VIDEO_RGB_PAD_TEMPLATE_PROPS_24 \
gst_props_new ( \
"bpp", GST_PROPS_INT (24), \
"depth", GST_PROPS_INT (24), \
"endianness", GST_PROPS_INT (G_BIG_ENDIAN), \
"red_mask", GST_PROPS_INT (R_MASK_24),