[pulseaudio-discuss] How to set media role variable ??

sathishkumar sivagurunathan sathish1000 at gmail.com
Mon Nov 18 23:30:37 PST 2013


Hi,

   I have a set of media streams running. For example; a vlc player and
mplayer.

   Assuming both the player dont have the media.role variable set, are
these steps the way to go ??

   1) Try to connect to the pulse audio server using a new context, say
"test"..

   2) Try to list all the clients.

   3) Select a clients, and using

+    pa_proplist     *proplist;
+
+    proplist = pa_proplist_new ();

+    pa_proplist_sets (proplist,
+                      PA_PROP_MEDIA_ROLE,
+                      "phone");

+    pacOperation = pa_context_proplist_update (
pa_context<http://pulseaudio.sourcearchive.com/documentation/0.9.15/context_8h_5660cbb77b47761fdaa7c36ea899d114.html#5660cbb77b47761fdaa7c36ea899d114>*
*c*,

pa_update_mode_t  *mode*,

pa_proplist *  *p*,

pa_context_success_cb_t<http://pulseaudio.sourcearchive.com/documentation/0.9.15/context_8h_010aff61766ac2d9585d78a164c0fc9a.html#010aff61766ac2d9585d78a164c0fc9a>
  *cb*,

void *  *userdata*
)




      from internet,

      But in order to execute this, I need the context information for the
vlc and mplayer streams..

      My questions are

a) Is my analysis to assign media role correct ?
b) Is it possible to get the context information of another client stream ?
c) If both my previous questions/assumptions are not right, is the only way
to assign a media role is when the context for the player is created like
below


// CODE GOT FROM INTERNET.
+    pa_proplist     *proplist;
+
+    proplist = pa_proplist_new ();
+    pa_proplist_sets (proplist,
+                      PA_PROP_APPLICATION_NAME,
+                      "Mumble");
+    pa_proplist_sets (proplist,
+                      PA_PROP_APPLICATION_ID,
+                      "net.sourceforge.mumble.mumble");
+    pa_proplist_sets (proplist,
+                      PA_PROP_APPLICATION_ICON_NAME,
+                      "mumble");
+    pa_proplist_sets (proplist,
+                      PA_PROP_MEDIA_ROLE,
+                      "phone");

+    pacContext = pa_context_new_with_proplist (api, NULL, proplist);
+    pa_proplist_free (proplist);

Can you please help me with this ??

Thanks,
Sathish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20131119/ca07edc4/attachment.html>


More information about the pulseaudio-discuss mailing list