<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div>Hi,<br><br></div>   I have a set of media streams running. For example; a vlc player and mplayer.<br><br></div>   Assuming both the player dont have the media.role variable set, are these steps the way to go ??<br>
<br></div>   1) Try to connect to the pulse audio server using a new context, say "test"..<br><br></div>   2) Try to list all the clients.<br><br></div>   3) Select a clients, and using <br><br>+    pa_proplist     *proplist;<br>
+<br>+    proplist = pa_proplist_new ();<br><br>+    pa_proplist_sets (proplist,<br>+                      PA_PROP_MEDIA_ROLE,<br>+                      "phone");<br> <br>+    pacOperation = <table class=""><tbody><tr>
<td class="">pa_context_proplist_update           </td>
          <td>(</td>
          <td class=""><a class="" href="http://pulseaudio.sourcearchive.com/documentation/0.9.15/context_8h_5660cbb77b47761fdaa7c36ea899d114.html#5660cbb77b47761fdaa7c36ea899d114">pa_context</a> * </td>
          <td class=""> <em>c</em>, </td>
        </tr>
        <tr>
          <td class=""><br></td>
          <td><br></td>
          <td class="">pa_update_mode_t </td>
          <td class=""> <em>mode</em>, </td>
        </tr>
        <tr>
          <td class=""><br></td>
          <td><br></td>
          <td class="">pa_proplist * </td>
          <td class=""> <em>p</em>, </td>
        </tr>
        <tr>
          <td class=""><br></td>
          <td><br></td>
          <td class=""><a class="" href="http://pulseaudio.sourcearchive.com/documentation/0.9.15/context_8h_010aff61766ac2d9585d78a164c0fc9a.html#010aff61766ac2d9585d78a164c0fc9a">pa_context_success_cb_t</a> </td>
          <td class=""> <em>cb</em>, </td>
        </tr>
        <tr>
          <td class=""><br></td>
          <td><br></td>
          <td class="">void * </td>
          <td class=""> <em>userdata</em></td><td> </td>
        </tr>
        <tr>
          <td><br></td>
          <td>)</td>
          <td><br></td><td><br></td><td><br></td>
        </tr>
      </tbody></table>




<br><br></div>      from internet, <br><br></div>      But in order to execute this, I need the context information for the vlc and mplayer streams..<br><br></div>      My questions are <br><br></div>a) Is my analysis to assign media role correct ?<br>
</div>b) Is it possible to get the context information of another client stream ?<br></div>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 <br>
<br><br></div>// CODE GOT FROM INTERNET.<br><div>+    pa_proplist     *proplist;<br>+<br>+    proplist = pa_proplist_new ();<br>+    pa_proplist_sets (proplist,<br>+                      PA_PROP_APPLICATION_NAME,<br>+                      "Mumble");<br>
+    pa_proplist_sets (proplist,<br>+                      PA_PROP_APPLICATION_ID,<br>+                      "net.sourceforge.mumble.mumble");<br>+    pa_proplist_sets (proplist,<br>+                      PA_PROP_APPLICATION_ICON_NAME,<br>
+                      "mumble");<br>+    pa_proplist_sets (proplist,<br>+                      PA_PROP_MEDIA_ROLE,<br>+                      "phone");<br> <br>+    pacContext = pa_context_new_with_proplist (api, NULL, proplist);<br>
+    pa_proplist_free (proplist);<br><br></div><div>Can you please help me with this ??<br><br></div><div>Thanks,<br></div><div>Sathish<br></div></div>