]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gst-plugins-ugly0-10.git/blob - ext/lame/gstlame.h
lamemp3enc: ensure parsed output
[glsdk/gst-plugins-ugly0-10.git] / ext / lame / gstlame.h
1 /* GStreamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
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., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
21 #ifndef __GST_LAME_H__
22 #define __GST_LAME_H__
25 #include <gst/gst.h>
27 G_BEGIN_DECLS
29 #include <lame/lame.h>
30 #include <gst/audio/gstaudioencoder.h>
32 #define GST_TYPE_LAME \
33   (gst_lame_get_type())
34 #define GST_LAME(obj) \
35   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_LAME,GstLame))
36 #define GST_LAME_CLASS(klass) \
37   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_LAME,GstLameClass))
38 #define GST_IS_LAME(obj) \
39   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_LAME))
40 #define GST_IS_LAME_CLASS(klass) \
41   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_LAME))
43 typedef struct _GstLame GstLame;
44 typedef struct _GstLameClass GstLameClass;
46 /**
47  * GstLame:
48  *
49  * Opaque data structure.
50  */
51 struct _GstLame {
52   GstAudioEncoder element;
54   /*< private >*/
56   gint samplerate;
57   gint num_channels;
58   gboolean setup;
60   gint bitrate;
61   gfloat compression_ratio;
62   gint quality;
63   gint mode; /* actual mode in use now */
64   gint requested_mode; /* requested mode by user/app */
65   gboolean force_ms;
66   gboolean free_format;
67   gboolean copyright;
68   gboolean original;
69   gboolean error_protection;
70   gboolean extension;
71   gboolean strict_iso;
72   gboolean disable_reservoir;
73   gint vbr;
74   gint vbr_quality;
75   gint vbr_mean_bitrate;
76   gint vbr_min_bitrate;
77   gint vbr_max_bitrate;
78   gint vbr_hard_min;
79   gint lowpass_freq;
80   gint lowpass_width;
81   gint highpass_freq;
82   gint highpass_width;
83   gboolean ath_only;
84   gboolean ath_short;
85   gboolean no_ath;
86   gint ath_type;
87   gint ath_lower;
88   gboolean allow_diff_short;
89   gboolean no_short_blocks;
90   gboolean emphasis;
91   gint preset;
93   /* track this so we don't send a last buffer in eos handler after error */
94   GstFlowReturn  last_flow;
96   lame_global_flags *lgf;
98   /* time tracker */
99   guint64 last_ts, last_offs, last_duration, eos_ts;
100 };
102 struct _GstLameClass {
103   GstAudioEncoderClass parent_class;
104 };
106 GType gst_lame_get_type(void);
107 gboolean gst_lame_register (GstPlugin * plugin);
109 G_END_DECLS
111 #endif /* __GST_LAME_H__ */