From: Younghwan Ahn Date: Tue, 15 Jan 2013 08:37:09 +0000 (+0900) Subject: fix bug for setting rotation X-Git-Tag: submit/tizen_2.1/20130424.232047~6^2~14^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd3ba65b8fe9198de13c300f49bb21f2a8fa1815;p=platform%2Fcore%2Fmultimedia%2Flibmm-player.git fix bug for setting rotation Change-Id: Iac0803e9bc4fa7b1dc0ff11b79c3265967362969 --- diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c index c583c8d..1a1091c 100755 --- a/src/mm_player_priv.c +++ b/src/mm_player_priv.c @@ -2417,7 +2417,7 @@ __mmplayer_get_property_value_for_rotation(mm_player_t* player, int rotation_ang int dest_angle = rotation_angle; char *element_name = NULL; int rotation_using_type = -1; - #define ROTATION_USING_X 0 + #define ROTATION_USING_X 0 #define ROTATION_USING_FLIP 1 return_val_if_fail(player, FALSE); @@ -2436,7 +2436,28 @@ __mmplayer_get_property_value_for_rotation(mm_player_t* player, int rotation_ang return FALSE; } - rotation_using_type = ROTATION_USING_FLIP; + if (player->use_video_stream) + { + rotation_using_type = ROTATION_USING_FLIP; + } + else + { + int surface_type = 0; + mm_attrs_get_int_by_name(player->attrs, "display_surface_type", &surface_type); + debug_log("check display surface type for rotation: %d", surface_type); + + switch (surface_type) + { + case MM_DISPLAY_SURFACE_X: + rotation_using_type = ROTATION_USING_X; + break; + case MM_DISPLAY_SURFACE_EVAS: + default: + rotation_using_type = ROTATION_USING_FLIP; + break; + } + } + debug_log("using %d type for rotation", rotation_using_type); /* get property value for setting */