|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. |
|
3 * |
|
4 * This library is free software; you can redistribute it and/or |
|
5 * modify it under the terms of the GNU Lesser 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 * Lesser General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU Lesser 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 * |
|
19 * Description: |
|
20 * |
|
21 */ |
|
22 |
|
23 #ifndef __G711_DECODER_INTERFACE__H |
|
24 #define __G711_DECODER_INTERFACE__H |
|
25 |
|
26 #include <glib.h> |
|
27 #include <gst/gstelement.h> |
|
28 #include <gst/gstpluginfeature.h> |
|
29 #include <gst/gst.h> |
|
30 #include <glib-object.h> |
|
31 |
|
32 G_BEGIN_DECLS |
|
33 |
|
34 #define GST_TYPE_G711_DECODER (gst_g711_decoder_get_type ()) |
|
35 #define GST_G711_DECODER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_G711_DECODER, GstG711Decoder)) |
|
36 #define GST_G711_DECODER_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), GST_TYPE_G711_DECODER, GstG711DecoderIntfc)) |
|
37 #define GST_IS_G711_DECODER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_G711_DECODER)) |
|
38 #define GST_IS_G711_DECODER_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), GST_TYPE_G711_DECODER)) |
|
39 #define GST_G711_DECODER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_G711_DECODER, GstG711DecoderIntfc)) |
|
40 |
|
41 typedef struct _GstG711Decoder GstG711Decoder; |
|
42 typedef struct _GstG711DecoderIntfc GstG711DecoderIntfc; |
|
43 |
|
44 |
|
45 /** |
|
46 * Interface for G711 decoder. |
|
47 * This abstract class just provides the static NewL function for the creation |
|
48 * of the proxy, and also defines the custom interface to be implemented by the |
|
49 * proxy and the real custom interface implementation. |
|
50 * |
|
51 */ |
|
52 enum TG711DecodeMode |
|
53 { |
|
54 EDecALaw, |
|
55 EDecULaw |
|
56 }; |
|
57 struct _GstG711DecoderIntfc |
|
58 { |
|
59 GTypeInterface parent; |
|
60 gint (*SetDecoderMode)(enum TG711DecodeMode aDecodeMode); |
|
61 gint (*SetCng)(gboolean aCng); |
|
62 gint (*GetCng)(gboolean* aCng); |
|
63 gint (*SetPlc)(gboolean aPlc); |
|
64 |
|
65 }; |
|
66 |
|
67 IMPORT_C GType gst_g711_decoder_get_type(void); |
|
68 |
|
69 G_END_DECLS |
|
70 |
|
71 #endif /* __G711_DECODER_INTERFACE__ */ |