[Live-devel] Write completed Nal / frame to sink when a new begins

Alberto Alvarez alvarezgalberto at uniovi.es
Wed Dec 7 03:21:19 PST 2011


Hi,

I'm sorry I did not explain myself.

First of all, I am aware that I must not be touching existent and
working code. I have not done any modifications. I am just trying to
understand how it works. And the code has no problem. I just want to
adapt it to my needs.

Let's say I would like to have a Video RTP source that identify
complete frames (now it does at Nal-by-nal basis). Then the Source
waits until the frame is completed, to write it to the sink at once.
As you explained to me already, i can use the markerBit (at RTPSource)
to check the end of a frame (use it with "completesFrame" flag
(leaving MultiFramedRTPSource as a black box). I have done it and it
works. Thanks for that.

But what if i can't rely on markerBit (which the RFC already
advises)?. What I have is a way to detect the beginning of a new
frame, but not the end of it. ¿Do you know how can I use the
beginsFrame/completesFrame flags to write the frame to the sink in
that situation?


Thanks. your comments are really helpful

Alberto Álvarez González
alvarezgalberto at uniovi.es


I'm sorry, but I don't really understand your question.

However, rather than messing around modifying the supplied code, which
is something that you shouldn't be doing, especially since you are "a
bit lost at how the data is transferred between source and sink", why
don't you instead treat the existing "MultiFramedRTPSource" code as
being an opaque 'black box', and tell us what you want *your*
application code to do?

I.e., assuming, for now at least, that you cannot modify the existing
code (because you will get no support from me if you do), what problem
do you have - or think you have - with it?

Ross Finlayson
Live Networks, Inc.http://www.live555.com/






On Wed, Dec 7, 2011 at 10:24 AM, Alberto Alvarez
<alvarezgalberto at uniovi.es>wrote:

> Hi all,
>
> I have been messing around with doGetNextFrame1() code in
> MultiFramedRTPSource
> AFAIK, currently this function sends to its sink the completed frame
> whenever the "currenPacketCompletesFrames" is flagged, which makes perfect
> sense.
>
> However, i would like to be able to send it to the sink once i detect the
> new begining of a frame/nal. It would require to "pass" to the sink all
> appended packets but the latest, which will be part of the next call to the
> sink.
>
> Is it possible, with a few changes, to accomplish this?
>
> Also, i am a bit lost at how the data is transfered between source and
> sink. Where is the data appended to the buffer from which the sink reads?
> is it in nextPacket->use() ?
>
> Kind Regards,
>
>
> Alberto Álvarez González
> alvarezgalberto at uniovi.es
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20111207/528c8f8f/attachment.html>


More information about the live-devel mailing list