Commit 292fec2a 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 a8183e9a
...@@ -409,34 +409,35 @@ dnl FIXME: add check if this platform can support linking to a ...@@ -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 non-PIC libXv, if not then don not use Xv.
dnl FIXME: perhaps warn user if they have a shared libXv since dnl FIXME: perhaps warn user if they have a shared libXv since
dnl this is an error until XFree86 starts shipping one dnl this is an error until XFree86 starts shipping one
translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true) translit(dnm, m, l) AM_CONDITIONAL(USE_XFREE, true)
GST_CHECK_FEATURE(XFREE, [X11 XFree86], xvideosink-X, [
GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions], xvideosink, [ if test "-DX_DISPLAY_MISSING" = "$X_CFLAGS"; then
if test -z $X_DISPLAY_MISSING; then HAVE_XFREE=no
HAVE_XVIDEO=yes
else else
HAVE_XVIDEO=no HAVE_XFREE=yes
fi fi
]) ])
dnl Check for Xv extension dnl Check for Xv extension
translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
if test x$HAVE_XVIDEO = xyes; then GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions], xvideosink-Xv, [
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_XFREE = xyes; then
AC_CHECK_LIB(Xv_pic, XvQueryExtension,
if test x$HAVE_XV = xyes; then HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
AC_DEFINE(HAVE_XV, 1, [Define if Xv extension is available]) $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
XVIDEO_LIBS="-lXv_pic -lXext" XVIDEO_LIBS="-lXv_pic -lXext"
AC_SUBST(XVIDEO_LIBS)
else dnl try again using something else if we didn't find it first
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_XVIDEO = xno; then
if test x$HAVE_XV = xyes; then AC_CHECK_LIB(Xv, XvQueryExtension,
AC_DEFINE(HAVE_XV, 1, [Define if Xv extension is available]) HAVE_XVIDEO="yes", HAVE_XVIDEO="no",
$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
XVIDEO_LIBS="-lXv -lXext" XVIDEO_LIBS="-lXv -lXext"
AC_SUBST(XVIDEO_LIBS)
fi fi
AC_SUBST(XVIDEO_LIBS)
fi fi
fi ])
dnl Next, check for the optional libraries: dnl Next, check for the optional libraries:
dnl These are all libraries used in building plug-ins dnl These are all libraries used in building plug-ins
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <sys/time.h> #include <sys/time.h>
#include "gstaasink.h" #include "gstaasink.h"
#include <gst/video/video.h>
/* elementfactory information */ /* elementfactory information */
static GstElementDetails gst_aasink_details = { static GstElementDetails gst_aasink_details = {
...@@ -65,10 +66,11 @@ GST_PAD_TEMPLATE_FACTORY (sink_template, ...@@ -65,10 +66,11 @@ GST_PAD_TEMPLATE_FACTORY (sink_template,
"sink", "sink",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_CAPS_NEW ( gst_caps_new (
"aasink_caps", "aasink_caps",
"video/raw", "video/x-raw-yuv",
"format", GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")) GST_VIDEO_YUV_PAD_TEMPLATE_PROPS (
GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")))
) )
) )
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
*/ */
static GstElementDetails dvdec_details = { static GstElementDetails dvdec_details = {
"DV (smpte314) decoder plugin", "DV (smpte314) decoder plugin",
"Codec/Video/Decoder/DV", "Codec/Video/Decoder",
"LGPL", "LGPL",
"Uses libdv to decode DV video (libdv.sourceforge.net)", "Uses libdv to decode DV video (libdv.sourceforge.net)",
VERSION, VERSION,
...@@ -77,11 +77,8 @@ GST_PAD_TEMPLATE_FACTORY (sink_temp, ...@@ -77,11 +77,8 @@ GST_PAD_TEMPLATE_FACTORY (sink_temp,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_CAPS_NEW ( GST_CAPS_NEW (
"dv_dec_sink", "dv_dec_sink",
"video/dv", "video/x-dv",
"format", GST_PROPS_LIST ( "systemstream", GST_PROPS_BOOLEAN (TRUE)
GST_PROPS_STRING ("PAL"),
GST_PROPS_STRING ("NTSC")
)
) )
) )
...@@ -92,36 +89,55 @@ GST_PAD_TEMPLATE_FACTORY (video_src_temp, ...@@ -92,36 +89,55 @@ GST_PAD_TEMPLATE_FACTORY (video_src_temp,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_CAPS_NEW ( GST_CAPS_NEW (
"dv_dec_src", "dv_dec_src",
"video/raw", "video/x-raw-yuv",
"format", GST_PROPS_FOURCC (GST_MAKE_FOURCC ('Y','U','Y','2')), "format", GST_PROPS_FOURCC (GST_MAKE_FOURCC ('Y','U','Y','2')),
"width", GST_PROPS_INT (720), "width", GST_PROPS_INT (720),
"height", GST_PROPS_INT_RANGE (NTSC_HEIGHT, PAL_HEIGHT) "height", GST_PROPS_LIST (
GST_PROPS_INT (NTSC_HEIGHT),
GST_PROPS_INT (PAL_HEIGHT)
),
"framerate", GST_PROPS_LIST (
GST_PROPS_FLOAT (25.),
GST_PROPS_FLOAT (30/1.001)
)
), ),
GST_CAPS_NEW ( GST_CAPS_NEW (
"dv_dec_src", "dv_dec_src",
"video/raw", "video/x-raw-rgb",
"format", GST_PROPS_FOURCC(GST_MAKE_FOURCC('R','G','B',' ')),
"bpp", GST_PROPS_INT(32), "bpp", GST_PROPS_INT(32),
"depth", GST_PROPS_INT(32), "depth", GST_PROPS_INT(32),
"endianness", GST_PROPS_INT (G_LITTLE_ENDIAN), "endianness", GST_PROPS_INT (G_BIG_ENDIAN),
"red_mask", GST_PROPS_INT(0x00ff0000), "red_mask", GST_PROPS_INT(0x000000ff),
"green_mask", GST_PROPS_INT(0x0000ff00), "green_mask", GST_PROPS_INT(0x0000ff00),
"blue_mask", GST_PROPS_INT(0x000000ff), "blue_mask", GST_PROPS_INT(0x00ff00),
"width", GST_PROPS_INT (720), "width", GST_PROPS_INT (720),
"height", GST_PROPS_INT_RANGE (NTSC_HEIGHT, PAL_HEIGHT) "height", GST_PROPS_LIST (
GST_PROPS_INT (NTSC_HEIGHT),
GST_PROPS_INT (PAL_HEIGHT)
),
"framerate", GST_PROPS_LIST (
GST_PROPS_FLOAT (25.),
GST_PROPS_FLOAT (30/1.001)
)
), ),
GST_CAPS_NEW ( GST_CAPS_NEW (
"dv_dec_src", "dv_dec_src",
"video/raw", "video/x-raw-rgb",
"format", GST_PROPS_FOURCC(GST_MAKE_FOURCC('R','G','B',' ')),
"bpp", GST_PROPS_INT(24), "bpp", GST_PROPS_INT(24),
"depth", GST_PROPS_INT(24), "depth", GST_PROPS_INT(24),
"endianness", GST_PROPS_INT (G_LITTLE_ENDIAN), "endianness", GST_PROPS_INT (G_BIG_ENDIAN),
"red_mask", GST_PROPS_INT(0x0000ff), "red_mask", GST_PROPS_INT(0x0000ff),
"green_mask", GST_PROPS_INT(0x00ff00), "green_mask", GST_PROPS_INT(0x00ff00),
"blue_mask", GST_PROPS_INT(0xff0000), "blue_mask", GST_PROPS_INT(0xff0000),
"width", GST_PROPS_INT (720), "width", GST_PROPS_INT (720),
"height", GST_PROPS_INT_RANGE (NTSC_HEIGHT, PAL_HEIGHT) "height", GST_PROPS_LIST (
GST_PROPS_INT (NTSC_HEIGHT),
GST_PROPS_INT (PAL_HEIGHT)
),
"framerate", GST_PROPS_LIST (
GST_PROPS_FLOAT (25.),
GST_PROPS_FLOAT (30/1.001)
)
) )
) )
...@@ -131,9 +147,7 @@ GST_PAD_TEMPLATE_FACTORY ( audio_src_temp, ...@@ -131,9 +147,7 @@ GST_PAD_TEMPLATE_FACTORY ( audio_src_temp,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_CAPS_NEW ( GST_CAPS_NEW (
"arts_sample", "arts_sample",
"audio/raw", "audio/x-raw-int",
"format", GST_PROPS_STRING ("int"),
"law", GST_PROPS_INT (0),
"depth", GST_PROPS_INT (16), "depth", GST_PROPS_INT (16),
"width", GST_PROPS_INT (16), "width", GST_PROPS_INT (16),
"signed", GST_PROPS_BOOLEAN (TRUE), "signed", GST_PROPS_BOOLEAN (TRUE),
...@@ -160,15 +174,15 @@ dv_type_find (GstBuffer *buf, gpointer private) ...@@ -160,15 +174,15 @@ dv_type_find (GstBuffer *buf, gpointer private)
format = "NTSC"; format = "NTSC";
new = GST_CAPS_NEW ("dv_type_find", new = GST_CAPS_NEW ("dv_type_find",
"video/dv", "video/x-dv",
"format", GST_PROPS_STRING (format) "systemstream", GST_PROPS_BOOLEAN (TRUE)
); );
} }
return new; return new;
} }
static GstTypeDefinition dv_definition = { static GstTypeDefinition dv_definition = {
"dv_video/dv", "video/dv", ".dv", dv_type_find "dv_video/dv", "video/x-dv", ".dv", dv_type_find
}; };
#define GST_TYPE_DVDEC_QUALITY (gst_dvdec_quality_get_type()) #define GST_TYPE_DVDEC_QUALITY (gst_dvdec_quality_get_type())
...@@ -690,6 +704,7 @@ gst_dvdec_loop (GstElement *element) ...@@ -690,6 +704,7 @@ gst_dvdec_loop (GstElement *element)
guint32 length, got_bytes; guint32 length, got_bytes;
GstFormat format; GstFormat format;
guint64 ts; guint64 ts;
gfloat fps;
dvdec = GST_DVDEC (element); dvdec = GST_DVDEC (element);
...@@ -704,6 +719,7 @@ gst_dvdec_loop (GstElement *element) ...@@ -704,6 +719,7 @@ gst_dvdec_loop (GstElement *element)
dvdec->PAL = dv_system_50_fields (dvdec->decoder); dvdec->PAL = dv_system_50_fields (dvdec->decoder);
dvdec->framerate = (dvdec->PAL ? 2500 : 2997); dvdec->framerate = (dvdec->PAL ? 2500 : 2997);
fps = (dvdec->PAL ? 25. : 30/1.001);
dvdec->height = height = (dvdec->PAL ? PAL_HEIGHT : NTSC_HEIGHT); dvdec->height = height = (dvdec->PAL ? PAL_HEIGHT : NTSC_HEIGHT);
length = (dvdec->PAL ? PAL_BUFFER : NTSC_BUFFER); length = (dvdec->PAL ? PAL_BUFFER : NTSC_BUFFER);
...@@ -728,12 +744,18 @@ gst_dvdec_loop (GstElement *element) ...@@ -728,12 +744,18 @@ gst_dvdec_loop (GstElement *element)
allowed = gst_pad_get_allowed_caps (dvdec->videosrcpad); allowed = gst_pad_get_allowed_caps (dvdec->videosrcpad);
/* try to fix our height */ /* try to fix our height */
trylist = gst_caps_intersect (allowed, trylist = gst_caps_intersect (allowed, gst_caps_append (
GST_CAPS_NEW ( GST_CAPS_NEW (
"dvdec_negotiate", "dvdec_negotiate",
"video/raw", "video/x-raw-yuv",
"height", GST_PROPS_INT (height) "height", GST_PROPS_INT (height),
)); "framerate", GST_PROPS_FLOAT (fps)
), GST_CAPS_NEW (
"dvdec_negotiate",
"video/x-raw-rgb",
"height", GST_PROPS_INT (height),
"framerate", GST_PROPS_FLOAT (fps)
)));
/* prepare for looping */ /* prepare for looping */
trylist = gst_caps_normalize (trylist); trylist = gst_caps_normalize (trylist);
...@@ -792,10 +814,8 @@ gst_dvdec_loop (GstElement *element) ...@@ -792,10 +814,8 @@ gst_dvdec_loop (GstElement *element)
gst_pad_try_set_caps (dvdec->audiosrcpad, gst_pad_try_set_caps (dvdec->audiosrcpad,
GST_CAPS_NEW ( GST_CAPS_NEW (
"dvdec_audio_caps", "dvdec_audio_caps",
"audio/raw", "audio/x-raw-int",
"format", GST_PROPS_STRING ("int"),
"rate", GST_PROPS_INT (dvdec->decoder->audio->frequency), "rate", GST_PROPS_INT (dvdec->decoder->audio->frequency),
"law", GST_PROPS_INT (0),
"depth", GST_PROPS_INT (16), "depth", GST_PROPS_INT (16),
"width", GST_PROPS_INT (16), "width", GST_PROPS_INT (16),
"signed", GST_PROPS_BOOLEAN (TRUE), "signed", GST_PROPS_BOOLEAN (TRUE),
...@@ -1012,4 +1032,3 @@ GstPluginDesc plugin_desc = { ...@@ -1012,4 +1032,3 @@ GstPluginDesc plugin_desc = {
"dvdec", "dvdec",
plugin_init plugin_init
}; };
...@@ -103,30 +103,27 @@ GST_PAD_TEMPLATE_FACTORY (src_factory, ...@@ -103,30 +103,27 @@ GST_PAD_TEMPLATE_FACTORY (src_factory,
GST_PAD_SRC, /* type of the pad */ GST_PAD_SRC, /* type of the pad */
GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */ GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */
GST_CAPS_NEW ( GST_CAPS_NEW (
"esdmon_src8", /* the name of the caps */ "esdmon_src", /* the name of the caps */
"audio/raw", /* the mime type of the caps */ "audio/x-raw-int", /* the mime type of the caps */
/* Properties follow: */ /* Properties follow: */
"format", GST_PROPS_STRING ("int"),
"law", GST_PROPS_INT (0),
"endianness", GST_PROPS_INT (G_BYTE_ORDER), "endianness", GST_PROPS_INT (G_BYTE_ORDER),
"signed", GST_PROPS_BOOLEAN (TRUE), "signed", GST_PROPS_LIST (
"width", GST_PROPS_INT (8), GST_PROPS_BOOLEAN (TRUE),
"depth", GST_PROPS_INT (8), GST_PROPS_BOOLEAN (FALSE)
),
"width", GST_PROPS_LIST (
GST_PROPS_INT (8),
GST_PROPS_INT (16)
),
"depth", GST_PROPS_LIST (
GST_PROPS_INT (8),
GST_PROPS_INT (16)
),
"rate", GST_PROPS_INT_RANGE (8000, 96000), "rate", GST_PROPS_INT_RANGE (8000, 96000),
"channels", GST_PROPS_LIST (GST_PROPS_INT (1), GST_PROPS_INT (2)) "channels", GST_PROPS_LIST (
), GST_PROPS_INT (1),
GST_CAPS_NEW ( GST_PROPS_INT (2)
"esdmon_src16", /* the name of the caps */ )
"audio/raw", /* the mime type of the caps */
/* Properties follow: */
"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),
"depth", GST_PROPS_INT (16),
"rate", GST_PROPS_INT_RANGE (8000, 96000),
"channels", GST_PROPS_LIST (GST_PROPS_INT (1), GST_PROPS_INT (2))
) )
); );
...@@ -298,15 +295,14 @@ gst_esdmon_get (GstPad *pad) ...@@ -298,15 +295,14 @@ gst_esdmon_get (GstPad *pad)
return NULL; return NULL;
} }
if (!GST_PAD_CAPS (pad)) { if (!GST_PAD_CAPS (pad)) {
gint sign = (esdmon->depth == 8 ? FALSE : TRUE);
/* set caps on src pad */ /* set caps on src pad */
if (gst_pad_try_set_caps (esdmon->srcpad, if (gst_pad_try_set_caps (esdmon->srcpad,
GST_CAPS_NEW ( GST_CAPS_NEW (
"oss_src", "oss_src",
"audio/raw", "audio/x-raw-int",
"format", GST_PROPS_STRING ("int"),
"law", GST_PROPS_INT (0), /*FIXME */
"endianness", GST_PROPS_INT (G_BYTE_ORDER), /*FIXME */ "endianness", GST_PROPS_INT (G_BYTE_ORDER), /*FIXME */
"signed", GST_PROPS_BOOLEAN (TRUE), /*FIXME */ "signed", GST_PROPS_BOOLEAN (sign), /*FIXME */
"width", GST_PROPS_INT (esdmon->depth), "width", GST_PROPS_INT (esdmon->depth),
"depth", GST_PROPS_INT (esdmon->depth), "depth", GST_PROPS_INT (esdmon->depth),
"rate", GST_PROPS_INT (esdmon->frequency), "rate", GST_PROPS_INT (esdmon->frequency),
......
...@@ -55,29 +55,27 @@ GST_PAD_TEMPLATE_FACTORY (sink_factory, ...@@ -55,29 +55,27 @@ GST_PAD_TEMPLATE_FACTORY (sink_factory,
GST_PAD_SINK, /* type of the pad */ GST_PAD_SINK, /* type of the pad */
GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */ GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */
GST_CAPS_NEW ( GST_CAPS_NEW (
"esdsink_sink8", /* the name of the caps */ "esdsink_sink", /* the name of the caps */
"audio/raw", /* the mime type of the caps */ "audio/x-raw-int", /* the mime type of the caps */
/* Properties follow: */ /* Properties follow: */
"format", GST_PROPS_STRING ("int"),
"law", GST_PROPS_INT (0),
"endianness", GST_PROPS_INT (G_BYTE_ORDER), "endianness", GST_PROPS_INT (G_BYTE_ORDER),
"width", GST_PROPS_INT (8), "signed", GST_PROPS_LIST (
"depth", GST_PROPS_INT (8), GST_PROPS_BOOLEAN (TRUE),
GST_PROPS_BOOLEAN (FALSE)
),
"width", GST_PROPS_LIST (
GST_PROPS_INT (8),
GST_PROPS_INT (16)
),
"depth", GST_PROPS_LIST (
GST_PROPS_INT (8),
GST_PROPS_INT (16)
),
"rate", GST_PROPS_INT_RANGE (8000, 96000), "rate", GST_PROPS_INT_RANGE (8000, 96000),
"channels", GST_PROPS_LIST (GST_PROPS_INT (1), GST_PROPS_INT (2)) "channels", GST_PROPS_LIST (
), GST_PROPS_INT (1),
GST_CAPS_NEW ( GST_PROPS_INT (2)
"esdsink_sink16", /* the name of the caps */ )
"audio/raw", /* the mime type of the caps */
/* Properties follow: */
"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),
"depth", GST_PROPS_INT (16),
"rate", GST_PROPS_INT_RANGE (8000, 96000),
"channels", GST_PROPS_LIST (GST_PROPS_INT (1), GST_PROPS_INT (2))
) )
); );
...@@ -173,6 +171,7 @@ static GstPadLinkReturn ...@@ -173,6 +171,7 @@ static GstPadLinkReturn
gst_esdsink_sinkconnect (GstPad *pad, GstCaps *caps) gst_esdsink_sinkconnect (GstPad *pad, GstCaps *caps)
{ {
GstEsdsink *esdsink; GstEsdsink *esdsink;
gboolean sign;
esdsink = GST_ESDSINK (gst_pad_get_parent (pad)); esdsink = GST_ESDSINK (gst_pad_get_parent (pad));
...@@ -180,9 +179,16 @@ gst_esdsink_sinkconnect (GstPad *pad, GstCaps *caps) ...@@ -180,9 +179,16 @@ gst_esdsink_sinkconnect (GstPad *pad, GstCaps *caps)
return GST_PAD_LINK_DELAYED; return GST_PAD_LINK_DELAYED;
gst_caps_get_int (caps, "depth", &esdsink->depth); gst_caps_get_int (caps, "depth", &esdsink->depth);
gst_caps_get_int (caps, "signed", &sign);
gst_caps_get_int (caps, "channels", &esdsink->channels); gst_caps_get_int (caps, "channels", &esdsink->channels);
gst_caps_get_int (caps, "rate", &esdsink->frequency); gst_caps_get_int (caps, "rate", &esdsink->frequency);
/* only u8/s16 */
if ((sign == FALSE && esdsink->depth != 8) ||
(sign == TRUE && esdsink->depth != 16)) {
return GST_PAD_LINK_REFUSED;
}
gst_esdsink_close_audio (esdsink); gst_esdsink_close_audio (esdsink);
if (gst_esdsink_open_audio (esdsink)) { if (gst_esdsink_open_audio (esdsink)) {
esdsink->negotiated = TRUE; esdsink->negotiated = TRUE;
......
...@@ -37,8 +37,11 @@ flac_caps_factory (void) ...@@ -37,8 +37,11 @@ flac_caps_factory (void)
return return
gst_caps_new ( gst_caps_new (
"flac_flac", "flac_flac",
"application/x-flac", "audio/x-flac",
NULL); /*gst_props_new (
"rate", GST_PROPS_INT_RANGE (11025, 48000),
"channels", GST_PROPS_INT_RANGE (1, 2),
NULL)*/ NULL);
} }
static GstCaps* static GstCaps*
...@@ -47,10 +50,8 @@ raw_caps_factory (void) ...@@ -47,10 +50,8 @@ raw_caps_factory (void)
return return
gst_caps_new ( gst_caps_new (
"flac_raw", "flac_raw",
"audio/raw", "audio/x-raw-int",
gst_props_new ( gst_props_new (
"format", GST_PROPS_STRING ("int"),
"law", GST_PROPS_INT (0),
"endianness", GST_PROPS_INT (G_BYTE_ORDER), "endianness", GST_PROPS_INT (G_BYTE_ORDER),
"signed", GST_PROPS_BOOLEAN (TRUE), "signed", GST_PROPS_BOOLEAN (TRUE),
"width", GST_PROPS_INT (16), "width", GST_PROPS_INT (16),
...@@ -61,8 +62,8 @@ raw_caps_factory (void) ...@@ -61,8 +62,8 @@ raw_caps_factory (void)
} }
static GstTypeDefinition flacdefinition = { static GstTypeDefinition flacdefinition = {
"flac_application/x-flac", "flac_audio/x-flac",
"application/x-flac", "audio/x-flac",
".flac", ".flac",
flac_type_find, flac_type_find,
}; };
...@@ -75,7 +76,7 @@ flac_type_find (GstBuffer *buf, gpointer private) ...@@ -75,7 +76,7 @@ flac_type_find (GstBuffer *buf, gpointer private)
if (head != 0x664C6143) if (head != 0x664C6143)
return NULL; return NULL;
return gst_caps_new ("flac_type_find", "application/x-flac", NULL); return gst_caps_new ("flac_type_find", "audio/x-flac", NULL);
} }
......
...@@ -460,9 +460,7 @@ gst_flacdec_write (const FLAC__SeekableStreamDecoder *decoder, ...@@ -460,9 +460,7 @@ gst_flacdec_write (const FLAC__SeekableStreamDecoder *decoder,
gst_pad_try_set_caps (flacdec->srcpad, gst_pad_try_set_caps (flacdec->srcpad,
GST_CAPS_NEW ( GST_CAPS_NEW (
"flac_caps", "flac_caps",
"audio/raw", "audio/x-raw-int",
"format", GST_PROPS_STRING ("int"),
"law", GST_PROPS_INT (0),
"endianness", GST_PROPS_INT (G_BYTE_ORDER), "endianness", GST_PROPS_INT (G_BYTE_ORDER),
"signed", GST_PROPS_BOOLEAN (TRUE), "signed", GST_PROPS_BOOLEAN (TRUE),
"width", GST_PROPS_INT (depth), "width", GST_PROPS_INT (depth),
......
...@@ -325,6 +325,7 @@ gst_flacenc_dispose (GObject *object) ...@@ -325,6 +325,7 @@ gst_flacenc_dispose (GObject *object)
static GstPadLinkReturn static GstPadLinkReturn
gst_flacenc_sinkconnect (GstPad *pad, GstCaps *caps) gst_flacenc_sinkconnect (GstPad *pad, GstCaps *caps)
{ {
GstPadLinkReturn ret;
FlacEnc *flacenc; FlacEnc *flacenc;
flacenc = GST_FLACENC (gst_pad_get_parent (pad)); flacenc = GST_FLACENC (gst_pad_get_parent (pad));
...@@ -336,6 +337,15 @@ gst_flacenc_sinkconnect (GstPad *pad, GstCaps *caps) ...@@ -336,6 +337,15 @@ gst_flacenc_sinkconnect (GstPad *pad, GstCaps *caps)
gst_caps_get_int (caps, "depth", &flacenc->depth); gst_caps_get_int (caps, "depth", &flacenc->depth);
gst_caps_get_int (caps, "rate", &flacenc->sample_rate); gst_caps_get_int (caps, "rate", &flacenc->sample_rate);
caps = GST_CAPS_NEW ("flacenc_srccaps",
"audio/x-flac",
"channels", GST_PROPS_INT (flacenc->channels),
"rate", GST_PROPS_INT (flacenc->sample_rate));
ret = gst_pad_try_set_caps (flacenc->srcpad, caps);
if (ret <= 0) {
return ret;
}
FLAC__seekable_stream_encoder_set_bits_per_sample (flacenc->encoder, FLAC__seekable_stream_encoder_set_bits_per_sample (flacenc->encoder,
flacenc->depth); flacenc->depth);
FLAC__seekable_stream_encoder_set_sample_rate (flacenc->encoder, FLAC__seekable_stream_encoder_set_sample_rate (flacenc->encoder,
...@@ -345,7 +355,7 @@ gst_flacenc_sinkconnect (GstPad *pad, GstCaps *caps) ...@@ -345,7 +355,7 @@ gst_flacenc_sinkconnect (GstPad *pad, GstCaps *caps)
flacenc->negotiated = TRUE; flacenc->negotiated = TRUE;
return GST_PAD_LINK_OK; return ret;
} }