fix double free
[platform/core/multimedia/libmm-streamrecorder.git] / src / include / mm_streamrecorder_buffer_manager.h
1 /*
2  * libmm-streamrecorder
3  *
4  * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Hyuntae Kim <ht1211.kim@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 #ifndef __MM_STREAMRECORDER_BUFFER_MANAGER_H__
23 #define __MM_STREAMRECORDER_BUFFER_MANAGER_H__
24
25 /*=======================================================================================
26 | INCLUDE FILES                                                                         |
27 ========================================================================================*/
28 #include <glib.h>
29 #include <gst/gst.h>
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 /*=======================================================================================
36 | GLOBAL DEFINITIONS AND DECLARATIONS FOR STREAMRECORDER                                        |
37 ========================================================================================*/
38
39 /*=======================================================================================
40 | ENUM DEFINITIONS                                                                      |
41 ========================================================================================*/
42
43 /*=======================================================================================
44 | STRUCTURE DEFINITIONS                                                                 |
45 ========================================================================================*/
46
47 typedef struct _GstStreamRecorderBuffer GstStreamRecorderBuffer;
48
49 struct _GstStreamRecorderBuffer {
50         GstBuffer *buffer;
51         MMHandleType str_handle;
52         void *user_buffer;
53 };
54
55 /*=======================================================================================
56 | CONSTANT DEFINITIONS                                                                  |
57 ========================================================================================*/
58
59 /*=======================================================================================
60 | STATIC VARIABLES                                                                      |
61 ========================================================================================*/
62
63 /*=======================================================================================
64 | EXTERN GLOBAL VARIABLE                                                                |
65 ========================================================================================*/
66
67 /*=======================================================================================
68 | GLOBAL FUNCTION PROTOTYPES                                                            |
69 ========================================================================================*/
70 void _mmstreamrecorder_buffer_destroy(gpointer stream_buffer);
71
72 #ifdef __cplusplus
73 }
74 #endif
75 #endif                                                  /* __MM_STREAMRECORDER_BUFFER_MANAGER_H__ */