2 * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_MEDIA_CODEC_SYNC_PRIVATE_H__
18 #define __TIZEN_MEDIA_CODEC_SYNC_PRIVATE_H__
24 #include <gst/allocators/gsttizenmemory.h>
25 #include <gst/app/gstappsrc.h>
26 #include <media_codec_private.h>
27 #include <media_codec_sync_internal.h>
34 MEDIACODECSYNC_PIPELINE = 0,
35 MEDIACODECSYNC_ELEMENT_APPSRC,
36 MEDIACODECSYNC_ELEMENT_CAPS,
37 MEDIACODECSYNC_ELEMENT_QUE,
38 MEDIACODECSYNC_ELEMENT_SINK,
39 MEDIACODECSYNC_ELEMENT_NUM
42 #define AUDIO_FORMAT_TABLE_SIZE 15
43 #define VIDEO_FORMAT_TABLE_SIZE 8
45 typedef struct _format_table {
46 media_format_mimetype_e mime_type;
50 typedef struct _packet_info {
59 typedef struct _mediacodecsync_s {
61 media_format_h audio_format;
62 media_format_h video_format;
64 GstAllocator *allocator;
66 GstElement *audio_pipe[MEDIACODECSYNC_ELEMENT_NUM];
67 GstElement *video_pipe[MEDIACODECSYNC_ELEMENT_NUM];
69 GstVideoInfo video_info;
71 mediacodecsync_buffer_used_cb buffer_used_cb;
72 void *buffer_used_cb_userdata;
74 mediacodecsync_state_e state;
77 typedef struct _GstMCSBuffer {
78 GstBuffer *gst_buffer;
80 mediacodecsync_s *handle;
81 media_packet_h packet;
88 #endif /* __TIZEN_MEDIA_CODEC_SYNC_PRIVATE_H__ */