[Live-devel] MPEG4 streaming using ffmpeg as encoder
ssingh at neurosoft.in
ssingh at neurosoft.in
Fri Oct 18 16:24:45 PDT 2013
Thanks for the input and i rellay appreciate your help. If i subclass
ServerMediaSubsession than I need to implement other functions too. Is
there a another class which will do most for me. I noticed that
OnDemandMediaSubsession is being used for some subsession implementation
but is it only for unicast or can i use it for multicast too. I am
little confused as for what the ondemand media subsession is used.
Thanks,
On 2013-10-19 03:47, Ross Finlayson wrote:
>> Thank you for the clarification. I will try to send this extra data
>> as first packet. I have another confusion. if i send this packet as
>> first packet when there was no client attached to it and later on
>> client attached to it than how will that client get this packet
>
> As long as you deliver this extra data as the first frame - when you
> do your first delivery - then it will get remembered (as special
> 'configuration data') by the downstream
> "MPEG4VideoStreamDiscreteFramer" object. No problem.
>
> I assume that your "ServerMediaSubsession" subclass (for your RTSP
> server) is similar to the code for
> "MPEG4VideoFileServerMediaSubsession", in that you are implementing
> not only the virtual functions "createNewStreamSource()" and
> "createNewRTPSink()", but also the virtual function "getAuxSDPLine()"
> (in the same way as is done in
> "MPEG4VideoFileServerMediaSubsession.cpp").
>
>> Right now the way I am using FrameSource is:
>>
>> /****************************************************************/
>> void MyStreamingDeviceSource::streamPacket(AVPacket pkt)
>> {
>> m_queue.putPacket(&pkt);
>> envir().taskScheduler().triggerEvent(m_eventID, this);
>> }
>> /***************************************************************/
>>
>> so it does not matter if a client is attached or not I keep on
>> sending the data to network.
>
> OK, so you'll need to add this line to the start of your
> "deliverFrame()" function:
>
> if (!isCurrentlyAwaitingData()) return; // we're not ready for the
> data yet
>
> (see the example in "DeviceSource.cpp")
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/ [1]
>
>
> Links:
> ------
> [1] http://www.live555.com/
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
More information about the live-devel
mailing list