#include <netinet/in.h>
#include "global.h"
#include "rtp.h"
#include "sei.h"

Go to the source code of this file.
Defines | |
| #define | SYMTRACESTRING(s) |
Functions | |
| int | ComposeRTPPacket (RTPpacket_t *p) |
| int | WriteRTPPacket (RTPpacket_t *p, FILE *f) |
| int | WriteRTPNALU (NALU_t *n) |
| void | RTPUpdateTimestamp (int tr) |
| void | OpenRTPFile (char *Filename) |
| void | CloseRTPFile (void) |
Variables | |
| int | CurrentRTPTimestamp = 0 |
| unsigned short | CurrentRTPSequenceNumber = 0 |
| FILE * | f |
Definition in file rtp.c.
| void CloseRTPFile | ( | void | ) |
Closes the output file for the RTP packet stream.
Definition at line 324 of file rtp.c.
References f.
Referenced by terminate_sequence().
| int ComposeRTPPacket | ( | RTPpacket_t * | p | ) |
ComposeRTPpacket composes the complete RTP packet using the various structure members of the RTPpacket_t structure.
Definition at line 68 of file rtp.c.
Referenced by WriteRTPNALU().
| void OpenRTPFile | ( | char * | Filename | ) |
Opens the output file for the RTP packet stream.
| Filename | The filename of the file to be opened |
Definition at line 303 of file rtp.c.
References f.
Referenced by start_sequence().
| void RTPUpdateTimestamp | ( | int | tr | ) |
RTPUpdateTimestamp: patches the RTP timestamp depending on the 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 256 of file rtp.c.
References RTP_TR_TIMESTAMP_MULT.
Referenced by start_slice().
| int WriteRTPNALU | ( | 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 181 of file rtp.c.
References NALU_t::buf, ComposeRTPPacket(), CurrentRTPSequenceNumber, f, 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().

| int WriteRTPPacket | ( | RTPpacket_t * | p, | |
| FILE * | f | |||
| ) |
WriteRTPPacket writes the supplied RTP packet to the output file.
| p | the RTP packet to be written (after ComposeRTPPacket() ) | |
| f | output file |
Definition at line 139 of file rtp.c.
Referenced by WriteRTPNALU().
| unsigned short CurrentRTPSequenceNumber = 0 |
The RTP timestamp of the current packet, incremented with all P and I frames
Definition at line 34 of file rtp.c.
Referenced by WriteRTPNALU().
| FILE* f |
The RTP sequence number of the current packet incremented by one for each sent packet
Definition at line 37 of file rtp.c.
Referenced by alloc_frame_store(), CloseAnnexbFile(), CloseRTPFile(), GetConfigFileContent(), OpenAnnexbFile(), OpenRTPFile(), UMHEX_DefineThresholdMB(), WriteAnnexbNALU(), and WriteRTPNALU().