|
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 __ERROR_CONCEALMENT_INTERFACE__H |
|
24 #define __ERROR_CONCEALMENT_INTERFACE__H |
|
25 |
|
26 #include <glib.h> |
|
27 #include <gst/gstelement.h> |
|
28 #include <gst/gstpluginfeature.h> |
|
29 #include <gst/gst.h> |
|
30 |
|
31 G_BEGIN_DECLS |
|
32 |
|
33 #define GST_TYPE_ERROR_CONCEALMENT (gst_error_concealment_get_type ()) |
|
34 #define GST_ERROR_CONCEALMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_ERROR_CONCEALMENT, GstErrorConcealment)) |
|
35 #define GST_IS_ERROR_CONCEALMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_ERROR_CONCEALMENT)) |
|
36 #define GST_ERROR_CONCEALMENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_ERROR_CONCEALMENT, GstErrorConcealmentIntfc)) |
|
37 |
|
38 typedef struct _GstErrorConcealment GstErrorConcealment; |
|
39 typedef struct _GstErrorConcealmentIntfc GstErrorConcealmentIntfc; |
|
40 |
|
41 struct _GstErrorConcealmentIntfc |
|
42 { |
|
43 GTypeInterface parent; |
|
44 /** |
|
45 * Indicates that an frame of encoded audio is lost and that error |
|
46 * concealment should be performed for a lost frame. |
|
47 * By definition, the next buffer sent to the decoder will contain no |
|
48 * valid audio data. |
|
49 * @return status |
|
50 */ |
|
51 gint (*ConcealErrorForNextBuffer) (void); |
|
52 |
|
53 /** |
|
54 * Puts the hwdevice into a frame-based interface. |
|
55 * The alternate mode of interface would be buffer-based. |
|
56 * @param aFrameMode |
|
57 * @return status |
|
58 */ |
|
59 gint (*SetFrameMode)(gboolean aFrameMode); |
|
60 |
|
61 /** |
|
62 * Query to find out if frame-based interface is required by hwdevice |
|
63 * for supporting error concealment. |
|
64 * @param aFrameModeRqrd indicates if frame mode is required. |
|
65 * @return status |
|
66 */ |
|
67 gint (*FrameModeRqrdForEC)(gboolean* aFrameModeRqrd); |
|
68 |
|
69 }; |
|
70 |
|
71 IMPORT_C GType gst_error_concealment_get_type(void); |
|
72 |
|
73 G_END_DECLS |
|
74 |
|
75 #endif /* __ERROR_CONCEALMENT_INTERFACE */ |