#include "nalu.h"


Go to the source code of this file.
Data Structures | |
| struct | RTPpacket_t |
Defines | |
| #define | MAXRTPPAYLOADLEN (65536 - 40) |
| #define | MAXRTPPACKETSIZE (65536 - 28) |
| #define | H264PAYLOADTYPE 105 |
| #define | H264SSRC 0x12345678 |
| #define | RTP_TR_TIMESTAMP_MULT 1000 |
Functions | |
| void | RTPUpdateTimestamp (ImageParameters *p_Img, int tr) |
| void | OpenRTPFile (ImageParameters *p_Img, char *Filename) |
| void | CloseRTPFile (ImageParameters *p_Img) |
| int | WriteRTPNALU (ImageParameters *p_Img, NALU_t *n) |
Definition in file rtp.h.
| #define H264PAYLOADTYPE 105 |
RTP paylaod type fixed here for simplicity.
Definition at line 25 of file rtp.h.
Referenced by WriteRTPNALU().
| #define H264SSRC 0x12345678 |
SSRC, chosen to simplify debugging.
Definition at line 26 of file rtp.h.
Referenced by WriteRTPNALU().
| #define MAXRTPPACKETSIZE (65536 - 28) |
Maximum size of an RTP packet incl. header.
Definition at line 24 of file rtp.h.
Referenced by WriteRTPNALU().
| #define MAXRTPPAYLOADLEN (65536 - 40) |
Maximum payload size of an RTP packet.
Definition at line 23 of file rtp.h.
Referenced by clear_sei_message(), ClearSubseqInfoPayload(), FinalizeSpareMBMap(), InitSparePicture(), and InitSubseqInfo().
| #define RTP_TR_TIMESTAMP_MULT 1000 |
should be something like 27 Mhz / 29.97 Hz
Definition at line 27 of file rtp.h.
Referenced by RTPUpdateTimestamp().
| void CloseRTPFile | ( | ImageParameters * | p_Img | ) |
Closes the output file for the RTP packet stream.
Definition at line 320 of file rtp.c.
Referenced by terminate_sequence().
| void OpenRTPFile | ( | ImageParameters * | p_Img, | |
| char * | Filename | |||
| ) |
Opens the output file for the RTP packet stream.
| p_Img | Image parameters for current picture encoding | |
| Filename | The filename of the file to be opened |
Definition at line 299 of file rtp.c.
Referenced by start_sequence().
| void RTPUpdateTimestamp | ( | ImageParameters * | p_Img, | |
| int | tr | |||
| ) |
RTPUpdateTimestamp: patches the RTP timestamp depending on the TR.
| p_Img | Image parameters for current picture encoding | |
| tr | tr: TRof the following NALUs |
This is a violation of the security req. of
RTP (random timestamp), but easier to debug
The following code assumes a wrap around of TR at 256, and needs to be changed as soon as this is no more true.
The support for B frames is a bit tricky, because it is not easy to distinguish between a natural wrap-around of the tr, and the intentional going back of the tr because of a B frame. It is solved here by a heuristic means: It is assumed that B frames are never "older" than 10 tr ticks. Everything higher than 10 is considered a wrap around.
Definition at line 250 of file rtp.c.
References img_par::CurrentRTPTimestamp, and RTP_TR_TIMESTAMP_MULT.
Referenced by start_slice().
| int WriteRTPNALU | ( | ImageParameters * | p_Img, | |
| NALU_t * | n | |||
| ) |
int RTPWriteNALU write a NALU to the RTP file
For error resilience work, we need the correct marker bit. Introduce a nalu->marker and set it in terminate_slice()?
Definition at line 173 of file rtp.c.
References nalu_t::buf, ComposeRTPPacket(), img_par::CurrentRTPSequenceNumber, img_par::CurrentRTPTimestamp, nalu_t::forbidden_bit, H264PAYLOADTYPE, H264SSRC, nalu_t::len, MAXRTPPACKETSIZE, nalu_t::nal_reference_idc, nalu_t::nal_unit_type, no_mem_exit(), nalu_t::startcodeprefix_len, and WriteRTPPacket().
Referenced by start_sequence().
