#include "global.h"
#include "annexb.h"
#include "memalloc.h"

Go to the source code of this file.
Functions | |
| static int | getChunk () |
| static byte | getfbyte () |
| static int | FindStartCode (unsigned char *Buf, int zeros_in_startcode) |
| int | GetAnnexbNALU (NALU_t *nalu) |
| void | OpenAnnexBFile (char *fn) |
| void | CloseAnnexBFile () |
Variables | |
| static int | BitStreamFile = -1 |
| static const unsigned int | IOBUFFERSIZE = 65536 |
| static byte * | iobuffer |
| static byte * | iobufferread |
| static unsigned int | bytesinbuffer |
| static int | is_eof |
| static int | IsFirstByteStreamNALU = 1 |
| static int | nextstartcodebytes = 0 |
Definition in file annexb.c.
| void CloseAnnexBFile | ( | void | ) |
Closes the bit stream file.
Definition at line 320 of file annexb.c.
References BitStreamFile.
Referenced by initBitsFile().
| static int FindStartCode | ( | unsigned char * | Buf, | |
| int | zeros_in_startcode | |||
| ) | [inline, static] |
returns if new start code is found at byte aligned position buf. new-startcode is of form N 0x00 bytes, followed by a 0x01 byte.
| Buf | pointer to byte-stream | |
| zeros_in_startcode | indicates number of 0x00 bytes in start-code. |
| static int getChunk | ( | ) | [inline, static] |
fill IO buffer
Definition at line 35 of file annexb.c.
References BitStreamFile.
Referenced by getfbyte(), and OpenAnnexBFile().
| static byte getfbyte | ( | ) | [inline, static] |
returns a byte from IO buffer
Definition at line 56 of file annexb.c.
References getChunk().

| void OpenAnnexBFile | ( | char * | fn | ) |
Opens the bit stream file named fn.
Definition at line 293 of file annexb.c.
References BitStreamFile, error(), errortext, ET_SIZE, and getChunk().
Referenced by initBitsFile().

int BitStreamFile = -1 [static] |
the bit stream file
Definition at line 19 of file annexb.c.
Referenced by CloseAnnexBFile(), CloseRTPFile(), getChunk(), GetRTPNALU(), OpenAnnexBFile(), and OpenRTPFile().
int nextstartcodebytes = 0 [static] |
Returns the size of the NALU (bits between start codes in case of Annex B. nalu->buf and nalu->len are filled. Other field in nalu-> remain uninitialized (will be taken care of by NALUtoRBSP.
GetAnnexbNALU expects start codes at byte aligned positions in the file