[Live-devel] Multiple File Sinks Issue

Chris Paucar chris.paucar at roc-connect.com
Fri Feb 22 20:28:11 PST 2019


Hi Ross,

It turns out I was copying the stream before it was fully initialized.
Thanks for pointing out the differences from the sample code too!

Chris

On Fri, Feb 22, 2019 at 5:16 PM Ross Finlayson <finlayson at live555.com>
wrote:

> You seem to be on the right track (though I can’t address whatever
> specific problems you are having, because the word “issues” isn’t very
> descriptive :-)
>
> It’s important to do things in the right order, specifically:
> 1/ Call “initiate()” on your “MediaSubsession” object (to create RTP
> source objects)
> 2/ Call
>         StreamReplicator* streamReplicator =
> StreamReplicator::createNew(env, mediaSubsession->.readSource())
>   to create a replicator object.
> 3/ Call
>         FramedSource* replica1 = streamReplicator->createStreamReplica();
>         FramedSource* replica2 = streamReplicator->createStreamReplica();
> 4/ Call
>         mediaSubsession->addFilter(replica1);
>    to tell the downstream “QuickTimeFileSink” object (to be created next)
> to read from the (first) replica.
> 5/ Call
>         QuickTimeFileSink::createNew()
>    on your “MediaSubsession” object.
> 6/ Create appropriate filter(s) and sink for creating a Transport Stream
> from “replica2”.  This will be similar to the code in
> “testH264VideoToTransportStream.cpp”, ***except that*** you must use a
> “H264VideoStreamDiscreteFramer” rather than a “H264VideoStreamFramer”.
> (This is because your input source (“replica2” in this case) will be a
> sequence of discrete H.264 NAL units, rather than an unstructured byte
> stream (e.g., from a file.)
> 7/ Call “startPlaying()” on each of your sinks (the “QuickTimeFileSink”
> that you created in step 5/, and the sink (“FileSink”?) that you created in
> step 6/.
>
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20190222/524f1355/attachment.html>


More information about the live-devel mailing list