Add get information of content is streaming 95/48695/1 accepted/tizen/mobile/20151001.224720 accepted/tizen/tv/20151001.224733 accepted/tizen/wearable/20151001.224747 submit/tizen/20151001.072241
authorHyongtaek Lim <hyongtaek.lim@samsung.com>
Fri, 25 Sep 2015 03:38:56 +0000 (12:38 +0900)
committerHyongtaek Lim <hyongtaek.lim@samsung.com>
Fri, 25 Sep 2015 03:39:25 +0000 (12:39 +0900)
Signed-off-by: Hyongtaek Lim <hyongtaek.lim@samsung.com>
Change-Id: Id5814b446e504a3d643b669d10399bb2d063732e

src/client/mm_player_client.c
src/include/mm_player.h
src/include/mm_player_mused.h
src/include/mm_player_priv.h
src/server/mm_player.c
src/server/mm_player_priv.c

index ce65725..7cda88a 100644 (file)
@@ -739,7 +739,7 @@ int _mmplayer_update_video_param(mm_player_t *player)
 
 
                                /* if evasimagesink using converter */
-                               if (player->set_mode.video_zc && player->pipeline->videobin[MMPLAYER_V_CONV].gst)
+                               if (player->set_mode.video_zc && player->pipeline->mainbin[MMPLAYER_M_V_CONV].gst)
                                {
                                        int width = 0;
                                        int height = 0;
@@ -1475,3 +1475,22 @@ static int __mmplayer_mused_set_state(mm_player_t* player, int state)
 
        return ret;
 }
+
+int mm_player_get_state_timeout(MMHandleType player, int *timeout, bool is_streaming)
+{
+       mm_player_t* handle = (mm_player_t*) player;
+
+       MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
+       MMPLAYER_RETURN_VAL_IF_FAIL(timeout, MM_ERROR_INVALID_ARGUMENT);
+
+       MMPLAYER_CMD_LOCK( player );
+
+       if(is_streaming)
+               *timeout = handle->ini.live_state_change_timeout;
+       else
+               *timeout = handle->ini.localplayback_state_change_timeout;
+
+       MMPLAYER_CMD_UNLOCK( player );
+
+       return MM_ERROR_NONE;
+}
index 7d5ca3e..e638116 100644 (file)
@@ -2256,6 +2256,19 @@ int mm_player_set_audio_stream_changed_callback(MMHandleType player, mm_player_s
 int mm_player_set_video_stream_changed_callback(MMHandleType player, mm_player_stream_changed_callback callback, void *user_param);
 
 /**
+ * This function check the content is streaming or not\n
+ * It's only supported when video stream is included in file. \n
+ *
+ * @param      player   [in] Handle of player.
+ * @param      is_streaming [out] flag of content type.
+ *
+ * @return     This function returns zero on success, or negative value with error
+ *                     code.
+ * @since 3.0
+ */
+int mm_player_is_streaming(MMHandleType player, bool *is_streaming);
+
+/**
        @}
  */
 
index 10b05a2..1b3601b 100644 (file)
@@ -48,6 +48,7 @@ int mm_player_mused_destroy(MMHandleType player);
 int mm_player_mused_realize(MMHandleType player, char *caps);
 int mm_player_mused_unrealize(MMHandleType player);
 int mm_player_mused_pre_unrealize(MMHandleType player);
+int mm_player_get_state_timeout(MMHandleType player, int *timeout, bool is_streaming);
 
 /**
  * This function get string of raw video caps.
index 6f1a359..be05b94 100644 (file)
@@ -828,8 +828,6 @@ int _mmplayer_audio_effect_custom_apply(mm_player_t *player);
 
 int _mmplayer_set_audiostream_cb_ex(MMHandleType hplayer, bool sync, mm_player_audio_stream_callback_ex callback, void *user_param);
 gboolean __mmplayer_post_message(mm_player_t* player, enum MMMessageType msgtype, MMMessageParamType* param);
-gboolean __mmplayer_is_streaming(mm_player_t* player);
-
 
 int _mmplayer_gst_set_audio_channel(MMHandleType hplayer, MMPlayerAudioChannel ch_idx);
 int _mmplayer_change_track_language (MMHandleType hplayer, MMPlayerTrackType type, int index);
@@ -878,6 +876,7 @@ gint __gst_handle_stream_error( mm_player_t* player, GError* error, GstMessage *
 int _mmplayer_set_shm_stream_path(MMHandleType hplayer, const char *path);
 int _mmplayer_get_raw_video_caps(mm_player_t *player, char **caps);
 int _mmplayer_sound_register_with_pid(MMHandleType hplayer, int pid);
+int _mmplayer_is_streaming(MMHandleType hplayer, bool* is_streaming);
 int __mmplayer_get_video_angle(mm_player_t* player, int *user_angle, int *org_angle);
 #ifdef __cplusplus
        }
index 8b4667b..6620e5a 100644 (file)
@@ -1298,3 +1298,17 @@ int mm_player_get_raw_video_caps(MMHandleType player, char **caps)
 
        return result;
 }
+
+int mm_player_is_streaming(MMHandleType player, bool *is_streaming)
+{
+       MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
+       MMPLAYER_RETURN_VAL_IF_FAIL(is_streaming, MM_ERROR_INVALID_ARGUMENT);
+
+       MMPLAYER_CMD_LOCK( player );
+
+       *is_streaming = MMPLAYER_IS_STREAMING(player);
+
+       MMPLAYER_CMD_UNLOCK( player );
+
+       return MM_ERROR_NONE;
+}
index a1b939a..ef813ba 100644 (file)
@@ -16239,20 +16239,6 @@ _mmplayer_get_video_rotate_angle(MMHandleType hplayer, int *angle)
        return MM_ERROR_NONE;
 }
 
-gboolean
-__mmplayer_is_streaming(mm_player_t* player)
-{
-       gboolean result = FALSE;
-
-       MMPLAYER_FENTER();
-
-       MMPLAYER_RETURN_VAL_IF_FAIL (player, FALSE);
-       result = __is_streaming (player) ;
-
-       MMPLAYER_FLEAVE();
-       return result;
-}
-
 static gboolean
 __mmplayer_add_dump_buffer_probe(mm_player_t *player, GstElement *element)
 {