4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: JongHyuk Choi <jhchoi.choi@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #ifndef __TIZEN_MEDIA_EVASRENDERER_H__
23 #define __TIZEN_MEDIA_EVASRENDERER_H__
25 /*===========================================================================================
29 ========================================================================================== */
35 #include <tbm_bufmgr.h>
36 #include <tbm_surface.h>
37 #include <tbm_surface_internal.h>
42 #include <media/media_packet.h>
43 #include <media/media_format.h>
45 #define MAX_PACKET_NUM 20
47 /*===========================================================================================
49 | GLOBAL DEFINITIONS AND DECLARATIONS FOR MODULE |
51 ========================================================================================== */
53 /*---------------------------------------------------------------------------
55 ---------------------------------------------------------------------------*/
67 VISIBLE_NONE, /* if user dont set visibility, it will be changed to true */
73 media_packet_h packet;
74 tbm_surface_h tbm_surf;
75 gint prev; /* keep previous index for destroying remained packets */
87 tbm_surface_h tbm_surf;
90 /* evas info for evas surface type */
95 /* video width & height */
100 visible_info visible;
104 guint display_geometry_method;
107 tbm_surface_h tbm_surf;
110 packet_info pkt_info[MAX_PACKET_NUM];
113 /* count undestroyed media packet */
114 guint sent_buffer_cnt;
117 GMutex mp_lock; /* media_packet free lock */
118 GMutex idx_lock; /* to keep value of cur_idx */
121 flush_info *flush_buffer;
122 gboolean retrieve_packet; /* after flush buffer is made by API, flush will be executed in main thread callback */
123 gboolean keep_screen;
126 /* create and initialize evas_info */
127 int mm_evas_renderer_create(MMHandleType *handle, Evas_Object *eo);
128 /* destroy and finalize evas_info */
129 int mm_evas_renderer_destroy(MMHandleType *handle);
130 /* set and get visibility value */
131 int mm_evas_renderer_set_visible(MMHandleType handle, bool visible);
132 int mm_evas_renderer_get_visible(MMHandleType handle, bool *visible);
133 /* set and get rotation value */
134 int mm_evas_renderer_set_rotation(MMHandleType handle, int rotate);
135 int mm_evas_renderer_get_rotation(MMHandleType handle, int *rotate);
136 /* set and get geometry value */
137 int mm_evas_renderer_set_geometry(MMHandleType handle, int mode);
138 int mm_evas_renderer_get_geometry(MMHandleType handle, int *mode);
139 /* update all properties */
140 int mm_evas_renderer_update_param(MMHandleType handle);
141 /* call ecore_pipe_write, when packet is sent */
142 void mm_evas_renderer_write(media_packet_h packet, void *data);
143 /* if user want to retrieve all packets, this API will be called */
144 /* if keep_screen is set to true, flush buffer will be made */
145 int mm_evas_renderer_retrieve_all_packets (MMHandleType handle, bool keep_screen);
150 #endif /* __TIZEN_MEDIA_EVASRENDERER_H__ */