<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Module restore restores volume and mute settings from wrong sink input"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93855#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Module restore restores volume and mute settings from wrong sink input"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93855">bug 93855</a>
              from <span class="vcard"><a class="email" href="mailto:leonard-rh-bugzilla@den.ottolander.nl" title="Leonard den Ottolander <leonard-rh-bugzilla@den.ottolander.nl>"> <span class="fn">Leonard den Ottolander</span></a>
</span></b>
        <pre>Please do not look at the inline patch proposals in the original comment. Look
at the attached patch that leaves pa_proplist_get_stream_group() intact for use
by module-filter-apply.c. In the attached patch a /new/ function
pa_proplist_get_stream_id() is defined so module-stream-restore.c can identify
the sink input entries uniquely.

If you think using a unique id to identify streams (sink input/source output)
interferes with module-filter-apply.c then please explain how. Afaict the
string "module-stream-restore.id" is only referenced in module-stream-restore.c
and not by module-filter-apply.c. module-filter-apply.c just gets the group by
calling pa_proplist_get_stream_group() directly.

To restore the original volume the streams need to be identified with a unique
id. Currently there is no mechanism to uniquely identify entries. This is what
I attempt to fix.

Please do not get hung up on the use of the pid. It is about labeling the
different streams with unique ids to be able to distinguish them. I use the pid
as that is readily available, but as you can see I fall back to creating a
random string in case the pid is not available in the property list. Read "pid"
as "a unique string identifying the stream" as I only reference the /entry/
with this id, I'm not trying to do anything with the process identified by this
pid itself.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>