Name: pulseaudio
Summary: Improved Linux sound server
Version: 13.0
-Release: 13
+Release: 14
Group: Multimedia/Audio
License: LGPL-2.1
URL: http://pulseaudio.org
#define PA_PROP_BUFFER_ATTR_PREBUF "buffer.attr.prebuf"
#define PA_PROP_BUFFER_ATTR_FRAGSIZE "buffer.attr.fragsize"
#define PA_PROP_DEVICE_ROLE "device.role"
+
+#define PA_PROP_MEDIA_REMOTE_NAME "media.remote.name"
+#define PA_PROP_MEDIA_REMOTE_DESCRIPTION "media.remote.description"
+#define PA_PROP_MEDIA_REMOTE_ACCESS "media.remote.access"
#endif
/** For streams: localized media name, formatted as UTF-8. E.g. "Guns'N'Roses: Civil War".*/
return t;
}
+
+#ifdef __TIZEN__
+#define REMOTE_ACCESS_PERMISSION_DENIED "denied"
+#define REMOTE_ACCESS_PERMISSION_ALLOWED "allowed"
+
+static const char *access_str[] = { REMOTE_ACCESS_PERMISSION_DENIED, REMOTE_ACCESS_PERMISSION_ALLOWED };
+
+bool pa_proplist_has_remote_name(pa_proplist *p) {
+ bool is_remote = false;
+
+ if (!p)
+ return false;
+
+ is_remote = pa_proplist_contains(p, PA_PROP_MEDIA_REMOTE_NAME);
+
+ pa_log_info("Is remote : %s", pa_yes_no(is_remote));
+
+ return is_remote;
+}
+
+int pa_proplist_set_remote_access_permission(pa_proplist *p, bool allowed) {
+ if (!p)
+ return -1;
+
+ return pa_proplist_sets(p, PA_PROP_MEDIA_REMOTE_ACCESS, access_str[allowed]);
+}
+
+bool pa_proplist_remote_is_allowed(pa_proplist *p) {
+ if (!p)
+ return false;
+
+ return pa_safe_streq(pa_proplist_gets(p, PA_PROP_MEDIA_REMOTE_ACCESS), REMOTE_ACCESS_PERMISSION_ALLOWED);
+}
+#endif /* __TIZEN__ */
\ No newline at end of file
***/
#include <pulse/proplist.h>
+#ifdef __TIZEN__
+#include <stdbool.h>
+#endif
void pa_init_proplist(pa_proplist *p);
char *pa_proplist_get_stream_group(pa_proplist *pl, const char *prefix, const char *cache);
+#ifdef __TIZEN__
+bool pa_proplist_has_remote_name(pa_proplist *p);
+int pa_proplist_set_remote_access_permission(pa_proplist *p, bool allowed);
+bool pa_proplist_remote_is_allowed(pa_proplist *p);
+#endif /* __TIZEN__ */
+
#endif
#include <pulsecore/macro.h>
#include <pulsecore/play-memblockq.h>
#include <pulsecore/flist.h>
+#ifdef __TIZEN__
+#include <pulsecore/proplist-util.h>
+#endif
#include "sink.h"
}
/* Called from main thread */
+#ifdef __TIZEN__
+void pa_sink_update_proplist(pa_sink *s, pa_update_mode_t mode, pa_proplist *p) {
+#else
bool pa_sink_update_proplist(pa_sink *s, pa_update_mode_t mode, pa_proplist *p) {
+#endif
pa_sink_assert_ref(s);
pa_assert_ctl_context();
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
}
+#ifndef __TIZEN__
return true;
+#endif
+}
+
+#ifdef __TIZEN__
+/* Called from main thread */
+void pa_sink_update_proplist_remote_access_permission(pa_sink *s, bool allowed) {
+ pa_proplist* p = NULL;
+
+ pa_sink_assert_ref(s);
+ pa_assert_ctl_context();
+
+ p = pa_proplist_new();
+
+ if (pa_proplist_set_remote_access_permission(p, allowed) == 0)
+ pa_sink_update_proplist(s, PA_UPDATE_REPLACE, p);
+ else
+ pa_log_error("set remote access permission %d on proplist %p failed", allowed, p);
+
+ pa_proplist_free(p);
}
+#endif /* __TIZEN__ */
/* Called from main thread */
/* FIXME -- this should be dropped and be merged into pa_sink_update_proplist() */
void pa_sink_set_mute(pa_sink *sink, bool mute, bool save);
bool pa_sink_get_mute(pa_sink *sink, bool force_refresh);
+#ifdef __TIZEN__
+void pa_sink_update_proplist(pa_sink *s, pa_update_mode_t mode, pa_proplist *p);
+void pa_sink_update_proplist_remote_access_permission(pa_sink *s, bool allowed);
+#else
bool pa_sink_update_proplist(pa_sink *s, pa_update_mode_t mode, pa_proplist *p);
+#endif
int pa_sink_set_port(pa_sink *s, const char *name, bool save);
#include <pulsecore/log.h>
#include <pulsecore/mix.h>
#include <pulsecore/flist.h>
+#ifdef __TIZEN__
+#include <pulsecore/proplist-util.h>
+#endif
#include "source.h"
}
/* Called from main thread */
+#ifdef __TIZEN__
+void pa_source_update_proplist(pa_source *s, pa_update_mode_t mode, pa_proplist *p) {
+#else
bool pa_source_update_proplist(pa_source *s, pa_update_mode_t mode, pa_proplist *p) {
+#endif
pa_source_assert_ref(s);
pa_assert_ctl_context();
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
}
+#ifndef __TIZEN__
return true;
+#endif
+}
+
+#ifdef __TIZEN__
+/* Called from main thread */
+void pa_source_update_proplist_remote_access_permission(pa_source *s, bool allowed) {
+ pa_proplist* p = NULL;
+
+ pa_source_assert_ref(s);
+ pa_assert_ctl_context();
+
+ p = pa_proplist_new();
+
+ if (pa_proplist_set_remote_access_permission(p, allowed) == 0)
+ pa_source_update_proplist(s, PA_UPDATE_REPLACE, p);
+ else
+ pa_log_error("set remote access permission %d on proplist %p failed", allowed, p);
+
+ pa_proplist_free(p);
}
+#endif /* __TIZEN__ */
/* Called from main thread */
/* FIXME -- this should be dropped and be merged into pa_source_update_proplist() */
void pa_source_set_mute(pa_source *source, bool mute, bool save);
bool pa_source_get_mute(pa_source *source, bool force_refresh);
+#ifdef __TIZEN__
+void pa_source_update_proplist(pa_source *s, pa_update_mode_t mode, pa_proplist *p);
+void pa_source_update_proplist_remote_access_permission(pa_source *s, bool allowed);
+#else
bool pa_source_update_proplist(pa_source *s, pa_update_mode_t mode, pa_proplist *p);
+#endif
int pa_source_set_port(pa_source *s, const char *name, bool save);