| 1 |
/* GStreamer SBC audio parser |
| 2 |
* Copyright (C) 2012 Collabora Ltd. <[email protected]> |
| 3 |
* |
| 4 |
* This library is free software; you can redistribute it and/or |
| 5 |
* modify it under the terms of the GNU Library General Public |
| 6 |
* License as published by the Free Software Foundation; either |
| 7 |
* version 2 of the License, or (at your option) any later version. |
| 8 |
* |
| 9 |
* This library is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
* Library General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU Library General Public |
| 15 |
* License along with this library; if not, write to the |
| 16 |
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, |
| 17 |
* Boston, MA 02110-1301, USA. |
| 18 |
*/ |
| 19 |
|
| 20 |
#ifndef __GST_SBC_PARSE_H_INCLUDED__ |
| 21 |
#define __GST_SBC_PARSE_H_INCLUDED__ |
| 22 |
|
| 23 |
|
| 24 |
#include <gst/gst.h> |
| 25 |
#include <gst/base/gstbaseparse.h> |
| 26 |
|
| 27 |
G_BEGIN_DECLS |
| 28 |
|
| 29 |
#define GST_TYPE_SBC_PARSE (gst_sbc_parse_get_type()) |
| 30 |
#define GST_SBC_PARSE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SBC_PARSE,GstSbcParse)) |
| 31 |
#define GST_SBC_PARSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SBC_PARSE,GstSbcParseClass)) |
| 32 |
#define GST_SBC_PARSE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_SBC_PARSE,GstSbcParseClass)) |
| 33 |
#define GST_IS_SBC_PARSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SBC_PARSE)) |
| 34 |
#define GST_IS_SBC_PARSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SBC_PARSE)) |
| 35 |
#define GST_SBC_PARSE_CAST(obj) ((GstSbcParse *)(obj)) |
| 36 |
|
| 37 |
typedef enum { |
| 38 |
GST_SBC_CHANNEL_MODE_INVALID = -1, |
| 39 |
GST_SBC_CHANNEL_MODE_MONO = 0, |
| 40 |
GST_SBC_CHANNEL_MODE_DUAL = 1, |
| 41 |
GST_SBC_CHANNEL_MODE_STEREO = 2, |
| 42 |
GST_SBC_CHANNEL_MODE_JOINT_STEREO = 3 |
| 43 |
} GstSbcChannelMode; |
| 44 |
|
| 45 |
typedef enum { |
| 46 |
GST_SBC_ALLOCATION_METHOD_INVALID = -1, |
| 47 |
GST_SBC_ALLOCATION_METHOD_LOUDNESS = 0, |
| 48 |
GST_SBC_ALLOCATION_METHOD_SNR = 1 |
| 49 |
} GstSbcAllocationMethod; |
| 50 |
|
| 51 |
typedef struct _GstSbcParse GstSbcParse; |
| 52 |
typedef struct _GstSbcParseClass GstSbcParseClass; |
| 53 |
|
| 54 |
struct _GstSbcParse { |
| 55 |
GstBaseParse baseparse; |
| 56 |
|
| 57 |
/* current output format */ |
| 58 |
GstSbcAllocationMethod alloc_method; |
| 59 |
GstSbcChannelMode ch_mode; |
| 60 |
gint rate; |
| 61 |
gint n_blocks; |
| 62 |
gint n_subbands; |
| 63 |
gint bitpool; |
| 64 |
|
| 65 |
gboolean sent_codec_tag; |
| 66 |
}; |
| 67 |
|
| 68 |
struct _GstSbcParseClass { |
| 69 |
GstBaseParseClass baseparse_class; |
| 70 |
}; |
| 71 |
|
| 72 |
GType gst_sbc_parse_get_type (void); |
| 73 |
|
| 74 |
G_END_DECLS |
| 75 |
|
| 76 |
#endif /* __GST_SBC_PARSE_H_INCLUDED__ */ |