Thanks for this Ross.
AMD APU's DEM encoder does, but another TI Di-Vinci does not..
On a separate note, how different is the G-Streamer media server for RTSP 
differ from Live555?
It looks similar at a glance.
Have a good weekend.
Rich.

From: live-devel [mailto:live-devel-boun...@ns.live555.com] On Behalf Of Ross 
Finlayson
Sent: 20 January 2015 17:20
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] H264or5VideoStreamParser::parse() from a FramedSource

Do you recommend a method for identifying frame start and end across multiple 
nals?

Does your encoder not tell you this 'out of band' somehow?

If not, then you can use the following algorithm to tell you if whether or not 
a NAL unit begins a new 'access unit' (i.e., 'frame') - i.e., whether you need 
to call "gettimeofday()" to set the presentation time for this (and perhaps 
subsequent) NAL units:

            Boolean doesH264NALUnitBeginNewAccessUnit(u_int8_t* nalUnit) {
                        u_int8_t nal_unit_type = nalUnit[0]&0x1F;

                        if ((nal_unit_type >= 6 && nal_unit_type <= 9) || 
(nal_unit_type >= 14 && nal_unit_type <= 18)) return True;

                        if (nal_unit_type <= 5 && nal_unit_type > 0) { // we're 
a VLC NAL
                                    // Look at the high bit of the next byte; 
if it's set, then this NAL starts a new 'access unit':
                                    if ((nalUnit[1]&0x80) != 0) return True;
                        }

                        return False;
            }

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


______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to