[Live-devel] SVC -> AVC

Sergey G. Kosov sergey.kosov at project-10.de
Mon Jul 11 13:50:55 PDT 2011


As I understand, SkipBytes(pBufer, n) just shifting the pointer to input
data flow for n. The problem is I have to read the data first to understand
if I have to skip it. So firstly I read one NAL block to the buffer "data"
(from sequence 00 00 00 01 till the next sequence 00 00 00 01):

		// assert that we are on position where the NAL unit starts
(0x00000001)
		u_int8_t *data = new u_int8_t[NAL_MAX_SIZE];
		int n = 0;
		for (int i = 0; i < 4; i++) data[n++] = get1Byte();

		while (next4Bytes != 0x00000001) {		
			data[n++] = get1Byte();
next4Bytes = test4Bytes();
		}

Then I analyse it with one function:

		st_svcext_preview_info_t	preview_info;
       		st_svcext_preview(handle, reinterpret_cast<char *>(data),
&preview_info);

And only then, depending on the "preview_info.action" I can decide if the
current NAL unit should be skipped or not.
As I understood, if the current NAL block should be skipped and I call
SkipBytes(n) - than the next n bytes will be skipped ? Or not ?




-----Original Message-----
From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: Monday, July 11, 2011 7:48 AM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] SVC -> AVC

>I have tried to rewrite H264VideoStreamFarmer with 
>H264VideoStreamParcer to SVCVideoStreamFarmer with SVCVideoStreamParcer 
>correspondingly. Especially I put attention to the parse() function. 
>The problem I met now is that the parse() function stucks, when some of 
>the input packets should be ignored.
>
>I use "svcext" library to analyze the H264 packets. Since there are 
>till 9 AVC flows in one SVC, I have to skip some redundant packets, but 
>when I try to skip them in the parse function it just stucks.
>Could you, please, help me with explaining how should I process the 
>data in that case.

I haven't yet had time to look at your code in detail, but (if you're not
already doing so), you should skip redundant NAL units by calling
"skipBytes()".
-- 

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



More information about the live-devel mailing list