arduino-audio-tools
Loading...
Searching...
No Matches
Classes | Namespaces | Variables
ContainerMPG.h File Reference
#include <string.h>
#include "AudioTools/AudioCodecs/AudioCodecsBase.h"
#include "AudioTools/AudioCodecs/AudioFormat.h"
#include "AudioTools/AudioCodecs/ContainerCommon.h"
#include "AudioTools/CoreAudio/AudioBasic/Collections/Vector.h"
#include "AudioTools/Video/Video.h"

Go to the source code of this file.

Classes

class  DemuxerMPG
 MPEG-1 System (Program) Stream Demuxer, as defined by ISO/IEC 11172-1: splits the pack_header/system_header/PES_packet framing apart and forwards the raw MPEG-1 video (ISO/IEC 11172-2) and MPEG-1 audio (ISO/IEC 11172-3, Layer I/II/III) elementary streams to setOutputVideo()/ setOutputAudio(). Both elementary streams are self-delimiting (the video ES has its own picture_start_code sequence, the audio ES its own frame sync word) so, like DemuxerAVI/DemuxerMP4, no separate decoding is done here - point the outputs at whatever decoder understands the codec (e.g. an MPEG1 video decoder, or an EncodedAudioStream wrapping an MP3/MP2 AudioDecoder). More...
 
class  MPGParseBuffer
 Minimal byte accumulator used by DemuxerMPG to parse start-code delimited units that may straddle write() calls - analogous to (but simpler than, since Program Stream framing has no nested LIST/CHUNK structure) ContainerAVI.h's ParseBuffer. More...
 
class  MuxerMPG
 MPEG-1 System (Program) Stream Encoder, as defined by ISO/IEC 11172-1: muxes an already-encoded MPEG-1 video elementary stream (ISO/IEC 11172-2) and an optional MPEG-1 audio elementary stream (ISO/IEC 11172-3, Layer I/II/III) into pack_header/system_header/PES_packet framing written to a Print (a local File to record, or e.g. a network Client to publish a live stream). More...
 

Namespaces

namespace  audio_tools
 Generic Implementation of sound input and output for desktop environments using portaudio.
 

Variables

static const uint8_t MPG_AUDIO_STREAM_ID = 0xC0
 First (and, in this single-track implementation, only) audio stream_id.
 
static const uint32_t MPG_CLOCK_HZ = 90000
 MPEG system clock runs at 90 kHz - the unit PTS/DTS/SCR are expressed in.
 
static const uint8_t MPG_PACK_START_CODE = 0xBA
 
static const uint8_t MPG_PADDING_STREAM = 0xBE
 
static const uint8_t MPG_PRIVATE_STREAM_1 = 0xBD
 
static const uint8_t MPG_PRIVATE_STREAM_2 = 0xBF
 
static const uint8_t MPG_PROGRAM_END_CODE = 0xB9
 
static const uint8_t MPG_PROGRAM_STREAM_MAP = 0xBC
 
static const uint8_t MPG_SYSTEM_HEADER_START_CODE = 0xBB
 
static const uint8_t MPG_VIDEO_STREAM_ID = 0xE0
 First (and, in this single-track implementation, only) video stream_id.