<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>Re: [Live-devel] Problems with
MediaSession::initiateByMed</title></head><body>
<blockquote type="cite" cite><font face="Arial" size="-1">I noticed a
strange effect when calling initiateByMediaType() more than once
during session setup.</font></blockquote>
<div><br></div>
<div>That happens because you're trying to use
&quot;initiateByMediaType()&quot; in a way in which was not intended.&nbsp;
(It was intended to be used to play a single subsession only.)</div>
<div><br></div>
<div><br></div>
<blockquote type="cite" cite><font face="Arial" size="-1">In my
application I call setup methods in the following
order:</font></blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1">...</font></blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1">pSession-&gt;initiateByMediaType( &quot;video/H264&quot;
);</font></blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1">pClient-&gt;setupMediaSubsession();</font></blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1">pSession-&gt;initiateByMediaType( &quot;audio/PCMU&quot;
);</font></blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1">pClient-&gt;setupMediaSubsession();<br>
pClient-&gt;playMediaSession();</font></blockquote>
<div><br></div>
<div>Instead of doing this, I suggest iterating through the whole set
of &quot;MediaSubsession&quot;s, checking each subsession's
&quot;mediumName()&quot; and &quot;codecName()&quot;, and then calling
&quot;initiate()&quot; only on the subsessions that you want.</div>
<x-sigsep><pre>-- 
</pre></x-sigsep>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
http://www.live555.com/</div>
</body>
</html>