|
libclosedcaption 1.0.3
ISDB-Tb/SBTVD (Brazilian DTV) closed caption extraction from MPEG-TS
|
Reading the header of a caption PES packet. More...
#include "caption-common.h"

Go to the source code of this file.
Data Structures | |
| struct | PES_pts_t |
| struct | PacketPES_s |
| struct | PacketPES_s::header |
| union | PacketPES_s::header::flags |
| struct | PacketPES_s::payload |
Macros | |
| #define | PACKET_PES_PREFIX 0x000001 |
| #define | PACKET_PES_PRIVATE_STREAM 0xbd |
PTS_DTS_flags field values | |
| #define | PTS_is_NONE 0x00 |
| #define | PTS_is_FORBIDEN 0x01 |
| #define | PTS_is_ONLY_PTS 0x02 |
| #define | PTS_is_BOTH 0x03 |
Typedefs | |
| typedef struct PacketPES_s | PacketPES_t |
Functions | |
| bool | packet_pes_load (const uint8_t *pack_raw, const size_t raw_len, PacketPES_t *out) |
| void | packet_pes_set_pts (uint32_t *ts, PES_pts_t *pts) |
Reading the header of a caption PES packet.
ISDB-T captions are carried in PES packets with stream_id 0xBD (private_stream_1), in the "PES data packet" format of ARIB STD-B24, Volume 3, Chapter 5:
* [PES header][data_identifier][private_stream_id][PES_data_packet_header_length][...][data_group] *
packet_pes_load() reads the header, the PTS and finds the data_group, which is then processed by caption_data_load().
Definition in file packet-pes.h.
| #define PACKET_PES_PREFIX 0x000001 |
(24 bits) packet_start_code_prefix.
Definition at line 23 of file packet-pes.h.
| #define PACKET_PES_PRIVATE_STREAM 0xbd |
stream_id of private_stream_1, used by captions.
Definition at line 24 of file packet-pes.h.
| #define PTS_is_NONE 0x00 |
No PTS and no DTS.
Definition at line 30 of file packet-pes.h.
| #define PTS_is_FORBIDEN 0x01 |
Value forbidden by the spec.
Definition at line 31 of file packet-pes.h.
| #define PTS_is_ONLY_PTS 0x02 |
PTS only (Presentation Time Stamp).
Definition at line 32 of file packet-pes.h.
| #define PTS_is_BOTH 0x03 |
PTS and DTS (Presentation/Decode Time Stamp).
Definition at line 33 of file packet-pes.h.
| typedef struct PacketPES_s PacketPES_t |
PES packet. See PacketPES_s.
Definition at line 48 of file packet-pes.h.
| bool packet_pes_load | ( | const uint8_t * | pack_raw, |
| const size_t | raw_len, | ||
| PacketPES_t * | out | ||
| ) |
Loads the header of a PES packet and finds the data_group.
| pack_raw | Whole PES packet, starting at the packet_start_code_prefix (00 00 01). |
| raw_len | Size of pack_raw in bytes. |
| out | Receives the loaded packet. The payload pointers point inside pack_raw. |
| void packet_pes_set_pts | ( | uint32_t * | ts, |
| PES_pts_t * | pts | ||
| ) |
Converts a PTS in 90 kHz units to hours, minutes and seconds.
| ts | PTS in 90 kHz units. |
| pts | Receives the converted PTS; pts->ts gets ts itself. |