}
/*
- * xvimagesink only (A)
- * custom_convert - no xv(e.g. memsink, evasimagesink (B)
- * videoflip - avsysmemsink(C)
+ * waylandsink (A)
+ * custom_convert - none (B)
+ * videoflip - none (C)
*/
if (player->set_mode.video_zc) {
if (player->pipeline->videobin[MMPLAYER_V_CONV].gst) // B
mm_attrs_get_int_by_name(player->attrs, "display_surface_type", &surface_type);
LOGD("check display surface type attribute: %d", surface_type);
- if ((surface_type == MM_DISPLAY_SURFACE_OVERLAY) ||
- (surface_type == MM_DISPLAY_SURFACE_EVAS && !strcmp(player->ini.videosink_element_evas, "evaspixmapsink")))
+ if (surface_type == MM_DISPLAY_SURFACE_OVERLAY)
rotation_type = ROTATION_USING_SINK;
else
rotation_type = ROTATION_USING_FLIP; //C
/* get property value for setting */
switch (rotation_type) {
- case ROTATION_USING_SINK: // xvimagesink, pixmap
+ case ROTATION_USING_SINK: // waylandsink
{
switch (dest_angle) {
case 0:
return MM_ERROR_NONE;
}
-int
-__mmplayer_update_evas_videosink_video_param(mm_player_t* player)
-{
- MMHandleType attrs = 0;
- void *object = NULL;
- int scaling = 0;
- gboolean visible = TRUE;
- int display_method = 0;
- int org_angle = 0; // current supported angle values are 0, 90, 180, 270
- int user_angle = 0;
- int rotation_value = 0;
- MMPLAYER_FENTER();
-
- /* check video sinkbin is created */
- if (MM_ERROR_NONE != __mmplayer_video_param_check_video_sink_bin(player))
- return MM_ERROR_PLAYER_NOT_INITIALIZED;
-
- attrs = MMPLAYER_GET_ATTRS(player);
- MMPLAYER_RETURN_VAL_IF_FAIL(attrs, MM_ERROR_PLAYER_INTERNAL);
-
- __mmplayer_get_video_angle(player, &user_angle, &org_angle);
-
- /* common case if using evas surface */
- mm_attrs_get_data_by_name(attrs, "display_overlay", &object);
- mm_attrs_get_int_by_name(attrs, "display_visible", &visible);
- mm_attrs_get_int_by_name(attrs, "display_evas_do_scaling", &scaling);
- mm_attrs_get_int_by_name(attrs, "display_method", &display_method);
-
- /* if evasimagesink */
- if (!strcmp(player->ini.videosink_element_evas, "evasimagesink")) {
- if (object) {
- /* if it is evasimagesink, we are not supporting rotation */
- if (user_angle != 0) {
- mm_attrs_set_int_by_name(attrs, "display_rotation", MM_DISPLAY_ROTATION_NONE);
- if (mmf_attrs_commit(attrs)) /* return -1 if error */
- LOGE("failed to commit\n");
- LOGW("unsupported feature");
- return MM_ERROR_NOT_SUPPORT_API;
- }
- __mmplayer_get_property_value_for_rotation(player, org_angle+user_angle, &rotation_value);
- g_object_set(player->pipeline->videobin[MMPLAYER_V_SINK].gst,
- "evas-object", object,
- "visible", visible,
- "display-geometry-method", display_method,
- "rotate", rotation_value,
- NULL);
- LOGD("set video param : method %d", display_method);
- LOGD("set video param : evas-object %x, visible %d", object, visible);
- LOGD("set video param : evas-object %x, rotate %d", object, rotation_value);
- } else {
- LOGE("no evas object");
- return MM_ERROR_PLAYER_INTERNAL;
- }
-
-
- /* if evasimagesink using converter */
- if (player->set_mode.video_zc && player->pipeline->videobin[MMPLAYER_V_CONV].gst) {
- int width = 0;
- int height = 0;
- int no_scaling = !scaling;
-
- mm_attrs_get_int_by_name(attrs, "display_width", &width);
- mm_attrs_get_int_by_name(attrs, "display_height", &height);
-
- /* NOTE: fimcconvert does not manage index of src buffer from upstream src-plugin, decoder gives frame information in output buffer with no ordering */
- g_object_set(player->pipeline->videobin[MMPLAYER_V_CONV].gst, "src-rand-idx", TRUE, NULL);
- g_object_set(player->pipeline->videobin[MMPLAYER_V_CONV].gst, "dst-buffer-num", 5, NULL);
-
- if (no_scaling) {
- /* no-scaling order to fimcconvert, original width, height size of media src will be passed to sink plugin */
- g_object_set(player->pipeline->videobin[MMPLAYER_V_CONV].gst,
- "dst-width", 0, /* setting 0, output video width will be media src's width */
- "dst-height", 0, /* setting 0, output video height will be media src's height */
- NULL);
- } else {
- /* scaling order to fimcconvert */
- if (width)
- g_object_set(player->pipeline->videobin[MMPLAYER_V_CONV].gst, "dst-width", width, NULL);
- if (height)
- g_object_set(player->pipeline->videobin[MMPLAYER_V_CONV].gst, "dst-height", height, NULL);
- LOGD("set video param : video frame scaling down to width(%d) height(%d)", width, height);
- }
- LOGD("set video param : display_evas_do_scaling %d", scaling);
- }
- }
- return MM_ERROR_NONE;
-}
-
int
_mmplayer_update_video_param(mm_player_t* player, char *param_name) // @
{
return ret;
}
break;
- case MM_DISPLAY_SURFACE_EVAS:
- {
- ret = __mmplayer_update_evas_videosink_video_param(player);
- if (ret != MM_ERROR_NONE)
- return ret;
- }
- break;
- case MM_DISPLAY_SURFACE_NULL:
- {
- /* do nothing */
- }
- break;
- case MM_DISPLAY_SURFACE_REMOTE:
- {
- /* do nothing */
- }
- break;
}
MMPLAYER_FLEAVE();
mm_attrs_get_int_by_name(player->attrs, "display_surface_type", (int *)&surface_type);
if (player->set_mode.video_zc) {
- /* ST12 or SN12 , if player use omx, evasimagesink doesn't use videoconvert */
- if ((surface_type == MM_DISPLAY_SURFACE_EVAS) && (!strcmp(player->ini.videosink_element_evas, "evasimagesink")))
- video_csc = player->ini.videoconverter_element;
- else
- video_csc = ""; /* Videosinks don't use videoconvert except evasimagesink which use normal video formats */
+ video_csc = ""; /* videosinks don't use videoconvert normally */
} else {
- /* sw codec, if player use libav, waylandsink need videoconvert to render shm wl-buffer which support RGB only */
+ /* sw codec, if player use libav, waylandsink need videoconvert to render shm wl-buffer which support RGB only */
if ((surface_type == MM_DISPLAY_SURFACE_OVERLAY) && (!strncmp(player->ini.videosink_element_overlay, "waylandsink", strlen(player->ini.videosink_element_overlay))))
video_csc = "videoconvert";
}
/**
* VIDEO PIPELINE
* - video overlay surface(arm/x86) : waylandsink
- * - evas surface (arm) : evaspixmapsink
- * fimcconvert !evasimagesink
- * - evas surface (x86) : videoconvertor !videoflip !evasimagesink
*/
static int
__mmplayer_gst_create_video_pipeline(mm_player_t* player, GstCaps* caps, MMDisplaySurfaceType surface_type)
else
goto ERROR;
break;
- case MM_DISPLAY_SURFACE_EVAS:
- if (strlen(player->ini.videosink_element_evas) > 0)
- videosink_element = player->ini.videosink_element_evas;
- else
- goto ERROR;
- break;
case MM_DISPLAY_SURFACE_NULL:
if (strlen(player->ini.videosink_element_fake) > 0)
videosink_element = player->ini.videosink_element_fake;
switch (surface_type) {
case MM_DISPLAY_SURFACE_OVERLAY:
- case MM_DISPLAY_SURFACE_EVAS:
- case MM_DISPLAY_SURFACE_GL:
case MM_DISPLAY_SURFACE_NULL:
case MM_DISPLAY_SURFACE_REMOTE:
if (__mmplayer_gst_create_plain_text_elements(player) != MM_ERROR_NONE) {
__mmplayer_update_content_type_info(player);
}
- /* To support evasimagesink, omx is excluded temporarily*/
mm_attrs_get_int_by_name(player->attrs,
"display_surface_type", &surface_type);
LOGD("check display surface type attribute: %d", surface_type);
- if (surface_type == MM_DISPLAY_SURFACE_EVAS && strstr(factory_name, "omx")) {
- LOGW("skipping [%s] for supporting evasimagesink temporarily.\n", factory_name);
- result = GST_AUTOPLUG_SELECT_SKIP;
- goto DONE;
- }
/* filtering exclude keyword */
for (idx = 0; player->ini.exclude_element_keyword[idx][0] != '\0'; idx++) {
if (player->attrs) {
mm_attrs_get_int_by_name(player->attrs, "display_surface_type", &prev_display_surface_type);
mm_attrs_get_data_by_name(player->attrs, "display_overlay", &prev_display_overlay);
- LOGD("[0: Video surface, 1: EVAS surface] previous surface type(%d), new surface type(%d)", prev_display_surface_type, surface_type);
+ LOGD("[0: Video surface, 4: EVAS surface] previous surface type(%d), new surface type(%d)", prev_display_surface_type, surface_type);
if (prev_display_surface_type == surface_type) {
LOGD("incoming display surface type is same as previous one, do nothing..");
MMPLAYER_FLEAVE();
return MM_ERROR_PLAYER_INVALID_STATE;
}
- /* get a current videosink name */
- cur_videosink_name = GST_ELEMENT_NAME(player->pipeline->videobin[MMPLAYER_V_SINK].gst);
-
/* surface change */
for (i = 0 ; i < num_of_dec ; i++) {
if (player->pipeline->mainbin &&
klass = gst_element_factory_get_metadata(decfactory, GST_ELEMENT_METADATA_KLASS);
if ((g_strrstr(klass, "Codec/Decoder/Video"))) {
- if (!strncmp(cur_videosink_name, "x", 1) && (surface_type == MM_DISPLAY_SURFACE_EVAS)) {
+ if ((prev_display_surface_type == MM_DISPLAY_SURFACE_OVERLAY) && (surface_type == MM_DISPLAY_SURFACE_REMOTE)) {
ret = __mmplayer_do_change_videosink(player, MMPLAYER_M_DEC1+i, player->ini.videosink_element_evas, surface_type, display_overlay);
if (ret) {
goto ERROR_CASE;
MMPLAYER_FLEAVE();
return MM_ERROR_NONE;
}
- } else if (!strncmp(cur_videosink_name, "evas", 4) && (surface_type == MM_DISPLAY_SURFACE_OVERLAY)) {
+ } else if ((prev_display_surface_type == MM_DISPLAY_SURFACE_REMOTE) && (surface_type == MM_DISPLAY_SURFACE_OVERLAY)) {
ret = __mmplayer_do_change_videosink(player, MMPLAYER_M_DEC1+i, player->ini.videosink_element_overlay, surface_type, display_overlay);
if (ret) {
goto ERROR_CASE;
LOGD("save attributes related to video display surface : id = %d", *(int*)display_overlay);
mm_attrs_set_data_by_name(player->attrs, "display_overlay", display_overlay, sizeof(display_overlay));
break;
- case MM_DISPLAY_SURFACE_EVAS:
- LOGD("save attributes related to display surface to EVAS : evas image object = %x", display_overlay);
- mm_attrs_set_data_by_name(player->attrs, "display_overlay", display_overlay, sizeof(void*));
- break;
default:
LOGE("invalid type(%d) for changing display surface", surface_type);
MMPLAYER_FLEAVE();