RDK Documentation (Open Sourced RDK Components)
|
Source file for player context. More...
#include <stdlib.h>
#include <memory.h>
#include <math.h>
#include <assert.h>
#include <unistd.h>
#include <errno.h>
#include <stdint.h>
#include <sys/time.h>
#include "priv_aamp.h"
#include "StreamAbstractionAAMP.h"
#include "tsprocessor.h"
#include "AampUtils.h"
Go to the source code of this file.
Data Structures | |
class | Demuxer |
Software demuxer of MPEGTS. More... | |
struct | MBAddrIncCode |
holds macro block address increment codes More... | |
Macros | |
#define | TRACE1 print_nop |
#define | TRACE2 print_nop |
#define | TRACE3 print_nop |
#define | TRACE4 print_nop |
#define | DEBUG print_nop |
#define | INFO print_nop |
#define | LOG_WARNINGS_AND_ERRORS |
#define | NOTICE(FORMAT, ...) AAMPLOG(mLogObj, eLOGLEVEL_INFO, "INFO", FORMAT, ##__VA_ARGS__) |
#define | WARNING(FORMAT, ...) AAMPLOG(mLogObj, eLOGLEVEL_WARN, "WARN", FORMAT, ##__VA_ARGS__) |
#define | ERROR(FORMAT, ...) AAMPLOG(mLogObj, eLOGLEVEL_ERROR, "ERROR", FORMAT, ##__VA_ARGS__) |
#define | DUMP_PACKET 0 |
#define | PACKET_SIZE (188) |
#define | MAX_PACKET_SIZE (208) |
#define | FIXED_FRAME_RATE (10) |
#define | FRAME_WIDTH_MAX (1920) |
#define | FRAME_HEIGHT_MAX (1080) |
#define | WAIT_FOR_DATA_MILLISEC 100 |
#define | WAIT_FOR_DATA_MAX_RETRIES 1 |
#define | MAX_PMT_SECTION_SIZE (1021) |
#define | PATPMT_MAX_SIZE (2*1024) |
#define | PAT_SPTS_SIZE (13) |
#define | PAT_TABLE_ENTRY_SIZE (4) |
#define | MAX_PTS (uint33_t::max_value().value) |
#define | MAX_DESCRIPTOR (4) |
#define | I_FRAME (0x1) |
#define | P_FRAME (0x2) |
#define | B_FRAME (0x4) |
#define | ALL_FRAMES (0x7) |
#define | SEQ_START (0x10) |
#define | IDX_BUFF_SIZE (128*1024) |
#define | DEFAULT_THROTTLE_MAX_DELAY_MS 500 |
#define | DEFAULT_THROTTLE_MAX_DIFF_SEGMENTS_MS 400 |
#define | DEFAULT_THROTTLE_DELAY_IGNORED_MS 200 |
#define | DEFAULT_THROTTLE_DELAY_FOR_DISCONTINUITY_MS 2000 |
#define | PES_STATE_WAITING_FOR_HEADER 0 |
#define | PES_STATE_GETTING_HEADER 1 |
#define | PES_STATE_GETTING_HEADER_EXTENSION 2 |
#define | PES_STATE_GETTING_ES 3 |
#define | PAYLOAD_UNIT_START(packetStart) ( packetStart[1] & 0x40) |
#define | CONTAINS_PAYLOAD(packetStart) ( packetStart[3] & 0x10) |
#define | IS_PES_PACKET_START(a) ( (a[0] == 0 )&& (a[1] == 0 ) &&(a[2] == 1 )) |
#define | PES_OPTIONAL_HEADER_PRESENT(pesStart) ( ( pesStart[6] & 0xC0) == 0x80 ) |
#define | PES_HEADER_LENGTH 6 |
#define | PES_OPTIONAL_HEADER_LENGTH(pesStart) (pesStart[PES_HEADER_LENGTH+2]) |
#define | PES_MIN_DATA (PES_HEADER_LENGTH+3) |
#define | ADAPTATION_FIELD_PRESENT(mpegbuf) ((mpegbuf[3] & 0x20) == 0x20) |
#define | PES_PAYLOAD_LENGTH(pesStart) (pesStart[4]<<8|pesStart[5]) |
#define | MAX_FIRST_PTS_OFFSET (uint33_t{45000}) /*500 ms*/ |
#define | DESCRIPTOR_TAG_SUBTITLE 0x59 |
#define | DESCRIPTOR_TAG_AC3 0x6A |
#define | DESCRIPTOR_TAG_EAC3 0x7A |
#define | DEBUG_DEMUX DEBUG |
#define | rmf_osal_memcpy(d, s, n, dc, sc) memcpy(d, s, n) |
#define | BUFFER_POOL_SIZE (10) |
#define | PLAY_BUFFER_AUDIO_MAX_PACKETS (100) |
#define | PLAY_BUFFER_MAX_PACKETS (512) |
#define | PLAY_BUFFER_SIZE (PLAY_BUFFER_MAX_PACKETS*MAX_PACKET_SIZE) |
#define | POOL_BUFFER_ALIGNMENT (16) |
#define | PLAY_BUFFER_CTX_OFFSET (0) |
#define | PLAY_BUFFER_SIGNATURE (('P')|(('L')<<8)|(('A')<<16)|(('Y')<<24)) |
#define | MICROSECONDS_PER_SECOND 1000000L |
#define | HEADER_SIZE 4 |
#define | INDEX(i) (base+i < m_packetSize-m_ttsSize-HEADER_SIZE) ? i : i+m_ttsSize+HEADER_SIZE |
#define | FLUSH_SLICE_BITS() |
#define | FLUSH_ALL_SLICE_BITS() |
Enumerations | |
enum | StreamType |
Types of streams. More... | |
Functions | |
void | print_nop (const char *format,...) |
NOP function used to controll logging. More... | |
void | tsdemuxer_InduceRollover (bool enable) |
static uint33_t | Extract33BitTimestamp (const unsigned char *ptr) |
extract 33 bit timestamp from ts packet header More... | |
template<class T , class U = T> | |
T | exchange (T &obj, U &&new_value) |
std::exchange for pre-c++14 compiler More... | |
static void | init_crc32 () |
Init CRC32 table. | |
static uint32_t | get_crc32 (unsigned char *data, int size, uint32_t initial=0xffffffff) |
Get 32 bit CRC value. More... | |
static void | dumpPacket (unsigned char *packet, int packetSize) |
Dump TS packet. More... | |
static void | dumpPackets (unsigned char *packets, int len, int packetSize) |
dump TS packets More... | |
static StreamOutputFormat | getStreamFormatForCodecType (int streamType) |
Get the format for a stream type. More... | |
Variables | |
static unsigned long long | mTimeAdjust |
static bool | mbInduceRollover |
static unsigned long | crc32_table [256] |
static int | crc32_initialized = 0 |
static MBAddrIncCode | macroblockAddressIncrementCodes [34] |
static unsigned char | nullPFrameHeader [] |
Source file for player context.
Definition in file tsprocessor.cpp.
struct MBAddrIncCode |
holds macro block address increment codes
Definition at line 4002 of file tsprocessor.cpp.
Data Fields | ||
---|---|---|
int | numBits | |
int | code |
#define MAX_PTS (uint33_t::max_value().value) |
Maximum PTS value
Definition at line 97 of file tsprocessor.cpp.
#define MAX_DESCRIPTOR (4) |
Maximum descriptor present for a elementary stream
Definition at line 100 of file tsprocessor.cpp.
#define FLUSH_SLICE_BITS | ( | ) |
Definition at line 4056 of file tsprocessor.cpp.
#define FLUSH_ALL_SLICE_BITS | ( | ) |
Definition at line 4063 of file tsprocessor.cpp.
enum StreamType |
Types of streams.
Definition at line 156 of file tsprocessor.cpp.
void print_nop | ( | const char * | format, |
... | |||
) |
NOP function used to controll logging.
[in] | format | printf style format string |
Definition at line 44 of file tsprocessor.cpp.
|
static |
extract 33 bit timestamp from ts packet header
ptr | pointer to first of five bytes encoding a 33 bit PTS timestamp |
Definition at line 192 of file tsprocessor.cpp.
T exchange | ( | T & | obj, |
U && | new_value | ||
) |
std::exchange for pre-c++14 compiler
obj | - object whose value to replace |
new_value | - the value to assign to obj |
Definition at line 219 of file tsprocessor.cpp.
|
static |
Get 32 bit CRC value.
[in] | data | buffer containing data |
[in] | size | length of data |
[in] | initial | initial CRC |
32 | bit CRC value |
Definition at line 738 of file tsprocessor.cpp.
|
static |
Dump TS packet.
[in] | packet | buffer containing packet |
[in] | packetSize | length of packet |
Definition at line 756 of file tsprocessor.cpp.
|
static |
dump TS packets
[in] | packets | buffer containing packets |
[in] | len | length of packets |
[in] | packetSize | size of TS packet |
Definition at line 792 of file tsprocessor.cpp.
|
static |
Get the format for a stream type.
[in] | streamType | stream type |
Definition at line 807 of file tsprocessor.cpp.
|
static |
Definition at line 4046 of file tsprocessor.cpp.