1 /* GStreamer openaptx audio encoder 2 * 3 * Copyright (C) 2020 Igor V. Kovalenko <igor.v.kovalenko@gmail.com> 4 * Copyright (C) 2020 Thomas Weißschuh <thomas@t-8ch.de> 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 * 20 */ 21 #ifndef __GST_OPENAPTXENC_H__ 22 #define __GST_OPENAPTXENC_H__ 23 24 #include <gst/gst.h> 25 #include <gst/audio/audio.h> 26 27 #ifdef USE_FREEAPTX 28 #include <freeaptx.h> 29 #else 30 #include <openaptx.h> 31 #endif 32 33 G_BEGIN_DECLS 34 35 #define GST_TYPE_OPENAPTX_ENC (gst_openaptx_enc_get_type()) 36 G_DECLARE_FINAL_TYPE (GstOpenaptxEnc, gst_openaptx_enc, GST, OPENAPTX_ENC, GstAudioEncoder) 37 38 struct _GstOpenaptxEnc { 39 GstAudioEncoder audio_encoder; 40 41 gboolean hd; 42 43 struct aptx_context *aptx_c; 44 }; 45 46 GST_ELEMENT_REGISTER_DECLARE(openaptxenc); 47 48 G_END_DECLS 49 50 #endif /* __GST_OPENAPTXENC_H__ */ 51