|
FFmpeg
|
Super Audio CD (SACD) demuxer. More...
#include "config.h"#include <inttypes.h>#include <string.h>#include "libavutil/avstring.h"#include "libavutil/bprint.h"#include "libavutil/channel_layout.h"#include "libavutil/common.h"#include "libavutil/dict.h"#include "libavutil/intreadwrite.h"#include "libavutil/mathematics.h"#include "libavutil/mem.h"#include "avformat.h"#include "avio_internal.h"#include "demux.h"#include "internal.h"Go to the source code of this file.
Data Structures | |
| struct | SACDArea |
| struct | SACDContext |
Macros | |
| #define | SECTOR_SIZE 2048 |
| #define | RAW_SECTOR_SIZE 2064 |
| #define | RAW_SECTOR_HEADER 12 |
| #define | MASTER_TOC_LSN 510 |
| #define | FRAMES_PER_SECOND 75 |
| #define | BITS_PER_SAMPLE 8 |
| #define | SAMPLE_RATE (64 * 44100 / BITS_PER_SAMPLE) |
| #define | FRAME_SAMPLES (SAMPLE_RATE / FRAMES_PER_SECOND) |
| #define | MAX_FRAME_SECTORS 16 |
| #define | MAX_PACKET_SIZE (SECTOR_SIZE - 3) |
| #define | MAX_FRAME_SIZE (MAX_FRAME_SECTORS * MAX_PACKET_SIZE) |
| #define | MAX_TRACKS 255 |
| #define | MAX_TRACK_TEXT_SECTORS 32 |
| #define | DATA_TYPE_AUDIO 2 |
Enumerations | |
| enum | { FRAME_FORMAT_DST = 0 , FRAME_FORMAT_DSD_3_IN_14 = 2 , FRAME_FORMAT_DSD_3_IN_16 = 3 } |
Functions | |
| static int | sacd_probe (const AVProbeData *p) |
| static int | read_sectors (AVFormatContext *s, int64_t lsn, uint8_t *buf, int nb) |
| static int | time_code (const uint8_t *tc) |
| static int | put_iso8859 (AVBPrint *bp, int part, const uint8_t *str, int len) |
| static void | set_string (AVFormatContext *s, AVDictionary **m, const char *key, const uint8_t *str, int max_len, int flags) |
| static void | set_text (AVFormatContext *s, AVDictionary **m, const char *key, const uint8_t *buf, int size, int offset, int flags) |
| static void | set_genre (AVDictionary **m, const uint8_t *genre) |
| static int | text_supported (AVFormatContext *s, const uint8_t *text_channels) |
| static int | read_master_toc (AVFormatContext *s, uint32_t *toc_lsn) |
| static void | read_track_text (AVFormatContext *s, AVDictionary **m, const uint8_t *buf, int size, int track) |
| static int | read_access_list (AVFormatContext *s, SACDArea *a, int64_t lsn) |
| static void | seek_frame (AVFormatContext *s, AVStream *st, int64_t pos) |
| static int | read_area_toc (AVFormatContext *s, int area, int64_t toc_lsn, int64_t other_toc_lsn) |
| static int | sacd_read_header (AVFormatContext *s) |
| static int | read_audio_header (SACDArea *a) |
| static int | read_frame (AVFormatContext *s, AVStream *st, AVPacket *pkt) |
| static int | sacd_read_packet (AVFormatContext *s, AVPacket *pkt) |
| static int | sacd_read_seek (AVFormatContext *s, int stream_index, int64_t timestamp, int flags) |
| static int | sacd_read_close (AVFormatContext *s) |
Variables | ||
| struct { | ||
| int toc_address | ||
| const char * signature | ||
| const char * name | ||
| } | areas [] | |
| static const uint8_t | iso8859_parts [] | |
| static const char *const | genres [] | |
| const FFInputFormat | ff_sacd_demuxer | |
Super Audio CD (SACD) demuxer.
A disc holds a Master TOC and up to two Audio Areas, a multi channel one and a 2-channel stereo one, as a rule two mixes of the same tracks. Each area has an Area TOC in front of and behind its Track Area. The Track Area is a run of Audio Sectors, whose headers cut it into the packets of Multiplexed Frames of 1/75 s, which carry either plain DSD or one DST frame.
Each area is a program with one stream here. A file has one list of chapters, which are the tracks of the first area.
The structure and field names are the ones of the Super Audio CD System Description, as far as they are public.
Master TOC EP 0956557 B1 Audio Area, Audio Sector, Time Code US 6522695 B1 Audio_Header, Packet_Info US 6661762 B1 Frame_Info US 7028152 B2 frame formats with 14 and 16 sectors US 6275457 B1 Track_List_2 EP 0987709 A2 Access_List US 6643228 B1 channel order, pauses Philips, DSDIFF 1.5 character sets, text items Sonic Studio, SACD Text Overview
Definition in file sacddec.c.
| #define SECTOR_SIZE 2048 |
Definition at line 71 of file sacddec.c.
Referenced by read_access_list(), read_area_toc(), read_audio_header(), read_master_toc(), read_sectors(), and sacd_probe().
| #define RAW_SECTOR_SIZE 2064 |
Definition at line 74 of file sacddec.c.
Referenced by read_master_toc(), and sacd_probe().
| #define RAW_SECTOR_HEADER 12 |
Definition at line 75 of file sacddec.c.
Referenced by read_master_toc(), and sacd_probe().
| #define MASTER_TOC_LSN 510 |
Definition at line 77 of file sacddec.c.
Referenced by read_master_toc(), and sacd_probe().
| #define FRAMES_PER_SECOND 75 |
Definition at line 79 of file sacddec.c.
Referenced by read_area_toc(), and time_code().
| #define BITS_PER_SAMPLE 8 |
Definition at line 80 of file sacddec.c.
Referenced by read_area_toc().
| #define SAMPLE_RATE (64 * 44100 / BITS_PER_SAMPLE) |
Definition at line 82 of file sacddec.c.
Referenced by config_input(), and read_area_toc().
| #define FRAME_SAMPLES (SAMPLE_RATE / FRAMES_PER_SECOND) |
| #define MAX_PACKET_SIZE (SECTOR_SIZE - 3) |
| #define MAX_FRAME_SIZE (MAX_FRAME_SECTORS * MAX_PACKET_SIZE) |
| #define MAX_TRACKS 255 |
Definition at line 89 of file sacddec.c.
Referenced by read_area_toc().
| #define MAX_TRACK_TEXT_SECTORS 32 |
Definition at line 90 of file sacddec.c.
Referenced by read_area_toc().
| #define DATA_TYPE_AUDIO 2 |
Definition at line 107 of file sacddec.c.
Referenced by read_frame().
| anonymous enum |
|
static |
|
static |
Definition at line 151 of file sacddec.c.
Referenced by read_access_list(), read_area_toc(), read_frame(), and read_master_toc().
|
static |
Definition at line 167 of file sacddec.c.
Referenced by group_of_pictures_header(), mxf_write_system_item(), read_area_toc(), and read_frame().
|
static |
Definition at line 182 of file sacddec.c.
Referenced by set_string().
|
static |
Definition at line 220 of file sacddec.c.
Referenced by read_area_toc(), read_master_toc(), read_track_text(), and set_text().
|
static |
Definition at line 264 of file sacddec.c.
Referenced by read_area_toc(), and read_master_toc().
|
static |
Definition at line 303 of file sacddec.c.
Referenced by read_area_toc(), and read_master_toc().
|
static |
Definition at line 313 of file sacddec.c.
Referenced by read_area_toc(), and read_master_toc().
|
static |
Definition at line 331 of file sacddec.c.
Referenced by sacd_read_header().
|
static |
Definition at line 397 of file sacddec.c.
Referenced by read_area_toc().
|
static |
Definition at line 426 of file sacddec.c.
Referenced by read_area_toc().
|
static |
Definition at line 460 of file sacddec.c.
Referenced by read_area_toc(), sacd_read_packet(), and sacd_read_seek().
|
static |
Definition at line 506 of file sacddec.c.
Referenced by sacd_read_header().
|
static |
|
static |
Definition at line 698 of file sacddec.c.
Referenced by read_frame().
|
static |
Definition at line 726 of file sacddec.c.
Referenced by sacd_read_packet().
|
static |
|
static |
|
static |
| int toc_address |
Definition at line 93 of file sacddec.c.
Referenced by read_master_toc().
| const struct { ... } areas[] |
Referenced by read_area_toc(), read_master_toc(), and sacd_read_header().
|
static |
Definition at line 176 of file sacddec.c.
Referenced by set_string().
|
static |
Definition at line 272 of file sacddec.c.
Referenced by set_genre().
| const FFInputFormat ff_sacd_demuxer |