mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
faad: Use the public headers if faad2 >= 2.7. Fixes #573369
Since faad2-2.7, the public function prototypes are in sync with the actual function prototypes used internally in libfaad.
This commit is contained in:
parent
1546625294
commit
bdc9c5618a
1 changed files with 15 additions and 0 deletions
|
@ -42,6 +42,7 @@
|
||||||
* Note: The prototypes don't need to be defined conditionaly, as the cpp will
|
* Note: The prototypes don't need to be defined conditionaly, as the cpp will
|
||||||
* do that for us.
|
* do that for us.
|
||||||
*/
|
*/
|
||||||
|
#if FAAD2_MINOR_VERSION < 7
|
||||||
#ifdef FAAD_IS_NEAAC
|
#ifdef FAAD_IS_NEAAC
|
||||||
#define NeAACDecInit NeAACDecInit_no_definition
|
#define NeAACDecInit NeAACDecInit_no_definition
|
||||||
#define NeAACDecInit2 NeAACDecInit2_no_definition
|
#define NeAACDecInit2 NeAACDecInit2_no_definition
|
||||||
|
@ -49,7 +50,11 @@
|
||||||
#define faacDecInit faacDecInit_no_definition
|
#define faacDecInit faacDecInit_no_definition
|
||||||
#define faacDecInit2 faacDecInit2_no_definition
|
#define faacDecInit2 faacDecInit2_no_definition
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* FAAD2_MINOR_VERSION < 7 */
|
||||||
|
|
||||||
#include "gstfaad.h"
|
#include "gstfaad.h"
|
||||||
|
|
||||||
|
#if FAAD2_MINOR_VERSION < 7
|
||||||
#ifdef FAAD_IS_NEAAC
|
#ifdef FAAD_IS_NEAAC
|
||||||
#undef NeAACDecInit
|
#undef NeAACDecInit
|
||||||
#undef NeAACDecInit2
|
#undef NeAACDecInit2
|
||||||
|
@ -62,6 +67,8 @@ extern long faacDecInit (faacDecHandle, guint8 *, guint32, guint32 *, guint8 *);
|
||||||
extern gint8 faacDecInit2 (faacDecHandle, guint8 *, guint32,
|
extern gint8 faacDecInit2 (faacDecHandle, guint8 *, guint32,
|
||||||
guint32 *, guint8 *);
|
guint32 *, guint8 *);
|
||||||
|
|
||||||
|
#endif /* FAAD2_MINOR_VERSION < 7 */
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (faad_debug);
|
GST_DEBUG_CATEGORY_STATIC (faad_debug);
|
||||||
#define GST_CAT_DEFAULT faad_debug
|
#define GST_CAT_DEFAULT faad_debug
|
||||||
|
|
||||||
|
@ -302,7 +309,11 @@ gst_faad_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
faad->packetised = FALSE;
|
faad->packetised = FALSE;
|
||||||
|
|
||||||
if ((value = gst_structure_get_value (str, "codec_data"))) {
|
if ((value = gst_structure_get_value (str, "codec_data"))) {
|
||||||
|
#if FAAD2_MINOR_VERSION >= 7
|
||||||
|
unsigned long samplerate;
|
||||||
|
#else
|
||||||
guint32 samplerate;
|
guint32 samplerate;
|
||||||
|
#endif
|
||||||
guint8 channels;
|
guint8 channels;
|
||||||
guint8 *cdata;
|
guint8 *cdata;
|
||||||
guint csize;
|
guint csize;
|
||||||
|
@ -1284,7 +1295,11 @@ gst_faad_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
|
|
||||||
/* init if not already done during capsnego */
|
/* init if not already done during capsnego */
|
||||||
if (!faad->init) {
|
if (!faad->init) {
|
||||||
|
#if FAAD2_MINOR_VERSION >= 7
|
||||||
|
unsigned long rate;
|
||||||
|
#else
|
||||||
guint32 rate;
|
guint32 rate;
|
||||||
|
#endif
|
||||||
guint8 ch;
|
guint8 ch;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (faad, "initialising ...");
|
GST_DEBUG_OBJECT (faad, "initialising ...");
|
||||||
|
|
Loading…
Reference in a new issue