omxvideoenc: drain encoder on ALLOCATION and DRAIN queries
[platform/upstream/gstreamer.git] / omx / gstomxmp3enc.h
1 /*
2  * Copyright (C) 2017
3  *   Author: Julien Isorce <julien.isorce@gmail.com>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation
8  * version 2.1 of the License.
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  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
18  *
19  */
20
21 #ifndef __GST_OMX_MP3_ENC_H__
22 #define __GST_OMX_MP3_ENC_H__
23
24 #include <gst/gst.h>
25 #include "gstomxaudioenc.h"
26
27 G_BEGIN_DECLS
28
29 #define GST_TYPE_OMX_MP3_ENC \
30   (gst_omx_mp3_enc_get_type())
31 #define GST_OMX_MP3_ENC(obj) \
32   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OMX_MP3_ENC,GstOMXMP3Enc))
33 #define GST_OMX_MP3_ENC_CLASS(klass) \
34   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OMX_MP3_ENC,GstOMXMP3EncClass))
35 #define GST_OMX_MP3_ENC_GET_CLASS(obj) \
36   (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OMX_MP3_ENC,GstOMXMP3EncClass))
37 #define GST_IS_OMX_MP3_ENC(obj) \
38   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OMX_MP3_ENC))
39 #define GST_IS_OMX_MP3_ENC_CLASS(obj) \
40   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OMX_MP3_ENC))
41
42 typedef struct _GstOMXMP3Enc GstOMXMP3Enc;
43 typedef struct _GstOMXMP3EncClass GstOMXMP3EncClass;
44
45 struct _GstOMXMP3Enc
46 {
47   GstOMXAudioEnc parent;
48
49   guint mpegaudioversion;
50
51   /* properties */
52   guint bitrate;
53 };
54
55 struct _GstOMXMP3EncClass
56 {
57   GstOMXAudioEncClass parent_class;
58 };
59
60 GType gst_omx_mp3_enc_get_type (void);
61
62 G_END_DECLS
63
64 #endif /* __GST_OMX_MP3_ENC_H__ */
65