#define PLAYER_FEATURE_SOUND_STREAM "http://tizen.org/feature/multimedia.player.stream_info"
#define PLAYER_FEATURE_OPENGL "http://tizen.org/feature/opengles.version.2_0"
#define PLAYER_FEATURE_SPHERICAL_VIDEO "http://tizen.org/feature/multimedia.player.spherical_video"
-
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
typedef enum {
TIZEN_PROFILE_UNKNOWN = 0,
TIZEN_PROFILE_MOBILE = 0x1,
char *ret_buf = NULL;
LOGD("ENTER");
-
- PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_DOUBLE, "rate", (double)rate);
- g_free(ret_buf);
-
+ if (rate != 0) {
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_DOUBLE, "rate", (double)rate);
+ g_free(ret_buf);
+ }
LOGD("LEAVE 0x%X", ret);
return ret;
}
int player_set_display_rotation(player_h player, player_display_rotation_e rotation)
{
PLAYER_INSTANCE_CHECK(player);
+ PLAYER_CHECK_CONDITION(PLAYER_DISPLAY_ROTATION_NONE <= rotation && rotation <= PLAYER_DISPLAY_ROTATION_270, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY_ROTATION;
player_cli_s *pc = (player_cli_s *) player;
int player_set_media_stream_buffer_max_size(player_h player, player_stream_type_e type, unsigned long long max_size)
{
- int ret = PLAYER_ERROR_NONE;
PLAYER_INSTANCE_CHECK(player);
+ PLAYER_CHECK_CONDITION(PLAYER_STREAM_TYPE_DEFAULT <= type && type <= PLAYER_STREAM_TYPE_TEXT, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+ PLAYER_CHECK_CONDITION(max_size > 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
+ int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MAX_SIZE;
char *ret_buf = NULL;
int player_set_media_stream_buffer_min_threshold(player_h player, player_stream_type_e type, unsigned int percent)
{
- int ret = PLAYER_ERROR_NONE;
PLAYER_INSTANCE_CHECK(player);
+ PLAYER_CHECK_CONDITION(PLAYER_STREAM_TYPE_DEFAULT <= type && type <= PLAYER_STREAM_TYPE_TEXT, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
+ int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD;
char *ret_buf = NULL;
PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
PLAYER_INSTANCE_CHECK(player);
+ PLAYER_CHECK_CONDITION(yaw >= (float)-M_PI && yaw <= (float)M_PI, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+ PLAYER_CHECK_CONDITION(pitch >= (float)-M_PI/2 && pitch <= (float)M_PI/2, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_DIRECTION_OF_VIEW;
player_cli_s *pc = (player_cli_s *) player;
PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
PLAYER_INSTANCE_CHECK(player);
+ PLAYER_CHECK_CONDITION(level >= 1.0 && level <= 10.0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_ZOOM;
player_cli_s *pc = (player_cli_s *) player;
PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
PLAYER_INSTANCE_CHECK(player);
+ PLAYER_CHECK_CONDITION(horizontal_degrees >= 1 && horizontal_degrees <= 360, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+ PLAYER_CHECK_CONDITION(vertical_degrees >= 1 && vertical_degrees <= 180, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_FIELD_OF_VIEW;
player_cli_s *pc = (player_cli_s *) player;
PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
PLAYER_INSTANCE_CHECK(player);
+ PLAYER_CHECK_CONDITION(horizontal_degrees >= 1 && horizontal_degrees <= 360, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+ PLAYER_CHECK_CONDITION(vertical_degrees >= 1 && vertical_degrees <= 180, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+ PLAYER_CHECK_CONDITION(level >= 1.0 && level <= 10.0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_ZOOM_WITH_FIELD_OF_VIEW;
player_cli_s *pc = (player_cli_s *) player;