├── .gitlab-ci.yml ├── AUTHORS ├── COPYING ├── INSTALL ├── Makefile ├── NEWS ├── README ├── TODO ├── atsc ├── a52.h ├── si.h └── si │ ├── desc_81.h │ ├── desc_cc.h │ └── descs_list.h ├── bitstream.pc.in ├── common.h ├── dvb ├── ci.h ├── si.h ├── si │ ├── ait.h │ ├── ait_print.h │ ├── bat.h │ ├── bat_print.h │ ├── datetime.h │ ├── desc_40.h │ ├── desc_41.h │ ├── desc_42.h │ ├── desc_43.h │ ├── desc_44.h │ ├── desc_45.h │ ├── desc_46.h │ ├── desc_47.h │ ├── desc_48.h │ ├── desc_49.h │ ├── desc_4a.h │ ├── desc_4b.h │ ├── desc_4c.h │ ├── desc_4d.h │ ├── desc_4e.h │ ├── desc_4f.h │ ├── desc_50.h │ ├── desc_51.h │ ├── desc_52.h │ ├── desc_53.h │ ├── desc_54.h │ ├── desc_55.h │ ├── desc_56.h │ ├── desc_57.h │ ├── desc_58.h │ ├── desc_59.h │ ├── desc_5a.h │ ├── desc_5b.h │ ├── desc_5c.h │ ├── desc_5d.h │ ├── desc_5e.h │ ├── desc_5f.h │ ├── desc_60.h │ ├── desc_61.h │ ├── desc_62.h │ ├── desc_63.h │ ├── desc_64.h │ ├── desc_65.h │ ├── desc_66.h │ ├── desc_67.h │ ├── desc_68.h │ ├── desc_69.h │ ├── desc_6a.h │ ├── desc_6b.h │ ├── desc_6c.h │ ├── desc_6d.h │ ├── desc_6e.h │ ├── desc_6f.h │ ├── desc_7a.h │ ├── desc_7b.h │ ├── desc_7c.h │ ├── desc_7f.h │ ├── desc_7f00.h │ ├── desc_7f06.h │ ├── desc_7f15.h │ ├── desc_7f19.h │ ├── desc_83p28.h │ ├── desc_88p28.h │ ├── descs_list.h │ ├── dit.h │ ├── dit_print.h │ ├── eit.h │ ├── eit_print.h │ ├── nit.h │ ├── nit_print.h │ ├── numbers.h │ ├── rst.h │ ├── rst_print.h │ ├── sdt.h │ ├── sdt_print.h │ ├── sit.h │ ├── sit_print.h │ ├── st.h │ ├── strings.h │ ├── tdt.h │ ├── tdt_print.h │ ├── tot.h │ └── tot_print.h ├── si_print.h ├── sim.h ├── sub.h ├── telx.h └── vbi.h ├── ebu └── biss.h ├── examples ├── Makefile ├── dvb_ecmg.c ├── dvb_ecmg_test.c ├── dvb_gen_si.c ├── dvb_gen_si.test.sh ├── dvb_print_si.c ├── dvb_print_si.output.txt ├── dvb_print_si.output.xml ├── mpeg_print_pcr.c ├── mpeg_restamp.c └── rtp_check_seqnum.c ├── haivision └── srt.h ├── id3 ├── frame_comm.h ├── frame_priv.h ├── frame_talb.h ├── frame_tbpm.h ├── frame_tcom.h ├── frame_tcon.h ├── frame_tcop.h ├── frame_tden.h ├── frame_tdly.h ├── frame_tdor.h ├── frame_tdrc.h ├── frame_tdrl.h ├── frame_tdtg.h ├── frame_tenc.h ├── frame_text.h ├── frame_tflt.h ├── frame_tipl.h ├── frame_tit1.h ├── frame_tit2.h ├── frame_tit3.h ├── frame_tkey.h ├── frame_tlan.h ├── frame_tlen.h ├── frame_tmcl.h ├── frame_tmed.h ├── frame_tmoo.h ├── frame_toal.h ├── frame_tofn.h ├── frame_toly.h ├── frame_tope.h ├── frame_town.h ├── frame_tpe1.h ├── frame_tpe2.h ├── frame_tpe3.h ├── frame_tpe4.h ├── frame_tpos.h ├── frame_tpro.h ├── frame_tpub.h ├── frame_trck.h ├── frame_trsn.h ├── frame_trso.h ├── frame_tsoa.h ├── frame_tsop.h ├── frame_tsot.h ├── frame_tsrc.h ├── frame_tsse.h ├── frame_tsst.h ├── frame_txxx.h ├── frame_ufid.h ├── frame_wcom.h ├── frame_wcop.h ├── frame_woaf.h ├── frame_woar.h ├── frame_woas.h ├── frame_wors.h ├── frame_wpay.h ├── frame_wpub.h ├── frame_wxxx.h ├── frames_list.h ├── id3v2.h └── id3v2_print.h ├── ieee └── ethernet.h ├── ietf ├── ip.h ├── rfc4175.h ├── rfc8331.h ├── rtcp.h ├── rtcp3611.h ├── rtcp_fb.h ├── rtcp_rr.h ├── rtcp_sdes.h ├── rtcp_sr.h ├── rtp.h ├── rtp2250.h ├── rtp2435.h ├── rtp3551.h ├── rtp3640.h ├── rtp6184.h ├── rtp7587.h └── udp.h ├── itu └── h265.h ├── mpeg ├── aac.h ├── h264.h ├── mp2v.h ├── mpga.h ├── pes.h ├── psi.h ├── psi │ ├── cat.h │ ├── cat_print.h │ ├── desc_02.h │ ├── desc_03.h │ ├── desc_04.h │ ├── desc_05.h │ ├── desc_06.h │ ├── desc_07.h │ ├── desc_08.h │ ├── desc_09.h │ ├── desc_0a.h │ ├── desc_0b.h │ ├── desc_0c.h │ ├── desc_0d.h │ ├── desc_0e.h │ ├── desc_0f.h │ ├── desc_10.h │ ├── desc_11.h │ ├── desc_12.h │ ├── desc_13.h │ ├── desc_1b.h │ ├── desc_1c.h │ ├── desc_1d.h │ ├── desc_1e.h │ ├── desc_1f.h │ ├── desc_20.h │ ├── desc_21.h │ ├── desc_22.h │ ├── desc_23.h │ ├── desc_24.h │ ├── desc_25.h │ ├── desc_26.h │ ├── desc_27.h │ ├── desc_28.h │ ├── desc_2a.h │ ├── desc_2b.h │ ├── desc_2c.h │ ├── desc_38.h │ ├── desc_3f.h │ ├── desc_3f03.h │ ├── descriptors.h │ ├── descs_list.h │ ├── descs_print.h │ ├── pat.h │ ├── pat_print.h │ ├── pmt.h │ ├── pmt_print.h │ ├── psi.h │ ├── tsdt.h │ └── tsdt_print.h ├── psi_print.h └── ts.h ├── scte ├── 104.h ├── 35.h └── 35_print.h └── smpte ├── 2010.h ├── 2022_1_fec.h ├── 2022_6_hbrmt.h ├── 291.h ├── 334.h ├── 337.h ├── 352.h └── rdd08.h /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | image: registry.videolan.org/videolan-base-xenial 2 | 3 | test: 4 | stage: test 5 | script: 6 | - make check 7 | tags: 8 | - docker 9 | - amd64 10 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | # Contributors to biTStream 2 | # 3 | # The format of this file was inspired by the Linux kernel CREDITS file. 4 | # Authors are listed alphabetically. 5 | # 6 | # The fields are: name (N), email (E), web-address (W), CVS account login (C), 7 | # PGP key ID and fingerprint (P), description (D), and snail-mail address (S). 8 | 9 | N: Christophe Massiot 10 | E: massiot AT via DOT ecp DOT fr 11 | C: massiot 12 | D: All of the code 13 | 14 | N: Georgi Chorbadzhiyski 15 | E: gf AT unixsol DOT org 16 | D: Additional MPEG/DVB PSI and descriptors support, examples/dvb_gen_si 17 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2011 VideoLAN 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject 9 | to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 18 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | 2 | Installing biTStream 3 | ==================== 4 | 5 | Make install copies all top-level directories (except dvb-examples) in 6 | /usr/local/include/bitstream directory. 7 | 8 | Install bitstream in its default location /usr/local/include/bitstream: 9 | 10 | $> make install 11 | 12 | Install bitstream in another location, eg: /usr/include/bitstream 13 | 14 | $> make PREFIX=/usr install 15 | 16 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PREFIX ?= /usr/local 2 | INCLUDEDIR = $(PREFIX)/include 3 | LIBDIR = $(PREFIX)/lib 4 | DATADIR = $(PREFIX)/share 5 | INCLUDE = $(DESTDIR)$(INCLUDEDIR)/bitstream 6 | PKGCONFIG = $(DESTDIR)$(DATADIR)/pkgconfig 7 | VERSION = 1.5 8 | 9 | all: 10 | ln -nsf .. examples/bitstream 11 | $(MAKE) -C examples 12 | 13 | bitstream.pc: bitstream.pc.in Makefile 14 | @echo "GEN $@" 15 | @sed -e 's|@PREFIX@|$(PREFIX)|' \ 16 | -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \ 17 | -e 's|@VERSION@|$(VERSION)|' \ 18 | $< > $@ 19 | 20 | install: bitstream.pc 21 | @echo "INSTALL $(INCLUDE)" 22 | @install -d $(INCLUDE) 23 | @install -m 644 common.h $(INCLUDE)/ 24 | @install -d $(INCLUDE)/atsc 25 | @install -m 644 atsc/*.h $(INCLUDE)/atsc 26 | @install -d $(INCLUDE)/atsc/si 27 | @install -m 644 atsc/si/*.h $(INCLUDE)/atsc/si 28 | @install -d $(INCLUDE)/dvb 29 | @install -m 644 dvb/*.h $(INCLUDE)/dvb 30 | @install -d $(INCLUDE)/dvb/si 31 | @install -m 644 dvb/si/*.h $(INCLUDE)/dvb/si 32 | @install -d $(INCLUDE)/ebu 33 | @install -m 644 ebu/*.h $(INCLUDE)/ebu 34 | @install -d $(INCLUDE)/ietf 35 | @install -m 644 ietf/* $(INCLUDE)/ietf 36 | @install -d $(INCLUDE)/ieee 37 | @install -m 644 ieee/* $(INCLUDE)/ieee 38 | @install -d $(INCLUDE)/itu 39 | @install -m 644 itu/* $(INCLUDE)/itu 40 | @install -d $(INCLUDE)/mpeg 41 | @install -m 644 mpeg/*.h $(INCLUDE)/mpeg 42 | @install -d $(INCLUDE)/mpeg/psi 43 | @install -m 644 mpeg/psi/*.h $(INCLUDE)/mpeg/psi 44 | @install -d $(INCLUDE)/scte 45 | @install -m 644 scte/*.h $(INCLUDE)/scte 46 | @install -d $(INCLUDE)/smpte 47 | @install -m 644 smpte/*.h $(INCLUDE)/smpte 48 | @install -d $(INCLUDE)/id3 49 | @install -m 644 id3/*.h $(INCLUDE)/id3 50 | @install -d $(INCLUDE)/haivision 51 | @install -m 644 haivision/*.h $(INCLUDE)/haivision 52 | @echo "INSTALL $(PKGCONFIG)/bitstream.pc" 53 | @install -d $(PKGCONFIG) 54 | @install -m 644 bitstream.pc $(PKGCONFIG) 55 | 56 | uninstall: 57 | @echo "REMOVE $(INCLUDE)" 58 | @$(RM) -r $(INCLUDE) 59 | @echo "REMOVE $(PKGCONFIG)/bitstream.pc" 60 | @$(RM) $(PKGCONFIG)/bitstream.pc 61 | 62 | dist: 63 | git archive --format=tar --prefix=bitstream-$(VERSION)/ master | \ 64 | bzip2 -9 > bitstream-$(VERSION).tar.bz2 65 | 66 | clean: 67 | $(RM) bitstream bitstream.pc 68 | $(MAKE) -C examples clean 69 | 70 | # if you want to check only particular headers, 71 | # use make check HEADER_LIST="dvb/sim.h ietf/rtp.h" 72 | 73 | HEADER_LIST = $$(find * -name '*.h') 74 | 75 | FLAGS = -I. -Werror -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wformat=2 76 | 77 | compiler_c = $(CC) $(FLAGS) $(CFLAGS) -std=gnu99 78 | compiler_c++ = $(CXX) $(FLAGS) $(CXXFLAGS) 79 | compile = $(compiler_$1) -include "$$header" -c -x $1 /dev/null -o /dev/null 80 | 81 | check: 82 | @ln -nsf . bitstream 83 | @for header in $(HEADER_LIST); do \ 84 | $(if $(V),set -x;) \ 85 | $(call compile,c) || exit 1; \ 86 | $(call compile,c++) || exit 1; \ 87 | echo "PASS: $$header"; \ 88 | done 89 | 90 | .PHONY: all install uninstall dist clean check 91 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | 1.6 (TODO) 2 | ================= 3 | - Add EBU BISS-CA 4 | 5 | 1.5 (6 November 2018) 6 | ================= 7 | - Add SDES 8 | - Fix hvcc header size 9 | - Add more ATSC A/52 support 10 | - Misc descriptors fixes 11 | 12 | 1.4 (1 July 2018) 13 | ================= 14 | - Add RTCP helpers 15 | - Add support for SMPTE 352 16 | - Misc descriptors fixes 17 | 18 | 1.3 (29 Jan 2018) 19 | ================= 20 | - Add support for avcC and hvcC structures 21 | - Add support for LOAS AAC 22 | - Improve support for RTP 23 | - Use ISO 6937 as default DVB charset 24 | - Ship pkg-config file 25 | 26 | 1.2 (31 Jan 2017) 27 | ================= 28 | - Add partial support for ITU-T H.265 29 | - Add support for DVB-VBI 30 | - Add support for SCTE 104 31 | - Add support for SMPTE 2010 32 | - Add support for SMPTE RDD 08 (OP-47 subtitles) 33 | - Add support for SMPTE 291 34 | - Add support for SMPTE 337 35 | - Add support for RFC 4175 video 36 | - Add support for hbrmt 2022-6 37 | - Add support for RTP RFC 2250 38 | - Improve support of RTCP 39 | - Fix character set for Chinese DVB strings 40 | - Fix A/52 bitrate table 41 | 42 | 1.1 (5 Oct 2015) 43 | ================ 44 | - Rename fields in BAT, RST and SIT to match those of SDT 45 | - Add support for private data specifier 0x233a for descriptor 0x83 46 | - Add support for elementary streams MPEG video and audio, AAC, A/52, Opus, 47 | H264 and DVB subtitles 48 | - Add support for SMPTE 2022-1 Forward Error Correction 49 | - Add support for encoder/decoder DVB Simulcrypt EMMG interface 50 | - Add support for IEEE 802.3 Ethernet frames 51 | - Add support for IP and UDP headers 52 | - Add support for IETF RTCP 53 | - Add support for SCTE-35 Splice Information Table 54 | - Fix parsing of PSI version_number 55 | - Fix bug in EIT 56 | - Fix bug in PCR writing 57 | - Fix retrieval of PES payload offset in case of optional header 58 | - Fix incorrect marker bit in PES PTS and DTS syntax 59 | 60 | 1.0 (15 Dec 2011) 61 | ================= 62 | - Initial public release 63 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | TODO items for biTStream. The items are not ordered by importance 2 | so if you like something just do it and send a patch. 3 | 4 | - Add support (parser, generator, example) for these MPEG descriptors: 5 | - Descriptor 0x29 IPMP_descriptor (defined in ISO/IEC 13818-11, MPEG-2 IPMP) 6 | 7 | - Add support (parser, generator, example) for these DVB descriptors: 8 | - Descriptor 0x6f: application_signalling_descriptor 9 | - Descriptor 0x70: adaptation_field_data_descriptor 10 | - Descriptor 0x71: service_identifier_descriptor 11 | - Descriptor 0x72: service_availability_descriptor 12 | - Descriptor 0x73: default_authority_descriptor 13 | - Descriptor 0x74: related_content_descriptor 14 | - Descriptor 0x75: TVA_id_descriptor 15 | - Descriptor 0x76: content_identifier_descriptor 16 | - Descriptor 0x77: time_slice_fec_identifier_descriptor 17 | - Descriptor 0x78: ECM_repetition_rate_descriptor 18 | - Descriptor 0x79: S2_satellite_delivery_system_descriptor 19 | - Descriptor 0x7d: XAIT location descriptor 20 | - Descriptor 0x7e: FTA_content_management_descriptor 21 | - Descriptor 0x7f: extension descriptor 22 | - Add support for extension descriptors 23 | -------------------------------------------------------------------------------- /atsc/si.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * si.h: ATSC Service Information 3 | ***************************************************************************** 4 | * Copyright (C) 2019 OpenHeadend 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | #ifndef __BITSTREAM_ATSC_SI_H__ 29 | #define __BITSTREAM_ATSC_SI_H__ 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /atsc/si/descs_list.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * descs_list.h: All supported ATSC descriptors 3 | ***************************************************************************** 4 | * Copyright (C) 2019 OpenHeadend 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | #ifndef __BITSTREAM_ATSC_DESCS_LIST_H__ 29 | #define __BITSTREAM_ATSC_DESCS_LIST_H__ 30 | 31 | #include 32 | #include 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /bitstream.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@PREFIX@ 2 | includedir=@INCLUDEDIR@ 3 | 4 | Name: bitstream 5 | Description: Binary structures for MPEG, DVB, IETF, SMPTE, IEEE, SCTE, etc. 6 | Version: @VERSION@ 7 | Cflags: -I${includedir} 8 | -------------------------------------------------------------------------------- /dvb/si.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * si.h: ETSI EN 300 468 Service Information 3 | ***************************************************************************** 4 | * Copyright (C) 2009-2010 VideoLAN 5 | * 6 | * Authors: Christophe Massiot 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ISO/IEC 13818-1:2007(E) (MPEG-2 Systems) 31 | * - ETSI EN 300 468 V1.11.1 (2010-04) (SI in DVB systems) 32 | */ 33 | 34 | #ifndef __BITSTREAM_DVB_SI_H__ 35 | #define __BITSTREAM_DVB_SI_H__ 36 | 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /dvb/si/desc_42.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * desc_42.h: ETSI EN 300 468 Descriptor 0x42: Stuffing descriptor 3 | ***************************************************************************** 4 | * Copyright (C) 2011 Unix Solutions Ltd. 5 | * 6 | * Authors: Georgi Chorbadzhiyski 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ETSI EN 300 468 V1.11.1 (2010-04) (SI in DVB systems) 31 | */ 32 | 33 | #ifndef __BITSTREAM_DVB_DESC_42_H__ 34 | #define __BITSTREAM_DVB_DESC_42_H__ 35 | 36 | #include 37 | #include 38 | 39 | #ifdef __cplusplus 40 | extern "C" 41 | { 42 | #endif 43 | 44 | /***************************************************************************** 45 | * Descriptor 0x42: Service list descriptor 46 | *****************************************************************************/ 47 | #define DESC42_HEADER_SIZE DESC_HEADER_SIZE 48 | 49 | static inline void desc42_init(uint8_t *p_desc) 50 | { 51 | desc_set_tag(p_desc, 0x42); 52 | } 53 | 54 | static inline bool desc42_validate(const uint8_t *p_desc) 55 | { 56 | (void) p_desc; 57 | 58 | return true; 59 | } 60 | 61 | static inline void desc42_print(uint8_t *p_desc, f_print pf_print, 62 | void *opaque, print_type_t i_print_type) 63 | { 64 | switch (i_print_type) { 65 | case PRINT_XML: 66 | pf_print(opaque, "", desc_get_length(p_desc)); 67 | break; 68 | default: 69 | pf_print(opaque, " - desc 42 stuffing length=%u", desc_get_length(p_desc)); 70 | } 71 | } 72 | 73 | #ifdef __cplusplus 74 | } 75 | #endif 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /dvb/si/desc_47.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * desc_47.h: ETSI EN 300 468 Descriptor 0x47: Bouquet name descriptor 3 | ***************************************************************************** 4 | * Copyright (C) 2009-2010 VideoLAN 5 | * 6 | * Authors: Christophe Massiot 7 | * Georgi Chorbadzhiyski 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject 15 | * to the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be 18 | * included in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | *****************************************************************************/ 28 | 29 | /* 30 | * Normative references: 31 | * - ETSI EN 300 468 V1.11.1 (2010-04) (SI in DVB systems) 32 | */ 33 | 34 | #ifndef __BITSTREAM_DVB_DESC_47_H__ 35 | #define __BITSTREAM_DVB_DESC_47_H__ 36 | 37 | #include 38 | #include 39 | #include 40 | 41 | #ifdef __cplusplus 42 | extern "C" 43 | { 44 | #endif 45 | 46 | /***************************************************************************** 47 | * Descriptor 0x47: Bouquet name descriptor 48 | *****************************************************************************/ 49 | #define DESC47_HEADER_SIZE DESC_HEADER_SIZE 50 | 51 | static inline void desc47_init(uint8_t *p_desc) 52 | { 53 | desc_set_tag(p_desc, 0x47); 54 | } 55 | 56 | #define desc47_set_bouquetname desc40_set_networkname 57 | #define desc47_get_bouquetname desc40_get_networkname 58 | #define desc47_validate desc40_validate 59 | #define desc47_print desc40_print 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /dvb/si/desc_5c.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * desc_5c.h: ETSI EN 300 468 Descriptor 0x5c: Multilingual bouquet name 3 | ***************************************************************************** 4 | * Copyright (C) 2009-2010 VideoLAN 5 | * 6 | * Authors: Christophe Massiot 7 | * Georgi Chorbadzhiyski 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject 15 | * to the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be 18 | * included in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | *****************************************************************************/ 28 | 29 | /* 30 | * Normative references: 31 | * - ETSI EN 300 468 V1.11.1 (2010-04) (SI in DVB systems) 32 | */ 33 | 34 | #ifndef __BITSTREAM_DVB_DESC_5C_H__ 35 | #define __BITSTREAM_DVB_DESC_5C_H__ 36 | 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | 43 | #ifdef __cplusplus 44 | extern "C" 45 | { 46 | #endif 47 | 48 | /***************************************************************************** 49 | * Descriptor 0x5c: Multilingual bouquet name 50 | *****************************************************************************/ 51 | #define DESC5C_HEADER_SIZE DESC_HEADER_SIZE 52 | #define DESC5C_DATA_SIZE 4 53 | 54 | static inline void desc5c_init(uint8_t *p_desc) 55 | { 56 | desc_set_tag(p_desc, 0x5c); 57 | } 58 | 59 | #define desc5cn_set_code desc0an_set_code 60 | #define desc5cn_get_code desc0an_get_code 61 | #define desc5cn_get bouquetname_length desc5bn_get_networkname_length 62 | #define desc5cn_get_bouquetname desc5bn_get_networkname 63 | #define desc5cn_set_bouquetname desc5bn_set_networkname 64 | #define desc5c_get_data desc5b_get_data 65 | #define desc5c_validate desc5b_validate 66 | #define desc5c_print desc5b_print 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /dvb/si/desc_68.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * desc_68.h: ETSI EN 300 468 Descriptor 0x68: DSNG descriptor 3 | ***************************************************************************** 4 | * Copyright (C) 2011 Unix Solutions Ltd. 5 | * 6 | * Authors: Georgi Chorbadzhiyski 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ETSI EN 300 468 V1.11.1 (2010-04) (SI in DVB systems) 31 | */ 32 | 33 | #ifndef __BITSTREAM_DVB_DESC_68_H__ 34 | #define __BITSTREAM_DVB_DESC_68_H__ 35 | 36 | #include 37 | #include 38 | #include 39 | 40 | #ifdef __cplusplus 41 | extern "C" 42 | { 43 | #endif 44 | 45 | /***************************************************************************** 46 | * Descriptor 0x68: DSNG descriptor 47 | *****************************************************************************/ 48 | #define DESC68_HEADER_SIZE DESC_HEADER_SIZE 49 | 50 | static inline void desc68_init(uint8_t *p_desc) 51 | { 52 | desc_set_tag(p_desc, 0x68); 53 | desc_set_length(p_desc, 0); 54 | } 55 | 56 | #define desc68_get_bytes_length desc67_get_bytes_length 57 | #define desc68_get_bytes desc67_get_bytes 58 | #define desc68_set_bytes desc67_set_bytes 59 | #define desc68_validate desc67_validate 60 | #define desc68_print desc67_print 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /dvb/si/desc_88p28.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * desc_88p28.h: ETSI EN 300 468 Descriptor 0x88: HD simulcast logical channel 3 | ***************************************************************************** 4 | * Copyright (C) 2009-2010 VideoLAN 5 | * 6 | * Authors: Christophe Massiot 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ETSI EN 300 468 V1.11.1 (2010-04) (SI in DVB systems) 31 | * - IEC/CENELEC 62 216 32 | */ 33 | 34 | #ifndef __BITSTREAM_DVB_DESC_88P28_H__ 35 | #define __BITSTREAM_DVB_DESC_88P28_H__ 36 | 37 | #include 38 | #include 39 | #include 40 | 41 | #ifdef __cplusplus 42 | extern "C" 43 | { 44 | #endif 45 | 46 | /***************************************************************************** 47 | * Descriptor 0x88: HD simulcast logical channel descriptor (IEC/CENELEC 62 216) 48 | * Only valid if a private data specifier descriptor 28 is present before. 49 | *****************************************************************************/ 50 | #define DESC88P28_HEADER_SIZE DESC83P28_HEADER_SIZE 51 | #define DESC88P28_SERVICE_SIZE DESC83P28_SERVICE_SIZE 52 | 53 | static inline void desc88p28_init(uint8_t *p_desc) 54 | { 55 | desc_set_tag(p_desc, 0x88); 56 | } 57 | 58 | #define desc88p28_get_service desc83p28_get_service 59 | #define desc88p28_get_sid desc83p28_get_sid 60 | #define desc88p28_get_visible desc83p28_get_visible 61 | #define desc88p28_get_lcn desc83p28_get_lcn 62 | #define desc88p28_validate desc83p28_validate 63 | #define desc88p28_print desc83p28_print 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /dvb/si/dit.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * dit.h: ETSI EN 300 468 Discontinuity Information Table (DIT) 3 | ***************************************************************************** 4 | * Copyright (C) 2011 Unix Solutions Ltd. 5 | * 6 | * Authors: Georgi Chorbadzhiyski 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ETSI EN 300 468 V1.11.1 (2010-04) (SI in DVB systems) 31 | */ 32 | 33 | #ifndef __BITSTREAM_DVB_DIT_H__ 34 | #define __BITSTREAM_DVB_DIT_H__ 35 | 36 | #include 37 | #include 38 | 39 | #ifdef __cplusplus 40 | extern "C" 41 | { 42 | #endif 43 | 44 | /***************************************************************************** 45 | * Discontinuity Information Table 46 | *****************************************************************************/ 47 | #define DIT_PID 0x1E 48 | #define DIT_TABLE_ID 0x7E 49 | #define DIT_HEADER_SIZE PSI_HEADER_SIZE 50 | 51 | static inline void dit_init(uint8_t *p_dit) 52 | { 53 | psi_init(p_dit, false); 54 | psi_set_tableid(p_dit, DIT_TABLE_ID); 55 | psi_set_length(p_dit, 1); 56 | } 57 | 58 | static inline void dit_set_transition_flag(uint8_t *p_dit, bool b_transition_flag) 59 | { 60 | p_dit[3] = b_transition_flag ? 0xff : 0x7f; 61 | } 62 | 63 | static inline bool dit_get_transition_flag(const uint8_t *p_dit) 64 | { 65 | return p_dit[3] >> 7; 66 | } 67 | 68 | static inline bool dit_validate(const uint8_t *p_dit) 69 | { 70 | uint16_t i_section_size = psi_get_length(p_dit) + PSI_HEADER_SIZE; 71 | uint8_t i_tid = psi_get_tableid(p_dit); 72 | 73 | if (psi_get_syntax(p_dit) || i_tid != DIT_TABLE_ID 74 | || i_section_size < DIT_HEADER_SIZE) 75 | return false; 76 | 77 | return true; 78 | } 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | 84 | #endif 85 | -------------------------------------------------------------------------------- /dvb/si/dit_print.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * dit_print.h: ETSI EN 300 468 Discontinuity Information Table (DIT) (printing) 3 | ***************************************************************************** 4 | * Copyright (C) 2011 Unix Solutions Ltd. 5 | * 6 | * Authors: Georgi Chorbadzhiyski 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | #ifndef __BITSTREAM_DVB_DIT_PRINT_H__ 29 | #define __BITSTREAM_DVB_DIT_PRINT_H__ 30 | 31 | #include 32 | #include 33 | 34 | #ifdef __cplusplus 35 | extern "C" 36 | { 37 | #endif 38 | 39 | /***************************************************************************** 40 | * Discontinuity Information Table 41 | *****************************************************************************/ 42 | static inline void dit_print(uint8_t *p_dit, 43 | f_print pf_print, void *print_opaque, 44 | f_iconv pf_iconv, void *iconv_opaque, 45 | print_type_t i_print_type) 46 | { 47 | (void) pf_iconv; 48 | (void) iconv_opaque; 49 | 50 | switch (i_print_type) { 51 | case PRINT_XML: 52 | pf_print(print_opaque, "", 53 | dit_get_transition_flag(p_dit)); 54 | break; 55 | default: 56 | pf_print(print_opaque, "new DIT transition_flag=%u", 57 | dit_get_transition_flag(p_dit)); 58 | pf_print(print_opaque, "end DIT"); 59 | } 60 | } 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /dvb/si/st.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * st.h: ETSI EN 300 468 Stuffing Table (ST) 3 | ***************************************************************************** 4 | * Copyright (C) 2011 Unix Solutions Ltd. 5 | * 6 | * Authors: Georgi Chorbadzhiyski 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ETSI EN 300 468 V1.11.1 (2010-04) (SI in DVB systems) 31 | */ 32 | 33 | #ifndef __BITSTREAM_DVB_ST_H__ 34 | #define __BITSTREAM_DVB_ST_H__ 35 | 36 | #include 37 | #include 38 | 39 | #ifdef __cplusplus 40 | extern "C" 41 | { 42 | #endif 43 | 44 | /***************************************************************************** 45 | * Stuffing Table 46 | *****************************************************************************/ 47 | #define ST_TABLE_ID 0x72 48 | #define ST_HEADER_SIZE PSI_HEADER_SIZE 49 | 50 | static inline void st_init(uint8_t *p_st) 51 | { 52 | psi_init(p_st, false); 53 | psi_set_tableid(p_st, ST_TABLE_ID); 54 | psi_set_length(p_st, 0); 55 | } 56 | 57 | static inline bool st_validate(const uint8_t *p_st) 58 | { 59 | if (psi_get_tableid(p_st) != ST_TABLE_ID) 60 | return false; 61 | 62 | return true; 63 | } 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /dvb/si/tdt.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * tdt.h: ETSI EN 300 468 Time and Date Table (TDT) 3 | ***************************************************************************** 4 | * Copyright (C) 2009-2010 VideoLAN 5 | * 6 | * Authors: Christophe Massiot 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ETSI EN 300 468 V1.11.1 (2010-04) (SI in DVB systems) 31 | */ 32 | 33 | #ifndef __BITSTREAM_DVB_TDT_H__ 34 | #define __BITSTREAM_DVB_TDT_H__ 35 | 36 | #include 37 | #include 38 | 39 | #ifdef __cplusplus 40 | extern "C" 41 | { 42 | #endif 43 | 44 | /***************************************************************************** 45 | * Time and Date Table 46 | *****************************************************************************/ 47 | #define TDT_PID 0x14 48 | #define TDT_TABLE_ID 0x70 49 | #define TDT_HEADER_SIZE (PSI_HEADER_SIZE + 5) 50 | 51 | static inline void tdt_init(uint8_t *p_tdt) 52 | { 53 | psi_init(p_tdt, false); 54 | psi_set_tableid(p_tdt, TDT_TABLE_ID); 55 | psi_set_length(p_tdt, TDT_HEADER_SIZE - PSI_HEADER_SIZE); 56 | } 57 | 58 | static inline void tdt_set_utc(uint8_t *p_tdt, uint64_t i_utc) 59 | { 60 | p_tdt[3] = (i_utc >> 32) & 0xff; 61 | p_tdt[4] = (i_utc >> 24) & 0xff; 62 | p_tdt[5] = (i_utc >> 16) & 0xff; 63 | p_tdt[6] = (i_utc >> 8) & 0xff; 64 | p_tdt[7] = i_utc & 0xff; 65 | } 66 | 67 | static inline uint64_t tdt_get_utc(const uint8_t *p_tdt) 68 | { 69 | return (uint64_t)(((uint64_t)p_tdt[3] << 32) | ((uint64_t)p_tdt[4] << 24) | 70 | ((uint64_t)p_tdt[5] << 16) | ((uint64_t)p_tdt[6] << 8) | p_tdt[7]); 71 | } 72 | 73 | static inline bool tdt_validate(const uint8_t *p_tdt) 74 | { 75 | uint16_t i_section_size = psi_get_length(p_tdt) + PSI_HEADER_SIZE; 76 | uint8_t i_tid = psi_get_tableid(p_tdt); 77 | 78 | if (psi_get_syntax(p_tdt) || i_tid != TDT_TABLE_ID 79 | || i_section_size < TDT_HEADER_SIZE) 80 | return false; 81 | 82 | return true; 83 | } 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif 90 | -------------------------------------------------------------------------------- /dvb/si/tdt_print.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * tdt_print.h: ETSI EN 300 468 Time and Date Table (TDT) (printing) 3 | ***************************************************************************** 4 | * Copyright (C) 2011 Unix Solutions Ltd. 5 | * 6 | * Authors: Georgi Chorbadzhiyski 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | #ifndef __BITSTREAM_DVB_TDT_PRINT_H__ 29 | #define __BITSTREAM_DVB_TDT_PRINT_H__ 30 | 31 | #include 32 | #include 33 | #include 34 | 35 | #ifdef __cplusplus 36 | extern "C" 37 | { 38 | #endif 39 | 40 | /***************************************************************************** 41 | * Time and Date Table 42 | *****************************************************************************/ 43 | static inline void tdt_print(uint8_t *p_tdt, 44 | f_print pf_print, void *print_opaque, 45 | f_iconv pf_iconv, void *iconv_opaque, 46 | print_type_t i_print_type) 47 | { 48 | (void) pf_iconv; 49 | (void) iconv_opaque; 50 | 51 | time_t ts; 52 | char ts_str[24]; 53 | 54 | ts = dvb_time_format_UTC(tdt_get_utc(p_tdt), NULL, ts_str); 55 | 56 | switch (i_print_type) { 57 | case PRINT_XML: 58 | pf_print(print_opaque, "", 59 | ts, ts_str); 60 | break; 61 | default: 62 | pf_print(print_opaque, "new TDT time=%ld time_dec=\"%s\"", 63 | ts, ts_str); 64 | pf_print(print_opaque, "end TDT"); 65 | } 66 | } 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /dvb/si/tot_print.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * tot_print.h: ETSI EN 300 468 Time Offset Table (TOT) (printing) 3 | ***************************************************************************** 4 | * Copyright (C) 2011 Unix Solutions Ltd. 5 | * 6 | * Authors: Georgi Chorbadzhiyski 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | #ifndef __BITSTREAM_DVB_TOT_PRINT_H__ 29 | #define __BITSTREAM_DVB_TOT_PRINT_H__ 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #ifdef __cplusplus 37 | extern "C" 38 | { 39 | #endif 40 | 41 | /***************************************************************************** 42 | * Time Offset Table 43 | *****************************************************************************/ 44 | static inline void tot_print(uint8_t *p_tot, 45 | f_print pf_print, void *print_opaque, 46 | f_iconv pf_iconv, void *iconv_opaque, 47 | print_type_t i_print_type) 48 | { 49 | time_t ts; 50 | char ts_str[24]; 51 | 52 | ts = dvb_time_format_UTC(tot_get_utc(p_tot), NULL, ts_str); 53 | 54 | switch (i_print_type) { 55 | case PRINT_XML: 56 | pf_print(print_opaque, "", 57 | ts, ts_str); 58 | break; 59 | default: 60 | pf_print(print_opaque, "new TOT time=%ld time_dec=\"%s\"", 61 | ts, ts_str); 62 | } 63 | 64 | descs_print(tot_get_descs(p_tot), pf_print, print_opaque, 65 | pf_iconv, iconv_opaque, i_print_type); 66 | 67 | switch (i_print_type) { 68 | case PRINT_XML: 69 | pf_print(print_opaque, ""); 70 | break; 71 | default: 72 | pf_print(print_opaque, "end TOT"); 73 | } 74 | } 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /dvb/si_print.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * si_print.h: ETSI EN 300 468 Service Information (printing) 3 | ***************************************************************************** 4 | * Copyright (C) 2010 VideoLAN 5 | * 6 | * Authors: Christophe Massiot 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | #ifndef __BITSTREAM_DVB_SI_PRINT_H__ 29 | #define __BITSTREAM_DVB_SI_PRINT_H__ 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /dvb/sub.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * sub.h: ETSI EN 300 743 Subtitling Systems 3 | ***************************************************************************** 4 | * Copyright (C) 2014 VideoLAN 5 | * 6 | * Authors: Christophe Massiot 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ETSI EN 300 743 V1.5.1 (2014-01) (Subtitling Systems) 31 | */ 32 | 33 | #ifndef __BITSTREAM_DVB_SUB_H__ 34 | #define __BITSTREAM_DVB_SUB_H__ 35 | 36 | #include 37 | 38 | #ifdef __cplusplus 39 | extern "C" 40 | { 41 | #endif 42 | 43 | /***************************************************************************** 44 | * PES data field 45 | *****************************************************************************/ 46 | #define DVBSUB_HEADER_SIZE 2 47 | #define DVBSUB_DATA_IDENTIFIER 0x20 48 | 49 | /***************************************************************************** 50 | * Subtitling segment 51 | *****************************************************************************/ 52 | #define DVBSUBS_HEADER_SIZE 6 53 | #define DVBSUBS_SYNC 0xf 54 | 55 | #define DVBSUBS_PAGE_COMPOSITION 0x10 56 | #define DVBSUBS_REGION_COMPOSITION 0x11 57 | #define DVBSUBS_CLUT_DEFINITION 0x12 58 | #define DVBSUBS_OBJECT_DATA 0x13 59 | #define DVBSUBS_DISPLAY_DEFINITION 0x14 60 | #define DVBSUBS_DISPARITY_SIGNALLING 0x15 61 | #define DVBSUBS_END_OF_DISPLAY_SET 0x80 62 | 63 | static inline uint8_t dvbsubs_get_type(const uint8_t *p_dvbsubs) 64 | { 65 | return p_dvbsubs[1]; 66 | } 67 | 68 | static inline uint16_t dvbsubs_get_page(const uint8_t *p_dvbsubs) 69 | { 70 | return (p_dvbsubs[2] << 8) | p_dvbsubs[3]; 71 | } 72 | 73 | static inline uint16_t dvbsubs_get_length(const uint8_t *p_dvbsubs) 74 | { 75 | return (p_dvbsubs[4] << 8) | p_dvbsubs[5]; 76 | } 77 | 78 | #ifdef __cplusplus 79 | } 80 | #endif 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /dvb/telx.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * telx.h: ETSI EN 300 706 Enhanced Teletext 3 | ***************************************************************************** 4 | * Copyright (C) 2016 OpenHeadend 5 | * 6 | * Authors: Christophe Massiot 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ETSI EN 300 706 V1.2.1 (2003-04) (enhanced teletext) 31 | */ 32 | 33 | #ifndef __BITSTREAM_DVB_TELX_H__ 34 | #define __BITSTREAM_DVB_TELX_H__ 35 | 36 | #include 37 | #include 38 | 39 | #ifdef __cplusplus 40 | extern "C" 41 | { 42 | #endif 43 | 44 | /***************************************************************************** 45 | * Packet identification 46 | *****************************************************************************/ 47 | #define TELX_RUN_IN 0xaa 48 | #define TELX_FRAMING_CODE 0xe4 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /examples/Makefile: -------------------------------------------------------------------------------- 1 | PREFIX ?= /usr/local 2 | WARN = -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare 3 | CPPFLAGS = -I. -I.. -I../.. 4 | CFLAGS := $(WARN) -O2 -g -std=gnu99 $(CFLAGS) 5 | OBJ = dvb_print_si dvb_gen_si dvb_ecmg dvb_ecmg_test mpeg_print_pcr rtp_check_seqnum mpeg_restamp 6 | 7 | ifeq "$(shell uname -s)" "Linux" 8 | LDFLAGS += -lrt 9 | endif 10 | 11 | ifeq "$(shell uname -s)" "Darwin" 12 | LDFLAGS += -liconv 13 | endif 14 | 15 | all: $(OBJ) 16 | 17 | %: %.c 18 | $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS) 19 | 20 | install: $(OBJ) 21 | install -d "$(DESTDIR)$(PREFIX)/bin" 22 | install -m 755 $(OBJ) "$(DESTDIR)$(PREFIX)/bin" 23 | 24 | clean: 25 | $(RM) -rf $(OBJ) *.dSYM 26 | -------------------------------------------------------------------------------- /examples/dvb_gen_si.test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Script to test PSI generation and parsing 3 | # Copyright (C) 2011 Unix Solutions Ltd. 4 | # 5 | # License: MIT 6 | # Authors: Georgi Chorbadzhiyski 7 | # 8 | 9 | rm dvb_gen_si dvb_print_si 10 | make local 11 | 12 | ./dvb_gen_si | ./dvb_print_si > dvb_print_si.output.txt 13 | ./dvb_gen_si | ./dvb_print_si -x xml > dvb_print_si.output.xml 14 | 15 | git diff dvb_print_si.output.txt dvb_print_si.output.xml 16 | -------------------------------------------------------------------------------- /id3/frame_talb.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_talb.h: ID3 TALB frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Album or Movie or Show title frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TALB_H__ 33 | # define __BITSTREAM_ID3_FRAME_TALB_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TALB ID3V2_FRAME_ID('T','A','L','B') 43 | #define ID3V2_FRAME_TALB_NAME "album" 44 | #define ID3V2_FRAME_TALB_DESC "Album or Movie or Show title" 45 | 46 | static inline bool 47 | id3v2_frame_validate_talb(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TALB && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_talb id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TALB_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tbpm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tbpm.h: ID3 TBPM frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * BPM (beats per minute) frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TBPM_H__ 33 | # define __BITSTREAM_ID3_FRAME_TBPM_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TBPM ID3V2_FRAME_ID('T','B','P','M') 43 | #define ID3V2_FRAME_TBPM_NAME "bpm" 44 | #define ID3V2_FRAME_TBPM_DESC "BPM (beats per minute)" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tbpm(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TBPM && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tbpm id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TBPM_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tcom.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tcom.h: ID3 TCOM frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Composer frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TCOM_H__ 33 | # define __BITSTREAM_ID3_FRAME_TCOM_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TCOM ID3V2_FRAME_ID('T','C','O','M') 43 | #define ID3V2_FRAME_TCOM_NAME "composer" 44 | #define ID3V2_FRAME_TCOM_DESC "Composer" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tcom(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TCOM && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tcom id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TCOM_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tcon.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tcon.h: ID3 TCON frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Content type frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TCON_H__ 33 | # define __BITSTREAM_ID3_FRAME_TCON_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TCON ID3V2_FRAME_ID('T','C','O','N') 43 | #define ID3V2_FRAME_TCON_NAME "content type" 44 | #define ID3V2_FRAME_TCON_DESC "Content type" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tcon(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TCON && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tcon id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TCON_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tcop.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tcop.h: ID3 TCOP frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Copyright message frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TCOP_H__ 33 | # define __BITSTREAM_ID3_FRAME_TCOP_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TCOP ID3V2_FRAME_ID('T','C','O','P') 43 | #define ID3V2_FRAME_TCOP_NAME "copyright" 44 | #define ID3V2_FRAME_TCOP_DESC "Copyright message" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tcop(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TCOP && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tcop id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TCOP_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tden.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tden.h: ID3 TDEN frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Encoding time frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TDEN_H__ 33 | # define __BITSTREAM_ID3_FRAME_TDEN_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TDEN ID3V2_FRAME_ID('T','D','E','N') 43 | #define ID3V2_FRAME_TDEN_NAME "encoding time" 44 | #define ID3V2_FRAME_TDEN_DESC "Encoding time" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tden(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TDEN && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tden id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TDEN_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tdly.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tdly.h: ID3 TDLY frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Playlist delay frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TDLY_H__ 33 | # define __BITSTREAM_ID3_FRAME_TDLY_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TDLY ID3V2_FRAME_ID('T','D','L','Y') 43 | #define ID3V2_FRAME_TDLY_NAME "playlist delay" 44 | #define ID3V2_FRAME_TDLY_DESC "Playlist delay" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tdly(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TDLY && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tdly id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TDLY_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tdor.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tdor.h: ID3 TDOR frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Original release time frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TDOR_H__ 33 | # define __BITSTREAM_ID3_FRAME_TDOR_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TDOR ID3V2_FRAME_ID('T','D','O','R') 43 | #define ID3V2_FRAME_TDOR_NAME "original release" 44 | #define ID3V2_FRAME_TDOR_DESC "Original release time" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tdor(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TDOR && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tdor id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TDOR_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tdrc.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tdrc.h: ID3 TDRC frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Recording time frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TDRC_H__ 33 | # define __BITSTREAM_ID3_FRAME_TDRC_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TDRC ID3V2_FRAME_ID('T','D','R','C') 43 | #define ID3V2_FRAME_TDRC_NAME "recording" 44 | #define ID3V2_FRAME_TDRC_DESC "Recording time" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tdrc(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TDRC && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tdrc id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TDRC_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tdrl.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tdrl.h: ID3 TDRL frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Release time frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TDRL_H__ 33 | # define __BITSTREAM_ID3_FRAME_TDRL_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TDRL ID3V2_FRAME_ID('T','D','R','L') 43 | #define ID3V2_FRAME_TDRL_NAME "release" 44 | #define ID3V2_FRAME_TDRL_DESC "Release time" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tdrl(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TDRL && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tdrl id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TDRL_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tdtg.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tdtg.h: ID3 TDTG frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Tagging time frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TDTG_H__ 33 | # define __BITSTREAM_ID3_FRAME_TDTG_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TDTG ID3V2_FRAME_ID('T','D','T','G') 43 | #define ID3V2_FRAME_TDTG_NAME "tagging" 44 | #define ID3V2_FRAME_TDTG_DESC "Tagging time" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tdtg(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TDTG && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tdtg id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TDTG_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tenc.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tenc.h: ID3 TENC frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Encoded by frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TENC_H__ 33 | # define __BITSTREAM_ID3_FRAME_TENC_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TENC ID3V2_FRAME_ID('T','E','N','C') 43 | #define ID3V2_FRAME_TENC_NAME "encoded_by" 44 | #define ID3V2_FRAME_TENC_DESC "Encoded by" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tenc(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TENC && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tenc id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TENC_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_text.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_text.h: ID3 TEXT frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Lyricist or Text writer frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TEXT_H__ 33 | # define __BITSTREAM_ID3_FRAME_TEXT_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TEXT ID3V2_FRAME_ID('T','E','X','T') 43 | #define ID3V2_FRAME_TEXT_NAME "text" 44 | #define ID3V2_FRAME_TEXT_DESC "Lyricist or Text writer" 45 | 46 | static inline bool 47 | id3v2_frame_validate_text(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TEXT && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_text id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TEXT_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tflt.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tflt.h: ID3 TFLT frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * File type frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TFLT_H__ 33 | # define __BITSTREAM_ID3_FRAME_TFLT_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TFLT ID3V2_FRAME_ID('T','F','L','T') 43 | #define ID3V2_FRAME_TFLT_NAME "file type" 44 | #define ID3V2_FRAME_TFLT_DESC "File type" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tflt(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TFLT && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tflt id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TFLT_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tipl.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tipl.h: ID3 TIPL frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Involved people list frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TIPL_H__ 33 | # define __BITSTREAM_ID3_FRAME_TIPL_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TIPL ID3V2_FRAME_ID('T','I','P','L') 43 | #define ID3V2_FRAME_TIPL_NAME "involved people" 44 | #define ID3V2_FRAME_TIPL_DESC "Involved people list" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tipl(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TIPL && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tipl id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TIPL_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tit1.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tit1.h: ID3 TIT1 frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Content group description frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TIT1_H__ 33 | # define __BITSTREAM_ID3_FRAME_TIT1_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TIT1 ID3V2_FRAME_ID('T','I','T','1') 43 | #define ID3V2_FRAME_TIT1_NAME "description" 44 | #define ID3V2_FRAME_TIT1_DESC "Content group description" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tit1(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TIT1 && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tit1 id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TIT1_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tit2.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tit2.h: ID3 TIT2 frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Title or songname or content description frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TIT2_H__ 33 | # define __BITSTREAM_ID3_FRAME_TIT2_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TIT2 ID3V2_FRAME_ID('T','I','T','2') 43 | #define ID3V2_FRAME_TIT2_NAME "title" 44 | #define ID3V2_FRAME_TIT2_DESC "Title or songname or content description" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tit2(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TIT2 && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tit2 id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TIT2_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tit3.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tit3.h: ID3 TIT3 frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Subtitle or Description refinement frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TIT3_H__ 33 | # define __BITSTREAM_ID3_FRAME_TIT3_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TIT3 ID3V2_FRAME_ID('T','I','T','3') 43 | #define ID3V2_FRAME_TIT3_NAME "subtitle" 44 | #define ID3V2_FRAME_TIT3_DESC "Subtitle or Description refinement" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tit3(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TIT3 && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tit3 id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TIT3_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tkey.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tkey.h: ID3 TKEY frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Initial key frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TKEY_H__ 33 | # define __BITSTREAM_ID3_FRAME_TKEY_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TKEY ID3V2_FRAME_ID('T','K','E','Y') 43 | #define ID3V2_FRAME_TKEY_NAME "initial key" 44 | #define ID3V2_FRAME_TKEY_DESC "Initial key" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tkey(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TKEY && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tkey id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TKEY_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tlan.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tlan.h: ID3 TLAN frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Language(s) frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TLAN_H__ 33 | # define __BITSTREAM_ID3_FRAME_TLAN_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TLAN ID3V2_FRAME_ID('T','L','A','N') 43 | #define ID3V2_FRAME_TLAN_NAME "language" 44 | #define ID3V2_FRAME_TLAN_DESC "Language(s)" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tlan(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TLAN && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tlan id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TLAN_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tlen.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tlen.h: ID3 TLEN frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Length frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TLEN_H__ 33 | # define __BITSTREAM_ID3_FRAME_TLEN_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TLEN ID3V2_FRAME_ID('T','L','E','N') 43 | #define ID3V2_FRAME_TLEN_NAME "length" 44 | #define ID3V2_FRAME_TLEN_DESC "Length" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tlen(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TLEN && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tlen id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TLEN_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tmcl.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tmcl.h: ID3 TMCL frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Musician credits list frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TMCL_H__ 33 | # define __BITSTREAM_ID3_FRAME_TMCL_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TMCL ID3V2_FRAME_ID('T','M','C','L') 43 | #define ID3V2_FRAME_TMCL_NAME "credits" 44 | #define ID3V2_FRAME_TMCL_DESC "Musician credits list" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tmcl(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TMCL && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tmcl id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TMCL_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tmed.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tmed.h: ID3 TMED frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Media type frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TMED_H__ 33 | # define __BITSTREAM_ID3_FRAME_TMED_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TMED ID3V2_FRAME_ID('T','M','E','D') 43 | #define ID3V2_FRAME_TMED_NAME "media" 44 | #define ID3V2_FRAME_TMED_DESC "Media type" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tmed(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TMED && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tmed id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TMED_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tmoo.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tmoo.h: ID3 TMOO frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Mood frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TMOO_H__ 33 | # define __BITSTREAM_ID3_FRAME_TMOO_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TMOO ID3V2_FRAME_ID('T','M','O','O') 43 | #define ID3V2_FRAME_TMOO_NAME "mood" 44 | #define ID3V2_FRAME_TMOO_DESC "Mood" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tmoo(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TMOO && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tmoo id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TMOO_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_toal.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_toal.h: ID3 TOAL frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Original album or movie or show title frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TOAL_H__ 33 | # define __BITSTREAM_ID3_FRAME_TOAL_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TOAL ID3V2_FRAME_ID('T','O','A','L') 43 | #define ID3V2_FRAME_TOAL_NAME "original album" 44 | #define ID3V2_FRAME_TOAL_DESC "Original album or movie or show title" 45 | 46 | static inline bool 47 | id3v2_frame_validate_toal(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TOAL && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_toal id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TOAL_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tofn.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tofn.h: ID3 TOFN frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Original filename frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TOFN_H__ 33 | # define __BITSTREAM_ID3_FRAME_TOFN_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TOFN ID3V2_FRAME_ID('T','O','F','N') 43 | #define ID3V2_FRAME_TOFN_NAME "original filename" 44 | #define ID3V2_FRAME_TOFN_DESC "Original filename" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tofn(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TOFN && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tofn id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TOFN_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_toly.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_toly.h: ID3 TOLY frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Original lyricist(s) or text writer(s) frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TOLY_H__ 33 | # define __BITSTREAM_ID3_FRAME_TOLY_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TOLY ID3V2_FRAME_ID('T','O','L','Y') 43 | #define ID3V2_FRAME_TOLY_NAME "original text" 44 | #define ID3V2_FRAME_TOLY_DESC "Original lyricist(s) or text writer(s)" 45 | 46 | static inline bool 47 | id3v2_frame_validate_toly(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TOLY && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_toly id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TOLY_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tope.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tope.h: ID3 TOPE frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Original artist(s) or performer(s) frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TOPE_H__ 33 | # define __BITSTREAM_ID3_FRAME_TOPE_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TOPE ID3V2_FRAME_ID('T','O','P','E') 43 | #define ID3V2_FRAME_TOPE_NAME "original artist" 44 | #define ID3V2_FRAME_TOPE_DESC "Original artist(s) or performer(s)" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tope(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TOPE && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tope id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TOPE_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_town.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_town.h: ID3 TOWN frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * File owner or licensee frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TOWN_H__ 33 | # define __BITSTREAM_ID3_FRAME_TOWN_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TOWN ID3V2_FRAME_ID('T','O','W','N') 43 | #define ID3V2_FRAME_TOWN_NAME "owner" 44 | #define ID3V2_FRAME_TOWN_DESC "File owner or licensee" 45 | 46 | static inline bool 47 | id3v2_frame_validate_town(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TOWN && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_town id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TOWN_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tpe1.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tpe1.h: ID3 TPE1 frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Lead performer(s) or Soloist(s) frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TPE1_H__ 33 | # define __BITSTREAM_ID3_FRAME_TPE1_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TPE1 ID3V2_FRAME_ID('T','P','E','1') 43 | #define ID3V2_FRAME_TPE1_NAME "lead" 44 | #define ID3V2_FRAME_TPE1_DESC "Lead performer(s) or Soloist(s)" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tpe1(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TPE1 && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tpe1 id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TPE1_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tpe2.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tpe2.h: ID3 TPE2 frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Band or orchestra or accompaniment frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TPE2_H__ 33 | # define __BITSTREAM_ID3_FRAME_TPE2_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TPE2 ID3V2_FRAME_ID('T','P','E','2') 43 | #define ID3V2_FRAME_TPE2_NAME "band" 44 | #define ID3V2_FRAME_TPE2_DESC "Band or orchestra or accompaniment" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tpe2(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TPE2 && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tpe2 id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TPE2_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tpe3.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tpe3.h: ID3 TPE3 frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Conductor or performer refinement frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TPE3_H__ 33 | # define __BITSTREAM_ID3_FRAME_TPE3_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TPE3 ID3V2_FRAME_ID('T','P','E','3') 43 | #define ID3V2_FRAME_TPE3_NAME "conductor" 44 | #define ID3V2_FRAME_TPE3_DESC "Conductor or performer refinement" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tpe3(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TPE3 && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tpe3 id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TPE3_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tpe4.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tpe4.h: ID3 TPE4 frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Interpreted, remixed, or otherwise modified by frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TPE4_H__ 33 | # define __BITSTREAM_ID3_FRAME_TPE4_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TPE4 ID3V2_FRAME_ID('T','P','E','4') 43 | #define ID3V2_FRAME_TPE4_NAME "interpreted by" 44 | #define ID3V2_FRAME_TPE4_DESC "Interpreted, remixed, or otherwise modified by" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tpe4(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TPE4 && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tpe4 id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TPE4_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tpos.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tpos.h: ID3 TPOS frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Part of a set frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TPOS_H__ 33 | # define __BITSTREAM_ID3_FRAME_TPOS_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TPOS ID3V2_FRAME_ID('T','P','O','S') 43 | #define ID3V2_FRAME_TPOS_NAME "set" 44 | #define ID3V2_FRAME_TPOS_DESC "Part of a set" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tpos(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TPOS && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tpos id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TPOS_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tpro.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tpro.h: ID3 TPRO frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Produced notice frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TPRO_H__ 33 | # define __BITSTREAM_ID3_FRAME_TPRO_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TPRO ID3V2_FRAME_ID('T','P','R','O') 43 | #define ID3V2_FRAME_TPRO_NAME "produced notice" 44 | #define ID3V2_FRAME_TPRO_DESC "Produced notice" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tpro(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TPRO && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tpro id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TPRO_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tpub.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tpub.h: ID3 TPUB frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Publisher frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TPUB_H__ 33 | # define __BITSTREAM_ID3_FRAME_TPUB_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TPUB ID3V2_FRAME_ID('T','P','U','B') 43 | #define ID3V2_FRAME_TPUB_NAME "publisher" 44 | #define ID3V2_FRAME_TPUB_DESC "Publisher" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tpub(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TPUB && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tpub id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TPUB_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_trck.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_trck.h: ID3 TRCK frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Track number or Position in set frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TRCK_H__ 33 | # define __BITSTREAM_ID3_FRAME_TRCK_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TRCK ID3V2_FRAME_ID('T','R','C','K') 43 | #define ID3V2_FRAME_TRCK_NAME "track" 44 | #define ID3V2_FRAME_TRCK_DESC "Track number or Position in set" 45 | 46 | static inline bool 47 | id3v2_frame_validate_trck(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TRCK && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_trck id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TRCK_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_trsn.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_trsn.h: ID3 TRSN frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Internet radio station name frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TRSN_H__ 33 | # define __BITSTREAM_ID3_FRAME_TRSN_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TRSN ID3V2_FRAME_ID('T','R','S','N') 43 | #define ID3V2_FRAME_TRSN_NAME "station" 44 | #define ID3V2_FRAME_TRSN_DESC "Internet radio station name" 45 | 46 | static inline bool 47 | id3v2_frame_validate_trsn(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TRSN && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_trsn id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TRSN_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_trso.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_trso.h: ID3 TRSO frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Internet radio station owner frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TRSO_H__ 33 | # define __BITSTREAM_ID3_FRAME_TRSO_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TRSO ID3V2_FRAME_ID('T','R','S','O') 43 | #define ID3V2_FRAME_TRSO_NAME "station owner" 44 | #define ID3V2_FRAME_TRSO_DESC "Internet radio station owner" 45 | 46 | static inline bool 47 | id3v2_frame_validate_trso(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TRSO && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_trso id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TRSO_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tsoa.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tsoa.h: ID3 TSOA frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Album sort order frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TSOA_H__ 33 | # define __BITSTREAM_ID3_FRAME_TSOA_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TSOA ID3V2_FRAME_ID('T','S','O','A') 43 | #define ID3V2_FRAME_TSOA_NAME "album order" 44 | #define ID3V2_FRAME_TSOA_DESC "Album sort order" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tsoa(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TSOA && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tsoa id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TSOA_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tsop.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tsop.h: ID3 TSOP frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Performer sort order frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TSOP_H__ 33 | # define __BITSTREAM_ID3_FRAME_TSOP_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TSOP ID3V2_FRAME_ID('T','S','O','P') 43 | #define ID3V2_FRAME_TSOP_NAME "performer order" 44 | #define ID3V2_FRAME_TSOP_DESC "Performer sort order" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tsop(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TSOP && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tsop id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TSOP_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tsot.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tsot.h: ID3 TSOT frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Title sort order frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TSOT_H__ 33 | # define __BITSTREAM_ID3_FRAME_TSOT_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TSOT ID3V2_FRAME_ID('T','S','O','T') 43 | #define ID3V2_FRAME_TSOT_NAME "title order" 44 | #define ID3V2_FRAME_TSOT_DESC "Title sort order" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tsot(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TSOT && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tsot id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TSOT_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tsrc.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tsrc.h: ID3 TSRC frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * ISRC (international standard recording code) frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TSRC_H__ 33 | # define __BITSTREAM_ID3_FRAME_TSRC_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TSRC ID3V2_FRAME_ID('T','S','R','C') 43 | #define ID3V2_FRAME_TSRC_NAME "ISRC" 44 | #define ID3V2_FRAME_TSRC_DESC "ISRC (international standard recording code)" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tsrc(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TSRC && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tsrc id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TSRC_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tsse.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tsse.h: ID3 TSSE frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Software or Hardware and settings used for encoding frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TSSE_H__ 33 | # define __BITSTREAM_ID3_FRAME_TSSE_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TSSE ID3V2_FRAME_ID('T','S','S','E') 43 | #define ID3V2_FRAME_TSSE_NAME "encoding settings" 44 | #define ID3V2_FRAME_TSSE_DESC "Software or Hardware and settings used for encoding" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tsse(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TSSE && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tsse id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TSSE_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_tsst.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_tsst.h: ID3 TSST frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Set subtitle frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_TSST_H__ 33 | # define __BITSTREAM_ID3_FRAME_TSST_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_TSST ID3V2_FRAME_ID('T','S','S','T') 43 | #define ID3V2_FRAME_TSST_NAME "set subtitle" 44 | #define ID3V2_FRAME_TSST_DESC "Set subtitle" 45 | 46 | static inline bool 47 | id3v2_frame_validate_tsst(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_TSST && 51 | id3v2_frame_get_size(p_frame) >= 1; 52 | } 53 | 54 | #define id3v2_frame_print_tsst id3v2_frame_print_t 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !__BITSTREAM_ID3_FRAME_TSST_H__ */ 61 | -------------------------------------------------------------------------------- /id3/frame_wcom.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_wcom.h: ID3 WCOM frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Commercial information frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_WCOM_H__ 33 | # define __BITSTREAM_ID3_FRAME_WCOM_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_WCOM ID3V2_FRAME_ID('W','C','O','M') 43 | #define ID3V2_FRAME_WCOM_NAME "commercial info" 44 | #define ID3V2_FRAME_WCOM_DESC "Commercial information" 45 | 46 | static inline bool 47 | id3v2_frame_validate_wcom(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_WCOM; 51 | } 52 | 53 | #define id3v2_frame_print_wcom id3v2_frame_print_w 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif /* !__BITSTREAM_ID3_FRAME_WCOM_H__ */ 60 | -------------------------------------------------------------------------------- /id3/frame_wcop.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_wcop.h: ID3 WCOP frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Copyright or Legal information frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_WCOP_H__ 33 | # define __BITSTREAM_ID3_FRAME_WCOP_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_WCOP ID3V2_FRAME_ID('W','C','O','P') 43 | #define ID3V2_FRAME_WCOP_NAME "copyright info" 44 | #define ID3V2_FRAME_WCOP_DESC "Copyright or Legal information" 45 | 46 | static inline bool 47 | id3v2_frame_validate_wcop(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_WCOP; 51 | } 52 | 53 | #define id3v2_frame_print_wcop id3v2_frame_print_w 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif /* !__BITSTREAM_ID3_FRAME_WCOP_H__ */ 60 | -------------------------------------------------------------------------------- /id3/frame_woaf.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_woaf.h: ID3 WOAF frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Official audio file webpage frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_WOAF_H__ 33 | # define __BITSTREAM_ID3_FRAME_WOAF_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_WOAF ID3V2_FRAME_ID('W','O','A','F') 43 | #define ID3V2_FRAME_WOAF_NAME "file webpage" 44 | #define ID3V2_FRAME_WOAF_DESC "Official audio file webpage" 45 | 46 | static inline bool 47 | id3v2_frame_validate_woaf(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_WOAF; 51 | } 52 | 53 | #define id3v2_frame_print_woaf id3v2_frame_print_w 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif /* !__BITSTREAM_ID3_FRAME_WOAF_H__ */ 60 | -------------------------------------------------------------------------------- /id3/frame_woar.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_woar.h: ID3 WOAR frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Official artist or performer webpage frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_WOAR_H__ 33 | # define __BITSTREAM_ID3_FRAME_WOAR_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_WOAR ID3V2_FRAME_ID('W','O','A','R') 43 | #define ID3V2_FRAME_WOAR_NAME "artist webpage" 44 | #define ID3V2_FRAME_WOAR_DESC "Official artist or performer webpage" 45 | 46 | static inline bool 47 | id3v2_frame_validate_woar(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_WOAR; 51 | } 52 | 53 | #define id3v2_frame_print_woar id3v2_frame_print_w 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif /* !__BITSTREAM_ID3_FRAME_WOAR_H__ */ 60 | -------------------------------------------------------------------------------- /id3/frame_woas.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_woas.h: ID3 WOAS frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Official audio source webpage frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_WOAS_H__ 33 | # define __BITSTREAM_ID3_FRAME_WOAS_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_WOAS ID3V2_FRAME_ID('W','O','A','S') 43 | #define ID3V2_FRAME_WOAS_NAME "source webpage" 44 | #define ID3V2_FRAME_WOAS_DESC "Official audio source webpage" 45 | 46 | static inline bool 47 | id3v2_frame_validate_woas(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_WOAS; 51 | } 52 | 53 | #define id3v2_frame_print_woas id3v2_frame_print_w 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif /* !__BITSTREAM_ID3_FRAME_WOAS_H__ */ 60 | -------------------------------------------------------------------------------- /id3/frame_wors.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_wors.h: ID3 WORS frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Official Internet radio station homepage frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_WORS_H__ 33 | # define __BITSTREAM_ID3_FRAME_WORS_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_WORS ID3V2_FRAME_ID('W','O','R','S') 43 | #define ID3V2_FRAME_WORS_NAME "station homepage" 44 | #define ID3V2_FRAME_WORS_DESC "Official Internet radio station homepage" 45 | 46 | static inline bool 47 | id3v2_frame_validate_wors(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_WORS; 51 | } 52 | 53 | #define id3v2_frame_print_wors id3v2_frame_print_w 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif /* !__BITSTREAM_ID3_FRAME_WORS_H__ */ 60 | -------------------------------------------------------------------------------- /id3/frame_wpay.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_wpay.h: ID3 WPAY frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Payment frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_WPAY_H__ 33 | # define __BITSTREAM_ID3_FRAME_WPAY_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_WPAY ID3V2_FRAME_ID('W','P','A','Y') 43 | #define ID3V2_FRAME_WPAY_NAME "payment" 44 | #define ID3V2_FRAME_WPAY_DESC "Payment" 45 | 46 | static inline bool 47 | id3v2_frame_validate_wpay(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_WPAY; 51 | } 52 | 53 | #define id3v2_frame_print_wpay id3v2_frame_print_w 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif /* !__BITSTREAM_ID3_FRAME_WPAY_H__ */ 60 | -------------------------------------------------------------------------------- /id3/frame_wpub.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * frame_wpub.h: ID3 WPUB frame 3 | ***************************************************************************** 4 | * Copyright (C) 2023 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Publishers official webpage frame. 30 | */ 31 | 32 | #ifndef __BITSTREAM_ID3_FRAME_WPUB_H__ 33 | # define __BITSTREAM_ID3_FRAME_WPUB_H__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define ID3V2_FRAME_ID_WPUB ID3V2_FRAME_ID('W','P','U','B') 43 | #define ID3V2_FRAME_WPUB_NAME "publisher webpage" 44 | #define ID3V2_FRAME_WPUB_DESC "Publishers official webpage" 45 | 46 | static inline bool 47 | id3v2_frame_validate_wpub(const uint8_t *p_frame) 48 | { 49 | return p_frame && 50 | id3v2_frame_get_id(p_frame) == ID3V2_FRAME_ID_WPUB; 51 | } 52 | 53 | #define id3v2_frame_print_wpub id3v2_frame_print_w 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif /* !__BITSTREAM_ID3_FRAME_WPUB_H__ */ 60 | -------------------------------------------------------------------------------- /ietf/rtcp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 OpenHeadend S.A.R.L. 3 | * 4 | * Authors: Arnaud de Turckheim 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * "Software"), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject 12 | * to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be 15 | * included in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | */ 25 | 26 | #ifndef __BITSTREAM_IETF_RTCP_H__ 27 | # define __BITSTREAM_IETF_RTCP_H__ 28 | 29 | # include 30 | 31 | # define RTCP_RTP_VERSION 2 32 | # define RTCP_PT_APP 204 33 | 34 | static inline void rtcp_set_rtp_version(uint8_t *p_rtcp) 35 | { 36 | p_rtcp[0] = RTCP_RTP_VERSION << 6; 37 | } 38 | 39 | static inline uint8_t rtcp_get_rc(const uint8_t *p_rtcp) 40 | { 41 | return p_rtcp[0] & 0x1f; 42 | } 43 | 44 | static inline void rtcp_set_rc(uint8_t *p_rtcp, uint8_t rc) 45 | { 46 | p_rtcp[0] |= rc & 0x1f; 47 | } 48 | 49 | static inline uint8_t rtcp_get_pt(const uint8_t *p_rtcp) 50 | { 51 | return p_rtcp[1]; 52 | } 53 | 54 | static inline void rtcp_set_pt(uint8_t *p_rtcp, uint8_t pt) 55 | { 56 | p_rtcp[1] = pt; 57 | } 58 | 59 | static inline uint16_t rtcp_get_length(const uint8_t *p_rtcp) 60 | { 61 | return (p_rtcp[2] << 8) | p_rtcp[3]; 62 | } 63 | 64 | static inline void rtcp_set_length(uint8_t *p_rtcp, 65 | uint16_t length) 66 | { 67 | p_rtcp[2] = length >> 8; 68 | p_rtcp[3] = length & 0xff; 69 | } 70 | 71 | # include 72 | 73 | #endif /* !__BITSTREAM_IETF_RTCP_H__ */ 74 | -------------------------------------------------------------------------------- /ietf/rtcp_fb.h: -------------------------------------------------------------------------------- 1 | #ifndef __BITSTREAM_IETF_RTCP_FB_H__ 2 | # define __BITSTREAM_IETF_RTCP_FB_H__ 3 | 4 | # include 5 | 6 | # define RTCP_PT_RTPFB 205 7 | # define RTCP_PT_PSFB 206 8 | 9 | # define RTCP_PT_RTPFB_GENERIC_NACK 1 10 | 11 | # define RTCP_FB_HEADER_SIZE 12 12 | # define RTCP_FB_FCI_GENERIC_NACK_SIZE 4 13 | 14 | static inline void rtcp_fb_set_fmt(uint8_t *p_rtcp, uint8_t fmt) 15 | { 16 | p_rtcp[0] |= fmt & 0x1f; 17 | } 18 | 19 | static inline uint8_t rtcp_fb_get_fmt(const uint8_t *p_rtcp) 20 | { 21 | return p_rtcp[0] & 0x1f; 22 | } 23 | 24 | static inline void rtcp_fb_set_ssrc_pkt_sender(uint8_t *p_rtcp_fb, 25 | const uint8_t pi_ssrc[4]) 26 | { 27 | p_rtcp_fb[4] = pi_ssrc[0]; 28 | p_rtcp_fb[5] = pi_ssrc[1]; 29 | p_rtcp_fb[6] = pi_ssrc[2]; 30 | p_rtcp_fb[7] = pi_ssrc[3]; 31 | } 32 | 33 | static inline void rtcp_fb_set_int_ssrc_pkt_sender(uint8_t *p_rtcp_fb, uint32_t i_ssrc) 34 | { 35 | p_rtcp_fb[4] = (i_ssrc >> 24) & 0xff; 36 | p_rtcp_fb[5] = (i_ssrc >> 16) & 0xff; 37 | p_rtcp_fb[6] = (i_ssrc >> 8) & 0xff; 38 | p_rtcp_fb[7] = i_ssrc & 0xff; 39 | } 40 | 41 | static inline uint32_t rtcp_fb_get_int_ssrc_pkt_sender(const uint8_t *p_rtcp_fb) 42 | { 43 | return (p_rtcp_fb[4] << 24) | (p_rtcp_fb[5] << 16) | (p_rtcp_fb[6] << 8) | p_rtcp_fb[7]; 44 | } 45 | 46 | static inline void rtcp_fb_set_ssrc_media_src(uint8_t *p_rtcp_fb, 47 | const uint8_t pi_ssrc[4]) 48 | { 49 | p_rtcp_fb[8] = pi_ssrc[0]; 50 | p_rtcp_fb[9] = pi_ssrc[1]; 51 | p_rtcp_fb[10] = pi_ssrc[2]; 52 | p_rtcp_fb[11] = pi_ssrc[3]; 53 | } 54 | 55 | static inline void rtcp_fb_get_ssrc_pkt_sender(const uint8_t *p_rtcp_fb, 56 | uint8_t pi_ssrc[4]) 57 | { 58 | pi_ssrc[0] = p_rtcp_fb[4]; 59 | pi_ssrc[1] = p_rtcp_fb[5]; 60 | pi_ssrc[2] = p_rtcp_fb[6]; 61 | pi_ssrc[3] = p_rtcp_fb[7]; 62 | } 63 | 64 | static inline void rtcp_fb_get_ssrc_media_src(const uint8_t *p_rtcp_fb, 65 | uint8_t pi_ssrc[4]) 66 | { 67 | pi_ssrc[0] = p_rtcp_fb[8]; 68 | pi_ssrc[1] = p_rtcp_fb[9]; 69 | pi_ssrc[2] = p_rtcp_fb[10]; 70 | pi_ssrc[3] = p_rtcp_fb[11]; 71 | } 72 | 73 | static inline void rtcp_fb_nack_set_packet_id(uint8_t *p_rtcp_fb_nack, 74 | uint16_t packet_id) 75 | { 76 | p_rtcp_fb_nack[0] = (packet_id >> 8) & 0xff; 77 | p_rtcp_fb_nack[1] = packet_id & 0xff; 78 | } 79 | 80 | static inline uint16_t rtcp_fb_nack_get_packet_id(const uint8_t *p_rtcp_fb_nack) 81 | { 82 | return (p_rtcp_fb_nack[0] << 8) | p_rtcp_fb_nack[1]; 83 | } 84 | 85 | static inline uint16_t rtcp_fb_nack_get_bitmask_lost(const uint8_t *p_rtcp_fb_nack) 86 | { 87 | return (p_rtcp_fb_nack[2] << 8) | p_rtcp_fb_nack[3]; 88 | } 89 | 90 | static inline void rtcp_fb_nack_set_bitmask_lost(uint8_t *p_rtcp_fb_nack, 91 | uint16_t bitmask) 92 | { 93 | p_rtcp_fb_nack[2] = (bitmask >> 8) & 0xff; 94 | p_rtcp_fb_nack[3] = bitmask & 0xff; 95 | } 96 | 97 | #endif /* !__BITSTREAM_IETF_RTCP_FB_H__ */ 98 | -------------------------------------------------------------------------------- /ietf/rtcp_sdes.h: -------------------------------------------------------------------------------- 1 | #ifndef __BITSTREAM_IETF_RTCP_SDES_H__ 2 | # define __BITSTREAM_IETF_RTCP_SDES_H__ 3 | 4 | # include 5 | # include 6 | 7 | # define RTCP_SDES_SIZE 10 8 | 9 | # define RTCP_PT_SDES 202 10 | 11 | static inline void rtcp_sdes_set_pt(uint8_t *p_rtcp_rr) 12 | { 13 | rtcp_set_pt(p_rtcp_rr, RTCP_PT_SDES); 14 | } 15 | 16 | static inline uint8_t rtcp_sdes_get_cname(const uint8_t *p_rtcp_sdes) 17 | { 18 | return p_rtcp_sdes[8]; 19 | } 20 | 21 | static inline void rtcp_sdes_set_cname(uint8_t *p_rtcp_sdes, uint8_t cname) 22 | { 23 | p_rtcp_sdes[8] = cname; 24 | } 25 | 26 | static inline int8_t rtcp_sdes_get_name_length(const uint8_t *p_rtcp_sdes) 27 | { 28 | return p_rtcp_sdes[9]; 29 | } 30 | 31 | static inline void rtcp_sdes_set_name_length(uint8_t *p_rtcp_sdes, 32 | int8_t name_length) 33 | { 34 | p_rtcp_sdes[9] = name_length; 35 | } 36 | 37 | #endif /* !__BITSTREAM_IETF_RTCP_SDES_H__ */ 38 | -------------------------------------------------------------------------------- /ietf/rtp3640.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * rtp3640.h: RTP Payload Format for Transport of MPEG-4 Elementary Streams 3 | ***************************************************************************** 4 | * Copyright (C) 2017 VideoLAN 5 | * 6 | * Authors: Christophe Massiot 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - IETF RFC 3640 RTP Payload Format for Transport of MPEG-4 ES 31 | */ 32 | 33 | #ifndef __BITSTREAM_IETF_RTP3640_H__ 34 | # define __BITSTREAM_IETF_RTP3640_H__ 35 | 36 | #include 37 | 38 | #ifdef __cplusplus 39 | extern "C" 40 | { 41 | #endif 42 | 43 | #define RTP3640_AU_HEADERS_LENGTH_SIZE 2 44 | #define RTP3640_AU_HEADER_AAC_HBR_SIZE 2 45 | 46 | static inline void rtp3640_set_au_headers_length(uint8_t *header, uint16_t size) 47 | { 48 | header[0] = size >> 8; 49 | header[1] = size & 0xff; 50 | } 51 | 52 | static inline uint16_t rtp3640_get_au_headers_length(const uint8_t *header) 53 | { 54 | return (header[0] << 8) | header[1]; 55 | } 56 | 57 | static inline void rtp3640_set_aac_hbr_au_size(uint8_t *header, uint16_t size) 58 | { 59 | header[0] = (size >> 5) & 0xff; 60 | header[1] &= ~0xf8; 61 | header[1] |= (size << 3) & 0xf8; 62 | } 63 | 64 | static inline uint16_t rtp3640_get_aac_hbr_au_size(const uint8_t *header) 65 | { 66 | return (header[0] << 5) | (header[1] >> 3); 67 | } 68 | 69 | 70 | static inline void rtp3640_set_aac_hbr_au_index(uint8_t *header, uint8_t index) 71 | { 72 | header[1] &= ~0x7; 73 | header[1] |= index & 0x7; 74 | } 75 | 76 | static inline uint8_t rtp3640_get_aac_hbr_au_index(const uint8_t *header) 77 | { 78 | return (header[1] & 0x7); 79 | } 80 | 81 | #ifdef __cplusplus 82 | } 83 | #endif 84 | 85 | #endif /* !__BITSTREAM_IETF_RTP3640_H__ */ 86 | -------------------------------------------------------------------------------- /ietf/rtp6184.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * rtp6184.h: RTP Payload Format for H.264 Video 3 | ***************************************************************************** 4 | * Copyright (c) 2015 Arnaud de Turckheim 5 | * Copyright (C) 2017 VideoLAN 6 | * 7 | * Authors: Arnaud de Turckheim 8 | * Christophe Massiot 9 | * 10 | * Permission is hereby granted, free of charge, to any person obtaining 11 | * a copy of this software and associated documentation files (the 12 | * "Software"), to deal in the Software without restriction, including 13 | * without limitation the rights to use, copy, modify, merge, publish, 14 | * distribute, sublicense, and/or sell copies of the Software, and to 15 | * permit persons to whom the Software is furnished to do so, subject 16 | * to the following conditions: 17 | * 18 | * The above copyright notice and this permission notice shall be 19 | * included in all copies or substantial portions of the Software. 20 | * 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 25 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | *****************************************************************************/ 29 | 30 | /* 31 | * Normative references: 32 | * - IETF RFC 6184 RTP Payload Format for H.264 Video (May 2011) 33 | */ 34 | 35 | #ifndef __BITSTREAM_IETF_RTP6184_H__ 36 | # define __BITSTREAM_IETF_RTP6184_H__ 37 | 38 | #include 39 | #include 40 | 41 | #ifdef __cplusplus 42 | extern "C" 43 | { 44 | #endif 45 | 46 | #define RTP_6184_CLOCKRATE 90000 47 | 48 | #define RTP_6184_STAP_A 24 49 | #define RTP_6184_STAP_B 25 50 | #define RTP_6184_MTAP16 26 51 | #define RTP_6184_MTAP24 27 52 | #define RTP_6184_FU_A 28 53 | #define RTP_6184_FU_B 29 54 | 55 | #define RTP_6184_STAP_HEADER_SIZE 2 56 | 57 | static inline void rtp_6184_stap_set_size(uint8_t *header, uint16_t size) 58 | { 59 | header[0] = size >> 8; 60 | header[1] = size & 0xff; 61 | } 62 | 63 | static inline uint16_t rtp_6184_stap_get_size(const uint8_t *header) 64 | { 65 | return (header[0] << 8) | header[1]; 66 | } 67 | 68 | static inline void rtp_6184_fu_set_start(uint8_t *header) 69 | { 70 | header[0] |= 0x80; 71 | } 72 | 73 | static inline bool rtp_6184_fu_check_start(uint8_t header) 74 | { 75 | return header & 0x80; 76 | } 77 | 78 | static inline void rtp_6184_fu_set_end(uint8_t *header) 79 | { 80 | header[0] |= 0x40; 81 | } 82 | 83 | static inline bool rtp_6184_fu_check_end(uint8_t header) 84 | { 85 | return header & 0x40; 86 | } 87 | 88 | #ifdef __cplusplus 89 | } 90 | #endif 91 | 92 | #endif /* !__BITSTREAM_IETF_RTP6184_H__ */ 93 | -------------------------------------------------------------------------------- /ietf/rtp7587.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * rtp7587.h: RFC Profile for Opus 3 | ***************************************************************************** 4 | * Copyright (C) 2015 Open Broadcast Systems Ltd. 5 | * 6 | * Authors: Kieran Kunhya 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * RTP Payload Format for the Opus Speech and Audio Codec 30 | */ 31 | #ifndef __BITSTREAM_IETF_RTP7587_H__ 32 | # define __BITSTREAM_IETF_RTP7587_H__ 33 | 34 | #define RTP_7587_CLOCKRATE 48000 35 | 36 | #endif /* !__BITSTREAM_IETF_RTP7587_H__ */ 37 | -------------------------------------------------------------------------------- /mpeg/psi.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * psi.h: ISO/IEC 13818-1 Program Stream Information 3 | ***************************************************************************** 4 | * Copyright (C) 2009-2010 VideoLAN 5 | * 6 | * Authors: Christophe Massiot 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ISO/IEC 13818-1:2007(E) (MPEG-2 Systems) 31 | */ 32 | 33 | #ifndef __BITSTREAM_MPEG_PSI_H__ 34 | #define __BITSTREAM_MPEG_PSI_H__ 35 | 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /mpeg/psi/desc_11.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * desc_11.h: ISO/IEC 13818-1 Descriptor 0x11 (STD descriptor) 3 | ***************************************************************************** 4 | * Copyright (C) 2011 Unix Solutions Ltd. 5 | * 6 | * Authors: Georgi Chorbadzhiyski 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ISO/IEC 13818-1:2007(E) (MPEG-2 Systems) 31 | */ 32 | 33 | #ifndef __BITSTREAM_MPEG_DESC_11_H__ 34 | #define __BITSTREAM_MPEG_DESC_11_H__ 35 | 36 | #include 37 | #include 38 | 39 | #ifdef __cplusplus 40 | extern "C" 41 | { 42 | #endif 43 | 44 | /***************************************************************************** 45 | * Descriptor 0x11: STD descriptor 46 | *****************************************************************************/ 47 | #define DESC11_HEADER_SIZE (DESC_HEADER_SIZE + 1) 48 | 49 | static inline void desc11_init(uint8_t *p_desc) 50 | { 51 | desc_set_tag(p_desc, 0x11); 52 | desc_set_length(p_desc, DESC11_HEADER_SIZE - DESC_HEADER_SIZE); 53 | } 54 | 55 | static inline void desc11_set_leak_valid_flag(uint8_t *p_desc, bool leak_valid_flag) 56 | { 57 | p_desc[2] = 0xfe | leak_valid_flag; 58 | } 59 | 60 | static inline bool desc11_get_leak_valid_flag(const uint8_t *p_desc) 61 | { 62 | return (p_desc[2] & 0x01) == 0x01; 63 | } 64 | 65 | static inline bool desc11_validate(const uint8_t *p_desc) 66 | { 67 | return desc_get_length(p_desc) >= DESC11_HEADER_SIZE - DESC_HEADER_SIZE; 68 | } 69 | 70 | static inline void desc11_print(const uint8_t *p_desc, f_print pf_print, 71 | void *opaque, print_type_t i_print_type) 72 | { 73 | switch (i_print_type) { 74 | case PRINT_XML: 75 | pf_print(opaque, "", 76 | desc11_get_leak_valid_flag(p_desc)); 77 | break; 78 | default: 79 | pf_print(opaque, " - desc 11 std leak_valid_flag=%u", 80 | desc11_get_leak_valid_flag(p_desc)); 81 | } 82 | } 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /mpeg/psi/desc_13.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * desc_13.h: ETSI EN 300 468 Descriptor 0x13: Carousel identifier descriptor 3 | ***************************************************************************** 4 | * Copyright (C) 2022 EasyTools 5 | * 6 | * Authors: Arnaud de Turckheim 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ISO/IEC 13818-6:1998 31 | */ 32 | 33 | #ifndef __BITSTREAM_MPEG_DESC_13_H__ 34 | #define __BITSTREAM_MPEG_DESC_13_H__ 35 | 36 | #include 37 | 38 | #include 39 | #include 40 | 41 | #ifdef __cplusplus 42 | extern "C" 43 | { 44 | #endif 45 | 46 | /***************************************************************************** 47 | * Descriptor 0x13: Carousel identifier 48 | *****************************************************************************/ 49 | #define DESC13_HEADER_SIZE (DESC_HEADER_SIZE + 4) 50 | 51 | static inline void desc13_init(uint8_t *p_desc) 52 | { 53 | desc_set_tag(p_desc, 0x13); 54 | desc_set_length(p_desc, (DESC13_HEADER_SIZE - DESC_HEADER_SIZE)); 55 | } 56 | 57 | static inline bool desc13_validate(const uint8_t *p_desc) 58 | { 59 | uint8_t desc_length = desc_get_length(p_desc); 60 | uint8_t size = DESC13_HEADER_SIZE - DESC_HEADER_SIZE; 61 | return size <= desc_length; 62 | } 63 | 64 | BITSTREAM_GET_SET(desc13, id, uint8, 16, 32); 65 | 66 | static inline void desc13_print(const uint8_t *p_desc, f_print pf_print, 67 | void *opaque, print_type_t i_print_type) 68 | { 69 | switch (i_print_type) { 70 | case PRINT_XML: 71 | pf_print(opaque, 72 | "", 73 | desc13_get_id(p_desc)); 74 | break; 75 | 76 | default: 77 | pf_print(opaque, 78 | " - desc 13 carousel_identifier id=%u", 79 | desc13_get_id(p_desc)); 80 | } 81 | } 82 | 83 | #ifdef __cplusplus 84 | } 85 | #endif 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /mpeg/psi/desc_1c.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * desc_1c.h: ISO/IEC 13818-1 Descriptor 0x1c (MPEG-4 audio descriptor) 3 | ***************************************************************************** 4 | * Copyright (C) 2011 Unix Solutions Ltd. 5 | * 6 | * Authors: Georgi Chorbadzhiyski 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ISO/IEC 13818-1:2007(E) (MPEG-2 Systems) 31 | */ 32 | 33 | #ifndef __BITSTREAM_MPEG_DESC_1C_H__ 34 | #define __BITSTREAM_MPEG_DESC_1C_H__ 35 | 36 | #include 37 | #include 38 | #include 39 | 40 | #ifdef __cplusplus 41 | extern "C" 42 | { 43 | #endif 44 | 45 | /***************************************************************************** 46 | * Descriptor 0x1c (MPEG-4 audio descriptor) 47 | *****************************************************************************/ 48 | #define DESC1C_HEADER_SIZE (DESC_HEADER_SIZE + 1) 49 | 50 | static inline void desc1c_init(uint8_t *p_desc) 51 | { 52 | desc_set_tag(p_desc, 0x1c); 53 | desc_set_length(p_desc, DESC1C_HEADER_SIZE - DESC_HEADER_SIZE); 54 | } 55 | 56 | #define desc1c_validate desc1b_validate 57 | #define desc1c_get_mpeg4_audio_profile_and_level desc1b_get_mpeg4_visual_profile_and_level 58 | #define desc1c_set_mpeg4_audio_profile_and_level desc1b_set_mpeg4_visual_profile_and_level 59 | 60 | static inline void desc1c_print(const uint8_t *p_desc, f_print pf_print, 61 | void *opaque, print_type_t i_print_type) 62 | { 63 | switch (i_print_type) { 64 | case PRINT_XML: 65 | pf_print(opaque, "", 66 | desc1c_get_mpeg4_audio_profile_and_level(p_desc)); 67 | break; 68 | default: 69 | pf_print(opaque," - desc 1c mpeg4_audio audio_profile_and_level=0x%02x", 70 | desc1c_get_mpeg4_audio_profile_and_level(p_desc)); 71 | } 72 | } 73 | 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /mpeg/psi/desc_1e.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * desc_1e.h: ISO/IEC 13818-1 Descriptor 0x1e (SL descriptor) 3 | ***************************************************************************** 4 | * Copyright (C) 2011 Unix Solutions Ltd. 5 | * 6 | * Authors: Georgi Chorbadzhiyski 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ISO/IEC 13818-1:2007(E) (MPEG-2 Systems) 31 | */ 32 | 33 | #ifndef __BITSTREAM_MPEG_DESC_1e_H__ 34 | #define __BITSTREAM_MPEG_DESC_1e_H__ 35 | 36 | #include 37 | #include 38 | 39 | #ifdef __cplusplus 40 | extern "C" 41 | { 42 | #endif 43 | 44 | /***************************************************************************** 45 | * Descriptor 0x1e (SL descriptor) 46 | *****************************************************************************/ 47 | #define DESC1E_HEADER_SIZE (DESC_HEADER_SIZE + 2) 48 | 49 | static inline void desc1e_init(uint8_t *p_desc) 50 | { 51 | desc_set_tag(p_desc, 0x1e); 52 | desc_set_length(p_desc, DESC1E_HEADER_SIZE - DESC_HEADER_SIZE); 53 | } 54 | 55 | static inline bool desc1e_validate(const uint8_t *p_desc) 56 | { 57 | return desc_get_length(p_desc) >= DESC1E_HEADER_SIZE - DESC_HEADER_SIZE; 58 | } 59 | 60 | static inline uint16_t desc1e_get_es_id(const uint8_t *p_desc) { 61 | return (p_desc[2] << 8) | p_desc[3]; 62 | } 63 | 64 | static inline void desc1e_set_es_id(uint8_t *p_desc, uint16_t i_es_id) { 65 | p_desc[2] = (i_es_id >> 8) & 0xff; 66 | p_desc[3] = i_es_id & 0xff; 67 | } 68 | 69 | static inline void desc1e_print(const uint8_t *p_desc, f_print pf_print, 70 | void *opaque, print_type_t i_print_type) 71 | { 72 | switch (i_print_type) { 73 | case PRINT_XML: 74 | pf_print(opaque, "", 75 | desc1e_get_es_id(p_desc)); 76 | break; 77 | default: 78 | pf_print(opaque," - desc 1e sl es_id=0x%04x", 79 | desc1e_get_es_id(p_desc)); 80 | } 81 | } 82 | 83 | #ifdef __cplusplus 84 | } 85 | #endif 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /mpeg/psi/desc_20.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * desc_20.h: ISO/IEC 13818-1 Descriptor 0x20 (External ES_ID descriptor) 3 | ***************************************************************************** 4 | * Copyright (C) 2011 Unix Solutions Ltd. 5 | * 6 | * Authors: Georgi Chorbadzhiyski 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - ISO/IEC 13818-1:2007(E) (MPEG-2 Systems) 31 | */ 32 | 33 | #ifndef __BITSTREAM_MPEG_DESC_20_H__ 34 | #define __BITSTREAM_MPEG_DESC_20_H__ 35 | 36 | #include 37 | #include 38 | #include 39 | 40 | #ifdef __cplusplus 41 | extern "C" 42 | { 43 | #endif 44 | 45 | /***************************************************************************** 46 | * Descriptor 0x20 (External ES_ID descriptor) 47 | *****************************************************************************/ 48 | #define DESC20_HEADER_SIZE (DESC_HEADER_SIZE + 2) 49 | 50 | static inline void desc20_init(uint8_t *p_desc) 51 | { 52 | desc_set_tag(p_desc, 0x20); 53 | desc_set_length(p_desc, DESC20_HEADER_SIZE - DESC_HEADER_SIZE); 54 | } 55 | 56 | #define desc20_validate desc1e_validate 57 | #define desc20_get_external_es_id desc1e_get_es_id 58 | #define desc20_set_external_es_id desc1e_set_es_id 59 | 60 | static inline void desc20_print(const uint8_t *p_desc, f_print pf_print, 61 | void *opaque, print_type_t i_print_type) 62 | { 63 | switch (i_print_type) { 64 | case PRINT_XML: 65 | pf_print(opaque, "", 66 | desc20_get_external_es_id(p_desc)); 67 | break; 68 | default: 69 | pf_print(opaque," - desc 20 external_es_id external_es_id=0x%04x", 70 | desc20_get_external_es_id(p_desc)); 71 | } 72 | } 73 | 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /mpeg/psi/tsdt_print.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * tsdt_print.h: ISO/IEC 13818-1 Transport stream descriptor table (printing) 3 | ***************************************************************************** 4 | * Copyright (C) 2011 Unix Solutions Ltd. 5 | * 6 | * Authors: Georgi Chorbadzhiyski 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | #ifndef __BITSTREAM_MPEG_TSDT_PRINT_H__ 29 | #define __BITSTREAM_MPEG_TSDT_PRINT_H__ 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" 39 | { 40 | #endif 41 | 42 | #define tsdt_table_print cat_table_print 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /mpeg/psi_print.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * psi_print.h: ISO/IEC 13818-1 Program Stream Information (printing) 3 | ***************************************************************************** 4 | * Copyright (C) 2010 VideoLAN 5 | * 6 | * Authors: Christophe Massiot 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | #ifndef __BITSTREAM_MPEG_PSI_PRINT_H__ 29 | #define __BITSTREAM_MPEG_PSI_PRINT_H__ 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /smpte/2010.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * 2010.h: SMPTE 2010 VANC mapping of SCTE 104 3 | ***************************************************************************** 4 | * Copyright (C) 2016 OpenHeadend 5 | * 6 | * Authors: Christophe Massiot 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files (the 10 | * "Software"), to deal in the Software without restriction, including 11 | * without limitation the rights to use, copy, modify, merge, publish, 12 | * distribute, sublicense, and/or sell copies of the Software, and to 13 | * permit persons to whom the Software is furnished to do so, subject 14 | * to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | *****************************************************************************/ 27 | 28 | /* 29 | * Normative references: 30 | * - SMPTE 2010 31 | */ 32 | 33 | #ifndef __BITSTREAM_SMPTE_2010_H__ 34 | #define __BITSTREAM_SMPTE_2010_H__ 35 | 36 | #include /* uint8_t, uint16_t, etc... */ 37 | #include /* bool */ 38 | 39 | #ifdef __cplusplus 40 | extern "C" 41 | { 42 | #endif 43 | 44 | /***************************************************************************** 45 | * SMPTE 2010 ancillary data 46 | *****************************************************************************/ 47 | #define S2010_HEADER_SIZE 1 48 | 49 | #define S2010_VERSION 1 50 | 51 | static inline uint8_t s2010_get_version(const uint16_t *p_s2010) 52 | { 53 | return (p_s2010[0] & 0x18) >> 3; 54 | } 55 | 56 | static inline bool s2010_get_continued(const uint16_t *p_s2010) 57 | { 58 | return p_s2010[0] & 0x04; 59 | } 60 | 61 | static inline bool s2010_get_following(const uint16_t *p_s2010) 62 | { 63 | return p_s2010[0] & 0x02; 64 | } 65 | 66 | static inline bool s2010_get_duplicate(const uint16_t *p_s2010) 67 | { 68 | return p_s2010[0] & 0x01; 69 | } 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /smpte/334.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * 334.h: Vertical Ancillary Data Mapping of Caption Data and Other Related Data / 3 | Caption Distribution Packet (CDP) Definition 4 | ***************************************************************************** 5 | * Copyright (C) 2021 Open Broadcast Systems Ltd 6 | * 7 | * Authors: Kieran Kunhya 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining 10 | * a copy of this software and associated documentation files (the 11 | * "Software"), to deal in the Software without restriction, including 12 | * without limitation the rights to use, copy, modify, merge, publish, 13 | * distribute, sublicense, and/or sell copies of the Software, and to 14 | * permit persons to whom the Software is furnished to do so, subject 15 | * to the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be 18 | * included in all copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | *****************************************************************************/ 28 | 29 | /* 30 | * Normative references: 31 | * - SMPTE 334 32 | */ 33 | 34 | #ifndef __BITSTREAM_SMPTE_334_H__ 35 | #define __BITSTREAM_SMPTE_334_H__ 36 | 37 | #include /* uint8_t, uint16_t, etc... */ 38 | #include /* bool */ 39 | 40 | #ifdef __cplusplus 41 | extern "C" 42 | { 43 | #endif 44 | 45 | #define S334_CDP_IDENTIFIER 0x9669 46 | #define S334_CDP_HEADER_LEN 7 47 | #define S334_CDP_CCDATA_HEADER_LEN 2 48 | #define S334_CDP_CCDATA_ID 0x72 49 | #define S334_CDP_TIMECODE_LEN 5 50 | #define S334_CDP_FOOTER_LEN 4 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | --------------------------------------------------------------------------------