- Normally, this library is used in a service daemon.
So far, player handle could not know the application's
PID over the daemon's client/server interface. It is now
supported by this API.
Change-Id: I28b059edc757a0de6a6533218b1512335090ce9b
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
Name: libmm-player
Summary: Multimedia Framework Player Library
-Version: 0.6.191
+Version: 0.6.192
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
int mm_player_change_videosink(MMHandleType player, MMDisplaySurfaceType display_surface_type, void *display_overlay);
/**
+ * This function set the application PID.
+ *
+ * @param player [in] Handle of player
+ * @param pid [in] application PID
+ *
+ * @return This function returns zero on success, or negative value with error code.
+ *
+ * @pre Player state should be MM_PLAYER_STATE_NULL.
+ * @remark None
+ */
+int mm_player_set_client_pid(MMHandleType player, int pid);
+
+/**
@}
*/
/* build audio offload */
gboolean build_audio_offload;
guint audio_device_cb_id;
+
+ int client_pid;
} mmplayer_t;
typedef struct {
int _mmplayer_gst_element_link_bucket(GList *element_bucket);
void _mmplayer_typefind_have_type(GstElement *tf, guint probability, GstCaps *caps, gpointer data);
int _mmplayer_parse_profile(const char *uri, void *param, mmplayer_parse_profile_t *data);
+int _mmplayer_set_client_pid(MMHandleType hplayer, int pid);
#ifdef __cplusplus
}
return result;
}
+
+int mm_player_set_client_pid(MMHandleType player, int pid)
+{
+ int result = MM_ERROR_NONE;
+
+ MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
+
+ MMPLAYER_CMD_LOCK(player);
+
+ result = _mmplayer_set_client_pid(player, pid);
+
+ MMPLAYER_CMD_UNLOCK(player);
+
+ return result;
+}
\ No newline at end of file
return ret;
}
+int
+_mmplayer_set_client_pid(MMHandleType hplayer, int pid)
+{
+ mmplayer_t* player = (mmplayer_t*)hplayer;
+
+ MMPLAYER_FENTER();
+
+ MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
+
+ player->client_pid = pid;
+
+ LOGD("client pid[%d] %p", pid, player);
+
+ MMPLAYER_FLEAVE();
+
+ return MM_ERROR_NONE;
+}
+
static gboolean
__mmplayer_update_duration_value(mmplayer_t *player)
{