g_object_set(G_OBJECT(sc->element[_MMCAMCORDER_VIDEOSINK_SINK].gst), "socket-path", socket_path, NULL);
} else {
- if (hcamcorder->use_videoconvert && !strcmp(videosink_name, "waylandsink")) {
+ if (hcamcorder->use_videoconvert && (!strcmp(videosink_name, "waylandsink") || !strcmp(videosink_name, "directvideosink"))) {
/* get video convert name */
_mmcamcorder_conf_get_value_element_name(sc->VideoconvertElement, &videoconvert_name);
{
int err = MM_ERROR_NONE;
int size = 0;
- int retx = 0;
- int rety = 0;
- int retwidth = 0;
- int retheight = 0;
+ int rect_x = 0;
+ int rect_y = 0;
+ int rect_width = 0;
+ int rect_height = 0;
int visible = 0;
int rotation = MM_DISPLAY_ROTATION_NONE;
int flip = MM_FLIP_NONE;
/* Get video display information */
err = mm_camcorder_get_attributes(handle, &err_name,
- MMCAM_DISPLAY_RECT_X, &retx,
- MMCAM_DISPLAY_RECT_Y, &rety,
- MMCAM_DISPLAY_RECT_WIDTH, &retwidth,
- MMCAM_DISPLAY_RECT_HEIGHT, &retheight,
+ MMCAM_DISPLAY_RECT_X, &rect_x,
+ MMCAM_DISPLAY_RECT_Y, &rect_y,
+ MMCAM_DISPLAY_RECT_WIDTH, &rect_width,
+ MMCAM_DISPLAY_RECT_HEIGHT, &rect_height,
MMCAM_DISPLAY_ROTATION, &rotation,
MMCAM_DISPLAY_FLIP, &flip,
MMCAM_DISPLAY_VISIBLE, &visible,
_mmcam_dbg_err("display handle(eavs object) is NULL");
return MM_ERROR_CAMCORDER_INVALID_ARGUMENT;
}
- } else if (!strcmp(videosink_name, "waylandsink")) {
+ } else if (!strcmp(videosink_name, "waylandsink") || !strcmp(videosink_name, "directvideosink")) {
MMCamWaylandInfo *wl_info = (MMCamWaylandInfo *)overlay;
if (wl_info) {
gst_video_overlay_set_wl_window_wl_surface_id(GST_VIDEO_OVERLAY(vsink), (guintptr)wl_info->global_surface_id);
gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(vsink),
wl_info->window_x, wl_info->window_y, wl_info->window_width, wl_info->window_height);
-#ifdef _MMCAMCORDER_RM_SUPPORT
- if (hcamcorder->request_resources.category_id[0] == RM_CATEGORY_VIDEO_DECODER_SUB)
- display_scaler = 1;
-
- MMCAMCORDER_G_OBJECT_SET(vsink, "device-scaler", display_scaler);
-#endif /* _MMCAMCORDER_RM_SUPPORT */
} else {
_mmcam_dbg_warn("Handle is NULL. skip setting.");
}
/* Set attribute */
if (!strcmp(videosink_name, "xvimagesink") || !strcmp(videosink_name, "waylandsink") ||
- !strcmp(videosink_name, "evaspixmapsink")) {
+ !strcmp(videosink_name, "evaspixmapsink") || !strcmp(videosink_name, "directvideosink")) {
/* set rotation */
MMCAMCORDER_G_OBJECT_SET(vsink, "rotate", rotation);
MMCAMCORDER_G_OBJECT_SET(vsink, "zoom", zoom_level);
if (display_geometry_method == MM_DISPLAY_METHOD_CUSTOM_ROI) {
- g_object_set(vsink,
- "dst-roi-x", retx,
- "dst-roi-y", rety,
- "dst-roi-w", retwidth,
- "dst-roi-h", retheight,
- NULL);
+ if (!strcmp(videosink_name, "waylandsink")) {
+ gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(vsink),
+ rect_x, rect_y, rect_width, rect_height);
+ } else {
+ g_object_set(vsink,
+ "dst-roi-x", rect_x,
+ "dst-roi-y", rect_y,
+ "dst-roi-w", rect_width,
+ "dst-roi-h", rect_height,
+ NULL);
+ }
}
}
/* push buffer in appsrc to encode */
if (!sc->info_video) {
_mmcam_dbg_warn("sc->info_video is NULL!!");
- return FALSE;
+ return GST_PAD_PROBE_DROP;
}
if (sc->info_video->push_encoding_buffer == PUSH_ENCODING_BUFFER_RUN &&
}
if (!strcmp(videosink_name, "waylandsink") || !strcmp(videosink_name, "xvimagesink") ||
- !strcmp(videosink_name, "evasimagesink") || !strcmp(videosink_name, "evaspixmapsink")) {
+ !strcmp(videosink_name, "evasimagesink") || !strcmp(videosink_name, "evaspixmapsink") ||
+ !strcmp(videosink_name, "directvideosink")) {
MMCAMCORDER_G_OBJECT_SET(sc->element[videosink_index].gst, "rotate", display_rotate);
_mmcam_dbg_log("Set display-rotate [%d] done.", display_rotate);
return TRUE;
}
if (!strcmp(videosink_name, "waylandsink") || !strcmp(videosink_name, "xvimagesink") ||
- !strcmp(videosink_name, "evasimagesink") || !strcmp(videosink_name, "evaspixmapsink")) {
+ !strcmp(videosink_name, "evasimagesink") || !strcmp(videosink_name, "evaspixmapsink") ||
+ !strcmp(videosink_name, "directvideosink")) {
MMCAMCORDER_G_OBJECT_SET(sc->element[videosink_index].gst, "flip", display_flip);
_mmcam_dbg_log("Set display flip [%d] done.", display_flip);
return TRUE;