Name: libmm-camcorder
Summary: Camera and recorder library
-Version: 0.10.187
+Version: 0.10.188
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
MMCamFaceInfo *face_info; /**< face information, this should be freed after use it. */
} MMCamFaceDetectInfo;
+/**
+ * Window information
+ */
+typedef struct _MMCamWindowInfo {
+ int surface_id;
+ MMRectType rect;
+} MMCamWindowInfo;
+
/*=======================================================================================
| TYPE DEFINITIONS |
{
int current_state = MM_CAMCORDER_STATE_NONE;
const char *videosink_name = NULL;
- void *p_handle = NULL;
+ void *dp_handle = NULL;
+ MMCamWindowInfo *window_info = NULL;
mmf_camcorder_t *hcamcorder = MMF_CAMCORDER(handle);
_MMCamcorderSubContext *sc = NULL;
return TRUE;
}
+ dp_handle = value->value.p_val;
+ if (!dp_handle) {
+ _mmcam_dbg_warn("Display handle is NULL");
+ return FALSE;
+ }
+
sc = MMF_CAMCORDER_SUBCONTEXT(handle);
- p_handle = value->value.p_val;
- if (p_handle) {
- /* get videosink name */
- _mmcamcorder_conf_get_value_element_name(sc->VideosinkElement, &videosink_name);
- if (videosink_name == NULL) {
- _mmcam_dbg_err("Please check videosink element in configuration file");
- return FALSE;
- }
+ /* get videosink name */
+ _mmcamcorder_conf_get_value_element_name(sc->VideosinkElement, &videosink_name);
+ if (!videosink_name) {
+ _mmcam_dbg_err("Please check videosink element in configuration file");
+ return FALSE;
+ }
- _mmcam_dbg_log("Commit : videosinkname[%s]", videosink_name);
-
- if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "ximagesink")) {
- _mmcam_dbg_log("Commit : Set XID[%x]", *(int *)(p_handle));
- gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), *(int *)(p_handle));
- } else if (!strcmp(videosink_name, "evasimagesink") || !strcmp(videosink_name, "evaspixmapsink")) {
- _mmcam_dbg_log("Commit : Set evas object [%p]", p_handle);
- MMCAMCORDER_G_OBJECT_SET_POINTER(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst, "evas-object", p_handle);
- } else if (!strcmp(videosink_name, "tizenwlsink")) {
- _mmcam_dbg_log("wayland global surface id : %d", *(int *)(p_handle));
- gst_video_overlay_set_wl_window_wl_surface_id(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), (guintptr)*(int *)(p_handle));
- } else {
- _mmcam_dbg_warn("Commit : Nothing to commit with this element[%s]", videosink_name);
- return FALSE;
- }
+ _mmcam_dbg_log("Commit : videosinkname[%s]", videosink_name);
+
+ if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "ximagesink")) {
+ _mmcam_dbg_log("Commit : Set XID[%x]", *(int *)(dp_handle));
+ gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), *(int *)(dp_handle));
+ } else if (!strcmp(videosink_name, "evasimagesink") || !strcmp(videosink_name, "evaspixmapsink")) {
+ _mmcam_dbg_log("Commit : Set evas object [%p]", dp_handle);
+ MMCAMCORDER_G_OBJECT_SET_POINTER(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst, "evas-object", dp_handle);
+ } else if (!strcmp(videosink_name, "tizenwlsink")) {
+ window_info = (MMCamWindowInfo *)dp_handle;
+ _mmcam_dbg_log("wayland global surface id : %d", window_info->surface_id);
+ gst_video_overlay_set_wl_window_wl_surface_id(GST_VIDEO_OVERLAY(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), (guintptr)window_info->surface_id);
} else {
- _mmcam_dbg_warn("Display handle is NULL");
+ _mmcam_dbg_warn("Commit : Nothing to commit with this element[%s]", videosink_name);
return FALSE;
}
#ifdef _MMCAMCORDER_RM_SUPPORT
int display_scaler = 0;
#endif /* _MMCAMCORDER_RM_SUPPORT */
- int *overlay = NULL;
+ int *dp_handle = NULL;
+ MMCamWindowInfo *window_info = NULL;
gulong xid;
char *err_name = NULL;
const char *videosink_name = NULL;
MMCAM_DISPLAY_ROTATION, &rotation,
MMCAM_DISPLAY_FLIP, &flip,
MMCAM_DISPLAY_VISIBLE, &visible,
- MMCAM_DISPLAY_HANDLE, (void**)&overlay, &size,
+ MMCAM_DISPLAY_HANDLE, (void **)&dp_handle, &size,
MMCAM_DISPLAY_MODE, &display_mode,
MMCAM_DISPLAY_GEOMETRY_METHOD, &display_geometry_method,
MMCAM_DISPLAY_SCALE, &zoom_attr,
return MM_ERROR_CAMCORDER_INTERNAL;
}
- _mmcam_dbg_log("(overlay=%p, size=%d)", overlay, size);
+ _mmcam_dbg_log("(dp_handle=%p, size=%d)", dp_handle, size);
/* Set display handle */
if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "ximagesink") ||
!strcmp(videosink_name, "directvideosink")) {
- if (overlay) {
- xid = *overlay;
+ if (dp_handle) {
+ xid = *dp_handle;
_mmcam_dbg_log("xid = %lu )", xid);
gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(vsink), xid);
} else {
MMCAMCORDER_G_OBJECT_SET(vsink, "device-scaler", display_scaler);
#endif /* _MMCAMCORDER_RM_SUPPORT */
} else if (!strcmp(videosink_name, "evasimagesink") || !strcmp(videosink_name, "evaspixmapsink")) {
- _mmcam_dbg_log("videosink : %s, handle : %p", videosink_name, overlay);
+ _mmcam_dbg_log("videosink : %s, handle : %p", videosink_name, dp_handle);
- if (overlay) {
- MMCAMCORDER_G_OBJECT_SET_POINTER(vsink, "evas-object", overlay);
+ if (dp_handle) {
+ MMCAMCORDER_G_OBJECT_SET_POINTER(vsink, "evas-object", dp_handle);
MMCAMCORDER_G_OBJECT_SET(vsink, "origin-size", !do_scaling);
} else {
_mmcam_dbg_err("display handle(eavs object) is NULL");
return MM_ERROR_CAMCORDER_INVALID_ARGUMENT;
}
} else if (!strcmp(videosink_name, "tizenwlsink")) {
- if (overlay) {
- _mmcam_dbg_log("wayland global surface id : %d", *overlay);
- gst_video_overlay_set_wl_window_wl_surface_id(GST_VIDEO_OVERLAY(vsink), *overlay);
+ if (dp_handle) {
+ window_info = (MMCamWindowInfo *)dp_handle;
+ _mmcam_dbg_log("wayland global surface id : %d", window_info->surface_id);
+ gst_video_overlay_set_wl_window_wl_surface_id(GST_VIDEO_OVERLAY(vsink), window_info->surface_id);
} else {
_mmcam_dbg_warn("Handle is NULL. skip setting.");
}