modified the method of memory usage.
[platform/adaptation/emulator/gst-plugins-emulator.git] / src / gstemulapi2.h
1 /*
2  * GStreamer codec plugin for Tizen Emulator.
3  *
4  * Copyright (C) 2013 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact:
7  * KiTae Kim <kt920.kim@samsung.com>
8  * SeokYeon Hwang <syeon.hwang@samsung.com>
9  * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Library General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Library General Public License for more details.
20  *
21  * You should have received a copy of the GNU Library General Public
22  * License along with this library; if not, write to the
23  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24  * Boston, MA 02111-1307, USA.
25  *
26  * Contributors:
27  * - S-Core Co., Ltd
28  *
29  */
30
31 #include "gstemulcommon.h"
32
33 void _codec_init_meta_to (CodecContext *ctx, CodecElement *codec, uint8_t *device_buf);
34
35 int _codec_init_meta_from (CodecContext *ctx, int media_type, uint8_t *device_buf);
36
37 void _codec_decode_video_meta_to (int in_size, int idx, int64_t in_offset, uint8_t *device_buf);
38
39 void _codec_decode_video_inbuf (uint8_t *in_buf, int in_size, uint8_t *device_buf);
40
41 int _codec_decode_video_meta_from (VideoData *video, int *got_picture_ptr,
42                                   uint8_t *device_buf);
43
44 void _codec_decode_audio_meta_to (int in_size, uint8_t *device_buf);
45
46
47 void _codec_decode_audio_inbuf (uint8_t *in_buf, int in_size,
48                                   uint8_t *device_buf);
49
50 int _codec_decode_audio_meta_from (AudioData *audio, int *frame_size_ptr,
51                                   uint8_t *device_buf);
52
53 void _codec_decode_audio_outbuf (int outbuf_size, int16_t *samples,
54                                   uint8_t *device_buf);
55
56 void _codec_encode_video_meta_to (int in_size, int64_t in_timestamp, uint8_t *device_buf);
57
58 void _codec_encode_video_inbuf (uint8_t *in_buf, int in_size,
59                                   uint8_t *device_buf);
60
61 // int _codec_encode_video_outbuf (uint8_t *out_buf, uint8_t *device_buf);
62 void _codec_encode_video_outbuf (int len, uint8_t *outbuf, uint8_t *device_buf);
63
64 void _codec_encode_audio_meta_to (int max_size, int in_size, uint8_t *device_buf);
65
66 void _codec_encode_audio_inbuf (uint8_t *in_buf, int in_size, uint8_t *device_buf);
67
68 int _codec_encode_audio_outbuf (uint8_t *out_buf, uint8_t *device_buf);