<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">On 2011-10-14 17:04, Ross Finlayson wrote:
<blockquote cite="mid:E05D53E2-4282-463E-A8C3-C7E9EB162E8F@live555.com" type="cite">
<div><blockquote type="cite"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">Now,
I can use this filter as the source of my custom subsession object,
then pass True as reuseFirstSource argument of the subsession
constructor, so I can just use one filter to serve multiple remote
player, right?<br></div></blockquote><div><br></div></div>
Yes, that should work.
<div><br></div>
<div>However, your filter class is not quite right. In your
"afterGettingCallback()" function, you need to set the filter's
"fFrameSize", "fNumTruncatedBytes", "fPresentationTime", and
"fDurationInMicroseconds" member variables from the corresponding
function parameters: "frameSize", "numTruncatedBytes",
"presentationTime", and "durationInMicroseconds".</div>
<br>
</blockquote>
Thanks, According to your advise, I have updated my code. But there is another problem here.<br><br>My filter chain look like:<br><br>H264VideoRTPSource -> MyFilter -> H264VideoRTPSink.<br><br>The reason I use a Filter betweens H264VideoRTPSource and <br>H264VideoRTPSink is, I want save the file and send to multiple remote <br>player(unicast) simultaneously.<br><br>But it seems the H264VideoRTPSink can only work with H264VideoStreamFramer directly in the current source . <br>I found, if my filter want to act as a source for H264VideoRTPSink, my filter must implement 2 methods:<br><br>1) Boolean& PictureEndMarker();<br>2) void GetSPSandPPS(u_int8_t*& sps, unsigned& spsSize, u_int8_t*& pps, unsigned& ppsSize);<br><br>Now, I use H264VideoStreamFramer as the model and implemented the <br>GetSPSAndPPS() method, but the PictureEndMarker() method seems difficult to <br>implement in such situation, it want to see the next packet to determine whether picture end mark(See the code in H264VideoStreamParser::parse()).<br><br>Could you give me an advise or some sample code?<br><br><br>-- <br>Çñ¹Ø¼á<br>KwanKin Yau</div>