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 gboolean update_needed; /* to update geometry information on pause state */
101 visible_info visible;
106 guint display_geometry_method;
109 tbm_surface_h tbm_surf;
112 packet_info pkt_info[MAX_PACKET_NUM];
115 /* count undestroyed media packet */
116 guint sent_buffer_cnt;
119 GMutex mp_lock; /* media_packet free lock */
120 GMutex idx_lock; /* to keep value of cur_idx */
123 flush_info *flush_buffer;
124 gboolean retrieve_packet; /* after flush buffer is made by API, flush will be executed in main thread callback */
125 gboolean keep_screen;
128 /* create and initialize evas_info */
129 int mm_evas_renderer_create(MMHandleType *handle, Evas_Object *eo);
130 /* destroy and finalize evas_info */
131 int mm_evas_renderer_destroy(MMHandleType *handle);
132 /* set and get visibility value */
133 int mm_evas_renderer_set_visible(MMHandleType handle, bool visible);
134 int mm_evas_renderer_get_visible(MMHandleType handle, bool *visible);
135 /* set and get rotation value */
136 int mm_evas_renderer_set_rotation(MMHandleType handle, int rotate);
137 int mm_evas_renderer_get_rotation(MMHandleType handle, int *rotate);
138 /* set and get geometry value */
139 int mm_evas_renderer_set_geometry(MMHandleType handle, int mode);
140 int mm_evas_renderer_get_geometry(MMHandleType handle, int *mode);
141 /* set and get coordinate and resolution value for the destination */
142 /* it would be better not to call set_geometry for DISP_GEO_METHOD_CUSTOM_ROI */
143 int mm_evas_renderer_set_roi_area(MMHandleType handle, int x, int y, int w, int h);
144 int mm_evas_renderer_get_roi_area(MMHandleType handle, int *x, int *y, int *w, int *h);
145 /* set and get flip value */
146 int mm_evas_renderer_set_flip(MMHandleType handle, int flip);
147 int mm_evas_renderer_get_flip(MMHandleType handle, int *flip);
148 /* update all properties */
149 int mm_evas_renderer_update_param(MMHandleType handle);
150 /* call ecore_pipe_write, when packet is sent */
151 void mm_evas_renderer_write(media_packet_h packet, void *data);
152 /* if user want to retrieve all packets, this API will be called */
153 /* if keep_screen is set to true, flush buffer will be made */
154 int mm_evas_renderer_retrieve_all_packets (MMHandleType handle, bool keep_screen);
159 #endif /* __TIZEN_MEDIA_EVASRENDERER_H__ */