On 2011-10-14 17:04, Ross Finlayson wrote:
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?



Yes, that should work.


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".

Thanks, According to your advise, I have updated my code. But there is another 
problem here.

My filter chain look like:

H264VideoRTPSource -> MyFilter -> H264VideoRTPSink.

The reason I use a Filter betweens H264VideoRTPSource and 
H264VideoRTPSink is, I want save the file and send to multiple remote 
player(unicast) simultaneously.

But it seems the H264VideoRTPSink can only work with H264VideoStreamFramer 
directly in the current source . 
I found, if my filter want to act as a source for H264VideoRTPSink, my filter 
must implement 2 methods:

1) Boolean& PictureEndMarker();
2) void GetSPSandPPS(u_int8_t*& sps, unsigned& spsSize, u_int8_t*& pps, 
unsigned& ppsSize);

Now, I use H264VideoStreamFramer as the model and implemented the 
GetSPSAndPPS() method, but the PictureEndMarker() method seems difficult to 
implement in such situation, it want to see the next packet to determine 
whether picture end mark(See the code in  H264VideoStreamParser::parse()).

Could you give me an advise or some sample code?


-- 
邱关坚
KwanKin Yau
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to