configure: Require libtheora >= 1.1

It's more than a year old at the time of the next -base release,
has many encoder and decoder improvements and gets us rid of a lot
of #ifdefs
This commit is contained in:
Sebastian Dröge 2010-07-04 20:14:34 +02:00
parent ecea88e0d2
commit 5318e71b4d
2 changed files with 1 additions and 25 deletions

View file

@ -728,11 +728,7 @@ AG_GST_CHECK_FEATURE(PANGO, [Pango font rendering], pango, [
dnl *** theora ***
translit(dnm, m, l) AM_CONDITIONAL(USE_THEORA, true)
AG_GST_CHECK_FEATURE(THEORA, [Xiph Theora video codec], theora, [
dnl theora uses pkg-config version incorrectly, for pkg-config:
dnl 1.0 < 1.0RCX < 1.0alphaX < 1.0betaX < 1.0.0
dnl theoraenc and theoradec appeared in 1.0beta3
AG_GST_PKG_CHECK_MODULES(THEORA, theoradec theoraenc)
AG_GST_PKG_CHECK_MODULES(THEORA, theoradec >= 1.1 theoraenc >= 1.1)
])
dnl *** vorbis ***

View file

@ -376,17 +376,12 @@ theora_enc_reset (GstTheoraEnc * enc)
enc->encoder = th_encode_alloc (&enc->info);
/* We ensure this function cannot fail. */
g_assert (enc->encoder != NULL);
#ifdef TH_ENCCTL_SET_SPLEVEL
th_encode_ctl (enc->encoder, TH_ENCCTL_SET_SPLEVEL, &enc->speed_level,
sizeof (enc->speed_level));
#endif
#ifdef TH_ENCCTL_SET_VP3_COMPATIBLE
th_encode_ctl (enc->encoder, TH_ENCCTL_SET_VP3_COMPATIBLE,
&enc->vp3_compatible, sizeof (enc->vp3_compatible));
#endif
rate_flags = 0;
#ifdef TH_ENCCTL_SET_RATE_FLAGS
if (enc->drop_frames)
rate_flags |= TH_RATECTL_DROP_FRAMES;
if (enc->drop_frames)
@ -395,16 +390,13 @@ theora_enc_reset (GstTheoraEnc * enc)
rate_flags |= TH_RATECTL_CAP_UNDERFLOW;
th_encode_ctl (enc->encoder, TH_ENCCTL_SET_RATE_FLAGS,
&rate_flags, sizeof (rate_flags));
#endif
#ifdef TH_ENCCTL_SET_RATE_BUFFER
if (enc->rate_buffer) {
th_encode_ctl (enc->encoder, TH_ENCCTL_SET_RATE_BUFFER,
&enc->rate_buffer, sizeof (enc->rate_buffer));
} else {
/* FIXME */
}
#endif
keyframe_force = enc->keyframe_auto ?
enc->keyframe_force : enc->keyframe_freq;
@ -1150,34 +1142,22 @@ theora_enc_set_property (GObject * object, guint prop_id,
enc->keyframe_force = g_value_get_int (value);
break;
case PROP_SPEEDLEVEL:
#ifdef TH_ENCCTL_SET_SPLEVEL
enc->speed_level = g_value_get_int (value);
#endif
break;
case PROP_VP3_COMPATIBLE:
#ifdef TH_ENCCTL_SET_VP3_COMPATIBLE
enc->vp3_compatible = g_value_get_boolean (value);
#endif
break;
case PROP_DROP_FRAMES:
#ifdef TH_ENCCTL_SET_RATE_FLAGS
enc->drop_frames = g_value_get_boolean (value);
#endif
break;
case PROP_CAP_OVERFLOW:
#ifdef TH_ENCCTL_SET_RATE_FLAGS
enc->cap_overflow = g_value_get_boolean (value);
#endif
break;
case PROP_CAP_UNDERFLOW:
#ifdef TH_ENCCTL_SET_RATE_FLAGS
enc->cap_underflow = g_value_get_boolean (value);
#endif
break;
case PROP_RATE_BUFFER:
#ifdef TH_ENCCTL_SET_RATE_BUFFER
enc->rate_buffer = g_value_get_int (value);
#endif
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);