* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
* @remarks Sound can be mixed with other sounds if you don't control the stream focus in sound-manager module since 3.0.\n
* You can refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE.
- * @remarks Even if you don't set visible to true by calling player_set_display_visible, the video will be shown on #PLAYER_STATE_PLAYING state.
+ * @remarks Even if you don't set visible to true by calling player_set_display_visible(), the video will be shown on #PLAYER_STATE_PLAYING state.
*
* @param[in] player The handle to the media player
* @return @c 0 on success,
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
* @remarks This function will trigger the seeking operation on player instance.
* Normally application need to wait for player_seek_completed_cb() before calling it again.
- * Otherwise it will return PLAYER_ERROR_SEEK_FAILED.
+ * Otherwise it will return #PLAYER_ERROR_SEEK_FAILED.
* Please note that if application is playing external media data via player_set_media_stream_info(),
* then consecutive calling of this function will always success and no need to wait for player_seek_completed_cb()
* before next calling of this function.(since_tizen 3.0)
- * @remarks Even if you don't set visible to true by calling player_set_display_visible,
+ * @remarks Even if you don't set visible to true by calling player_set_display_visible(),
* the video will be shown when the _seek_completed cb is invoked.
- * @remarks In case of non-seekable content, it will return PLAYER_ERROR_INVALID_OPERATION.
+ * @remarks In case of non-seekable content, it will return #PLAYER_ERROR_INVALID_OPERATION.
* If application ignore this error, player will keep playing without changing play position.
* @param[in] player The handle to the media player
* @param[in] millisecond The position in milliseconds from the start to the seek point
* @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
* @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare().
* @see #player_display_type_e
- * @see player_set_display_mode
- * @see player_set_display_roi_area
- * @see player_set_display_visible
- * @see player_set_display_rotation
+ * @see player_set_display_mode()
+ * @see player_set_display_roi_area()
+ * @see player_set_display_visible()
+ * @see player_set_display_rotation()
* @see ecore_thread_main_loop_begin()
* @see ecore_thread_main_loop_end()
*/
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_STATE Invalid state
* @pre The player's state must be #PLAYER_STATE_IDLE. And, #PLAYER_DISPLAY_TYPE_NONE must be set by calling player_set_display().
- * @see player_unset_media_packet_video_frame_decoded_cb
+ * @see player_unset_media_packet_video_frame_decoded_cb()
*/
int player_set_media_packet_video_frame_decoded_cb(player_h player, player_media_packet_video_decoded_cb callback, void *user_data);
* @brief Sets the visibility of the video display.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
* @remarks If no display is set, no operation is performed.
- * @remarks If you set visible before calling player_set_display, it will be applied on #PLAYER_STATE_READY state.
+ * @remarks If you set visible before calling player_set_display(), it will be applied on #PLAYER_STATE_READY state.
* @param[in] player The handle to the media player
* @param[in] visible The visibility of the display (@c true = visible, @c false = non-visible )
* @return @c 0 on success,
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
* @see #player_display_rotation_e
- * @see player_set_display
+ * @see player_set_display()
* @see player_get_display_rotation()
*/
int player_set_display_rotation(player_h player, player_display_rotation_e rotation);
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @see #player_display_rotation_e
+ * @see #player_display_rotation_e
* @see player_set_display_rotation()
*/
int player_get_display_rotation(player_h player, player_display_rotation_e *rotation);
* @details Index starts from 0.
* @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
* @param[in] player The handle to the media player
- * @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT
+ * @param[in] type The type of target stream which is #PLAYER_STREAM_TYPE_AUDIO or #PLAYER_STREAM_TYPE_TEXT
* @param[out] index The index of track
* @return @c 0 on success,
* otherwise a negative error value
* @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
* @remarks @a code must be released with @c free() by caller
* @param[in] player The handle to the media player
- * @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT
+ * @param[in] type The type of target stream which is #PLAYER_STREAM_TYPE_AUDIO or #PLAYER_STREAM_TYPE_TEXT
* @param[in] index The index of track
* @param[out] code A language code in ISO 639-1. "und" will be returned if the language is undefined.
* @return @c 0 on success,
* @brief Gets the track count.
* @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
* @param[in] player The handle to the media player
- * @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT
+ * @param[in] type The type of target stream which is #PLAYER_STREAM_TYPE_AUDIO or #PLAYER_STREAM_TYPE_TEXT
* @param[out] count The number of track
* @return @c 0 on success,
* otherwise a negative error value
* @brief Selects a track to play.
* @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
* @param[in] player The handle to the media player
- * @param[in] type The type of target stream which is PLAYER_STREAM_TYPE_AUDIO or PLAYER_STREAM_TYPE_TEXT
+ * @param[in] type The type of target stream which is #PLAYER_STREAM_TYPE_AUDIO or #PLAYER_STREAM_TYPE_TEXT
* @param[in] index The index of track
* @return @c 0 on success,
* otherwise a negative error value
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
* @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
* @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED
- * @see player_adaptive_variant_cb
+ * @see player_adaptive_variant_cb()
*/
int player_foreach_adaptive_variant(player_h player, player_adaptive_variant_cb callback, void *user_data);
* @remarks If there is no affordable stream for the condition, the minimum bandwidth stream will be selected.
* @param[in] player The handle to the media player
* @param[in] bandwidth The max bandwidth limit of the stream variant (default: -1)
- * @param[in] width The max width limit of the stream variant (deafult: -1)
- * @param[in] height The max height limit of the stream variant (deafult: -1)
+ * @param[in] width The max width limit of the stream variant (default: -1)
+ * @param[in] height The max height limit of the stream variant (default: -1)
* @return @c 0 on success,
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @remarks This function is used for adaptive streaming(hls/mpeg dash) only.
* @param[in] player The handle to the media player
* @param[out] bandwidth The max bandwidth limit of the stream variant (default: -1)
- * @param[out] width The max width limit of the stream variant (deafult: -1)
- * @param[out] height The max height limit of the stream variant (deafult: -1)
+ * @param[out] width The max width limit of the stream variant (default: -1)
+ * @param[out] height The max height limit of the stream variant (default: -1)
* @return @c 0 on success,
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
/**
* @brief Sets the streaming buffering time.
* @since_tizen 4.0
- * @param[in] player The handle to the media player
- * @param[in] prebuffer_ms The buffer time to start playback
- * @param[in] rebuffer_ms The buffer time during playback if player enter pause state for buffering.
+ * @param[in] player The handle to the media player
+ * @param[in] prebuffer_ms The time duration of buffering data that must be prerolled to start playback.
+ * @param[in] rebuffer_ms The time duration of buffering data that must be prerolled to resume playback
+ * if player enters pause state for buffering.
* @return @c 0 on success,
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
/**
* @brief Gets the streaming buffering time.
* @since_tizen 4.0
- * @param[in] player The handle to the media player
- * @param[in] prebuffer_ms The buffer time to start playback
- * @param[in] rebuffer_ms The buffer time during playback if player enter pause state for buffering.
+ * @param[in] player The handle to the media player
+ * @param[out] prebuffer_ms The time duration of buffering data that must be prerolled to start playback.
+ * @param[out] rebuffer_ms The time duration of buffering data that must be prerolled to resume playback
+ * if player enters pause state for buffering.
* @return @c 0 on success,
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
/**
* @brief Sets the zoom level of 360 video.
- * @details The zoom means scaling of the flat image cutted from the panorama.
+ * @details The zoom means scaling of the flat image cut from the panorama.
* The valid range is from 1.0 to 10.0, where 1.0 is the actual image and
* values above are zoom-in factor. Default value is 1.0 - no zoom.
* @since_tizen 5.0
* %http://tizen.org/feature/multimedia.player.spherical_video\n
* %http://tizen.org/feature/opengles.version.2_0\n
* @param[in] player The handle to the media player
- * @param[in] level The zoom level
+ * @param[in] level The zoom level\n
+ * Valid range is 1.0~10.0. Default value is 1.0.
* @return @c 0 on success,
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* %http://tizen.org/feature/multimedia.player.spherical_video\n
* %http://tizen.org/feature/opengles.version.2_0\n
* @param[in] player The handle to the media player
- * @param[in] horizontal_degrees The horizontal field of view to display in degrees.
- * Valid range is 1-360 degrees. Default value is 120 degrees.
- * @param[in] vertical_degrees The vertical field of view to display in degrees.
- * Valid range is 1-180 degrees. Default value is 67 degrees.
+ * @param[in] horizontal_degrees The horizontal field of view to display in degrees\n
+ * Valid range is 1~360 degrees. Default value is 120 degrees.
+ * @param[in] vertical_degrees The vertical field of view to display in degrees\n
+ * Valid range is 1~180 degrees. Default value is 67 degrees.
* @return @c 0 on success,
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
*/
int player_360_get_field_of_view(player_h player, int *horizontal_degrees, int *vertical_degrees);
+/**
+ * @brief Sets the zoom level with field of view information of 360 video.
+ * @details This function is provided to reduce the distortion of zoom operation.
+ * The zoom means scaling of the flat image cut from the panorama
+ * which is decided by the field of view data.
+ * The zoom level valid range is from 1.0 to 10.0, where 1.0 is the actual image and
+ * values above are zoom-in factor. Default value is 1.0 - no zoom.
+ * @since_tizen 5.0
+ * @remarks The degree values above the default ones extend the field of view to significantly
+ * distorted areas and will not be useful in most cases.
+ * @remarks This function is related to the following features:\n
+ * %http://tizen.org/feature/multimedia.player.spherical_video\n
+ * %http://tizen.org/feature/opengles.version.2_0\n
+ * @param[in] player The handle to the media player
+ * @param[in] level The zoom level\n
+ * Valid range is 1.0~10.0. Default value is 1.0.
+ * @param[in] horizontal_degrees The horizontal field of view to display in degrees\n
+ * Valid range is 1~360 degrees. Default value is 120 degrees.
+ * @param[in] vertical_degrees The vertical field of view to display in degrees\n
+ * Valid range is 1~180 degrees. Default value is 67 degrees.
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #PLAYER_ERROR_NONE Successful
+ * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature
+ * @see player_360_set_zoom()
+ * @see player_360_get_zoom()
+ * @see player_360_set_field_of_view()
+ * @see player_360_get_field_of_view()
+ */
+int player_360_set_zoom_with_field_of_view(player_h player, float level, int horizontal_degrees, int vertical_degrees);
+
/**
* @}
*/
TIZEN_PROFILE_COMMON = 0x10,
} tizen_profile_t;
-typedef struct {
- int bandwidth;
- int width;
- int height;
-} adaptive_variant_info_t;
-
-typedef struct {
- int buffer_ms;
- int rebuffer_ms;
-} buffer_size_t;
-
#ifdef USE_EVENT_HANDLER
static void event_handler_cb(enum libinput_event_type ev_t, int x, int y, void * data, float e[3]);
static void event_handler_set_dov_fov();
CURRENT_STATUS_VIDEO360_SET_FOV,
CURRENT_STATUS_VIDEO360_SET_FOV1,
CURRENT_STATUS_VIDEO360_SET_ZOOM,
+ CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV,
+ CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV1,
+ CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV2,
CURRENT_STATUS_AUDIO_CODEC_TYPE,
CURRENT_STATUS_VIDEO_CODEC_TYPE,
CURRENT_STATUS_REPLAYGAIN_ENABLE,
};
-typedef struct {
- int pos;
- bool accurate;
-} player_seek_pos_t;
-
-typedef struct {
- int a_codec_type;
- int v_codec_type;
-} player_codec_type_t;
-
#define MAX_HANDLE 20
/* for video display */
static Evas_Object *g_eo[MAX_HANDLE] = { 0, };
static int g_current_surface_type = -1;
-static adaptive_variant_info_t max_limit = {-1, -1, -1};
-static buffer_size_t buff_size = {-1, -1};
typedef struct {
Evas_Object *win;
static appdata ad;
static player_h g_player[MAX_HANDLE] = { 0, };
-static player_seek_pos_t seek_info = {0};
-static player_codec_type_t codec_type = {0};
+
int g_handle_num = 1;
int g_menu_state = CURRENT_STATUS_MAINMENU;
gboolean quit_pushing;
g_print(" ==> [Player_Test]get [b]%d, [w]%d, [h]%d\n", bandwidth, width, height);
}
-static void set_variant_limit()
+static void set_variant_limit(int bandwidth, int width, int height)
{
- g_print(" ==> [Player_Test]set [b]%d, [w]%d, [h]%d\n", max_limit.bandwidth, max_limit.width, max_limit.height);
- player_set_max_adaptive_variant_limit(g_player[0], max_limit.bandwidth, max_limit.width, max_limit.height);
+ g_print(" ==> [Player_Test]set [b]%d, [w]%d, [h]%d\n", bandwidth, width, height);
+ player_set_max_adaptive_variant_limit(g_player[0], bandwidth, width, height);
}
-static void set_buffer_size()
+static void set_buffer_size(int prebuffer, int rebuffer)
{
int ret = 0;
int buffer_ms = 0, rebuffer_ms = 0;
else
g_print("current buffer size %d ms / %d ms\n", buffer_ms, rebuffer_ms);
- g_print("new buffer size %d ms / %d ms\n", buff_size.buffer_ms, buff_size.rebuffer_ms);
+ g_print("new buffer size %d ms / %d ms\n", prebuffer, rebuffer);
- player_set_streaming_buffering_time(g_player[0], buff_size.buffer_ms, buff_size.rebuffer_ms);
+ player_set_streaming_buffering_time(g_player[0], prebuffer, rebuffer);
}
static void get_position()
g_print(" ==> [Player_Test] Duration: [%d ] msec\n", duration);
}
-static void set_codec_type(void)
+static void set_codec_type(int a_codec_type, int v_codec_type)
{
int ret;
- ret = player_set_codec_type(g_player[0], PLAYER_STREAM_TYPE_AUDIO, codec_type.a_codec_type);
- g_print(" ==> [Player_Test] audio codec type (%d) return: %d\n", codec_type.a_codec_type, ret);
+ ret = player_set_codec_type(g_player[0], PLAYER_STREAM_TYPE_AUDIO, a_codec_type);
+ g_print(" ==> [Player_Test] audio codec type (%d) return: %d\n", a_codec_type, ret);
- ret = player_set_codec_type(g_player[0], PLAYER_STREAM_TYPE_VIDEO, codec_type.v_codec_type);
- g_print(" ==> [Player_Test] video codec type (%d) return: %d\n", codec_type.v_codec_type, ret);
+ ret = player_set_codec_type(g_player[0], PLAYER_STREAM_TYPE_VIDEO, v_codec_type);
+ g_print(" ==> [Player_Test] video codec type (%d) return: %d\n", v_codec_type, ret);
}
static void video360_set_enable(bool enable)
{
+ bool enabled = false;
+
#ifdef USE_EVENT_HANDLER
event_handler_set_dov_fov();
#endif
if (player_360_set_enabled(g_player[0], enable) != PLAYER_ERROR_NONE)
g_print("failed to %s video 360 mode\n", enable ? "enable" : "disable");
+
+ if (player_360_is_enabled(g_player[0], &enabled) != PLAYER_ERROR_NONE)
+ g_print("failed to get video 360 mode status\n");
+ else
+ g_print(" ==> [Player_Test] Video 360 mode = %s\n", enabled ? "enabled" : "disabled");
}
-static void video360_get_enable()
+static void video360_get_fov()
{
- bool enable;
+ int hfov, vfov;
- if (player_360_is_enabled(g_player[0], &enable) != PLAYER_ERROR_NONE)
- g_print("failed to get video 360 mode status\n");
+ if (player_360_get_field_of_view(g_player[0], &hfov, &vfov) != PLAYER_ERROR_NONE)
+ g_print("failed to get video 360 field of view\n");
else
- g_print(" ==> [Player_Test] Video 360 mode = %s\n", enable ? "enabled" : "disabled");
+ g_print(" ==> [Player_Test] Video 360 FOV = %dx%d deg.\n", hfov, vfov);
}
static void video360_set_fov(int hfov, int vfov)
#endif
if (player_360_set_field_of_view(g_player[0], hfov, vfov) != PLAYER_ERROR_NONE)
g_print("failed to set video 360 field of view\n");
+
+ video360_get_fov();
}
-static void video360_get_fov()
+static void video360_get_dov()
{
- int hfov, vfov;
+ float yaw, pitch;
- if (player_360_get_field_of_view(g_player[0], &hfov, &vfov) != PLAYER_ERROR_NONE)
- g_print("failed to get video 360 field of view\n");
+ if (player_360_get_direction_of_view(g_player[0], &yaw, &pitch) != PLAYER_ERROR_NONE)
+ g_print("failed to get video 360 direction of view\n");
else
- g_print(" ==> [Player_Test] Video 360 FOV = %dx%d deg.\n", hfov, vfov);
+ g_print(" ==> [Player_Test] Video 360 DOV yaw = %d, pitch = %d deg.\n", (int)(yaw * 180.0f / M_PI), (int)(pitch * 180.0f / M_PI));
}
static void video360_set_dov(int yaw_deg, int pitch_deg)
#ifdef USE_EVENT_HANDLER
mm_navevent_handler_set_angles(event_handler, angles);
#endif
+
if (player_360_set_direction_of_view(g_player[0], angles[0], angles[1]) != PLAYER_ERROR_NONE)
g_print("failed to set video 360 direction of view\n");
+
+ video360_get_dov();
}
-static void video360_get_dov()
+static void video360_get_zoom()
{
- float yaw, pitch;
+ float zoom;
- if (player_360_get_direction_of_view(g_player[0], &yaw, &pitch) != PLAYER_ERROR_NONE)
- g_print("failed to get video 360 direction of view\n");
+ if (player_360_get_zoom(g_player[0], &zoom) != PLAYER_ERROR_NONE)
+ g_print("failed to get video 360 zoom\n");
else
- g_print(" ==> [Player_Test] Video 360 DOV yaw = %d, pitch = %d deg.\n", (int)(yaw * 180.0f / M_PI), (int)(pitch * 180.0f / M_PI));
+ g_print(" ==> [Player_Test] Video 360 zoom = %f\n", zoom);
}
static void video360_set_zoom(float zoom)
{
if (player_360_set_zoom(g_player[0], zoom) != PLAYER_ERROR_NONE)
g_print("failed to set video 360 zoom\n");
+
+ video360_get_zoom();
}
-static void video360_get_zoom()
+static void video360_set_zoom_with_fov(float zoom, int hfov, int vfov)
{
- float zoom;
+#ifdef USE_EVENT_HANDLER
+ mm_navevent_handler_size_s fov;
- if (player_360_get_zoom(g_player[0], &zoom) != PLAYER_ERROR_NONE)
- g_print("failed to get video 360 zoom\n");
- else
- g_print(" ==> [Player_Test] Video 360 zoom = %f\n", zoom);
+ fov.width = hfov;
+ fov.height = vfov;
+ mm_navevent_handler_set_fov_size(event_handler, fov);
+#endif
+ if (player_360_set_zoom_with_field_of_view(g_player[0], zoom, hfov, vfov) != PLAYER_ERROR_NONE)
+ g_print("failed to set video 360 zoom with field of view\n");
+
+ video360_get_fov();
+ video360_get_zoom();
}
static void set_replaygain_enabled(bool enabled)
g_menu_state = CURRENT_STATUS_AUDIO_CODEC_TYPE;
} else if (strncmp(cmd, "C2", 2) == 0) {
get_codec_type();
+ } else if (!strncmp(cmd, "si", 2)) {
+ video360_is_spherical();
+ } else if (!strncmp(cmd, "se", 2)) {
+ g_menu_state = CURRENT_STATUS_VIDEO360_SET_ENABLE;
+ } else if (!strncmp(cmd, "sd", 2)) {
+ g_menu_state = CURRENT_STATUS_VIDEO360_SET_DOV;
+ } else if (!strncmp(cmd, "sf", 2)) {
+ g_menu_state = CURRENT_STATUS_VIDEO360_SET_FOV;
+ } else if (!strncmp(cmd, "sz", 2)) {
+ g_menu_state = CURRENT_STATUS_VIDEO360_SET_ZOOM;
} else {
g_print("unknown menu \n");
}
} else if (strncmp(cmd, "rgg", 3) == 0) {
bool enable;
is_replaygain_enabled(&enable);
+ } else if (!strncmp(cmd, "szz", 3)) {
+ g_menu_state = CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV;
} else {
g_print("unknown menu \n");
}
- } else if (len == 4) {
- if (!strncmp(cmd, "v3sp", 4))
- video360_is_spherical();
- else if (!strncmp(cmd, "v3se", 4))
- g_menu_state = CURRENT_STATUS_VIDEO360_SET_ENABLE;
- else if (!strncmp(cmd, "v3ge", 4))
- video360_get_enable();
- else if (!strncmp(cmd, "v3sd", 4))
- g_menu_state = CURRENT_STATUS_VIDEO360_SET_DOV;
- else if (!strncmp(cmd, "v3gd", 4))
- video360_get_dov();
- else if (!strncmp(cmd, "v3sf", 4))
- g_menu_state = CURRENT_STATUS_VIDEO360_SET_FOV;
- else if (!strncmp(cmd, "v3gf", 4))
- video360_get_fov();
- else if (!strncmp(cmd, "v3sz", 4))
- g_menu_state = CURRENT_STATUS_VIDEO360_SET_ZOOM;
- else if (!strncmp(cmd, "v3gz", 4))
- video360_get_zoom();
- else
- g_print("unknown menu \n");
} else
g_print("unknown menu \n");
}
g_print("X4. set audio_cb with async \n");
g_print("[video_frame_decoded_cb] ep. enable tbm surface pool\n");
g_print("[buffering] bf. set new buffering size\n");
- g_print("[Video 360] v3sp. check spherical info\t");
- g_print("v3se. Set Enable\t");
- g_print("v3ge. Get Enable\n");
- g_print("[Video 360] v3sd. Set Direction Of View\t");
- g_print("v3gd. Get Direction Of View\n");
- g_print("[Video 360] v3sf. Set Field Of View\t");
- g_print("v3gf. Get Field Of View\n");
- g_print("[Video 360] v3sz. Set Zoom\t\t");
- g_print("v3gz. Get Zoom\n");
+ g_print("[Video 360] si. check spherical info\t");
+ g_print("se. Set Enable\n");
+ g_print("[Video 360] sd. Set Direction Of View\t");
+ g_print("sf. Set Field Of View\n");
+ g_print("[Video 360] sz. Set Zoom\t\t");
+ g_print("szz. Set Zoom with FOV\n");
g_print("[Replaygain] rgs. Set Replaygain\t\t");
g_print("rgg. Get replaygain\n");
g_print("[etc] sp. Set Progressive Download\t");
g_print("*** input vertical field of view angle (1~180 deg.)\n");
} else if (g_menu_state == CURRENT_STATUS_VIDEO360_SET_ZOOM) {
g_print("*** input zoom factor.(1.0~10.0, where 1.0 - no zoom, actual image) \n");
+ } else if (g_menu_state == CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV) {
+ g_print("*** input zoom factor.(1.0~10.0, where 1.0 - no zoom, actual image) \n");
+ } else if (g_menu_state == CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV1) {
+ g_print("*** input horizontal field of view angle (1~360 deg.)\n");
+ } else if (g_menu_state == CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV2) {
+ g_print("*** input vertical field of view angle (1~180 deg.)\n");
} else if (g_menu_state == CURRENT_STATUS_AUDIO_CODEC_TYPE) {
g_print("*** set audio codec type (1: HW, 2: SW) \n");
} else if (g_menu_state == CURRENT_STATUS_VIDEO_CODEC_TYPE) {
static void interpret(char *cmd)
{
- static int value1, value2;
+ static int value1 = 0, value2 = 0, value3 = 0;
+ static float fval = 0.0;
switch (g_menu_state) {
case CURRENT_STATUS_MAINMENU:
break;
case CURRENT_STATUS_HANDLE_NUM:
{
- int num_handle = atoi(cmd);
- if (0 >= num_handle || num_handle > MAX_HANDLE)
- g_print("not supported this number for handles(%d)\n", num_handle);
+ value1 = atoi(cmd);
+ if (0 >= value1 || value1 > MAX_HANDLE)
+ g_print("not supported this number for handles(%d)\n", value1);
else
- g_handle_num = num_handle;
+ g_handle_num = value1;
reset_menu_state();
}
break;
case CURRENT_STATUS_VOLUME:
{
- float level = atof(cmd);
- set_volume(level);
+ fval = atof(cmd);
+ set_volume(fval);
reset_menu_state();
}
break;
case CURRENT_STATUS_SOUND_STREAM_INFO:
{
- int type = atoi(cmd);
- set_sound_stream_info(type);
+ value1 = atoi(cmd);
+ set_sound_stream_info(value1);
reset_menu_state();
}
break;
case CURRENT_STATUS_MUTE:
{
- int mute = atoi(cmd);
- set_mute(mute);
+ value1 = atoi(cmd);
+ set_mute(value1);
reset_menu_state();
}
break;
case CURRENT_STATUS_POSITION_TIME:
{
- seek_info.pos = atoi(cmd);
+ value1 = atoi(cmd);
g_menu_state = CURRENT_STATUS_POSITION_ACCURATE;
}
break;
case CURRENT_STATUS_POSITION_ACCURATE:
{
- seek_info.accurate = (atoi(cmd) != 0) ? (true) : (false);
- set_position(seek_info.pos, seek_info.accurate);
+ set_position(value1, ((atoi(cmd) != 0) ? (true) : (false)));
reset_menu_state();
}
break;
case CURRENT_STATUS_LOOPING:
{
- int looping = atoi(cmd);
- set_looping(looping);
+ value1 = atoi(cmd);
+ set_looping(value1);
reset_menu_state();
}
break;
case CURRENT_STATUS_GAPLESS:
{
- int gapless = atoi(cmd);
- set_gapless(gapless);
+ value1 = atoi(cmd);
+ set_gapless(value1);
reset_menu_state();
}
break;
case CURRENT_STATUS_DISPLAY_SURFACE_CHANGE:
{
- int type = atoi(cmd);
- change_surface(type);
+ value1 = atoi(cmd);
+ change_surface(value1);
reset_menu_state();
}
break;
case CURRENT_STATUS_DISPLAY_MODE:
{
- int mode = atoi(cmd);
- set_display_mode(mode);
+ value1 = atoi(cmd);
+ set_display_mode(value1);
reset_menu_state();
}
break;
case CURRENT_STATUS_DISPLAY_DST_ROI_AREA:
{
- int value = atoi(cmd);
+ value1 = atoi(cmd);
static int x = 0;
static int y = 0;
static int w = 0;
switch (cnt) {
case 0:
- x = value;
+ x = value1;
cnt++;
break;
case 1:
- y = value;
+ y = value1;
cnt++;
break;
case 2:
- w = value;
+ w = value1;
cnt++;
break;
case 3:
cnt = 0;
- h = value;
+ h = value1;
set_display_roi_area(x, y, w, h);
x = y = w = h = 0;
reset_menu_state();
break;
case CURRENT_STATUS_DISPLAY_ROTATION:
{
- int rotation = atoi(cmd);
- set_display_rotation(rotation);
+ value1 = atoi(cmd);
+ set_display_rotation(value1);
reset_menu_state();
}
break;
case CURRENT_STATUS_DISPLAY_VISIBLE:
{
- int visible = atoi(cmd);
- set_display_visible(visible);
+ value1 = atoi(cmd);
+ set_display_visible(value1);
reset_menu_state();
}
break;
break;
case CURRENT_STATUS_AUDIO_EQUALIZER:
{
- int value = atoi(cmd);
- set_audio_eq(value);
+ value1 = atoi(cmd);
+ set_audio_eq(value1);
reset_menu_state();
}
break;
case CURRENT_STATUS_PLAYBACK_RATE:
{
- float rate = atof(cmd);
- set_playback_rate(rate, FALSE);
+ fval = atof(cmd);
+ set_playback_rate(fval, FALSE);
reset_menu_state();
}
break;
case CURRENT_STATUS_STREAMING_PLAYBACK_RATE:
{
- float rate = atof(cmd);
- set_playback_rate(rate, TRUE);
+ fval = atof(cmd);
+ set_playback_rate(fval, TRUE);
reset_menu_state();
}
break;
case CURRENT_STATUS_SWITCH_SUBTITLE:
{
- int index = atoi(cmd);
- switch_subtitle(index);
+ value1 = atoi(cmd);
+ switch_subtitle(value1);
reset_menu_state();
}
break;
break;
case CURRENT_STATUS_GET_TRACK_INFO:
{
- int index = atoi(cmd);
- get_track_info(index);
+ value1 = atoi(cmd);
+ get_track_info(fval);
reset_menu_state();
}
break;
case CURRENT_STATUS_SET_MAX_BANDWIDTH_VARIANT:
{
- int value = atoi(cmd);
- max_limit.bandwidth = value;
+ value1 = atoi(cmd);
g_menu_state = CURRENT_STATUS_SET_MAX_WIDTH_VARIANT;
}
break;
case CURRENT_STATUS_SET_MAX_WIDTH_VARIANT:
{
- int value = atoi(cmd);
- max_limit.width = value;
+ value2 = atoi(cmd);
g_menu_state = CURRENT_STATUS_SET_MAX_HEIGHT_VARIANT;
}
break;
case CURRENT_STATUS_SET_MAX_HEIGHT_VARIANT:
{
- int value = atoi(cmd);
- max_limit.height = value;
- set_variant_limit();
+ value3 = atoi(cmd);
+ set_variant_limit(value1, value2, value3);
reset_menu_state();
}
break;
case CURRENT_STATUS_SET_AUDIO_ONLY:
{
- int value = atoi(cmd);
- set_audio_only(value);
+ value1 = atoi(cmd);
+ set_audio_only(value1);
reset_menu_state();
}
break;
case CURRENT_STATUS_SET_PRE_BUFFERING_SIZE:
{
- int value = atoi(cmd);
- buff_size.buffer_ms = value;
+ value1 = atoi(cmd);
g_menu_state = CURRENT_STATUS_SET_RE_BUFFERING_SIZE;
}
break;
case CURRENT_STATUS_SET_RE_BUFFERING_SIZE:
{
- int value = atoi(cmd);
- buff_size.rebuffer_ms = value;
- set_buffer_size();
+ value2 = atoi(cmd);
+ set_buffer_size(value1, value2);
reset_menu_state();
}
break;
case CURRENT_STATUS_VIDEO360_SET_ENABLE:
{
- int enable = atoi(cmd);
- video360_set_enable(enable);
+ value1 = atoi(cmd);
+ video360_set_enable(value1);
reset_menu_state();
}
break;
break;
case CURRENT_STATUS_VIDEO360_SET_ZOOM:
{
- float zoom = atof(cmd);
- video360_set_zoom(zoom);
+ fval = atof(cmd);
+ video360_set_zoom(fval);
+ reset_menu_state();
+ }
+ break;
+ case CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV:
+ {
+ fval = atof(cmd);
+ g_menu_state = CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV1;
+ }
+ break;
+ case CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV1:
+ {
+ value1 = atoi(cmd);
+ g_menu_state = CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV2;
+ }
+ break;
+ case CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV2:
+ {
+ value2 = atoi(cmd);
+ video360_set_zoom_with_fov(fval, value1, value2);
reset_menu_state();
}
break;
case CURRENT_STATUS_AUDIO_CODEC_TYPE:
{
- int value = atoi(cmd);
- codec_type.a_codec_type = value;
+ value1 = atoi(cmd);
g_menu_state = CURRENT_STATUS_VIDEO_CODEC_TYPE;
}
break;
case CURRENT_STATUS_VIDEO_CODEC_TYPE:
{
- int value = atoi(cmd);
- codec_type.v_codec_type = value;
- set_codec_type();
+ value2 = atoi(cmd);
+ set_codec_type(value1, value2);
reset_menu_state();
}
break;
case CURRENT_STATUS_REPLAYGAIN_ENABLE:
{
- int value = atoi(cmd);
- set_replaygain_enabled(value);
+ value1 = atoi(cmd);
+ set_replaygain_enabled(value1);
reset_menu_state();
}
break;