• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3  * Copyright (C) <2009> Sebastian Dröge <sebastian.droege@collabora.co.uk>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 
22 #ifndef __GST_LAMEMP3ENC_H__
23 #define __GST_LAMEMP3ENC_H__
24 
25 
26 #include <gst/gst.h>
27 #include <gst/audio/gstaudioencoder.h>
28 #include <gst/base/gstadapter.h>
29 
30 G_BEGIN_DECLS
31 
32 #ifndef LAME_SUBPROJECT
33 #include <lame/lame.h>
34 #else
35 #include "lame.h"
36 #endif
37 
38 #define GST_TYPE_LAMEMP3ENC (gst_lamemp3enc_get_type())
39 G_DECLARE_FINAL_TYPE (GstLameMP3Enc, gst_lamemp3enc, GST, LAMEMP3ENC,
40     GstAudioEncoder)
41 
42 /**
43  * GstLameMP3Enc:
44  *
45  * Opaque data structure.
46  */
47 struct _GstLameMP3Enc {
48   GstAudioEncoder element;
49 
50   /*< private >*/
51   gint samplerate;
52   gint out_samplerate;
53   gint num_channels;
54 
55   /* properties */
56   gint target;
57   gint bitrate;
58   gboolean cbr;
59   gfloat quality;
60   gint encoding_engine_quality;
61   gboolean mono;
62 
63   lame_global_flags *lgf;
64 
65   GstAdapter *adapter;
66 };
67 
68 GST_ELEMENT_REGISTER_DECLARE (lamemp3enc);
69 
70 G_END_DECLS
71 
72 #endif /* __GST_LAMEMP3ENC_H__ */
73