[0.2.139] remove event - MUSE_PLAYER_EVENT_TYPE_STATE_CHANGED 14/321714/1 accepted/tizen_7.0_unified tizen_7.0 accepted/tizen/7.0/unified/20250402.054458
authorEunhye Choi <eunhae1.choi@samsung.com>
Tue, 25 Mar 2025 10:46:47 +0000 (19:46 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Thu, 27 Mar 2025 07:05:35 +0000 (16:05 +0900)
- remove event which is not used anymore
- revert de25be443c773f85ddc5024ec3a05e55dcdadebb

Change-Id: I42fd8c2f65d302d626f0ade1f5e90f0a25a06d61

legacy/include/legacy_player.h
legacy/src/legacy_player.c
muse/include/muse_player.h
muse/src/muse_player.c
packaging/mmsvc-player.spec

index 4639770087bf1f103c4ff48bee12f60751f5c702..5c111e7452380d88d5f0423a37875dc9e78fc37b 100644 (file)
@@ -216,7 +216,6 @@ typedef enum {
        LEGACY_PLAYER_CALLBACK_TYPE_RETURN_BUFFER,
        LEGACY_PLAYER_CALLBACK_TYPE_SERVICE_DISCONNECTED,
        LEGACY_PLAYER_CALLBACK_TYPE_INTERRUPT_STARTED,
-       LEGACY_PLAYER_CALLBACK_TYPE_STATE_CHANGED,
        LEGACY_PLAYER_CALLBACK_TYPE_NUM
 } legacy_player_callback_type_e;
 
@@ -283,11 +282,6 @@ typedef void (*legacy_player_media_stream_seek_cb)(legacy_player_callback_type_e
  */
 typedef void (*legacy_player_video_stream_changed_cb)(int width, int height, int fps, int bit_rate, void *user_data);
 
-/**
- * @brief Called when the media player is state changed(actually unrealized now).
- */
-typedef void (*legacy_player_state_changed_cb)(int state_previous, int state_current, void *user_data);
-
 /**
  * @brief Creates a player handle for playing multimedia content.
  * @since_tizen 2.3
index 74da84321eae30a9feb20b54241432e97376e0be..982c13396dd85590afad3ab95dded27121d1f69c 100644 (file)
@@ -401,14 +401,6 @@ static int __lplayer_message_callback(int message, void *param, void *user_data)
                                handle->user_data[LEGACY_PLAYER_CALLBACK_TYPE_PREPARE] = NULL;
                        }
                        L_PLAYER_USER_CB_UNLOCK(handle, LEGACY_PLAYER_CALLBACK_TYPE_PREPARE);
-               } else if (msg->state.previous > MM_PLAYER_STATE_NULL && msg->state.current == MM_PLAYER_STATE_NULL) {
-                       LOGI("Unrealized!");
-                       if (handle->user_cb[LEGACY_PLAYER_CALLBACK_TYPE_STATE_CHANGED]) {
-                               ((legacy_player_state_changed_cb)handle->user_cb[LEGACY_PLAYER_CALLBACK_TYPE_STATE_CHANGED])(
-                                       __lplayer_convert_state(msg->state.previous),
-                                       __lplayer_convert_state(msg->state.current),
-                                       handle->user_data[LEGACY_PLAYER_CALLBACK_TYPE_STATE_CHANGED]);
-                       }
                }
                break;
        case MM_MESSAGE_BEGIN_OF_STREAM:        /* 0x104 */
index 04ed50c1a2db260fd79b0301c5980880d436b1e0..7d4a260cc4e530cd3ae9e3e6cbaac0f4f3eedff8 100644 (file)
@@ -84,7 +84,6 @@ typedef enum {
        MUSE_PLAYER_EVENT_TYPE_RETURN_BUFFER,
        MUSE_PLAYER_EVENT_TYPE_SERVICE_DISCONNECTED,
        MUSE_PLAYER_EVENT_TYPE_INTERRUPT_STARTED,
-       MUSE_PLAYER_EVENT_TYPE_STATE_CHANGED,
        MUSE_PLAYER_EVENT_TYPE_NUM
 } muse_player_event_e;
 
index b27da28460518531d6e8145ee5fa6f7e6300c172..2aa687ce109dd59023d6506bb5fc26e7df194738 100644 (file)
@@ -825,19 +825,6 @@ static void __mmplayer_flush_buffer(muse_player_event_e ev, muse_module_h module
        __mplayer_remove_export_media_packet(module);
 }
 
-static void __mmplayer_state_changed_cb(int state_previous, int state_current, void *user_data)
-{
-       muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
-       muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_STATE_CHANGED;
-       muse_module_h module = (muse_module_h)user_data;
-
-       LOGD("ENTER state %d -> %d", state_previous, state_current);
-
-       PLAYER_SEND_EVENT_MSG(api, ev, module,
-               MUSE_TYPE_INT, "previous", state_previous,
-               MUSE_TYPE_INT, "current", state_current);
-}
-
 static void __mplayer_error_cb(int code, void *user_data)
 {
        muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
@@ -910,7 +897,6 @@ static void *__mplayer_callback_function[MUSE_PLAYER_EVENT_TYPE_NUM] = {
        __mplayer_default_callback,   /* MUSE_PLAYER_EVENT_TYPE_RETURN_BUFFER */
        NULL,                         /* MUSE_PLAYER_EVENT_TYPE_SERVICE_DISCONNECTED */
        __mmplayer_flush_buffer,      /* MUSE_PLAYER_EVENT_TYPE_INTERRUPT_STARTED */
-       __mmplayer_state_changed_cb   /* MUSE_PLAYER_EVENT_TYPE_STATE_CHANGED */
 };
 
 static int __mplayer_set_callback_func(muse_player_handle_t *muse_player, muse_player_event_e type, bool set, void *user_data)
@@ -963,8 +949,8 @@ static int __mplayer_push_media_stream(muse_player_handle_t *muse_player, player
                int width = 0;
                int height = 0;
                if (!muse_player->video_format) {
-                       media_format_create(&muse_player->video_format);
-                       if (!muse_player->video_format) {
+                       ret = media_format_create(&muse_player->video_format);
+                       if (ret != MEDIA_FORMAT_ERROR_NONE) {
                                LOGE("fail to create media format");
                                return PLAYER_ERROR_INVALID_PARAMETER;
                        }
@@ -985,8 +971,8 @@ static int __mplayer_push_media_stream(muse_player_handle_t *muse_player, player
                int channel = 0;
                int samplerate = 0;
                if (!muse_player->audio_format) {
-                       media_format_create(&muse_player->audio_format);
-                       if (!muse_player->audio_format) {
+                       ret = media_format_create(&muse_player->audio_format);
+                       if (ret != MEDIA_FORMAT_ERROR_NONE) {
                                LOGE("fail to create media format");
                                return PLAYER_ERROR_INVALID_PARAMETER;
                        }
@@ -1254,12 +1240,6 @@ int player_disp_create(muse_module_h module)
        if (ret != PLAYER_ERROR_NONE)
                goto ERROR;
 
-       if (legacy_player_set_callback(muse_player->player_handle,
-               MUSE_PLAYER_EVENT_TYPE_STATE_CHANGED,
-               __mplayer_callback_function[MUSE_PLAYER_EVENT_TYPE_STATE_CHANGED],
-               (void *)module) != PLAYER_ERROR_NONE)
-               LOGW("failed to set state changed callback");
-
        muse_player->total_size_of_buffers = DEFAULT_VDEC_TOTAL_SIZE_OF_BUFFER;
        muse_player->extra_size_of_buffers = DEFAULT_VDEC_EXTRA_SIZE_OF_BUFFER;
        g_mutex_init(&muse_player->list_lock);
index 371a88d35bc0cf6b6f6a9eea5570b15d456516d1..23e49893525a8b5c8f694667056de2b378cfc828 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mmsvc-player
 Summary:    A Media Player module for muse server
-Version:    0.2.138
+Version:    0.2.139
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0