{ "client_pid", "i", "in" },
{ "role", "s", "in" },
{ "parent_id", "i", "in" },
- { "stop_others", "b", "in" } };
+ { "stop_others", "b", "in" },
+ { "fd", "h", "in" }};
static pa_dbus_arg_info sound_stop_args[] = { { "stream_idx", "i", "in" } };
-static const char* signature_args_for_in[] = { "sss", "s", NULL, "sss", "siisib", "i" };
+static const char* signature_args_for_in[] = { "sss", "s", NULL, "sss", "siisibh", "i" };
static pa_dbus_method_handler method_handlers[METHOD_HANDLER_MAX] = {
[METHOD_HANDLER_SIMPLE_PLAY] = {
" <arg name=\"role\" direction=\"in\" type=\"s\"/>" \
" <arg name=\"parent_id\" direction=\"in\" type=\"i\"/>" \
" <arg name=\"stop_others\" direction=\"in\" type=\"b\"/>" \
+ " <arg name=\"fd_passing_index\" direction=\"in\" type=\"h\"/>" \
" </method>" \
" <method name=\"SOUND_PLAYER_METHOD_NAME_SOUND_STOP\">" \
" <arg name=\"stream_idx\" direction=\"in\" type=\"i\"/>" \
uint32_t stream_idx;
dbus_bool_t stop_others = false;
pa_proplist *p;
+ int fd = -1;
pa_assert_se(dbus_message_get_args(msg, NULL,
DBUS_TYPE_STRING, &filename,
DBUS_TYPE_STRING, &role,
DBUS_TYPE_INT32, &parent_id,
DBUS_TYPE_BOOLEAN, &stop_others,
+ DBUS_TYPE_UNIX_FD, &fd,
DBUS_TYPE_INVALID));
if (stop_others) {
pa_log_info("stop done, ready to play the requested one");
}
+ pa_log_info("message contains unix fds(%s), received fd(%d)",
+ pa_yes_no(dbus_message_contains_unix_fds(msg)), fd);
+
p = pa_proplist_new();
pa_proplist_sets(p, PA_PROP_MEDIA_ROLE, role);
pa_proplist_setf(p, PA_PROP_APPLICATION_PROCESS_ID_ORIGIN, "%d", client_pid);
pa_proplist_setf(p, PA_PROP_MEDIA_PARENT_ID, "%d", parent_id);
ret = pa_play_file_repeat(pa_namereg_get(u->module->core, NULL, PA_NAMEREG_SINK),
- filename, NULL, p, repeat, &stream_idx);
+ filename, NULL, p, repeat, fd, &stream_idx);
if (ret != 0) {
pa_dbus_send_error(conn, msg, DBUS_ERROR_NOT_SUPPORTED, "%s",
"org.tizen.multimedia.audio.UnsupportedMediaType");