ext/audiofile/gstafsrc.c: Remove old debug output
Original commit message from CVS: * ext/audiofile/gstafsrc.c: (gst_afsrc_get): Remove old debug output * ext/dv/gstdvdec.c: (gst_dvdec_quality_get_type), (gst_dvdec_class_init), (gst_dvdec_loop), (gst_dvdec_change_state), (gst_dvdec_set_property), (gst_dvdec_get_property): Change the quality setting to an enum, so it works from gst-launch Don't renegotiate a non-linked pad. Allows audio only decoding. * gst/deinterlace/gstdeinterlace.c: (gst_deinterlace_getcaps), (gst_deinterlace_link), (gst_deinterlace_init): * gst/videodrop/gstvideodrop.c: (gst_videodrop_getcaps), (gst_videodrop_link): Some caps negotiation fixes
This commit is contained in:
parent
8492044248
commit
ea235cb0ee
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
|||||||
|
2004-05-13 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
* ext/audiofile/gstafsrc.c: (gst_afsrc_get):
|
||||||
|
Remove old debug output
|
||||||
|
* ext/dv/gstdvdec.c: (gst_dvdec_quality_get_type),
|
||||||
|
(gst_dvdec_class_init), (gst_dvdec_loop), (gst_dvdec_change_state),
|
||||||
|
(gst_dvdec_set_property), (gst_dvdec_get_property):
|
||||||
|
Change the quality setting to an enum, so it works from gst-launch
|
||||||
|
Don't renegotiate a non-linked pad. Allows audio only decoding.
|
||||||
|
* gst/deinterlace/gstdeinterlace.c: (gst_deinterlace_getcaps),
|
||||||
|
(gst_deinterlace_link), (gst_deinterlace_init):
|
||||||
|
* gst/videodrop/gstvideodrop.c: (gst_videodrop_getcaps),
|
||||||
|
(gst_videodrop_link):
|
||||||
|
Some caps negotiation fixes
|
||||||
|
|
||||||
2004-05-12 Stephane Loeuillet <stephane.loeuillet@tiscali.fr>
|
2004-05-12 Stephane Loeuillet <stephane.loeuillet@tiscali.fr>
|
||||||
|
|
||||||
* ext/tarkin/gsttarkin.c :
|
* ext/tarkin/gsttarkin.c :
|
||||||
|
@ -67,6 +67,17 @@ enum
|
|||||||
/* FILL ME */
|
/* FILL ME */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const gint qualities[] = {
|
||||||
|
DV_QUALITY_DC,
|
||||||
|
DV_QUALITY_AC_1,
|
||||||
|
DV_QUALITY_AC_2,
|
||||||
|
DV_QUALITY_DC | DV_QUALITY_COLOR,
|
||||||
|
DV_QUALITY_AC_1 | DV_QUALITY_COLOR,
|
||||||
|
DV_QUALITY_AC_2 | DV_QUALITY_COLOR
|
||||||
|
};
|
||||||
|
|
||||||
|
#define DV_QUALITY_DEFAULT 5
|
||||||
|
|
||||||
/* The PadFactory structures describe what pads the element has or
|
/* The PadFactory structures describe what pads the element has or
|
||||||
* can have. They can be quite complex, but for this dvdec plugin
|
* can have. They can be quite complex, but for this dvdec plugin
|
||||||
* they are rather simple.
|
* they are rather simple.
|
||||||
@ -138,14 +149,17 @@ gst_dvdec_quality_get_type (void)
|
|||||||
static GType qtype = 0;
|
static GType qtype = 0;
|
||||||
|
|
||||||
if (qtype == 0) {
|
if (qtype == 0) {
|
||||||
static const GFlagsValue values[] = {
|
static const GEnumValue values[] = {
|
||||||
{DV_QUALITY_COLOR, "DV_QUALITY_COLOR", "Color or monochrome decoding"},
|
{0, "DV_QUALITY_FASTEST", "Fastest decoding, low-quality mono"},
|
||||||
{DV_QUALITY_AC_1, "DV_QUALITY_AC_1", "AC 1 something"},
|
{1, "DV_QUALITY_AC_1", "Mono decoding using the first AC coefficient"},
|
||||||
{DV_QUALITY_AC_2, "DV_QUALITY_AC_2", "AC 2 something"},
|
{2, "DV_QUALITY_AC_2", "Highest quality mono decoding"},
|
||||||
{0, NULL, NULL}
|
{3, "DV_QUALITY_DC|DV_QUALITY_COLOUR", "Fastest colour decoding"},
|
||||||
|
{4, "DV_QUALITY_AC_1|DV_QUALITY_COLOUR",
|
||||||
|
"Colour, using only the first AC coefficient"},
|
||||||
|
{5, "DV_QUALITY_BEST", "Highest quality colour decoding"},
|
||||||
};
|
};
|
||||||
|
|
||||||
qtype = g_flags_register_static ("GstDVDecQualityFlags", values);
|
qtype = g_enum_register_static ("GstDVDecQualityEnum", values);
|
||||||
}
|
}
|
||||||
return qtype;
|
return qtype;
|
||||||
}
|
}
|
||||||
@ -268,8 +282,8 @@ gst_dvdec_class_init (GstDVDecClass * klass)
|
|||||||
g_param_spec_boolean ("clamp_chroma", "Clamp chroma", "Clamp chroma",
|
g_param_spec_boolean ("clamp_chroma", "Clamp chroma", "Clamp chroma",
|
||||||
FALSE, G_PARAM_READWRITE));
|
FALSE, G_PARAM_READWRITE));
|
||||||
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_QUALITY,
|
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_QUALITY,
|
||||||
g_param_spec_flags ("quality", "Quality", "Decoding quality",
|
g_param_spec_enum ("quality", "Quality", "Decoding quality",
|
||||||
GST_TYPE_DVDEC_QUALITY, DV_QUALITY_BEST, G_PARAM_READWRITE));
|
GST_TYPE_DVDEC_QUALITY, DV_QUALITY_DEFAULT, G_PARAM_READWRITE));
|
||||||
|
|
||||||
gobject_class->set_property = gst_dvdec_set_property;
|
gobject_class->set_property = gst_dvdec_set_property;
|
||||||
gobject_class->get_property = gst_dvdec_get_property;
|
gobject_class->get_property = gst_dvdec_get_property;
|
||||||
@ -772,7 +786,6 @@ gst_dvdec_loop (GstElement * element)
|
|||||||
guint8 *inframe;
|
guint8 *inframe;
|
||||||
gint height;
|
gint height;
|
||||||
guint32 length, got_bytes;
|
guint32 length, got_bytes;
|
||||||
GstFormat format;
|
|
||||||
guint64 ts;
|
guint64 ts;
|
||||||
gdouble fps;
|
gdouble fps;
|
||||||
|
|
||||||
@ -806,16 +819,6 @@ gst_dvdec_loop (GstElement * element)
|
|||||||
height = (dvdec->PAL ? PAL_HEIGHT : NTSC_HEIGHT);
|
height = (dvdec->PAL ? PAL_HEIGHT : NTSC_HEIGHT);
|
||||||
length = (dvdec->PAL ? PAL_BUFFER : NTSC_BUFFER);
|
length = (dvdec->PAL ? PAL_BUFFER : NTSC_BUFFER);
|
||||||
|
|
||||||
if ((dvdec->framerate != fps) || (dvdec->height != height)) {
|
|
||||||
dvdec->height = height;
|
|
||||||
dvdec->framerate = fps;
|
|
||||||
|
|
||||||
if (GST_PAD_LINK_FAILED (gst_pad_renegotiate (dvdec->videosrcpad))) {
|
|
||||||
GST_ELEMENT_ERROR (dvdec, CORE, NEGOTIATION, (NULL), (NULL));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (length != dvdec->length) {
|
if (length != dvdec->length) {
|
||||||
dvdec->length = length;
|
dvdec->length = length;
|
||||||
gst_bytestream_size_hint (dvdec->bs, length);
|
gst_bytestream_size_hint (dvdec->bs, length);
|
||||||
@ -828,9 +831,7 @@ gst_dvdec_loop (GstElement * element)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
format = GST_FORMAT_TIME;
|
ts = dvdec->next_ts;
|
||||||
gst_pad_query (dvdec->videosrcpad, GST_QUERY_POSITION, &format, &ts);
|
|
||||||
|
|
||||||
dvdec->next_ts += GST_SECOND / dvdec->framerate;
|
dvdec->next_ts += GST_SECOND / dvdec->framerate;
|
||||||
|
|
||||||
dv_parse_packs (dvdec->decoder, GST_BUFFER_DATA (buf));
|
dv_parse_packs (dvdec->decoder, GST_BUFFER_DATA (buf));
|
||||||
@ -881,6 +882,16 @@ gst_dvdec_loop (GstElement * element)
|
|||||||
guint8 *outframe_ptrs[3];
|
guint8 *outframe_ptrs[3];
|
||||||
gint outframe_pitches[3];
|
gint outframe_pitches[3];
|
||||||
|
|
||||||
|
if ((dvdec->framerate != fps) || (dvdec->height != height)) {
|
||||||
|
dvdec->height = height;
|
||||||
|
dvdec->framerate = fps;
|
||||||
|
|
||||||
|
if (GST_PAD_LINK_FAILED (gst_pad_renegotiate (dvdec->videosrcpad))) {
|
||||||
|
GST_ELEMENT_ERROR (dvdec, CORE, NEGOTIATION, (NULL), (NULL));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
outbuf = gst_buffer_new_and_alloc ((720 * height) * dvdec->bpp);
|
outbuf = gst_buffer_new_and_alloc ((720 * height) * dvdec->bpp);
|
||||||
|
|
||||||
outframe = GST_BUFFER_DATA (outbuf);
|
outframe = GST_BUFFER_DATA (outbuf);
|
||||||
@ -927,12 +938,12 @@ gst_dvdec_change_state (GstElement * element)
|
|||||||
dvdec->bs = gst_bytestream_new (dvdec->sinkpad);
|
dvdec->bs = gst_bytestream_new (dvdec->sinkpad);
|
||||||
dvdec->decoder =
|
dvdec->decoder =
|
||||||
dv_decoder_new (0, dvdec->clamp_luma, dvdec->clamp_chroma);
|
dv_decoder_new (0, dvdec->clamp_luma, dvdec->clamp_chroma);
|
||||||
dvdec->decoder->quality = dvdec->quality;
|
dvdec->decoder->quality = qualities[dvdec->quality];
|
||||||
/*
|
/*
|
||||||
* Enable this function call when libdv2 0.100 or higher is more
|
* Enable this function call when libdv2 0.100 or higher is more
|
||||||
* common
|
* common
|
||||||
*/
|
*/
|
||||||
/* dv_set_quality (dvdec->decoder, dvdec->quality); */
|
/* dv_set_quality (dvdec->decoder, qualities [dvdec->quality]); */
|
||||||
break;
|
break;
|
||||||
case GST_STATE_PAUSED_TO_PLAYING:
|
case GST_STATE_PAUSED_TO_PLAYING:
|
||||||
break;
|
break;
|
||||||
@ -977,7 +988,9 @@ gst_dvdec_set_property (GObject * object, guint prop_id, const GValue * value,
|
|||||||
dvdec->clamp_chroma = g_value_get_boolean (value);
|
dvdec->clamp_chroma = g_value_get_boolean (value);
|
||||||
break;
|
break;
|
||||||
case ARG_QUALITY:
|
case ARG_QUALITY:
|
||||||
dvdec->quality = g_value_get_flags (value);
|
dvdec->quality = g_value_get_enum (value);
|
||||||
|
if ((dvdec->quality < 0) || (dvdec->quality > 5))
|
||||||
|
dvdec->quality = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
@ -1004,7 +1017,7 @@ gst_dvdec_get_property (GObject * object, guint prop_id, GValue * value,
|
|||||||
g_value_set_boolean (value, dvdec->clamp_chroma);
|
g_value_set_boolean (value, dvdec->clamp_chroma);
|
||||||
break;
|
break;
|
||||||
case ARG_QUALITY:
|
case ARG_QUALITY:
|
||||||
g_value_set_flags (value, dvdec->quality);
|
g_value_set_enum (value, dvdec->quality);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user