1package format 2 3//nolint:revive 4const ( 5 ALL = "all" 6 7 PROBE = "probe" 8 IMAGE = "image" 9 TCP_STREAM = "tcp_stream" 10 UDP_PAYLOAD = "udp_payload" 11 12 RAW = "raw" 13 JSON = "json" 14 15 DNS = "dns" 16 DNS_TCP = "dns_tcp" 17 ETHER8023_FRAME = "ether8023_frame" 18 SLL_PACKET = "sll_packet" 19 SLL2_PACKET = "sll2_packet" 20 IPV4_PACKET = "ipv4_packet" 21 UDP_DATAGRAM = "udp_datagram" 22 TCP_SEGMENT = "tcp_segment" 23 ICMP = "icmp" 24 25 AAC_FRAME = "aac_frame" 26 ADTS = "adts" 27 ADTS_FRAME = "adts_frame" 28 APEV2 = "apev2" 29 AV1_CCR = "av1_ccr" 30 AV1_FRAME = "av1_frame" 31 AV1_OBU = "av1_obu" 32 BZIP2 = "bzip2" 33 ELF = "elf" 34 EXIF = "exif" 35 FLAC = "flac" 36 FLAC_FRAME = "flac_frame" 37 FLAC_METADATABLOCK = "flac_metadatablock" 38 FLAC_METADATABLOCKS = "flac_metadatablocks" 39 FLAC_STREAMINFO = "flac_streaminfo" 40 FLAC_PICTURE = "flac_picture" 41 FLV = "flv" // TODO: 42 GIF = "gif" 43 GZIP = "gzip" 44 ICC_PROFILE = "icc_profile" 45 ID3V1 = "id3v1" 46 ID3V11 = "id3v11" 47 ID3V2 = "id3v2" 48 JPEG = "jpeg" 49 MATROSKA = "matroska" 50 MP3 = "mp3" 51 MP3_FRAME = "mp3_frame" 52 XING = "xing" 53 MP4 = "mp4" 54 MPEG_ASC = "mpeg_asc" 55 AVC_ANNEXB = "avc_annexb" 56 AVC_DCR = "avc_dcr" 57 AVC_SPS = "avc_sps" 58 AVC_PPS = "avc_pps" 59 AVC_SEI = "avc_sei" 60 AVC_NALU = "avc_nalu" 61 AVC_AU = "avc_au" 62 HEVC_ANNEXB = "hevc_annexb" 63 HEVC_AU = "hevc_au" 64 HEVC_NALU = "hevc_nalu" 65 HEVC_DCR = "hevc_dcr" 66 MPEG_ES = "mpeg_es" 67 MPEG_PES = "mpeg_pes" 68 MPEG_PES_PACKET = "mpeg_pes_packet" 69 MPEG_SPU = "mpeg_spu" 70 MPEG_TS = "mpeg_ts" 71 OGG = "ogg" 72 OGG_PAGE = "ogg_page" 73 OPUS_PACKET = "opus_packet" 74 PCAP = "pcap" 75 PCAPNG = "pcapng" 76 PNG = "png" 77 PROTOBUF = "protobuf" 78 PROTOBUF_WIDEVINE = "protobuf_widevine" 79 PSSH_PLAYREADY = "pssh_playready" 80 TAR = "tar" 81 TIFF = "tiff" 82 VORBIS_COMMENT = "vorbis_comment" 83 VORBIS_PACKET = "vorbis_packet" 84 VP8_FRAME = "vp8_frame" 85 VP9_FRAME = "vp9_frame" 86 VP9_CFM = "vp9_cfm" 87 VPX_CCR = "vpx_ccr" 88 WAV = "wav" 89 WEBP = "webp" 90 ZIP = "zip" 91) 92 93// below are data types used to communicate between formats <FormatName>In/Out 94 95type FlacStreamInfo struct { 96 SampleRate uint64 97 BitPerSample uint64 98 TotalSamplesInStream uint64 99 MD5 []byte 100} 101 102type FlacStreaminfoOut struct { 103 StreamInfo FlacStreamInfo 104} 105 106type FlacMetadatablockStreamInfo struct { 107 SampleRate uint64 108 BitPerSample uint64 109 TotalSamplesInStream uint64 110} 111 112type FlacMetadatablockOut struct { 113 IsLastBlock bool 114 HasStreamInfo bool 115 StreamInfo FlacStreamInfo 116} 117 118type FlacMetadatablocksOut struct { 119 HasStreamInfo bool 120 StreamInfo FlacStreamInfo 121} 122 123type FlacFrameIn struct { 124 SamplesBuf []byte 125 StreamInfo FlacStreamInfo 126} 127 128type FlacFrameOut struct { 129 SamplesBuf []byte 130 Samples uint64 131 Channels int 132 BitsPerSample int 133} 134 135type OggPageOut struct { 136 IsLastPage bool 137 IsFirstPage bool 138 IsContinuedPacket bool 139 StreamSerialNumber uint32 140 SequenceNo uint32 141 Segments [][]byte 142} 143 144type AvcIn struct { 145 LengthSize uint64 146} 147 148type AvcDcrOut struct { 149 LengthSize uint64 150} 151 152type HevcIn struct { 153 LengthSize uint64 154} 155 156type HevcDcrOut struct { 157 LengthSize uint64 158} 159 160type ProtoBufIn struct { 161 Message ProtoBufMessage 162} 163 164type MpegDecoderConfig struct { 165 ObjectType int 166 ASCObjectType int 167} 168 169type MpegEsOut struct { 170 DecoderConfigs []MpegDecoderConfig 171} 172 173type MPEGASCOut struct { 174 ObjectType int 175} 176 177type AACFrameIn struct { 178 ObjectType int 179} 180 181type MP3FrameOut struct { 182 MPEGVersion int 183 ProtectionAbsent bool 184 BitRate int 185 SampleRate int 186 ChannelsIndex int 187 ChannelModeIndex int 188} 189 190type UDPDatagramIn struct { 191 SourcePort int 192 DestinationPort int 193} 194 195type TCPStreamIn struct { 196 SourcePort int 197 DestinationPort int 198} 199