mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
parent
14fb720149
commit
1eb3f7f41f
3 changed files with 20 additions and 0 deletions
|
@ -639,6 +639,13 @@ AG_GST_CHECK_FEATURE(CELT, [celt], celt, [
|
|||
dnl to prevent an error
|
||||
true
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES(CELT_0_11, celt >= 0.11.0, [
|
||||
AC_DEFINE([HAVE_CELT_0_11], 1, [Define if libcelt 0.11 is installed])
|
||||
], [
|
||||
dnl to prevent an error
|
||||
true
|
||||
])
|
||||
AC_SUBST(CELT_CFLAGS)
|
||||
AC_SUBST(CELT_LIBS)
|
||||
])
|
||||
|
|
|
@ -510,10 +510,15 @@ celt_dec_chain_parse_header (GstCeltDec * dec, GstBuffer * buf)
|
|||
goto mode_init_failed;
|
||||
|
||||
/* initialize the decoder */
|
||||
#ifdef HAVE_CELT_0_11
|
||||
dec->state =
|
||||
celt_decoder_create_custom (dec->mode, dec->header.nb_channels, &error);
|
||||
#else
|
||||
#ifdef HAVE_CELT_0_7
|
||||
dec->state = celt_decoder_create (dec->mode, dec->header.nb_channels, &error);
|
||||
#else
|
||||
dec->state = celt_decoder_create (dec->mode);
|
||||
#endif
|
||||
#endif
|
||||
if (!dec->state)
|
||||
goto init_failed;
|
||||
|
|
|
@ -629,10 +629,14 @@ gst_celt_enc_setup (GstCeltEnc * enc)
|
|||
if (!enc->mode)
|
||||
goto mode_initialization_failed;
|
||||
|
||||
#ifdef HAVE_CELT_0_11
|
||||
celt_header_init (&enc->header, enc->mode, enc->frame_size, enc->channels);
|
||||
#else
|
||||
#ifdef HAVE_CELT_0_7
|
||||
celt_header_init (&enc->header, enc->mode, enc->channels);
|
||||
#else
|
||||
celt_header_init (&enc->header, enc->mode);
|
||||
#endif
|
||||
#endif
|
||||
enc->header.nb_channels = enc->channels;
|
||||
|
||||
|
@ -642,10 +646,14 @@ gst_celt_enc_setup (GstCeltEnc * enc)
|
|||
celt_mode_info (enc->mode, CELT_GET_FRAME_SIZE, &enc->frame_size);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CELT_0_11
|
||||
enc->state = celt_encoder_create_custom (enc->mode, enc->channels, &error);
|
||||
#else
|
||||
#ifdef HAVE_CELT_0_7
|
||||
enc->state = celt_encoder_create (enc->mode, enc->channels, &error);
|
||||
#else
|
||||
enc->state = celt_encoder_create (enc->mode);
|
||||
#endif
|
||||
#endif
|
||||
if (!enc->state)
|
||||
goto encoder_creation_failed;
|
||||
|
|
Loading…
Reference in a new issue