16
|
1 |
/* GStreamer AAC encoder
|
|
2 |
* Copyright 2009 Collabora Multimedia,
|
|
3 |
* Copyright 2009 Nokia Corporation
|
|
4 |
* @author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>.
|
|
5 |
*
|
|
6 |
* This library is free software; you can redistribute it and/or
|
|
7 |
* modify it under the terms of the GNU Library General Public
|
|
8 |
* License as published by the Free Software Foundation; either
|
|
9 |
* version 2 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 |
* Library General Public License for more details.
|
|
15 |
*
|
|
16 |
* You should have received a copy of the GNU Library General Public
|
|
17 |
* License along with this library; if not, write to the
|
|
18 |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
19 |
* Boston, MA 02111-1307, USA.
|
|
20 |
*/
|
|
21 |
|
|
22 |
/* TODO non-GPL license */
|
|
23 |
|
|
24 |
#ifndef __GST_AAC_ENC_H__
|
|
25 |
#define __GST_AAC_ENC_H__
|
|
26 |
|
|
27 |
#include <gst/gst.h>
|
|
28 |
|
|
29 |
#include <eaacplus_api.h>
|
|
30 |
|
|
31 |
#include "gstframedaudioenc.h"
|
|
32 |
|
|
33 |
G_BEGIN_DECLS
|
|
34 |
|
|
35 |
/* #define's don't like whitespacey bits */
|
|
36 |
#define GST_TYPE_AAC_ENC \
|
|
37 |
(gst_aac_enc_get_type())
|
|
38 |
#define GST_AAC_ENC(obj) \
|
|
39 |
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AAC_ENC,GstAACEnc))
|
|
40 |
#define GST_AAC_ENC_CLASS(klass) \
|
|
41 |
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AAC_ENC,GstAACEncClass))
|
|
42 |
#define GST_IS_AAC_ENC(obj) \
|
|
43 |
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AAC_ENC))
|
|
44 |
#define GST_IS_AAC_ENC_CLASS(klass) \
|
|
45 |
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AAC_ENC))
|
|
46 |
#define GST_AAC_ENC_CAST(obj) ((GstAACEnc*)(obj))
|
|
47 |
|
|
48 |
|
|
49 |
typedef struct _GstNokiaAACEnc GstNokiaAACEnc;
|
|
50 |
typedef struct _GstNokiaAACEncClass GstNokiaAACEncClass;
|
|
51 |
|
|
52 |
typedef GstNokiaAACEnc GstAACEnc;
|
|
53 |
typedef GstNokiaAACEncClass GstAACEncClass;
|
|
54 |
|
|
55 |
struct _GstNokiaAACEnc
|
|
56 |
{
|
|
57 |
GstElement element;
|
|
58 |
|
|
59 |
GstPad *sinkpad, *srcpad, *cnpad;
|
|
60 |
|
|
61 |
GstFramedAudioEnc enc;
|
|
62 |
HANDLE_AACPLUS_ENC encoder;
|
|
63 |
AACPLUS_ENC_INFO info;
|
|
64 |
|
|
65 |
/* mode selection */
|
|
66 |
GstClockTime frame_duration;
|
|
67 |
gint raw_frame_size;
|
|
68 |
gint codec_frame_size;
|
|
69 |
|
|
70 |
/* optional helper (history) buffer */
|
|
71 |
guint8 *buffer;
|
|
72 |
|
|
73 |
/* stream description */
|
|
74 |
gint rate;
|
|
75 |
gint channels;
|
|
76 |
|
|
77 |
/* properties */
|
|
78 |
gint bitrate;
|
|
79 |
guint profile;
|
|
80 |
guint format;
|
|
81 |
};
|
|
82 |
|
|
83 |
struct _GstNokiaAACEncClass
|
|
84 |
{
|
|
85 |
GstElementClass parent_class;
|
|
86 |
};
|
|
87 |
|
|
88 |
GType gst_aac_enc_get_type (void);
|
|
89 |
|
|
90 |
G_END_DECLS
|
|
91 |
|
|
92 |
#endif /* __GST_AAC_ENC_H__ */
|