From 025d9f14e30176dd98a6967f05b4435c37845ebb Mon Sep 17 00:00:00 2001 From: lujiale Date: Tue, 28 Feb 2023 17:08:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=81=E5=89=AA=E5=B7=A5=E7=A8=8B=EF=BC=8C?= =?UTF-8?q?=E4=BB=85=E4=BD=9C=E4=B8=BAGUI=E5=B7=A5=E7=A8=8B=E6=A1=88?= =?UTF-8?q?=E4=BE=8B=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 - build.sh | 2 - config/build.host.version | 5 - config/build.rv11xx.version | 5 - configs/host_unittest_defconfig | 30 - configs/rv11xx_unittest_defconfig | 30 - project/3rdparty/include/bindings/binding.hpp | 215 - .../include/bindings/binding_evaluator.hpp | 72 - .../include/bindings/genindex_array.hpp | 170 - .../3rdparty/include/bindings/make_node.hpp | 73 - project/3rdparty/include/bindings/node.hpp | 265 - .../include/bindings/node_functions.hpp | 102 - .../include/bindings/node_operators.hpp | 101 - .../3rdparty/include/bindings/property.hpp | 220 - .../include/bindings/property_updater.hpp | 37 - project/3rdparty/include/bindings/signal.hpp | 411 - project/3rdparty/include/bindings/utils.hpp | 129 - .../3rdparty/include/cmdline/commandLine.hpp | 467 - project/3rdparty/include/hope/application.hpp | 33 - .../3rdparty/include/hope/atomicwrapper.hpp | 45 - project/3rdparty/include/hope/connection.hpp | 32 - project/3rdparty/include/hope/event.hpp | 8 - project/3rdparty/include/hope/eventloop.hpp | 64 - project/3rdparty/include/hope/hope.hpp | 16 - .../3rdparty/include/hope/indexsequence.hpp | 25 - project/3rdparty/include/hope/object.hpp | 35 - project/3rdparty/include/hope/objectdata.hpp | 92 - .../3rdparty/include/hope/objectinvoker.hpp | 17 - project/3rdparty/include/hope/optional.hpp | 91 - .../include/hope/queuedinvokationevent.hpp | 141 - project/3rdparty/include/hope/signal.hpp | 195 - project/3rdparty/include/hope/thread.hpp | 41 - project/3rdparty/include/hope/threaddata.hpp | 88 - project/3rdparty/include/hope/timer.hpp | 29 - .../3rdparty/include/libdrm/{drm => }/drm.h | 4 +- project/3rdparty/include/libdrm/drm/amdgpu.h | 287 - .../3rdparty/include/libdrm/drm/amdgpu_drm.h | 796 - .../3rdparty/include/libdrm/drm/etnaviv_drm.h | 215 - .../include/libdrm/drm/etnaviv_drmif.h | 160 - .../3rdparty/include/libdrm/drm/exynos_drm.h | 101 - .../include/libdrm/drm/exynos_drmif.h | 56 - .../include/libdrm/drm/exynos_fimg2d.h | 249 - .../3rdparty/include/libdrm/drm/nouveau_drm.h | 221 - .../3rdparty/include/libdrm/drm/omap_drm.h | 90 - .../3rdparty/include/libdrm/drm/omap_drmif.h | 34 - .../include/libdrm/drm/rockchip_drm.h | 65 - .../include/libdrm/drm/rockchip_drmif.h | 38 - .../3rdparty/include/libdrm/drm/tegra_drm.h | 300 - .../3rdparty/include/libdrm/drm/tegra_drmif.h | 87 - .../include/libdrm/{drm => }/drm_fourcc.h | 0 .../include/libdrm/{drm => }/drm_mode.h | 4 +- project/3rdparty/include/libdrm/libdrm.h | 15 - .../3rdparty/include/libdrm/libdrm_lists.h | 6 +- .../3rdparty/include/libdrm/libdrm_macros.h | 2 +- project/3rdparty/include/libdrm/libsync.h | 4 +- project/3rdparty/include/libdrm/util/buffer.h | 19 - project/3rdparty/include/libdrm/util/common.h | 8 - project/3rdparty/include/libdrm/util/cursor.h | 18 - project/3rdparty/include/libdrm/util/format.h | 50 - project/3rdparty/include/libdrm/util/kms.h | 17 - .../3rdparty/include/libdrm/util/pattern.h | 26 - .../include/libdrm/util_double_list.h | 4 +- project/3rdparty/include/libdrm/util_math.h | 4 +- project/3rdparty/include/libdrm/xf86drm.h | 6 +- project/3rdparty/include/libdrm/xf86drmMode.h | 8 +- .../include/libv4l/get_media_devices.h | 53 - .../3rdparty/include/libv4l/libv4l-plugin.h | 26 - .../include/libv4l/libv4l1-videodev.h | 188 - project/3rdparty/include/libv4l/libv4l1.h | 37 - project/3rdparty/include/libv4l/libv4l2.h | 44 - project/3rdparty/include/libv4l/libv4l2rds.h | 220 - project/3rdparty/include/libv4l/libv4l2util.h | 23 - .../3rdparty/include/libv4l/libv4lconvert.h | 65 - .../include/libv4l/media-bus-format.h | 126 - project/3rdparty/include/libv4l/media.h | 275 - .../include/libv4l/mediactl-private.h | 68 - project/3rdparty/include/libv4l/mediactl.h | 80 - project/3rdparty/include/libv4l/v4l2-common.h | 42 - .../3rdparty/include/libv4l/v4l2-controls.h | 2003 -- .../3rdparty/include/libv4l/v4l2-mediabus.h | 118 - project/3rdparty/include/libv4l/v4l2-subdev.h | 150 - project/3rdparty/include/libv4l/v4l2_driver.h | 67 - project/3rdparty/include/libv4l/v4l2subdev.h | 49 - project/3rdparty/include/libv4l/videodev2.h | 1789 -- .../BasicUsageEnvironment/BasicHashTable.hh | 104 - .../BasicUsageEnvironment.hh | 86 - .../BasicUsageEnvironment0.hh | 115 - .../BasicUsageEnvironment_version.hh | 25 - .../BasicUsageEnvironment/DelayQueue.hh | 181 - .../BasicUsageEnvironment/HandlerSet.hh | 77 - .../live555/UsageEnvironment/Boolean.hh | 37 - .../live555/UsageEnvironment/HashTable.hh | 76 - .../UsageEnvironment/UsageEnvironment.hh | 172 - .../UsageEnvironment_version.hh | 25 - .../live555/UsageEnvironment/strDup.hh | 37 - .../include/live555/groupsock/GroupEId.hh | 64 - .../include/live555/groupsock/Groupsock.hh | 201 - .../live555/groupsock/GroupsockHelper.hh | 162 - .../include/live555/groupsock/IOHandlers.hh | 31 - .../include/live555/groupsock/NetAddress.hh | 209 - .../include/live555/groupsock/NetCommon.h | 126 - .../include/live555/groupsock/NetInterface.hh | 109 - .../live555/groupsock/groupsock_version.hh | 25 - .../AC3AudioFileServerMediaSubsession.hh | 48 - .../live555/liveMedia/AC3AudioRTPSink.hh | 57 - .../live555/liveMedia/AC3AudioRTPSource.hh | 51 - .../live555/liveMedia/AC3AudioStreamFramer.hh | 70 - .../ADTSAudioFileServerMediaSubsession.hh | 48 - .../live555/liveMedia/ADTSAudioFileSource.hh | 56 - .../ADTSAudioStreamDiscreteFramer.hh | 61 - .../AMRAudioFileServerMediaSubsession.hh | 48 - .../live555/liveMedia/AMRAudioFileSink.hh | 51 - .../live555/liveMedia/AMRAudioFileSource.hh | 48 - .../live555/liveMedia/AMRAudioRTPSink.hh | 65 - .../live555/liveMedia/AMRAudioRTPSource.hh | 53 - .../live555/liveMedia/AMRAudioSource.hh | 52 - .../include/live555/liveMedia/AVIFileSink.hh | 115 - .../live555/liveMedia/AudioInputDevice.hh | 71 - .../include/live555/liveMedia/AudioRTPSink.hh | 42 - .../include/live555/liveMedia/Base64.hh | 43 - .../include/live555/liveMedia/BasicUDPSink.hh | 62 - .../live555/liveMedia/BasicUDPSource.hh | 56 - .../include/live555/liveMedia/BitVector.hh | 67 - .../live555/liveMedia/ByteStreamFileSource.hh | 82 - .../liveMedia/ByteStreamMemoryBufferSource.hh | 70 - .../liveMedia/ByteStreamMultiFileSource.hh | 69 - .../DVVideoFileServerMediaSubsession.hh | 51 - .../live555/liveMedia/DVVideoRTPSink.hh | 57 - .../live555/liveMedia/DVVideoRTPSource.hh | 51 - .../live555/liveMedia/DVVideoStreamFramer.hh | 72 - .../include/live555/liveMedia/DeviceSource.hh | 66 - .../live555/liveMedia/DigestAuthentication.hh | 75 - .../liveMedia/FileServerMediaSubsession.hh | 43 - .../include/live555/liveMedia/FileSink.hh | 71 - .../live555/liveMedia/FramedFileSource.hh | 37 - .../include/live555/liveMedia/FramedFilter.hh | 52 - .../include/live555/liveMedia/FramedSource.hh | 95 - .../live555/liveMedia/GSMAudioRTPSink.hh | 44 - .../live555/liveMedia/GenericMediaServer.hh | 224 - .../live555/liveMedia/H261VideoRTPSource.hh | 56 - .../H263plusVideoFileServerMediaSubsession.hh | 48 - .../live555/liveMedia/H263plusVideoRTPSink.hh | 54 - .../liveMedia/H263plusVideoRTPSource.hh | 60 - .../liveMedia/H263plusVideoStreamFramer.hh | 64 - .../H264VideoFileServerMediaSubsession.hh | 61 - .../live555/liveMedia/H264VideoFileSink.hh | 47 - .../live555/liveMedia/H264VideoRTPSink.hh | 59 - .../live555/liveMedia/H264VideoRTPSource.hh | 70 - .../H264VideoStreamDiscreteFramer.hh | 48 - .../liveMedia/H264VideoStreamFramer.hh | 45 - .../live555/liveMedia/H264or5VideoFileSink.hh | 46 - .../live555/liveMedia/H264or5VideoRTPSink.hh | 60 - .../H264or5VideoStreamDiscreteFramer.hh | 56 - .../liveMedia/H264or5VideoStreamFramer.hh | 92 - .../H265VideoFileServerMediaSubsession.hh | 61 - .../live555/liveMedia/H265VideoFileSink.hh | 51 - .../live555/liveMedia/H265VideoRTPSink.hh | 62 - .../live555/liveMedia/H265VideoRTPSource.hh | 67 - .../H265VideoStreamDiscreteFramer.hh | 48 - .../liveMedia/H265VideoStreamFramer.hh | 45 - .../include/live555/liveMedia/HLSSegmenter.hh | 76 - .../include/live555/liveMedia/HMAC_SHA1.hh | 36 - .../include/live555/liveMedia/HMAC_hash.hh | 37 - .../include/live555/liveMedia/InputFile.hh | 67 - .../live555/liveMedia/JPEG2000VideoRTPSink.hh | 46 - .../liveMedia/JPEG2000VideoRTPSource.hh | 53 - .../live555/liveMedia/JPEGVideoRTPSink.hh | 52 - .../live555/liveMedia/JPEGVideoRTPSource.hh | 59 - .../live555/liveMedia/JPEGVideoSource.hh | 55 - .../include/live555/liveMedia/Locale.hh | 75 - .../include/live555/liveMedia/MIKEY.hh | 75 - .../include/live555/liveMedia/MP3ADU.hh | 94 - .../live555/liveMedia/MP3ADURTPSink.hh | 55 - .../live555/liveMedia/MP3ADURTPSource.hh | 49 - .../live555/liveMedia/MP3ADUTranscoder.hh | 64 - .../live555/liveMedia/MP3ADUinterleaving.hh | 129 - .../MP3AudioFileServerMediaSubsession.hh | 73 - .../live555/liveMedia/MP3FileSource.hh | 71 - .../live555/liveMedia/MP3Transcoder.hh | 44 - .../live555/liveMedia/MPEG1or2AudioRTPSink.hh | 48 - .../liveMedia/MPEG1or2AudioRTPSource.hh | 51 - .../liveMedia/MPEG1or2AudioStreamFramer.hh | 70 - .../live555/liveMedia/MPEG1or2Demux.hh | 158 - .../MPEG1or2DemuxedElementaryStream.hh | 69 - .../MPEG1or2DemuxedServerMediaSubsession.hh | 63 - .../liveMedia/MPEG1or2FileServerDemux.hh | 70 - .../MPEG1or2VideoFileServerMediaSubsession.hh | 59 - .../live555/liveMedia/MPEG1or2VideoRTPSink.hh | 69 - .../liveMedia/MPEG1or2VideoRTPSource.hh | 53 - .../MPEG1or2VideoStreamDiscreteFramer.hh | 76 - .../liveMedia/MPEG1or2VideoStreamFramer.hh | 56 - .../MPEG2IndexFromTransportStream.hh | 95 - ...MPEG2TransportFileServerMediaSubsession.hh | 131 - .../MPEG2TransportStreamAccumulator.hh | 60 - .../liveMedia/MPEG2TransportStreamDemux.hh | 50 - .../liveMedia/MPEG2TransportStreamFramer.hh | 78 - .../MPEG2TransportStreamFromESSource.hh | 66 - .../MPEG2TransportStreamFromPESSource.hh | 62 - .../MPEG2TransportStreamIndexFile.hh | 96 - .../MPEG2TransportStreamMultiplexor.hh | 120 - .../MPEG2TransportStreamTrickModeFilter.hh | 99 - .../MPEG2TransportUDPServerMediaSubsession.hh | 55 - .../live555/liveMedia/MPEG4ESVideoRTPSink.hh | 72 - .../liveMedia/MPEG4ESVideoRTPSource.hh | 51 - .../live555/liveMedia/MPEG4GenericRTPSink.hh | 70 - .../liveMedia/MPEG4GenericRTPSource.hh | 78 - .../liveMedia/MPEG4LATMAudioRTPSink.hh | 69 - .../liveMedia/MPEG4LATMAudioRTPSource.hh | 101 - .../MPEG4VideoFileServerMediaSubsession.hh | 61 - .../MPEG4VideoStreamDiscreteFramer.hh | 73 - .../liveMedia/MPEG4VideoStreamFramer.hh | 75 - .../liveMedia/MPEGVideoStreamFramer.hh | 85 - .../include/live555/liveMedia/MatroskaFile.hh | 218 - .../liveMedia/MatroskaFileServerDemux.hh | 88 - .../include/live555/liveMedia/Media.hh | 137 - .../include/live555/liveMedia/MediaSession.hh | 370 - .../include/live555/liveMedia/MediaSink.hh | 135 - .../include/live555/liveMedia/MediaSource.hh | 59 - .../liveMedia/MediaTranscodingTable.hh | 66 - .../live555/liveMedia/MultiFramedRTPSink.hh | 140 - .../live555/liveMedia/MultiFramedRTPSource.hh | 159 - .../include/live555/liveMedia/OggFile.hh | 179 - .../live555/liveMedia/OggFileServerDemux.hh | 85 - .../include/live555/liveMedia/OggFileSink.hh | 79 - .../OnDemandServerMediaSubsession.hh | 233 - .../include/live555/liveMedia/OutputFile.hh | 31 - .../liveMedia/PassiveServerMediaSubsession.hh | 83 - .../liveMedia/ProxyServerMediaSession.hh | 238 - .../live555/liveMedia/QCELPAudioRTPSource.hh | 39 - .../live555/liveMedia/QuickTimeFileSink.hh | 192 - .../liveMedia/QuickTimeGenericRTPSource.hh | 68 - .../include/live555/liveMedia/RTCP.hh | 250 - .../include/live555/liveMedia/RTPInterface.hh | 115 - .../include/live555/liveMedia/RTPSink.hh | 250 - .../include/live555/liveMedia/RTPSource.hh | 272 - .../include/live555/liveMedia/RTSPClient.hh | 416 - .../include/live555/liveMedia/RTSPCommon.hh | 65 - .../live555/liveMedia/RTSPRegisterSender.hh | 138 - .../include/live555/liveMedia/RTSPServer.hh | 397 - .../liveMedia/RawVideoFrameParameters.hh | 37 - .../live555/liveMedia/RawVideoRTPSink.hh | 71 - .../live555/liveMedia/RawVideoRTPSource.hh | 60 - .../include/live555/liveMedia/SIPClient.hh | 150 - .../liveMedia/SRTPCryptographicContext.hh | 152 - .../live555/liveMedia/ServerMediaSession.hh | 200 - .../live555/liveMedia/SimpleRTPSink.hh | 76 - .../live555/liveMedia/SimpleRTPSource.hh | 65 - .../live555/liveMedia/StreamReplicator.hh | 84 - .../live555/liveMedia/T140TextRTPSink.hh | 103 - .../include/live555/liveMedia/TLSState.hh | 103 - .../include/live555/liveMedia/TextRTPSink.hh | 41 - .../live555/liveMedia/TheoraVideoRTPSink.hh | 72 - .../live555/liveMedia/TheoraVideoRTPSource.hh | 53 - .../live555/liveMedia/VP8VideoRTPSink.hh | 50 - .../live555/liveMedia/VP8VideoRTPSource.hh | 50 - .../live555/liveMedia/VP9VideoRTPSink.hh | 50 - .../live555/liveMedia/VP9VideoRTPSource.hh | 50 - .../include/live555/liveMedia/VideoRTPSink.hh | 41 - .../live555/liveMedia/VorbisAudioRTPSink.hh | 85 - .../live555/liveMedia/VorbisAudioRTPSource.hh | 66 - .../WAVAudioFileServerMediaSubsession.hh | 68 - .../live555/liveMedia/WAVAudioFileSource.hh | 86 - .../include/live555/liveMedia/liveMedia.hh | 137 - .../live555/liveMedia/liveMedia_version.hh | 25 - .../include/live555/liveMedia/ourMD5.hh | 38 - .../live555/liveMedia/uLawAudioFilter.hh | 208 - project/3rdparty/include/live555/readme.txt | 12 - .../3rdparty/include/media/drm_media_api.h | 158 - .../3rdparty/include/media/drm_media_buffer.h | 110 - .../3rdparty/include/media/drm_media_common.h | 118 - .../3rdparty/include/media/drm_media_rga.h | 59 - .../3rdparty/include/media/drm_media_vdec.h | 58 - .../3rdparty/include/media/drm_media_venc.h | 372 - project/3rdparty/include/media/drm_media_vi.h | 59 - .../3rdparty/include/media/drm_media_vmix.h | 83 - project/3rdparty/include/media/drm_media_vo.h | 42 - project/3rdparty/include/media/drm_media_vp.h | 46 - project/3rdparty/include/media/utils/buffer.h | 583 - project/3rdparty/include/media/utils/codec.h | 67 - .../3rdparty/include/media/utils/control.h | 103 - .../3rdparty/include/media/utils/decoder.h | 52 - .../3rdparty/include/media/utils/demuxer.h | 52 - .../3rdparty/include/media/utils/encoder.h | 149 - project/3rdparty/include/media/utils/filter.h | 47 - project/3rdparty/include/media/utils/flow.h | 383 - project/3rdparty/include/media/utils/image.h | 118 - .../3rdparty/include/media/utils/key_string.h | 231 - .../include/media/utils/link_config.h | 44 - project/3rdparty/include/media/utils/lock.h | 98 - .../include/media/utils/media_config.h | 219 - .../include/media/utils/media_reflector.h | 69 - .../3rdparty/include/media/utils/media_type.h | 116 - .../3rdparty/include/media/utils/message.h | 118 - .../include/media/utils/message_type.h | 40 - project/3rdparty/include/media/utils/muxer.h | 66 - .../3rdparty/include/media/utils/reflector.h | 252 - .../3rdparty/include/media/utils/rga_filter.h | 69 - project/3rdparty/include/media/utils/sound.h | 30 - project/3rdparty/include/media/utils/stream.h | 125 - project/3rdparty/include/media/utils/utils.h | 242 - project/3rdparty/include/nlohmann/fifomap.hpp | 334 - project/3rdparty/include/nlohmann/json.hpp | 24651 ---------------- .../3rdparty/include/nlohmann/json_fwd.hpp | 176 - .../include/rockchip/rkmpp/mpp_buffer.h | 327 - .../include/rockchip/rkmpp/mpp_compat.h | 62 - .../3rdparty/include/rockchip/rkmpp/mpp_err.h | 54 - .../include/rockchip/rkmpp/mpp_frame.h | 430 - .../3rdparty/include/rockchip/rkmpp/mpp_log.h | 99 - .../include/rockchip/rkmpp/mpp_log_def.h | 37 - .../include/rockchip/rkmpp/mpp_meta.h | 179 - .../include/rockchip/rkmpp/mpp_packet.h | 117 - .../include/rockchip/rkmpp/mpp_rc_api.h | 257 - .../include/rockchip/rkmpp/mpp_rc_defs.h | 212 - .../include/rockchip/rkmpp/mpp_task.h | 237 - .../include/rockchip/rkmpp/rk_hdr_meta_com.h | 118 - .../3rdparty/include/rockchip/rkmpp/rk_mpi.h | 274 - .../include/rockchip/rkmpp/rk_mpi_cmd.h | 209 - .../3rdparty/include/rockchip/rkmpp/rk_type.h | 142 - .../include/rockchip/rkmpp/rk_vdec_cfg.h | 50 - .../include/rockchip/rkmpp/rk_vdec_cmd.h | 69 - .../include/rockchip/rkmpp/rk_venc_cfg.h | 52 - .../include/rockchip/rkmpp/rk_venc_cmd.h | 1389 - .../include/rockchip/rkmpp/rk_venc_rc.h | 66 - .../include/rockchip/rkmpp/rk_venc_ref.h | 242 - .../rockchip/rkmpp/utils/camera_source.h | 46 - .../include/rockchip/rkmpp/utils/dictionary.h | 173 - .../include/rockchip/rkmpp/utils/iniparser.h | 358 - .../rockchip/rkmpp/utils/mpi_dec_utils.h | 89 - .../rockchip/rkmpp/utils/mpi_enc_utils.h | 109 - .../rockchip/rkmpp/utils/mpp_enc_roi_utils.h | 47 - .../include/rockchip/rkmpp/utils/mpp_opt.h | 54 - .../include/rockchip/rkmpp/utils/utils.h | 97 - project/3rdparty/include/rockchip/rkmpp/vpu.h | 123 - .../3rdparty/include/rockchip/rkmpp/vpu_api.h | 504 - .../include/rockchip/rkrga/NormalRga.h | 127 - .../include/rockchip/rkrga/NormalRgaContext.h | 14 - .../3rdparty/include/rockchip/rkrga/RgaApi.h | 60 - .../include/rockchip/rkrga/RgaMutex.h | 163 - .../include/rockchip/rkrga/RgaSingleton.h | 52 - .../include/rockchip/rkrga/RgaUtils.h | 10 - .../include/rockchip/rkrga/RockchipRga.h | 72 - .../3rdparty/include/rockchip/rkrga/drmrga.h | 145 - .../3rdparty/include/rockchip/rkrga/im2d.h | 665 - project/3rdparty/include/rockchip/rkrga/rga.h | 377 - .../3rdparty/include/rockchip/rkrga/rgadbg.h | 24 - .../3rdparty/include/rockchip/rkrga/version.h | 17 - .../include/rockchip/rkrgax/NormalRga.h | 116 - .../rockchip/rkrgax/NormalRgaContext.h | 24 - .../3rdparty/include/rockchip/rkrgax/RgaApi.h | 61 - .../include/rockchip/rkrgax/RgaMutex.h | 162 - .../include/rockchip/rkrgax/RgaSingleton.h | 52 - .../include/rockchip/rkrgax/RgaUtils.h | 15 - .../include/rockchip/rkrgax/RockchipRga.h | 76 - .../include/rockchip/rkrgax/drm_utils.h | 10 - .../3rdparty/include/rockchip/rkrgax/drmrga.h | 251 - .../3rdparty/include/rockchip/rkrgax/im2d.h | 14 - .../3rdparty/include/rockchip/rkrgax/im2d.hpp | 7 - .../include/rockchip/rkrgax/im2d_buffer.h | 105 - .../include/rockchip/rkrgax/im2d_common.h | 80 - .../include/rockchip/rkrgax/im2d_expand.h | 8 - .../include/rockchip/rkrgax/im2d_hardware.h | 299 - .../include/rockchip/rkrgax/im2d_impl.h | 89 - .../include/rockchip/rkrgax/im2d_log.h | 50 - .../include/rockchip/rkrgax/im2d_mpi.h | 15 - .../include/rockchip/rkrgax/im2d_single.h | 356 - .../include/rockchip/rkrgax/im2d_task.h | 43 - .../include/rockchip/rkrgax/im2d_type.h | 356 - .../include/rockchip/rkrgax/im2d_version.h | 20 - .../3rdparty/include/rockchip/rkrgax/rga.h | 101 - .../include/rockchip/rkrgax/rga2_driver.h | 129 - .../include/rockchip/rkrgax/rga_ioctl.h | 360 - .../include/rockchip/rkrgax/rga_sync.h | 9 - .../3rdparty/include/rockchip/rkrgax/rgadbg.h | 24 - .../3rdparty/include/rockchip/rkrgax/utils.h | 13 - .../include/rtsp/internal/AC3RTPSource.h | 17 - .../3rdparty/include/rtsp/internal/Base64.hh | 9 - .../include/rtsp/internal/BasicHashTable.hh | 74 - .../include/rtsp/internal/BitVector.hh | 47 - .../include/rtsp/internal/ClientSocket.h | 34 - .../rtsp/internal/DigestAuthentication.hh | 53 - .../3rdparty/include/rtsp/internal/Event.h | 22 - .../include/rtsp/internal/H264RTPSource.h | 20 - .../include/rtsp/internal/H265RTPSource.h | 17 - .../include/rtsp/internal/HashTable.hh | 42 - .../include/rtsp/internal/JPEGRTPSource.h | 22 - project/3rdparty/include/rtsp/internal/List.h | 257 - .../rtsp/internal/LiveServerMediaSession.h | 20 - .../include/rtsp/internal/MPEG4ESRTPSource.h | 21 - .../rtsp/internal/MPEG4GenericRTPSource.h | 24 - .../include/rtsp/internal/MediaSession.h | 361 - .../3rdparty/include/rtsp/internal/Mutex.h | 13 - .../include/rtsp/internal/NetAddress.h | 31 - .../include/rtsp/internal/NetCommon.h | 20 - .../internal/OnDemandServerMediaSession.h | 20 - .../include/rtsp/internal/OutPacketBuffer.h | 105 - project/3rdparty/include/rtsp/internal/RTCP.h | 161 - .../include/rtsp/internal/RTCPInstance.h | 114 - .../include/rtsp/internal/RTPPacketBuffer.h | 126 - .../include/rtsp/internal/RTPSource.h | 117 - .../include/rtsp/internal/RTSPClient.h | 224 - .../include/rtsp/internal/RTSPCommon.h | 103 - .../include/rtsp/internal/RTSPCommonEnv.h | 45 - .../include/rtsp/internal/RTSPLiveStreamer.h | 50 - .../include/rtsp/internal/RTSPServer.h | 205 - .../include/rtsp/internal/Semaphore.h | 13 - .../rtsp/internal/ServerMediaSession.h | 236 - project/3rdparty/include/rtsp/internal/Sock.h | 94 - .../include/rtsp/internal/SockCommon.h | 48 - .../include/rtsp/internal/TaskScheduler.h | 96 - .../3rdparty/include/rtsp/internal/Thread.h | 12 - .../3rdparty/include/rtsp/internal/our_md5.h | 35 - .../include/rtsp/internal/rtcp_from_spec.h | 54 - project/3rdparty/include/rtsp/internal/util.h | 22 - project/3rdparty/include/rtsp/rtsp.hpp | 11 - project/3rdparty/source/Kconfig | 6 - project/3rdparty/source/Makefile | 6 - project/3rdparty/source/hope/Kconfig | 13 - project/3rdparty/source/hope/Makefile | 7 - project/3rdparty/source/hope/application.cpp | 26 - project/3rdparty/source/hope/eventloop.cpp | 158 - project/3rdparty/source/hope/object.cpp | 87 - project/3rdparty/source/hope/objectdata.cpp | 11 - project/3rdparty/source/hope/thread.cpp | 133 - project/3rdparty/source/hope/threaddata.cpp | 9 - project/3rdparty/source/hope/timer.cpp | 59 - project/3rdparty/source/libdrm/Kconfig | 21 - project/3rdparty/source/libdrm/Makefile | 10 - .../3rdparty/source/libdrm/amdgpu/Makefile | 8 - .../3rdparty/source/libdrm/amdgpu/amdgpu.ids | 496 - .../source/libdrm/amdgpu/amdgpu_asic_id.c | 646 - .../3rdparty/source/libdrm/amdgpu/amdgpu_bo.c | 702 - .../3rdparty/source/libdrm/amdgpu/amdgpu_cs.c | 895 - .../source/libdrm/amdgpu/amdgpu_device.c | 259 - .../source/libdrm/amdgpu/amdgpu_gpu_info.c | 293 - .../source/libdrm/amdgpu/amdgpu_internal.h | 118 - .../source/libdrm/amdgpu/amdgpu_vamgr.c | 262 - .../3rdparty/source/libdrm/amdgpu/amdgpu_vm.c | 25 - .../source/libdrm/amdgpu/handle_table.c | 52 - .../source/libdrm/amdgpu/handle_table.h | 17 - .../3rdparty/source/libdrm/etnaviv/Makefile | 7 - .../source/libdrm/etnaviv/etnaviv_bo.c | 279 - .../source/libdrm/etnaviv/etnaviv_bo_cache.c | 146 - .../libdrm/etnaviv/etnaviv_cmd_stream.c | 250 - .../source/libdrm/etnaviv/etnaviv_device.c | 88 - .../source/libdrm/etnaviv/etnaviv_gpu.c | 149 - .../source/libdrm/etnaviv/etnaviv_perfmon.c | 165 - .../source/libdrm/etnaviv/etnaviv_pipe.c | 55 - .../source/libdrm/etnaviv/etnaviv_priv.h | 160 - .../3rdparty/source/libdrm/exynos/Makefile | 2 - .../source/libdrm/exynos/exynos_drm.c | 287 - .../source/libdrm/exynos/exynos_fimg2d.c | 813 - .../source/libdrm/exynos/fimg2d_reg.h | 91 - .../libdrm/generated_static_table_fourcc.h | 48 - .../3rdparty/source/libdrm/nouveau/Makefile | 4 - .../3rdparty/source/libdrm/nouveau/abi16.c | 327 - .../3rdparty/source/libdrm/nouveau/bufctx.c | 134 - .../3rdparty/source/libdrm/nouveau/nouveau.c | 861 - .../3rdparty/source/libdrm/nouveau/nouveau.h | 245 - .../source/libdrm/nouveau/nvif/cl0080.h | 46 - .../source/libdrm/nouveau/nvif/cl9097.h | 45 - .../source/libdrm/nouveau/nvif/class.h | 140 - .../source/libdrm/nouveau/nvif/if0002.h | 39 - .../source/libdrm/nouveau/nvif/if0003.h | 36 - .../source/libdrm/nouveau/nvif/ioctl.h | 123 - .../source/libdrm/nouveau/nvif/unpack.h | 31 - .../3rdparty/source/libdrm/nouveau/private.h | 123 - .../3rdparty/source/libdrm/nouveau/pushbuf.c | 743 - project/3rdparty/source/libdrm/omap/Makefile | 1 - .../3rdparty/source/libdrm/omap/omap_drm.c | 403 - .../3rdparty/source/libdrm/rockchip/Makefile | 2 - .../3rdparty/source/libdrm/rockchip/rga_reg.h | 392 - .../source/libdrm/rockchip/rockchip_drm.c | 198 - .../source/libdrm/rockchip/rockchip_rga.c | 982 - .../source/libdrm/rockchip/rockchip_rga.h | 52 - project/3rdparty/source/libdrm/tegra/Makefile | 5 - .../3rdparty/source/libdrm/tegra/channel.c | 161 - project/3rdparty/source/libdrm/tegra/job.c | 154 - .../3rdparty/source/libdrm/tegra/private.h | 90 - .../3rdparty/source/libdrm/tegra/pushbuf.c | 133 - project/3rdparty/source/libdrm/tegra/syncpt.c | 72 - project/3rdparty/source/libdrm/tegra/tegra.c | 336 - project/3rdparty/source/libdrm/tools/Makefile | 4 - .../3rdparty/source/libdrm/tools/modeprint.c | 386 - .../3rdparty/source/libdrm/tools/modetest.c | 2313 -- .../source/libdrm/tools/util/Makefile | 5 - .../source/libdrm/tools/util/buffer.c | 298 - .../source/libdrm/tools/util/cursor.c | 169 - .../source/libdrm/tools/util/format.c | 100 - .../3rdparty/source/libdrm/tools/util/kms.c | 121 - .../source/libdrm/tools/util/pattern.c | 1108 - project/3rdparty/source/libdrm/xf86drm.c | 53 +- project/3rdparty/source/libdrm/xf86drmHash.c | 2 +- project/3rdparty/source/libdrm/xf86drmMode.c | 22 +- .../3rdparty/source/libdrm/xf86drmRandom.c | 2 +- project/3rdparty/source/libdrm/xf86drmSL.c | 2 +- project/3rdparty/source/libv4l/Kconfig | 26 - project/3rdparty/source/libv4l/Makefile | 9 - project/3rdparty/source/libv4l/config.h | 217 - .../source/libv4l/libmedia_dev/Makefile | 1 - .../libv4l/libmedia_dev/get_media_devices.c | 634 - .../source/libv4l/libv4l-mplane/Makefile | 1 - .../libv4l/libv4l-mplane/libv4l-mplane.c | 441 - .../3rdparty/source/libv4l/libv4l1/Makefile | 3 - .../source/libv4l/libv4l1/libv4l1-priv.h | 63 - .../3rdparty/source/libv4l/libv4l1/libv4l1.c | 1239 - project/3rdparty/source/libv4l/libv4l1/log.c | 116 - .../source/libv4l/libv4l1/v4l1compat.c | 103 - .../3rdparty/source/libv4l/libv4l2/Makefile | 4 - .../source/libv4l/libv4l2/libv4l2-priv.h | 104 - .../3rdparty/source/libv4l/libv4l2/libv4l2.c | 1596 - project/3rdparty/source/libv4l/libv4l2/log.c | 211 - .../source/libv4l/libv4l2/v4l2-plugin.c | 82 - .../source/libv4l/libv4l2/v4l2convert.c | 119 - .../source/libv4l/libv4l2rds/Makefile | 1 - .../source/libv4l/libv4l2rds/libv4l2rds.c | 1327 - .../source/libv4l/libv4l2utls/Makefile | 2 - .../source/libv4l/libv4l2utls/frequencies.c | 1441 - .../source/libv4l/libv4l2utls/v4l2_driver.c | 851 - .../source/libv4l/libv4lconvert/Makefile | 27 - .../source/libv4l/libv4lconvert/bayer.c | 547 - .../libv4l/libv4lconvert/control/Makefile | 1 - .../control/libv4lcontrol-priv.h | 50 - .../libv4lconvert/control/libv4lcontrol.c | 1005 - .../libv4lconvert/control/libv4lcontrol.h | 46 - .../source/libv4l/libv4lconvert/cpia1.c | 196 - .../source/libv4l/libv4lconvert/crop.c | 239 - .../source/libv4l/libv4lconvert/flip.c | 238 - .../libv4l/libv4lconvert/helper-funcs.h | 57 - .../source/libv4l/libv4lconvert/helper.c | 175 - .../source/libv4l/libv4lconvert/jidctflt.c | 186 - .../source/libv4l/libv4lconvert/jl2005bcd.c | 174 - .../source/libv4l/libv4lconvert/jpeg.c | 377 - .../libv4l/libv4lconvert/jpeg_memsrcdest.c | 146 - .../libv4l/libv4lconvert/jpeg_memsrcdest.h | 18 - .../source/libv4l/libv4lconvert/jpgl.c | 503 - .../libv4l/libv4lconvert/libv4lconvert-priv.h | 187 - .../libv4l/libv4lconvert/libv4lconvert.c | 1911 -- .../libv4l/libv4lconvert/libv4lsyscall-priv.h | 66 - .../source/libv4l/libv4lconvert/mr97310a.c | 154 - .../source/libv4l/libv4lconvert/nv12_16l16.c | 123 - .../source/libv4l/libv4lconvert/pac207.c | 155 - .../libv4l/libv4lconvert/processing/Makefile | 4 - .../libv4lconvert/processing/autogain.c | 173 - .../libv4l/libv4lconvert/processing/gamma.c | 43 - .../processing/libv4lprocessing-priv.h | 36 - .../processing/libv4lprocessing.c | 169 - .../processing/libv4lprocessing.h | 16 - .../libv4lconvert/processing/whitebalance.c | 181 - .../source/libv4l/libv4lconvert/rgbyuv.c | 869 - .../source/libv4l/libv4lconvert/se401.c | 143 - .../source/libv4l/libv4lconvert/sn9c10x.c | 120 - .../libv4l/libv4lconvert/sn9c2028-decomp.c | 100 - .../source/libv4l/libv4lconvert/sn9c20x.c | 104 - .../source/libv4l/libv4lconvert/spca501.c | 205 - .../libv4l/libv4lconvert/spca561-decompress.c | 942 - .../source/libv4l/libv4lconvert/sq905c.c | 201 - .../source/libv4l/libv4lconvert/stv0680.c | 18 - .../libv4l/libv4lconvert/tinyjpeg-internal.h | 80 - .../source/libv4l/libv4lconvert/tinyjpeg.c | 2265 -- .../source/libv4l/libv4lconvert/tinyjpeg.h | 39 - .../3rdparty/source/libv4l/media-ctl/Makefile | 2 - .../source/libv4l/media-ctl/libmediactl.c | 963 - .../source/libv4l/media-ctl/libv4l2subdev.c | 1273 - .../BasicUsageEnvironment/BasicHashTable.cpp | 277 - .../BasicTaskScheduler.cpp | 256 - .../BasicTaskScheduler0.cpp | 237 - .../BasicUsageEnvironment.cpp | 80 - .../BasicUsageEnvironment0.cpp | 108 - .../BasicUsageEnvironment/DelayQueue.cpp | 230 - .../live555/BasicUsageEnvironment/Makefile | 6 - project/3rdparty/source/live555/Kconfig | 20 - project/3rdparty/source/live555/Makefile | 4 - .../live555/UsageEnvironment/HashTable.cpp | 50 - .../source/live555/UsageEnvironment/Makefile | 3 - .../UsageEnvironment/UsageEnvironment.cpp | 62 - .../live555/UsageEnvironment/strDup.cpp | 50 - .../source/live555/groupsock/GroupEId.cpp | 54 - .../source/live555/groupsock/Groupsock.cpp | 549 - .../live555/groupsock/GroupsockHelper.cpp | 1096 - .../source/live555/groupsock/IOHandlers.cpp | 45 - .../source/live555/groupsock/Makefile | 7 - .../source/live555/groupsock/NetAddress.cpp | 515 - .../source/live555/groupsock/NetInterface.cpp | 131 - .../source/live555/groupsock/inet.cpp | 45 - .../AC3AudioFileServerMediaSubsession.cpp | 61 - .../live555/liveMedia/AC3AudioRTPSink.cpp | 97 - .../live555/liveMedia/AC3AudioRTPSource.cpp | 66 - .../liveMedia/AC3AudioStreamFramer.cpp | 341 - .../ADTSAudioFileServerMediaSubsession.cpp | 60 - .../live555/liveMedia/ADTSAudioFileSource.cpp | 171 - .../ADTSAudioStreamDiscreteFramer.cpp | 128 - .../AMRAudioFileServerMediaSubsession.cpp | 59 - .../live555/liveMedia/AMRAudioFileSink.cpp | 101 - .../live555/liveMedia/AMRAudioFileSource.cpp | 174 - .../live555/liveMedia/AMRAudioRTPSink.cpp | 134 - .../live555/liveMedia/AMRAudioRTPSource.cpp | 749 - .../live555/liveMedia/AMRAudioSource.cpp | 38 - .../source/live555/liveMedia/AVIFileSink.cpp | 789 - .../live555/liveMedia/AudioInputDevice.cpp | 45 - .../source/live555/liveMedia/AudioRTPSink.cpp | 37 - .../source/live555/liveMedia/Base64.cpp | 122 - .../source/live555/liveMedia/BasicUDPSink.cpp | 101 - .../live555/liveMedia/BasicUDPSource.cpp | 77 - .../source/live555/liveMedia/BitVector.cpp | 183 - .../liveMedia/ByteStreamFileSource.cpp | 184 - .../ByteStreamMemoryBufferSource.cpp | 118 - .../liveMedia/ByteStreamMultiFileSource.cpp | 134 - .../DVVideoFileServerMediaSubsession.cpp | 103 - .../live555/liveMedia/DVVideoRTPSink.cpp | 95 - .../live555/liveMedia/DVVideoRTPSource.cpp | 65 - .../live555/liveMedia/DVVideoStreamFramer.cpp | 220 - .../source/live555/liveMedia/DeviceSource.cpp | 156 - .../liveMedia/DigestAuthentication.cpp | 173 - .../source/live555/liveMedia/EBMLNumber.cpp | 150 - .../source/live555/liveMedia/EBMLNumber.hh | 144 - .../liveMedia/FileServerMediaSubsession.cpp | 34 - .../source/live555/liveMedia/FileSink.cpp | 151 - .../live555/liveMedia/FramedFileSource.cpp | 30 - .../source/live555/liveMedia/FramedFilter.cpp | 59 - .../source/live555/liveMedia/FramedSource.cpp | 126 - .../live555/liveMedia/GSMAudioRTPSink.cpp | 40 - .../live555/liveMedia/GenericMediaServer.cpp | 485 - .../live555/liveMedia/H261VideoRTPSource.cpp | 67 - ...H263plusVideoFileServerMediaSubsession.cpp | 64 - .../liveMedia/H263plusVideoRTPSink.cpp | 91 - .../liveMedia/H263plusVideoRTPSource.cpp | 106 - .../liveMedia/H263plusVideoStreamFramer.cpp | 129 - .../liveMedia/H263plusVideoStreamParser.cpp | 859 - .../liveMedia/H263plusVideoStreamParser.hh | 127 - .../H264VideoFileServerMediaSubsession.cpp | 120 - .../live555/liveMedia/H264VideoFileSink.cpp | 59 - .../live555/liveMedia/H264VideoRTPSink.cpp | 131 - .../live555/liveMedia/H264VideoRTPSource.cpp | 199 - .../H264VideoStreamDiscreteFramer.cpp | 46 - .../liveMedia/H264VideoStreamFramer.cpp | 42 - .../liveMedia/H264or5VideoFileSink.cpp | 66 - .../live555/liveMedia/H264or5VideoRTPSink.cpp | 299 - .../H264or5VideoStreamDiscreteFramer.cpp | 165 - .../liveMedia/H264or5VideoStreamFramer.cpp | 1229 - .../H265VideoFileServerMediaSubsession.cpp | 121 - .../live555/liveMedia/H265VideoFileSink.cpp | 63 - .../live555/liveMedia/H265VideoRTPSink.cpp | 182 - .../live555/liveMedia/H265VideoRTPSource.cpp | 218 - .../H265VideoStreamDiscreteFramer.cpp | 46 - .../liveMedia/H265VideoStreamFramer.cpp | 42 - .../source/live555/liveMedia/HLSSegmenter.cpp | 141 - .../source/live555/liveMedia/HMAC_SHA1.cpp | 80 - .../source/live555/liveMedia/InputFile.cpp | 112 - .../liveMedia/JPEG2000VideoRTPSink.cpp | 78 - .../liveMedia/JPEG2000VideoRTPSource.cpp | 64 - .../live555/liveMedia/JPEGVideoRTPSink.cpp | 145 - .../live555/liveMedia/JPEGVideoRTPSource.cpp | 465 - .../live555/liveMedia/JPEGVideoSource.cpp | 45 - .../source/live555/liveMedia/Locale.cpp | 60 - .../source/live555/liveMedia/MIKEY.cpp | 598 - .../source/live555/liveMedia/MP3ADU.cpp | 634 - .../live555/liveMedia/MP3ADURTPSink.cpp | 119 - .../live555/liveMedia/MP3ADURTPSource.cpp | 80 - .../live555/liveMedia/MP3ADUTranscoder.cpp | 92 - .../live555/liveMedia/MP3ADUdescriptor.cpp | 65 - .../live555/liveMedia/MP3ADUdescriptor.hh | 43 - .../live555/liveMedia/MP3ADUinterleaving.cpp | 517 - .../MP3AudioFileServerMediaSubsession.cpp | 180 - ...AudioMatroskaFileServerMediaSubsession.cpp | 58 - ...3AudioMatroskaFileServerMediaSubsession.hh | 57 - .../live555/liveMedia/MP3FileSource.cpp | 195 - .../source/live555/liveMedia/MP3Internals.cpp | 809 - .../source/live555/liveMedia/MP3Internals.hh | 143 - .../live555/liveMedia/MP3InternalsHuffman.cpp | 976 - .../live555/liveMedia/MP3InternalsHuffman.hh | 82 - .../liveMedia/MP3InternalsHuffmanTable.cpp | 1548 - .../live555/liveMedia/MP3StreamState.cpp | 388 - .../live555/liveMedia/MP3StreamState.hh | 89 - .../live555/liveMedia/MP3Transcoder.cpp | 52 - .../liveMedia/MPEG1or2AudioRTPSink.cpp | 63 - .../liveMedia/MPEG1or2AudioRTPSource.cpp | 62 - .../liveMedia/MPEG1or2AudioStreamFramer.cpp | 210 - .../live555/liveMedia/MPEG1or2Demux.cpp | 768 - .../MPEG1or2DemuxedElementaryStream.cpp | 88 - .../MPEG1or2DemuxedServerMediaSubsession.cpp | 134 - .../liveMedia/MPEG1or2FileServerDemux.cpp | 273 - ...MPEG1or2VideoFileServerMediaSubsession.cpp | 69 - .../liveMedia/MPEG1or2VideoRTPSink.cpp | 175 - .../liveMedia/MPEG1or2VideoRTPSource.cpp | 82 - .../MPEG1or2VideoStreamDiscreteFramer.cpp | 203 - .../liveMedia/MPEG1or2VideoStreamFramer.cpp | 478 - .../MPEG2IndexFromTransportStream.cpp | 683 - ...PEG2TransportFileServerMediaSubsession.cpp | 352 - .../MPEG2TransportStreamAccumulator.cpp | 85 - .../liveMedia/MPEG2TransportStreamDemux.cpp | 49 - .../MPEG2TransportStreamDemuxedTrack.cpp | 34 - .../MPEG2TransportStreamDemuxedTrack.hh | 50 - .../liveMedia/MPEG2TransportStreamFramer.cpp | 290 - .../MPEG2TransportStreamFromESSource.cpp | 268 - .../MPEG2TransportStreamFromPESSource.cpp | 74 - .../MPEG2TransportStreamIndexFile.cpp | 349 - .../MPEG2TransportStreamMultiplexor.cpp | 485 - .../liveMedia/MPEG2TransportStreamParser.cpp | 328 - .../liveMedia/MPEG2TransportStreamParser.hh | 132 - .../MPEG2TransportStreamParser_PAT.cpp | 111 - .../MPEG2TransportStreamParser_PMT.cpp | 471 - .../MPEG2TransportStreamParser_STREAM.cpp | 310 - .../MPEG2TransportStreamTrickModeFilter.cpp | 266 - ...MPEG2TransportUDPServerMediaSubsession.cpp | 81 - .../live555/liveMedia/MPEG4ESVideoRTPSink.cpp | 142 - .../liveMedia/MPEG4ESVideoRTPSource.cpp | 65 - .../live555/liveMedia/MPEG4GenericRTPSink.cpp | 142 - .../liveMedia/MPEG4GenericRTPSource.cpp | 234 - .../liveMedia/MPEG4LATMAudioRTPSink.cpp | 95 - .../liveMedia/MPEG4LATMAudioRTPSource.cpp | 264 - .../MPEG4VideoFileServerMediaSubsession.cpp | 126 - .../MPEG4VideoStreamDiscreteFramer.cpp | 252 - .../liveMedia/MPEG4VideoStreamFramer.cpp | 681 - .../liveMedia/MPEGVideoStreamFramer.cpp | 187 - .../liveMedia/MPEGVideoStreamParser.cpp | 45 - .../liveMedia/MPEGVideoStreamParser.hh | 122 - .../source/live555/liveMedia/Makefile | 214 - .../liveMedia/MatroskaDemuxedTrack.cpp | 56 - .../live555/liveMedia/MatroskaDemuxedTrack.hh | 66 - .../source/live555/liveMedia/MatroskaFile.cpp | 1083 - .../live555/liveMedia/MatroskaFileParser.cpp | 1528 - .../live555/liveMedia/MatroskaFileParser.hh | 139 - .../liveMedia/MatroskaFileServerDemux.cpp | 130 - .../MatroskaFileServerMediaSubsession.cpp | 65 - .../MatroskaFileServerMediaSubsession.hh | 55 - .../source/live555/liveMedia/Media.cpp | 163 - .../source/live555/liveMedia/MediaSession.cpp | 1517 - .../source/live555/liveMedia/MediaSink.cpp | 225 - .../source/live555/liveMedia/MediaSource.cpp | 91 - .../live555/liveMedia/MultiFramedRTPSink.cpp | 461 - .../liveMedia/MultiFramedRTPSource.cpp | 639 - .../live555/liveMedia/OggDemuxedTrack.cpp | 43 - .../live555/liveMedia/OggDemuxedTrack.hh | 58 - .../source/live555/liveMedia/OggFile.cpp | 350 - .../live555/liveMedia/OggFileParser.cpp | 1032 - .../source/live555/liveMedia/OggFileParser.hh | 91 - .../live555/liveMedia/OggFileServerDemux.cpp | 117 - .../OggFileServerMediaSubsession.cpp | 54 - .../liveMedia/OggFileServerMediaSubsession.hh | 53 - .../source/live555/liveMedia/OggFileSink.cpp | 274 - .../OnDemandServerMediaSubsession.cpp | 649 - .../source/live555/liveMedia/OutputFile.cpp | 60 - .../PassiveServerMediaSubsession.cpp | 241 - .../liveMedia/ProxyServerMediaSession.cpp | 948 - .../live555/liveMedia/QCELPAudioRTPSource.cpp | 504 - .../live555/liveMedia/QuickTimeFileSink.cpp | 2338 -- .../liveMedia/QuickTimeGenericRTPSource.cpp | 274 - .../source/live555/liveMedia/RTCP.cpp | 1388 - .../source/live555/liveMedia/RTPInterface.cpp | 675 - .../source/live555/liveMedia/RTPSink.cpp | 403 - .../source/live555/liveMedia/RTPSource.cpp | 409 - .../source/live555/liveMedia/RTSPClient.cpp | 2190 -- .../source/live555/liveMedia/RTSPCommon.cpp | 380 - .../live555/liveMedia/RTSPRegisterSender.cpp | 227 - .../source/live555/liveMedia/RTSPServer.cpp | 2035 -- .../live555/liveMedia/RTSPServerRegister.cpp | 438 - .../live555/liveMedia/RawVideoRTPSink.cpp | 319 - .../live555/liveMedia/RawVideoRTPSource.cpp | 187 - .../source/live555/liveMedia/SIPClient.cpp | 977 - .../liveMedia/SRTPCryptographicContext.cpp | 591 - .../live555/liveMedia/ServerMediaSession.cpp | 465 - .../live555/liveMedia/SimpleRTPSink.cpp | 94 - .../live555/liveMedia/SimpleRTPSource.cpp | 68 - .../source/live555/liveMedia/StreamParser.cpp | 210 - .../source/live555/liveMedia/StreamParser.hh | 167 - .../live555/liveMedia/StreamReplicator.cpp | 333 - .../live555/liveMedia/T140TextRTPSink.cpp | 184 - .../source/live555/liveMedia/TLSState.cpp | 250 - .../source/live555/liveMedia/TextRTPSink.cpp | 36 - .../live555/liveMedia/TheoraVideoRTPSink.cpp | 176 - .../liveMedia/TheoraVideoRTPSource.cpp | 113 - .../live555/liveMedia/VP8VideoRTPSink.cpp | 68 - .../live555/liveMedia/VP8VideoRTPSource.cpp | 86 - .../live555/liveMedia/VP9VideoRTPSink.cpp | 71 - .../live555/liveMedia/VP9VideoRTPSource.cpp | 108 - .../source/live555/liveMedia/VideoRTPSink.cpp | 36 - .../live555/liveMedia/VorbisAudioRTPSink.cpp | 268 - .../liveMedia/VorbisAudioRTPSource.cpp | 197 - .../WAVAudioFileServerMediaSubsession.cpp | 228 - .../live555/liveMedia/WAVAudioFileSource.cpp | 353 - .../source/live555/liveMedia/ourMD5.cpp | 325 - .../source/live555/liveMedia/rtcp_from_spec.c | 289 - .../source/live555/liveMedia/rtcp_from_spec.h | 100 - .../live555/liveMedia/uLawAudioFilter.cpp | 431 - project/3rdparty/source/media/Kconfig | 37 - project/3rdparty/source/media/Makefile | 4 - project/3rdparty/source/media/drm/Makefile | 3 - .../source/media/drm/drm_output_stream.cpp | 551 - .../3rdparty/source/media/drm/drm_stream.cpp | 308 - .../3rdparty/source/media/drm/drm_stream.h | 66 - .../3rdparty/source/media/drm/drm_utils.cpp | 1227 - project/3rdparty/source/media/drm/drm_utils.h | 146 - project/3rdparty/source/media/media/Makefile | 29 - .../3rdparty/source/media/media/buffer.cpp | 637 - project/3rdparty/source/media/media/codec.cpp | 382 - .../3rdparty/source/media/media/decoder.cpp | 11 - .../3rdparty/source/media/media/demuxer.cpp | 26 - .../source/media/media/drm_media_api.cpp | 5954 ---- .../source/media/media/drm_media_buffer.cpp | 720 - .../media/media/drm_media_buffer_impl.h | 53 - .../source/media/media/drm_media_vo.cpp | 88 - .../3rdparty/source/media/media/encoder.cpp | 71 - .../source/media/media/file_stream.cpp | 223 - .../3rdparty/source/media/media/filter.cpp | 32 - project/3rdparty/source/media/media/flow.cpp | 1257 - .../3rdparty/source/media/media/flow/Makefile | 10 - .../media/media/flow/audio_decoder_flow.cpp | 159 - .../media/media/flow/audio_encoder_flow.cpp | 250 - .../source/media/media/flow/decoder_flow.cpp | 190 - .../source/media/media/flow/file_flow.cpp | 356 - .../source/media/media/flow/filter_flow.cpp | 325 - .../source/media/media/flow/link_flow.cpp | 117 - .../source/media/media/flow/muxer_flow.cpp | 1024 - .../source/media/media/flow/muxer_flow.h | 132 - .../media/media/flow/output_stream_flow.cpp | 110 - .../media/media/flow/source_stream_flow.cpp | 139 - .../media/media/flow/video_encoder_flow.cpp | 379 - .../source/media/media/guard/Makefile | 1 - .../media/media/guard/through_guard.cpp | 85 - project/3rdparty/source/media/media/image.cpp | 262 - project/3rdparty/source/media/media/lock.cpp | 104 - .../source/media/media/media_config.cpp | 946 - .../source/media/media/media_type.cpp | 42 - .../source/media/media/media_utils.cpp | 224 - .../3rdparty/source/media/media/media_utils.h | 13 - .../3rdparty/source/media/media/message.cpp | 98 - project/3rdparty/source/media/media/muxer.cpp | 14 - .../3rdparty/source/media/media/osd/Makefile | 1 - .../source/media/media/osd/color_table.cpp | 93 - .../source/media/media/osd/color_table.h | 59 - .../source/media/media/rkmpp/Makefile | 5 - .../source/media/media/rkmpp/mpp_decoder.cpp | 635 - .../source/media/media/rkmpp/mpp_decoder.h | 36 - .../source/media/media/rkmpp/mpp_encoder.cpp | 1590 - .../source/media/media/rkmpp/mpp_encoder.h | 122 - .../media/media/rkmpp/mpp_final_encoder.cpp | 1776 -- .../source/media/media/rkmpp/mpp_inc.cpp | 502 - .../source/media/media/rkmpp/mpp_inc.h | 37 - .../media/media/rkmpp/mpp_jpeg_fd_info.h | 152 - .../media/media/rkmpp/mpp_jpeg_packet.cpp | 170 - .../media/media/rkmpp/mpp_jpeg_packet.h | 30 - .../source/media/media/rkrga/Makefile | 1 - .../source/media/media/rkrga/rkrga.cpp | 601 - project/3rdparty/source/media/media/sound.cpp | 100 - .../3rdparty/source/media/media/stream.cpp | 147 - project/3rdparty/source/media/media/utils.cpp | 279 - project/3rdparty/source/media/v4l2/Makefile | 6 - .../3rdparty/source/media/v4l2/rkaiq/Makefile | 1 - .../source/media/v4l2/rkaiq/rkaiq_media.cpp | 768 - .../source/media/v4l2/rkaiq/rkaiq_media.h | 162 - .../source/media/v4l2/v4l2_capture_stream.cpp | 635 - .../source/media/v4l2/v4l2_output_stream.cpp | 359 - .../source/media/v4l2/v4l2_stream.cpp | 275 - .../3rdparty/source/media/v4l2/v4l2_stream.h | 112 - .../3rdparty/source/media/v4l2/v4l2_utils.cpp | 161 - .../3rdparty/source/media/v4l2/v4l2_utils.h | 51 - project/3rdparty/source/rockchip/Kconfig | 2 - project/3rdparty/source/rockchip/Makefile | 2 - .../3rdparty/source/rockchip/rkmpp/Kconfig | 126 - .../3rdparty/source/rockchip/rkmpp/Makefile | 3 - .../source/rockchip/rkmpp/mpp/Makefile | 10 - .../source/rockchip/rkmpp/mpp/base/Makefile | 20 - .../rockchip/rkmpp/mpp/base/inc/mpp_2str.h | 38 - .../rockchip/rkmpp/mpp/base/inc/mpp_bitput.h | 46 - .../rockchip/rkmpp/mpp/base/inc/mpp_bitread.h | 177 - .../rkmpp/mpp/base/inc/mpp_bitwrite.h | 69 - .../rkmpp/mpp/base/inc/mpp_buf_slot.h | 262 - .../rkmpp/mpp/base/inc/mpp_buffer_impl.h | 215 - .../rockchip/rkmpp/mpp/base/inc/mpp_cluster.h | 51 - .../rkmpp/mpp/base/inc/mpp_dec_cb_param.h | 37 - .../rkmpp/mpp/base/inc/mpp_dec_cfg_impl.h | 31 - .../rkmpp/mpp/base/inc/mpp_enc_cb_param.h | 39 - .../rkmpp/mpp/base/inc/mpp_enc_cfg_impl.h | 30 - .../rockchip/rkmpp/mpp/base/inc/mpp_enc_ref.h | 70 - .../rkmpp/mpp/base/inc/mpp_enc_refs.h | 92 - .../rkmpp/mpp/base/inc/mpp_frame_impl.h | 223 - .../rkmpp/mpp/base/inc/mpp_meta_impl.h | 65 - .../rkmpp/mpp/base/inc/mpp_packet_impl.h | 106 - .../rkmpp/mpp/base/inc/mpp_task_impl.h | 129 - .../rockchip/rkmpp/mpp/base/inc/mpp_trie.h | 53 - .../source/rockchip/rkmpp/mpp/base/mpp_2str.c | 145 - .../rockchip/rkmpp/mpp/base/mpp_bitput.c | 76 - .../rockchip/rkmpp/mpp/base/mpp_bitread.c | 351 - .../rockchip/rkmpp/mpp/base/mpp_bitwrite.c | 249 - .../rockchip/rkmpp/mpp/base/mpp_buf_slot.cpp | 1271 - .../rockchip/rkmpp/mpp/base/mpp_buffer.cpp | 379 - .../rkmpp/mpp/base/mpp_buffer_impl.cpp | 1106 - .../rockchip/rkmpp/mpp/base/mpp_cfg.cpp | 265 - .../rockchip/rkmpp/mpp/base/mpp_cluster.cpp | 748 - .../rockchip/rkmpp/mpp/base/mpp_dec_cfg.cpp | 390 - .../rkmpp/mpp/base/mpp_dec_hdr_meta.c | 134 - .../rockchip/rkmpp/mpp/base/mpp_enc_cfg.cpp | 528 - .../rockchip/rkmpp/mpp/base/mpp_enc_ref.cpp | 445 - .../rockchip/rkmpp/mpp/base/mpp_enc_refs.cpp | 1064 - .../rockchip/rkmpp/mpp/base/mpp_frame.cpp | 299 - .../rockchip/rkmpp/mpp/base/mpp_meta.cpp | 346 - .../rockchip/rkmpp/mpp/base/mpp_packet.cpp | 634 - .../rockchip/rkmpp/mpp/base/mpp_task.cpp | 149 - .../rockchip/rkmpp/mpp/base/mpp_task_impl.cpp | 570 - .../rockchip/rkmpp/mpp/base/mpp_trie.cpp | 324 - .../source/rockchip/rkmpp/mpp/codec/Makefile | 12 - .../rockchip/rkmpp/mpp/codec/dec/Makefile | 12 - .../rockchip/rkmpp/mpp/codec/dec/av1/Makefile | 6 - .../rockchip/rkmpp/mpp/codec/dec/av1/av1.h | 176 - .../rkmpp/mpp/codec/dec/av1/av1_entropymode.c | 4561 --- .../rkmpp/mpp/codec/dec/av1/av1_entropymode.h | 75 - .../rkmpp/mpp/codec/dec/av1/av1d_api.c | 304 - .../rkmpp/mpp/codec/dec/av1/av1d_cbs.c | 3149 -- .../rkmpp/mpp/codec/dec/av1/av1d_cbs.h | 449 - .../rkmpp/mpp/codec/dec/av1/av1d_codec.h | 130 - .../rkmpp/mpp/codec/dec/av1/av1d_common.h | 876 - .../rkmpp/mpp/codec/dec/av1/av1d_parser.c | 1198 - .../rkmpp/mpp/codec/dec/av1/av1d_parser.h | 194 - .../mpp/codec/dec/av1/av1d_parser2_syntax.c | 294 - .../rkmpp/mpp/codec/dec/av1/av1d_probs.c | 38 - .../rockchip/rkmpp/mpp/codec/dec/avs/Makefile | 2 - .../rkmpp/mpp/codec/dec/avs/avsd_api.c | 393 - .../rkmpp/mpp/codec/dec/avs/avsd_parse.c | 847 - .../rkmpp/mpp/codec/dec/avs/avsd_parse.h | 265 - .../rkmpp/mpp/codec/dec/avs2/Makefile | 4 - .../rkmpp/mpp/codec/dec/avs2/avs2d_api.c | 332 - .../rkmpp/mpp/codec/dec/avs2/avs2d_dpb.c | 845 - .../rkmpp/mpp/codec/dec/avs2/avs2d_dpb.h | 37 - .../rkmpp/mpp/codec/dec/avs2/avs2d_global.h | 413 - .../rkmpp/mpp/codec/dec/avs2/avs2d_parse.c | 712 - .../rkmpp/mpp/codec/dec/avs2/avs2d_parse.h | 41 - .../rkmpp/mpp/codec/dec/avs2/avs2d_ps.c | 822 - .../rkmpp/mpp/codec/dec/avs2/avs2d_ps.h | 33 - .../rkmpp/mpp/codec/dec/dummy/Makefile | 1 - .../rkmpp/mpp/codec/dec/dummy/dummy_dec_api.c | 303 - .../rkmpp/mpp/codec/dec/h263/Makefile | 2 - .../rkmpp/mpp/codec/dec/h263/h263d_api.c | 322 - .../rkmpp/mpp/codec/dec/h263/h263d_parser.c | 576 - .../rkmpp/mpp/codec/dec/h263/h263d_parser.h | 53 - .../rkmpp/mpp/codec/dec/h264/Makefile | 10 - .../rkmpp/mpp/codec/dec/h264/h264d_api.c | 755 - .../rkmpp/mpp/codec/dec/h264/h264d_dpb.c | 2014 -- .../rkmpp/mpp/codec/dec/h264/h264d_dpb.h | 56 - .../rkmpp/mpp/codec/dec/h264/h264d_fill.c | 392 - .../rkmpp/mpp/codec/dec/h264/h264d_fill.h | 43 - .../rkmpp/mpp/codec/dec/h264/h264d_global.h | 1151 - .../rkmpp/mpp/codec/dec/h264/h264d_init.c | 2124 -- .../rkmpp/mpp/codec/dec/h264/h264d_init.h | 42 - .../rkmpp/mpp/codec/dec/h264/h264d_parse.c | 977 - .../rkmpp/mpp/codec/dec/h264/h264d_parse.h | 45 - .../rkmpp/mpp/codec/dec/h264/h264d_pps.c | 208 - .../rkmpp/mpp/codec/dec/h264/h264d_pps.h | 39 - .../rkmpp/mpp/codec/dec/h264/h264d_scalist.c | 357 - .../rkmpp/mpp/codec/dec/h264/h264d_scalist.h | 41 - .../rkmpp/mpp/codec/dec/h264/h264d_sei.c | 316 - .../rkmpp/mpp/codec/dec/h264/h264d_sei.h | 37 - .../rkmpp/mpp/codec/dec/h264/h264d_slice.c | 573 - .../rkmpp/mpp/codec/dec/h264/h264d_slice.h | 42 - .../rkmpp/mpp/codec/dec/h264/h264d_sps.c | 616 - .../rkmpp/mpp/codec/dec/h264/h264d_sps.h | 41 - .../rkmpp/mpp/codec/dec/h265/Makefile | 5 - .../rkmpp/mpp/codec/dec/h265/h265d_codec.h | 157 - .../rkmpp/mpp/codec/dec/h265/h265d_defs.h | 45 - .../rkmpp/mpp/codec/dec/h265/h265d_parser.c | 2265 -- .../rkmpp/mpp/codec/dec/h265/h265d_parser.h | 683 - .../mpp/codec/dec/h265/h265d_parser2_syntax.c | 418 - .../rkmpp/mpp/codec/dec/h265/h265d_ps.c | 2204 -- .../rkmpp/mpp/codec/dec/h265/h265d_refs.c | 386 - .../rkmpp/mpp/codec/dec/h265/h265d_sei.c | 490 - .../rkmpp/mpp/codec/dec/jpeg/Makefile | 1 - .../rkmpp/mpp/codec/dec/jpeg/jpegd_parser.c | 1322 - .../rkmpp/mpp/codec/dec/jpeg/jpegd_parser.h | 153 - .../rockchip/rkmpp/mpp/codec/dec/m2v/Makefile | 2 - .../rkmpp/mpp/codec/dec/m2v/m2vd_api.c | 38 - .../rkmpp/mpp/codec/dec/m2v/m2vd_codec.h | 27 - .../rkmpp/mpp/codec/dec/m2v/m2vd_com.h | 124 - .../rkmpp/mpp/codec/dec/m2v/m2vd_parser.c | 1522 - .../rkmpp/mpp/codec/dec/m2v/m2vd_parser.h | 307 - .../rkmpp/mpp/codec/dec/mpg4/Makefile | 2 - .../rkmpp/mpp/codec/dec/mpg4/mpg4d_api.c | 356 - .../rkmpp/mpp/codec/dec/mpg4/mpg4d_parser.c | 1554 - .../rkmpp/mpp/codec/dec/mpg4/mpg4d_parser.h | 54 - .../rockchip/rkmpp/mpp/codec/dec/vp8/Makefile | 2 - .../rkmpp/mpp/codec/dec/vp8/vp8d_api.c | 39 - .../rkmpp/mpp/codec/dec/vp8/vp8d_codec.h | 26 - .../rkmpp/mpp/codec/dec/vp8/vp8d_data.h | 407 - .../rkmpp/mpp/codec/dec/vp8/vp8d_parser.c | 1275 - .../rkmpp/mpp/codec/dec/vp8/vp8d_parser.h | 195 - .../rockchip/rkmpp/mpp/codec/dec/vp9/Makefile | 4 - .../rockchip/rkmpp/mpp/codec/dec/vp9/vp9.h | 65 - .../rkmpp/mpp/codec/dec/vp9/vp9d_api.c | 227 - .../rkmpp/mpp/codec/dec/vp9/vp9d_codec.h | 103 - .../rkmpp/mpp/codec/dec/vp9/vp9d_parser.c | 1914 -- .../rkmpp/mpp/codec/dec/vp9/vp9d_parser.h | 296 - .../mpp/codec/dec/vp9/vp9d_parser2_syntax.c | 192 - .../rkmpp/mpp/codec/dec/vp9/vp9data.h | 1274 - .../rkmpp/mpp/codec/dec/vp9/vpx_rac.c | 119 - .../rkmpp/mpp/codec/dec/vp9/vpx_rac.h | 60 - .../rockchip/rkmpp/mpp/codec/enc/Makefile | 5 - .../rkmpp/mpp/codec/enc/dummy/Makefile | 1 - .../rkmpp/mpp/codec/enc/dummy/dummy_enc_api.c | 22 - .../rkmpp/mpp/codec/enc/h264/Makefile | 6 - .../rkmpp/mpp/codec/enc/h264/h264e_api_v2.c | 843 - .../rkmpp/mpp/codec/enc/h264/h264e_debug.h | 55 - .../rkmpp/mpp/codec/enc/h264/h264e_dpb.c | 747 - .../rkmpp/mpp/codec/enc/h264/h264e_dpb.h | 168 - .../rkmpp/mpp/codec/enc/h264/h264e_pps.c | 201 - .../rkmpp/mpp/codec/enc/h264/h264e_pps.h | 71 - .../rkmpp/mpp/codec/enc/h264/h264e_sei.c | 169 - .../rkmpp/mpp/codec/enc/h264/h264e_sei.h | 34 - .../rkmpp/mpp/codec/enc/h264/h264e_slice.c | 1161 - .../rkmpp/mpp/codec/enc/h264/h264e_slice.h | 181 - .../rkmpp/mpp/codec/enc/h264/h264e_sps.c | 462 - .../rkmpp/mpp/codec/enc/h264/h264e_sps.h | 137 - .../rkmpp/mpp/codec/enc/h265/Makefile | 8 - .../rkmpp/mpp/codec/enc/h265/h265e_api.c | 636 - .../rkmpp/mpp/codec/enc/h265/h265e_codec.h | 83 - .../mpp/codec/enc/h265/h265e_context_table.h | 64 - .../rkmpp/mpp/codec/enc/h265/h265e_dpb.c | 862 - .../rkmpp/mpp/codec/enc/h265/h265e_dpb.h | 147 - .../rkmpp/mpp/codec/enc/h265/h265e_enctropy.c | 353 - .../rkmpp/mpp/codec/enc/h265/h265e_enctropy.h | 55 - .../mpp/codec/enc/h265/h265e_header_gen.c | 773 - .../mpp/codec/enc/h265/h265e_header_gen.h | 109 - .../rkmpp/mpp/codec/enc/h265/h265e_ps.c | 461 - .../rkmpp/mpp/codec/enc/h265/h265e_ps.h | 35 - .../rkmpp/mpp/codec/enc/h265/h265e_slice.c | 792 - .../rkmpp/mpp/codec/enc/h265/h265e_slice.h | 434 - .../rkmpp/mpp/codec/enc/h265/h265e_stream.c | 181 - .../rkmpp/mpp/codec/enc/h265/h265e_stream.h | 54 - .../rkmpp/mpp/codec/enc/h265/h265e_syntax.c | 363 - .../rkmpp/mpp/codec/enc/jpeg/Makefile | 1 - .../rkmpp/mpp/codec/enc/jpeg/jpege_api_v2.c | 595 - .../rkmpp/mpp/codec/enc/jpeg/jpege_debug.h | 37 - .../rockchip/rkmpp/mpp/codec/enc/vp8/Makefile | 2 - .../rkmpp/mpp/codec/enc/vp8/vp8e_api_v2.c | 356 - .../rkmpp/mpp/codec/enc/vp8/vp8e_debug.h | 38 - .../rkmpp/mpp/codec/enc/vp8/vp8e_rc.c | 561 - .../rkmpp/mpp/codec/enc/vp8/vp8e_rc.h | 37 - .../rockchip/rkmpp/mpp/codec/enc_impl.cpp | 231 - .../rockchip/rkmpp/mpp/codec/inc/av1d_api.h | 41 - .../rockchip/rkmpp/mpp/codec/inc/avs2d_api.h | 32 - .../rockchip/rkmpp/mpp/codec/inc/avsd_api.h | 33 - .../rkmpp/mpp/codec/inc/dummy_dec_api.h | 41 - .../rkmpp/mpp/codec/inc/dummy_enc_api.h | 29 - .../rockchip/rkmpp/mpp/codec/inc/enc_impl.h | 47 - .../rkmpp/mpp/codec/inc/enc_impl_api.h | 76 - .../rockchip/rkmpp/mpp/codec/inc/h263d_api.h | 17 - .../rockchip/rkmpp/mpp/codec/inc/h264d_api.h | 49 - .../rkmpp/mpp/codec/inc/h264e_api_v2.h | 32 - .../rockchip/rkmpp/mpp/codec/inc/h265d_api.h | 48 - .../rockchip/rkmpp/mpp/codec/inc/h265e_api.h | 32 - .../rockchip/rkmpp/mpp/codec/inc/jpegd_api.h | 31 - .../rkmpp/mpp/codec/inc/jpege_api_v2.h | 31 - .../rockchip/rkmpp/mpp/codec/inc/m2vd_api.h | 32 - .../rockchip/rkmpp/mpp/codec/inc/mpg4d_api.h | 17 - .../rockchip/rkmpp/mpp/codec/inc/mpp_dec.h | 72 - .../rkmpp/mpp/codec/inc/mpp_dec_impl.h | 247 - .../rkmpp/mpp/codec/inc/mpp_dec_no_thread.h | 32 - .../rkmpp/mpp/codec/inc/mpp_dec_normal.h | 32 - .../rockchip/rkmpp/mpp/codec/inc/mpp_enc.h | 179 - .../rkmpp/mpp/codec/inc/mpp_enc_impl.h | 156 - .../rockchip/rkmpp/mpp/codec/inc/mpp_parser.h | 43 - .../rockchip/rkmpp/mpp/codec/inc/mpp_rc.h | 138 - .../rockchip/rkmpp/mpp/codec/inc/parser_api.h | 77 - .../source/rockchip/rkmpp/mpp/codec/inc/rc.h | 87 - .../rockchip/rkmpp/mpp/codec/inc/rc/rc_vepu.h | 62 - .../rkmpp/mpp/codec/inc/rc/rc_vepu540.h | 52 - .../rockchip/rkmpp/mpp/codec/inc/rc_data.h | 73 - .../rkmpp/mpp/codec/inc/rc_data_base.h | 52 - .../rkmpp/mpp/codec/inc/rc_data_impl.h | 201 - .../rockchip/rkmpp/mpp/codec/inc/rc_hal.h | 49 - .../rockchip/rkmpp/mpp/codec/inc/vp8d_api.h | 28 - .../rkmpp/mpp/codec/inc/vp8e_api_v2.h | 32 - .../rockchip/rkmpp/mpp/codec/inc/vp9d_api.h | 43 - .../rockchip/rkmpp/mpp/codec/mpp_dec.cpp | 1058 - .../rockchip/rkmpp/mpp/codec/mpp_dec_debug.h | 40 - .../rkmpp/mpp/codec/mpp_dec_no_thread.cpp | 414 - .../rkmpp/mpp/codec/mpp_dec_normal.cpp | 1179 - .../rockchip/rkmpp/mpp/codec/mpp_enc_debug.h | 47 - .../rockchip/rkmpp/mpp/codec/mpp_enc_impl.cpp | 3017 -- .../rockchip/rkmpp/mpp/codec/mpp_enc_v2.cpp | 397 - .../rockchip/rkmpp/mpp/codec/mpp_parser.cpp | 224 - .../rockchip/rkmpp/mpp/codec/mpp_rc.cpp | 245 - .../rockchip/rkmpp/mpp/codec/rc/Makefile | 12 - .../rockchip/rkmpp/mpp/codec/rc/h264e_rc.c | 42 - .../rockchip/rkmpp/mpp/codec/rc/h264e_rc.h | 31 - .../rockchip/rkmpp/mpp/codec/rc/h265e_rc.c | 42 - .../rockchip/rkmpp/mpp/codec/rc/h265e_rc.h | 31 - .../rockchip/rkmpp/mpp/codec/rc/jpege_rc.c | 42 - .../rockchip/rkmpp/mpp/codec/rc/jpege_rc.h | 31 - .../source/rockchip/rkmpp/mpp/codec/rc/rc.cpp | 229 - .../rockchip/rkmpp/mpp/codec/rc/rc_base.cpp | 195 - .../rockchip/rkmpp/mpp/codec/rc/rc_base.h | 69 - .../rockchip/rkmpp/mpp/codec/rc/rc_ctx.h | 124 - .../rockchip/rkmpp/mpp/codec/rc/rc_data.cpp | 161 - .../rkmpp/mpp/codec/rc/rc_data_base.cpp | 58 - .../rkmpp/mpp/codec/rc/rc_data_impl.cpp | 307 - .../rockchip/rkmpp/mpp/codec/rc/rc_debug.h | 49 - .../rockchip/rkmpp/mpp/codec/rc/rc_impl.cpp | 234 - .../rockchip/rkmpp/mpp/codec/rc/rc_impl.h | 69 - .../rockchip/rkmpp/mpp/codec/rc/rc_model_v2.c | 1656 -- .../rockchip/rkmpp/mpp/codec/rc/rc_model_v2.h | 40 - .../rkmpp/mpp/codec/rc/rc_model_v2_smt.c | 1114 - .../rkmpp/mpp/codec/rc/rc_model_v2_smt.h | 32 - .../rockchip/rkmpp/mpp/codec/rc/vp8e_rc.c | 167 - .../rockchip/rkmpp/mpp/codec/rc/vp8e_rc.h | 31 - .../rockchip/rkmpp/mpp/common/av1d_syntax.h | 236 - .../rockchip/rkmpp/mpp/common/avs2d_syntax.h | 90 - .../rockchip/rkmpp/mpp/common/avsd_syntax.h | 100 - .../rockchip/rkmpp/mpp/common/dxva_syntax.h | 70 - .../rockchip/rkmpp/mpp/common/h263d_syntax.h | 98 - .../rockchip/rkmpp/mpp/common/h264_syntax.h | 182 - .../rockchip/rkmpp/mpp/common/h264d_syntax.h | 440 - .../rockchip/rkmpp/mpp/common/h264e_syntax.h | 85 - .../rockchip/rkmpp/mpp/common/h265_syntax.h | 205 - .../rockchip/rkmpp/mpp/common/h265d_syntax.h | 221 - .../rockchip/rkmpp/mpp/common/h265e_syntax.h | 36 - .../rkmpp/mpp/common/h265e_syntax_new.h | 226 - .../rockchip/rkmpp/mpp/common/jpegd_syntax.h | 193 - .../rockchip/rkmpp/mpp/common/jpege_syntax.h | 92 - .../rockchip/rkmpp/mpp/common/m2vd_syntax.h | 141 - .../rockchip/rkmpp/mpp/common/mpg4d_syntax.h | 148 - .../rockchip/rkmpp/mpp/common/vp8d_syntax.h | 170 - .../rockchip/rkmpp/mpp/common/vp8e_syntax.h | 112 - .../rockchip/rkmpp/mpp/common/vp9d_syntax.h | 218 - .../source/rockchip/rkmpp/mpp/hal/Makefile | 9 - .../rockchip/rkmpp/mpp/hal/common/Makefile | 6 - .../rkmpp/mpp/hal/common/h264/Makefile | 2 - .../mpp/hal/common/h264/hal_h264e_api_v2.c | 158 - .../mpp/hal/common/h264/hal_h264e_debug.h | 51 - .../hal/common/h264/hal_h264e_stream_amend.c | 338 - .../hal/common/h264/hal_h264e_stream_amend.h | 47 - .../rkmpp/mpp/hal/common/h265/Makefile | 1 - .../mpp/hal/common/h265/hal_h265e_api_v2.c | 149 - .../mpp/hal/common/h265/hal_h265e_debug.h | 61 - .../rockchip/rkmpp/mpp/hal/common/hal_bufs.c | 259 - .../rockchip/rkmpp/mpp/hal/common/hal_bufs.h | 44 - .../rockchip/rkmpp/mpp/hal/common/hal_info.c | 291 - .../rockchip/rkmpp/mpp/hal/common/hal_info.h | 75 - .../rkmpp/mpp/hal/common/jpeg/Makefile | 2 - .../mpp/hal/common/jpeg/hal_jpege_api_v2.c | 145 - .../mpp/hal/common/jpeg/hal_jpege_debug.h | 43 - .../rkmpp/mpp/hal/common/jpeg/hal_jpege_hdr.c | 938 - .../rkmpp/mpp/hal/common/jpeg/hal_jpege_hdr.h | 47 - .../rockchip/rkmpp/mpp/hal/dummy/Makefile | 2 - .../rkmpp/mpp/hal/dummy/hal_dummy_dec_api.c | 91 - .../rkmpp/mpp/hal/dummy/hal_dummy_enc_api.c | 92 - .../rockchip/rkmpp/mpp/hal/hal_task.cpp | 254 - .../rockchip/rkmpp/mpp/hal/inc/hal_av1d_api.h | 32 - .../rkmpp/mpp/hal/inc/hal_avs2d_api.h | 32 - .../rockchip/rkmpp/mpp/hal/inc/hal_avsd_api.h | 34 - .../rockchip/rkmpp/mpp/hal/inc/hal_dec_task.h | 118 - .../rkmpp/mpp/hal/inc/hal_dummy_dec_api.h | 34 - .../rkmpp/mpp/hal/inc/hal_dummy_enc_api.h | 34 - .../rockchip/rkmpp/mpp/hal/inc/hal_enc_task.h | 155 - .../rkmpp/mpp/hal/inc/hal_h263d_api.h | 39 - .../rkmpp/mpp/hal/inc/hal_h264d_api.h | 47 - .../rkmpp/mpp/hal/inc/hal_h264e_api_v2.h | 32 - .../rkmpp/mpp/hal/inc/hal_h265d_api.h | 32 - .../rkmpp/mpp/hal/inc/hal_h265e_api_v2.h | 32 - .../rkmpp/mpp/hal/inc/hal_jpegd_api.h | 47 - .../rkmpp/mpp/hal/inc/hal_jpege_api_v2.h | 32 - .../rockchip/rkmpp/mpp/hal/inc/hal_m2vd_api.h | 41 - .../rkmpp/mpp/hal/inc/hal_mpg4d_api.h | 43 - .../rockchip/rkmpp/mpp/hal/inc/hal_task.h | 81 - .../rockchip/rkmpp/mpp/hal/inc/hal_vp8d_api.h | 34 - .../rkmpp/mpp/hal/inc/hal_vp8e_api_v2.h | 24 - .../rockchip/rkmpp/mpp/hal/inc/hal_vp9d_api.h | 32 - .../rockchip/rkmpp/mpp/hal/inc/mpp_enc_hal.h | 93 - .../rockchip/rkmpp/mpp/hal/inc/mpp_hal.h | 97 - .../rockchip/rkmpp/mpp/hal/mpp_enc_hal.cpp | 164 - .../source/rockchip/rkmpp/mpp/hal/mpp_hal.cpp | 222 - .../rockchip/rkmpp/mpp/hal/rkdec/Makefile | 8 - .../rkmpp/mpp/hal/rkdec/avs2d/Makefile | 3 - .../rkmpp/mpp/hal/rkdec/avs2d/hal_avs2d_api.c | 171 - .../mpp/hal/rkdec/avs2d/hal_avs2d_global.h | 113 - .../rkmpp/mpp/hal/rkdec/avs2d/hal_avs2d_rkv.c | 1148 - .../rkmpp/mpp/hal/rkdec/avs2d/hal_avs2d_rkv.h | 44 - .../mpp/hal/rkdec/avs2d/hal_avs2d_vdpu382.c | 1194 - .../mpp/hal/rkdec/avs2d/hal_avs2d_vdpu382.h | 44 - .../rkmpp/mpp/hal/rkdec/avsd/Makefile | 5 - .../rkmpp/mpp/hal/rkdec/avsd/hal_avsd_api.c | 312 - .../rkmpp/mpp/hal/rkdec/avsd/hal_avsd_base.c | 80 - .../rkmpp/mpp/hal/rkdec/avsd/hal_avsd_base.h | 146 - .../rkmpp/mpp/hal/rkdec/avsd/hal_avsd_plus.c | 835 - .../rkmpp/mpp/hal/rkdec/avsd/hal_avsd_plus.h | 37 - .../mpp/hal/rkdec/avsd/hal_avsd_plus_reg.h | 281 - .../rkmpp/mpp/hal/rkdec/avsd/hal_avsd_vdpu1.c | 728 - .../rkmpp/mpp/hal/rkdec/avsd/hal_avsd_vdpu1.h | 39 - .../mpp/hal/rkdec/avsd/hal_avsd_vdpu1_reg.h | 247 - .../rkmpp/mpp/hal/rkdec/avsd/hal_avsd_vdpu2.c | 727 - .../rkmpp/mpp/hal/rkdec/avsd/hal_avsd_vdpu2.h | 39 - .../mpp/hal/rkdec/avsd/hal_avsd_vdpu2_reg.h | 230 - .../rkmpp/mpp/hal/rkdec/h264d/Makefile | 7 - .../rkmpp/mpp/hal/rkdec/h264d/hal_h264d_api.c | 353 - .../mpp/hal/rkdec/h264d/hal_h264d_global.h | 139 - .../mpp/hal/rkdec/h264d/hal_h264d_rkv_reg.c | 890 - .../mpp/hal/rkdec/h264d/hal_h264d_rkv_reg.h | 250 - .../mpp/hal/rkdec/h264d/hal_h264d_vdpu1.c | 1047 - .../mpp/hal/rkdec/h264d/hal_h264d_vdpu1.h | 40 - .../mpp/hal/rkdec/h264d/hal_h264d_vdpu1_reg.h | 430 - .../mpp/hal/rkdec/h264d/hal_h264d_vdpu2.c | 1131 - .../mpp/hal/rkdec/h264d/hal_h264d_vdpu2.h | 41 - .../mpp/hal/rkdec/h264d/hal_h264d_vdpu2_reg.h | 466 - .../mpp/hal/rkdec/h264d/hal_h264d_vdpu34x.c | 1224 - .../mpp/hal/rkdec/h264d/hal_h264d_vdpu34x.h | 40 - .../mpp/hal/rkdec/h264d/hal_h264d_vdpu382.c | 1348 - .../mpp/hal/rkdec/h264d/hal_h264d_vdpu382.h | 40 - .../mpp/hal/rkdec/h264d/hal_h264d_vdpu_com.c | 523 - .../mpp/hal/rkdec/h264d/hal_h264d_vdpu_com.h | 120 - .../rkmpp/mpp/hal/rkdec/h265d/Makefile | 5 - .../rkmpp/mpp/hal/rkdec/h265d/hal_h265d_api.c | 180 - .../rkmpp/mpp/hal/rkdec/h265d/hal_h265d_com.c | 2445 -- .../rkmpp/mpp/hal/rkdec/h265d/hal_h265d_com.h | 159 - .../rkmpp/mpp/hal/rkdec/h265d/hal_h265d_ctx.h | 115 - .../mpp/hal/rkdec/h265d/hal_h265d_debug.h | 42 - .../rkmpp/mpp/hal/rkdec/h265d/hal_h265d_rkv.c | 1097 - .../rkmpp/mpp/hal/rkdec/h265d/hal_h265d_rkv.h | 35 - .../mpp/hal/rkdec/h265d/hal_h265d_rkv_reg.h | 156 - .../mpp/hal/rkdec/h265d/hal_h265d_vdpu34x.c | 1422 - .../mpp/hal/rkdec/h265d/hal_h265d_vdpu34x.h | 33 - .../mpp/hal/rkdec/h265d/hal_h265d_vdpu382.c | 1216 - .../mpp/hal/rkdec/h265d/hal_h265d_vdpu382.h | 33 - .../rkmpp/mpp/hal/rkdec/inc/vdpu34x.h | 23 - .../rkmpp/mpp/hal/rkdec/inc/vdpu34x_avs2d.h | 152 - .../rkmpp/mpp/hal/rkdec/inc/vdpu34x_com.h | 504 - .../rkmpp/mpp/hal/rkdec/inc/vdpu34x_h264d.h | 249 - .../rkmpp/mpp/hal/rkdec/inc/vdpu34x_h265d.h | 188 - .../rkmpp/mpp/hal/rkdec/inc/vdpu34x_vp9d.h | 294 - .../rkmpp/mpp/hal/rkdec/inc/vdpu382.h | 23 - .../rkmpp/mpp/hal/rkdec/inc/vdpu382_avs2d.h | 156 - .../rkmpp/mpp/hal/rkdec/inc/vdpu382_com.h | 576 - .../rkmpp/mpp/hal/rkdec/inc/vdpu382_h264d.h | 276 - .../rkmpp/mpp/hal/rkdec/inc/vdpu382_h265d.h | 212 - .../rkmpp/mpp/hal/rkdec/inc/vdpu382_vp9d.h | 319 - .../rkmpp/mpp/hal/rkdec/vdpu34x_com.c | 193 - .../rkmpp/mpp/hal/rkdec/vdpu382_com.c | 294 - .../rkmpp/mpp/hal/rkdec/vp9d/Makefile | 5 - .../rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_api.c | 171 - .../rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_com.c | 1974 -- .../rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_com.h | 99 - .../rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_ctx.h | 68 - .../rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_debug.h | 38 - .../rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_rkv.c | 691 - .../rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_rkv.h | 32 - .../mpp/hal/rkdec/vp9d/hal_vp9d_rkv_reg.h | 355 - .../mpp/hal/rkdec/vp9d/hal_vp9d_vdpu34x.c | 1094 - .../mpp/hal/rkdec/vp9d/hal_vp9d_vdpu34x.h | 32 - .../mpp/hal/rkdec/vp9d/hal_vp9d_vdpu382.c | 1100 - .../mpp/hal/rkdec/vp9d/hal_vp9d_vdpu382.h | 32 - .../rockchip/rkmpp/mpp/hal/rkenc/Makefile | 4 - .../rkmpp/mpp/hal/rkenc/common/Makefile | 3 - .../rkmpp/mpp/hal/rkenc/common/rkv_enc_def.h | 133 - .../mpp/hal/rkenc/common/vepu540c_common.c | 262 - .../mpp/hal/rkenc/common/vepu540c_common.h | 1756 -- .../mpp/hal/rkenc/common/vepu541_common.c | 1098 - .../mpp/hal/rkenc/common/vepu541_common.h | 187 - .../rkmpp/mpp/hal/rkenc/common/vepu580_tune.h | 37 - .../rkmpp/mpp/hal/rkenc/common/vepu5xx.h | 23 - .../mpp/hal/rkenc/common/vepu5xx_common.c | 80 - .../mpp/hal/rkenc/common/vepu5xx_common.h | 49 - .../rkmpp/mpp/hal/rkenc/h264e/Makefile | 4 - .../mpp/hal/rkenc/h264e/hal_h264e_vepu540c.c | 1786 -- .../mpp/hal/rkenc/h264e/hal_h264e_vepu540c.h | 24 - .../hal/rkenc/h264e/hal_h264e_vepu540c_reg.h | 1147 - .../mpp/hal/rkenc/h264e/hal_h264e_vepu541.c | 1801 -- .../mpp/hal/rkenc/h264e/hal_h264e_vepu541.h | 24 - .../hal/rkenc/h264e/hal_h264e_vepu541_reg.h | 2487 -- .../rkenc/h264e/hal_h264e_vepu541_reg_l2.h | 431 - .../mpp/hal/rkenc/h264e/hal_h264e_vepu580.c | 2539 -- .../mpp/hal/rkenc/h264e/hal_h264e_vepu580.h | 24 - .../rkenc/h264e/hal_h264e_vepu580_private.h | 116 - .../hal/rkenc/h264e/hal_h264e_vepu580_reg.h | 3015 -- .../hal/rkenc/h264e/hal_h264e_vepu580_tune.c | 346 - .../rkmpp/mpp/hal/rkenc/h265e/Makefile | 4 - .../mpp/hal/rkenc/h265e/hal_h265e_vepu540c.c | 1657 -- .../mpp/hal/rkenc/h265e/hal_h265e_vepu540c.h | 24 - .../hal/rkenc/h265e/hal_h265e_vepu540c_reg.h | 1159 - .../mpp/hal/rkenc/h265e/hal_h265e_vepu541.c | 2072 -- .../mpp/hal/rkenc/h265e/hal_h265e_vepu541.h | 25 - .../hal/rkenc/h265e/hal_h265e_vepu541_reg.h | 990 - .../rkenc/h265e/hal_h265e_vepu54x_reg_l2.h | 897 - .../mpp/hal/rkenc/h265e/hal_h265e_vepu580.c | 3176 -- .../mpp/hal/rkenc/h265e/hal_h265e_vepu580.h | 24 - .../rkenc/h265e/hal_h265e_vepu580_private.h | 120 - .../hal/rkenc/h265e/hal_h265e_vepu580_reg.h | 3340 --- .../hal/rkenc/h265e/hal_h265e_vepu580_tune.c | 593 - .../rkmpp/mpp/hal/rkenc/jpege/Makefile | 1 - .../mpp/hal/rkenc/jpege/hal_jpege_vepu540c.c | 425 - .../mpp/hal/rkenc/jpege/hal_jpege_vepu540c.h | 24 - .../hal/rkenc/jpege/hal_jpege_vepu540c_reg.h | 858 - .../rockchip/rkmpp/mpp/hal/vpu/Makefile | 10 - .../rockchip/rkmpp/mpp/hal/vpu/av1d/Makefile | 3 - .../rkmpp/mpp/hal/vpu/av1d/av1d_common.h | 840 - .../mpp/hal/vpu/av1d/film_grain_noise_table.c | 374 - .../mpp/hal/vpu/av1d/film_grain_noise_table.h | 33 - .../rkmpp/mpp/hal/vpu/av1d/hal_av1d_api.c | 187 - .../rkmpp/mpp/hal/vpu/av1d/hal_av1d_common.h | 194 - .../rkmpp/mpp/hal/vpu/av1d/hal_av1d_vdpu.c | 2393 -- .../rkmpp/mpp/hal/vpu/av1d/hal_av1d_vdpu.h | 32 - .../mpp/hal/vpu/av1d/hal_av1d_vdpu_reg.h | 2442 -- .../rkmpp/mpp/hal/vpu/common/Makefile | 1 - .../rkmpp/mpp/hal/vpu/common/vepu_common.c | 350 - .../rkmpp/mpp/hal/vpu/common/vepu_common.h | 91 - .../rockchip/rkmpp/mpp/hal/vpu/h263d/Makefile | 3 - .../rkmpp/mpp/hal/vpu/h263d/hal_h263d_api.c | 130 - .../rkmpp/mpp/hal/vpu/h263d/hal_h263d_base.h | 39 - .../rkmpp/mpp/hal/vpu/h263d/hal_h263d_vdpu1.c | 301 - .../rkmpp/mpp/hal/vpu/h263d/hal_h263d_vdpu1.h | 36 - .../mpp/hal/vpu/h263d/hal_h263d_vdpu1_reg.h | 275 - .../rkmpp/mpp/hal/vpu/h263d/hal_h263d_vdpu2.c | 302 - .../rkmpp/mpp/hal/vpu/h263d/hal_h263d_vdpu2.h | 36 - .../mpp/hal/vpu/h263d/hal_h263d_vdpu2_reg.h | 399 - .../rockchip/rkmpp/mpp/hal/vpu/h264e/Makefile | 4 - .../hal/vpu/h264e/hal_h264e_vepu1_reg_tbl.h | 234 - .../mpp/hal/vpu/h264e/hal_h264e_vepu1_v2.c | 732 - .../mpp/hal/vpu/h264e/hal_h264e_vepu1_v2.h | 24 - .../hal/vpu/h264e/hal_h264e_vepu2_reg_tbl.h | 617 - .../mpp/hal/vpu/h264e/hal_h264e_vepu2_v2.c | 797 - .../mpp/hal/vpu/h264e/hal_h264e_vepu2_v2.h | 24 - .../mpp/hal/vpu/h264e/hal_h264e_vepu_v2.c | 714 - .../mpp/hal/vpu/h264e/hal_h264e_vepu_v2.h | 218 - .../mpp/hal/vpu/h264e/hal_h264e_vpu_tbl.c | 705 - .../mpp/hal/vpu/h264e/hal_h264e_vpu_tbl.h | 34 - .../mpp/hal/vpu/h264e/hal_h264e_vpu_tbl_v2.h | 36 - .../rockchip/rkmpp/mpp/hal/vpu/jpegd/Makefile | 5 - .../rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_api.c | 184 - .../rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_base.h | 63 - .../mpp/hal/vpu/jpegd/hal_jpegd_common.c | 576 - .../mpp/hal/vpu/jpegd/hal_jpegd_common.h | 84 - .../rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_rkv.c | 797 - .../rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_rkv.h | 28 - .../mpp/hal/vpu/jpegd/hal_jpegd_rkv_reg.h | 295 - .../rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_vdpu1.c | 1070 - .../rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_vdpu1.h | 31 - .../mpp/hal/vpu/jpegd/hal_jpegd_vdpu1_reg.h | 613 - .../rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_vdpu2.c | 1051 - .../rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_vdpu2.h | 30 - .../mpp/hal/vpu/jpegd/hal_jpegd_vdpu2_reg.h | 677 - .../rockchip/rkmpp/mpp/hal/vpu/jpege/Makefile | 3 - .../rkmpp/mpp/hal/vpu/jpege/hal_jpege_base.c | 146 - .../rkmpp/mpp/hal/vpu/jpege/hal_jpege_base.h | 88 - .../mpp/hal/vpu/jpege/hal_jpege_vepu1_v2.c | 646 - .../mpp/hal/vpu/jpege/hal_jpege_vepu1_v2.h | 24 - .../mpp/hal/vpu/jpege/hal_jpege_vepu2_v2.c | 1019 - .../mpp/hal/vpu/jpege/hal_jpege_vepu2_v2.h | 24 - .../rockchip/rkmpp/mpp/hal/vpu/m2vd/Makefile | 3 - .../rkmpp/mpp/hal/vpu/m2vd/hal_m2vd_api.c | 118 - .../rkmpp/mpp/hal/vpu/m2vd/hal_m2vd_base.h | 79 - .../rkmpp/mpp/hal/vpu/m2vd/hal_m2vd_vdpu1.c | 319 - .../mpp/hal/vpu/m2vd/hal_m2vd_vdpu1_reg.h | 210 - .../rkmpp/mpp/hal/vpu/m2vd/hal_m2vd_vdpu2.c | 405 - .../mpp/hal/vpu/m2vd/hal_m2vd_vdpu2_reg.h | 208 - .../rkmpp/mpp/hal/vpu/m2vd/hal_m2vd_vpu1.h | 36 - .../rkmpp/mpp/hal/vpu/m2vd/hal_m2vd_vpu2.h | 36 - .../rockchip/rkmpp/mpp/hal/vpu/mpg4d/Makefile | 4 - .../rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_api.c | 166 - .../rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_com.c | 48 - .../rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_com.h | 57 - .../rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_vdpu1.c | 483 - .../rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_vdpu1.h | 36 - .../mpp/hal/vpu/mpg4d/hal_m4vd_vdpu1_reg.h | 276 - .../rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_vdpu2.c | 482 - .../rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_vdpu2.h | 36 - .../mpp/hal/vpu/mpg4d/hal_m4vd_vdpu2_reg.h | 397 - .../rockchip/rkmpp/mpp/hal/vpu/vp8d/Makefile | 3 - .../rkmpp/mpp/hal/vpu/vp8d/hal_vp8d_api.c | 160 - .../rkmpp/mpp/hal/vpu/vp8d/hal_vp8d_base.h | 59 - .../rkmpp/mpp/hal/vpu/vp8d/hal_vp8d_vdpu1.c | 692 - .../rkmpp/mpp/hal/vpu/vp8d/hal_vp8d_vdpu1.h | 28 - .../mpp/hal/vpu/vp8d/hal_vp8d_vdpu1_reg.h | 401 - .../rkmpp/mpp/hal/vpu/vp8d/hal_vp8d_vdpu2.c | 694 - .../rkmpp/mpp/hal/vpu/vp8d/hal_vp8d_vdpu2.h | 28 - .../mpp/hal/vpu/vp8d/hal_vp8d_vdpu2_reg.h | 414 - .../rockchip/rkmpp/mpp/hal/vpu/vp8e/Makefile | 7 - .../rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_api_v2.c | 143 - .../rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_base.c | 1673 -- .../rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_base.h | 386 - .../rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_debug.h | 56 - .../rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_entropy.c | 430 - .../rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_entropy.h | 41 - .../rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_putbit.c | 114 - .../rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_putbit.h | 55 - .../rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_table.c | 590 - .../rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_table.h | 63 - .../mpp/hal/vpu/vp8e/hal_vp8e_vepu1_reg.h | 455 - .../mpp/hal/vpu/vp8e/hal_vp8e_vepu1_v2.c | 533 - .../mpp/hal/vpu/vp8e/hal_vp8e_vepu1_v2.h | 25 - .../mpp/hal/vpu/vp8e/hal_vp8e_vepu2_reg.h | 498 - .../mpp/hal/vpu/vp8e/hal_vp8e_vepu2_v2.c | 534 - .../mpp/hal/vpu/vp8e/hal_vp8e_vepu2_v2.h | 24 - .../source/rockchip/rkmpp/mpp/inc/mpi_impl.h | 42 - .../source/rockchip/rkmpp/mpp/inc/mpp.h | 241 - .../source/rockchip/rkmpp/mpp/inc/mpp_cfg.h | 133 - .../rockchip/rkmpp/mpp/inc/mpp_dec_cfg.h | 116 - .../rockchip/rkmpp/mpp/inc/mpp_enc_cfg.h | 54 - .../source/rockchip/rkmpp/mpp/inc/mpp_impl.h | 47 - .../source/rockchip/rkmpp/mpp/inc/mpp_info.h | 31 - .../source/rockchip/rkmpp/mpp/legacy/Makefile | 7 - .../source/rockchip/rkmpp/mpp/legacy/ppOp.cpp | 244 - .../source/rockchip/rkmpp/mpp/legacy/ppOp.h | 115 - .../rockchip/rkmpp/mpp/legacy/rk_list.cpp | 426 - .../rockchip/rkmpp/mpp/legacy/rk_list.h | 49 - .../source/rockchip/rkmpp/mpp/legacy/vpu.c | 358 - .../rockchip/rkmpp/mpp/legacy/vpu_api.cpp | 459 - .../rkmpp/mpp/legacy/vpu_api_legacy.cpp | 1742 -- .../rkmpp/mpp/legacy/vpu_api_legacy.h | 100 - .../rkmpp/mpp/legacy/vpu_api_mlvec.cpp | 446 - .../rockchip/rkmpp/mpp/legacy/vpu_api_mlvec.h | 93 - .../rkmpp/mpp/legacy/vpu_mem_legacy.c | 311 - .../rkmpp/mpp/legacy/vpu_mem_legacy.h | 27 - .../source/rockchip/rkmpp/mpp/mpi.cpp | 580 - .../source/rockchip/rkmpp/mpp/mpp.cpp | 1285 - .../source/rockchip/rkmpp/mpp/mpp_impl.cpp | 464 - .../source/rockchip/rkmpp/mpp/mpp_info.cpp | 45 - .../source/rockchip/rkmpp/mpp/vproc/Makefile | 6 - .../rockchip/rkmpp/mpp/vproc/iep/Makefile | 1 - .../rockchip/rkmpp/mpp/vproc/iep/iep.cpp | 641 - .../source/rockchip/rkmpp/mpp/vproc/iep/iep.h | 239 - .../rockchip/rkmpp/mpp/vproc/iep2/Makefile | 6 - .../rockchip/rkmpp/mpp/vproc/iep2/iep2.c | 513 - .../rockchip/rkmpp/mpp/vproc/iep2/iep2.h | 159 - .../rockchip/rkmpp/mpp/vproc/iep2/iep2_ff.c | 156 - .../rockchip/rkmpp/mpp/vproc/iep2/iep2_ff.h | 53 - .../rockchip/rkmpp/mpp/vproc/iep2/iep2_gmv.c | 127 - .../rockchip/rkmpp/mpp/vproc/iep2/iep2_gmv.h | 25 - .../rockchip/rkmpp/mpp/vproc/iep2/iep2_osd.c | 181 - .../rockchip/rkmpp/mpp/vproc/iep2/iep2_osd.h | 27 - .../rockchip/rkmpp/mpp/vproc/iep2/iep2_pd.c | 258 - .../rockchip/rkmpp/mpp/vproc/iep2/iep2_pd.h | 34 - .../rockchip/rkmpp/mpp/vproc/iep2/iep2_roi.c | 39 - .../rockchip/rkmpp/mpp/vproc/iep2/iep2_roi.h | 47 - .../rockchip/rkmpp/mpp/vproc/inc/iep2_api.h | 154 - .../rockchip/rkmpp/mpp/vproc/inc/iep_api.h | 181 - .../rockchip/rkmpp/mpp/vproc/inc/iep_common.h | 133 - .../rkmpp/mpp/vproc/inc/mpp_dec_vproc.h | 57 - .../rockchip/rkmpp/mpp/vproc/inc/rga_api.h | 60 - .../rkmpp/mpp/vproc/mpp_dec_vproc.cpp | 966 - .../rkmpp/mpp/vproc/mpp_vproc_dev.cpp | 65 - .../rockchip/rkmpp/mpp/vproc/rga/Makefile | 1 - .../rockchip/rkmpp/mpp/vproc/rga/rga.cpp | 410 - .../source/rockchip/rkmpp/mpp/vproc/rga/rga.h | 187 - .../source/rockchip/rkmpp/osal/Makefile | 23 - .../rockchip/rkmpp/osal/allocator/Makefile | 5 - .../rkmpp/osal/allocator/allocator_dma_heap.c | 331 - .../rkmpp/osal/allocator/allocator_dma_heap.h | 24 - .../rkmpp/osal/allocator/allocator_drm.c | 333 - .../rkmpp/osal/allocator/allocator_drm.h | 24 - .../rkmpp/osal/allocator/allocator_ext_dma.c | 146 - .../rkmpp/osal/allocator/allocator_ext_dma.h | 24 - .../rkmpp/osal/allocator/allocator_ion.c | 494 - .../rkmpp/osal/allocator/allocator_ion.h | 24 - .../rkmpp/osal/allocator/allocator_std.c | 126 - .../rkmpp/osal/allocator/allocator_std.h | 24 - .../rockchip/rkmpp/osal/allocator/ion.h | 488 - .../rockchip/rkmpp/osal/driver/Makefile | 4 - .../rkmpp/osal/driver/inc/mpp_device_debug.h | 41 - .../rkmpp/osal/driver/inc/mpp_service_impl.h | 83 - .../rockchip/rkmpp/osal/driver/mpp_device.c | 258 - .../rockchip/rkmpp/osal/driver/mpp_server.cpp | 928 - .../rockchip/rkmpp/osal/driver/mpp_service.c | 707 - .../rkmpp/osal/driver/vcodec_service.c | 715 - .../rockchip/rkmpp/osal/inc/mpp_allocator.h | 56 - .../rockchip/rkmpp/osal/inc/mpp_callback.h | 43 - .../rockchip/rkmpp/osal/inc/mpp_common.h | 221 - .../rockchip/rkmpp/osal/inc/mpp_compat_impl.h | 26 - .../rockchip/rkmpp/osal/inc/mpp_debug.h | 107 - .../rockchip/rkmpp/osal/inc/mpp_dev_defs.h | 74 - .../rockchip/rkmpp/osal/inc/mpp_device.h | 154 - .../source/rockchip/rkmpp/osal/inc/mpp_env.h | 37 - .../rockchip/rkmpp/osal/inc/mpp_eventfd.h | 37 - .../source/rockchip/rkmpp/osal/inc/mpp_hash.h | 386 - .../source/rockchip/rkmpp/osal/inc/mpp_list.h | 215 - .../source/rockchip/rkmpp/osal/inc/mpp_lock.h | 62 - .../source/rockchip/rkmpp/osal/inc/mpp_mem.h | 82 - .../rockchip/rkmpp/osal/inc/mpp_mem_pool.h | 46 - .../rockchip/rkmpp/osal/inc/mpp_platform.h | 55 - .../rockchip/rkmpp/osal/inc/mpp_queue.h | 35 - .../rockchip/rkmpp/osal/inc/mpp_runtime.h | 37 - .../rockchip/rkmpp/osal/inc/mpp_server.h | 36 - .../rockchip/rkmpp/osal/inc/mpp_service.h | 132 - .../rockchip/rkmpp/osal/inc/mpp_service_api.h | 32 - .../source/rockchip/rkmpp/osal/inc/mpp_soc.h | 109 - .../rockchip/rkmpp/osal/inc/mpp_thread.h | 297 - .../source/rockchip/rkmpp/osal/inc/mpp_time.h | 138 - .../rockchip/rkmpp/osal/inc/mpp_trace.h | 37 - .../rockchip/rkmpp/osal/inc/osal_2str.h | 32 - .../rockchip/rkmpp/osal/inc/vcodec_service.h | 59 - .../rkmpp/osal/inc/vcodec_service_api.h | 32 - .../source/rockchip/rkmpp/osal/linux/Makefile | 4 - .../source/rockchip/rkmpp/osal/linux/drm.h | 1021 - .../rockchip/rkmpp/osal/linux/drm_mode.h | 568 - .../rockchip/rkmpp/osal/linux/os_allocator.c | 72 - .../source/rockchip/rkmpp/osal/linux/os_env.c | 66 - .../rockchip/rkmpp/osal/linux/os_log.cpp | 150 - .../source/rockchip/rkmpp/osal/linux/os_mem.c | 40 - .../rockchip/rkmpp/osal/mpp_allocator.cpp | 198 - .../rockchip/rkmpp/osal/mpp_allocator_impl.h | 33 - .../rockchip/rkmpp/osal/mpp_callback.cpp | 27 - .../source/rockchip/rkmpp/osal/mpp_common.cpp | 118 - .../source/rockchip/rkmpp/osal/mpp_compat.cpp | 112 - .../source/rockchip/rkmpp/osal/mpp_env.cpp | 42 - .../rockchip/rkmpp/osal/mpp_eventfd.cpp | 72 - .../source/rockchip/rkmpp/osal/mpp_list.cpp | 722 - .../source/rockchip/rkmpp/osal/mpp_lock.cpp | 46 - .../source/rockchip/rkmpp/osal/mpp_log.cpp | 159 - .../source/rockchip/rkmpp/osal/mpp_mem.cpp | 764 - .../rockchip/rkmpp/osal/mpp_mem_pool.cpp | 259 - .../rockchip/rkmpp/osal/mpp_platform.cpp | 193 - .../source/rockchip/rkmpp/osal/mpp_queue.cpp | 64 - .../rockchip/rkmpp/osal/mpp_runtime.cpp | 181 - .../source/rockchip/rkmpp/osal/mpp_soc.cpp | 1017 - .../source/rockchip/rkmpp/osal/mpp_thread.cpp | 152 - .../source/rockchip/rkmpp/osal/mpp_time.cpp | 582 - .../source/rockchip/rkmpp/osal/mpp_trace.cpp | 170 - .../source/rockchip/rkmpp/osal/os_allocator.h | 49 - .../source/rockchip/rkmpp/osal/os_env.h | 37 - .../source/rockchip/rkmpp/osal/os_log.h | 45 - .../source/rockchip/rkmpp/osal/os_mem.h | 34 - .../source/rockchip/rkmpp/osal/osal_2str.c | 68 - .../source/rockchip/rkmpp/utils/Makefile | 8 - .../rockchip/rkmpp/utils/camera_source.c | 412 - .../source/rockchip/rkmpp/utils/dictionary.c | 380 - .../source/rockchip/rkmpp/utils/iniparser.c | 836 - .../rockchip/rkmpp/utils/mpi_dec_utils.c | 744 - .../rockchip/rkmpp/utils/mpi_enc_utils.c | 996 - .../rockchip/rkmpp/utils/mpp_enc_roi_utils.c | 903 - .../source/rockchip/rkmpp/utils/mpp_opt.c | 143 - .../source/rockchip/rkmpp/utils/utils.c | 1514 - .../3rdparty/source/rockchip/rkrga/Kconfig | 27 - .../3rdparty/source/rockchip/rkrga/Makefile | 2 - .../source/rockchip/rkrga/new/Makefile | 11 - .../source/rockchip/rkrga/new/NormalRga.cpp | 1785 -- .../rockchip/rkrga/new/NormalRgaApi.cpp | 943 - .../source/rockchip/rkrga/new/RgaApi.cpp | 72 - .../source/rockchip/rkrga/new/RgaUtils.cpp | 383 - .../source/rockchip/rkrga/new/RockchipRga.cpp | 261 - .../source/rockchip/rkrga/new/drm_utils.cpp | 65 - .../source/rockchip/rkrga/new/im2d.cpp | 1838 -- .../source/rockchip/rkrga/new/im2d_impl.cpp | 2038 -- .../source/rockchip/rkrga/new/im2d_log.cpp | 87 - .../source/rockchip/rkrga/new/rga_sync.cpp | 140 - .../source/rockchip/rkrga/new/utils.cpp | 33 - .../source/rockchip/rkrga/old/Makefile | 7 - .../source/rockchip/rkrga/old/NormalRga.cpp | 1536 - .../rockchip/rkrga/old/NormalRgaApi.cpp | 865 - .../source/rockchip/rkrga/old/RgaApi.cpp | 73 - .../source/rockchip/rkrga/old/RgaUtils.cpp | 258 - .../source/rockchip/rkrga/old/RockchipRga.cpp | 247 - .../source/rockchip/rkrga/old/im2d.cpp | 1804 -- project/3rdparty/source/rtsp/Kconfig | 20 - project/3rdparty/source/rtsp/Makefile | 2 - .../3rdparty/source/rtsp/rtsp/Common/Makefile | 2 - .../source/rtsp/rtsp/Common/RTSPCommon.cpp | 570 - .../source/rtsp/rtsp/Common/RTSPCommonEnv.cpp | 60 - project/3rdparty/source/rtsp/rtsp/Makefile | 6 - .../source/rtsp/rtsp/OS_Common/Event.cpp | 40 - .../source/rtsp/rtsp/OS_Common/Makefile | 4 - .../source/rtsp/rtsp/OS_Common/Mutex.cpp | 26 - .../source/rtsp/rtsp/OS_Common/Semaphore.cpp | 23 - .../source/rtsp/rtsp/OS_Common/Thread.cpp | 19 - .../rtsp/rtsp/RTSPClient/Common/BitVector.cpp | 157 - .../Common/DigestAuthentication.cpp | 147 - .../rtsp/rtsp/RTSPClient/Common/Makefile | 2 - .../source/rtsp/rtsp/RTSPClient/Makefile | 4 - .../rtsp/RTSPClient/RTCP/BasicHashTable.cpp | 270 - .../rtsp/rtsp/RTSPClient/RTCP/HashTable.cpp | 34 - .../source/rtsp/rtsp/RTSPClient/RTCP/Makefile | 6 - .../rtsp/RTSPClient/RTCP/OutPacketBuffer.cpp | 130 - .../source/rtsp/rtsp/RTSPClient/RTCP/RTCP.cpp | 296 - .../rtsp/RTSPClient/RTCP/RTCPInstance.cpp | 613 - .../rtsp/RTSPClient/RTCP/rtcp_from_spec.cpp | 121 - .../rtsp/rtsp/RTSPClient/RTP/AC3RTPSource.cpp | 44 - .../rtsp/RTSPClient/RTP/H264RTPSource.cpp | 269 - .../rtsp/RTSPClient/RTP/H265RTPSource.cpp | 101 - .../rtsp/RTSPClient/RTP/JPEGRTPSource.cpp | 353 - .../rtsp/RTSPClient/RTP/MPEG4ESRTPSource.cpp | 125 - .../RTSPClient/RTP/MPEG4GenericRTPSource.cpp | 88 - .../source/rtsp/rtsp/RTSPClient/RTP/Makefile | 8 - .../rtsp/RTSPClient/RTP/RTPPacketBuffer.cpp | 262 - .../rtsp/rtsp/RTSPClient/RTP/RTPSource.cpp | 389 - .../source/rtsp/rtsp/RTSPClient/RTSP/Makefile | 2 - .../rtsp/RTSPClient/RTSP/MediaSession.cpp | 970 - .../rtsp/rtsp/RTSPClient/RTSP/RTSPClient.cpp | 2008 -- .../rtsp/rtsp/RTSPServer/Common/Makefile | 1 - .../rtsp/RTSPServer/Common/NetAddress.cpp | 31 - .../source/rtsp/rtsp/RTSPServer/Makefile | 2 - .../rtsp/RTSPServer/RTSP/ClientSocket.cpp | 53 - .../RTSP/LiveServerMediaSession.cpp | 28 - .../source/rtsp/rtsp/RTSPServer/RTSP/Makefile | 6 - .../RTSP/OnDemandServerMediaSession.cpp | 30 - .../rtsp/RTSPServer/RTSP/RTSPLiveStreamer.cpp | 180 - .../rtsp/rtsp/RTSPServer/RTSP/RTSPServer.cpp | 1381 - .../RTSPServer/RTSP/ServerMediaSession.cpp | 664 - .../3rdparty/source/rtsp/rtsp/Sock/Makefile | 3 - .../3rdparty/source/rtsp/rtsp/Sock/Sock.cpp | 167 - .../source/rtsp/rtsp/Sock/SockCommon.cpp | 536 - .../source/rtsp/rtsp/Sock/TaskScheduler.cpp | 276 - .../3rdparty/source/rtsp/rtsp/Util/Base64.cpp | 112 - .../3rdparty/source/rtsp/rtsp/Util/Makefile | 4 - .../source/rtsp/rtsp/Util/our_md5.cpp | 221 - .../source/rtsp/rtsp/Util/our_md5hl.cpp | 71 - .../3rdparty/source/rtsp/rtsp/Util/util.cpp | 61 - .../source/rtsp/simpleRtspServer/Makefile | 7 - .../simpleRtspServer/SimpleRtspServer.cpp | 60 - .../simpleRtspServer/SimpleRtspServer.hpp | 34 - .../source/rtsp/simpleRtspServer/common.h | 34 - .../source/rtsp/simpleRtspServer/queue.h | 487 - .../source/rtsp/simpleRtspServer/rtp_enc.c | 292 - .../source/rtsp/simpleRtspServer/rtp_enc.h | 28 - .../source/rtsp/simpleRtspServer/rtsp_msg.c | 1449 - .../source/rtsp/simpleRtspServer/rtsp_msg.h | 285 - .../rtsp/simpleRtspServer/simpleRtspServer.h | 193 - .../simpleRtspServer/simple_rtsp_server.c | 1972 -- .../rtsp/simpleRtspServer/stream_queue.c | 119 - .../rtsp/simpleRtspServer/stream_queue.h | 35 - .../source/rtsp/simpleRtspServer/utils.c | 458 - .../source/rtsp/simpleRtspServer/utils.h | 61 - project/Kconfig | 1 - project/Makefile | 1 - project/entry/demo.cpp | 20 - .../gui_demo/azure/guix/display/Makefile | 1 - .../azure/guix/display/drm_display_driver.c | 2 +- .../azure/guix/display/drm_display_driver2.c | 450 - project/gui/lvgl/drivers/display/drm.c | 2 +- project/gui/lvgl/src/libs/fsdrv/lv_fs_posix.c | 2 + project/gui/lvgl/src/libs/fsdrv/lv_fs_stdio.c | 17 +- project/unittest/Kconfig | 16 - project/unittest/Makefile | 4 - project/unittest/host/Kconfig | 8 - project/unittest/host/Makefile | 6 - project/unittest/host/host_unittest.cpp | 48 - project/unittest/host/host_unittest.h | 31 - project/unittest/host/libdrm/Kconfig | 28 - project/unittest/host/libdrm/Makefile | 2 - .../host_unittest_libdrm_display_example.cpp | 129 - .../unittest/host/libdrm/libdrm_unittest.cpp | 22 - .../unittest/host/libdrm/libdrm_unittest.h | 31 - project/unittest/host/libdrm/private.h | 36 - project/unittest/host/live555/Kconfig | 31 - project/unittest/host/live555/Makefile | 4 - .../unittest/host/live555/host_live555.cpp | 25 - project/unittest/host/live555/host_live555.h | 33 - .../unittest/host/live555/rtspClient/Makefile | 2 - .../host/live555/rtspClient/RTSPClient.cpp | 44 - .../host/live555/rtspClient/RTSPClient.h | 6 - .../host/live555/rtspClient/liveRTSP.cpp | 530 - .../host/live555/rtspClient/liveRTSP.hpp | 27 - .../live555/rtspServer/DynamicRTSPServer.cpp | 192 - .../live555/rtspServer/DynamicRTSPServer.h | 22 - .../unittest/host/live555/rtspServer/Makefile | 2 - .../host/live555/rtspServer/RTSPServer.cpp | 79 - .../host/live555/rtspServer/RTSPServer.h | 6 - project/unittest/host/rtsp/Kconfig | 31 - project/unittest/host/rtsp/Makefile | 3 - project/unittest/host/rtsp/private.h | 15 - project/unittest/host/rtsp/rtsp.cpp | 18 - project/unittest/host/rtsp/rtsp.h | 15 - project/unittest/host/rtsp/rtsp_client.cpp | 73 - project/unittest/host/rtsp/rtsp_server.cpp | 62 - project/unittest/host/signalslot/Kconfig | 30 - project/unittest/host/signalslot/Makefile | 3 - .../host_unittest_signal_slots_example.cpp | 32 - ...lot_threaded_producer_consumer_example.cpp | 72 - project/unittest/host/signalslot/private.h | 38 - .../host/signalslot/sigslot_unittest.cpp | 26 - .../host/signalslot/sigslot_unittest.h | 31 - project/unittest/rockchip/Kconfig | 5 - project/unittest/rockchip/Makefile | 3 - .../unittest/rockchip/rockchip_unittest.cpp | 24 - project/unittest/rockchip/rockchip_unittest.h | 31 - project/unittest/rockchip/rv11xx/Kconfig | 25 - project/unittest/rockchip/rv11xx/Makefile | 4 - project/unittest/rockchip/rv11xx/private.h | 40 - .../rockchip/rv11xx/rv11xx_unittest.cpp | 26 - .../rockchip/rv11xx/rv11xx_unittest.h | 31 - ...unittest_camera_libdrm_display_example.cpp | 129 - ...rv11xx_unittest_libdrm_display_example.cpp | 129 - project/unittest/unittest.cpp | 32 - project/unittest/unittest.h | 31 - shell/make_host.sh | 36 - shell/make_rv11xx.sh | 36 - 1678 files changed, 104 insertions(+), 445985 deletions(-) delete mode 100644 configs/host_unittest_defconfig delete mode 100644 configs/rv11xx_unittest_defconfig delete mode 100644 project/3rdparty/include/bindings/binding.hpp delete mode 100644 project/3rdparty/include/bindings/binding_evaluator.hpp delete mode 100644 project/3rdparty/include/bindings/genindex_array.hpp delete mode 100644 project/3rdparty/include/bindings/make_node.hpp delete mode 100644 project/3rdparty/include/bindings/node.hpp delete mode 100644 project/3rdparty/include/bindings/node_functions.hpp delete mode 100644 project/3rdparty/include/bindings/node_operators.hpp delete mode 100644 project/3rdparty/include/bindings/property.hpp delete mode 100644 project/3rdparty/include/bindings/property_updater.hpp delete mode 100644 project/3rdparty/include/bindings/signal.hpp delete mode 100644 project/3rdparty/include/bindings/utils.hpp delete mode 100644 project/3rdparty/include/cmdline/commandLine.hpp delete mode 100644 project/3rdparty/include/hope/application.hpp delete mode 100644 project/3rdparty/include/hope/atomicwrapper.hpp delete mode 100644 project/3rdparty/include/hope/connection.hpp delete mode 100644 project/3rdparty/include/hope/event.hpp delete mode 100644 project/3rdparty/include/hope/eventloop.hpp delete mode 100644 project/3rdparty/include/hope/hope.hpp delete mode 100644 project/3rdparty/include/hope/indexsequence.hpp delete mode 100644 project/3rdparty/include/hope/object.hpp delete mode 100644 project/3rdparty/include/hope/objectdata.hpp delete mode 100644 project/3rdparty/include/hope/objectinvoker.hpp delete mode 100644 project/3rdparty/include/hope/optional.hpp delete mode 100644 project/3rdparty/include/hope/queuedinvokationevent.hpp delete mode 100644 project/3rdparty/include/hope/signal.hpp delete mode 100644 project/3rdparty/include/hope/thread.hpp delete mode 100644 project/3rdparty/include/hope/threaddata.hpp delete mode 100644 project/3rdparty/include/hope/timer.hpp rename project/3rdparty/include/libdrm/{drm => }/drm.h (99%) delete mode 100644 project/3rdparty/include/libdrm/drm/amdgpu.h delete mode 100644 project/3rdparty/include/libdrm/drm/amdgpu_drm.h delete mode 100644 project/3rdparty/include/libdrm/drm/etnaviv_drm.h delete mode 100644 project/3rdparty/include/libdrm/drm/etnaviv_drmif.h delete mode 100644 project/3rdparty/include/libdrm/drm/exynos_drm.h delete mode 100644 project/3rdparty/include/libdrm/drm/exynos_drmif.h delete mode 100644 project/3rdparty/include/libdrm/drm/exynos_fimg2d.h delete mode 100644 project/3rdparty/include/libdrm/drm/nouveau_drm.h delete mode 100644 project/3rdparty/include/libdrm/drm/omap_drm.h delete mode 100644 project/3rdparty/include/libdrm/drm/omap_drmif.h delete mode 100644 project/3rdparty/include/libdrm/drm/rockchip_drm.h delete mode 100644 project/3rdparty/include/libdrm/drm/rockchip_drmif.h delete mode 100644 project/3rdparty/include/libdrm/drm/tegra_drm.h delete mode 100644 project/3rdparty/include/libdrm/drm/tegra_drmif.h rename project/3rdparty/include/libdrm/{drm => }/drm_fourcc.h (100%) rename project/3rdparty/include/libdrm/{drm => }/drm_mode.h (99%) delete mode 100644 project/3rdparty/include/libdrm/libdrm.h delete mode 100644 project/3rdparty/include/libdrm/util/buffer.h delete mode 100644 project/3rdparty/include/libdrm/util/common.h delete mode 100644 project/3rdparty/include/libdrm/util/cursor.h delete mode 100644 project/3rdparty/include/libdrm/util/format.h delete mode 100644 project/3rdparty/include/libdrm/util/kms.h delete mode 100644 project/3rdparty/include/libdrm/util/pattern.h delete mode 100644 project/3rdparty/include/libv4l/get_media_devices.h delete mode 100644 project/3rdparty/include/libv4l/libv4l-plugin.h delete mode 100644 project/3rdparty/include/libv4l/libv4l1-videodev.h delete mode 100644 project/3rdparty/include/libv4l/libv4l1.h delete mode 100644 project/3rdparty/include/libv4l/libv4l2.h delete mode 100644 project/3rdparty/include/libv4l/libv4l2rds.h delete mode 100644 project/3rdparty/include/libv4l/libv4l2util.h delete mode 100644 project/3rdparty/include/libv4l/libv4lconvert.h delete mode 100644 project/3rdparty/include/libv4l/media-bus-format.h delete mode 100644 project/3rdparty/include/libv4l/media.h delete mode 100644 project/3rdparty/include/libv4l/mediactl-private.h delete mode 100644 project/3rdparty/include/libv4l/mediactl.h delete mode 100644 project/3rdparty/include/libv4l/v4l2-common.h delete mode 100644 project/3rdparty/include/libv4l/v4l2-controls.h delete mode 100644 project/3rdparty/include/libv4l/v4l2-mediabus.h delete mode 100644 project/3rdparty/include/libv4l/v4l2-subdev.h delete mode 100644 project/3rdparty/include/libv4l/v4l2_driver.h delete mode 100644 project/3rdparty/include/libv4l/v4l2subdev.h delete mode 100644 project/3rdparty/include/libv4l/videodev2.h delete mode 100644 project/3rdparty/include/live555/BasicUsageEnvironment/BasicHashTable.hh delete mode 100644 project/3rdparty/include/live555/BasicUsageEnvironment/BasicUsageEnvironment.hh delete mode 100644 project/3rdparty/include/live555/BasicUsageEnvironment/BasicUsageEnvironment0.hh delete mode 100644 project/3rdparty/include/live555/BasicUsageEnvironment/BasicUsageEnvironment_version.hh delete mode 100644 project/3rdparty/include/live555/BasicUsageEnvironment/DelayQueue.hh delete mode 100644 project/3rdparty/include/live555/BasicUsageEnvironment/HandlerSet.hh delete mode 100644 project/3rdparty/include/live555/UsageEnvironment/Boolean.hh delete mode 100644 project/3rdparty/include/live555/UsageEnvironment/HashTable.hh delete mode 100644 project/3rdparty/include/live555/UsageEnvironment/UsageEnvironment.hh delete mode 100644 project/3rdparty/include/live555/UsageEnvironment/UsageEnvironment_version.hh delete mode 100644 project/3rdparty/include/live555/UsageEnvironment/strDup.hh delete mode 100644 project/3rdparty/include/live555/groupsock/GroupEId.hh delete mode 100644 project/3rdparty/include/live555/groupsock/Groupsock.hh delete mode 100644 project/3rdparty/include/live555/groupsock/GroupsockHelper.hh delete mode 100644 project/3rdparty/include/live555/groupsock/IOHandlers.hh delete mode 100644 project/3rdparty/include/live555/groupsock/NetAddress.hh delete mode 100644 project/3rdparty/include/live555/groupsock/NetCommon.h delete mode 100644 project/3rdparty/include/live555/groupsock/NetInterface.hh delete mode 100644 project/3rdparty/include/live555/groupsock/groupsock_version.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/AC3AudioFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/AC3AudioRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/AC3AudioRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/AC3AudioStreamFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/ADTSAudioFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/ADTSAudioFileSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/ADTSAudioStreamDiscreteFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/AMRAudioFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/AMRAudioFileSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/AMRAudioFileSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/AMRAudioRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/AMRAudioRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/AMRAudioSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/AVIFileSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/AudioInputDevice.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/AudioRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/Base64.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/BasicUDPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/BasicUDPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/BitVector.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/ByteStreamFileSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/ByteStreamMemoryBufferSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/ByteStreamMultiFileSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/DVVideoFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/DVVideoRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/DVVideoRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/DVVideoStreamFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/DeviceSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/DigestAuthentication.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/FileServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/FileSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/FramedFileSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/FramedFilter.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/FramedSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/GSMAudioRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/GenericMediaServer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H261VideoRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H263plusVideoFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H263plusVideoRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H263plusVideoRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H263plusVideoStreamFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H264VideoFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H264VideoFileSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H264VideoRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H264VideoRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H264VideoStreamDiscreteFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H264VideoStreamFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H264or5VideoFileSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H264or5VideoRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H264or5VideoStreamDiscreteFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H264or5VideoStreamFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H265VideoFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H265VideoFileSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H265VideoRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H265VideoRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H265VideoStreamDiscreteFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/H265VideoStreamFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/HLSSegmenter.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/HMAC_SHA1.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/HMAC_hash.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/InputFile.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/JPEG2000VideoRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/JPEG2000VideoRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/JPEGVideoRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/JPEGVideoRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/JPEGVideoSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/Locale.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MIKEY.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MP3ADU.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MP3ADURTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MP3ADURTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MP3ADUTranscoder.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MP3ADUinterleaving.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MP3AudioFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MP3FileSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MP3Transcoder.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG1or2AudioRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG1or2AudioRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG1or2AudioStreamFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG1or2Demux.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG1or2DemuxedElementaryStream.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG1or2DemuxedServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG1or2FileServerDemux.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG1or2VideoFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG1or2VideoRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG1or2VideoRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG1or2VideoStreamDiscreteFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG1or2VideoStreamFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG2IndexFromTransportStream.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG2TransportFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamAccumulator.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamDemux.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamFromESSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamFromPESSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamIndexFile.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamMultiplexor.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamTrickModeFilter.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG2TransportUDPServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG4ESVideoRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG4ESVideoRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG4GenericRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG4GenericRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG4LATMAudioRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG4LATMAudioRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG4VideoFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG4VideoStreamDiscreteFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEG4VideoStreamFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MPEGVideoStreamFramer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MatroskaFile.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MatroskaFileServerDemux.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/Media.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MediaSession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MediaSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MediaSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MediaTranscodingTable.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MultiFramedRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/MultiFramedRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/OggFile.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/OggFileServerDemux.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/OggFileSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/OnDemandServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/OutputFile.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/PassiveServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/ProxyServerMediaSession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/QCELPAudioRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/QuickTimeFileSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/QuickTimeGenericRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/RTCP.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/RTPInterface.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/RTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/RTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/RTSPClient.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/RTSPCommon.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/RTSPRegisterSender.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/RTSPServer.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/RawVideoFrameParameters.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/RawVideoRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/RawVideoRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/SIPClient.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/SRTPCryptographicContext.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/ServerMediaSession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/SimpleRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/SimpleRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/StreamReplicator.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/T140TextRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/TLSState.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/TextRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/TheoraVideoRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/TheoraVideoRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/VP8VideoRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/VP8VideoRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/VP9VideoRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/VP9VideoRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/VideoRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/VorbisAudioRTPSink.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/VorbisAudioRTPSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/WAVAudioFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/WAVAudioFileSource.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/liveMedia.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/liveMedia_version.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/ourMD5.hh delete mode 100644 project/3rdparty/include/live555/liveMedia/uLawAudioFilter.hh delete mode 100644 project/3rdparty/include/live555/readme.txt delete mode 100644 project/3rdparty/include/media/drm_media_api.h delete mode 100644 project/3rdparty/include/media/drm_media_buffer.h delete mode 100644 project/3rdparty/include/media/drm_media_common.h delete mode 100644 project/3rdparty/include/media/drm_media_rga.h delete mode 100644 project/3rdparty/include/media/drm_media_vdec.h delete mode 100644 project/3rdparty/include/media/drm_media_venc.h delete mode 100644 project/3rdparty/include/media/drm_media_vi.h delete mode 100644 project/3rdparty/include/media/drm_media_vmix.h delete mode 100644 project/3rdparty/include/media/drm_media_vo.h delete mode 100644 project/3rdparty/include/media/drm_media_vp.h delete mode 100644 project/3rdparty/include/media/utils/buffer.h delete mode 100644 project/3rdparty/include/media/utils/codec.h delete mode 100644 project/3rdparty/include/media/utils/control.h delete mode 100644 project/3rdparty/include/media/utils/decoder.h delete mode 100644 project/3rdparty/include/media/utils/demuxer.h delete mode 100644 project/3rdparty/include/media/utils/encoder.h delete mode 100644 project/3rdparty/include/media/utils/filter.h delete mode 100644 project/3rdparty/include/media/utils/flow.h delete mode 100644 project/3rdparty/include/media/utils/image.h delete mode 100644 project/3rdparty/include/media/utils/key_string.h delete mode 100644 project/3rdparty/include/media/utils/link_config.h delete mode 100644 project/3rdparty/include/media/utils/lock.h delete mode 100644 project/3rdparty/include/media/utils/media_config.h delete mode 100644 project/3rdparty/include/media/utils/media_reflector.h delete mode 100644 project/3rdparty/include/media/utils/media_type.h delete mode 100644 project/3rdparty/include/media/utils/message.h delete mode 100644 project/3rdparty/include/media/utils/message_type.h delete mode 100644 project/3rdparty/include/media/utils/muxer.h delete mode 100644 project/3rdparty/include/media/utils/reflector.h delete mode 100644 project/3rdparty/include/media/utils/rga_filter.h delete mode 100644 project/3rdparty/include/media/utils/sound.h delete mode 100644 project/3rdparty/include/media/utils/stream.h delete mode 100644 project/3rdparty/include/media/utils/utils.h delete mode 100644 project/3rdparty/include/nlohmann/fifomap.hpp delete mode 100755 project/3rdparty/include/nlohmann/json.hpp delete mode 100644 project/3rdparty/include/nlohmann/json_fwd.hpp delete mode 100644 project/3rdparty/include/rockchip/rkmpp/mpp_buffer.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/mpp_compat.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/mpp_err.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/mpp_frame.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/mpp_log.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/mpp_log_def.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/mpp_meta.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/mpp_packet.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/mpp_rc_api.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/mpp_rc_defs.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/mpp_task.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/rk_hdr_meta_com.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/rk_mpi.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/rk_mpi_cmd.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/rk_type.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/rk_vdec_cfg.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/rk_vdec_cmd.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/rk_venc_cfg.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/rk_venc_cmd.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/rk_venc_rc.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/rk_venc_ref.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/utils/camera_source.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/utils/dictionary.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/utils/iniparser.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/utils/mpi_dec_utils.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/utils/mpi_enc_utils.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/utils/mpp_enc_roi_utils.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/utils/mpp_opt.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/utils/utils.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/vpu.h delete mode 100644 project/3rdparty/include/rockchip/rkmpp/vpu_api.h delete mode 100644 project/3rdparty/include/rockchip/rkrga/NormalRga.h delete mode 100644 project/3rdparty/include/rockchip/rkrga/NormalRgaContext.h delete mode 100644 project/3rdparty/include/rockchip/rkrga/RgaApi.h delete mode 100644 project/3rdparty/include/rockchip/rkrga/RgaMutex.h delete mode 100644 project/3rdparty/include/rockchip/rkrga/RgaSingleton.h delete mode 100644 project/3rdparty/include/rockchip/rkrga/RgaUtils.h delete mode 100644 project/3rdparty/include/rockchip/rkrga/RockchipRga.h delete mode 100644 project/3rdparty/include/rockchip/rkrga/drmrga.h delete mode 100644 project/3rdparty/include/rockchip/rkrga/im2d.h delete mode 100644 project/3rdparty/include/rockchip/rkrga/rga.h delete mode 100644 project/3rdparty/include/rockchip/rkrga/rgadbg.h delete mode 100644 project/3rdparty/include/rockchip/rkrga/version.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/NormalRga.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/NormalRgaContext.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/RgaApi.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/RgaMutex.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/RgaSingleton.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/RgaUtils.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/RockchipRga.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/drm_utils.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/drmrga.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/im2d.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/im2d.hpp delete mode 100755 project/3rdparty/include/rockchip/rkrgax/im2d_buffer.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/im2d_common.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/im2d_expand.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/im2d_hardware.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/im2d_impl.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/im2d_log.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/im2d_mpi.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/im2d_single.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/im2d_task.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/im2d_type.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/im2d_version.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/rga.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/rga2_driver.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/rga_ioctl.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/rga_sync.h delete mode 100644 project/3rdparty/include/rockchip/rkrgax/rgadbg.h delete mode 100755 project/3rdparty/include/rockchip/rkrgax/utils.h delete mode 100644 project/3rdparty/include/rtsp/internal/AC3RTPSource.h delete mode 100644 project/3rdparty/include/rtsp/internal/Base64.hh delete mode 100644 project/3rdparty/include/rtsp/internal/BasicHashTable.hh delete mode 100644 project/3rdparty/include/rtsp/internal/BitVector.hh delete mode 100644 project/3rdparty/include/rtsp/internal/ClientSocket.h delete mode 100644 project/3rdparty/include/rtsp/internal/DigestAuthentication.hh delete mode 100644 project/3rdparty/include/rtsp/internal/Event.h delete mode 100644 project/3rdparty/include/rtsp/internal/H264RTPSource.h delete mode 100644 project/3rdparty/include/rtsp/internal/H265RTPSource.h delete mode 100644 project/3rdparty/include/rtsp/internal/HashTable.hh delete mode 100644 project/3rdparty/include/rtsp/internal/JPEGRTPSource.h delete mode 100644 project/3rdparty/include/rtsp/internal/List.h delete mode 100644 project/3rdparty/include/rtsp/internal/LiveServerMediaSession.h delete mode 100644 project/3rdparty/include/rtsp/internal/MPEG4ESRTPSource.h delete mode 100644 project/3rdparty/include/rtsp/internal/MPEG4GenericRTPSource.h delete mode 100644 project/3rdparty/include/rtsp/internal/MediaSession.h delete mode 100644 project/3rdparty/include/rtsp/internal/Mutex.h delete mode 100644 project/3rdparty/include/rtsp/internal/NetAddress.h delete mode 100644 project/3rdparty/include/rtsp/internal/NetCommon.h delete mode 100644 project/3rdparty/include/rtsp/internal/OnDemandServerMediaSession.h delete mode 100644 project/3rdparty/include/rtsp/internal/OutPacketBuffer.h delete mode 100644 project/3rdparty/include/rtsp/internal/RTCP.h delete mode 100644 project/3rdparty/include/rtsp/internal/RTCPInstance.h delete mode 100644 project/3rdparty/include/rtsp/internal/RTPPacketBuffer.h delete mode 100644 project/3rdparty/include/rtsp/internal/RTPSource.h delete mode 100644 project/3rdparty/include/rtsp/internal/RTSPClient.h delete mode 100644 project/3rdparty/include/rtsp/internal/RTSPCommon.h delete mode 100644 project/3rdparty/include/rtsp/internal/RTSPCommonEnv.h delete mode 100644 project/3rdparty/include/rtsp/internal/RTSPLiveStreamer.h delete mode 100644 project/3rdparty/include/rtsp/internal/RTSPServer.h delete mode 100644 project/3rdparty/include/rtsp/internal/Semaphore.h delete mode 100644 project/3rdparty/include/rtsp/internal/ServerMediaSession.h delete mode 100644 project/3rdparty/include/rtsp/internal/Sock.h delete mode 100644 project/3rdparty/include/rtsp/internal/SockCommon.h delete mode 100644 project/3rdparty/include/rtsp/internal/TaskScheduler.h delete mode 100644 project/3rdparty/include/rtsp/internal/Thread.h delete mode 100644 project/3rdparty/include/rtsp/internal/our_md5.h delete mode 100644 project/3rdparty/include/rtsp/internal/rtcp_from_spec.h delete mode 100644 project/3rdparty/include/rtsp/internal/util.h delete mode 100644 project/3rdparty/include/rtsp/rtsp.hpp delete mode 100644 project/3rdparty/source/hope/Kconfig delete mode 100644 project/3rdparty/source/hope/Makefile delete mode 100644 project/3rdparty/source/hope/application.cpp delete mode 100644 project/3rdparty/source/hope/eventloop.cpp delete mode 100644 project/3rdparty/source/hope/object.cpp delete mode 100644 project/3rdparty/source/hope/objectdata.cpp delete mode 100644 project/3rdparty/source/hope/thread.cpp delete mode 100644 project/3rdparty/source/hope/threaddata.cpp delete mode 100644 project/3rdparty/source/hope/timer.cpp delete mode 100644 project/3rdparty/source/libdrm/amdgpu/Makefile delete mode 100644 project/3rdparty/source/libdrm/amdgpu/amdgpu.ids delete mode 100644 project/3rdparty/source/libdrm/amdgpu/amdgpu_asic_id.c delete mode 100644 project/3rdparty/source/libdrm/amdgpu/amdgpu_bo.c delete mode 100644 project/3rdparty/source/libdrm/amdgpu/amdgpu_cs.c delete mode 100644 project/3rdparty/source/libdrm/amdgpu/amdgpu_device.c delete mode 100644 project/3rdparty/source/libdrm/amdgpu/amdgpu_gpu_info.c delete mode 100644 project/3rdparty/source/libdrm/amdgpu/amdgpu_internal.h delete mode 100644 project/3rdparty/source/libdrm/amdgpu/amdgpu_vamgr.c delete mode 100644 project/3rdparty/source/libdrm/amdgpu/amdgpu_vm.c delete mode 100644 project/3rdparty/source/libdrm/amdgpu/handle_table.c delete mode 100644 project/3rdparty/source/libdrm/amdgpu/handle_table.h delete mode 100644 project/3rdparty/source/libdrm/etnaviv/Makefile delete mode 100644 project/3rdparty/source/libdrm/etnaviv/etnaviv_bo.c delete mode 100644 project/3rdparty/source/libdrm/etnaviv/etnaviv_bo_cache.c delete mode 100644 project/3rdparty/source/libdrm/etnaviv/etnaviv_cmd_stream.c delete mode 100644 project/3rdparty/source/libdrm/etnaviv/etnaviv_device.c delete mode 100644 project/3rdparty/source/libdrm/etnaviv/etnaviv_gpu.c delete mode 100644 project/3rdparty/source/libdrm/etnaviv/etnaviv_perfmon.c delete mode 100644 project/3rdparty/source/libdrm/etnaviv/etnaviv_pipe.c delete mode 100644 project/3rdparty/source/libdrm/etnaviv/etnaviv_priv.h delete mode 100644 project/3rdparty/source/libdrm/exynos/Makefile delete mode 100644 project/3rdparty/source/libdrm/exynos/exynos_drm.c delete mode 100644 project/3rdparty/source/libdrm/exynos/exynos_fimg2d.c delete mode 100644 project/3rdparty/source/libdrm/exynos/fimg2d_reg.h delete mode 100644 project/3rdparty/source/libdrm/generated_static_table_fourcc.h delete mode 100644 project/3rdparty/source/libdrm/nouveau/Makefile delete mode 100644 project/3rdparty/source/libdrm/nouveau/abi16.c delete mode 100644 project/3rdparty/source/libdrm/nouveau/bufctx.c delete mode 100644 project/3rdparty/source/libdrm/nouveau/nouveau.c delete mode 100644 project/3rdparty/source/libdrm/nouveau/nouveau.h delete mode 100644 project/3rdparty/source/libdrm/nouveau/nvif/cl0080.h delete mode 100644 project/3rdparty/source/libdrm/nouveau/nvif/cl9097.h delete mode 100644 project/3rdparty/source/libdrm/nouveau/nvif/class.h delete mode 100644 project/3rdparty/source/libdrm/nouveau/nvif/if0002.h delete mode 100644 project/3rdparty/source/libdrm/nouveau/nvif/if0003.h delete mode 100644 project/3rdparty/source/libdrm/nouveau/nvif/ioctl.h delete mode 100644 project/3rdparty/source/libdrm/nouveau/nvif/unpack.h delete mode 100644 project/3rdparty/source/libdrm/nouveau/private.h delete mode 100644 project/3rdparty/source/libdrm/nouveau/pushbuf.c delete mode 100644 project/3rdparty/source/libdrm/omap/Makefile delete mode 100644 project/3rdparty/source/libdrm/omap/omap_drm.c delete mode 100644 project/3rdparty/source/libdrm/rockchip/Makefile delete mode 100644 project/3rdparty/source/libdrm/rockchip/rga_reg.h delete mode 100644 project/3rdparty/source/libdrm/rockchip/rockchip_drm.c delete mode 100644 project/3rdparty/source/libdrm/rockchip/rockchip_rga.c delete mode 100644 project/3rdparty/source/libdrm/rockchip/rockchip_rga.h delete mode 100644 project/3rdparty/source/libdrm/tegra/Makefile delete mode 100644 project/3rdparty/source/libdrm/tegra/channel.c delete mode 100644 project/3rdparty/source/libdrm/tegra/job.c delete mode 100644 project/3rdparty/source/libdrm/tegra/private.h delete mode 100644 project/3rdparty/source/libdrm/tegra/pushbuf.c delete mode 100644 project/3rdparty/source/libdrm/tegra/syncpt.c delete mode 100644 project/3rdparty/source/libdrm/tegra/tegra.c delete mode 100644 project/3rdparty/source/libdrm/tools/Makefile delete mode 100644 project/3rdparty/source/libdrm/tools/modeprint.c delete mode 100644 project/3rdparty/source/libdrm/tools/modetest.c delete mode 100644 project/3rdparty/source/libdrm/tools/util/Makefile delete mode 100644 project/3rdparty/source/libdrm/tools/util/buffer.c delete mode 100644 project/3rdparty/source/libdrm/tools/util/cursor.c delete mode 100644 project/3rdparty/source/libdrm/tools/util/format.c delete mode 100644 project/3rdparty/source/libdrm/tools/util/kms.c delete mode 100644 project/3rdparty/source/libdrm/tools/util/pattern.c delete mode 100644 project/3rdparty/source/libv4l/Kconfig delete mode 100644 project/3rdparty/source/libv4l/Makefile delete mode 100644 project/3rdparty/source/libv4l/config.h delete mode 100644 project/3rdparty/source/libv4l/libmedia_dev/Makefile delete mode 100644 project/3rdparty/source/libv4l/libmedia_dev/get_media_devices.c delete mode 100644 project/3rdparty/source/libv4l/libv4l-mplane/Makefile delete mode 100644 project/3rdparty/source/libv4l/libv4l-mplane/libv4l-mplane.c delete mode 100644 project/3rdparty/source/libv4l/libv4l1/Makefile delete mode 100644 project/3rdparty/source/libv4l/libv4l1/libv4l1-priv.h delete mode 100644 project/3rdparty/source/libv4l/libv4l1/libv4l1.c delete mode 100644 project/3rdparty/source/libv4l/libv4l1/log.c delete mode 100644 project/3rdparty/source/libv4l/libv4l1/v4l1compat.c delete mode 100644 project/3rdparty/source/libv4l/libv4l2/Makefile delete mode 100644 project/3rdparty/source/libv4l/libv4l2/libv4l2-priv.h delete mode 100644 project/3rdparty/source/libv4l/libv4l2/libv4l2.c delete mode 100644 project/3rdparty/source/libv4l/libv4l2/log.c delete mode 100644 project/3rdparty/source/libv4l/libv4l2/v4l2-plugin.c delete mode 100644 project/3rdparty/source/libv4l/libv4l2/v4l2convert.c delete mode 100644 project/3rdparty/source/libv4l/libv4l2rds/Makefile delete mode 100644 project/3rdparty/source/libv4l/libv4l2rds/libv4l2rds.c delete mode 100644 project/3rdparty/source/libv4l/libv4l2utls/Makefile delete mode 100644 project/3rdparty/source/libv4l/libv4l2utls/frequencies.c delete mode 100644 project/3rdparty/source/libv4l/libv4l2utls/v4l2_driver.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/Makefile delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/bayer.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/control/Makefile delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/control/libv4lcontrol-priv.h delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/control/libv4lcontrol.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/control/libv4lcontrol.h delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/cpia1.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/crop.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/flip.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/helper-funcs.h delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/helper.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/jidctflt.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/jl2005bcd.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/jpeg.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/jpeg_memsrcdest.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/jpeg_memsrcdest.h delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/jpgl.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/libv4lconvert-priv.h delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/libv4lconvert.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/libv4lsyscall-priv.h delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/mr97310a.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/nv12_16l16.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/pac207.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/processing/Makefile delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/processing/autogain.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/processing/gamma.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/processing/libv4lprocessing-priv.h delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/processing/libv4lprocessing.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/processing/libv4lprocessing.h delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/processing/whitebalance.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/rgbyuv.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/se401.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/sn9c10x.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/sn9c2028-decomp.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/sn9c20x.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/spca501.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/spca561-decompress.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/sq905c.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/stv0680.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/tinyjpeg-internal.h delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/tinyjpeg.c delete mode 100644 project/3rdparty/source/libv4l/libv4lconvert/tinyjpeg.h delete mode 100644 project/3rdparty/source/libv4l/media-ctl/Makefile delete mode 100644 project/3rdparty/source/libv4l/media-ctl/libmediactl.c delete mode 100644 project/3rdparty/source/libv4l/media-ctl/libv4l2subdev.c delete mode 100644 project/3rdparty/source/live555/BasicUsageEnvironment/BasicHashTable.cpp delete mode 100644 project/3rdparty/source/live555/BasicUsageEnvironment/BasicTaskScheduler.cpp delete mode 100644 project/3rdparty/source/live555/BasicUsageEnvironment/BasicTaskScheduler0.cpp delete mode 100644 project/3rdparty/source/live555/BasicUsageEnvironment/BasicUsageEnvironment.cpp delete mode 100644 project/3rdparty/source/live555/BasicUsageEnvironment/BasicUsageEnvironment0.cpp delete mode 100644 project/3rdparty/source/live555/BasicUsageEnvironment/DelayQueue.cpp delete mode 100644 project/3rdparty/source/live555/BasicUsageEnvironment/Makefile delete mode 100644 project/3rdparty/source/live555/Kconfig delete mode 100644 project/3rdparty/source/live555/Makefile delete mode 100644 project/3rdparty/source/live555/UsageEnvironment/HashTable.cpp delete mode 100644 project/3rdparty/source/live555/UsageEnvironment/Makefile delete mode 100644 project/3rdparty/source/live555/UsageEnvironment/UsageEnvironment.cpp delete mode 100644 project/3rdparty/source/live555/UsageEnvironment/strDup.cpp delete mode 100644 project/3rdparty/source/live555/groupsock/GroupEId.cpp delete mode 100644 project/3rdparty/source/live555/groupsock/Groupsock.cpp delete mode 100644 project/3rdparty/source/live555/groupsock/GroupsockHelper.cpp delete mode 100644 project/3rdparty/source/live555/groupsock/IOHandlers.cpp delete mode 100644 project/3rdparty/source/live555/groupsock/Makefile delete mode 100644 project/3rdparty/source/live555/groupsock/NetAddress.cpp delete mode 100644 project/3rdparty/source/live555/groupsock/NetInterface.cpp delete mode 100644 project/3rdparty/source/live555/groupsock/inet.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/AC3AudioFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/AC3AudioRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/AC3AudioRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/AC3AudioStreamFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/ADTSAudioFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/ADTSAudioFileSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/ADTSAudioStreamDiscreteFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/AMRAudioFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/AMRAudioFileSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/AMRAudioFileSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/AMRAudioRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/AMRAudioRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/AMRAudioSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/AVIFileSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/AudioInputDevice.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/AudioRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/Base64.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/BasicUDPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/BasicUDPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/BitVector.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/ByteStreamFileSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/ByteStreamMemoryBufferSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/ByteStreamMultiFileSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/DVVideoFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/DVVideoRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/DVVideoRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/DVVideoStreamFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/DeviceSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/DigestAuthentication.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/EBMLNumber.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/EBMLNumber.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/FileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/FileSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/FramedFileSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/FramedFilter.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/FramedSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/GSMAudioRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/GenericMediaServer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H261VideoRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H263plusVideoFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H263plusVideoRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H263plusVideoRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H263plusVideoStreamFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H263plusVideoStreamParser.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H263plusVideoStreamParser.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/H264VideoFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H264VideoFileSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H264VideoRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H264VideoRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H264VideoStreamDiscreteFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H264VideoStreamFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H264or5VideoFileSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H264or5VideoRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H264or5VideoStreamDiscreteFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H264or5VideoStreamFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H265VideoFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H265VideoFileSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H265VideoRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H265VideoRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H265VideoStreamDiscreteFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/H265VideoStreamFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/HLSSegmenter.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/HMAC_SHA1.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/InputFile.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/JPEG2000VideoRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/JPEG2000VideoRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/JPEGVideoRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/JPEGVideoRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/JPEGVideoSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/Locale.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MIKEY.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3ADU.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3ADURTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3ADURTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3ADUTranscoder.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3ADUdescriptor.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3ADUdescriptor.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3ADUinterleaving.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3AudioFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3AudioMatroskaFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3AudioMatroskaFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3FileSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3Internals.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3Internals.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3InternalsHuffman.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3InternalsHuffman.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3InternalsHuffmanTable.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3StreamState.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3StreamState.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/MP3Transcoder.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG1or2AudioRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG1or2AudioRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG1or2AudioStreamFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG1or2Demux.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG1or2DemuxedElementaryStream.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG1or2DemuxedServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG1or2FileServerDemux.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG1or2VideoFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG1or2VideoRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG1or2VideoRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG1or2VideoStreamDiscreteFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG1or2VideoStreamFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2IndexFromTransportStream.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamAccumulator.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamDemux.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamDemuxedTrack.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamDemuxedTrack.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamFromESSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamFromPESSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamIndexFile.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamMultiplexor.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamParser.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamParser.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamParser_PAT.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamParser_PMT.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamParser_STREAM.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportStreamTrickModeFilter.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG2TransportUDPServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG4ESVideoRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG4ESVideoRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG4GenericRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG4GenericRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG4LATMAudioRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG4LATMAudioRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG4VideoFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG4VideoStreamDiscreteFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEG4VideoStreamFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEGVideoStreamFramer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEGVideoStreamParser.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MPEGVideoStreamParser.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/Makefile delete mode 100644 project/3rdparty/source/live555/liveMedia/MatroskaDemuxedTrack.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MatroskaDemuxedTrack.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/MatroskaFile.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MatroskaFileParser.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MatroskaFileParser.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/MatroskaFileServerDemux.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MatroskaFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MatroskaFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/Media.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MediaSession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MediaSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MediaSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MultiFramedRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/MultiFramedRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/OggDemuxedTrack.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/OggDemuxedTrack.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/OggFile.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/OggFileParser.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/OggFileParser.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/OggFileServerDemux.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/OggFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/OggFileServerMediaSubsession.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/OggFileSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/OnDemandServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/OutputFile.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/PassiveServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/ProxyServerMediaSession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/QCELPAudioRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/QuickTimeFileSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/QuickTimeGenericRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/RTCP.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/RTPInterface.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/RTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/RTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/RTSPClient.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/RTSPCommon.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/RTSPRegisterSender.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/RTSPServer.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/RTSPServerRegister.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/RawVideoRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/RawVideoRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/SIPClient.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/SRTPCryptographicContext.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/ServerMediaSession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/SimpleRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/SimpleRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/StreamParser.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/StreamParser.hh delete mode 100644 project/3rdparty/source/live555/liveMedia/StreamReplicator.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/T140TextRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/TLSState.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/TextRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/TheoraVideoRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/TheoraVideoRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/VP8VideoRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/VP8VideoRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/VP9VideoRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/VP9VideoRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/VideoRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/VorbisAudioRTPSink.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/VorbisAudioRTPSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/WAVAudioFileServerMediaSubsession.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/WAVAudioFileSource.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/ourMD5.cpp delete mode 100644 project/3rdparty/source/live555/liveMedia/rtcp_from_spec.c delete mode 100644 project/3rdparty/source/live555/liveMedia/rtcp_from_spec.h delete mode 100644 project/3rdparty/source/live555/liveMedia/uLawAudioFilter.cpp delete mode 100644 project/3rdparty/source/media/Kconfig delete mode 100644 project/3rdparty/source/media/Makefile delete mode 100644 project/3rdparty/source/media/drm/Makefile delete mode 100644 project/3rdparty/source/media/drm/drm_output_stream.cpp delete mode 100644 project/3rdparty/source/media/drm/drm_stream.cpp delete mode 100644 project/3rdparty/source/media/drm/drm_stream.h delete mode 100644 project/3rdparty/source/media/drm/drm_utils.cpp delete mode 100644 project/3rdparty/source/media/drm/drm_utils.h delete mode 100644 project/3rdparty/source/media/media/Makefile delete mode 100644 project/3rdparty/source/media/media/buffer.cpp delete mode 100644 project/3rdparty/source/media/media/codec.cpp delete mode 100644 project/3rdparty/source/media/media/decoder.cpp delete mode 100644 project/3rdparty/source/media/media/demuxer.cpp delete mode 100644 project/3rdparty/source/media/media/drm_media_api.cpp delete mode 100644 project/3rdparty/source/media/media/drm_media_buffer.cpp delete mode 100644 project/3rdparty/source/media/media/drm_media_buffer_impl.h delete mode 100644 project/3rdparty/source/media/media/drm_media_vo.cpp delete mode 100644 project/3rdparty/source/media/media/encoder.cpp delete mode 100644 project/3rdparty/source/media/media/file_stream.cpp delete mode 100644 project/3rdparty/source/media/media/filter.cpp delete mode 100644 project/3rdparty/source/media/media/flow.cpp delete mode 100644 project/3rdparty/source/media/media/flow/Makefile delete mode 100644 project/3rdparty/source/media/media/flow/audio_decoder_flow.cpp delete mode 100644 project/3rdparty/source/media/media/flow/audio_encoder_flow.cpp delete mode 100644 project/3rdparty/source/media/media/flow/decoder_flow.cpp delete mode 100644 project/3rdparty/source/media/media/flow/file_flow.cpp delete mode 100644 project/3rdparty/source/media/media/flow/filter_flow.cpp delete mode 100644 project/3rdparty/source/media/media/flow/link_flow.cpp delete mode 100644 project/3rdparty/source/media/media/flow/muxer_flow.cpp delete mode 100644 project/3rdparty/source/media/media/flow/muxer_flow.h delete mode 100644 project/3rdparty/source/media/media/flow/output_stream_flow.cpp delete mode 100644 project/3rdparty/source/media/media/flow/source_stream_flow.cpp delete mode 100644 project/3rdparty/source/media/media/flow/video_encoder_flow.cpp delete mode 100644 project/3rdparty/source/media/media/guard/Makefile delete mode 100644 project/3rdparty/source/media/media/guard/through_guard.cpp delete mode 100644 project/3rdparty/source/media/media/image.cpp delete mode 100644 project/3rdparty/source/media/media/lock.cpp delete mode 100644 project/3rdparty/source/media/media/media_config.cpp delete mode 100644 project/3rdparty/source/media/media/media_type.cpp delete mode 100644 project/3rdparty/source/media/media/media_utils.cpp delete mode 100644 project/3rdparty/source/media/media/media_utils.h delete mode 100644 project/3rdparty/source/media/media/message.cpp delete mode 100644 project/3rdparty/source/media/media/muxer.cpp delete mode 100644 project/3rdparty/source/media/media/osd/Makefile delete mode 100644 project/3rdparty/source/media/media/osd/color_table.cpp delete mode 100644 project/3rdparty/source/media/media/osd/color_table.h delete mode 100644 project/3rdparty/source/media/media/rkmpp/Makefile delete mode 100644 project/3rdparty/source/media/media/rkmpp/mpp_decoder.cpp delete mode 100644 project/3rdparty/source/media/media/rkmpp/mpp_decoder.h delete mode 100644 project/3rdparty/source/media/media/rkmpp/mpp_encoder.cpp delete mode 100644 project/3rdparty/source/media/media/rkmpp/mpp_encoder.h delete mode 100644 project/3rdparty/source/media/media/rkmpp/mpp_final_encoder.cpp delete mode 100644 project/3rdparty/source/media/media/rkmpp/mpp_inc.cpp delete mode 100644 project/3rdparty/source/media/media/rkmpp/mpp_inc.h delete mode 100644 project/3rdparty/source/media/media/rkmpp/mpp_jpeg_fd_info.h delete mode 100644 project/3rdparty/source/media/media/rkmpp/mpp_jpeg_packet.cpp delete mode 100644 project/3rdparty/source/media/media/rkmpp/mpp_jpeg_packet.h delete mode 100644 project/3rdparty/source/media/media/rkrga/Makefile delete mode 100644 project/3rdparty/source/media/media/rkrga/rkrga.cpp delete mode 100644 project/3rdparty/source/media/media/sound.cpp delete mode 100644 project/3rdparty/source/media/media/stream.cpp delete mode 100644 project/3rdparty/source/media/media/utils.cpp delete mode 100644 project/3rdparty/source/media/v4l2/Makefile delete mode 100644 project/3rdparty/source/media/v4l2/rkaiq/Makefile delete mode 100644 project/3rdparty/source/media/v4l2/rkaiq/rkaiq_media.cpp delete mode 100644 project/3rdparty/source/media/v4l2/rkaiq/rkaiq_media.h delete mode 100644 project/3rdparty/source/media/v4l2/v4l2_capture_stream.cpp delete mode 100644 project/3rdparty/source/media/v4l2/v4l2_output_stream.cpp delete mode 100644 project/3rdparty/source/media/v4l2/v4l2_stream.cpp delete mode 100644 project/3rdparty/source/media/v4l2/v4l2_stream.h delete mode 100644 project/3rdparty/source/media/v4l2/v4l2_utils.cpp delete mode 100644 project/3rdparty/source/media/v4l2/v4l2_utils.h delete mode 100644 project/3rdparty/source/rockchip/Kconfig delete mode 100644 project/3rdparty/source/rockchip/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/Kconfig delete mode 100644 project/3rdparty/source/rockchip/rkmpp/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_2str.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_bitput.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_bitread.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_bitwrite.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_buf_slot.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_buffer_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_cluster.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_dec_cb_param.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_dec_cfg_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_enc_cb_param.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_enc_cfg_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_enc_ref.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_enc_refs.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_frame_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_meta_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_packet_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_task_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/inc/mpp_trie.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_2str.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_bitput.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_bitread.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_bitwrite.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_buf_slot.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_buffer.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_buffer_impl.cpp delete mode 100755 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_cfg.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_cluster.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_dec_cfg.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_dec_hdr_meta.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_enc_cfg.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_enc_ref.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_enc_refs.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_frame.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_meta.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_packet.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_task.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_task_impl.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/base/mpp_trie.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/av1/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/av1/av1.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/av1/av1_entropymode.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/av1/av1_entropymode.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/av1/av1d_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/av1/av1d_cbs.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/av1/av1d_cbs.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/av1/av1d_codec.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/av1/av1d_common.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/av1/av1d_parser.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/av1/av1d_parser.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/av1/av1d_parser2_syntax.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/av1/av1d_probs.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/avs/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/avs/avsd_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/avs/avsd_parse.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/avs/avsd_parse.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/avs2/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/avs2/avs2d_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/avs2/avs2d_dpb.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/avs2/avs2d_dpb.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/avs2/avs2d_global.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/avs2/avs2d_parse.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/avs2/avs2d_parse.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/avs2/avs2d_ps.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/avs2/avs2d_ps.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/dummy/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/dummy/dummy_dec_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h263/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h263/h263d_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h263/h263d_parser.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h263/h263d_parser.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_dpb.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_dpb.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_fill.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_fill.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_global.h delete mode 100755 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_init.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_init.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_parse.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_parse.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_pps.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_pps.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_scalist.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_scalist.h delete mode 100755 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_sei.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_sei.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_slice.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_slice.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_sps.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h264/h264d_sps.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h265/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h265/h265d_codec.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h265/h265d_defs.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h265/h265d_parser.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h265/h265d_parser.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h265/h265d_parser2_syntax.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h265/h265d_ps.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h265/h265d_refs.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/h265/h265d_sei.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/jpeg/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/jpeg/jpegd_parser.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/jpeg/jpegd_parser.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/m2v/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/m2v/m2vd_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/m2v/m2vd_codec.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/m2v/m2vd_com.h delete mode 100755 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/m2v/m2vd_parser.c delete mode 100755 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/m2v/m2vd_parser.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/mpg4/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/mpg4/mpg4d_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/mpg4/mpg4d_parser.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/mpg4/mpg4d_parser.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp8/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp8/vp8d_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp8/vp8d_codec.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp8/vp8d_data.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp8/vp8d_parser.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp8/vp8d_parser.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp9/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp9/vp9.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp9/vp9d_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp9/vp9d_codec.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp9/vp9d_parser.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp9/vp9d_parser.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp9/vp9d_parser2_syntax.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp9/vp9data.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp9/vpx_rac.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/dec/vp9/vpx_rac.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/dummy/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/dummy/dummy_enc_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h264/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h264/h264e_api_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h264/h264e_debug.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h264/h264e_dpb.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h264/h264e_dpb.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h264/h264e_pps.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h264/h264e_pps.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h264/h264e_sei.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h264/h264e_sei.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h264/h264e_slice.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h264/h264e_slice.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h264/h264e_sps.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h264/h264e_sps.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_codec.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_context_table.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_dpb.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_dpb.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_enctropy.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_enctropy.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_header_gen.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_header_gen.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_ps.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_ps.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_slice.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_slice.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_stream.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_stream.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/h265/h265e_syntax.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/jpeg/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/jpeg/jpege_api_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/jpeg/jpege_debug.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/vp8/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/vp8/vp8e_api_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/vp8/vp8e_debug.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/vp8/vp8e_rc.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc/vp8/vp8e_rc.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/enc_impl.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/av1d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/avs2d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/avsd_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/dummy_dec_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/dummy_enc_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/enc_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/enc_impl_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/h263d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/h264d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/h264e_api_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/h265d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/h265e_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/jpegd_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/jpege_api_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/m2vd_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/mpg4d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/mpp_dec.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/mpp_dec_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/mpp_dec_no_thread.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/mpp_dec_normal.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/mpp_enc.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/mpp_enc_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/mpp_parser.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/mpp_rc.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/parser_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/rc.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/rc/rc_vepu.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/rc/rc_vepu540.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/rc_data.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/rc_data_base.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/rc_data_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/rc_hal.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/vp8d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/vp8e_api_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/inc/vp9d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/mpp_dec.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/mpp_dec_debug.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/mpp_dec_no_thread.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/mpp_dec_normal.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/mpp_enc_debug.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/mpp_enc_impl.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/mpp_enc_v2.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/mpp_parser.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/mpp_rc.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/h264e_rc.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/h264e_rc.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/h265e_rc.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/h265e_rc.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/jpege_rc.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/jpege_rc.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/rc.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/rc_base.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/rc_base.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/rc_ctx.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/rc_data.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/rc_data_base.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/rc_data_impl.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/rc_debug.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/rc_impl.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/rc_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/rc_model_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/rc_model_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/rc_model_v2_smt.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/rc_model_v2_smt.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/vp8e_rc.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/codec/rc/vp8e_rc.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/av1d_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/avs2d_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/avsd_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/dxva_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/h263d_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/h264_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/h264d_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/h264e_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/h265_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/h265d_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/h265e_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/h265e_syntax_new.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/jpegd_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/jpege_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/m2vd_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/mpg4d_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/vp8d_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/vp8e_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/common/vp9d_syntax.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/h264/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/h264/hal_h264e_api_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/h264/hal_h264e_debug.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/h264/hal_h264e_stream_amend.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/h264/hal_h264e_stream_amend.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/h265/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/h265/hal_h265e_api_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/h265/hal_h265e_debug.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/hal_bufs.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/hal_bufs.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/hal_info.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/hal_info.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/jpeg/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/jpeg/hal_jpege_api_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/jpeg/hal_jpege_debug.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/jpeg/hal_jpege_hdr.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/common/jpeg/hal_jpege_hdr.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/dummy/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/dummy/hal_dummy_dec_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/dummy/hal_dummy_enc_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/hal_task.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_av1d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_avs2d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_avsd_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_dec_task.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_dummy_dec_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_dummy_enc_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_enc_task.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_h263d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_h264d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_h264e_api_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_h265d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_h265e_api_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_jpegd_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_jpege_api_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_m2vd_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_mpg4d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_task.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_vp8d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_vp8e_api_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/hal_vp9d_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/mpp_enc_hal.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/inc/mpp_hal.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/mpp_enc_hal.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/mpp_hal.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avs2d/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avs2d/hal_avs2d_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avs2d/hal_avs2d_global.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avs2d/hal_avs2d_rkv.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avs2d/hal_avs2d_rkv.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avs2d/hal_avs2d_vdpu382.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avs2d/hal_avs2d_vdpu382.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avsd/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avsd/hal_avsd_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avsd/hal_avsd_base.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avsd/hal_avsd_base.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avsd/hal_avsd_plus.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avsd/hal_avsd_plus.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avsd/hal_avsd_plus_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avsd/hal_avsd_vdpu1.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avsd/hal_avsd_vdpu1.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avsd/hal_avsd_vdpu1_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avsd/hal_avsd_vdpu2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avsd/hal_avsd_vdpu2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/avsd/hal_avsd_vdpu2_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_global.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_rkv_reg.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_rkv_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_vdpu1.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_vdpu1.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_vdpu1_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_vdpu2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_vdpu2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_vdpu2_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_vdpu34x.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_vdpu34x.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_vdpu382.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_vdpu382.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_vdpu_com.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h264d/hal_h264d_vdpu_com.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h265d/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h265d/hal_h265d_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h265d/hal_h265d_com.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h265d/hal_h265d_com.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h265d/hal_h265d_ctx.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h265d/hal_h265d_debug.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h265d/hal_h265d_rkv.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h265d/hal_h265d_rkv.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h265d/hal_h265d_rkv_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h265d/hal_h265d_vdpu34x.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h265d/hal_h265d_vdpu34x.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h265d/hal_h265d_vdpu382.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/h265d/hal_h265d_vdpu382.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/inc/vdpu34x.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/inc/vdpu34x_avs2d.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/inc/vdpu34x_com.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/inc/vdpu34x_h264d.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/inc/vdpu34x_h265d.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/inc/vdpu34x_vp9d.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/inc/vdpu382.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/inc/vdpu382_avs2d.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/inc/vdpu382_com.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/inc/vdpu382_h264d.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/inc/vdpu382_h265d.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/inc/vdpu382_vp9d.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vdpu34x_com.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vdpu382_com.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vp9d/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_com.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_com.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_ctx.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_debug.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_rkv.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_rkv.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_rkv_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_vdpu34x.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_vdpu34x.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_vdpu382.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkdec/vp9d/hal_vp9d_vdpu382.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/common/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/common/rkv_enc_def.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/common/vepu540c_common.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/common/vepu540c_common.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/common/vepu541_common.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/common/vepu541_common.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/common/vepu580_tune.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/common/vepu5xx.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/common/vepu5xx_common.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/common/vepu5xx_common.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h264e/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h264e/hal_h264e_vepu540c.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h264e/hal_h264e_vepu540c.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h264e/hal_h264e_vepu540c_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h264e/hal_h264e_vepu541.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h264e/hal_h264e_vepu541.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h264e/hal_h264e_vepu541_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h264e/hal_h264e_vepu541_reg_l2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h264e/hal_h264e_vepu580.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h264e/hal_h264e_vepu580.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h264e/hal_h264e_vepu580_private.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h264e/hal_h264e_vepu580_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h264e/hal_h264e_vepu580_tune.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h265e/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h265e/hal_h265e_vepu540c.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h265e/hal_h265e_vepu540c.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h265e/hal_h265e_vepu540c_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h265e/hal_h265e_vepu541.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h265e/hal_h265e_vepu541.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h265e/hal_h265e_vepu541_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h265e/hal_h265e_vepu54x_reg_l2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h265e/hal_h265e_vepu580.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h265e/hal_h265e_vepu580.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h265e/hal_h265e_vepu580_private.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h265e/hal_h265e_vepu580_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/h265e/hal_h265e_vepu580_tune.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/jpege/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/jpege/hal_jpege_vepu540c.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/jpege/hal_jpege_vepu540c.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/rkenc/jpege/hal_jpege_vepu540c_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/av1d/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/av1d/av1d_common.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/av1d/film_grain_noise_table.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/av1d/film_grain_noise_table.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/av1d/hal_av1d_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/av1d/hal_av1d_common.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/av1d/hal_av1d_vdpu.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/av1d/hal_av1d_vdpu.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/av1d/hal_av1d_vdpu_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/common/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/common/vepu_common.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/common/vepu_common.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h263d/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h263d/hal_h263d_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h263d/hal_h263d_base.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h263d/hal_h263d_vdpu1.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h263d/hal_h263d_vdpu1.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h263d/hal_h263d_vdpu1_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h263d/hal_h263d_vdpu2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h263d/hal_h263d_vdpu2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h263d/hal_h263d_vdpu2_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h264e/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h264e/hal_h264e_vepu1_reg_tbl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h264e/hal_h264e_vepu1_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h264e/hal_h264e_vepu1_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h264e/hal_h264e_vepu2_reg_tbl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h264e/hal_h264e_vepu2_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h264e/hal_h264e_vepu2_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h264e/hal_h264e_vepu_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h264e/hal_h264e_vepu_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h264e/hal_h264e_vpu_tbl.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h264e/hal_h264e_vpu_tbl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/h264e/hal_h264e_vpu_tbl_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpegd/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_base.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_common.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_common.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_rkv.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_rkv.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_rkv_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_vdpu1.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_vdpu1.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_vdpu1_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_vdpu2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_vdpu2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpegd/hal_jpegd_vdpu2_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpege/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpege/hal_jpege_base.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpege/hal_jpege_base.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpege/hal_jpege_vepu1_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpege/hal_jpege_vepu1_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpege/hal_jpege_vepu2_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/jpege/hal_jpege_vepu2_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/m2vd/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/m2vd/hal_m2vd_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/m2vd/hal_m2vd_base.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/m2vd/hal_m2vd_vdpu1.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/m2vd/hal_m2vd_vdpu1_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/m2vd/hal_m2vd_vdpu2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/m2vd/hal_m2vd_vdpu2_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/m2vd/hal_m2vd_vpu1.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/m2vd/hal_m2vd_vpu2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/mpg4d/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_com.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_com.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_vdpu1.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_vdpu1.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_vdpu1_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_vdpu2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_vdpu2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/mpg4d/hal_m4vd_vdpu2_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8d/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8d/hal_vp8d_api.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8d/hal_vp8d_base.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8d/hal_vp8d_vdpu1.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8d/hal_vp8d_vdpu1.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8d/hal_vp8d_vdpu1_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8d/hal_vp8d_vdpu2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8d/hal_vp8d_vdpu2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8d/hal_vp8d_vdpu2_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_api_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_base.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_base.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_debug.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_entropy.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_entropy.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_putbit.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_putbit.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_table.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_table.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_vepu1_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_vepu1_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_vepu1_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_vepu2_reg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_vepu2_v2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/hal/vpu/vp8e/hal_vp8e_vepu2_v2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/inc/mpi_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/inc/mpp.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/inc/mpp_cfg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/inc/mpp_dec_cfg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/inc/mpp_enc_cfg.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/inc/mpp_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/inc/mpp_info.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/legacy/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/legacy/ppOp.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/legacy/ppOp.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/legacy/rk_list.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/legacy/rk_list.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/legacy/vpu.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/legacy/vpu_api.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/legacy/vpu_api_legacy.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/legacy/vpu_api_legacy.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/legacy/vpu_api_mlvec.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/legacy/vpu_api_mlvec.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/legacy/vpu_mem_legacy.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/legacy/vpu_mem_legacy.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/mpi.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/mpp.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/mpp_impl.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/mpp_info.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep/iep.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep/iep.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep2/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep2/iep2.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep2/iep2.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep2/iep2_ff.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep2/iep2_ff.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep2/iep2_gmv.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep2/iep2_gmv.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep2/iep2_osd.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep2/iep2_osd.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep2/iep2_pd.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep2/iep2_pd.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep2/iep2_roi.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/iep2/iep2_roi.h delete mode 100755 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/inc/iep2_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/inc/iep_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/inc/iep_common.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/inc/mpp_dec_vproc.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/inc/rga_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/mpp_dec_vproc.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/mpp_vproc_dev.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/rga/Makefile delete mode 100755 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/rga/rga.cpp delete mode 100755 project/3rdparty/source/rockchip/rkmpp/mpp/vproc/rga/rga.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/allocator/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/allocator/allocator_dma_heap.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/allocator/allocator_dma_heap.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/allocator/allocator_drm.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/allocator/allocator_drm.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/allocator/allocator_ext_dma.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/allocator/allocator_ext_dma.h delete mode 100755 project/3rdparty/source/rockchip/rkmpp/osal/allocator/allocator_ion.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/allocator/allocator_ion.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/allocator/allocator_std.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/allocator/allocator_std.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/allocator/ion.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/driver/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/driver/inc/mpp_device_debug.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/driver/inc/mpp_service_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/driver/mpp_device.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/driver/mpp_server.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/driver/mpp_service.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/driver/vcodec_service.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_allocator.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_callback.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_common.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_compat_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_debug.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_dev_defs.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_device.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_env.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_eventfd.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_hash.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_list.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_lock.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_mem.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_mem_pool.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_platform.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_queue.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_runtime.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_server.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_service.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_service_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_soc.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_thread.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_time.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/mpp_trace.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/osal_2str.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/vcodec_service.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/inc/vcodec_service_api.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/linux/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/linux/drm.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/linux/drm_mode.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/linux/os_allocator.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/linux/os_env.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/linux/os_log.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/linux/os_mem.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_allocator.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_allocator_impl.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_callback.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_common.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_compat.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_env.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_eventfd.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_list.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_lock.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_log.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_mem.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_mem_pool.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_platform.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_queue.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_runtime.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_soc.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_thread.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_time.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/mpp_trace.cpp delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/os_allocator.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/os_env.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/os_log.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/os_mem.h delete mode 100644 project/3rdparty/source/rockchip/rkmpp/osal/osal_2str.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/utils/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkmpp/utils/camera_source.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/utils/dictionary.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/utils/iniparser.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/utils/mpi_dec_utils.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/utils/mpi_enc_utils.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/utils/mpp_enc_roi_utils.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/utils/mpp_opt.c delete mode 100644 project/3rdparty/source/rockchip/rkmpp/utils/utils.c delete mode 100644 project/3rdparty/source/rockchip/rkrga/Kconfig delete mode 100644 project/3rdparty/source/rockchip/rkrga/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkrga/new/Makefile delete mode 100755 project/3rdparty/source/rockchip/rkrga/new/NormalRga.cpp delete mode 100755 project/3rdparty/source/rockchip/rkrga/new/NormalRgaApi.cpp delete mode 100755 project/3rdparty/source/rockchip/rkrga/new/RgaApi.cpp delete mode 100755 project/3rdparty/source/rockchip/rkrga/new/RgaUtils.cpp delete mode 100755 project/3rdparty/source/rockchip/rkrga/new/RockchipRga.cpp delete mode 100755 project/3rdparty/source/rockchip/rkrga/new/drm_utils.cpp delete mode 100755 project/3rdparty/source/rockchip/rkrga/new/im2d.cpp delete mode 100755 project/3rdparty/source/rockchip/rkrga/new/im2d_impl.cpp delete mode 100755 project/3rdparty/source/rockchip/rkrga/new/im2d_log.cpp delete mode 100755 project/3rdparty/source/rockchip/rkrga/new/rga_sync.cpp delete mode 100755 project/3rdparty/source/rockchip/rkrga/new/utils.cpp delete mode 100644 project/3rdparty/source/rockchip/rkrga/old/Makefile delete mode 100644 project/3rdparty/source/rockchip/rkrga/old/NormalRga.cpp delete mode 100644 project/3rdparty/source/rockchip/rkrga/old/NormalRgaApi.cpp delete mode 100644 project/3rdparty/source/rockchip/rkrga/old/RgaApi.cpp delete mode 100644 project/3rdparty/source/rockchip/rkrga/old/RgaUtils.cpp delete mode 100644 project/3rdparty/source/rockchip/rkrga/old/RockchipRga.cpp delete mode 100644 project/3rdparty/source/rockchip/rkrga/old/im2d.cpp delete mode 100644 project/3rdparty/source/rtsp/Kconfig delete mode 100644 project/3rdparty/source/rtsp/Makefile delete mode 100644 project/3rdparty/source/rtsp/rtsp/Common/Makefile delete mode 100644 project/3rdparty/source/rtsp/rtsp/Common/RTSPCommon.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/Common/RTSPCommonEnv.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/Makefile delete mode 100644 project/3rdparty/source/rtsp/rtsp/OS_Common/Event.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/OS_Common/Makefile delete mode 100644 project/3rdparty/source/rtsp/rtsp/OS_Common/Mutex.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/OS_Common/Semaphore.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/OS_Common/Thread.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/Common/BitVector.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/Common/DigestAuthentication.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/Common/Makefile delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/Makefile delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTCP/BasicHashTable.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTCP/HashTable.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTCP/Makefile delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTCP/OutPacketBuffer.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTCP/RTCP.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTCP/RTCPInstance.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTCP/rtcp_from_spec.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTP/AC3RTPSource.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTP/H264RTPSource.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTP/H265RTPSource.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTP/JPEGRTPSource.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTP/MPEG4ESRTPSource.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTP/MPEG4GenericRTPSource.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTP/Makefile delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTP/RTPPacketBuffer.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTP/RTPSource.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTSP/Makefile delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTSP/MediaSession.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPClient/RTSP/RTSPClient.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPServer/Common/Makefile delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPServer/Common/NetAddress.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPServer/Makefile delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPServer/RTSP/ClientSocket.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPServer/RTSP/LiveServerMediaSession.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPServer/RTSP/Makefile delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPServer/RTSP/OnDemandServerMediaSession.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPServer/RTSP/RTSPLiveStreamer.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPServer/RTSP/RTSPServer.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/RTSPServer/RTSP/ServerMediaSession.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/Sock/Makefile delete mode 100644 project/3rdparty/source/rtsp/rtsp/Sock/Sock.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/Sock/SockCommon.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/Sock/TaskScheduler.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/Util/Base64.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/Util/Makefile delete mode 100644 project/3rdparty/source/rtsp/rtsp/Util/our_md5.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/Util/our_md5hl.cpp delete mode 100644 project/3rdparty/source/rtsp/rtsp/Util/util.cpp delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/Makefile delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/SimpleRtspServer.cpp delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/SimpleRtspServer.hpp delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/common.h delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/queue.h delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/rtp_enc.c delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/rtp_enc.h delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/rtsp_msg.c delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/rtsp_msg.h delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/simpleRtspServer.h delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/simple_rtsp_server.c delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/stream_queue.c delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/stream_queue.h delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/utils.c delete mode 100644 project/3rdparty/source/rtsp/simpleRtspServer/utils.h delete mode 100644 project/entry/gui_demo/azure/guix/display/drm_display_driver2.c delete mode 100644 project/unittest/Kconfig delete mode 100644 project/unittest/Makefile delete mode 100644 project/unittest/host/Kconfig delete mode 100644 project/unittest/host/Makefile delete mode 100644 project/unittest/host/host_unittest.cpp delete mode 100644 project/unittest/host/host_unittest.h delete mode 100644 project/unittest/host/libdrm/Kconfig delete mode 100644 project/unittest/host/libdrm/Makefile delete mode 100644 project/unittest/host/libdrm/host_unittest_libdrm_display_example.cpp delete mode 100644 project/unittest/host/libdrm/libdrm_unittest.cpp delete mode 100644 project/unittest/host/libdrm/libdrm_unittest.h delete mode 100644 project/unittest/host/libdrm/private.h delete mode 100644 project/unittest/host/live555/Kconfig delete mode 100644 project/unittest/host/live555/Makefile delete mode 100644 project/unittest/host/live555/host_live555.cpp delete mode 100644 project/unittest/host/live555/host_live555.h delete mode 100644 project/unittest/host/live555/rtspClient/Makefile delete mode 100644 project/unittest/host/live555/rtspClient/RTSPClient.cpp delete mode 100644 project/unittest/host/live555/rtspClient/RTSPClient.h delete mode 100644 project/unittest/host/live555/rtspClient/liveRTSP.cpp delete mode 100644 project/unittest/host/live555/rtspClient/liveRTSP.hpp delete mode 100644 project/unittest/host/live555/rtspServer/DynamicRTSPServer.cpp delete mode 100644 project/unittest/host/live555/rtspServer/DynamicRTSPServer.h delete mode 100644 project/unittest/host/live555/rtspServer/Makefile delete mode 100644 project/unittest/host/live555/rtspServer/RTSPServer.cpp delete mode 100644 project/unittest/host/live555/rtspServer/RTSPServer.h delete mode 100644 project/unittest/host/rtsp/Kconfig delete mode 100644 project/unittest/host/rtsp/Makefile delete mode 100644 project/unittest/host/rtsp/private.h delete mode 100644 project/unittest/host/rtsp/rtsp.cpp delete mode 100644 project/unittest/host/rtsp/rtsp.h delete mode 100644 project/unittest/host/rtsp/rtsp_client.cpp delete mode 100644 project/unittest/host/rtsp/rtsp_server.cpp delete mode 100644 project/unittest/host/signalslot/Kconfig delete mode 100644 project/unittest/host/signalslot/Makefile delete mode 100644 project/unittest/host/signalslot/host_unittest_signal_slots_example.cpp delete mode 100644 project/unittest/host/signalslot/host_unittest_sigslot_threaded_producer_consumer_example.cpp delete mode 100644 project/unittest/host/signalslot/private.h delete mode 100644 project/unittest/host/signalslot/sigslot_unittest.cpp delete mode 100644 project/unittest/host/signalslot/sigslot_unittest.h delete mode 100644 project/unittest/rockchip/Kconfig delete mode 100644 project/unittest/rockchip/Makefile delete mode 100644 project/unittest/rockchip/rockchip_unittest.cpp delete mode 100644 project/unittest/rockchip/rockchip_unittest.h delete mode 100644 project/unittest/rockchip/rv11xx/Kconfig delete mode 100644 project/unittest/rockchip/rv11xx/Makefile delete mode 100644 project/unittest/rockchip/rv11xx/private.h delete mode 100644 project/unittest/rockchip/rv11xx/rv11xx_unittest.cpp delete mode 100644 project/unittest/rockchip/rv11xx/rv11xx_unittest.h delete mode 100644 project/unittest/rockchip/rv11xx/rv11xx_unittest_camera_libdrm_display_example.cpp delete mode 100644 project/unittest/rockchip/rv11xx/rv11xx_unittest_libdrm_display_example.cpp delete mode 100644 project/unittest/unittest.cpp delete mode 100644 project/unittest/unittest.h diff --git a/README.md b/README.md index 3d74ee549..70dcfd920 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,6 @@ ## 一、构建应用,(默认master分支)可以根据configs/*_defconfig文件对功能进行裁剪 ### 构建基于主机的应用 -+ 构建主机的单元测试项目 - ```shell - ./build.sh host_unittest 最终生成host_unittest可执行文件,可通过修改build.host.version中对应名字的版本号 - ``` + 构建基于主机的LVGL项目 ```shell ./build.sh host_lvgl_gui 最终生成lvgl_gui可执行文件,可通过修改build.host.version中对应名字的版本号 @@ -26,10 +22,6 @@ ``` ### 构建基于瑞星微rv1109/rv1126的应用 -+ 构建基于rv1109/rv1126 soc的单元测试项目 - ```shell - ./build.sh rv11xx_unittest 最终生成rv11xx_unittest可执行文件,可通过修改build.rv11xx.version中对应名字的版本号 - ``` + 构建基于rv1109/rv1126 soc的LVGL项目 ```shell ./build.sh rv11xx_lvgl_gui 最终生成lvgl_gui可执行文件,可通过修改build.rv11xx.version中对应名字的版本号 diff --git a/build.sh b/build.sh index 0143c0e19..74806bcf6 100755 --- a/build.sh +++ b/build.sh @@ -29,12 +29,10 @@ function help() echo " - help 显示帮助信息" echo " - clean 清理项目工程" echo "=================================================================================" - echo " - host_unittest 构建使用构建主机的单元测试项目" echo " - host_awtk_gui 构建使用构建主机的awtk gui项目" echo " - host_lvgl_gui 构建使用构建主机的lvgl gui项目" echo " - host_azure_gui 构建使用构建主机的azure gui项目" echo "=================================================================================" - echo " - rv11xx_unittest 构建使用rv1109/rv1126 soc板卡的单元测试项目" echo " - rv11xx_awtk_gui 构建使用rv1109/rv1126 soc板卡的awtk gui项目" echo " - rv11xx_lvgl_gui 构建使用rv1109/rv1126 soc板卡的lvgl gui项目" echo " - rv11xx_azure_gui 构建使用rv1109/rv1126 soc板卡的azure gui项目" diff --git a/config/build.host.version b/config/build.host.version index acaf87e16..3ce516ec2 100644 --- a/config/build.host.version +++ b/config/build.host.version @@ -13,11 +13,6 @@ VERSION = 6 PATCHLEVEL = 2 SUBLEVEL = 0 EXTRAVERSION = 1 -else ifeq ($(APP_NAME),host_unittest) -VERSION = 0 -PATCHLEVEL = 0 -SUBLEVEL = 0 -EXTRAVERSION = 1 else VERSION = 0 PATCHLEVEL = 0 diff --git a/config/build.rv11xx.version b/config/build.rv11xx.version index 2309acb73..3ce516ec2 100644 --- a/config/build.rv11xx.version +++ b/config/build.rv11xx.version @@ -13,11 +13,6 @@ VERSION = 6 PATCHLEVEL = 2 SUBLEVEL = 0 EXTRAVERSION = 1 -else ifeq ($(APP_NAME),rv11xx_unittest) -VERSION = 0 -PATCHLEVEL = 0 -SUBLEVEL = 0 -EXTRAVERSION = 1 else VERSION = 0 PATCHLEVEL = 0 diff --git a/configs/host_unittest_defconfig b/configs/host_unittest_defconfig deleted file mode 100644 index 5feca1e19..000000000 --- a/configs/host_unittest_defconfig +++ /dev/null @@ -1,30 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Application Configuration -# - -# -# unittest -# -CONFIG_UNITTEST=y - -# CONFIG_HOST_UNITTEST_LIBDRM is not set -# CONFIG_HOST_LIBDRM_DISP is not set - -# CONFIG_HOST_UNITTEST_SIGSLOT is not set -# CONFIG_HOST_SIGNAL_SLOTS is not set -# CONFIG_HOST_SIGSLOT_THREADED_PRODUCER_CONSUMER is not set - -# CONFIG_HOST_UNITTEST_LIVE555 is not set -# CONFIG_HOST_LIVE555_RTSP_CLIENT is not set -# CONFIG_HOST_LIVE555_RTSP_SERVER is not set - -CONFIG_HOST_UNITTEST_RTSP=y -CONFIG_HOST_RTSP_CLIENT=y -# CONFIG_HOST_RTSP_SERVER is not set - -# -# hardware platform -# -CONFIG_X86_64=y -CONFIG_LINUX_GNU=y diff --git a/configs/rv11xx_unittest_defconfig b/configs/rv11xx_unittest_defconfig deleted file mode 100644 index 840898380..000000000 --- a/configs/rv11xx_unittest_defconfig +++ /dev/null @@ -1,30 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Application Configuration -# - -# unittest -CONFIG_UNITTEST=y -CONFIG_MEDIA_API=y -# CONFIG_ROCKCHIP_RV11XX_LIBDRM is not set -CONFIG_ROCKCHIP_RV11XX_CAMERA_LIBDRM=y - -CONFIG_RKRGA=y -CONFIG_RKRGA_OLD=y -# CONFIG_RKRGA_NEW is not set -CONFIG_RKMPP=y -CONFIG_LIBDRM=y -CONFIG_RKMPP_HWOSD=y -CONFIG_RKMPP_RGA_OSD=y -# CONFIG_RKAIQ is not set - -# live555 -# CONFIG_LIVE555 is not set - -# -# hardware platform -# -CONFIG_ROCKCHIP=y -CONFIG_RV11XX=y -CONFIG_CORTEX_A7=y -CONFIG_AARCH32=y diff --git a/project/3rdparty/include/bindings/binding.hpp b/project/3rdparty/include/bindings/binding.hpp deleted file mode 100644 index 1eb6ab8d5..000000000 --- a/project/3rdparty/include/bindings/binding.hpp +++ /dev/null @@ -1,215 +0,0 @@ -#pragma once - -#include "node.hpp" -#include "make_node.hpp" -#include "node_operators.hpp" -#include "node_functions.hpp" -#include "property_updater.hpp" -#include "binding_evaluator.hpp" - -namespace Bindings { -/** - * @brief A combination of a root Node with an evaluator. - * - * A root Node is formed whenever multiple properties are combined inside - * a expression and an evaluator is responsible for re-evaluating such - * an expression whenever any of the constituent properties change. - * - * @tparam T The type of the value that the Binding expression evaluates to. - * @tparam EvaluatorT The type of the evaluator that is used to evaluate the Binding. - */ -template -class Binding : public PropertyUpdater, public Private::Dirtyable { - static_assert(std::is_base_of::value, "The EvaluatorT type must inherit from BindingEvaluator."); - -public: - /** - * @brief 用一个特定的求值器构造一个新的Binding - * @param rootNode 表示绑定中包含的表达式 - * @param evaluator 用于计算绑定中包含的表达式 - */ - explicit Binding(Private::Node &&rootNode, EvaluatorT const &evaluator) : m_rootNode{ std::move(rootNode) }, m_evaluator{ evaluator } { - m_bindingId = m_evaluator.insert(this); - m_rootNode.setParent(this); - } - - ~Binding() override { - m_evaluator.remove(m_bindingId); - } - - Binding() = delete; - Binding(Binding const &other) = delete; - - Binding &operator=(Binding const &other) = delete; - - Binding(Binding &&other) = delete; - Binding &operator=(Binding &&other) = delete; - - /* 设置在绑定重新计算时应用于通知关联属性的函数 */ - void setUpdateFunction(std::function const &updateFunction) override { - m_propertyUpdateFunction = updateFunction; - } - - /* 返回绑定的当前值 */ - T get() const override { - return m_rootNode.evaluate(); - } - - /* 重新计算绑定的值,并将更改通知所有依赖项 */ - void evaluate() { - T value = m_rootNode.evaluate(); - - /* 使用它可以通过PropertyUpdater的更新函数更新任何关联的属性 */ - m_propertyUpdateFunction(std::move(value)); - } - -protected: - Private::Dirtyable **parentVariable() override { - return nullptr; - } - - const bool *dirtyVariable() const override { - return nullptr; - } - - Private::Node m_rootNode; /* 绑定的根节点表示绑定所包含的表达式 */ - EvaluatorT m_evaluator; /* 负责计算此绑定的计算程序 */ - std::function m_propertyUpdateFunction = [](T &&) {}; /* 当绑定重新计算时,用于通知关联属性的函数 */ - int m_bindingId = -1; /* 绑定的id,用于在其求值器中跟踪绑定 */ -}; - -/** - * @brief 从属性创建绑定的帮助函数 - * - * @tparam T 绑定表达式求值的值的类型 - * @tparam EvaluatorT 用于计算绑定的计算器的类型 - * @param evaluator 用于计算绑定的计算器 - * @param property 要从中创建绑定的属性 - * @return 由求值器提供的新绑定 - */ -template -inline std::unique_ptr> makeBinding(EvaluatorT &evaluator, Property &property) -{ - return std::make_unique>(Private::makeNode(property), evaluator); -} - -/** - * @brief 从根节点创建绑定的帮助函数 - * - * @tparam T 绑定表达式求值的值的类型 - * @tparam EvaluatorT 用于计算绑定的计算器的类型 - * @param evaluator 用于计算绑定的计算器 - * @param rootNode 表示将由绑定求值的表达式 - * @return 一个新的绑定,它将rootNode与计算器结合在一起 - */ -template -inline std::unique_ptr> makeBinding(EvaluatorT &evaluator, Private::Node &&rootNode) -{ - return std::make_unique>(std::move(rootNode), evaluator); -} - -/** - * @brief 从函数及其参数创建Binding的帮助函数 - * - * @tparam EvaluatorT 用于计算绑定的计算器的类型 - * @param evaluator 用于计算绑定的计算器 - * @tparam Func 函数的类型 - 可以是实现operator()的任何类型 - * @param func 函数对象 - * @tparam Args 函数参数类型 - * @param args 函数参数 - 可能的值包括:Properties, Constants和Nodes。它们将自动展开,即Property将向func传递类型为T的值 - * @return 其中ReturnType是用给定参数对func求值的结果类型。绑定将由新的求值器提供支持 - */ -template, typename ResultType = Private::operator_node_result_t> -inline std::unique_ptr> makeBinding(EvaluatorT &evaluator, Func &&func, Args &&...args) -{ - return std::make_unique>(Private::makeNode(std::forward(func), std::forward(args)...), evaluator); -} - -/** - * 为老式的即时模式绑定提供了便利。 - * 这与不做任何事情的ImmediateBindingEvaluator类一起工作,在任何相关的可绑定对象(即属性实例)通知它们已经更改时,立即更新绑定的结果。 - * 这可能会导致在典型的GUI应用程序中使用结果之前对属性绑定进行多次计算 - * - * @tparam T 绑定表达式求值的值的类型 - */ -template -class Binding : public Binding { -public: - explicit Binding(Private::Node &&rootNode) : Binding(std::move(rootNode), ImmediateBindingEvaluator::instance()) { - - } - - Binding() = delete; - - virtual ~Binding() = default; - - Binding(Binding const &other) = delete; - Binding &operator=(Binding const &other) = delete; - - Binding(Binding &&other) = delete; - Binding &operator=(Binding &&other) = delete; - - void markDirty() override { - Binding::evaluate(); - } -}; - -/** - * @brief 从属性创建立即模式绑定的帮助函数 - * - * @tparam T 绑定表达式求值的值的类型 - * @param property 要从中创建绑定的属性 - * @return 绑定到现有属性的新绑定,并立即求值 - */ -template -inline std::unique_ptr> makeBinding(Property &property) -{ - return std::make_unique>(Private::makeNode(property)); -} - -/** - * @brief 从根节点创建立即模式绑定的帮助函数 - * - * @tparam T 绑定表达式求值的值的类型 - * @param rootNode 表示将由绑定求值的表达式。通常由属性上的一元/二元运算符构造 - * @return 绑定到根节点并立即计算的新绑定 - */ -template -inline std::unique_ptr> makeBinding(Private::Node &&rootNode) -{ - return std::make_unique>(std::move(rootNode)); -} - -/** - * @brief 从函数及其参数创建即时模式绑定 - * - * @tparam Func 函数的类型 - 可以是实现operator()的任何类型 - * @param func 函数对象 - * @tparam Args 函数参数类型 - * @param args 函数参数 - 可能的值包括:Properties, Constants和Nodes。它们将自动展开,即Property将向func传递类型为T的值 - * @return 其中ReturnType是用给定参数对func求值后得到的类型。绑定的特点是立即进行评估 - */ -template, typename ResultType = Private::operator_node_result_t> -inline std::unique_ptr> makeBinding(Func &&func, Args &&...args) -{ - return std::make_unique>(Private::makeNode(std::forward(func), std::forward(args)...)); -} - -/** - * @brief 创建带有绑定的属性的助手函数 - * - * 这个函数可以取: - * - 另一个属性 - * - Node,通常通过使用操作符组合Property实例创建 - * - 带有参数(节点、常量或属性)的函数 - * 默认情况下,这将构造一个带有立即绑定求值的Property - * - * 另外,可以将BindingEvaluator作为该函数的第一个参数来控制何时进行求值 - */ -template -inline auto makeBoundProperty(T &&...args) -{ - auto binding = makeBinding(std::forward(args)...); - return Propertyget())>(std::move(binding)); -} -} diff --git a/project/3rdparty/include/bindings/binding_evaluator.hpp b/project/3rdparty/include/bindings/binding_evaluator.hpp deleted file mode 100644 index 5172fb730..000000000 --- a/project/3rdparty/include/bindings/binding_evaluator.hpp +++ /dev/null @@ -1,72 +0,0 @@ -#pragma once - -#include -#include -#include - -namespace Bindings { -/** - * BindingEvaluator提供了一种机制来控制重新计算Bindings::Binding的确切时间。BindingEvaluator表示可以有选择地重新计算的绑定实例的集合。 - * 如果使用Bindings::makeBoundProperty和BindingEvaluator创建绑定,那么只有在给定的计算器上调用BindingEvaluator::evaluateAll时,绑定才会被求值。 - * 注意,BindingEvaluator的实例内部包装其绑定集合的方式是,复制BindingEvaluator并不实际复制绑定集合。 - * 因此,向BindingEvaluator的副本添加绑定也会将其添加到原始绑定中。这样做是为了便于使用,因此可以在整个代码库中轻松地传递求值器 - */ -class BindingEvaluator { - /* 我们在这里使用pimpl,这样我们就可以按值(副本)传递求值器,而每个副本都引用同一组数据 */ - struct Private { - std::map> m_bindingEvalFunctions; - int m_currentId; - }; - -public: - BindingEvaluator() = default; - BindingEvaluator(const BindingEvaluator &) noexcept = default; - - BindingEvaluator &operator=(const BindingEvaluator &) noexcept = default; - - BindingEvaluator(BindingEvaluator &&other) noexcept = delete; - BindingEvaluator &operator=(BindingEvaluator &&other) noexcept = delete; - - /* 该函数按插入的顺序计算用该求值器构造的所有Binding实例。因此,它也将更新相关的Property实例 */ - void evaluateAll() const { - /* map的顺序是确定的,因此绑定按插入的顺序求值,以确保正确的传递依赖性求值 */ - for (auto &[id, func] : m_d->m_bindingEvalFunctions) { - func(); - } - } - -private: - template - int insert(BindingType *binding) { - m_d->m_bindingEvalFunctions.insert({ - ++(m_d->m_currentId), [=]() { - binding->evaluate(); - } - }); - - return m_d->m_currentId; - } - - void remove(int id) { - m_d->m_bindingEvalFunctions.erase(id); - } - - std::shared_ptr m_d{ std::make_shared() }; - - template - friend class Binding; -}; - -/** - * BindingEvaluator的这个子类本身不做任何特殊的事情。它与绑定的模板特化一起使用,以提供老派的直接模式绑定。 - * 任何用ImmediateBindingEvaluator构造的绑定都不会等待求值器调用evaluateAll,而是在它的任何可绑定(即属性实例)更改时立即求值绑定。 - * 这可能会导致在典型的GUI应用程序中使用结果之前对属性绑定进行多次计算 - */ -class ImmediateBindingEvaluator final : public BindingEvaluator { -public: - static inline ImmediateBindingEvaluator instance() { - static ImmediateBindingEvaluator evaluator; - return evaluator; - } -}; -} diff --git a/project/3rdparty/include/bindings/genindex_array.hpp b/project/3rdparty/include/bindings/genindex_array.hpp deleted file mode 100644 index 16d845bb4..000000000 --- a/project/3rdparty/include/bindings/genindex_array.hpp +++ /dev/null @@ -1,170 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Bindings { -namespace Private { -struct GenerationalIndex { - uint32_t index = 0; - uint32_t generation = 0; -}; - -class GenerationalIndexAllocator { - struct AllocatorEntry { - bool isLive = false; - uint32_t generation = 0; - }; - - std::vector m_entries; - std::vector m_freeIndices; - -public: - GenerationalIndex allocate() { - if (m_freeIndices.size() > 0) { - uint32_t index = m_freeIndices.back(); - m_freeIndices.pop_back(); - - m_entries[index].generation += 1; - m_entries[index].isLive = true; - - return { index, m_entries[index].generation }; - } else { - if ((m_entries.size() + 1) >= std::numeric_limits::max()) { - throw std::length_error(std::string("Maximum number of values inside GenerationalIndexArray reached: ") + std::to_string(m_entries.size())); - } - - m_entries.push_back({ true, 0 }); - return { static_cast(m_entries.size()) - 1, 0 }; - } - } - - bool deallocate(GenerationalIndex index) { - if (isLive(index)) { - m_entries[index.index].isLive = false; - m_freeIndices.emplace_back(index.index); - return true; - } - - return false; - } - - bool isLive(GenerationalIndex index) const noexcept { - return ((index.index < m_entries.size()) && (m_entries[index.index].generation == index.generation) && m_entries[index.index].isLive); - } -}; - -/** - * GenerationalIndexArray将元素存储在连续的内存中,就像std::vector一样,还允许通过索引访问在恒定的时间内检索项, - * 但它会跟踪索引处值的版本生成,以便当它试图访问的索引处的项不再是它想要的项时,它可以通知访问器 - */ -template -class GenerationalIndexArray { - struct Entry { - uint32_t generation; - T value; - }; - - /* TODO: m_entries从来不会在条目被删除后收缩,如果这成为一个问题,在某些时候添加一个"trim"函数可能是一个好主意 */ - - std::vector> m_entries; - GenerationalIndexAllocator m_allocator; - -public: - /* 设置数组中特定索引处的值 */ - void set(const GenerationalIndex index, T &&value) { - while (m_entries.size() <= index.index) { - m_entries.emplace_back(std::nullopt); - } - -#ifndef NDEBUG - uint32_t previousGeneration = 0; - - const auto &previousEntry = m_entries[index.index]; - if (previousEntry) { - previousGeneration = previousEntry->generation; - } - - assert(index.generation >= previousGeneration); -#endif - - m_entries[index.index] = std::optional{ { index.generation, std::move(value) } }; - } - - /* 在第一个空闲索引处插入一个值并取回索引 */ - GenerationalIndex insert(T &&value) { - const auto index = m_allocator.allocate(); - set(index, std::move(value)); - return index; - } - - /* 擦除指定索引处的值并再次释放索引 */ - void erase(GenerationalIndex index) { - if (m_allocator.deallocate(index)) { - m_entries[index.index] = std::nullopt; - } - } - - /* 获取指向指定索引处值的指针 */ - T *get(GenerationalIndex index) { - if (index.index >= m_entries.size()) { - return nullptr; - } - - auto &entry = m_entries[index.index]; - if (entry && (entry->generation == index.generation)) { - return &entry->value; - } - - return nullptr; - } - - /* 获取指向指定索引处值的const指针 */ - const T *get(GenerationalIndex index) const noexcept { - return const_cast(const_cast(this)->get(index)); - } - - /* 擦除数组中的所有值,从而释放所有下标 */ - void clear() { - const auto numEntries = entriesSize(); - - for (auto i = decltype(numEntries){ 0 }; i < numEntries; ++i) { - const auto index = indexAtEntry(i); - if (index != std::nullopt) { - erase(*index); - } - } - } - - /* 当前数组中的条目数量不一定都对应于有效的索引,可以使用"indexAtEntry"将条目索引转换为可选的GenerationalIndex */ - uint32_t entriesSize() const noexcept { - return static_cast(m_entries.size()); - } - - /* 将条目索引转换为GenerationalIndex,如果可能,否则返回nullopt */ - std::optional indexAtEntry(uint32_t entryIndex) const { - if (entryIndex >= entriesSize()) { - return std::nullopt; - } - - const auto &entry = m_entries[entryIndex]; - if (!entry) { - return std::nullopt; - } - - GenerationalIndex index = { entryIndex, entry->generation }; - if (m_allocator.isLive(index)) { - return index; - } - - return std::nullopt; - } -}; -} -} diff --git a/project/3rdparty/include/bindings/make_node.hpp b/project/3rdparty/include/bindings/make_node.hpp deleted file mode 100644 index 094554737..000000000 --- a/project/3rdparty/include/bindings/make_node.hpp +++ /dev/null @@ -1,73 +0,0 @@ -#pragma once - -#include -#include "node.hpp" - -namespace Bindings { -namespace Private { -template -struct bindable_value_type_ { - using type = T; -}; - -template -struct bindable_value_type_> { - using type = T; -}; - -template -struct bindable_value_type_> { - using type = T; -}; - -template -struct bindable_value_type_> { - using type = T; -}; - -template -struct bindable_value_type : bindable_value_type_> { -}; - -template -using bindable_value_type_t = typename bindable_value_type::type; - -/* 查找封装操作符和参数的Node的类型 */ -template -using operator_node_result = std::decay, bindable_value_type_t...>>; - -template -using operator_node_result_t = typename operator_node_result::type; - -/* 节点创建助手 */ -template -inline Node> makeNode(T &&value) -{ - return Node>(std::make_unique>>(std::move(value))); -} - -template -inline Node makeNode(Property &property) -{ - return Node(std::make_unique>(property)); -} - -template -inline Node makeNode(Node &&node) -{ - return std::move(node); -} - -template= 1>, typename ResultType = operator_node_result_t> -inline Node makeNode(Operator &&op, Ts &&...args) -{ - return Node(std::make_unique, bindable_value_type_t...>>(std::forward(op), makeNode(std::forward(args))...)); -} - -/* 函数和运算符助手需要 */ -template -struct is_bindable : std::integral_constant::value || is_node::value> { - -}; -} -} diff --git a/project/3rdparty/include/bindings/node.hpp b/project/3rdparty/include/bindings/node.hpp deleted file mode 100644 index f21c96e05..000000000 --- a/project/3rdparty/include/bindings/node.hpp +++ /dev/null @@ -1,265 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include - -#include "signal.hpp" -#include "property.hpp" - -namespace Bindings { -/* 每当计算引用不再存在的属性的绑定时,都会抛出PropertyDestroyedError */ -class PropertyDestroyedError : public std::runtime_error { -public: - PropertyDestroyedError() = delete; - - using std::runtime_error::runtime_error; -}; - -namespace Private { -class Dirtyable { -public: - Dirtyable() = default; - virtual ~Dirtyable() = default; - - void setParent(Dirtyable *newParent) { - auto **parentVar = parentVariable(); - if (parentVar) { - *parentVar = newParent; - } - } - - virtual void markDirty() { - auto *dirtyVar = dirtyVariable(); - if (dirtyVar) { - if (*dirtyVar) { - return; - } - - /* 我们只想对dirtyVariable有一个重写,也就是const,所以我们必须在这里进行const强制转换 */ - *const_cast(dirtyVar) = true; - } - - auto **parentVar = parentVariable(); - if (parentVar && *parentVar) { - (*parentVar)->markDirty(); - } - } - - bool isDirty() const { - auto *dirtyVar = dirtyVariable(); - return dirtyVar && *dirtyVar; - } - -protected: - virtual Dirtyable **parentVariable() = 0; - virtual const bool *dirtyVariable() const = 0; -}; - -template -class NodeInterface : public Dirtyable { -public: - /* 返回一个引用,因为我们缓存了每个求值。const,因为它不应该修改AST的返回值 */ - virtual const ResultType &evaluate() const = 0; - -protected: - NodeInterface() = default; -}; - -template -class Node { -public: - Node(std::unique_ptr> &&interface) : m_interface(std::move(interface)) { - - } - - const ResultType &evaluate() const { - return m_interface->evaluate(); - } - - void setParent(Dirtyable *newParent) { - m_interface->setParent(newParent); - } - - bool isDirty() const { - return m_interface->isDirty(); - } - -private: - std::unique_ptr> m_interface; -}; - -template -class ConstantNode : public NodeInterface { -public: - explicit ConstantNode(const T &value) : m_value{ value } { - - } - - const T &evaluate() const override { - return m_value; - } - -protected: - /* 常量永远不可能是脏的,所以它不需要知道它的父元素,因为它不需要通知它 */ - Dirtyable **parentVariable() override { - return nullptr; - } - - const bool *dirtyVariable() const override { - return nullptr; - } - -private: - T m_value; -}; - -template -class PropertyNode : public NodeInterface { -public: - explicit PropertyNode(Property &property) : m_parent(nullptr), m_dirty(false) { - setProperty(property); - } - - PropertyNode(PropertyNode &&) = delete; - - PropertyNode(const PropertyNode &other) : Dirtyable(other.isDirty()) { - setProperty(*other.m_property); - } - - virtual ~PropertyNode() { - m_valueChangedHandle.disconnect(); - m_movedHandle.disconnect(); - m_destroyedHandle.disconnect(); - } - - const PropertyType &evaluate() const override { - if (!m_property) { - throw PropertyDestroyedError("The Property this node refers to no longer exists!"); - } - - m_dirty = false; - return m_property->get(); - } - - /* 它当前必须接受一个const引用,因为"moved"信号会发出一个const& */ - void propertyMoved(Property &property) { - if (&property != m_property) { - m_property = &property; - } else { - /* 另一个属性被移动到该节点引用的属性中。因此,它将不再更新此节点 */ - m_property = nullptr; - } - } - - void propertyDestroyed() { - m_property = nullptr; - } - -protected: - Dirtyable **parentVariable() override { - return &m_parent; - } - - const bool *dirtyVariable() const override { - return &m_dirty; - } - -private: - void setProperty(Property &property) { - m_property = &property; - m_valueChangedHandle = m_property->valueChanged().connect(&PropertyNode::markDirty, this); - m_movedHandle = m_property->m_moved.connect(&PropertyNode::propertyMoved, this); - m_destroyedHandle = m_property->destroyed().connect(&PropertyNode::propertyDestroyed, this); - } - - Property *m_property; - ConnectionHandle m_movedHandle; - ConnectionHandle m_valueChangedHandle; - ConnectionHandle m_destroyedHandle; - - Dirtyable *m_parent; - mutable bool m_dirty; -}; - -template -class OperatorNode : public NodeInterface { -public: - /* 为Operator类型添加另一个typename模板,这样它就可以成为通用引用 */ - template - explicit OperatorNode(Op &&op, Node &&...arguments) - : m_parent{ nullptr }, m_dirty{ true }, m_op{ std::move(op) }, m_values{ std::move(arguments)... }, m_result(reevaluate()) - { - static_assert(std::is_convertible_v()...)), ResultType>, "The result of the Operator must be convertible to the ReturnType of the Node"); - setParents<0>(); - } - - template - auto setParents() -> std::enable_if_t { - - } - - template - auto setParents() -> std::enable_if_t { - std::get(m_values).setParent(this); - setParents(); - } - - virtual ~OperatorNode() = default; - - const ResultType &evaluate() const override { - if (Dirtyable::isDirty()) { - m_result = reevaluate(); - } - - return m_result; - } - -protected: - Dirtyable **parentVariable() override { - return &m_parent; - } - - const bool *dirtyVariable() const override { - return &m_dirty; - } - -private: - template - ResultType reevaluate_helper(std::index_sequence) const { - return m_op(std::get(m_values).evaluate()...); - } - - ResultType reevaluate() const { - m_dirty = false; - return reevaluate_helper(std::make_index_sequence()); - } - - Dirtyable *m_parent; - mutable bool m_dirty; - - Operator m_op; - std::tuple...> m_values; - - // 注意: 重要的是m_result是最后计算的!否则,在构造函数中重新求值的调用将失败 - mutable ResultType m_result; -}; - -template -struct is_node_helper : std::false_type { - -}; - -template -struct is_node_helper> : std::true_type { - -}; - -template -struct is_node : is_node_helper { - -}; -} -} diff --git a/project/3rdparty/include/bindings/node_functions.hpp b/project/3rdparty/include/bindings/node_functions.hpp deleted file mode 100644 index cf3835d99..000000000 --- a/project/3rdparty/include/bindings/node_functions.hpp +++ /dev/null @@ -1,102 +0,0 @@ -#pragma once - -#include -#include "make_node.hpp" - -namespace Bindings { -namespace Private { -template -struct any_bindables; - -/* 检查单个类型是否是可绑定的(节点或属性) */ -template -struct any_bindables : is_bindable { - -}; - -/* 检查类型列表的头并递归 */ -template -struct any_bindables : std::integral_constant::value || any_bindables::value> { - -}; -} - -/** - * BINDINGS_DECLARE_FUNCTION是一个helper宏,用于声明和定义数据绑定中使用的函数。 - * 这个宏可以接受任何可调用的对象或函数引用,并创建一个可以在数据绑定表达式中使用的新函数。 - * 可以使用属性或数据绑定表达式的结果调用的结果函数,以创建另一个数据绑定表达式。 - * 注意,如果函数重载,则不可能一次引用其所有重载。因此,我们建议声明一个带有模板操作符()的结构作为函数对象。 - * 有关如何做到这一点的示例,请参阅Bindings::node_abs结构 - * - * @param NAME 要生成的函数的名称 - * @param FUNC 包装的函数 - */ -#define BINDINGS_DECLARE_FUNCTION(NAME, FUNC) \ - template \ - inline auto NAME(Ts &&...args)->std::enable_if_t::value, Bindings::Private::Node>> \ - { \ - return Private::makeNode(FUNC, std::forward(args)...); \ - } - -/** - * 一个示例结构,与BINDINGS_DECLARE_FUNCTION调用一起使用,以声明std::abs的所有重载在数据绑定中可用。 - * 由于node_abs重载它的操作符()的方式,它可以在调用BINDINGS_DECLARE_FUNCTION时像这样使用: BINDINGS_DECLARE_FUNCTION(abs, node_abs{}) - * - * 要为另一个函数生成这样的结构,可以使用BINDINGS_DECLARE_FUNCTION_OBJECT宏 - */ -struct node_abs { - /* operator()被重载,因此结构可以用作函数对象。因为这个操作符是模板化的,所以node_abs的一个实例可以引用std::abs的所有重载 */ - template - auto operator()(Ts &&...x) const { - return std::abs(std::forward(x)...); - } -}; - -BINDINGS_DECLARE_FUNCTION(abs, node_abs{}) - -/** - * 此宏声明了一个可调用结构,该结构将函数及其所有重载包装起来。 - * 声明的结构可以用作BINDINGS_DECLARE_FUNCTION(NAME, FUNCTION)的FUNCTION参数,将一个函数及其所有重载传递给宏 - * - * @param NAME 结果结构的名称 - * @param FUNCTION 包装的函数 - */ -#define BINDINGS_DECLARE_FUNCTION_OBJECT(NAME, FUNCTION) \ - struct NAME { \ - template \ - auto operator()(Ts &&...x) const { \ - return FUNCTION(std::forward(x)...); \ - } \ - }; - -/** - * @brief 此宏允许将非嵌套命名空间中的任何函数声明为数据绑定上下文中可用的函数 - * - * @param NAMESPACE 函数所在的命名空间的名称 - * @param NAME 要包装的函数的名称 - * - * 与BINDINGS_DECLARE_FUNCTION(NAME, FUNC)相比,这个宏将使用#BINDINGS_DECLARE_FUNCTION_OBJECT生成一个helper结构,因此函数的所有重载都一次可用。 - * #BINDINGS_DECLARE_STD_FUNCTION基本上只是调用这个宏,命名空间参数设置为'std' - */ -#define BINDINGS_DECLARE_NAMESPACED_FUNCTION(NAMESPACE, NAME) \ - BINDINGS_DECLARE_FUNCTION_OBJECT(node_##NAMESPACE_##NAME, NAMESPACE::NAME) \ - BINDINGS_DECLARE_FUNCTION(NAME, node_##NAMESPACE_##NAME{}) - -/** - * @brief 这个宏基于BINDINGS_DECLARE_NAMESPACED_FUNCTION(NAMESPACE, FUNC),使声明任何标准库函数为数据绑定可用变得更容易。 - * 它使用#BINDINGS_DECLARE_NAMESPACED_FUNCTION,因此可以使'std::'函数的所有重载同时可用。 - * - * @param NAME 'std::'命名空间中的函数名 - */ -#define BINDINGS_DECLARE_STD_FUNCTION(NAME) \ - BINDINGS_DECLARE_NAMESPACED_FUNCTION(std, NAME) - -BINDINGS_DECLARE_STD_FUNCTION(floor) -BINDINGS_DECLARE_STD_FUNCTION(ceil) -BINDINGS_DECLARE_STD_FUNCTION(sin) -BINDINGS_DECLARE_STD_FUNCTION(cos) -BINDINGS_DECLARE_STD_FUNCTION(tan) -BINDINGS_DECLARE_STD_FUNCTION(asin) -BINDINGS_DECLARE_STD_FUNCTION(acos) -BINDINGS_DECLARE_STD_FUNCTION(atan) -} diff --git a/project/3rdparty/include/bindings/node_operators.hpp b/project/3rdparty/include/bindings/node_operators.hpp deleted file mode 100644 index 074bf32a5..000000000 --- a/project/3rdparty/include/bindings/node_operators.hpp +++ /dev/null @@ -1,101 +0,0 @@ -#pragma once - -#include "node.hpp" -#include "make_node.hpp" - -namespace Bindings { -/* Helper宏用于为属性和节点声明独立的一元运算符 */ -#define BINDINGS_DEFINE_UNARY_OP(OP) \ - template \ - inline auto operator OP(Property &arg) noexcept(noexcept(OP arg.get()))->Private::Node> \ - { \ - return Private::makeNode([](auto &&v) { return (OP v); }, arg); \ - } \ - \ - template \ - inline auto operator OP(Private::Node &&arg) noexcept(noexcept(OP arg.evaluate()))->Private::Node> \ - { \ - return Private::makeNode([](auto &&v) { return (OP v); }, std::move(arg)); \ - } - -BINDINGS_DEFINE_UNARY_OP(!) -BINDINGS_DEFINE_UNARY_OP(~) -BINDINGS_DEFINE_UNARY_OP(+) -BINDINGS_DEFINE_UNARY_OP(-) - -#define BINDINGS_DEFINE_BINARY_OP(OP) \ - template \ - inline auto operator OP(Property &a, B &&b) noexcept(noexcept(a.get() OP b)) \ - ->std::enable_if_t::value, Private::Node> \ - { \ - return Private::makeNode([](auto &&av, auto &&bv) { return (av OP bv); }, a, std::forward(b)); \ - } \ - \ - template \ - inline auto operator OP(A &&a, Property &b) noexcept(noexcept(a OP b.get())) \ - ->std::enable_if_t::value, Private::Node> \ - { \ - return Private::makeNode([](auto &&av, auto &&bv) { return (av OP bv); }, std::forward(a), b); \ - } \ - \ - template \ - inline auto operator OP(Property &a, Property &b) noexcept(noexcept(a.get() OP b.get())) \ - ->Private::Node \ - { \ - return Private::makeNode([](auto &&av, auto &&bv) { return (av OP bv); }, a, b); \ - } \ - \ - template \ - inline auto operator OP(Private::Node &&a, B &&b) noexcept(noexcept(a.evaluate() OP b)) \ - ->std::enable_if_t::value, Private::Node> \ - { \ - return Private::makeNode([](auto &&av, auto &&bv) { return (av OP bv); }, std::move(a), std::forward(b)); \ - } \ - \ - template \ - inline auto operator OP(A &&a, Private::Node &&b) noexcept(noexcept(a OP b.evaluate())) \ - ->std::enable_if_t::value, Private::Node> \ - { \ - return Private::makeNode([](auto &&av, auto &&bv) { return (av OP bv); }, std::forward(a), std::move(b)); \ - } \ - \ - template \ - inline auto operator OP(Private::Node &&a, Private::Node &&b) noexcept(noexcept(a.evaluate() OP b.evaluate())) \ - ->Private::Node \ - { \ - return Private::makeNode([](auto &&av, auto &&bv) { return (av OP bv); }, std::move(a), std::move(b)); \ - } \ - \ - template \ - inline auto operator OP(Property &a, Private::Node &&b) noexcept(noexcept(a.get() OP b.evaluate())) \ - ->Private::Node \ - { \ - return Private::makeNode([](auto &&av, auto &&bv) { return (av OP bv); }, a, std::move(b)); \ - } \ - \ - template \ - inline auto operator OP(Private::Node &&a, Property &b) noexcept(noexcept(a.evaluate() OP b.get())) \ - ->Private::Node \ - { \ - return Private::makeNode([](auto &&av, auto &&bv) { return (av OP bv); }, std::move(a), b); \ - } - -BINDINGS_DEFINE_BINARY_OP(*) -BINDINGS_DEFINE_BINARY_OP(/) -BINDINGS_DEFINE_BINARY_OP(%) -BINDINGS_DEFINE_BINARY_OP(+) -BINDINGS_DEFINE_BINARY_OP(-) -BINDINGS_DEFINE_BINARY_OP(<<) -BINDINGS_DEFINE_BINARY_OP(>>) -BINDINGS_DEFINE_BINARY_OP(<) -BINDINGS_DEFINE_BINARY_OP(<=) -BINDINGS_DEFINE_BINARY_OP(>) -BINDINGS_DEFINE_BINARY_OP(>=) -BINDINGS_DEFINE_BINARY_OP(==) -BINDINGS_DEFINE_BINARY_OP(!=) -BINDINGS_DEFINE_BINARY_OP(&) -BINDINGS_DEFINE_BINARY_OP(^) -BINDINGS_DEFINE_BINARY_OP(|) -BINDINGS_DEFINE_BINARY_OP(&&) -BINDINGS_DEFINE_BINARY_OP(||) -} diff --git a/project/3rdparty/include/bindings/property.hpp b/project/3rdparty/include/bindings/property.hpp deleted file mode 100644 index cb91c2740..000000000 --- a/project/3rdparty/include/bindings/property.hpp +++ /dev/null @@ -1,220 +0,0 @@ -#pragma once - -#include -#include -#include - -#include "signal.hpp" -#include "property_updater.hpp" - -namespace Bindings { -namespace Private { -template -struct are_equality_comparable : std::false_type { - -}; - -template -struct are_equality_comparable{}(std::declval(), std::declval()))>, bool>::value>> : std::true_type { - -}; - -template -constexpr bool are_equality_comparable_v = are_equality_comparable::value; -} - -/* 当试图设置与PropertyUpdater相关联的属性的值时,将抛出ReadOnlyProperty。最常见的原因是属性保存绑定表达式的结果 */ -struct ReadOnlyProperty : std::runtime_error { - ReadOnlyProperty() = delete; - - using std::runtime_error::runtime_error; -}; - -template -struct equal_to { - auto operator()(const T &x, const T &y) const noexcept -> std::enable_if_t, bool> { - return std::equal_to<>{}(x, y); - } - - template - auto operator()(const X &, const Y &) const noexcept -> std::enable_if_t, bool> { - return false; - } -}; - -namespace Private { -template -class PropertyNode; -} - -template -class Property { -public: - typedef T valuetype; - - Property() = default; - ~Property() { - m_destroyed.emit(); - } - - explicit Property(T value) noexcept(std::is_nothrow_move_constructible::value) : m_value{ std::move(value) } { - - } - - Property(Property const &other) = delete; - Property &operator=(Property const &other) = delete; - - Property(Property &&other) noexcept(std::is_nothrow_move_constructible::value) - : m_value(std::move(other.m_value)), - m_valueAboutToChange(std::move(other.m_valueAboutToChange)), - m_valueChanged(std::move(other.m_valueChanged)), - m_destroyed(std::move(other.m_destroyed)), - m_updater(std::move(other.m_updater)) - { - if (m_updater) { - using namespace std::placeholders; - m_updater->setUpdateFunction(std::bind(&Property::setHelper, this, _1)); - } - - /* 为移出和移到属性发出移动信号 */ - m_moved.emit(*this); - other.m_moved.emit(*this); - m_moved = std::move(other.m_moved); - } - - Property &operator=(Property &&other) noexcept(std::is_nothrow_move_assignable::value) { - m_value = std::move(other.m_value); - m_valueAboutToChange = std::move(other.m_valueAboutToChange); - m_valueChanged = std::move(other.m_valueChanged); - m_destroyed = std::move(other.m_destroyed); - m_updater = std::move(other.m_updater); - - if (m_updater) { - using namespace std::placeholders; - m_updater->setUpdateFunction(std::bind(&Property::setHelper, this, _1)); - } - - /* 为移出和移到属性发出移动信号 */ - m_moved.emit(*this); - other.m_moved.emit(*this); - m_moved = std::move(other.m_moved); - - return *this; - } - - template - explicit Property(std::unique_ptr &&updater) { - *this = std::move(updater); - } - - template - Property &operator=(std::unique_ptr &&updater) { - m_updater = std::move(updater); - - using namespace std::placeholders; - m_updater->setUpdateFunction(std::bind(&Property::setHelper, this, _1)); - setHelper(m_updater->get()); - - return *this; - } - - void reset() { - m_updater.reset(); - } - - /* 返回一个将在值更改之前发出的信号。第一个发出的值是属性的当前值,第二个发出的值是属性的新值 */ - Signal &valueAboutToChange() const { - return m_valueAboutToChange; - } - - /* 返回一个信号,该信号将在属性的值更改后发出。发出的值是属性的当前(新)值 */ - Signal &valueChanged() const { - return m_valueChanged; - } - - /* 返回一个信号,该信号将在此属性被销毁时发出 */ - Signal<> &destroyed() const { - return m_destroyed; - } - - void set(T value) { - if (m_updater) { - throw ReadOnlyProperty{ "Cannot set value on a read-only property. This property likely holds the result of a binding expression." }; - } - - setHelper(std::move(value)); - } - - T const &get() const { - return m_value; - } - - Property &operator=(T const &rhs) { - set(std::move(rhs)); - return *this; - } - - T const &operator()() const { - return Property::get(); - } - -private: - void setHelper(T value) { - if (equal_to{}(value, m_value)) { - return; - } - - m_valueAboutToChange.emit(m_value, value); - m_value = std::move(value); - m_valueChanged.emit(m_value); - } - - T m_value; - mutable Signal m_valueAboutToChange; /* 属性中的信号是可变的,因为属性为"const"应该意味着它的值或绑定不会改变,而不是说没有人可以再监听它 */ - mutable Signal m_valueChanged; /* 通过const ref,我们可以发出只有移动类型的T的信号 */ - - template - friend class Private::PropertyNode; - - Signal &> m_moved; - - mutable Signal<> m_destroyed; - std::unique_ptr> m_updater; -}; - -/* 将属性的值输出到输出流 */ -template -std::ostream &operator<<(std::ostream &stream, Property const &property) -{ - stream << property.get(); - return stream; -} - -/* 从输入流中读取类型为T的值,并使用set()将其赋值给属性 */ -template -std::istream &operator>>(std::istream &stream, Property &prop) -{ - T temp; - stream >> temp; - prop.set(std::move(temp)); - - return stream; -} - -namespace Private { -template -struct is_property_helper : std::false_type { - -}; - -template -struct is_property_helper> : std::true_type { - -}; - -template -struct is_property : is_property_helper> { - -}; -} -} diff --git a/project/3rdparty/include/bindings/property_updater.hpp b/project/3rdparty/include/bindings/property_updater.hpp deleted file mode 100644 index 73310eeae..000000000 --- a/project/3rdparty/include/bindings/property_updater.hpp +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once - -#include - -namespace Bindings { -/** - * PropertyUpdater定义用于更新属性的接口,例如从绑定表达式。 - * 该类的实例(包装在std::unique_ptr中)可以传递给Property构造函数。然后属性将变为只读,这意味着如果通过PropertyUpdater以外的任何其他方式更新属性的值, - * 则会抛出ReadOnlyProperty的实例。 - * 为此,Property构造函数将向setUpdateFunction()传递一个函数。这个函数是更新属性而不遇到ReadOnlyProperty错误的唯一方法。 - * PropertyUpdater最典型的用法是在由makeBoundProperty()创建的Binding实例中 - */ -template -class PropertyUpdater { -public: - PropertyUpdater() = default; - virtual ~PropertyUpdater() = default; - - PropertyUpdater(PropertyUpdater const &other) = default; - PropertyUpdater &operator=(PropertyUpdater const &other) = default; - - PropertyUpdater(PropertyUpdater &&other) = default; - PropertyUpdater &operator=(PropertyUpdater &&other) = default; - - /** - * Property将在构造该函数时调用它,并传递一个std::function作为参数,允许PropertyUpdater更新Property值。 - * PropertyUpdater通常保存此函数,并在计算的值发生变化时调用它 - */ - virtual void setUpdateFunction(std::function const &updateFunction) = 0; - - /** - * get()函数必须返回PropertyUpdater希望分配给Property的当前值。 - * 它是从Property构造函数调用的 - */ - virtual T get() const = 0; -}; -} diff --git a/project/3rdparty/include/bindings/signal.hpp b/project/3rdparty/include/bindings/signal.hpp deleted file mode 100644 index 82b7390f8..000000000 --- a/project/3rdparty/include/bindings/signal.hpp +++ /dev/null @@ -1,411 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include -#include - -#include "utils.hpp" -#include "genindex_array.hpp" - -namespace Bindings { -template -class Signal; - -namespace Private { -/** - * 这个类定义了一个虚拟接口,这个连接句柄引用的信号必须实现。它允许ConnectionHandle引用这个非模板类,然后使用虚函数调用将其分发到模板实现。 - * 它允许ConnectionHandle成为一个非模板类 - */ -class SignalImplBase { -public: - SignalImplBase() = default; - virtual ~SignalImplBase() = default; - - virtual void disconnect(const GenerationalIndex &id) = 0; - virtual bool blockConnection(const GenerationalIndex &id, bool blocked) = 0; - - virtual bool isConnectionActive(const GenerationalIndex &id) const = 0; - virtual bool isConnectionBlocked(const GenerationalIndex &id) const = 0; -}; -} - -/** - * ConnectionHandle表示信号到插槽的连接(即信号发出时调用的函数)。当创建连接时,它从一个Signal返回, - * 并用于通过断开连接、(不)阻塞连接和检查其状态来管理连接 - */ -class ConnectionHandle { -public: - ConnectionHandle() = default; - - ConnectionHandle(const ConnectionHandle &) = default; - ConnectionHandle &operator=(const ConnectionHandle &) = default; - - ConnectionHandle(ConnectionHandle &&) = default; - ConnectionHandle &operator=(ConnectionHandle &&) = default; - - /** - * 断开连接的插槽。当这个函数被调用时,传递给Signal::connect以创建这个ConnectionHandle的函数在发出Signal时将不再被调用。 - * 如果ConnectionHandle未激活或连接已经断开,则不会发生任何事情。 - * 在这个调用之后,ConnectionHandle将是不活动的(即isActive()返回false),不再属于任何信号(即belongsTo返回false) - */ - void disconnect() { - if (auto shared_impl = checkedLock()) { - shared_impl->disconnect(m_id); - } - - m_signalImpl.reset(); - } - - /** - * 检查该ConnectionHandle的连接是否处于活动状态。 - * 如果ConnectionHandle引用一个活动信号并且连接之前没有断开,则为true,否则为false - */ - bool isActive() const { - return static_cast(checkedLock()); - } - - /** - * 设置连接的块状态。如果连接被阻塞,发出信号将不再调用该连接槽,直到连接被解除阻塞。 - * 行为与使用此ConnectionHandle作为参数调用Signal::blockConnection相同。 - * 要临时阻塞连接,可以考虑使用ConnectionBlocker的实例,它提供了一个rai风格的实现,确保连接总是返回到其原始状态 - * - * @param blocked 连接的新阻塞状态 - * @return 连接以前是否被阻塞 - * @throw 如果连接不是活动的抛出(即isActive()返回false)std::out_of_range异常 - */ - bool block(bool blocked) { - if (auto shared_impl = checkedLock()) { - return shared_impl->blockConnection(m_id, blocked); - } - - throw std::out_of_range("Cannot block a non-active connection!"); - } - - /** - * 检查连接当前是否被阻塞。要改变连接的阻塞状态,调用ConnectionHandle::block - */ - bool isBlocked() const { - if (auto shared_impl = checkedLock()) { - return shared_impl->isConnectionBlocked(m_id); - } - - throw std::out_of_range("Cannot check whether a non-active connection is blocked!"); - } - - /** - * 检查这个ConnectionHandle是否属于给定的信号。如果此ConnectionHandle引用给定信号中的连接,则为true - */ - template - bool belongsTo(const Signal &signal) const { - auto shared_impl = m_signalImpl.lock(); - return shared_impl && shared_impl == std::static_pointer_cast(signal.m_impl); - } - -private: - template - friend class Signal; - - std::weak_ptr m_signalImpl; - Private::GenerationalIndex m_id; - - ConnectionHandle(std::weak_ptr signalImpl, Private::GenerationalIndex id) - : m_signalImpl{ std::move(signalImpl) }, m_id{ std::move(id) } - { - - } - - /* 检查weak_ptr是否可以锁定,连接是否仍然处于活动状态 */ - std::shared_ptr checkedLock() const { - auto shared_impl = m_signalImpl.lock(); - if (shared_impl && shared_impl->isConnectionActive(m_id)) { - return shared_impl; - } - - return nullptr; - } -}; - -/** - * Signal为对象之间的通信提供了一种机制。 - * Signal可以用来通知任意数量的插槽发生了某个事件。插槽几乎可以是任何可调用对象,包括成员函数和lambda。 - * 这种连接以类型安全的方式进行,因为只有当槽的参数与Signal发出的值相匹配时,才能将槽连接到Signal。 - * Args类型参数包描述信号将发出的值类型 - */ -template -class Signal { - static_assert(std::conjunction>...>::value, "R-value references are not allowed as Signal parameters!"); - - /* Signal::Impl类存在,所以Signals可以以类似于pimpl的方式实现。这允许我们轻松地移动信号而不丢失它们的连接句柄,以及使未连接的信号只有sizeof(shared_ptr) */ - class Impl : public Private::SignalImplBase { - public: - Impl() noexcept {} - ~Impl() noexcept {} - - Impl(Impl const &other) = delete; - Impl &operator=(Impl const &other) = delete; - - Impl(Impl &&other) = delete; - Impl &operator=(Impl &&other) = delete; - - /* 将std::function连接到信号。返回值可用于再次断开函数连接 */ - Private::GenerationalIndex connect(std::function const &slot) { - return m_connections.insert({ slot }); - } - - /* 断开先前连接的函数 */ - void disconnect(const Private::GenerationalIndex &id) override { - m_connections.erase(id); - } - - /* 断开以前连接的所有函数 */ - void disconnectAll() { - m_connections.clear(); - } - - bool blockConnection(const Private::GenerationalIndex &id, bool blocked) override { - Connection *connection = m_connections.get(id); - if (connection) { - const bool wasBlocked = connection->blocked; - connection->blocked = blocked; - return wasBlocked; - } else { - throw std::out_of_range("Provided ConnectionHandle does not match any connection\nLikely the connection was deleted before!"); - } - } - - bool isConnectionActive(const Private::GenerationalIndex &id) const override { - return m_connections.get(id); - } - - bool isConnectionBlocked(const Private::GenerationalIndex &id) const override { - auto connection = m_connections.get(id); - if (connection) { - return connection->blocked; - } else { - throw std::out_of_range("Provided ConnectionHandle does not match any connection\nLikely the connection was deleted before!"); - } - } - - /* 调用所有连接的函数 */ - void emit(Args... p) const { - const auto numEntries = m_connections.entriesSize(); - - /* 这个循环可以容忍信号句柄在槽内断开,但向槽内的信号添加新连接仍然是未定义的行为 */ - for (auto i = decltype(numEntries){ 0 }; i < numEntries; ++i) { - const auto index = m_connections.indexAtEntry(i); - if (index) { - const auto con = m_connections.get(*index); - if (!con->blocked) { - con->slot(p...); - } - } - } - } - - private: - struct Connection { - std::function slot; - bool blocked{ false }; - }; - - mutable Private::GenerationalIndexArray m_connections; - }; - -public: - Signal() = default; - - Signal(const Signal &) = delete; - Signal &operator=(Signal const &other) = delete; - - Signal(Signal &&other) noexcept = default; - Signal &operator=(Signal &&other) noexcept = default; - - /* 当信号被破坏时,它会断开所有槽的连接。因此,属于这个信号的所有活动的ConnectionHandle将不再是活动的(即ConnectionHandle::isActive将返回false) */ - ~Signal() { - disconnectAll(); - } - - /** - * 将std::function连接到信号。当在Signal上调用emit()时,将使用提供给emit()的参数调用函数。 - * 返回ConnectionHandle的实例,可用于断开连接或临时阻塞连接 - */ - ConnectionHandle connect(std::function const &slot) { - ensureImpl(); - return ConnectionHandle{ m_impl, m_impl->connect(slot) }; - } - - /** - * Signal::connect的模板重载,可以更容易地将任意函数连接到这个Signal。它将一个函数连接到这个信号,将任何提供的参数绑定到那个函数, - * 并丢弃由这个信号发出的结果函数不需要的任何值。这对于将成员函数连接到信号特别有用 - * - * 返回引用此连接的Signal::ConnectionHandle的实例。警告: 当连接成员函数时,当包含插槽的对象超出作用域时,必须使用返回的ConnectionHandle断开连接! - * - * enable_if_t确保只有当我们提供的函数不能以其他方式转换为std::function时,这个连接函数专门化才可用,因为它会尝试优先于普通的连接函数 - **/ - template>>, std::integral_constant>>> - ConnectionHandle connect(Func &&slot, FuncArgs &&...args) { - std::function bound = Private::bind_first(std::forward(slot), std::forward(args)...); - return connect(bound); - } - - /** - * 断开先前连接的槽位。成功断开槽位后,ConnectionHandle将不再是活动的。(例如,ConnectionHandle::isActive将返回false)。 - * 如果ConnectionHandle不属于这个信号(即ConnectionHandle::belongsTo返回false),则抛出std::out_of_range异常 - */ - void disconnect(const ConnectionHandle &handle) { - if (m_impl && handle.belongsTo(*this)) { - m_impl->disconnect(handle.m_id); - } else { - throw std::out_of_range("Provided ConnectionHandle does not match any connection\nLikely the connection was deleted before!"); - } - } - - /* 断开以前连接的所有功能。属于该信号的所有当前活动的连接句柄之后将不再活动。(例如,ConnectionHandle::isActive将返回false) */ - void disconnectAll() { - if (m_impl) { - m_impl->disconnectAll(); - - /* 一旦断开所有连接,我们就可以释放Impl的所有权。这并不会破坏Signal本身,只会破坏Impl对象。如果连接了另一个槽位,则将构造另一个Impl对象 */ - m_impl.reset(); - } - } - - /** - * 设置连接的块状态。如果连接被阻塞,发出信号将不再调用该连接槽,直到连接被解除阻塞。块可以用作替代方法。 - * 要临时阻塞连接,可以考虑使用ConnectionBlocker的实例,它提供了一个rai风格的实现,确保连接总是返回到其原始状态 - * - * @param blocked 是否应该从现在开始阻止连接 - * @param handle 要阻塞的ConnectionHandle - * @return 连接以前是否被阻塞 - * @throw 如果ConnectionHandle不属于这个信号(即ConnectionHandle::belongsTo返回false),则抛出std::out_of_range异常 - */ - bool blockConnection(const ConnectionHandle &handle, bool blocked) { - if (m_impl && handle.belongsTo(*this)) { - return m_impl->blockConnection(handle.m_id, blocked); - } else { - throw std::out_of_range("Provided ConnectionHandle does not match any connection\nLikely the connection was deleted before!"); - } - } - - /** - * 检查连接当前是否被阻塞。要改变连接的阻塞状态,调用blockConnection() - * - * @return 连接当前是否阻塞 - * @throw 如果ConnectionHandle不属于这个信号(即ConnectionHandle::belongsTo返回false),则抛出std::out_of_range异常 - */ - bool isConnectionBlocked(const ConnectionHandle &handle) const { - assert(handle.belongsTo(*this)); - - if (!m_impl) { - throw std::out_of_range("Provided ConnectionHandle does not match any connection\nLikely the connection was deleted before!"); - } - - return m_impl->isConnectionBlocked(handle.m_id); - } - - /** - * 发出信号,只要没有阻塞,就会调用所有连接的槽。提供给emit的实参将通过复制传递到每个插槽, - * 因此尽可能考虑使用(const)引用作为Signal的参数。注意:插槽可能在发射过程中断开自己, - * 但是在信号的发射函数期间连接的插槽是否也将在这次发射期间被调用,还是只在下一次发射时被调用是未定义的 - */ - void emit(Args... p) const { - if (m_impl) { - m_impl->emit(p...); - } - } - -private: - friend class ConnectionHandle; - - void ensureImpl() { - if (!m_impl) { - m_impl = std::make_shared(); - } - } - - /** - * 这里使用的是shared_ptr而不是unique_ptr,因此ConnectionHandle实例可以使用weak_ptr来检查他们引用的Signal::Impl是否仍然存在。 - * 这使得信号在理论上很容易被复制,但其语义尚不清楚。复制可以简单地复制shared_ptr,这意味着副本将共享原始文件的连接, - * 这可能是不直观的,或者也必须复制Impl。然而,这将使连接没有句柄来断开连接。所以现在是禁止复制的。 - * 这个shared_ptr更像是一个unique_ptr,在ConnectionHandle中有附加的weak_ptr,可以检查Impl对象是否仍然存在 - */ - mutable std::shared_ptr m_impl; -}; - -/** - * ScopedConnection是一种rails风格的方法,用于确保连接断开。 - * 当ScopedConnections作用域结束时,此ScopedConnection保护的连接将断开 - */ -class ScopedConnection { -public: - ScopedConnection() = default; - ScopedConnection(ScopedConnection &&) = default; - - ScopedConnection(const ScopedConnection &) = delete; - ScopedConnection &operator=(const ScopedConnection &) = delete; - - ScopedConnection &operator=(ScopedConnection &&other) { - m_connection.disconnect(); - m_connection = std::move(other.m_connection); - return *this; - } - - ScopedConnection(ConnectionHandle &&h) : m_connection(std::move(h)) { - - } - - ScopedConnection &operator=(ConnectionHandle &&h) { - return *this = ScopedConnection(std::move(h)); - } - - /* 此实例正在管理的连接的句柄 */ - ConnectionHandle &handle() { - return m_connection; - } - - const ConnectionHandle &handle() const { - return m_connection; - } - - /* 使用'->'操作符方便地访问底层连接句柄 */ - ConnectionHandle *operator->() { - return &m_connection; - } - - const ConnectionHandle *operator->() const { - return &m_connection; - } - - ~ScopedConnection() { - m_connection.disconnect(); - } - -private: - ConnectionHandle m_connection; -}; - -/** - * ConnectionBlocker是一种方便的raii式机制,用于临时阻塞连接。当ConnectionBlocker被构造时,它将阻塞连接。 - * 当它被销毁时,它将把连接返回到构造ConnectionBlocker之前的阻塞状态 - */ -class ConnectionBlocker { -public: - /* 构造一个新的ConnectionBlocker并阻塞此ConnectionHandle引用的连接 */ - explicit ConnectionBlocker(const ConnectionHandle &handle) : m_handle{ handle } { - m_wasBlocked = m_handle.block(true); - } - - /* 销毁ConnectionBlocker并将连接返回到构造ConnectionBlocker之前的阻塞状态 */ - ~ConnectionBlocker() { - m_handle.block(m_wasBlocked); - } - -private: - ConnectionHandle m_handle; - bool m_wasBlocked{ false }; -}; -} diff --git a/project/3rdparty/include/bindings/utils.hpp b/project/3rdparty/include/bindings/utils.hpp deleted file mode 100644 index 735f947cf..000000000 --- a/project/3rdparty/include/bindings/utils.hpp +++ /dev/null @@ -1,129 +0,0 @@ -#pragma once - -#include -#include -#include - -namespace Bindings { -namespace Private { -/** - * get_arity是一个模板函数,它返回(几乎)任何可调用对象的实参数量。最简单的方法是为可调用类型T调用get_arity()。 - * 它需要是constexpr,以便可以在模板实参中使用 - */ - -/* 要重载get_arity,它需要一个标记类型,因为c++不允许部分函数专门化 */ -template -struct TypeMarker { - constexpr TypeMarker() = default; -}; - -/* get_arity的基本实现通过为其专门化的TypeMarker使用重载来引用每种可调用对象类型的专门化实现 */ -template -constexpr size_t get_arity() -{ - return get_arity(TypeMarker>{}); -} - -/* get_arity的语法糖版本,允许将任何可调用对象传递给get_arity,而不必将其decltype作为模板参数传递 */ -template -constexpr size_t get_arity(const T &) -{ - return get_arity(); -} - -/* 函数指针的arity就是它的参数个数 */ -template -constexpr size_t get_arity(TypeMarker) -{ - return sizeof...(Arguments); -} - -template -constexpr size_t get_arity(TypeMarker) -{ - return sizeof...(Arguments); -} - -/* 泛型可调用对象的arity是它的operator() - 1的arity,因为this指针对于这样的对象是已知的 */ -template -constexpr size_t get_arity(TypeMarker) -{ - return get_arity(TypeMarker{}) - 1; -} - -/* 帮助定义可能的成员函数限定符的大多数组合。给sizeof...(Arguments)加上1,因为"this"指针是指向任何成员函数的隐式参数 */ -#define BINDINGS_DEFINE_MEMBER_GET_ARITY(MODIFIERS) \ - template \ - constexpr size_t get_arity(::Bindings::Private::TypeMarker) \ - { \ - return sizeof...(Arguments) + 1; \ - } - -/* 在不使用宏的情况下定义不带修饰符的get_arity版本 */ -template -constexpr size_t get_arity(::Bindings::Private::TypeMarker) -{ - return sizeof...(Arguments) + 1; -} - -BINDINGS_DEFINE_MEMBER_GET_ARITY(const) -BINDINGS_DEFINE_MEMBER_GET_ARITY(&) -BINDINGS_DEFINE_MEMBER_GET_ARITY(const &) -BINDINGS_DEFINE_MEMBER_GET_ARITY(&&) -BINDINGS_DEFINE_MEMBER_GET_ARITY(const &&) - -BINDINGS_DEFINE_MEMBER_GET_ARITY(volatile) -BINDINGS_DEFINE_MEMBER_GET_ARITY(volatile const) -BINDINGS_DEFINE_MEMBER_GET_ARITY(volatile &) -BINDINGS_DEFINE_MEMBER_GET_ARITY(volatile const &) -BINDINGS_DEFINE_MEMBER_GET_ARITY(volatile &&) -BINDINGS_DEFINE_MEMBER_GET_ARITY(volatile const &&) - -BINDINGS_DEFINE_MEMBER_GET_ARITY(noexcept) -BINDINGS_DEFINE_MEMBER_GET_ARITY(const noexcept) -BINDINGS_DEFINE_MEMBER_GET_ARITY(&noexcept) -BINDINGS_DEFINE_MEMBER_GET_ARITY(const &noexcept) -BINDINGS_DEFINE_MEMBER_GET_ARITY(&&noexcept) -BINDINGS_DEFINE_MEMBER_GET_ARITY(const &&noexcept) - -BINDINGS_DEFINE_MEMBER_GET_ARITY(volatile noexcept) -BINDINGS_DEFINE_MEMBER_GET_ARITY(volatile const noexcept) -BINDINGS_DEFINE_MEMBER_GET_ARITY(volatile &noexcept) -BINDINGS_DEFINE_MEMBER_GET_ARITY(volatile const &noexcept) -BINDINGS_DEFINE_MEMBER_GET_ARITY(volatile &&noexcept) -BINDINGS_DEFINE_MEMBER_GET_ARITY(volatile const &&noexcept) - -/* 占位符提供了一种构造等价于std::placeholders::_N的方法,其中N作为模板参数。由于占位符从1开始,因此placeholder<0>不是有效的占位符 */ -template -struct placeholder { - -}; - -template -auto bind_first_helper(std::index_sequence, Func &&fun, Args... args) -{ - return std::bind(std::forward(fun), std::forward(args)..., placeholder{}...); -} - -/** - * bind_first将可调用对象(即函数)的第一个参数绑定到args提供的值。 - * 返回值是一个接受get_arity - sizeof...(Args)多个参数的新函数,第一个sizeof...(Args)参数绑定到Args的值。 - * 这与std::bind(fun, args...)的调用不同,因为在这种情况下,由std::bind创建的可调用对象现在将接受零参数,而bind_first仍然期望提供剩余的参数。 - * 目前,在Args中提供std::placeholders的实例是不允许的,因为如果sizeof...(Args) != get_arity的含义还不清楚。enable_if_t确保没有一个Args值是占位符。 - * 将来,我们可以提供这个函数的另一个重载,允许占位符,只要所有实参都被绑定 - */ -template>...>>> -auto bind_first(Func &&fun, Args &&...args) -{ - return bind_first_helper(std::make_index_sequence() - sizeof...(Args)>{}, std::forward(fun), std::forward(args)...); -} -} -} - -namespace std { -/* 这允许使用占位符替换std::placeholders */ -template -struct is_placeholder> : integral_constant { - -}; -} diff --git a/project/3rdparty/include/cmdline/commandLine.hpp b/project/3rdparty/include/cmdline/commandLine.hpp deleted file mode 100644 index 2321e8845..000000000 --- a/project/3rdparty/include/cmdline/commandLine.hpp +++ /dev/null @@ -1,467 +0,0 @@ -#ifndef COMMANDLINE_H -#define COMMANDLINE_H - -#include - -#include -#include -#include -#include - -#define ARGC_START 0 -#define ARG_POSITION(x) x - -namespace utils { -/* 用于提取标志、值和字符串的命令行解析器 */ -class commandLine { -public: - commandLine(const int argc, char *argv[], const char *extraFlag = NULL) { - mArgc = argc; - mArgv = argv; - AddFlag(extraFlag); - } - - commandLine(const int argc, char *argv[], const char **extraArgs) { - mArgc = argc; - mArgv = argv; - AddArgs(extraArgs); - } - - /** - * 函数名称: GetFlag - * 功能描述: 检查指定的标志是否包含在命令行中。例如,如果argv包含'--foo',那么'GetFlag("foo")'将返回true - * 输入参数: argName --> 待解析的参数名 - * allowOtherDelimiters --> 如果为true(默认),则argName将匹配包含'-'或'_'的项。例如,'--foo-bar'和'--foo_bar'是相同的 - * 输出参数: 无 - * 返回说明: 如果找到带有argName的标志为true,如果没有找到带有argName的标志为false - */ - bool GetFlag(const char *argName, bool allowOtherDelimiters = true) const { - if (mArgc < 1) { - return false; - } - - for (int i = ARGC_START; i < mArgc; i++) { - const int string_start = strFindDelimiter('-', mArgv[i]); - if (string_start == 0) { - continue; - } - - const char *string_argv = &mArgv[i][string_start]; - const char *equal_pos = strchr(string_argv, '='); - - const int length = (int)strlen(argName); - const int argv_length = (int)(equal_pos == 0 ? strlen(string_argv) : equal_pos - string_argv); - - if ((length == argv_length) && !strncasecmp(string_argv, argName, length)) { - return true; - } - } - - if (!allowOtherDelimiters) { - return false; - } - - /* 尝试寻找交换了分隔符的参数 */ - char *swapped_ref = strSwapDelimiter(argName); - if (!swapped_ref) { - return false; - } - - const bool value = GetFlag(swapped_ref, false); - free(swapped_ref); - - return value; - } - - /** - * 函数名称: GetFloat - * 功能描述: 获取浮动的参数。例如,如果argv包含'--foo=3.14159',那么'GetInt("foo")'将返回'3.14159f' - * 输入参数: argName --> 待解析的参数名 - * defaultValue --> 默认值 - * allowOtherDelimiters --> 如果为true(默认),则argName将匹配包含'-'或'_'的项。例如,'--foo-bar'和'--foo_bar'是相同的 - * 输出参数: 无 - * 返回说明: 如果找不到参数则返回默认值(默认情况下为'0.0')。否则,返回实参的值 - */ - float GetFloat(const char *argName, float defaultValue = 0.0f, bool allowOtherDelimiters = true) const { - if (mArgc < 1) { - return defaultValue; - } - - float value = -1; - bool bFound = false; - - for (int i = ARGC_START; i < mArgc; i++) { - const int string_start = strFindDelimiter('-', mArgv[i]); - if (string_start == 0) { - continue; - } - - const int length = (int)strlen(argName); - const char *string_argv = &mArgv[i][string_start]; - - if (!strncasecmp(string_argv, argName, length)) { - if ((length + 1) <= (int)strlen(string_argv)) { - int auto_inc = (string_argv[length] == '=') ? 1 : 0; - value = (float)atof(&string_argv[length + auto_inc]); - } else { - value = 0.f; - } - - bFound = true; - continue; - } - } - - if (bFound) { - return value; - } - - if (!allowOtherDelimiters) { - return defaultValue; - } - - /* 尝试寻找交换了分隔符的参数 */ - char *swapped_ref = strSwapDelimiter(argName); - if (!swapped_ref) { - return defaultValue; - } - - value = GetFloat(swapped_ref, defaultValue, false); - free(swapped_ref); - - return value; - } - - /** - * 函数名称: GetInt - * 功能描述: 获取整数参数。例如,如果argv包含'--foo=100',那么'GetInt("foo")'将返回'100' - * 输入参数: argName --> 待解析的参数名 - * defaultValue --> 默认值 - * allowOtherDelimiters --> 如果为true(默认),则argName将匹配包含'-'或'_'的项。例如,'--foo-bar'和'--foo_bar'是相同的 - * 输出参数: 无 - * 返回说明: 如果找不到参数则返回默认值(默认情况下为'0')。否则,返回实参的值 - */ - int GetInt(const char *argName, int defaultValue = 0, bool allowOtherDelimiters = true) const { - if (mArgc < 1) { - return defaultValue; - } - - int value = -1; - bool bFound = false; - - for (int i = ARGC_START; i < mArgc; i++) { - const int string_start = strFindDelimiter('-', mArgv[i]); - if (string_start == 0) { - continue; - } - - const int length = (int)strlen(argName); - const char *string_argv = &mArgv[i][string_start]; - - if (!strncasecmp(string_argv, argName, length)) { - if ((length + 1) <= (int)strlen(string_argv)) { - int auto_inc = (string_argv[length] == '=') ? 1 : 0; - value = atoi(&string_argv[length + auto_inc]); - } else { - value = 0; - } - - bFound = true; - continue; - } - } - - if (bFound) { - return value; - } - - if (!allowOtherDelimiters) { - return defaultValue; - } - - /* 尝试寻找交换了分隔符的参数 */ - char *swapped_ref = strSwapDelimiter(argName); - if (!swapped_ref) { - return defaultValue; - } - - value = GetInt(swapped_ref, defaultValue, false); - free(swapped_ref); - - return value; - } - - /** - * 函数名称: GetUint - * 功能描述: 获取整数参数。例如,如果argv包含'--foo=100',那么'GetInt("foo")'将返回'100' - * 输入参数: argName --> 待解析的参数名 - * defaultValue --> 默认值 - * allowOtherDelimiters --> 如果为true(默认),则argName将匹配包含'-'或'_'的项。例如,'--foo-bar'和'--foo_bar'是相同的 - * 输出参数: 无 - * 返回说明: 如果找不到参数则返回默认值(默认情况下为'0')。否则,返回实参的值 - */ - uint32_t GetUint(const char *argName, uint32_t defaultValue = 0, bool allowOtherDelimiters = true) const { - const int val = GetInt(argName, (int)defaultValue, allowOtherDelimiters); - if (val < 0) { - return defaultValue; - } - - return val; - } - - /** - * 函数名称: GetString - * 功能描述: 获取字符串参数。例如,如果argv包含'--foo=bar',那么'GetString("foo")'将返回"bar" - * 输入参数: argName --> 待解析的参数名 - * defaultValue --> 默认值 - * allowOtherDelimiters --> 如果为true(默认),则argName将匹配包含'-'或'_'的项。例如,'--foo-bar'和'--foo_bar'是相同的 - * 输出参数: 无 - * 返回说明: 如果找不到参数,则返回默认值(默认为'NULL')。否则,返回一个指向'argv'数组中的参数值字符串的指针 - */ - const char *GetString(const char *argName, const char *defaultValue = NULL, bool allowOtherDelimiters = true) const { - if (mArgc < 1) { - return defaultValue; - } - - for (int i = ARGC_START; i < mArgc; i++) { - const int string_start = strFindDelimiter('-', mArgv[i]); - if (string_start == 0) { - continue; - } - - const int length = (int)strlen(argName); - char *string_argv = (char *)&mArgv[i][string_start]; - - if (!strncasecmp(string_argv, argName, length)) { - return (string_argv + length + 1); - } - } - - if (!allowOtherDelimiters) { - return defaultValue; - } - - /* 尝试寻找交换了分隔符的参数 */ - char *swapped_ref = strSwapDelimiter(argName); - if (!swapped_ref) { - return defaultValue; - } - - const char *value = GetString(swapped_ref, defaultValue, false); - free(swapped_ref); - - return value; - } - - /** - * 函数名称: GetPosition - * 功能描述: 获取位置字符串参数。位置参数不被命名,而是由它们在列表中的索引引用。例如,如果命令行包含'my-program --foo=bar /path/to/my_file.txt',那么'GetString(0)'将返回"/path/to/my_file.txt" - * 输入参数: position --> 参数位置 - * defaultValue --> 默认值 - * 输出参数: 无 - * 返回说明: 如果找不到参数,则返回默认值(默认为'NULL')。否则,返回一个指向'argv'数组中的参数值字符串的指针 - */ - const char *GetPosition(unsigned int position, const char *defaultValue = NULL) const { - if ((mArgc < 1) || (position >= GetPositionArgs())) { - return defaultValue; - } - - unsigned int position_count = 0; - for (int i = 1; i < mArgc; i++) { - const int string_start = strFindDelimiter('-', mArgv[i]); - if (string_start != 0) { - continue; - } - - if (position == position_count) { - return mArgv[i]; - } - - position_count++; - } - - return defaultValue; - } - - /** - * 函数名称: GetPositionArgs - * 功能描述: 获取命令行中位置参数的数量。位置参数是那些没有名称的参数 - * 输入参数: 无 - * 输出参数: 无 - * 返回说明: 命令行中位置参数的数量 - */ - unsigned int GetPositionArgs() const { - unsigned int position_count = 0; - - for (int i = 1; i < mArgc; i++) { - const int string_start = strFindDelimiter('-', mArgv[i]); - if (string_start != 0) { - continue; - } - - position_count++; - } - - return position_count; - } - -private: - /** - * 函数名称: AddArg - * 功能描述: 向命令行添加一个参数 - * 输入参数: arg --> 添加的参数 - * 输出参数: 无 - * 返回说明: 无 - */ - void AddArg(const char *arg) { - if (!arg) { - return; - } - - const size_t arg_length = strlen(arg); - if (arg_length == 0) { - return; - } - - const int new_argc = mArgc + 1; - char **new_argv = (char **)malloc(sizeof(char *) * new_argc); - if (!new_argv) { - return; - } - - for (int n = 0; n < mArgc; n++) { - new_argv[n] = mArgv[n]; - } - - new_argv[mArgc] = (char *)malloc(arg_length + 1); - if (!new_argv[mArgc]) { - return; - } - - strcpy(new_argv[mArgc], arg); - mArgc = new_argc; - mArgv = new_argv; - } - - /** - * 函数名称: AddArgs - * 功能描述: 向命令行添加参数 - * 输入参数: arg --> 添加的参数 - * 输出参数: 无 - * 返回说明: 无 - */ - void AddArgs(const char **args) { - if (!args) { - return; - } - - int arg_count = 0; - while (true) { - if (!args[arg_count]) { - return; - } - - AddArg(args[arg_count]); - arg_count++; - } - } - - /** - * 函数名称: AddFlag - * 功能描述: 在命令行中添加一个标志。 - * 输入参数: flag --> 添加的标志 - * 输出参数: 无 - * 返回说明: 无 - */ - void AddFlag(const char *flag) { - if (!flag || (strlen(flag) == 0)) { - return; - } - - if (GetFlag(flag)) { - return; - } - - const std::string arg = std::string("--") + flag; - AddArg(arg.c_str()); - } - -public: - /** - * 函数名称: Print - * 功能描述: 打印出命令行以供参考 - * 输入参数: 无 - * 输出参数: 无 - * 返回说明: 无 - */ - void Print() const { - for (int n = 0; n < mArgc; n++) { - printf("%s ", mArgv[n]); - } - printf("\n"); - } - -private: - /* 在一个字符串中搜索一个开头字符的结尾(例如: '--foo') */ - static int strFindDelimiter(char delimiter, const char *str) { - int string_start = 0; - - while (str[string_start] == delimiter) { - string_start++; - } - - if (string_start >= (int)strlen(str)-1) { - return 0; - } - - return string_start; - } - - /* 将连字符替换为下划线,反之亦然(如果没有变化则返回NULL) */ - static char *strSwapDelimiter(const char *str) { - if (!str) { - return NULL; - } - - /* 确定原始字符是否在字符串中 */ - bool found = false; - const int str_length = strlen(str); - - for (int n = 0; n < str_length; n++) { - if ((str[n] == '-') || (str[n] == '_' )) { - found = true; - break; - } - } - - if (!found) { - return NULL; - } - - /* 分配要修改的新字符串 */ - char *new_str = (char *)malloc(str_length); - if (!new_str) { - return NULL; - } - - strcpy(new_str, str); - - /* 替换旧字符的实例 */ - for (int n = 0; n < str_length; n++) { - if (new_str[n] == '-') { - new_str[n] = '_'; - } else if (new_str[n] == '_') { - new_str[n] = '-'; - } - } - - return new_str; - } - -private: - int mArgc; /* 从main()中创建对象的参数计数 */ - char **mArgv; /* 从main()中创建对象的参数字符串 */ -}; -} - -#endif diff --git a/project/3rdparty/include/hope/application.hpp b/project/3rdparty/include/hope/application.hpp deleted file mode 100644 index 7d7076884..000000000 --- a/project/3rdparty/include/hope/application.hpp +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once - -#include "object.hpp" -#include "eventloop.hpp" - -namespace hope { -namespace detail { -class ObjectData; -} - -namespace test { -class ApplicationTestHelper; -} - -class Application : public Object { -public: - Application(); - ~Application() override; - - void quit(int exit_code); - - void quit() { - quit(0); - } - - int exec(); - -private: - friend class test::ApplicationTestHelper; - - EventLoop m_event_loop; -}; -} diff --git a/project/3rdparty/include/hope/atomicwrapper.hpp b/project/3rdparty/include/hope/atomicwrapper.hpp deleted file mode 100644 index ee02861b8..000000000 --- a/project/3rdparty/include/hope/atomicwrapper.hpp +++ /dev/null @@ -1,45 +0,0 @@ -#pragma once - -#include -#include - -namespace hope { -namespace detail { -template -class AtomicWrapper { -public: - AtomicWrapper() = default; - - AtomicWrapper(T &&t) : m_atomic(std::move(t)) { - - } - - AtomicWrapper(const AtomicWrapper &other) : m_atomic(other.m_atomic.load()) { - - } - - AtomicWrapper(AtomicWrapper &&other) noexcept = delete; - - AtomicWrapper &operator=(const AtomicWrapper &other) { - if (&other != this) { - *this = AtomicWrapper(other); - } - - return *this; - } - - AtomicWrapper &operator=(AtomicWrapper &&other) noexcept = delete; - - const std::atomic &value() const { - return m_atomic; - } - - std::atomic &value() { - return m_atomic; - } - -private: - std::atomic m_atomic; -}; -} -} diff --git a/project/3rdparty/include/hope/connection.hpp b/project/3rdparty/include/hope/connection.hpp deleted file mode 100644 index b5fab60d2..000000000 --- a/project/3rdparty/include/hope/connection.hpp +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include - -namespace hope { -class Connection { -public: - Connection(std::int64_t id) : m_valid(true), m_id(id) { - - } - - std::int64_t id() const { - return m_id; - } - - bool valid() const { - return m_valid; - } - - bool operator==(const Connection &other) const { - return (m_id == other.m_id); - } - - bool operator<(const Connection &other) const { - return (m_id < other.m_id); - } - -private: - const bool m_valid = false; - const std::int64_t m_id; -}; -} diff --git a/project/3rdparty/include/hope/event.hpp b/project/3rdparty/include/hope/event.hpp deleted file mode 100644 index 84ea29b0d..000000000 --- a/project/3rdparty/include/hope/event.hpp +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -namespace hope { -class Event { -public: - virtual ~Event() = default; -}; -} diff --git a/project/3rdparty/include/hope/eventloop.hpp b/project/3rdparty/include/hope/eventloop.hpp deleted file mode 100644 index 40d008c8b..000000000 --- a/project/3rdparty/include/hope/eventloop.hpp +++ /dev/null @@ -1,64 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include -#include - -#include "event.hpp" -#include "object.hpp" -#include "atomicwrapper.hpp" - -namespace hope { -namespace detail { -class ObjectData; -} - -namespace test { -class EventLoopTestHelper; -} - -class EventLoop : public Object { -public: - using Mutex = std::mutex; - using Locker = std::unique_lock; - using Clock = std::chrono::steady_clock; - using TimePoint = std::chrono::time_point; - - EventLoop(); - ~EventLoop() override; - - bool is_running() const; - - void push_event(std::shared_ptr event, TimePoint when = Clock::now()); - void push_event(std::shared_ptr event, std::chrono::milliseconds duration, TimePoint offset = Clock::now()); - - void quit(int exit_code = 0); - int exec(); - - void register_object(Object *object); - void unregister_object(Object *object); - - void on_event(Event *event) final; - -private: - friend class EventLoopTestHelper; - - int loop(); - - void process_events(const std::vector> &events); - void cleanup_objects(); - - int m_exit_code = 0; - bool m_exit = false; - bool m_is_running = false; - mutable Mutex m_mutex; - mutable Mutex m_objects_mutex; - std::condition_variable m_cond; - std::multimap> m_events; - std::map> m_objects; -}; -} diff --git a/project/3rdparty/include/hope/hope.hpp b/project/3rdparty/include/hope/hope.hpp deleted file mode 100644 index 76e621104..000000000 --- a/project/3rdparty/include/hope/hope.hpp +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -#include "timer.hpp" -#include "event.hpp" -#include "thread.hpp" -#include "signal.hpp" -#include "optional.hpp" -#include "eventloop.hpp" -#include "threaddata.hpp" -#include "objectdata.hpp" -#include "connection.hpp" -#include "application.hpp" -#include "atomicwrapper.hpp" -#include "indexsequence.hpp" -#include "objectinvoker.hpp" -#include "queuedinvokationevent.hpp" diff --git a/project/3rdparty/include/hope/indexsequence.hpp b/project/3rdparty/include/hope/indexsequence.hpp deleted file mode 100644 index f2d53f9f1..000000000 --- a/project/3rdparty/include/hope/indexsequence.hpp +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include - -namespace hope { -namespace detail { -template -struct index_sequence { - -}; - -template -struct index_sequence_builder { - using result = typename index_sequence_builder < K - 1, K - 1, Remainder... >::result; -}; - -template -struct index_sequence_builder<0, Remainder...> { - using result = index_sequence; -}; - -template -using make_index_sequence = typename index_sequence_builder::result; -} -} diff --git a/project/3rdparty/include/hope/object.hpp b/project/3rdparty/include/hope/object.hpp deleted file mode 100644 index 6d2a3628f..000000000 --- a/project/3rdparty/include/hope/object.hpp +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - -#include -#include -#include - -namespace hope { -class Event; -class Thread; - -namespace detail { -class ObjectData; -} - -class Object { -public: - Object(); - virtual ~Object(); - - void move_to_thread(Thread *thread); - void move_to_thread(std::thread::id thread); - - virtual void on_event(Event *event); - -protected: - Object(bool initialize); - - void terminate(); - void initialize(); - - std::atomic m_initialized; - std::atomic m_terminated; - std::shared_ptr m_data; -}; -} diff --git a/project/3rdparty/include/hope/objectdata.hpp b/project/3rdparty/include/hope/objectdata.hpp deleted file mode 100644 index 788027f82..000000000 --- a/project/3rdparty/include/hope/objectdata.hpp +++ /dev/null @@ -1,92 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -namespace hope { -class Object; - -namespace detail { -class ObjectData { -public: - ObjectData(std::thread::id id) : m_thread_id(std::move(id)) { - - } - - std::unique_lock lock() { - return lock(*this); - } - - static std::unique_lock lock(const std::shared_ptr &data) { - return data ? lock(*data) : std::unique_lock(); - } - - static std::unique_lock lock(ObjectData &data) { - return std::unique_lock(data.m_mutex); - } - - static std::pair, std::unique_lock> lock(const std::shared_ptr &first, const std::shared_ptr &second) { - if (first && second) { - return lock(*first, *second); - } else if (first) { - return { lock(*first), std::unique_lock() }; - } else if (second) { - return { lock(*second), std::unique_lock() }; - } else { - return { std::unique_lock(), std::unique_lock() }; - } - } - - static std::pair, std::unique_lock> lock(ObjectData &first, ObjectData &second) { - ObjectData *first_address = &first; - ObjectData *second_address = &second; - - if (first_address >= second_address) { - std::swap(first_address, second_address); - } - - std::unique_lock first_lock = lock(*first_address); - std::unique_lock second_lock; - if (first_address != second_address) { - second_lock = lock(*second_address); - } - - return {std::move(first_lock), std::move(second_lock)}; - } - - std::thread::id m_thread_id; - std::mutex m_mutex; -}; - -class ObjectDataRegistry { -public: - static ObjectDataRegistry &instance(); - - ObjectDataRegistry(const ObjectDataRegistry &) = delete; - ObjectDataRegistry(ObjectDataRegistry &&) = delete; - - ObjectDataRegistry &operator=(const ObjectDataRegistry &) = delete; - ObjectDataRegistry &operator=(ObjectDataRegistry &&) = delete; - - std::weak_ptr data(Object *object) { - auto it = m_data.find(object); - return it != m_data.end() ? it->second : std::weak_ptr(); - } - - void register_object_data(Object *object, const std::shared_ptr &data) { - m_data.emplace(object, data); - } - - void unregister_object_data(Object *object) { - m_data.erase(object); - } - -private: - ObjectDataRegistry() = default; - - std::map> m_data; -}; -} -} diff --git a/project/3rdparty/include/hope/objectinvoker.hpp b/project/3rdparty/include/hope/objectinvoker.hpp deleted file mode 100644 index e43249dab..000000000 --- a/project/3rdparty/include/hope/objectinvoker.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -#include "signal.hpp" - -namespace hope { -class ObjectInvoker { -public: - ObjectInvoker() = delete; - - template - static void invoke(Object *obj, void(Object::*func)(Args... args), ConnectionType type, Args...args) { - Signal signal; - signal.connect(obj, func, type); - signal.emit(args...); - } -}; -} diff --git a/project/3rdparty/include/hope/optional.hpp b/project/3rdparty/include/hope/optional.hpp deleted file mode 100644 index 3234e8189..000000000 --- a/project/3rdparty/include/hope/optional.hpp +++ /dev/null @@ -1,91 +0,0 @@ -#pragma once - -namespace hope { -namespace detail { -template -class Optional { -public: - Optional() : m_ok(false) { - } - - Optional(T &&data) : m_ok(true), m_data(std::move(data)) { - - } - - Optional(const T &data) : m_ok(true), m_data(data) { - - } - - template - Optional(Args && ... args) : m_ok(true), m_data(std::forward(args...)) { - - } - - Optional(const Optional &) = default; - Optional(Optional &&) noexcept = default; - - Optional &operator=(const Optional &) = default; - Optional &operator=(Optional &&) noexcept = default; - - Optional &operator=(const T &data) { - m_ok = true; - m_data = data; - return *this; - } - - Optional& operator=(T &&data) { - m_ok = true; - m_data = std::move(data); - return *this; - } - - void reset() { - m_ok = false; - } - - T &data() { - return m_data; - } - - const T &data() const { - return m_data; - } - - bool is_some() const { - return m_ok; - } - - bool is_none() const { - return !m_ok; - } - - operator T() { - return m_data; - } - - operator bool() { - return m_ok; - } - - T *operator->() { - return m_ok ? &m_data : nullptr; - } - - const T *operator->() const { - return m_ok ? &m_data : nullptr; - } - - bool operator==(const Optional &other) const { - return (m_ok == other.m_ok) && (m_data == other.m_data); - } - - bool operator!=(const Optional &other) const { - return !operator==(other); - } - -private: - bool m_ok = false; - T m_data; -}; -} -} diff --git a/project/3rdparty/include/hope/queuedinvokationevent.hpp b/project/3rdparty/include/hope/queuedinvokationevent.hpp deleted file mode 100644 index c00857db9..000000000 --- a/project/3rdparty/include/hope/queuedinvokationevent.hpp +++ /dev/null @@ -1,141 +0,0 @@ -#pragma once - -#include -#include - -#include "event.hpp" -#include "indexsequence.hpp" - -namespace hope { -class Object; - -class QueuedInvokationEventBase : public Event { -public: - virtual Object *object() = 0; - virtual void invoke() = 0; - virtual void wait() = 0; -}; - -template -class QueuedInvokation final : public QueuedInvokationEventBase { - using ObjectFuncPtr = void(Object::* const)(Args...); - using ObjectFuncArgs = std::tuple; - -public: - QueuedInvokation(Object *object, ObjectFuncPtr object_func, Args...args) - : m_object(object), m_object_func(object_func), m_object_func_args(std::move(args)...) - { - - } - - QueuedInvokation() = default; - QueuedInvokation(const QueuedInvokation &) = delete; - QueuedInvokation(QueuedInvokation &&) noexcept = default; - - QueuedInvokation &operator=(const QueuedInvokation &) = delete; - QueuedInvokation &operator=(QueuedInvokation &&) noexcept = default; - - Object *object() final { - return m_object; - } - - void invoke() final { - invoke_impl(m_object_func_args); - } - - void wait() final { - std::unique_lock lock(m_mutex); - m_cond.wait(lock, [this] { - return m_executed; - }); - } - - template - void invoke_impl(Tuple &a, hope::detail::index_sequence) { - (m_object->*m_object_func)(std::move(std::get(a))...); - set_executed(); - } - - template> - void invoke_impl(std::tuple &t) { - invoke_impl(t, Indices{}); - } - - void set_executed() { - { - std::lock_guard lock(m_mutex); - m_executed = true; - } - - m_cond.notify_all(); - } - - Object *const m_object = nullptr; - ObjectFuncPtr m_object_func = nullptr; - ObjectFuncArgs m_object_func_args; - std::mutex m_mutex; - std::condition_variable m_cond; - bool m_executed = false; -}; - -template -class QueuedInvokation final : public QueuedInvokationEventBase { - using ObjectFuncPtr = void(Object::* const)(); - -public: - QueuedInvokation(Object *object, ObjectFuncPtr object_func) : m_object(object), m_object_func(object_func) { - - } - - QueuedInvokation() = default; - QueuedInvokation(const QueuedInvokation &) = delete; - QueuedInvokation(QueuedInvokation &&) noexcept = default; - - QueuedInvokation &operator=(const QueuedInvokation &) = delete; - QueuedInvokation &operator=(QueuedInvokation &&) noexcept = default; - - Object *object() final { - return m_object; - } - - void invoke() final { - (m_object->*m_object_func)(); - set_executed(); - } - - void wait() final { - std::unique_lock lock(m_mutex); - m_cond.wait(lock, [this] { - return m_executed; - }); - } - -private: - void set_executed() { - { - std::lock_guard lock(m_mutex); - m_executed = true; - } - - m_cond.notify_all(); - } - - Object *const m_object = nullptr; - ObjectFuncPtr m_object_func = nullptr; - std::mutex m_mutex; - std::condition_variable m_cond; - bool m_executed = false; -}; - -template -std::shared_ptr> make_queued_invokation_event(Object *object, void(Object::*object_func)(Args...), Args...args) -{ - return std::make_shared>(object, object_func, std::move(args)...); -} - -template -std::shared_ptr> make_queued_invokation_event(Object *object, void(Object::*object_func)()) -{ - return std::make_shared>(object, object_func); -} -} diff --git a/project/3rdparty/include/hope/signal.hpp b/project/3rdparty/include/hope/signal.hpp deleted file mode 100644 index c8c6b6c26..000000000 --- a/project/3rdparty/include/hope/signal.hpp +++ /dev/null @@ -1,195 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include - -#include "optional.hpp" -#include "objectdata.hpp" -#include "threaddata.hpp" -#include "connection.hpp" -#include "queuedinvokationevent.hpp" - -namespace hope { -enum class ConnectionType { - Auto, Direct, Queued, QueuedBlocking -}; - -namespace detail { -template -struct BaseInvoker { - BaseInvoker() : m_valid(true) { - - } - - virtual ~BaseInvoker() = default; - - virtual void invoke(Args... args) const = 0; - - virtual const void *receiver_pointer() const = 0; - virtual const void *receiver_func_pointer() const = 0; - - std::atomic m_valid; -}; - -template -struct Invoker final : public BaseInvoker { - using ReceiverMemFunc = void(Receiver::*)(Args...); - - Invoker(Receiver *receiver, ReceiverMemFunc receiver_func, ConnectionType type) : m_receiver(receiver), m_receiver_func(receiver_func), m_type(type) { - - } - - void invoke(Args...args) const final { - switch (m_type) { - case ConnectionType::Auto: - invoke_auto(std::move(args)...); - break; - - case ConnectionType::Direct: - invoke_direct(std::move(args)...); - break; - - case ConnectionType::Queued: - invoke_queued(std::move(args)...); - break; - - case ConnectionType::QueuedBlocking: - invoke_queued_blocking(std::move(args)...); - break; - } - } - - void invoke_auto(Args...args) const { - if (Optional thread_id = receiver_thread_id()) { - if (std::this_thread::get_id() != thread_id) { - invoke_queued(std::forward(args)...); - } else { - invoke_direct(std::forward(args)...); - } - } - } - - void invoke_queued(Args...args) const { - if (Optional thread_id = receiver_thread_id()) { - auto event = make_queued_invokation_event(m_receiver, m_receiver_func, std::move(args)...); - ThreadDataRegistry::instance().thread_data(thread_id)->push_event(std::move(event)); - } - } - - void invoke_queued_blocking(Args...args) const { - if (Optional thread_id = receiver_thread_id()) { - auto event = make_queued_invokation_event(m_receiver, m_receiver_func, std::move(args)...); - ThreadDataRegistry::instance().thread_data(thread_id)->push_event(event); - event->wait(); - } - } - - void invoke_direct(Args...args) const { - if (is_receiver_alive()) { - (m_receiver->*m_receiver_func)(std::move(args)...); - } - } - - const void *receiver_pointer() const final { - return m_receiver; - } - - const void *receiver_func_pointer() const final { - return &m_receiver_func; - } - -private: - Optional receiver_thread_id() const { - Optional result; - if (auto data = ObjectDataRegistry::instance().data(m_receiver).lock()) { - auto lock = ObjectData::lock(data); - result = data->m_thread_id; - } - - return result; - } - - bool is_receiver_alive() const { - return ObjectDataRegistry::instance().data(m_receiver).lock() != nullptr; - } - - Receiver *const m_receiver = nullptr; - const ReceiverMemFunc m_receiver_func = nullptr; - const ConnectionType m_type; -}; - -template -std::shared_ptr> make_invoker(Receiver *receiver, void(Receiver::*func)(Args...), ConnectionType type) -{ - return std::make_shared>(receiver, func, type); -} -} - -template -class Signal { -public: - using SignalInvoker = std::shared_ptr>; - - Signal() = default; - Signal(const Signal &other) = delete; - Signal(Signal &&other) noexcept = default; - - Signal &operator=(const Signal &other) = delete; - Signal &operator=(Signal &&other) noexcept = default; - - void emit(Args... args) { - for (const auto &pair : objects()) { - if (pair.second->m_valid) { - pair.second->invoke(std::move(args)...); - } - } - } - - template::value, int>::type = 0> - Connection connect(Receiver *receiver, void(Receiver::*func)(Args...args), ConnectionType type = ConnectionType::Auto) { - std::lock_guard lock(m_mutex); - Connection result = get_next_connection_id(); - m_objects.emplace(result, detail::make_invoker(receiver, func, type)); - return result; - } - - void disconnect(Connection c) { - std::lock_guard lock(m_mutex); - auto it = m_objects.find(c); - if (it != m_objects.end()) { - it->second->m_valid = false; - m_objects.erase(it); - } - } - - template::value, int>::type = 0> - void disconnect(Receiver *receiver, void(Receiver::*func)(Args...args)) { - std::lock_guard lock(m_mutex); - for (auto it = m_objects.begin(); it != m_objects.end(); ++it) { - const SignalInvoker& invoker = it->second; - auto it_func = static_cast(invoker->receiver_func_pointer()); - if ((invoker->receiver_pointer() == receiver) && (*it_func == func)) { - m_objects.erase(it); - return; - } - } - } - -private: - std::map objects() const { - std::lock_guard lock(m_mutex); - return m_objects; - } - - Connection get_next_connection_id() { - return m_next_connection_id++; - } - - mutable std::mutex m_mutex; - std::map m_objects; - int64_t m_next_connection_id = 0; -}; -} diff --git a/project/3rdparty/include/hope/thread.hpp b/project/3rdparty/include/hope/thread.hpp deleted file mode 100644 index 4e0769b67..000000000 --- a/project/3rdparty/include/hope/thread.hpp +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -#include -#include -#include - -namespace hope { -class Object; -class EventLoop; - -class Thread { -public: - Thread(); - ~Thread(); - - std::thread::id id() const; - - void quit(); - void start(); - - void wait(); - void move_to_thread(std::unique_ptr obj); - -private: - void exec(); - - enum class State { - Starting, - Started, - Stopping, - Stopped - }; - - mutable std::mutex m_mutex; - State m_state = State::Stopped; - std::condition_variable m_cond; - std::thread m_thread; - std::unique_ptr m_event_loop = nullptr; - std::vector> m_children; -}; -} diff --git a/project/3rdparty/include/hope/threaddata.hpp b/project/3rdparty/include/hope/threaddata.hpp deleted file mode 100644 index 5d79e6413..000000000 --- a/project/3rdparty/include/hope/threaddata.hpp +++ /dev/null @@ -1,88 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -#include "eventloop.hpp" - -namespace hope { -class EventLoop; - -class ThreadData { -public: - ThreadData() = default; - - ThreadData(std::thread::id id, EventLoop *event_loop) : m_id(id), m_event_loop(event_loop) { - - } - - std::thread::id thread_id() const { - return m_id; - } - - void set_event_loop(EventLoop *event_loop) { - std::lock_guard lock(m_mutex); - m_event_loop = event_loop; - } - - void register_object(Object *object) { - std::lock_guard lock(m_mutex); - if (m_event_loop) { - m_event_loop->register_object(object); - } else { - std::cerr << "No event event loop when registering object " << object << std::endl; - } - } - - void unregister_object(Object *object) { - std::lock_guard lock(m_mutex); - if (m_event_loop) { - m_event_loop->unregister_object(object); - } else { - std::cerr << "No event event loop when unregistering object " << object << std::endl; - } - } - - template - void push_event(T... args) { - std::lock_guard lock(m_mutex); - if (m_event_loop) { - m_event_loop->push_event(std::forward(args)...); - } else { - std::cerr << "No event event loop when pushing event" << std::endl; - } - } - -private: - mutable std::mutex m_mutex; - const std::thread::id m_id; - EventLoop *m_event_loop = nullptr; -}; - -class ThreadDataRegistry { -public: - static ThreadDataRegistry &instance(); - - std::shared_ptr thread_data(const std::thread::id &id) { - std::lock_guard lock(m_mutex); - auto it = m_registry.find(id); - if (it == m_registry.end()) { - it = m_registry.emplace(id, std::make_shared(id, nullptr)).first; - } - - return it->second; - } - - std::shared_ptr current_thread_data() { - return thread_data(std::this_thread::get_id()); - } - -private: - ThreadDataRegistry() = default; - - mutable std::mutex m_mutex; - mutable std::unordered_map> m_registry; -}; -} diff --git a/project/3rdparty/include/hope/timer.hpp b/project/3rdparty/include/hope/timer.hpp deleted file mode 100644 index 8f1592490..000000000 --- a/project/3rdparty/include/hope/timer.hpp +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - -#include - -#include "object.hpp" -#include "signal.hpp" - -namespace hope { -class Timer final : public Object { -public: - Timer(); - ~Timer() override; - - std::chrono::milliseconds duration() const; - - void set_duration(std::chrono::milliseconds duration); - - Signal<> &triggered(); - - void start(); - -protected: - void on_event(Event *event) final; - -private: - std::chrono::milliseconds m_duration; - Signal<> m_triggered; -}; -} diff --git a/project/3rdparty/include/libdrm/drm/drm.h b/project/3rdparty/include/libdrm/drm.h similarity index 99% rename from project/3rdparty/include/libdrm/drm/drm.h rename to project/3rdparty/include/libdrm/drm.h index 3bd1de194..7b8a5d56b 100644 --- a/project/3rdparty/include/libdrm/drm/drm.h +++ b/project/3rdparty/include/libdrm/drm.h @@ -1,5 +1,5 @@ -#ifndef _DRM_H_ -#define _DRM_H_ +#ifndef LIBDRM_DRM_H +#define LIBDRM_DRM_H #include #include diff --git a/project/3rdparty/include/libdrm/drm/amdgpu.h b/project/3rdparty/include/libdrm/drm/amdgpu.h deleted file mode 100644 index 4af85ec07..000000000 --- a/project/3rdparty/include/libdrm/drm/amdgpu.h +++ /dev/null @@ -1,287 +0,0 @@ -#ifndef _AMDGPU_H_ -#define _AMDGPU_H_ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct drm_amdgpu_info_hw_ip; -struct drm_amdgpu_bo_list_entry; - -#define AMDGPU_CS_MAX_IBS_PER_SUBMIT 4 -#define AMDGPU_TIMEOUT_INFINITE 0xffffffffffffffffull -#define AMDGPU_QUERY_FENCE_TIMEOUT_IS_ABSOLUTE (1 << 0) - -enum amdgpu_bo_handle_type { - amdgpu_bo_handle_type_gem_flink_name = 0, - amdgpu_bo_handle_type_kms = 1, - amdgpu_bo_handle_type_dma_buf_fd = 2, - amdgpu_bo_handle_type_kms_noimport = 3, -}; - -enum amdgpu_gpu_va_range { - amdgpu_gpu_va_range_general = 0 -}; - -enum amdgpu_sw_info { - amdgpu_sw_info_address32_hi = 0, -}; - -typedef struct amdgpu_device *amdgpu_device_handle; -typedef struct amdgpu_context *amdgpu_context_handle; -typedef struct amdgpu_bo *amdgpu_bo_handle; -typedef struct amdgpu_bo_list *amdgpu_bo_list_handle; -typedef struct amdgpu_va *amdgpu_va_handle; -typedef struct amdgpu_semaphore *amdgpu_semaphore_handle; - -struct amdgpu_bo_alloc_request { - uint64_t alloc_size; - uint64_t phys_alignment; - uint32_t preferred_heap; - uint64_t flags; -}; - -struct amdgpu_bo_metadata { - uint64_t flags; - uint64_t tiling_info; - uint32_t size_metadata; - uint32_t umd_metadata[64]; -}; - -struct amdgpu_bo_info { - uint64_t alloc_size; - uint64_t phys_alignment; - uint32_t preferred_heap; - uint64_t alloc_flags; - struct amdgpu_bo_metadata metadata; -}; - -struct amdgpu_bo_import_result { - amdgpu_bo_handle buf_handle; - uint64_t alloc_size; -}; - -struct amdgpu_gds_resource_info { - uint32_t gds_gfx_partition_size; - uint32_t compute_partition_size; - uint32_t gds_total_size; - uint32_t gws_per_gfx_partition; - uint32_t gws_per_compute_partition; - uint32_t oa_per_gfx_partition; - uint32_t oa_per_compute_partition; -}; - -struct amdgpu_cs_fence { - amdgpu_context_handle context; - uint32_t ip_type; - uint32_t ip_instance; - uint32_t ring; - uint64_t fence; -}; - -struct amdgpu_cs_ib_info { - uint64_t flags; - uint64_t ib_mc_address; - uint32_t size; -}; - -struct amdgpu_cs_fence_info { - amdgpu_bo_handle handle; - uint64_t offset; -}; - -struct amdgpu_cs_request { - uint64_t flags; - unsigned ip_type; - unsigned ip_instance; - uint32_t ring; - amdgpu_bo_list_handle resources; - uint32_t number_of_dependencies; - struct amdgpu_cs_fence *dependencies; - uint32_t number_of_ibs; - struct amdgpu_cs_ib_info *ibs; - uint64_t seq_no; - struct amdgpu_cs_fence_info fence_info; -}; - -struct amdgpu_buffer_size_alignments { - uint64_t size_local; - uint64_t size_remote; -}; - -struct amdgpu_heap_info { - uint64_t heap_size; - uint64_t heap_usage; - uint64_t max_allocation; -}; - -struct amdgpu_gpu_info { - uint32_t asic_id; - uint32_t chip_rev; - uint32_t chip_external_rev; - uint32_t family_id; - uint64_t ids_flags; - uint64_t max_engine_clk; - uint64_t max_memory_clk; - uint32_t num_shader_engines; - uint32_t num_shader_arrays_per_engine; - uint32_t avail_quad_shader_pipes; - uint32_t max_quad_shader_pipes; - uint32_t cache_entries_per_quad_pipe; - uint32_t num_hw_gfx_contexts; - uint32_t rb_pipes; - uint32_t enabled_rb_pipes_mask; - uint32_t gpu_counter_freq; - uint32_t backend_disable[4]; - uint32_t mc_arb_ramcfg; - uint32_t gb_addr_cfg; - uint32_t gb_tile_mode[32]; - uint32_t gb_macro_tile_mode[16]; - uint32_t pa_sc_raster_cfg[4]; - uint32_t pa_sc_raster_cfg1[4]; - uint32_t cu_active_number; - uint32_t cu_ao_mask; - uint32_t cu_bitmap[4][4]; - uint32_t vram_type; - uint32_t vram_bit_width; - uint32_t ce_ram_size; - uint32_t vce_harvest_config; - uint32_t pci_rev_id; -}; - -int amdgpu_device_initialize(int fd, uint32_t *major_version, uint32_t *minor_version, amdgpu_device_handle *device_handle); -int amdgpu_device_deinitialize(amdgpu_device_handle device_handle); - -int amdgpu_device_get_fd(amdgpu_device_handle device_handle); - -int amdgpu_bo_alloc(amdgpu_device_handle dev, struct amdgpu_bo_alloc_request *alloc_buffer, amdgpu_bo_handle *buf_handle); - -int amdgpu_bo_set_metadata(amdgpu_bo_handle buf_handle, struct amdgpu_bo_metadata *info); - -int amdgpu_bo_query_info(amdgpu_bo_handle buf_handle, struct amdgpu_bo_info *info); - -int amdgpu_bo_export(amdgpu_bo_handle buf_handle, enum amdgpu_bo_handle_type type, uint32_t *shared_handle); -int amdgpu_bo_import(amdgpu_device_handle dev, enum amdgpu_bo_handle_type type, uint32_t shared_handle, struct amdgpu_bo_import_result *output); - -int amdgpu_create_bo_from_user_mem(amdgpu_device_handle dev, void *cpu, uint64_t size, amdgpu_bo_handle *buf_handle); -int amdgpu_find_bo_by_cpu_mapping(amdgpu_device_handle dev, void *cpu, uint64_t size, amdgpu_bo_handle *buf_handle, uint64_t *offset_in_bo); - -int amdgpu_bo_free(amdgpu_bo_handle buf_handle); -void amdgpu_bo_inc_ref(amdgpu_bo_handle bo); - -int amdgpu_bo_cpu_map(amdgpu_bo_handle buf_handle, void **cpu); -int amdgpu_bo_cpu_unmap(amdgpu_bo_handle buf_handle); - -int amdgpu_bo_wait_for_idle(amdgpu_bo_handle buf_handle, uint64_t timeout_ns, bool *buffer_busy); -int amdgpu_bo_list_create_raw(amdgpu_device_handle dev, uint32_t number_of_buffers, struct drm_amdgpu_bo_list_entry *buffers, uint32_t *result); - -int amdgpu_bo_list_destroy_raw(amdgpu_device_handle dev, uint32_t bo_list); -int amdgpu_bo_list_create(amdgpu_device_handle dev, uint32_t number_of_resources, amdgpu_bo_handle *resources, uint8_t *resource_prios, amdgpu_bo_list_handle *result); - -int amdgpu_bo_list_destroy(amdgpu_bo_list_handle handle); -int amdgpu_bo_list_update(amdgpu_bo_list_handle handle, uint32_t number_of_resources, amdgpu_bo_handle *resources, uint8_t *resource_prios); - -int amdgpu_cs_ctx_create2(amdgpu_device_handle dev, uint32_t priority, amdgpu_context_handle *context); -int amdgpu_cs_ctx_create(amdgpu_device_handle dev, amdgpu_context_handle *context); - -int amdgpu_cs_ctx_free(amdgpu_context_handle context); -int amdgpu_cs_ctx_override_priority(amdgpu_device_handle dev, amdgpu_context_handle context, int master_fd, unsigned priority); - -int amdgpu_cs_ctx_stable_pstate(amdgpu_context_handle context, uint32_t op, uint32_t flags, uint32_t *out_flags); - -int amdgpu_cs_query_reset_state(amdgpu_context_handle context, uint32_t *state, uint32_t *hangs); -int amdgpu_cs_query_reset_state2(amdgpu_context_handle context, uint64_t *flags); - -int amdgpu_cs_submit(amdgpu_context_handle context, uint64_t flags, struct amdgpu_cs_request *ibs_request, uint32_t number_of_requests); - -int amdgpu_cs_query_fence_status(struct amdgpu_cs_fence *fence, uint64_t timeout_ns, uint64_t flags, uint32_t *expired); -int amdgpu_cs_wait_fences(struct amdgpu_cs_fence *fences, uint32_t fence_count, bool wait_all, uint64_t timeout_ns, uint32_t *status, uint32_t *first); - -int amdgpu_query_buffer_size_alignment(amdgpu_device_handle dev, struct amdgpu_buffer_size_alignments *info); -int amdgpu_query_firmware_version(amdgpu_device_handle dev, unsigned fw_type, unsigned ip_instance, unsigned index, uint32_t *version, uint32_t *feature); - -int amdgpu_query_hw_ip_count(amdgpu_device_handle dev, unsigned type, uint32_t *count); -int amdgpu_query_hw_ip_info(amdgpu_device_handle dev, unsigned type, unsigned ip_instance, struct drm_amdgpu_info_hw_ip *info); - -int amdgpu_query_heap_info(amdgpu_device_handle dev, uint32_t heap, uint32_t flags, struct amdgpu_heap_info *info); -int amdgpu_query_crtc_from_id(amdgpu_device_handle dev, unsigned id, int32_t *result); - -int amdgpu_query_gpu_info(amdgpu_device_handle dev, struct amdgpu_gpu_info *info); -int amdgpu_query_info(amdgpu_device_handle dev, unsigned info_id, unsigned size, void *value); - -int amdgpu_query_sw_info(amdgpu_device_handle dev, enum amdgpu_sw_info info, void *value); -int amdgpu_query_gds_info(amdgpu_device_handle dev, struct amdgpu_gds_resource_info *gds_info); - -int amdgpu_query_sensor_info(amdgpu_device_handle dev, unsigned sensor_type, unsigned size, void *value); -int amdgpu_query_video_caps_info(amdgpu_device_handle dev, unsigned cap_type, unsigned size, void *value); - -int amdgpu_read_mm_registers(amdgpu_device_handle dev, unsigned dword_offset, unsigned count, uint32_t instance, uint32_t flags, uint32_t *values); - -#define AMDGPU_VA_RANGE_32_BIT 0x1 -#define AMDGPU_VA_RANGE_HIGH 0x2 -#define AMDGPU_VA_RANGE_REPLAYABLE 0x4 - -int amdgpu_va_range_alloc(amdgpu_device_handle dev, enum amdgpu_gpu_va_range va_range_type, uint64_t size, uint64_t va_base_alignment, uint64_t va_base_required, uint64_t *va_base_allocated, amdgpu_va_handle *va_range_handle, uint64_t flags); -int amdgpu_va_range_free(amdgpu_va_handle va_range_handle); - -int amdgpu_va_range_query(amdgpu_device_handle dev, enum amdgpu_gpu_va_range type, uint64_t *start, uint64_t *end); - -int amdgpu_bo_va_op(amdgpu_bo_handle bo, uint64_t offset, uint64_t size, uint64_t addr, uint64_t flags, uint32_t ops); -int amdgpu_bo_va_op_raw(amdgpu_device_handle dev, amdgpu_bo_handle bo, uint64_t offset, uint64_t size, uint64_t addr, uint64_t flags, uint32_t ops); - -int amdgpu_cs_create_semaphore(amdgpu_semaphore_handle *sem); -int amdgpu_cs_signal_semaphore(amdgpu_context_handle ctx, uint32_t ip_type, uint32_t ip_instance, uint32_t ring, amdgpu_semaphore_handle sem); -int amdgpu_cs_wait_semaphore(amdgpu_context_handle ctx, uint32_t ip_type, uint32_t ip_instance, uint32_t ring, amdgpu_semaphore_handle sem); - -int amdgpu_cs_destroy_semaphore(amdgpu_semaphore_handle sem); - -const char *amdgpu_get_marketing_name(amdgpu_device_handle dev); - -int amdgpu_cs_create_syncobj2(amdgpu_device_handle dev, uint32_t flags, uint32_t *syncobj); -int amdgpu_cs_create_syncobj(amdgpu_device_handle dev, uint32_t *syncobj); - -int amdgpu_cs_destroy_syncobj(amdgpu_device_handle dev, uint32_t syncobj); -int amdgpu_cs_syncobj_reset(amdgpu_device_handle dev, const uint32_t *syncobjs, uint32_t syncobj_count); - -int amdgpu_cs_syncobj_signal(amdgpu_device_handle dev, const uint32_t *syncobjs, uint32_t syncobj_count); -int amdgpu_cs_syncobj_timeline_signal(amdgpu_device_handle dev, const uint32_t *syncobjs, uint64_t *points, uint32_t syncobj_count); - -int amdgpu_cs_syncobj_wait(amdgpu_device_handle dev, uint32_t *handles, unsigned num_handles, int64_t timeout_nsec, unsigned flags, uint32_t *first_signaled); -int amdgpu_cs_syncobj_timeline_wait(amdgpu_device_handle dev, uint32_t *handles, uint64_t *points, unsigned num_handles, int64_t timeout_nsec, unsigned flags, uint32_t *first_signaled); - -int amdgpu_cs_syncobj_query(amdgpu_device_handle dev, uint32_t *handles, uint64_t *points, unsigned num_handles); -int amdgpu_cs_syncobj_query2(amdgpu_device_handle dev, uint32_t *handles, uint64_t *points, unsigned num_handles, uint32_t flags); - -int amdgpu_cs_export_syncobj(amdgpu_device_handle dev, uint32_t syncobj, int *shared_fd); -int amdgpu_cs_import_syncobj(amdgpu_device_handle dev, int shared_fd, uint32_t *syncobj); - -int amdgpu_cs_syncobj_export_sync_file(amdgpu_device_handle dev, uint32_t syncobj, int *sync_file_fd); -int amdgpu_cs_syncobj_import_sync_file(amdgpu_device_handle dev, uint32_t syncobj, int sync_file_fd); - -int amdgpu_cs_syncobj_export_sync_file2(amdgpu_device_handle dev, uint32_t syncobj, uint64_t point, uint32_t flags, int *sync_file_fd); -int amdgpu_cs_syncobj_import_sync_file2(amdgpu_device_handle dev, uint32_t syncobj, uint64_t point, int sync_file_fd); - -int amdgpu_cs_syncobj_transfer(amdgpu_device_handle dev, uint32_t dst_handle, uint64_t dst_point, uint32_t src_handle, uint64_t src_point, uint32_t flags); -int amdgpu_cs_fence_to_handle(amdgpu_device_handle dev, struct amdgpu_cs_fence *fence, uint32_t what, uint32_t *out_handle); - -struct drm_amdgpu_cs_chunk; -struct drm_amdgpu_cs_chunk_dep; -struct drm_amdgpu_cs_chunk_data; - -int amdgpu_cs_submit_raw(amdgpu_device_handle dev, amdgpu_context_handle context, amdgpu_bo_list_handle bo_list_handle, int num_chunks, struct drm_amdgpu_cs_chunk *chunks, uint64_t *seq_no); -int amdgpu_cs_submit_raw2(amdgpu_device_handle dev, amdgpu_context_handle context, uint32_t bo_list_handle, int num_chunks, struct drm_amdgpu_cs_chunk *chunks, uint64_t *seq_no); - -void amdgpu_cs_chunk_fence_to_dep(struct amdgpu_cs_fence *fence, struct drm_amdgpu_cs_chunk_dep *dep); -void amdgpu_cs_chunk_fence_info_to_data(struct amdgpu_cs_fence_info *fence_info, struct drm_amdgpu_cs_chunk_data *data); - -int amdgpu_vm_reserve_vmid(amdgpu_device_handle dev, uint32_t flags); -int amdgpu_vm_unreserve_vmid(amdgpu_device_handle dev, uint32_t flags); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/project/3rdparty/include/libdrm/drm/amdgpu_drm.h b/project/3rdparty/include/libdrm/drm/amdgpu_drm.h deleted file mode 100644 index f18bd88a6..000000000 --- a/project/3rdparty/include/libdrm/drm/amdgpu_drm.h +++ /dev/null @@ -1,796 +0,0 @@ -#ifndef __AMDGPU_DRM_H__ -#define __AMDGPU_DRM_H__ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -#define DRM_AMDGPU_GEM_CREATE 0x00 -#define DRM_AMDGPU_GEM_MMAP 0x01 -#define DRM_AMDGPU_CTX 0x02 -#define DRM_AMDGPU_BO_LIST 0x03 -#define DRM_AMDGPU_CS 0x04 -#define DRM_AMDGPU_INFO 0x05 -#define DRM_AMDGPU_GEM_METADATA 0x06 -#define DRM_AMDGPU_GEM_WAIT_IDLE 0x07 -#define DRM_AMDGPU_GEM_VA 0x08 -#define DRM_AMDGPU_WAIT_CS 0x09 -#define DRM_AMDGPU_GEM_OP 0x10 -#define DRM_AMDGPU_GEM_USERPTR 0x11 -#define DRM_AMDGPU_WAIT_FENCES 0x12 -#define DRM_AMDGPU_VM 0x13 -#define DRM_AMDGPU_FENCE_TO_HANDLE 0x14 -#define DRM_AMDGPU_SCHED 0x15 - -#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create) -#define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap) -#define DRM_IOCTL_AMDGPU_CTX DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CTX, union drm_amdgpu_ctx) -#define DRM_IOCTL_AMDGPU_BO_LIST DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_BO_LIST, union drm_amdgpu_bo_list) -#define DRM_IOCTL_AMDGPU_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CS, union drm_amdgpu_cs) -#define DRM_IOCTL_AMDGPU_INFO DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_INFO, struct drm_amdgpu_info) -#define DRM_IOCTL_AMDGPU_GEM_METADATA DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_METADATA, struct drm_amdgpu_gem_metadata) -#define DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_WAIT_IDLE, union drm_amdgpu_gem_wait_idle) -#define DRM_IOCTL_AMDGPU_GEM_VA DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_VA, struct drm_amdgpu_gem_va) -#define DRM_IOCTL_AMDGPU_WAIT_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_CS, union drm_amdgpu_wait_cs) -#define DRM_IOCTL_AMDGPU_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op) -#define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr) -#define DRM_IOCTL_AMDGPU_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences) -#define DRM_IOCTL_AMDGPU_VM DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_VM, union drm_amdgpu_vm) -#define DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_FENCE_TO_HANDLE, union drm_amdgpu_fence_to_handle) -#define DRM_IOCTL_AMDGPU_SCHED DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_SCHED, union drm_amdgpu_sched) - -#define AMDGPU_GEM_DOMAIN_CPU 0x1 -#define AMDGPU_GEM_DOMAIN_GTT 0x2 -#define AMDGPU_GEM_DOMAIN_VRAM 0x4 -#define AMDGPU_GEM_DOMAIN_GDS 0x8 -#define AMDGPU_GEM_DOMAIN_GWS 0x10 -#define AMDGPU_GEM_DOMAIN_OA 0x20 -#define AMDGPU_GEM_DOMAIN_MASK (AMDGPU_GEM_DOMAIN_CPU | AMDGPU_GEM_DOMAIN_GTT | AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GDS | AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA) - -#define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0) -#define AMDGPU_GEM_CREATE_NO_CPU_ACCESS (1 << 1) -#define AMDGPU_GEM_CREATE_CPU_GTT_USWC (1 << 2) -#define AMDGPU_GEM_CREATE_VRAM_CLEARED (1 << 3) -#define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS (1 << 5) -#define AMDGPU_GEM_CREATE_VM_ALWAYS_VALID (1 << 6) -#define AMDGPU_GEM_CREATE_EXPLICIT_SYNC (1 << 7) -#define AMDGPU_GEM_CREATE_CP_MQD_GFX9 (1 << 8) -#define AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE (1 << 9) -#define AMDGPU_GEM_CREATE_ENCRYPTED (1 << 10) -#define AMDGPU_GEM_CREATE_PREEMPTIBLE (1 << 11) - -struct drm_amdgpu_gem_create_in { - __u64 bo_size; - __u64 alignment; - __u64 domains; - __u64 domain_flags; -}; - -struct drm_amdgpu_gem_create_out { - __u32 handle; - __u32 _pad; -}; - -union drm_amdgpu_gem_create { - struct drm_amdgpu_gem_create_in in; - struct drm_amdgpu_gem_create_out out; -}; - -#define AMDGPU_BO_LIST_OP_CREATE 0 -#define AMDGPU_BO_LIST_OP_DESTROY 1 -#define AMDGPU_BO_LIST_OP_UPDATE 2 - -struct drm_amdgpu_bo_list_in { - __u32 operation; - __u32 list_handle; - __u32 bo_number; - __u32 bo_info_size; - __u64 bo_info_ptr; -}; - -struct drm_amdgpu_bo_list_entry { - __u32 bo_handle; - __u32 bo_priority; -}; - -struct drm_amdgpu_bo_list_out { - __u32 list_handle; - __u32 _pad; -}; - -union drm_amdgpu_bo_list { - struct drm_amdgpu_bo_list_in in; - struct drm_amdgpu_bo_list_out out; -}; - -#define AMDGPU_CTX_OP_ALLOC_CTX 1 -#define AMDGPU_CTX_OP_FREE_CTX 2 -#define AMDGPU_CTX_OP_QUERY_STATE 3 -#define AMDGPU_CTX_OP_QUERY_STATE2 4 -#define AMDGPU_CTX_OP_GET_STABLE_PSTATE 5 -#define AMDGPU_CTX_OP_SET_STABLE_PSTATE 6 - -#define AMDGPU_CTX_NO_RESET 0 -#define AMDGPU_CTX_GUILTY_RESET 1 -#define AMDGPU_CTX_INNOCENT_RESET 2 -#define AMDGPU_CTX_UNKNOWN_RESET 3 - -#define AMDGPU_CTX_QUERY2_FLAGS_RESET (1<<0) -#define AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST (1<<1) -#define AMDGPU_CTX_QUERY2_FLAGS_GUILTY (1<<2) -#define AMDGPU_CTX_QUERY2_FLAGS_RAS_CE (1<<3) -#define AMDGPU_CTX_QUERY2_FLAGS_RAS_UE (1<<4) - -#define AMDGPU_CTX_PRIORITY_UNSET -2048 -#define AMDGPU_CTX_PRIORITY_VERY_LOW -1023 -#define AMDGPU_CTX_PRIORITY_LOW -512 -#define AMDGPU_CTX_PRIORITY_NORMAL 0 - -#define AMDGPU_CTX_PRIORITY_HIGH 512 -#define AMDGPU_CTX_PRIORITY_VERY_HIGH 1023 - -#define AMDGPU_CTX_STABLE_PSTATE_FLAGS_MASK 0xf -#define AMDGPU_CTX_STABLE_PSTATE_NONE 0 -#define AMDGPU_CTX_STABLE_PSTATE_STANDARD 1 -#define AMDGPU_CTX_STABLE_PSTATE_MIN_SCLK 2 -#define AMDGPU_CTX_STABLE_PSTATE_MIN_MCLK 3 -#define AMDGPU_CTX_STABLE_PSTATE_PEAK 4 - -struct drm_amdgpu_ctx_in { - __u32 op; - __u32 flags; - __u32 ctx_id; - __s32 priority; -}; - -union drm_amdgpu_ctx_out { - struct { - __u32 ctx_id; - __u32 _pad; - } alloc; - - struct { - __u64 flags; - __u32 hangs; - __u32 reset_status; - } state; - - struct { - __u32 flags; - __u32 _pad; - } pstate; -}; - -union drm_amdgpu_ctx { - struct drm_amdgpu_ctx_in in; - union drm_amdgpu_ctx_out out; -}; - -#define AMDGPU_VM_OP_RESERVE_VMID 1 -#define AMDGPU_VM_OP_UNRESERVE_VMID 2 - -struct drm_amdgpu_vm_in { - __u32 op; - __u32 flags; -}; - -struct drm_amdgpu_vm_out { - __u64 flags; -}; - -union drm_amdgpu_vm { - struct drm_amdgpu_vm_in in; - struct drm_amdgpu_vm_out out; -}; - -#define AMDGPU_SCHED_OP_PROCESS_PRIORITY_OVERRIDE 1 -#define AMDGPU_SCHED_OP_CONTEXT_PRIORITY_OVERRIDE 2 - -struct drm_amdgpu_sched_in { - __u32 op; - __u32 fd; - __s32 priority; - __u32 ctx_id; -}; - -union drm_amdgpu_sched { - struct drm_amdgpu_sched_in in; -}; - -#define AMDGPU_GEM_USERPTR_READONLY (1 << 0) -#define AMDGPU_GEM_USERPTR_ANONONLY (1 << 1) -#define AMDGPU_GEM_USERPTR_VALIDATE (1 << 2) -#define AMDGPU_GEM_USERPTR_REGISTER (1 << 3) - -struct drm_amdgpu_gem_userptr { - __u64 addr; - __u64 size; - __u32 flags; - __u32 handle; -}; - -#define AMDGPU_TILING_ARRAY_MODE_SHIFT 0 -#define AMDGPU_TILING_ARRAY_MODE_MASK 0xf -#define AMDGPU_TILING_PIPE_CONFIG_SHIFT 4 -#define AMDGPU_TILING_PIPE_CONFIG_MASK 0x1f -#define AMDGPU_TILING_TILE_SPLIT_SHIFT 9 -#define AMDGPU_TILING_TILE_SPLIT_MASK 0x7 -#define AMDGPU_TILING_MICRO_TILE_MODE_SHIFT 12 -#define AMDGPU_TILING_MICRO_TILE_MODE_MASK 0x7 -#define AMDGPU_TILING_BANK_WIDTH_SHIFT 15 -#define AMDGPU_TILING_BANK_WIDTH_MASK 0x3 -#define AMDGPU_TILING_BANK_HEIGHT_SHIFT 17 -#define AMDGPU_TILING_BANK_HEIGHT_MASK 0x3 -#define AMDGPU_TILING_MACRO_TILE_ASPECT_SHIFT 19 -#define AMDGPU_TILING_MACRO_TILE_ASPECT_MASK 0x3 -#define AMDGPU_TILING_NUM_BANKS_SHIFT 21 -#define AMDGPU_TILING_NUM_BANKS_MASK 0x3 - -#define AMDGPU_TILING_SWIZZLE_MODE_SHIFT 0 -#define AMDGPU_TILING_SWIZZLE_MODE_MASK 0x1f -#define AMDGPU_TILING_DCC_OFFSET_256B_SHIFT 5 -#define AMDGPU_TILING_DCC_OFFSET_256B_MASK 0xFFFFFF -#define AMDGPU_TILING_DCC_PITCH_MAX_SHIFT 29 -#define AMDGPU_TILING_DCC_PITCH_MAX_MASK 0x3FFF -#define AMDGPU_TILING_DCC_INDEPENDENT_64B_SHIFT 43 -#define AMDGPU_TILING_DCC_INDEPENDENT_64B_MASK 0x1 -#define AMDGPU_TILING_DCC_INDEPENDENT_128B_SHIFT 44 -#define AMDGPU_TILING_DCC_INDEPENDENT_128B_MASK 0x1 -#define AMDGPU_TILING_SCANOUT_SHIFT 63 -#define AMDGPU_TILING_SCANOUT_MASK 0x1 - -#define AMDGPU_TILING_SET(field, value) (((__u64)(value) & AMDGPU_TILING_##field##_MASK) << AMDGPU_TILING_##field##_SHIFT) -#define AMDGPU_TILING_GET(value, field) (((__u64)(value) >> AMDGPU_TILING_##field##_SHIFT) & AMDGPU_TILING_##field##_MASK) - -#define AMDGPU_GEM_METADATA_OP_SET_METADATA 1 -#define AMDGPU_GEM_METADATA_OP_GET_METADATA 2 - -struct drm_amdgpu_gem_metadata { - __u32 handle; - __u32 op; - struct { - __u64 flags; - __u64 tiling_info; - __u32 data_size_bytes; - __u32 data[64]; - } data; -}; - -struct drm_amdgpu_gem_mmap_in { - __u32 handle; - __u32 _pad; -}; - -struct drm_amdgpu_gem_mmap_out { - __u64 addr_ptr; -}; - -union drm_amdgpu_gem_mmap { - struct drm_amdgpu_gem_mmap_in in; - struct drm_amdgpu_gem_mmap_out out; -}; - -struct drm_amdgpu_gem_wait_idle_in { - __u32 handle; - __u32 flags; - __u64 timeout; -}; - -struct drm_amdgpu_gem_wait_idle_out { - __u32 status; - __u32 domain; -}; - -union drm_amdgpu_gem_wait_idle { - struct drm_amdgpu_gem_wait_idle_in in; - struct drm_amdgpu_gem_wait_idle_out out; -}; - -struct drm_amdgpu_wait_cs_in { - __u64 handle; - __u64 timeout; - __u32 ip_type; - __u32 ip_instance; - __u32 ring; - __u32 ctx_id; -}; - -struct drm_amdgpu_wait_cs_out { - __u64 status; -}; - -union drm_amdgpu_wait_cs { - struct drm_amdgpu_wait_cs_in in; - struct drm_amdgpu_wait_cs_out out; -}; - -struct drm_amdgpu_fence { - __u32 ctx_id; - __u32 ip_type; - __u32 ip_instance; - __u32 ring; - __u64 seq_no; -}; - -struct drm_amdgpu_wait_fences_in { - __u64 fences; - __u32 fence_count; - __u32 wait_all; - __u64 timeout_ns; -}; - -struct drm_amdgpu_wait_fences_out { - __u32 status; - __u32 first_signaled; -}; - -union drm_amdgpu_wait_fences { - struct drm_amdgpu_wait_fences_in in; - struct drm_amdgpu_wait_fences_out out; -}; - -#define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0 -#define AMDGPU_GEM_OP_SET_PLACEMENT 1 - -struct drm_amdgpu_gem_op { - __u32 handle; - __u32 op; - __u64 value; -}; - -#define AMDGPU_VA_OP_MAP 1 -#define AMDGPU_VA_OP_UNMAP 2 -#define AMDGPU_VA_OP_CLEAR 3 -#define AMDGPU_VA_OP_REPLACE 4 - -#define AMDGPU_VM_DELAY_UPDATE (1 << 0) - -#define AMDGPU_VM_PAGE_READABLE (1 << 1) -#define AMDGPU_VM_PAGE_WRITEABLE (1 << 2) -#define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3) -#define AMDGPU_VM_PAGE_PRT (1 << 4) -#define AMDGPU_VM_MTYPE_MASK (0xf << 5) -#define AMDGPU_VM_MTYPE_DEFAULT (0 << 5) -#define AMDGPU_VM_MTYPE_NC (1 << 5) -#define AMDGPU_VM_MTYPE_WC (2 << 5) -#define AMDGPU_VM_MTYPE_CC (3 << 5) -#define AMDGPU_VM_MTYPE_UC (4 << 5) -#define AMDGPU_VM_MTYPE_RW (5 << 5) - -struct drm_amdgpu_gem_va { - __u32 handle; - __u32 _pad; - __u32 operation; - __u32 flags; - __u64 va_address; - __u64 offset_in_bo; - __u64 map_size; -}; - -#define AMDGPU_HW_IP_GFX 0 -#define AMDGPU_HW_IP_COMPUTE 1 -#define AMDGPU_HW_IP_DMA 2 -#define AMDGPU_HW_IP_UVD 3 -#define AMDGPU_HW_IP_VCE 4 -#define AMDGPU_HW_IP_UVD_ENC 5 -#define AMDGPU_HW_IP_VCN_DEC 6 -#define AMDGPU_HW_IP_VCN_ENC 7 -#define AMDGPU_HW_IP_VCN_JPEG 8 -#define AMDGPU_HW_IP_NUM 9 - -#define AMDGPU_HW_IP_INSTANCE_MAX_COUNT 1 - -#define AMDGPU_CHUNK_ID_IB 0x01 -#define AMDGPU_CHUNK_ID_FENCE 0x02 -#define AMDGPU_CHUNK_ID_DEPENDENCIES 0x03 -#define AMDGPU_CHUNK_ID_SYNCOBJ_IN 0x04 -#define AMDGPU_CHUNK_ID_SYNCOBJ_OUT 0x05 -#define AMDGPU_CHUNK_ID_BO_HANDLES 0x06 -#define AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES 0x07 -#define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_WAIT 0x08 -#define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_SIGNAL 0x09 - -struct drm_amdgpu_cs_chunk { - __u32 chunk_id; - __u32 length_dw; - __u64 chunk_data; -}; - -struct drm_amdgpu_cs_in { - __u32 ctx_id; - __u32 bo_list_handle; - __u32 num_chunks; - __u32 flags; - __u64 chunks; -}; - -struct drm_amdgpu_cs_out { - __u64 handle; -}; - -union drm_amdgpu_cs { - struct drm_amdgpu_cs_in in; - struct drm_amdgpu_cs_out out; -}; - -#define AMDGPU_IB_FLAG_CE (1<<0) -#define AMDGPU_IB_FLAG_PREAMBLE (1<<1) -#define AMDGPU_IB_FLAG_PREEMPT (1<<2) -#define AMDGPU_IB_FLAG_TC_WB_NOT_INVALIDATE (1 << 3) -#define AMDGPU_IB_FLAG_RESET_GDS_MAX_WAVE_ID (1 << 4) -#define AMDGPU_IB_FLAGS_SECURE (1 << 5) -#define AMDGPU_IB_FLAG_EMIT_MEM_SYNC (1 << 6) - -struct drm_amdgpu_cs_chunk_ib { - __u32 _pad; - __u32 flags; - __u64 va_start; - __u32 ib_bytes; - __u32 ip_type; - __u32 ip_instance; - __u32 ring; -}; - -struct drm_amdgpu_cs_chunk_dep { - __u32 ip_type; - __u32 ip_instance; - __u32 ring; - __u32 ctx_id; - __u64 handle; -}; - -struct drm_amdgpu_cs_chunk_fence { - __u32 handle; - __u32 offset; -}; - -struct drm_amdgpu_cs_chunk_sem { - __u32 handle; -}; - -struct drm_amdgpu_cs_chunk_syncobj { - __u32 handle; - __u32 flags; - __u64 point; -}; - -#define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ 0 -#define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ_FD 1 -#define AMDGPU_FENCE_TO_HANDLE_GET_SYNC_FILE_FD 2 - -union drm_amdgpu_fence_to_handle { - struct { - struct drm_amdgpu_fence fence; - __u32 what; - __u32 pad; - } in; - struct { - __u32 handle; - } out; -}; - -struct drm_amdgpu_cs_chunk_data { - union { - struct drm_amdgpu_cs_chunk_ib ib_data; - struct drm_amdgpu_cs_chunk_fence fence_data; - }; -}; - -#define AMDGPU_IDS_FLAGS_FUSION 0x1 -#define AMDGPU_IDS_FLAGS_PREEMPTION 0x2 -#define AMDGPU_IDS_FLAGS_TMZ 0x4 - -#define AMDGPU_INFO_ACCEL_WORKING 0x00 -#define AMDGPU_INFO_CRTC_FROM_ID 0x01 -#define AMDGPU_INFO_HW_IP_INFO 0x02 -#define AMDGPU_INFO_HW_IP_COUNT 0x03 -#define AMDGPU_INFO_TIMESTAMP 0x05 -#define AMDGPU_INFO_FW_VERSION 0x0e - -#define AMDGPU_INFO_FW_VCE 0x1 -#define AMDGPU_INFO_FW_UVD 0x2 -#define AMDGPU_INFO_FW_GMC 0x03 -#define AMDGPU_INFO_FW_GFX_ME 0x04 -#define AMDGPU_INFO_FW_GFX_PFP 0x05 -#define AMDGPU_INFO_FW_GFX_CE 0x06 -#define AMDGPU_INFO_FW_GFX_RLC 0x07 -#define AMDGPU_INFO_FW_GFX_MEC 0x08 -#define AMDGPU_INFO_FW_SMC 0x0a -#define AMDGPU_INFO_FW_SDMA 0x0b -#define AMDGPU_INFO_FW_SOS 0x0c -#define AMDGPU_INFO_FW_ASD 0x0d -#define AMDGPU_INFO_FW_VCN 0x0e -#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_CNTL 0x0f -#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_GPM_MEM 0x10 -#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_SRM_MEM 0x11 -#define AMDGPU_INFO_FW_DMCU 0x12 -#define AMDGPU_INFO_FW_TA 0x13 -#define AMDGPU_INFO_FW_DMCUB 0x14 -#define AMDGPU_INFO_FW_TOC 0x15 - -#define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f -#define AMDGPU_INFO_VRAM_USAGE 0x10 -#define AMDGPU_INFO_GTT_USAGE 0x11 -#define AMDGPU_INFO_GDS_CONFIG 0x13 -#define AMDGPU_INFO_VRAM_GTT 0x14 -#define AMDGPU_INFO_READ_MMR_REG 0x15 -#define AMDGPU_INFO_DEV_INFO 0x16 -#define AMDGPU_INFO_VIS_VRAM_USAGE 0x17 -#define AMDGPU_INFO_NUM_EVICTIONS 0x18 -#define AMDGPU_INFO_MEMORY 0x19 -#define AMDGPU_INFO_VCE_CLOCK_TABLE 0x1A -#define AMDGPU_INFO_VBIOS 0x1B - -#define AMDGPU_INFO_VBIOS_SIZE 0x1 -#define AMDGPU_INFO_VBIOS_IMAGE 0x2 -#define AMDGPU_INFO_VBIOS_INFO 0x3 - -#define AMDGPU_INFO_NUM_HANDLES 0x1C -#define AMDGPU_INFO_SENSOR 0x1D - -#define AMDGPU_INFO_SENSOR_GFX_SCLK 0x1 -#define AMDGPU_INFO_SENSOR_GFX_MCLK 0x2 -#define AMDGPU_INFO_SENSOR_GPU_TEMP 0x3 -#define AMDGPU_INFO_SENSOR_GPU_LOAD 0x4 -#define AMDGPU_INFO_SENSOR_GPU_AVG_POWER 0x5 -#define AMDGPU_INFO_SENSOR_VDDNB 0x6 -#define AMDGPU_INFO_SENSOR_VDDGFX 0x7 -#define AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_SCLK 0x8 -#define AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_MCLK 0x9 - -#define AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS 0x1E -#define AMDGPU_INFO_VRAM_LOST_COUNTER 0x1F -#define AMDGPU_INFO_RAS_ENABLED_FEATURES 0x20 - -#define AMDGPU_INFO_RAS_ENABLED_UMC (1 << 0) -#define AMDGPU_INFO_RAS_ENABLED_SDMA (1 << 1) -#define AMDGPU_INFO_RAS_ENABLED_GFX (1 << 2) -#define AMDGPU_INFO_RAS_ENABLED_MMHUB (1 << 3) -#define AMDGPU_INFO_RAS_ENABLED_ATHUB (1 << 4) -#define AMDGPU_INFO_RAS_ENABLED_PCIE (1 << 5) -#define AMDGPU_INFO_RAS_ENABLED_HDP (1 << 6) -#define AMDGPU_INFO_RAS_ENABLED_XGMI (1 << 7) -#define AMDGPU_INFO_RAS_ENABLED_DF (1 << 8) -#define AMDGPU_INFO_RAS_ENABLED_SMN (1 << 9) -#define AMDGPU_INFO_RAS_ENABLED_SEM (1 << 10) -#define AMDGPU_INFO_RAS_ENABLED_MP0 (1 << 11) -#define AMDGPU_INFO_RAS_ENABLED_MP1 (1 << 12) -#define AMDGPU_INFO_RAS_ENABLED_FUSE (1 << 13) - -#define AMDGPU_INFO_VIDEO_CAPS 0x21 - -#define AMDGPU_INFO_VIDEO_CAPS_DECODE 0 -#define AMDGPU_INFO_VIDEO_CAPS_ENCODE 1 - -#define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0 -#define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff -#define AMDGPU_INFO_MMR_SH_INDEX_SHIFT 8 -#define AMDGPU_INFO_MMR_SH_INDEX_MASK 0xff - -struct drm_amdgpu_query_fw { - __u32 fw_type; - __u32 ip_instance; - __u32 index; - __u32 _pad; -}; - -struct drm_amdgpu_info { - __u64 return_pointer; - __u32 return_size; - __u32 query; - - union { - struct { - __u32 id; - __u32 _pad; - } mode_crtc; - - struct { - __u32 type; - __u32 ip_instance; - } query_hw_ip; - - struct { - __u32 dword_offset; - __u32 count; - __u32 instance; - __u32 flags; - } read_mmr_reg; - - struct drm_amdgpu_query_fw query_fw; - - struct { - __u32 type; - __u32 offset; - } vbios_info; - - struct { - __u32 type; - } sensor_info; - - struct { - __u32 type; - } video_cap; - }; -}; - -struct drm_amdgpu_info_gds { - __u32 gds_gfx_partition_size; - __u32 compute_partition_size; - __u32 gds_total_size; - __u32 gws_per_gfx_partition; - __u32 gws_per_compute_partition; - __u32 oa_per_gfx_partition; - __u32 oa_per_compute_partition; - __u32 _pad; -}; - -struct drm_amdgpu_info_vram_gtt { - __u64 vram_size; - __u64 vram_cpu_accessible_size; - __u64 gtt_size; -}; - -struct drm_amdgpu_heap_info { - __u64 total_heap_size; - __u64 usable_heap_size; - __u64 heap_usage; - __u64 max_allocation; -}; - -struct drm_amdgpu_memory_info { - struct drm_amdgpu_heap_info vram; - struct drm_amdgpu_heap_info cpu_accessible_vram; - struct drm_amdgpu_heap_info gtt; -}; - -struct drm_amdgpu_info_firmware { - __u32 ver; - __u32 feature; -}; - -struct drm_amdgpu_info_vbios { - __u8 name[64]; - __u8 vbios_pn[64]; - __u32 version; - __u32 pad; - __u8 vbios_ver_str[32]; - __u8 date[32]; -}; - -#define AMDGPU_VRAM_TYPE_UNKNOWN 0 -#define AMDGPU_VRAM_TYPE_GDDR1 1 -#define AMDGPU_VRAM_TYPE_DDR2 2 -#define AMDGPU_VRAM_TYPE_GDDR3 3 -#define AMDGPU_VRAM_TYPE_GDDR4 4 -#define AMDGPU_VRAM_TYPE_GDDR5 5 -#define AMDGPU_VRAM_TYPE_HBM 6 -#define AMDGPU_VRAM_TYPE_DDR3 7 -#define AMDGPU_VRAM_TYPE_DDR4 8 -#define AMDGPU_VRAM_TYPE_GDDR6 9 -#define AMDGPU_VRAM_TYPE_DDR5 10 - -struct drm_amdgpu_info_device { - __u32 device_id; - __u32 chip_rev; - __u32 external_rev; - __u32 pci_rev; - __u32 family; - __u32 num_shader_engines; - __u32 num_shader_arrays_per_engine; - __u32 gpu_counter_freq; - __u64 max_engine_clock; - __u64 max_memory_clock; - __u32 cu_active_number; - __u32 cu_ao_mask; - __u32 cu_bitmap[4][4]; - __u32 enabled_rb_pipes_mask; - __u32 num_rb_pipes; - __u32 num_hw_gfx_contexts; - __u32 _pad; - __u64 ids_flags; - __u64 virtual_address_offset; - __u64 virtual_address_max; - __u32 virtual_address_alignment; - __u32 pte_fragment_size; - __u32 gart_page_size; - __u32 ce_ram_size; - __u32 vram_type; - __u32 vram_bit_width; - __u32 vce_harvest_config; - __u32 gc_double_offchip_lds_buf; - __u64 prim_buf_gpu_addr; - __u64 pos_buf_gpu_addr; - __u64 cntl_sb_buf_gpu_addr; - __u64 param_buf_gpu_addr; - __u32 prim_buf_size; - __u32 pos_buf_size; - __u32 cntl_sb_buf_size; - __u32 param_buf_size; - __u32 wave_front_size; - __u32 num_shader_visible_vgprs; - __u32 num_cu_per_sh; - __u32 num_tcc_blocks; - __u32 gs_vgt_table_depth; - __u32 gs_prim_buffer_depth; - __u32 max_gs_waves_per_vgt; - __u32 _pad1; - __u32 cu_ao_bitmap[4][4]; - __u64 high_va_offset; - __u64 high_va_max; - __u32 pa_sc_tile_steering_override; - __u64 tcc_disabled_mask; -}; - -struct drm_amdgpu_info_hw_ip { - __u32 hw_ip_version_major; - __u32 hw_ip_version_minor; - __u64 capabilities_flags; - __u32 ib_start_alignment; - __u32 ib_size_alignment; - __u32 available_rings; - __u32 _pad; -}; - -struct drm_amdgpu_info_num_handles { - __u32 uvd_max_handles; - __u32 uvd_used_handles; -}; - -#define AMDGPU_VCE_CLOCK_TABLE_ENTRIES 6 - -struct drm_amdgpu_info_vce_clock_table_entry { - __u32 sclk; - __u32 mclk; - __u32 eclk; - __u32 pad; -}; - -struct drm_amdgpu_info_vce_clock_table { - struct drm_amdgpu_info_vce_clock_table_entry entries[AMDGPU_VCE_CLOCK_TABLE_ENTRIES]; - __u32 num_valid_entries; - __u32 pad; -}; - -#define AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2 0 -#define AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4 1 -#define AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1 2 -#define AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC 3 -#define AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC 4 -#define AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG 5 -#define AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VP9 6 -#define AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_AV1 7 -#define AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_COUNT 8 - -struct drm_amdgpu_info_video_codec_info { - __u32 valid; - __u32 max_width; - __u32 max_height; - __u32 max_pixels_per_frame; - __u32 max_level; - __u32 pad; -}; - -struct drm_amdgpu_info_video_caps { - struct drm_amdgpu_info_video_codec_info codec_info[AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_COUNT]; -}; - -#define AMDGPU_FAMILY_UNKNOWN 0 -#define AMDGPU_FAMILY_SI 110 -#define AMDGPU_FAMILY_CI 120 -#define AMDGPU_FAMILY_KV 125 -#define AMDGPU_FAMILY_VI 130 -#define AMDGPU_FAMILY_CZ 135 -#define AMDGPU_FAMILY_AI 141 -#define AMDGPU_FAMILY_RV 142 -#define AMDGPU_FAMILY_NV 143 -#define AMDGPU_FAMILY_VGH 144 -#define AMDGPU_FAMILY_YC 146 - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/project/3rdparty/include/libdrm/drm/etnaviv_drm.h b/project/3rdparty/include/libdrm/drm/etnaviv_drm.h deleted file mode 100644 index 2a94b4e3f..000000000 --- a/project/3rdparty/include/libdrm/drm/etnaviv_drm.h +++ /dev/null @@ -1,215 +0,0 @@ -#ifndef __ETNAVIV_DRM_H__ -#define __ETNAVIV_DRM_H__ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -struct drm_etnaviv_timespec { - __s64 tv_sec; - __s64 tv_nsec; -}; - -#define ETNAVIV_PARAM_GPU_MODEL 0x01 -#define ETNAVIV_PARAM_GPU_REVISION 0x02 -#define ETNAVIV_PARAM_GPU_FEATURES_0 0x03 -#define ETNAVIV_PARAM_GPU_FEATURES_1 0x04 -#define ETNAVIV_PARAM_GPU_FEATURES_2 0x05 -#define ETNAVIV_PARAM_GPU_FEATURES_3 0x06 -#define ETNAVIV_PARAM_GPU_FEATURES_4 0x07 -#define ETNAVIV_PARAM_GPU_FEATURES_5 0x08 -#define ETNAVIV_PARAM_GPU_FEATURES_6 0x09 -#define ETNAVIV_PARAM_GPU_FEATURES_7 0x0a -#define ETNAVIV_PARAM_GPU_FEATURES_8 0x0b -#define ETNAVIV_PARAM_GPU_FEATURES_9 0x0c -#define ETNAVIV_PARAM_GPU_FEATURES_10 0x0d -#define ETNAVIV_PARAM_GPU_FEATURES_11 0x0e -#define ETNAVIV_PARAM_GPU_FEATURES_12 0x0f - -#define ETNAVIV_PARAM_GPU_STREAM_COUNT 0x10 -#define ETNAVIV_PARAM_GPU_REGISTER_MAX 0x11 -#define ETNAVIV_PARAM_GPU_THREAD_COUNT 0x12 -#define ETNAVIV_PARAM_GPU_VERTEX_CACHE_SIZE 0x13 -#define ETNAVIV_PARAM_GPU_SHADER_CORE_COUNT 0x14 -#define ETNAVIV_PARAM_GPU_PIXEL_PIPES 0x15 -#define ETNAVIV_PARAM_GPU_VERTEX_OUTPUT_BUFFER_SIZE 0x16 -#define ETNAVIV_PARAM_GPU_BUFFER_SIZE 0x17 -#define ETNAVIV_PARAM_GPU_INSTRUCTION_COUNT 0x18 -#define ETNAVIV_PARAM_GPU_NUM_CONSTANTS 0x19 -#define ETNAVIV_PARAM_GPU_NUM_VARYINGS 0x1a -#define ETNAVIV_PARAM_SOFTPIN_START_ADDR 0x1b -#define ETNAVIV_PARAM_GPU_PRODUCT_ID 0x1c -#define ETNAVIV_PARAM_GPU_CUSTOMER_ID 0x1d -#define ETNAVIV_PARAM_GPU_ECO_ID 0x1e - -#define ETNA_MAX_PIPES 4 - -struct drm_etnaviv_param { - __u32 pipe; - __u32 param; - __u64 value; -}; - -#define ETNA_BO_CACHE_MASK 0x000f0000 -#define ETNA_BO_CACHED 0x00010000 -#define ETNA_BO_WC 0x00020000 -#define ETNA_BO_UNCACHED 0x00040000 -#define ETNA_BO_FORCE_MMU 0x00100000 - -struct drm_etnaviv_gem_new { - __u64 size; - __u32 flags; - __u32 handle; -}; - -struct drm_etnaviv_gem_info { - __u32 handle; - __u32 pad; - __u64 offset; -}; - -#define ETNA_PREP_READ 0x01 -#define ETNA_PREP_WRITE 0x02 -#define ETNA_PREP_NOSYNC 0x04 - -struct drm_etnaviv_gem_cpu_prep { - __u32 handle; - __u32 op; - struct drm_etnaviv_timespec timeout; -}; - -struct drm_etnaviv_gem_cpu_fini { - __u32 handle; - __u32 flags; -}; - -struct drm_etnaviv_gem_submit_reloc { - __u32 submit_offset; - __u32 reloc_idx; - __u64 reloc_offset; - __u32 flags; -}; - -#define ETNA_SUBMIT_BO_READ 0x0001 -#define ETNA_SUBMIT_BO_WRITE 0x0002 - -struct drm_etnaviv_gem_submit_bo { - __u32 flags; - __u32 handle; - __u64 presumed; -}; - -#define ETNA_PM_PROCESS_PRE 0x0001 -#define ETNA_PM_PROCESS_POST 0x0002 - -struct drm_etnaviv_gem_submit_pmr { - __u32 flags; - __u8 domain; - __u8 pad; - __u16 signal; - __u32 sequence; - __u32 read_offset; - __u32 read_idx; -}; - -#define ETNA_SUBMIT_NO_IMPLICIT 0x0001 -#define ETNA_SUBMIT_FENCE_FD_IN 0x0002 -#define ETNA_SUBMIT_FENCE_FD_OUT 0x0004 -#define ETNA_SUBMIT_SOFTPIN 0x0008 -#define ETNA_SUBMIT_FLAGS (ETNA_SUBMIT_NO_IMPLICIT | ETNA_SUBMIT_FENCE_FD_IN | ETNA_SUBMIT_FENCE_FD_OUT| ETNA_SUBMIT_SOFTPIN) - -struct drm_etnaviv_gem_submit { - __u32 fence; - __u32 pipe; - __u32 exec_state; - __u32 nr_bos; - __u32 nr_relocs; - __u32 stream_size; - __u64 bos; - __u64 relocs; - __u64 stream; - __u32 flags; - __s32 fence_fd; - __u64 pmrs; - __u32 nr_pmrs; - __u32 pad; -}; - -#define ETNA_WAIT_NONBLOCK 0x01 - -struct drm_etnaviv_wait_fence { - __u32 pipe; - __u32 fence; - __u32 flags; - __u32 pad; - struct drm_etnaviv_timespec timeout; -}; - -#define ETNA_USERPTR_READ 0x01 -#define ETNA_USERPTR_WRITE 0x02 - -struct drm_etnaviv_gem_userptr { - __u64 user_ptr; - __u64 user_size; - __u32 flags; - __u32 handle; -}; - -struct drm_etnaviv_gem_wait { - __u32 pipe; - __u32 handle; - __u32 flags; - __u32 pad; - struct drm_etnaviv_timespec timeout; -}; - -struct drm_etnaviv_pm_domain { - __u32 pipe; - __u8 iter; - __u8 id; - __u16 nr_signals; - char name[64]; -}; - -struct drm_etnaviv_pm_signal { - __u32 pipe; - __u8 domain; - __u8 pad; - __u16 iter; - __u16 id; - char name[64]; -}; - -#define DRM_ETNAVIV_GET_PARAM 0x00 - -#define DRM_ETNAVIV_GEM_NEW 0x02 -#define DRM_ETNAVIV_GEM_INFO 0x03 -#define DRM_ETNAVIV_GEM_CPU_PREP 0x04 -#define DRM_ETNAVIV_GEM_CPU_FINI 0x05 -#define DRM_ETNAVIV_GEM_SUBMIT 0x06 -#define DRM_ETNAVIV_WAIT_FENCE 0x07 -#define DRM_ETNAVIV_GEM_USERPTR 0x08 -#define DRM_ETNAVIV_GEM_WAIT 0x09 -#define DRM_ETNAVIV_PM_QUERY_DOM 0x0a -#define DRM_ETNAVIV_PM_QUERY_SIG 0x0b -#define DRM_ETNAVIV_NUM_IOCTLS 0x0c - -#define DRM_IOCTL_ETNAVIV_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GET_PARAM, struct drm_etnaviv_param) -#define DRM_IOCTL_ETNAVIV_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_NEW, struct drm_etnaviv_gem_new) -#define DRM_IOCTL_ETNAVIV_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_INFO, struct drm_etnaviv_gem_info) -#define DRM_IOCTL_ETNAVIV_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_PREP, struct drm_etnaviv_gem_cpu_prep) -#define DRM_IOCTL_ETNAVIV_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_FINI, struct drm_etnaviv_gem_cpu_fini) -#define DRM_IOCTL_ETNAVIV_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_SUBMIT, struct drm_etnaviv_gem_submit) -#define DRM_IOCTL_ETNAVIV_WAIT_FENCE DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_WAIT_FENCE, struct drm_etnaviv_wait_fence) -#define DRM_IOCTL_ETNAVIV_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_USERPTR, struct drm_etnaviv_gem_userptr) -#define DRM_IOCTL_ETNAVIV_GEM_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_WAIT, struct drm_etnaviv_gem_wait) -#define DRM_IOCTL_ETNAVIV_PM_QUERY_DOM DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_DOM, struct drm_etnaviv_pm_domain) -#define DRM_IOCTL_ETNAVIV_PM_QUERY_SIG DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_SIG, struct drm_etnaviv_pm_signal) - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/project/3rdparty/include/libdrm/drm/etnaviv_drmif.h b/project/3rdparty/include/libdrm/drm/etnaviv_drmif.h deleted file mode 100644 index 06a0c7c3c..000000000 --- a/project/3rdparty/include/libdrm/drm/etnaviv_drmif.h +++ /dev/null @@ -1,160 +0,0 @@ -#ifndef ETNAVIV_DRMIF_H_ -#define ETNAVIV_DRMIF_H_ - -#include -#include - -struct etna_bo; -struct etna_gpu; -struct etna_pipe; -struct etna_device; -struct etna_perfmon; -struct etna_cmd_stream; -struct etna_perfmon_domain; -struct etna_perfmon_signal; - -enum etna_pipe_id { - ETNA_PIPE_3D = 0x00, - ETNA_PIPE_2D = 0x01, - ETNA_PIPE_VG = 0x02, - ETNA_PIPE_MAX -}; - -enum etna_param_id { - ETNA_GPU_MODEL = 0x1, - ETNA_GPU_REVISION = 0x2, - ETNA_GPU_FEATURES_0 = 0x3, - ETNA_GPU_FEATURES_1 = 0x4, - ETNA_GPU_FEATURES_2 = 0x5, - ETNA_GPU_FEATURES_3 = 0x6, - ETNA_GPU_FEATURES_4 = 0x7, - ETNA_GPU_FEATURES_5 = 0x8, - ETNA_GPU_FEATURES_6 = 0x9, - - ETNA_GPU_STREAM_COUNT = 0x10, - ETNA_GPU_REGISTER_MAX = 0x11, - ETNA_GPU_THREAD_COUNT = 0x12, - ETNA_GPU_VERTEX_CACHE_SIZE = 0x13, - ETNA_GPU_SHADER_CORE_COUNT = 0x14, - ETNA_GPU_PIXEL_PIPES = 0x15, - ETNA_GPU_VERTEX_OUTPUT_BUFFER_SIZE = 0x16, - ETNA_GPU_BUFFER_SIZE = 0x17, - ETNA_GPU_INSTRUCTION_COUNT = 0x18, - ETNA_GPU_NUM_CONSTANTS = 0x19, - ETNA_GPU_NUM_VARYINGS = 0x1a -}; - -#define DRM_ETNA_GEM_CACHE_CACHED 0x00010000 -#define DRM_ETNA_GEM_CACHE_WC 0x00020000 -#define DRM_ETNA_GEM_CACHE_UNCACHED 0x00040000 -#define DRM_ETNA_GEM_CACHE_MASK 0x000f0000 -#define DRM_ETNA_GEM_FORCE_MMU 0x00100000 - -#define DRM_ETNA_PREP_READ 0x01 -#define DRM_ETNA_PREP_WRITE 0x02 -#define DRM_ETNA_PREP_NOSYNC 0x04 - -struct etna_device *etna_device_new(int fd); -struct etna_device *etna_device_new_dup(int fd); -struct etna_device *etna_device_ref(struct etna_device *dev); - -void etna_device_del(struct etna_device *dev); -int etna_device_fd(struct etna_device *dev); - -struct etna_gpu *etna_gpu_new(struct etna_device *dev, unsigned int core); -void etna_gpu_del(struct etna_gpu *gpu); -int etna_gpu_get_param(struct etna_gpu *gpu, enum etna_param_id param, uint64_t *value); - -struct etna_pipe *etna_pipe_new(struct etna_gpu *gpu, enum etna_pipe_id id); -void etna_pipe_del(struct etna_pipe *pipe); -int etna_pipe_wait(struct etna_pipe *pipe, uint32_t timestamp, uint32_t ms); -int etna_pipe_wait_ns(struct etna_pipe *pipe, uint32_t timestamp, uint64_t ns); - -struct etna_bo *etna_bo_new(struct etna_device *dev, uint32_t size, uint32_t flags); -struct etna_bo *etna_bo_from_name(struct etna_device *dev, uint32_t name); -struct etna_bo *etna_bo_from_dmabuf(struct etna_device *dev, int fd); -struct etna_bo *etna_bo_ref(struct etna_bo *bo); - -void etna_bo_del(struct etna_bo *bo); -int etna_bo_get_name(struct etna_bo *bo, uint32_t *name); -uint32_t etna_bo_handle(struct etna_bo *bo); -int etna_bo_dmabuf(struct etna_bo *bo); -uint32_t etna_bo_size(struct etna_bo *bo); -void *etna_bo_map(struct etna_bo *bo); -int etna_bo_cpu_prep(struct etna_bo *bo, uint32_t op); -void etna_bo_cpu_fini(struct etna_bo *bo); - -struct etna_cmd_stream { - uint32_t *buffer; - uint32_t offset; - uint32_t size; -}; - -struct etna_cmd_stream *etna_cmd_stream_new(struct etna_pipe *pipe, uint32_t size, void (*reset_notify)(struct etna_cmd_stream *stream, void *priv), void *priv); -void etna_cmd_stream_del(struct etna_cmd_stream *stream); -uint32_t etna_cmd_stream_timestamp(struct etna_cmd_stream *stream); -void etna_cmd_stream_flush(struct etna_cmd_stream *stream); -void etna_cmd_stream_flush2(struct etna_cmd_stream *stream, int in_fence_fd, int *out_fence_fd); -void etna_cmd_stream_finish(struct etna_cmd_stream *stream); - -static inline uint32_t etna_cmd_stream_avail(struct etna_cmd_stream *stream) -{ - static const uint32_t END_CLEARANCE = 2; - return stream->size - stream->offset - END_CLEARANCE; -} - -static inline void etna_cmd_stream_reserve(struct etna_cmd_stream *stream, size_t n) -{ - if (etna_cmd_stream_avail(stream) < n) { - etna_cmd_stream_flush(stream); - } -} - -static inline void etna_cmd_stream_emit(struct etna_cmd_stream *stream, uint32_t data) -{ - stream->buffer[stream->offset++] = data; -} - -static inline uint32_t etna_cmd_stream_get(struct etna_cmd_stream *stream, uint32_t offset) -{ - return stream->buffer[offset]; -} - -static inline void etna_cmd_stream_set(struct etna_cmd_stream *stream, uint32_t offset, uint32_t data) -{ - stream->buffer[offset] = data; -} - -static inline uint32_t etna_cmd_stream_offset(struct etna_cmd_stream *stream) -{ - return stream->offset; -} - -struct etna_reloc { - struct etna_bo *bo; -#define ETNA_RELOC_READ 0x0001 -#define ETNA_RELOC_WRITE 0x0002 - uint32_t flags; - uint32_t offset; -}; - -void etna_cmd_stream_reloc(struct etna_cmd_stream *stream, const struct etna_reloc *r); - -struct etna_perfmon *etna_perfmon_create(struct etna_pipe *pipe); -void etna_perfmon_del(struct etna_perfmon *perfmon); -struct etna_perfmon_domain *etna_perfmon_get_dom_by_name(struct etna_perfmon *pm, const char *name); -struct etna_perfmon_signal *etna_perfmon_get_sig_by_name(struct etna_perfmon_domain *dom, const char *name); - -struct etna_perf { -#define ETNA_PM_PROCESS_PRE 0x0001 -#define ETNA_PM_PROCESS_POST 0x0002 - uint32_t flags; - uint32_t sequence; - struct etna_perfmon_signal *signal; - struct etna_bo *bo; - uint32_t offset; -}; - -void etna_cmd_stream_perf(struct etna_cmd_stream *stream, const struct etna_perf *p); - -#endif diff --git a/project/3rdparty/include/libdrm/drm/exynos_drm.h b/project/3rdparty/include/libdrm/drm/exynos_drm.h deleted file mode 100644 index b771e3f31..000000000 --- a/project/3rdparty/include/libdrm/drm/exynos_drm.h +++ /dev/null @@ -1,101 +0,0 @@ -#ifndef _EXYNOS_DRM_H_ -#define _EXYNOS_DRM_H_ - -#include -#include "drm.h" - -struct drm_exynos_gem_create { - uint64_t size; - unsigned int flags; - unsigned int handle; -}; - -struct drm_exynos_gem_info { - unsigned int handle; - unsigned int flags; - uint64_t size; -}; - -struct drm_exynos_vidi_connection { - unsigned int connection; - unsigned int extensions; - uint64_t edid; -}; - -enum e_drm_exynos_gem_mem_type { - EXYNOS_BO_CONTIG = 0 << 0, - EXYNOS_BO_NONCONTIG = 1 << 0, - EXYNOS_BO_NONCACHABLE = 0 << 1, - EXYNOS_BO_CACHABLE = 1 << 1, - EXYNOS_BO_WC = 1 << 2, - EXYNOS_BO_MASK = EXYNOS_BO_NONCONTIG | EXYNOS_BO_CACHABLE | EXYNOS_BO_WC -}; - -struct drm_exynos_g2d_get_ver { - __u32 major; - __u32 minor; -}; - -struct drm_exynos_g2d_cmd { - __u32 offset; - __u32 data; -}; - -enum drm_exynos_g2d_buf_type { - G2D_BUF_USERPTR = 1 << 31, -}; - -enum drm_exynos_g2d_event_type { - G2D_EVENT_NOT, - G2D_EVENT_NONSTOP, - G2D_EVENT_STOP, -}; - -struct drm_exynos_g2d_userptr { - unsigned long userptr; - unsigned long size; -}; - -struct drm_exynos_g2d_set_cmdlist { - __u64 cmd; - __u64 cmd_buf; - __u32 cmd_nr; - __u32 cmd_buf_nr; - __u64 event_type; - __u64 user_data; -}; - -struct drm_exynos_g2d_exec { - __u64 async; -}; - -#define DRM_EXYNOS_GEM_CREATE 0x00 -#define DRM_EXYNOS_GEM_GET 0x04 -#define DRM_EXYNOS_VIDI_CONNECTION 0x07 - -#define DRM_EXYNOS_G2D_GET_VER 0x20 -#define DRM_EXYNOS_G2D_SET_CMDLIST 0x21 -#define DRM_EXYNOS_G2D_EXEC 0x22 - -#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create) - -#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info) - -#define DRM_IOCTL_EXYNOS_VIDI_CONNECTION DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_VIDI_CONNECTION, struct drm_exynos_vidi_connection) - -#define DRM_IOCTL_EXYNOS_G2D_GET_VER DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_GET_VER, struct drm_exynos_g2d_get_ver) -#define DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_SET_CMDLIST, struct drm_exynos_g2d_set_cmdlist) -#define DRM_IOCTL_EXYNOS_G2D_EXEC DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_EXEC, struct drm_exynos_g2d_exec) - -#define DRM_EXYNOS_G2D_EVENT 0x80000000 - -struct drm_exynos_g2d_event { - struct drm_event base; - __u64 user_data; - __u32 tv_sec; - __u32 tv_usec; - __u32 cmdlist_no; - __u32 reserved; -}; - -#endif diff --git a/project/3rdparty/include/libdrm/drm/exynos_drmif.h b/project/3rdparty/include/libdrm/drm/exynos_drmif.h deleted file mode 100644 index c2d914639..000000000 --- a/project/3rdparty/include/libdrm/drm/exynos_drmif.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef EXYNOS_DRMIF_H_ -#define EXYNOS_DRMIF_H_ - -#include - -#include "../xf86drm.h" -#include "exynos_drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -#define EXYNOS_EVENT_CONTEXT_VERSION 1 - -struct exynos_device { - int fd; -}; - -struct exynos_bo { - struct exynos_device *dev; - uint32_t handle; - uint32_t flags; - size_t size; - void *vaddr; - uint32_t name; -}; - -struct exynos_event_context { - drmEventContext base; - int version; - - void (*g2d_event_handler)(int fd, unsigned int cmdlist_no, unsigned int tv_sec, unsigned int tv_usec, void *user_data); -}; - -struct exynos_device * exynos_device_create(int fd); -void exynos_device_destroy(struct exynos_device *dev); - -struct exynos_bo *exynos_bo_create(struct exynos_device *dev, size_t size, uint32_t flags); -int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle, size_t *size, uint32_t *flags); -void exynos_bo_destroy(struct exynos_bo *bo); -struct exynos_bo *exynos_bo_from_name(struct exynos_device *dev, uint32_t name); -int exynos_bo_get_name(struct exynos_bo *bo, uint32_t *name); -uint32_t exynos_bo_handle(struct exynos_bo *bo); -void *exynos_bo_map(struct exynos_bo *bo); -int exynos_prime_handle_to_fd(struct exynos_device *dev, uint32_t handle, int *fd); -int exynos_prime_fd_to_handle(struct exynos_device *dev, int fd, uint32_t *handle); - -int exynos_vidi_connection(struct exynos_device *dev, uint32_t connect, uint32_t ext, void *edid); - -int exynos_handle_event(struct exynos_device *dev, struct exynos_event_context *ctx); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/project/3rdparty/include/libdrm/drm/exynos_fimg2d.h b/project/3rdparty/include/libdrm/drm/exynos_fimg2d.h deleted file mode 100644 index 3c5fa95fe..000000000 --- a/project/3rdparty/include/libdrm/drm/exynos_fimg2d.h +++ /dev/null @@ -1,249 +0,0 @@ -#ifndef _FIMG2D_H_ -#define _FIMG2D_H_ - -#define G2D_PLANE_MAX_NR 2 - -enum e_g2d_color_mode { - G2D_COLOR_FMT_XRGB8888, - G2D_COLOR_FMT_ARGB8888, - G2D_COLOR_FMT_RGB565, - G2D_COLOR_FMT_XRGB1555, - G2D_COLOR_FMT_ARGB1555, - G2D_COLOR_FMT_XRGB4444, - G2D_COLOR_FMT_ARGB4444, - G2D_COLOR_FMT_PRGB888, - G2D_COLOR_FMT_YCbCr444, - G2D_COLOR_FMT_YCbCr422, - G2D_COLOR_FMT_YCbCr420, - G2D_COLOR_FMT_A8, - G2D_COLOR_FMT_L8, - G2D_COLOR_FMT_A1, - G2D_COLOR_FMT_A4, - G2D_COLOR_FMT_MASK, - - G2D_ORDER_AXRGB = (0 << 4), - G2D_ORDER_RGBAX = (1 << 4), - G2D_ORDER_AXBGR = (2 << 4), - G2D_ORDER_BGRAX = (3 << 4), - G2D_ORDER_MASK = (3 << 4), - - G2D_YCbCr_1PLANE = (0 << 8), - G2D_YCbCr_2PLANE = (1 << 8), - G2D_YCbCr_PLANE_MASK = (3 << 8), - - G2D_YCbCr_ORDER_CrY1CbY0 = (0 << 12), - G2D_YCbCr_ORDER_CbY1CrY0 = (1 << 12), - G2D_YCbCr_ORDER_Y1CrY0Cb = (2 << 12), - G2D_YCbCr_ORDER_Y1CbY0Cr = (3 << 12), - G2D_YCbCr_ORDER_CrCb = G2D_YCbCr_ORDER_CrY1CbY0, - G2D_YCbCr_ORDER_CbCr = G2D_YCbCr_ORDER_CbY1CrY0, - G2D_YCbCr_ORDER_MASK = (3 < 12), - - G2D_CSC_601 = (0 << 16), - G2D_CSC_709 = (1 << 16), - G2D_CSC_MASK = (1 << 16), - - G2D_YCbCr_RANGE_NARROW = (0 << 17), - G2D_YCbCr_RANGE_WIDE = (1 << 17), - G2D_YCbCr_RANGE_MASK = (1 << 17), - - G2D_COLOR_MODE_MASK = 0xFFFFFFFF, -}; - -enum e_g2d_select_mode { - G2D_SELECT_MODE_NORMAL = (0 << 0), - G2D_SELECT_MODE_FGCOLOR = (1 << 0), - G2D_SELECT_MODE_BGCOLOR = (2 << 0), -}; - -enum e_g2d_repeat_mode { - G2D_REPEAT_MODE_REPEAT, - G2D_REPEAT_MODE_PAD, - G2D_REPEAT_MODE_REFLECT, - G2D_REPEAT_MODE_CLAMP, - G2D_REPEAT_MODE_NONE, -}; - -enum e_g2d_scale_mode { - G2D_SCALE_MODE_NONE = 0, - G2D_SCALE_MODE_NEAREST, - G2D_SCALE_MODE_BILINEAR, - G2D_SCALE_MODE_MAX, -}; - -enum e_g2d_buf_type { - G2D_IMGBUF_COLOR, - G2D_IMGBUF_GEM, - G2D_IMGBUF_USERPTR, -}; - -enum e_g2d_rop3_type { - G2D_ROP3_DST = 0xAA, - G2D_ROP3_SRC = 0xCC, - G2D_ROP3_3RD = 0xF0, - G2D_ROP3_MASK = 0xFF, -}; - -enum e_g2d_select_alpha_src { - G2D_SELECT_SRC_FOR_ALPHA_BLEND, - G2D_SELECT_ROP_FOR_ALPHA_BLEND, -}; - -enum e_g2d_transparent_mode { - G2D_TRANSPARENT_MODE_OPAQUE, - G2D_TRANSPARENT_MODE_TRANSPARENT, - G2D_TRANSPARENT_MODE_BLUESCREEN, - G2D_TRANSPARENT_MODE_MAX, -}; - -enum e_g2d_color_key_mode { - G2D_COLORKEY_MODE_DISABLE = 0, - G2D_COLORKEY_MODE_SRC_RGBA = (1<<0), - G2D_COLORKEY_MODE_DST_RGBA = (1<<1), - G2D_COLORKEY_MODE_SRC_YCbCr = (1<<2), - G2D_COLORKEY_MODE_DST_YCbCr = (1<<3), - G2D_COLORKEY_MODE_MASK = 15, -}; - -enum e_g2d_alpha_blend_mode { - G2D_ALPHA_BLEND_MODE_DISABLE, - G2D_ALPHA_BLEND_MODE_ENABLE, - G2D_ALPHA_BLEND_MODE_FADING, - G2D_ALPHA_BLEND_MODE_MAX, -}; - -enum e_g2d_op { - G2D_OP_CLEAR = 0x00, - G2D_OP_SRC = 0x01, - G2D_OP_DST = 0x02, - G2D_OP_OVER = 0x03, - G2D_OP_INTERPOLATE = 0x04, - G2D_OP_DISJOINT_CLEAR = 0x10, - G2D_OP_DISJOINT_SRC = 0x11, - G2D_OP_DISJOINT_DST = 0x12, - G2D_OP_CONJOINT_CLEAR = 0x20, - G2D_OP_CONJOINT_SRC = 0x21, - G2D_OP_CONJOINT_DST = 0x22, -}; - -enum e_g2d_coeff_mode { - G2D_COEFF_MODE_ONE, - G2D_COEFF_MODE_ZERO, - G2D_COEFF_MODE_SRC_ALPHA, - G2D_COEFF_MODE_SRC_COLOR, - G2D_COEFF_MODE_DST_ALPHA, - G2D_COEFF_MODE_DST_COLOR, - G2D_COEFF_MODE_GB_ALPHA, - G2D_COEFF_MODE_GB_COLOR, - G2D_COEFF_MODE_DISJOINT_S, - G2D_COEFF_MODE_DISJOINT_D, - G2D_COEFF_MODE_CONJOINT_S, - G2D_COEFF_MODE_CONJOINT_D, - G2D_COEFF_MODE_MASK -}; - -enum e_g2d_acoeff_mode { - G2D_ACOEFF_MODE_A, - G2D_ACOEFF_MODE_APGA, - G2D_ACOEFF_MODE_AMGA, - G2D_ACOEFF_MODE_MASK -}; - -union g2d_point_val { - unsigned int val; - struct { - unsigned int x:16; - unsigned int y:16; - } data; -}; - -union g2d_rop4_val { - unsigned int val; - struct { - enum e_g2d_rop3_type unmasked_rop3:8; - enum e_g2d_rop3_type masked_rop3:8; - unsigned int reserved:16; - } data; -}; - -union g2d_bitblt_cmd_val { - unsigned int val; - struct { - unsigned int mask_rop4_en : 1; - unsigned int masking_en : 1; - enum e_g2d_select_alpha_src rop4_alpha_en : 1; - unsigned int dither_en : 1; - unsigned int resolved1 : 4; - unsigned int cw_en : 4; - enum e_g2d_transparent_mode transparent_mode : 4; - enum e_g2d_color_key_mode color_key_mode : 4; - enum e_g2d_alpha_blend_mode alpha_blend_mode : 4; - unsigned int src_pre_multiply : 1; - unsigned int pat_pre_multiply : 1; - unsigned int dst_pre_multiply : 1; - unsigned int dst_depre_multiply : 1; - unsigned int fast_solid_color_fill_en : 1; - unsigned int reserved : 3; - } data; -}; - -union g2d_blend_func_val { - unsigned int val; - struct { - enum e_g2d_coeff_mode src_coeff : 4; - enum e_g2d_acoeff_mode src_coeff_src_a : 2; - enum e_g2d_acoeff_mode src_coeff_dst_a : 2; - enum e_g2d_coeff_mode dst_coeff : 4; - enum e_g2d_acoeff_mode dst_coeff_src_a : 2; - enum e_g2d_acoeff_mode dst_coeff_dst_a : 2; - unsigned int inv_src_color_coeff : 1; - unsigned int resoled1 : 1; - unsigned int inv_dst_color_coeff : 1; - unsigned int resoled2 : 1; - unsigned int lighten_en : 1; - unsigned int darken_en : 1; - unsigned int win_ce_src_over_en : 2; - unsigned int reserved : 8; - } data; -}; - -struct g2d_image { - enum e_g2d_select_mode select_mode; - enum e_g2d_color_mode color_mode; - enum e_g2d_repeat_mode repeat_mode; - enum e_g2d_scale_mode scale_mode; - unsigned int xscale; - unsigned int yscale; - unsigned char rotate_90; - unsigned char x_dir; - unsigned char y_dir; - unsigned char component_alpha; - unsigned int width; - unsigned int height; - unsigned int stride; - unsigned int need_free; - unsigned int color; - enum e_g2d_buf_type buf_type; - unsigned int bo[G2D_PLANE_MAX_NR]; - struct drm_exynos_g2d_userptr user_ptr[G2D_PLANE_MAX_NR]; - void *mapped_ptr[G2D_PLANE_MAX_NR]; -}; - -struct g2d_context; - -struct g2d_context *g2d_init(int fd); -void g2d_fini(struct g2d_context *ctx); - -void g2d_config_event(struct g2d_context *ctx, void *userdata); -int g2d_exec(struct g2d_context *ctx); -int g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img, unsigned int x, unsigned int y, unsigned int w, unsigned int h); - -int g2d_copy(struct g2d_context *ctx, struct g2d_image *src, struct g2d_image *dst, unsigned int src_x, unsigned int src_y, unsigned int dst_x, unsigned int dst_y, unsigned int w, unsigned int h); -int g2d_move(struct g2d_context *ctx, struct g2d_image *img, unsigned int src_x, unsigned int src_y, unsigned int dst_x, unsigned dst_y, unsigned int w, unsigned int h); - -int g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src, struct g2d_image *dst, unsigned int src_x, unsigned int src_y, unsigned int src_w, unsigned int src_h, unsigned int dst_x, unsigned int dst_y, unsigned int dst_w, unsigned int dst_h, unsigned int negative); - -int g2d_blend(struct g2d_context *ctx, struct g2d_image *src, struct g2d_image *dst, unsigned int src_x, unsigned int src_y, unsigned int dst_x, unsigned int dst_y, unsigned int w, unsigned int h, enum e_g2d_op op); -int g2d_scale_and_blend(struct g2d_context *ctx, struct g2d_image *src, struct g2d_image *dst, unsigned int src_x, unsigned int src_y, unsigned int src_w, unsigned int src_h, unsigned int dst_x, unsigned int dst_y, unsigned int dst_w, unsigned int dst_h, enum e_g2d_op op); - -#endif diff --git a/project/3rdparty/include/libdrm/drm/nouveau_drm.h b/project/3rdparty/include/libdrm/drm/nouveau_drm.h deleted file mode 100644 index 4b0b48e2f..000000000 --- a/project/3rdparty/include/libdrm/drm/nouveau_drm.h +++ /dev/null @@ -1,221 +0,0 @@ -#ifndef __NOUVEAU_DRM_H__ -#define __NOUVEAU_DRM_H__ - -#define NOUVEAU_DRM_HEADER_PATCHLEVEL 16 - -#include "drm.h" -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct drm_nouveau_channel_alloc { - uint32_t fb_ctxdma_handle; - uint32_t tt_ctxdma_handle; - int channel; - uint32_t pushbuf_domains; - uint32_t notifier_handle; - - struct { - uint32_t handle; - uint32_t grclass; - } subchan[8]; - uint32_t nr_subchan; -}; - -struct drm_nouveau_channel_free { - int channel; -}; - -struct drm_nouveau_grobj_alloc { - int channel; - uint32_t handle; - int classt; -}; - -struct drm_nouveau_notifierobj_alloc { - uint32_t channel; - uint32_t handle; - uint32_t size; - uint32_t offset; -}; - -struct drm_nouveau_gpuobj_free { - int channel; - uint32_t handle; -}; - -#define NOUVEAU_GETPARAM_PCI_VENDOR 3 -#define NOUVEAU_GETPARAM_PCI_DEVICE 4 -#define NOUVEAU_GETPARAM_BUS_TYPE 5 -#define NOUVEAU_GETPARAM_FB_SIZE 8 -#define NOUVEAU_GETPARAM_AGP_SIZE 9 -#define NOUVEAU_GETPARAM_CHIPSET_ID 11 -#define NOUVEAU_GETPARAM_VM_VRAM_BASE 12 -#define NOUVEAU_GETPARAM_GRAPH_UNITS 13 -#define NOUVEAU_GETPARAM_PTIMER_TIME 14 -#define NOUVEAU_GETPARAM_HAS_BO_USAGE 15 -#define NOUVEAU_GETPARAM_HAS_PAGEFLIP 16 - -struct drm_nouveau_getparam { - uint64_t param; - uint64_t value; -}; - -struct drm_nouveau_setparam { - uint64_t param; - uint64_t value; -}; - -#define NOUVEAU_GEM_DOMAIN_CPU (1 << 0) -#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1) -#define NOUVEAU_GEM_DOMAIN_GART (1 << 2) -#define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3) -#define NOUVEAU_GEM_DOMAIN_COHERENT (1 << 4) - -#define NOUVEAU_GEM_TILE_COMP 0x00030000 -#define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00 -#define NOUVEAU_GEM_TILE_16BPP 0x00000001 -#define NOUVEAU_GEM_TILE_32BPP 0x00000002 -#define NOUVEAU_GEM_TILE_ZETA 0x00000004 -#define NOUVEAU_GEM_TILE_NONCONTIG 0x00000008 - -struct drm_nouveau_gem_info { - __u32 handle; - __u32 domain; - __u64 size; - __u64 offset; - __u64 map_handle; - __u32 tile_mode; - __u32 tile_flags; -}; - -struct drm_nouveau_gem_new { - struct drm_nouveau_gem_info info; - __u32 channel_hint; - __u32 align; -}; - -#define NOUVEAU_GEM_MAX_BUFFERS 1024 - -struct drm_nouveau_gem_pushbuf_bo_presumed { - __u32 valid; - __u32 domain; - __u64 offset; -}; - -struct drm_nouveau_gem_pushbuf_bo { - __u64 user_priv; - __u32 handle; - __u32 read_domains; - __u32 write_domains; - __u32 valid_domains; - struct drm_nouveau_gem_pushbuf_bo_presumed presumed; -}; - -#define NOUVEAU_GEM_RELOC_LOW (1 << 0) -#define NOUVEAU_GEM_RELOC_HIGH (1 << 1) -#define NOUVEAU_GEM_RELOC_OR (1 << 2) -#define NOUVEAU_GEM_MAX_RELOCS 1024 - -struct drm_nouveau_gem_pushbuf_reloc { - __u32 reloc_bo_index; - __u32 reloc_bo_offset; - __u32 bo_index; - __u32 flags; - __u32 data; - __u32 vor; - __u32 tor; -}; - -#define NOUVEAU_GEM_MAX_PUSH 512 - -struct drm_nouveau_gem_pushbuf_push { - __u32 bo_index; - __u32 pad; - __u64 offset; - __u64 length; -}; - -struct drm_nouveau_gem_pushbuf { - __u32 channel; - __u32 nr_buffers; - __u64 buffers; - __u32 nr_relocs; - __u32 nr_push; - __u64 relocs; - __u64 push; - __u32 suffix0; - __u32 suffix1; -#define NOUVEAU_GEM_PUSHBUF_SYNC (1ULL << 0) - __u64 vram_available; - __u64 gart_available; -}; - -#define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001 -#define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004 - -struct drm_nouveau_gem_cpu_prep { - __u32 handle; - __u32 flags; -}; - -struct drm_nouveau_gem_cpu_fini { - __u32 handle; -}; - -#define DRM_NOUVEAU_GETPARAM 0x00 -#define DRM_NOUVEAU_SETPARAM 0x01 -#define DRM_NOUVEAU_CHANNEL_ALLOC 0x02 -#define DRM_NOUVEAU_CHANNEL_FREE 0x03 -#define DRM_NOUVEAU_GROBJ_ALLOC 0x04 -#define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 -#define DRM_NOUVEAU_GPUOBJ_FREE 0x06 -#define DRM_NOUVEAU_NVIF 0x07 -#define DRM_NOUVEAU_SVM_INIT 0x08 -#define DRM_NOUVEAU_SVM_BIND 0x09 -#define DRM_NOUVEAU_GEM_NEW 0x40 -#define DRM_NOUVEAU_GEM_PUSHBUF 0x41 -#define DRM_NOUVEAU_GEM_CPU_PREP 0x42 -#define DRM_NOUVEAU_GEM_CPU_FINI 0x43 -#define DRM_NOUVEAU_GEM_INFO 0x44 - -struct drm_nouveau_svm_init { - __u64 unmanaged_addr; - __u64 unmanaged_size; -}; - -struct drm_nouveau_svm_bind { - __u64 header; - __u64 va_start; - __u64 va_end; - __u64 npages; - __u64 stride; - __u64 result; - __u64 reserved0; - __u64 reserved1; -}; - -#define NOUVEAU_SVM_BIND_COMMAND_SHIFT 0 -#define NOUVEAU_SVM_BIND_COMMAND_BITS 8 -#define NOUVEAU_SVM_BIND_COMMAND_MASK ((1 << 8) - 1) -#define NOUVEAU_SVM_BIND_PRIORITY_SHIFT 8 -#define NOUVEAU_SVM_BIND_PRIORITY_BITS 8 -#define NOUVEAU_SVM_BIND_PRIORITY_MASK ((1 << 8) - 1) -#define NOUVEAU_SVM_BIND_TARGET_SHIFT 16 -#define NOUVEAU_SVM_BIND_TARGET_BITS 32 -#define NOUVEAU_SVM_BIND_TARGET_MASK 0xffffffff - -#define NOUVEAU_SVM_BIND_VALID_BITS 48 -#define NOUVEAU_SVM_BIND_VALID_MASK ((1ULL << NOUVEAU_SVM_BIND_VALID_BITS) - 1) - -#define NOUVEAU_SVM_BIND_COMMAND__MIGRATE 0 - -#define NOUVEAU_SVM_BIND_TARGET__GPU_VRAM (1UL << 31) - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/project/3rdparty/include/libdrm/drm/omap_drm.h b/project/3rdparty/include/libdrm/drm/omap_drm.h deleted file mode 100644 index 6ad9bad68..000000000 --- a/project/3rdparty/include/libdrm/drm/omap_drm.h +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef __OMAP_DRM_H__ -#define __OMAP_DRM_H__ - -#include -#include - -#define OMAP_PARAM_CHIPSET_ID 1 - -struct drm_omap_param { - uint64_t param; - uint64_t value; -}; - -struct drm_omap_get_base { - char plugin_name[64]; - uint32_t ioctl_base; - uint32_t __pad; -}; - -#define OMAP_BO_SCANOUT 0x00000001 -#define OMAP_BO_CACHE_MASK 0x00000006 -#define OMAP_BO_TILED_MASK 0x00000f00 - -#define OMAP_BO_CACHED 0x00000000 -#define OMAP_BO_WC 0x00000002 -#define OMAP_BO_UNCACHED 0x00000004 - -#define OMAP_BO_TILED_8 0x00000100 -#define OMAP_BO_TILED_16 0x00000200 -#define OMAP_BO_TILED_32 0x00000300 -#define OMAP_BO_TILED (OMAP_BO_TILED_8 | OMAP_BO_TILED_16 | OMAP_BO_TILED_32) - -union omap_gem_size { - uint32_t bytes; - struct { - uint16_t width; - uint16_t height; - } tiled; -}; - -struct drm_omap_gem_new { - union omap_gem_size size; - uint32_t flags; - uint32_t handle; - uint32_t __pad; -}; - -enum omap_gem_op { - OMAP_GEM_READ = 0x01, - OMAP_GEM_WRITE = 0x02, -}; - -struct drm_omap_gem_cpu_prep { - uint32_t handle; - uint32_t op; -}; - -struct drm_omap_gem_cpu_fini { - uint32_t handle; - uint32_t op; - uint32_t nregions; - uint32_t __pad; -}; - -struct drm_omap_gem_info { - uint32_t handle; - uint32_t pad; - uint64_t offset; - uint32_t size; - uint32_t __pad; -}; - -#define DRM_OMAP_GET_PARAM 0x00 -#define DRM_OMAP_SET_PARAM 0x01 -#define DRM_OMAP_GET_BASE 0x02 -#define DRM_OMAP_GEM_NEW 0x03 -#define DRM_OMAP_GEM_CPU_PREP 0x04 -#define DRM_OMAP_GEM_CPU_FINI 0x05 -#define DRM_OMAP_GEM_INFO 0x06 -#define DRM_OMAP_NUM_IOCTLS 0x07 - -#define DRM_IOCTL_OMAP_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param) -#define DRM_IOCTL_OMAP_SET_PARAM DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param) -#define DRM_IOCTL_OMAP_GET_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_BASE, struct drm_omap_get_base) -#define DRM_IOCTL_OMAP_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new) -#define DRM_IOCTL_OMAP_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep) -#define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini) -#define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info) - -#endif diff --git a/project/3rdparty/include/libdrm/drm/omap_drmif.h b/project/3rdparty/include/libdrm/drm/omap_drmif.h deleted file mode 100644 index 8c0657585..000000000 --- a/project/3rdparty/include/libdrm/drm/omap_drmif.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef OMAP_DRMIF_H_ -#define OMAP_DRMIF_H_ - -#include - -#include "../xf86drm.h" -#include "omap_drm.h" - -struct omap_bo; -struct omap_device; - -struct omap_device *omap_device_new(int fd); -struct omap_device *omap_device_ref(struct omap_device *dev); - -void omap_device_del(struct omap_device *dev); -int omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value); -int omap_set_param(struct omap_device *dev, uint64_t param, uint64_t value); - -struct omap_bo *omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags); -struct omap_bo *omap_bo_new_tiled(struct omap_device *dev, uint32_t width, uint32_t height, uint32_t flags); -struct omap_bo *omap_bo_ref(struct omap_bo *bo); -struct omap_bo *omap_bo_from_name(struct omap_device *dev, uint32_t name); -struct omap_bo *omap_bo_from_dmabuf(struct omap_device *dev, int fd); - -void omap_bo_del(struct omap_bo *bo); -int omap_bo_get_name(struct omap_bo *bo, uint32_t *name); -uint32_t omap_bo_handle(struct omap_bo *bo); -int omap_bo_dmabuf(struct omap_bo *bo); -uint32_t omap_bo_size(struct omap_bo *bo); -void *omap_bo_map(struct omap_bo *bo); -int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op); -int omap_bo_cpu_fini(struct omap_bo *bo, enum omap_gem_op op); - -#endif diff --git a/project/3rdparty/include/libdrm/drm/rockchip_drm.h b/project/3rdparty/include/libdrm/drm/rockchip_drm.h deleted file mode 100644 index c0deb3271..000000000 --- a/project/3rdparty/include/libdrm/drm/rockchip_drm.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef LIBDRM_ROCKCHIP_DRM_H -#define LIBDRM_ROCKCHIP_DRM_H - -#include -#include "drm.h" - -struct drm_rockchip_gem_create { - uint64_t size; - uint32_t flags; - uint32_t handle; -}; - -struct drm_rockchip_gem_map_off { - uint32_t handle; - uint32_t pad; - uint64_t offset; -}; - -struct drm_rockchip_rga_get_ver { - __u32 major; - __u32 minor; -}; - -struct drm_rockchip_rga_cmd { - __u32 offset; - __u32 data; -}; - -enum drm_rockchip_rga_buf_type { - RGA_BUF_TYPE_USERPTR = 1 << 31, - RGA_BUF_TYPE_GEMFD = 1 << 30, -}; - -struct drm_rockchip_rga_userptr { - unsigned long userptr; - unsigned long size; -}; - -struct drm_rockchip_rga_set_cmdlist { - __u64 cmd; - __u64 cmd_buf; - __u32 cmd_nr; - __u32 cmd_buf_nr; - __u64 user_data; -}; - -struct drm_rockchip_rga_exec { - __u64 async; -}; - -#define DRM_ROCKCHIP_GEM_CREATE 0x00 -#define DRM_ROCKCHIP_GEM_MAP_OFFSET 0x01 -#define DRM_ROCKCHIP_RGA_GET_VER 0x20 -#define DRM_ROCKCHIP_RGA_SET_CMDLIST 0x21 -#define DRM_ROCKCHIP_RGA_EXEC 0x22 - -#define DRM_IOCTL_ROCKCHIP_RGA_GET_VER DRM_IOWR(DRM_COMMAND_BASE + DRM_ROCKCHIP_RGA_GET_VER, struct drm_rockchip_rga_get_ver) -#define DRM_IOCTL_ROCKCHIP_RGA_SET_CMDLIST DRM_IOWR(DRM_COMMAND_BASE + DRM_ROCKCHIP_RGA_SET_CMDLIST, struct drm_rockchip_rga_set_cmdlist) - -#define DRM_IOCTL_ROCKCHIP_RGA_EXEC DRM_IOWR(DRM_COMMAND_BASE + DRM_ROCKCHIP_RGA_EXEC, struct drm_rockchip_rga_exec) - -#define DRM_IOCTL_ROCKCHIP_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_ROCKCHIP_GEM_CREATE, struct drm_rockchip_gem_create) -#define DRM_IOCTL_ROCKCHIP_GEM_MAP_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_ROCKCHIP_GEM_MAP_OFFSET, struct drm_rockchip_gem_map_off) - -#endif diff --git a/project/3rdparty/include/libdrm/drm/rockchip_drmif.h b/project/3rdparty/include/libdrm/drm/rockchip_drmif.h deleted file mode 100644 index 450fc0958..000000000 --- a/project/3rdparty/include/libdrm/drm/rockchip_drmif.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef LIBDRM_ROCKCHIP_DRMIF_H -#define LIBDRM_ROCKCHIP_DRMIF_H - -#include -#include - -#include "rockchip_drm.h" - -struct rockchip_device { - int fd; -}; - -struct rockchip_bo { - struct rockchip_device *dev; - uint32_t handle; - uint32_t flags; - size_t size; - void *vaddr; - uint32_t name; -}; - -struct rockchip_device *rockchip_device_create(int fd); -void rockchip_device_destroy(struct rockchip_device *dev); - -struct rockchip_bo *rockchip_bo_create(struct rockchip_device *dev, size_t size, uint32_t flags); - -int rockchip_bo_get_info(struct rockchip_device *dev, uint32_t handle, size_t *size, uint32_t *flags); -void rockchip_bo_destroy(struct rockchip_bo *bo); - -struct rockchip_bo *rockchip_bo_from_name(struct rockchip_device *dev, uint32_t name); -int rockchip_bo_get_name(struct rockchip_bo *bo, uint32_t *name); - -uint32_t rockchip_bo_handle(struct rockchip_bo *bo); -struct rockchip_bo *rockchip_bo_from_handle(struct rockchip_device *dev, uint32_t handle, uint32_t flags, uint32_t size); - -void *rockchip_bo_map(struct rockchip_bo *bo); - -#endif diff --git a/project/3rdparty/include/libdrm/drm/tegra_drm.h b/project/3rdparty/include/libdrm/drm/tegra_drm.h deleted file mode 100644 index a2c93f172..000000000 --- a/project/3rdparty/include/libdrm/drm/tegra_drm.h +++ /dev/null @@ -1,300 +0,0 @@ -#ifndef _UAPI_TEGRA_DRM_H_ -#define _UAPI_TEGRA_DRM_H_ - -#include "drm.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -#define DRM_TEGRA_GEM_CREATE_TILED (1 << 0) -#define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1) - -#define DRM_TEGRA_NO_TIMEOUT (0xffffffff) - -#define DRM_TEGRA_GEM_TILING_MODE_PITCH 0 -#define DRM_TEGRA_GEM_TILING_MODE_TILED 1 -#define DRM_TEGRA_GEM_TILING_MODE_BLOCK 2 - -#define DRM_TEGRA_GEM_BOTTOM_UP (1 << 0) -#define DRM_TEGRA_GEM_FLAGS (DRM_TEGRA_GEM_BOTTOM_UP) - -struct drm_tegra_gem_create { - __u64 size; - __u32 flags; - __u32 handle; -}; - -struct drm_tegra_gem_mmap { - __u32 handle; - __u32 pad; - __u64 offset; -}; - -struct drm_tegra_syncpt_read { - __u32 id; - __u32 value; -}; - -struct drm_tegra_syncpt_incr { - __u32 id; - __u32 pad; -}; - -struct drm_tegra_syncpt_wait { - __u32 id; - __u32 thresh; - __u32 timeout; - __u32 value; -}; - -struct drm_tegra_open_channel { - __u32 client; - __u32 pad; - __u64 context; -}; - -struct drm_tegra_close_channel { - __u64 context; -}; - -struct drm_tegra_get_syncpt { - __u64 context; - __u32 index; - __u32 id; -}; - -struct drm_tegra_get_syncpt_base { - __u64 context; - __u32 syncpt; - __u32 id; -}; - -struct drm_tegra_syncpt { - __u32 id; - __u32 incrs; -}; - -struct drm_tegra_cmdbuf { - __u32 handle; - __u32 offset; - __u32 words; - __u32 pad; -}; - -struct drm_tegra_reloc { - struct { - __u32 handle; - __u32 offset; - } cmdbuf; - - struct { - __u32 handle; - __u32 offset; - } target; - - __u32 shift; - __u32 pad; -}; - -struct drm_tegra_waitchk { - __u32 handle; - __u32 offset; - __u32 syncpt; - __u32 thresh; -}; - -struct drm_tegra_submit { - __u64 context; - __u32 num_syncpts; - __u32 num_cmdbufs; - __u32 num_relocs; - __u32 num_waitchks; - __u32 waitchk_mask; - __u32 timeout; - __u64 syncpts; - __u64 cmdbufs; - __u64 relocs; - __u64 waitchks; - __u32 fence; - __u32 reserved[5]; -}; - -struct drm_tegra_gem_set_tiling { - __u32 handle; - __u32 mode; - __u32 value; - __u32 pad; -}; - -struct drm_tegra_gem_get_tiling { - __u32 handle; - __u32 mode; - __u32 value; - __u32 pad; -}; - -struct drm_tegra_gem_set_flags { - __u32 handle; - __u32 flags; -}; - -struct drm_tegra_gem_get_flags { - __u32 handle; - __u32 flags; -}; - -#define DRM_TEGRA_GEM_CREATE 0x00 -#define DRM_TEGRA_GEM_MMAP 0x01 -#define DRM_TEGRA_SYNCPT_READ 0x02 -#define DRM_TEGRA_SYNCPT_INCR 0x03 -#define DRM_TEGRA_SYNCPT_WAIT 0x04 -#define DRM_TEGRA_OPEN_CHANNEL 0x05 -#define DRM_TEGRA_CLOSE_CHANNEL 0x06 -#define DRM_TEGRA_GET_SYNCPT 0x07 -#define DRM_TEGRA_SUBMIT 0x08 -#define DRM_TEGRA_GET_SYNCPT_BASE 0x09 -#define DRM_TEGRA_GEM_SET_TILING 0x0a -#define DRM_TEGRA_GEM_GET_TILING 0x0b -#define DRM_TEGRA_GEM_SET_FLAGS 0x0c -#define DRM_TEGRA_GEM_GET_FLAGS 0x0d - -#define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create) -#define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap) -#define DRM_IOCTL_TEGRA_SYNCPT_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_READ, struct drm_tegra_syncpt_read) -#define DRM_IOCTL_TEGRA_SYNCPT_INCR DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_INCR, struct drm_tegra_syncpt_incr) -#define DRM_IOCTL_TEGRA_SYNCPT_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_WAIT, struct drm_tegra_syncpt_wait) -#define DRM_IOCTL_TEGRA_OPEN_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_OPEN_CHANNEL, struct drm_tegra_open_channel) -#define DRM_IOCTL_TEGRA_CLOSE_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, struct drm_tegra_close_channel) -#define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt) -#define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit) -#define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base) -#define DRM_IOCTL_TEGRA_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_TILING, struct drm_tegra_gem_set_tiling) -#define DRM_IOCTL_TEGRA_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_TILING, struct drm_tegra_gem_get_tiling) -#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags) -#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags) - -#define DRM_TEGRA_CHANNEL_CAP_CACHE_COHERENT (1 << 0) - -struct drm_tegra_channel_open { - __u32 host1x_class; - __u32 flags; - __u32 context; - __u32 version; - __u32 capabilities; - __u32 padding; -}; - -struct drm_tegra_channel_close { - __u32 context; - __u32 padding; -}; - -#define DRM_TEGRA_CHANNEL_MAP_READ (1 << 0) -#define DRM_TEGRA_CHANNEL_MAP_WRITE (1 << 1) -#define DRM_TEGRA_CHANNEL_MAP_READ_WRITE (DRM_TEGRA_CHANNEL_MAP_READ | DRM_TEGRA_CHANNEL_MAP_WRITE) - -struct drm_tegra_channel_map { - __u32 context; - __u32 handle; - __u32 flags; - __u32 mapping; -}; - -struct drm_tegra_channel_unmap { - __u32 context; - __u32 mapping; -}; - -#define DRM_TEGRA_SUBMIT_RELOC_SECTOR_LAYOUT (1 << 0) - -struct drm_tegra_submit_buf { - __u32 mapping; - __u32 flags; - - struct { - __u64 target_offset; - __u32 gather_offset_words; - __u32 shift; - } reloc; -}; - -#define DRM_TEGRA_SUBMIT_CMD_GATHER_UPTR 0 -#define DRM_TEGRA_SUBMIT_CMD_WAIT_SYNCPT 1 -#define DRM_TEGRA_SUBMIT_CMD_WAIT_SYNCPT_RELATIVE 2 - -struct drm_tegra_submit_cmd_gather_uptr { - __u32 words; - __u32 reserved[3]; -}; - -struct drm_tegra_submit_cmd_wait_syncpt { - __u32 id; - __u32 value; - __u32 reserved[2]; -}; - -struct drm_tegra_submit_cmd { - __u32 type; - __u32 flags; - - union { - struct drm_tegra_submit_cmd_gather_uptr gather_uptr; - struct drm_tegra_submit_cmd_wait_syncpt wait_syncpt; - __u32 reserved[4]; - }; -}; - -struct drm_tegra_submit_syncpt { - __u32 id; - __u32 flags; - __u32 increments; - __u32 value; -}; - -struct drm_tegra_channel_submit { - __u32 context; - __u32 num_bufs; - __u32 num_cmds; - __u32 gather_data_words; - __u64 bufs_ptr; - __u64 cmds_ptr; - __u64 gather_data_ptr; - __u32 syncobj_in; - __u32 syncobj_out; - struct drm_tegra_submit_syncpt syncpt; -}; - -struct drm_tegra_syncpoint_allocate { - __u32 id; - __u32 padding; -}; - -struct drm_tegra_syncpoint_free { - __u32 id; - __u32 padding; -}; - -struct drm_tegra_syncpoint_wait { - __s64 timeout_ns; - __u32 id; - __u32 threshold; - __u32 value; - __u32 padding; -}; - -#define DRM_IOCTL_TEGRA_CHANNEL_OPEN DRM_IOWR(DRM_COMMAND_BASE + 0x10, struct drm_tegra_channel_open) -#define DRM_IOCTL_TEGRA_CHANNEL_CLOSE DRM_IOWR(DRM_COMMAND_BASE + 0x11, struct drm_tegra_channel_close) -#define DRM_IOCTL_TEGRA_CHANNEL_MAP DRM_IOWR(DRM_COMMAND_BASE + 0x12, struct drm_tegra_channel_map) -#define DRM_IOCTL_TEGRA_CHANNEL_UNMAP DRM_IOWR(DRM_COMMAND_BASE + 0x13, struct drm_tegra_channel_unmap) -#define DRM_IOCTL_TEGRA_CHANNEL_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + 0x14, struct drm_tegra_channel_submit) - -#define DRM_IOCTL_TEGRA_SYNCPOINT_ALLOCATE DRM_IOWR(DRM_COMMAND_BASE + 0x20, struct drm_tegra_syncpoint_allocate) -#define DRM_IOCTL_TEGRA_SYNCPOINT_FREE DRM_IOWR(DRM_COMMAND_BASE + 0x21, struct drm_tegra_syncpoint_free) -#define DRM_IOCTL_TEGRA_SYNCPOINT_WAIT DRM_IOWR(DRM_COMMAND_BASE + 0x22, struct drm_tegra_syncpoint_wait) - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/project/3rdparty/include/libdrm/drm/tegra_drmif.h b/project/3rdparty/include/libdrm/drm/tegra_drmif.h deleted file mode 100644 index 04958d33e..000000000 --- a/project/3rdparty/include/libdrm/drm/tegra_drmif.h +++ /dev/null @@ -1,87 +0,0 @@ -#ifndef __DRM_TEGRA_DRMIF_H__ -#define __DRM_TEGRA_DRMIF_H__ 1 - -#include -#include - -#include "tegra_drm.h" - -enum drm_tegra_class { - DRM_TEGRA_HOST1X, - DRM_TEGRA_GR2D, - DRM_TEGRA_GR3D, - DRM_TEGRA_VIC, -}; - -struct drm_tegra; -struct drm_tegra_bo; - -void drm_tegra_close(struct drm_tegra *drm); -int drm_tegra_new(int fd, struct drm_tegra **drmp); - - -int drm_tegra_bo_new(struct drm_tegra *drm, uint32_t flags, uint32_t size, struct drm_tegra_bo **bop); -int drm_tegra_bo_wrap(struct drm_tegra *drm, uint32_t handle, uint32_t flags, uint32_t size, struct drm_tegra_bo **bop); - -struct drm_tegra_bo *drm_tegra_bo_ref(struct drm_tegra_bo *bo); -void drm_tegra_bo_unref(struct drm_tegra_bo *bo); -int drm_tegra_bo_get_handle(struct drm_tegra_bo *bo, uint32_t *handle); -int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr); -int drm_tegra_bo_unmap(struct drm_tegra_bo *bo); - -int drm_tegra_bo_get_name(struct drm_tegra_bo *bo, uint32_t *name); -int drm_tegra_bo_open(struct drm_tegra *drm, uint32_t name, uint32_t flags, struct drm_tegra_bo **bop); - -int drm_tegra_bo_export(struct drm_tegra_bo *bo, uint32_t flags); -int drm_tegra_bo_import(struct drm_tegra *drm, int fd, struct drm_tegra_bo **bop); - -struct drm_tegra_job; -struct drm_tegra_channel; -struct drm_tegra_mapping; -struct drm_tegra_pushbuf; -struct drm_tegra_syncpoint; - -enum drm_tegra_sync_cond { - DRM_TEGRA_SYNC_COND_IMMEDIATE, - DRM_TEGRA_SYNC_COND_OP_DONE, - DRM_TEGRA_SYNC_COND_RD_DONE, - DRM_TEGRA_SYNC_COND_WR_SAFE, - DRM_TEGRA_SYNC_COND_MAX, -}; - -struct drm_tegra_fence { - struct drm_tegra *drm; - uint32_t syncpt; - uint32_t value; -}; - -int drm_tegra_channel_open(struct drm_tegra *drm, enum drm_tegra_class client, struct drm_tegra_channel **channelp); -int drm_tegra_channel_close(struct drm_tegra_channel *channel); - -unsigned int drm_tegra_channel_get_version(struct drm_tegra_channel *channel); - -int drm_tegra_channel_map(struct drm_tegra_channel *channel, struct drm_tegra_bo *bo, uint32_t flags, struct drm_tegra_mapping **mapp); -int drm_tegra_channel_unmap(struct drm_tegra_mapping *map); - -int drm_tegra_job_new(struct drm_tegra_channel *channel, struct drm_tegra_job **jobp); -int drm_tegra_job_free(struct drm_tegra_job *job); - -int drm_tegra_job_get_pushbuf(struct drm_tegra_job *job, struct drm_tegra_pushbuf **pushbufp); -int drm_tegra_job_submit(struct drm_tegra_job *job, struct drm_tegra_fence *fence); - -int drm_tegra_job_wait(struct drm_tegra_job *job, unsigned long timeout); - -int drm_tegra_pushbuf_begin(struct drm_tegra_pushbuf *pushbuf, unsigned int words, uint32_t **ptrp); -int drm_tegra_pushbuf_end(struct drm_tegra_pushbuf *pushbuf, uint32_t *ptr); - -int drm_tegra_pushbuf_wait(struct drm_tegra_pushbuf *pushbuf, struct drm_tegra_syncpoint *syncpt, uint32_t value); - -int drm_tegra_pushbuf_relocate(struct drm_tegra_pushbuf *pushbuf, uint32_t **ptrp, struct drm_tegra_mapping *target, unsigned long offset, unsigned int shift, uint32_t flags); -int drm_tegra_pushbuf_sync(struct drm_tegra_pushbuf *pushbuf, struct drm_tegra_syncpoint *syncpt, unsigned int count); -int drm_tegra_pushbuf_sync_cond(struct drm_tegra_pushbuf *pushbuf, uint32_t **ptrp, struct drm_tegra_syncpoint *syncpt, enum drm_tegra_sync_cond cond); - -int drm_tegra_syncpoint_new(struct drm_tegra *drm, struct drm_tegra_syncpoint **syncptp); -int drm_tegra_syncpoint_free(struct drm_tegra_syncpoint *syncpt); -int drm_tegra_fence_wait(struct drm_tegra_fence *fence, unsigned long timeout); - -#endif diff --git a/project/3rdparty/include/libdrm/drm/drm_fourcc.h b/project/3rdparty/include/libdrm/drm_fourcc.h similarity index 100% rename from project/3rdparty/include/libdrm/drm/drm_fourcc.h rename to project/3rdparty/include/libdrm/drm_fourcc.h diff --git a/project/3rdparty/include/libdrm/drm/drm_mode.h b/project/3rdparty/include/libdrm/drm_mode.h similarity index 99% rename from project/3rdparty/include/libdrm/drm/drm_mode.h rename to project/3rdparty/include/libdrm/drm_mode.h index 037693bbf..efdf99cdf 100644 --- a/project/3rdparty/include/libdrm/drm/drm_mode.h +++ b/project/3rdparty/include/libdrm/drm_mode.h @@ -1,5 +1,5 @@ -#ifndef _DRM_MODE_H -#define _DRM_MODE_H +#ifndef LIBDRM_DRM_MODE_H +#define LIBDRM_DRM_MODE_H #include "drm.h" diff --git a/project/3rdparty/include/libdrm/libdrm.h b/project/3rdparty/include/libdrm/libdrm.h deleted file mode 100644 index 1a06889a8..000000000 --- a/project/3rdparty/include/libdrm/libdrm.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef LIBDRM_LIBDRM_H -#define LIBDRM_LIBDRM_H - -#if defined(__cplusplus) -extern "C" { -#endif - -int libdrm_modetest_main(int argc, char *argv[]); -int libdrm_modeprint_main(int argc, char *argv[]); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/project/3rdparty/include/libdrm/libdrm_lists.h b/project/3rdparty/include/libdrm/libdrm_lists.h index a28b48cec..018680d6f 100644 --- a/project/3rdparty/include/libdrm/libdrm_lists.h +++ b/project/3rdparty/include/libdrm/libdrm_lists.h @@ -1,5 +1,5 @@ -#ifndef _LIBDRM_LISTS_H_ -#define _LIBDRM_LISTS_H_ +#ifndef LIBDRM_LIBDRM_LISTS_H +#define LIBDRM_LIBDRM_LISTS_H #include @@ -9,7 +9,7 @@ typedef struct _drmMMListHead { } drmMMListHead; #define DRMINITLISTHEAD(__item) \ - do{ \ + do { \ (__item)->prev = (__item); \ (__item)->next = (__item); \ } while (0) diff --git a/project/3rdparty/include/libdrm/libdrm_macros.h b/project/3rdparty/include/libdrm/libdrm_macros.h index 10269d094..17c2956c3 100644 --- a/project/3rdparty/include/libdrm/libdrm_macros.h +++ b/project/3rdparty/include/libdrm/libdrm_macros.h @@ -6,7 +6,7 @@ #define STATIC_ASSERT(COND) \ do { \ - /*(void) sizeof(char [1 - 2*!(COND)]);*/ \ + /*(void) sizeof(char [1 - 2*!(COND)]);*/ \ } while (0) #include diff --git a/project/3rdparty/include/libdrm/libsync.h b/project/3rdparty/include/libdrm/libsync.h index 4d133635d..141e929e2 100644 --- a/project/3rdparty/include/libdrm/libsync.h +++ b/project/3rdparty/include/libdrm/libsync.h @@ -1,5 +1,5 @@ -#ifndef _LIBSYNC_H -#define _LIBSYNC_H +#ifndef LIBDRM_LIBSYNC_H +#define LIBDRM_LIBSYNC_H #include #include diff --git a/project/3rdparty/include/libdrm/util/buffer.h b/project/3rdparty/include/libdrm/util/buffer.h deleted file mode 100644 index 7d0760e4e..000000000 --- a/project/3rdparty/include/libdrm/util/buffer.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef LIBDRM_UTIL_BUFFER_H -#define LIBDRM_UTIL_BUFFER_H - -#include "pattern.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -struct bo; - -void bo_destroy(struct bo *bo); -struct bo *bo_create(int fd, unsigned int format, unsigned int width, unsigned int height, unsigned int handles[4], unsigned int pitches[4], unsigned int offsets[4], enum util_fill_pattern pattern); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/project/3rdparty/include/libdrm/util/common.h b/project/3rdparty/include/libdrm/util/common.h deleted file mode 100644 index 2128b6637..000000000 --- a/project/3rdparty/include/libdrm/util/common.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef LIBDRM_UTIL_COMMON_H -#define LIBDRM_UTIL_COMMON_H - -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) -#endif - -#endif diff --git a/project/3rdparty/include/libdrm/util/cursor.h b/project/3rdparty/include/libdrm/util/cursor.h deleted file mode 100644 index 73c9aee48..000000000 --- a/project/3rdparty/include/libdrm/util/cursor.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef LIBDRM_UTIL_CURSOR_H -#define LIBDRM_UTIL_CURSOR_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -int cursor_stop(void); -int cursor_start(void); -int cursor_init(int fd, uint32_t bo_handle, uint32_t crtc_id, uint32_t crtc_w, uint32_t crtc_h, uint32_t w, uint32_t h); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/project/3rdparty/include/libdrm/util/format.h b/project/3rdparty/include/libdrm/util/format.h deleted file mode 100644 index 1200bba4e..000000000 --- a/project/3rdparty/include/libdrm/util/format.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef LIBDRM_UTIL_FORMAT_H -#define LIBDRM_UTIL_FORMAT_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct util_color_component { - unsigned int length; - unsigned int offset; -}; - -struct util_rgb_info { - struct util_color_component red; - struct util_color_component green; - struct util_color_component blue; - struct util_color_component alpha; -}; - -enum util_yuv_order { - YUV_YCbCr = 1, - YUV_YCrCb = 2, - YUV_YC = 4, - YUV_CY = 8, -}; - -struct util_yuv_info { - enum util_yuv_order order; - unsigned int xsub; - unsigned int ysub; - unsigned int chroma_stride; -}; - -struct util_format_info { - uint32_t format; - const char *name; - const struct util_rgb_info rgb; - const struct util_yuv_info yuv; -}; - -uint32_t util_format_fourcc(const char *name); -const struct util_format_info *util_format_info_find(uint32_t format); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/project/3rdparty/include/libdrm/util/kms.h b/project/3rdparty/include/libdrm/util/kms.h deleted file mode 100644 index 9f92ad1d2..000000000 --- a/project/3rdparty/include/libdrm/util/kms.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef LIBDRM_UTIL_KMS_H -#define LIBDRM_UTIL_KMS_H - -#if defined(__cplusplus) -extern "C" { -#endif - -int util_open(const char *device, const char *module); - -const char *util_lookup_encoder_type_name(unsigned int type); -const char *util_lookup_connector_status_name(unsigned int type); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/project/3rdparty/include/libdrm/util/pattern.h b/project/3rdparty/include/libdrm/util/pattern.h deleted file mode 100644 index 3ad1a8ae4..000000000 --- a/project/3rdparty/include/libdrm/util/pattern.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef LIBDRM_UTIL_PATTERN_H -#define LIBDRM_UTIL_PATTERN_H - -#include "../drm/drm_mode.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -enum util_fill_pattern { - UTIL_PATTERN_TILES, - UTIL_PATTERN_PLAIN, - UTIL_PATTERN_SMPTE, - UTIL_PATTERN_GRADIENT, -}; - -enum util_fill_pattern util_pattern_enum(const char *name); -void util_smpte_c8_gamma(unsigned size, struct drm_color_lut *lut); - -void util_fill_pattern(uint32_t format, enum util_fill_pattern pattern, void *planes[3], unsigned int width, unsigned int height, unsigned int stride); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/project/3rdparty/include/libdrm/util_double_list.h b/project/3rdparty/include/libdrm/util_double_list.h index e1592636f..d62df8854 100644 --- a/project/3rdparty/include/libdrm/util_double_list.h +++ b/project/3rdparty/include/libdrm/util_double_list.h @@ -1,5 +1,5 @@ -#ifndef _U_DOUBLE_LIST_H_ -#define _U_DOUBLE_LIST_H_ +#ifndef LIBDRM_U_DOUBLE_LIST_H +#define LIBDRM_U_DOUBLE_LIST_H #include diff --git a/project/3rdparty/include/libdrm/util_math.h b/project/3rdparty/include/libdrm/util_math.h index 45b08821c..8ae3dd4ad 100644 --- a/project/3rdparty/include/libdrm/util_math.h +++ b/project/3rdparty/include/libdrm/util_math.h @@ -1,5 +1,5 @@ -#ifndef _UTIL_MATH_H_ -#define _UTIL_MATH_H_ +#ifndef LIBDRM_UTIL_MATH_H +#define LIBDRM_UTIL_MATH_H #define MIN2(A, B) ((A)<(B) ? (A) : (B)) #define MAX2(A, B) ((A)>(B) ? (A) : (B)) diff --git a/project/3rdparty/include/libdrm/xf86drm.h b/project/3rdparty/include/libdrm/xf86drm.h index d043fecf6..864b31b48 100644 --- a/project/3rdparty/include/libdrm/xf86drm.h +++ b/project/3rdparty/include/libdrm/xf86drm.h @@ -1,11 +1,11 @@ -#ifndef _XF86DRM_H_ -#define _XF86DRM_H_ +#ifndef LIBDRM_XF86DRM_H +#define LIBDRM_XF86DRM_H #include #include #include -#include "drm/drm.h" +#include "drm.h" #if defined(__cplusplus) extern "C" { diff --git a/project/3rdparty/include/libdrm/xf86drmMode.h b/project/3rdparty/include/libdrm/xf86drmMode.h index 9e033455a..2654bb380 100644 --- a/project/3rdparty/include/libdrm/xf86drmMode.h +++ b/project/3rdparty/include/libdrm/xf86drmMode.h @@ -1,12 +1,12 @@ -#ifndef _XF86DRMMODE_H_ -#define _XF86DRMMODE_H_ +#ifndef LIBDRM_XF86DRMMODE_H +#define LIBDRM_XF86DRMMODE_H #if defined(__cplusplus) extern "C" { #endif -#include "drm/drm.h" -#include "drm/drm_mode.h" +#include "drm.h" +#include "drm_mode.h" #include #include diff --git a/project/3rdparty/include/libv4l/get_media_devices.h b/project/3rdparty/include/libv4l/get_media_devices.h deleted file mode 100644 index 9351191a4..000000000 --- a/project/3rdparty/include/libv4l/get_media_devices.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef LIBV4L_GET_MEDIA_DEVICES_H -#define LIBV4L_GET_MEDIA_DEVICES_H - -#define GET_MEDIA_DEVICES_VERSION 0x0105 - -enum device_type { - UNKNOWN = 65535, - NONE = 65534, - MEDIA_V4L_VIDEO = 0, - MEDIA_V4L_VBI, - MEDIA_V4L_RADIO, - MEDIA_V4L_SWRADIO, - MEDIA_V4L_TOUCH, - MEDIA_V4L_SUBDEV, - - MEDIA_DVB_VIDEO = 100, - MEDIA_DVB_AUDIO, - MEDIA_DVB_SEC, - MEDIA_DVB_FRONTEND, - MEDIA_DVB_DEMUX, - MEDIA_DVB_DVR, - MEDIA_DVB_CA, - MEDIA_DVB_NET, - MEDIA_DVB_OSD, - - MEDIA_SND_CARD = 200, - MEDIA_SND_CAP, - MEDIA_SND_OUT, - MEDIA_SND_CONTROL, - MEDIA_SND_HW, - MEDIA_SND_TIMER, - MEDIA_SND_SEQ, -}; - -enum bus_type { - MEDIA_BUS_UNKNOWN, - MEDIA_BUS_VIRTUAL, - MEDIA_BUS_PCI, - MEDIA_BUS_USB, -}; - -void *discover_media_devices(void); -void free_media_devices(void *opaque); - -const char *media_device_type(const enum device_type type); -void display_media_devices(void *opaque); - -const char *get_associated_device(void *opaque, const char *last_seek, const enum device_type desired_type, const char *seek_device, const enum device_type seek_type); -const char *fget_associated_device(void *opaque, const char *last_seek, const enum device_type desired_type, const int fd_seek_device, const enum device_type seek_type); - -const char *get_not_associated_device(void *opaque, const char *last_seek, const enum device_type desired_type, const enum device_type not_desired_type); - -#endif diff --git a/project/3rdparty/include/libv4l/libv4l-plugin.h b/project/3rdparty/include/libv4l/libv4l-plugin.h deleted file mode 100644 index ccd441e45..000000000 --- a/project/3rdparty/include/libv4l/libv4l-plugin.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef LIBV4L_LIBV4L_PLUGIN_H -#define LIBV4L_LIBV4L_PLUGIN_H - -#include - -struct libv4l_dev_ops { - void * (*init)(int fd); - void (*close)(void *dev_ops_priv); - - int (*ioctl)(void *dev_ops_priv, int fd, unsigned long int request, void *arg); - - ssize_t (*read)(void *dev_ops_priv, int fd, void *buffer, size_t n); - ssize_t (*write)(void *dev_ops_priv, int fd, const void *buffer, size_t n); - - void *(*mmap)(void *dev_ops_priv, void *start, size_t length, int prot, int flags, int fd, int64_t offset); - - void (*reserved1)(void); - void (*reserved2)(void); - void (*reserved3)(void); - void (*reserved4)(void); - void (*reserved5)(void); - void (*reserved6)(void); - void (*reserved7)(void); -}; - -#endif diff --git a/project/3rdparty/include/libv4l/libv4l1-videodev.h b/project/3rdparty/include/libv4l/libv4l1-videodev.h deleted file mode 100644 index c1dd57080..000000000 --- a/project/3rdparty/include/libv4l/libv4l1-videodev.h +++ /dev/null @@ -1,188 +0,0 @@ -#ifndef LIBV4L_LIBV4L_VIDEODEV_H -#define LIBV4L_LIBV4L_VIDEODEV_H - -#include -#include - -#define VID_TYPE_CAPTURE 1 /* Can capture */ -#define VID_TYPE_TUNER 2 /* Can tune */ -#define VID_TYPE_TELETEXT 4 /* Does teletext */ -#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ -#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ -#define VID_TYPE_CLIPPING 32 /* Can clip */ -#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ -#define VID_TYPE_SCALES 128 /* Scalable */ -#define VID_TYPE_MONOCHROME 256 /* Monochrome only */ -#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ -#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ -#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ -#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ -#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ - -struct video_capability { - char name[32]; - int type; - int channels; /* Num channels */ - int audios; /* Num audio devices */ - int maxwidth; /* Supported width */ - int maxheight; /* And height */ - int minwidth; /* Supported width */ - int minheight; /* And height */ -}; - -struct video_channel { - int channel; - char name[32]; - int tuners; - uint32_t flags; -#define VIDEO_VC_TUNER 1 /* Channel has a tuner */ -#define VIDEO_VC_AUDIO 2 /* Channel has audio */ - uint16_t type; -#define VIDEO_TYPE_TV 1 -#define VIDEO_TYPE_CAMERA 2 - uint16_t norm; /* Norm set by channel */ -}; - -struct video_tuner { - int tuner; - char name[32]; - unsigned long rangelow, rangehigh; /* Tuner range */ - uint32_t flags; -#define VIDEO_TUNER_PAL 1 -#define VIDEO_TUNER_NTSC 2 -#define VIDEO_TUNER_SECAM 4 -#define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */ -#define VIDEO_TUNER_NORM 16 /* Tuner can set norm */ -#define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */ -#define VIDEO_TUNER_RDS_ON 256 /* Tuner is seeing an RDS datastream */ -#define VIDEO_TUNER_MBS_ON 512 /* Tuner is seeing an MBS datastream */ - uint16_t mode; /* PAL/NTSC/SECAM/OTHER */ -#define VIDEO_MODE_PAL 0 -#define VIDEO_MODE_NTSC 1 -#define VIDEO_MODE_SECAM 2 -#define VIDEO_MODE_AUTO 3 - uint16_t signal; /* Signal strength 16bit scale */ -}; - -struct video_picture { - uint16_t brightness; - uint16_t hue; - uint16_t colour; - uint16_t contrast; - uint16_t whiteness; /* Black and white only */ - uint16_t depth; /* Capture depth */ - uint16_t palette; /* Palette in use */ -#define VIDEO_PALETTE_GREY 1 /* Linear greyscale */ -#define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */ -#define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */ -#define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */ -#define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */ -#define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */ -#define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */ -#define VIDEO_PALETTE_YUYV 8 -#define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */ -#define VIDEO_PALETTE_YUV420 10 -#define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */ -#define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */ -#define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */ -#define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */ -#define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */ -#define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */ -#define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */ -#define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */ -}; - -struct video_audio { - int audio; /* Audio channel */ - uint16_t volume; /* If settable */ - uint16_t bass, treble; - uint32_t flags; -#define VIDEO_AUDIO_MUTE 1 -#define VIDEO_AUDIO_MUTABLE 2 -#define VIDEO_AUDIO_VOLUME 4 -#define VIDEO_AUDIO_BASS 8 -#define VIDEO_AUDIO_TREBLE 16 -#define VIDEO_AUDIO_BALANCE 32 - char name[16]; -#define VIDEO_SOUND_MONO 1 -#define VIDEO_SOUND_STEREO 2 -#define VIDEO_SOUND_LANG1 4 -#define VIDEO_SOUND_LANG2 8 - uint16_t mode; - uint16_t balance; /* Stereo balance */ - uint16_t step; /* Step actual volume uses */ -}; - -struct video_clip { - int32_t x, y; - int32_t width, height; - struct video_clip *next; /* For user use/driver use only */ -}; - -struct video_window { - uint32_t x, y; /* Position of window */ - uint32_t width, height; /* Its size */ - uint32_t chromakey; - uint32_t flags; - struct video_clip *clips; /* Set only */ - int clipcount; -#define VIDEO_WINDOW_INTERLACE 1 -#define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */ -#define VIDEO_CLIP_BITMAP -1 -/* bitmap is 1024x625, a '1' bit represents a clipped pixel */ -#define VIDEO_CLIPMAP_SIZE (128 * 625) -}; - -struct video_buffer { - void *base; - int height,width; - int depth; - int bytesperline; -}; - -struct video_mmap { - unsigned int frame; /* Frame (0 - n) for double buffer */ - int height,width; - unsigned int format; /* should be VIDEO_PALETTE_* */ -}; - -struct video_mbuf { - int size; /* Total memory to map */ - int frames; /* Frames */ - int offsets[32]; -}; - -struct vbi_format { - uint32_t sampling_rate; /* in Hz */ - uint32_t samples_per_line; - uint32_t sample_format; /* VIDEO_PALETTE_RAW only (1 byte) */ - int32_t start[2]; /* starting line for each frame */ - uint32_t count[2]; /* count of lines for each frame */ - uint32_t flags; -#define VBI_UNSYNC 1 /* can distingues between top/bottom field */ -#define VBI_INTERLACED 2 /* lines are interlaced */ -}; - -#define VIDIOCGCAP _IOR('v', 1, struct video_capability) /* Get capabilities */ -#define VIDIOCGCHAN _IOWR('v', 2, struct video_channel) /* Get channel info (sources) */ -#define VIDIOCSCHAN _IOW('v', 3, struct video_channel) /* Set channel */ -#define VIDIOCGTUNER _IOWR('v',4, struct video_tuner) /* Get tuner abilities */ -#define VIDIOCSTUNER _IOW('v', 5, struct video_tuner) /* Tune the tuner for the current channel */ -#define VIDIOCGPICT _IOR('v', 6, struct video_picture) /* Get picture properties */ -#define VIDIOCSPICT _IOW('v', 7, struct video_picture) /* Set picture properties */ -#define VIDIOCCAPTURE _IOW('v', 8, int) /* Start, end capture */ -#define VIDIOCGWIN _IOR('v', 9, struct video_window) /* Get the video overlay window */ -#define VIDIOCSWIN _IOW('v', 10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */ -#define VIDIOCGFBUF _IOR('v', 11, struct video_buffer) /* Get frame buffer */ -#define VIDIOCSFBUF _IOW('v', 12, struct video_buffer) /* Set frame buffer - root only */ -#define VIDIOCGFREQ _IOR('v', 14, unsigned long) /* Set tuner */ -#define VIDIOCSFREQ _IOW('v', 15, unsigned long) /* Set tuner */ -#define VIDIOCGAUDIO _IOR('v', 16, struct video_audio) /* Get audio info */ -#define VIDIOCSAUDIO _IOW('v', 17, struct video_audio) /* Audio source, mute etc */ -#define VIDIOCSYNC _IOW('v', 18, int) /* Sync with mmap grabbing */ -#define VIDIOCMCAPTURE _IOW('v', 19, struct video_mmap) /* Grab frames */ -#define VIDIOCGMBUF _IOR('v', 20, struct video_mbuf) /* Memory map buffer info */ -#define VIDIOCGVBIFMT _IOR('v', 28, struct vbi_format) /* Get VBI information */ -#define VIDIOCSVBIFMT _IOW('v', 29, struct vbi_format) /* Set VBI information */ - -#endif diff --git a/project/3rdparty/include/libv4l/libv4l1.h b/project/3rdparty/include/libv4l/libv4l1.h deleted file mode 100644 index 2053a6c7f..000000000 --- a/project/3rdparty/include/libv4l/libv4l1.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef LIBV4L_LIBV4L1_H -#define LIBV4L_LIBV4L1_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#include "libv4l1-videodev.h" - -#if HAVE_VISIBILITY -#define LIBV4L_PUBLIC __attribute__ ((visibility("default"))) -#else -#define LIBV4L_PUBLIC -#endif - -LIBV4L_PUBLIC extern FILE *v4l1_log_file; - -LIBV4L_PUBLIC int v4l1_open(const char *file, int oflag, ...); -LIBV4L_PUBLIC int v4l1_close(int fd); - -LIBV4L_PUBLIC int v4l1_dup(int fd); -LIBV4L_PUBLIC int v4l1_ioctl(int fd, unsigned long int request, ...); - -LIBV4L_PUBLIC ssize_t v4l1_read(int fd, void *buffer, size_t n); - -LIBV4L_PUBLIC void *v4l1_mmap(void *start, size_t length, int prot, int flags, int fd, int64_t offset); -LIBV4L_PUBLIC int v4l1_munmap(void *_start, size_t length); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/project/3rdparty/include/libv4l/libv4l2.h b/project/3rdparty/include/libv4l/libv4l2.h deleted file mode 100644 index 47b27b2c1..000000000 --- a/project/3rdparty/include/libv4l/libv4l2.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef LIBV4L_LIBV4L2_H -#define LIBV4L_LIBV4L2_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#if HAVE_VISIBILITY -#define LIBV4L_PUBLIC __attribute__ ((visibility("default"))) -#else -#define LIBV4L_PUBLIC -#endif - -#define V4L2_DISABLE_CONVERSION 0x01 -#define V4L2_ENABLE_ENUM_FMT_EMULATION 0x02 - -LIBV4L_PUBLIC extern FILE *v4l2_log_file; - -LIBV4L_PUBLIC int v4l2_open(const char *file, int oflag, ...); -LIBV4L_PUBLIC int v4l2_close(int fd); - -LIBV4L_PUBLIC int v4l2_dup(int fd); -LIBV4L_PUBLIC int v4l2_ioctl(int fd, unsigned long int request, ...); - -LIBV4L_PUBLIC ssize_t v4l2_read(int fd, void *buffer, size_t n); -LIBV4L_PUBLIC ssize_t v4l2_write(int fd, const void *buffer, size_t n); - -LIBV4L_PUBLIC void *v4l2_mmap(void *start, size_t length, int prot, int flags, int fd, int64_t offset); -LIBV4L_PUBLIC int v4l2_munmap(void *_start, size_t length); - -LIBV4L_PUBLIC int v4l2_set_control(int fd, int cid, int value); -LIBV4L_PUBLIC int v4l2_get_control(int fd, int cid); - -LIBV4L_PUBLIC int v4l2_fd_open(int fd, int v4l2_flags); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/project/3rdparty/include/libv4l/libv4l2rds.h b/project/3rdparty/include/libv4l/libv4l2rds.h deleted file mode 100644 index f13b5a90f..000000000 --- a/project/3rdparty/include/libv4l/libv4l2rds.h +++ /dev/null @@ -1,220 +0,0 @@ -#ifndef LIBV4L_LIBV4L2RDS -#define LIBV4L_LIBV4L2RDS - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#if HAVE_VISIBILITY -#define LIBV4L_PUBLIC __attribute__ ((visibility("default"))) -#else -#define LIBV4L_PUBLIC -#endif - -#define V4L2_RDS_VERSION (2) - -#define MAX_ODA_CNT 18 -#define MAX_AF_CNT 25 -#define MAX_TMC_ADDITIONAL 28 -#define MAX_TMC_ALT_STATIONS 32 -#define MAX_TMC_AF_CNT 4 -#define MAX_EON_CNT 20 - -#define V4L2_RDS_PI 0x01 /* Program Identification */ -#define V4L2_RDS_PTY 0x02 /* Program Type */ -#define V4L2_RDS_TP 0x04 /* Traffic Program */ -#define V4L2_RDS_PS 0x08 /* Program Service Name */ -#define V4L2_RDS_TA 0x10 /* Traffic Announcement */ -#define V4L2_RDS_DI 0x20 /* Decoder Information */ -#define V4L2_RDS_MS 0x40 /* Music / Speech flag */ -#define V4L2_RDS_PTYN 0x80 /* Program Type Name */ -#define V4L2_RDS_RT 0x100 /* Radio-Text */ -#define V4L2_RDS_TIME 0x200 /* Date and Time information */ -#define V4L2_RDS_TMC 0x400 /* TMC availability */ -#define V4L2_RDS_AF 0x800 /* AF (alternative freq) available */ -#define V4L2_RDS_ECC 0x1000 /* Extended County Code */ -#define V4L2_RDS_LC 0x2000 /* Language Code */ -#define V4L2_RDS_TMC_SG 0x4000 /* RDS-TMC single group */ -#define V4L2_RDS_TMC_MG 0x8000 /* RDS-TMC multi group */ -#define V4L2_RDS_TMC_SYS 0x10000 /* RDS-TMC system information */ -#define V4L2_RDS_EON 0x20000 /* Enhanced Other Network Info */ -#define V4L2_RDS_LSF 0x40000 /* Linkage information */ -#define V4L2_RDS_TMC_TUNING 0x80000 /* RDS-TMC tuning information */ - -#define V4L2_RDS_GROUP_NEW 0x01 /* New group received */ -#define V4L2_RDS_ODA 0x02 /* Open Data Group announced */ - -#define V4L2_RDS_FLAG_STEREO 0x01 -#define V4L2_RDS_FLAG_ARTIFICIAL_HEAD 0x02 -#define V4L2_RDS_FLAG_COMPRESSED 0x04 -#define V4L2_RDS_FLAG_DYNAMIC_PTY 0x08 - -#define V4L2_TMC_TUNING_INFO 0x10 /* Bit 4 indicates Tuning Info / User msg */ -#define V4L2_TMC_SINGLE_GROUP 0x08 /* Bit 3 indicates Single / Multi-group msg */ - -struct v4l2_rds_group { - uint16_t pi; /* Program Identification */ - char group_version; /* group version ('A' / 'B') */ - uint8_t group_id; /* group number (0..16) */ - - uint8_t data_b_lsb; - uint8_t data_c_msb; - uint8_t data_c_lsb; - uint8_t data_d_msb; - uint8_t data_d_lsb; -}; - -struct v4l2_rds_statistics { - uint32_t block_cnt; /* total amount of received blocks */ - uint32_t group_cnt; /* total amount of successfully decoded groups */ - uint32_t block_error_cnt; /* blocks that were marked as erroneous and had to be dropped */ - uint32_t group_error_cnt; /* group decoding processes that had to be aborted because of erroneous blocks or wrong order of blocks */ - uint32_t block_corrected_cnt; /* blocks that contained 1-bit errors which were corrected */ - uint32_t group_type_cnt[16]; /* number of occurrence for each defined RDS group */ -}; - -struct v4l2_rds_oda { - uint8_t group_id; /* RDS group used to broadcast this ODA */ - char group_version; /* group version (A / B) for this ODA */ - uint16_t aid; /* Application Identification for this ODA, AIDs are centrally administered by the RDS Registration Office (rds.org.uk) */ -}; - -struct v4l2_rds_oda_set { - uint8_t size; /* number of ODAs defined by this channel */ - struct v4l2_rds_oda oda[MAX_ODA_CNT]; -}; - -struct v4l2_rds_af_set { - uint8_t size; /* size of the set (might be smaller than the announced size) */ - uint8_t announced_af; /* number of announced AF */ - uint32_t af[MAX_AF_CNT]; /* AFs defined in Hz */ -}; - -struct v4l2_rds_eon { - uint32_t valid_fields; - uint16_t pi; - uint8_t ps[9]; - uint8_t pty; - bool ta; - bool tp; - uint16_t lsf; /* Linkage Set Number */ - struct v4l2_rds_af_set af; -}; - -struct v4l2_rds_eon_set { - uint8_t size; /* size of the table */ - uint8_t index; /* current position in the table */ - struct v4l2_rds_eon eon[MAX_EON_CNT]; /* Information about other radio channels */ -}; - -struct v4l2_tmc_alt_freq { - uint8_t af_size; /* number of known AFs */ - uint8_t af_index; - uint8_t mapped_af_size; /* number of mapped AFs */ - uint8_t mapped_af_index; - uint32_t af[MAX_TMC_AF_CNT]; /* AFs defined in Hz */ - uint32_t mapped_af[MAX_TMC_AF_CNT]; /* mapped AFs defined in Hz */ - uint32_t mapped_af_tuning[MAX_TMC_AF_CNT]; /* mapped AFs defined in Hz */ -}; - -struct v4l2_tmc_station { - uint16_t pi; - uint8_t ltn; /* database-ID of ON */ - uint8_t msg; /* msg parameters of ON */ - uint8_t sid; /* service-ID of ON */ - struct v4l2_tmc_alt_freq afi; -}; - -struct v4l2_tmc_tuning { - uint8_t station_cnt; /* number of announced alternative stations */ - uint8_t index; - struct v4l2_tmc_station station[MAX_TMC_ALT_STATIONS]; -}; - -struct v4l2_tmc_additional { - uint8_t label; - uint16_t data; -}; - -struct v4l2_tmc_additional_set { - uint8_t size; - struct v4l2_tmc_additional fields[MAX_TMC_ADDITIONAL]; -}; - -struct v4l2_rds_tmc_msg { - uint8_t length; /* length of multi-group message (0..4) */ - uint8_t sid; /* service identifier at time of reception */ - uint8_t extent; - uint8_t dp; /* duration and persistence */ - uint16_t event; /* TMC event code */ - uint16_t location; /* TMC event location */ - bool follow_diversion;/* indicates if the driver is adviced to follow the diversion */ - bool neg_direction; /* indicates negative / positive direction */ - struct v4l2_tmc_additional_set additional; -}; - -struct v4l2_rds_tmc { - uint8_t ltn; /* location_table_number */ - bool afi; /* alternative frequency indicator */ - bool enhanced_mode; - uint8_t mgs; /* message geographical scope */ - uint8_t sid; /* service identifier (unique ID on national level) */ - uint8_t gap; /* Gap parameters */ - uint8_t t_a; /* activity time (only if mode = enhanced) */ - uint8_t t_w; /* window time (only if mode = enhanced */ - uint8_t t_d; /* delay time (only if mode = enhanced */ - uint8_t spn[9]; /* service provider name */ - struct v4l2_rds_tmc_msg tmc_msg; - struct v4l2_tmc_tuning tuning; -}; - -struct v4l2_rds { - uint32_t decode_information; /* state of decoding process */ - uint32_t valid_fields; /* currently valid info fields of this structure */ - - bool is_rbds; /* use RBDS standard version of LUTs */ - uint16_t pi; /* Program Identification */ - uint8_t ps[9]; /* Program Service Name, UTF-8 encoding, '\0' terminated */ - uint8_t pty; /* Program Type */ - uint8_t ptyn[9]; /* Program Type Name, UTF-8 encoding, '\0' terminated */ - bool ptyn_ab_flag; /* PTYN A/B flag (toggled), to signal change of PTYN */ - uint8_t rt_length; /* length of RT string */ - uint8_t rt[65]; /* Radio-Text string, UTF-8 encoding, '\0' terminated */ - bool rt_ab_flag; /* RT A/B flag (toggled), to signal transmission of new RT */ - bool ta; /* Traffic Announcement */ - bool tp; /* Traffic Program */ - bool ms; /* Music / Speech flag */ - uint8_t di; /* Decoder Information */ - uint8_t ecc; /* Extended Country Code */ - uint8_t lc; /* Language Code */ - time_t time; /* local time and date of transmission */ - - struct v4l2_rds_statistics rds_statistics; - struct v4l2_rds_oda_set rds_oda; /* Open Data Services */ - struct v4l2_rds_af_set rds_af; /* Alternative Frequencies */ - struct v4l2_rds_eon_set rds_eon; /* EON information */ - struct v4l2_rds_tmc tmc; /* TMC information */ -}; - -LIBV4L_PUBLIC struct v4l2_rds *v4l2_rds_create(bool is_rbds); -LIBV4L_PUBLIC void v4l2_rds_destroy(struct v4l2_rds *handle); - -LIBV4L_PUBLIC void v4l2_rds_reset(struct v4l2_rds *handle, bool reset_statistics); -LIBV4L_PUBLIC uint32_t v4l2_rds_add(struct v4l2_rds *handle, struct v4l2_rds_data *rds_data); - -LIBV4L_PUBLIC const char *v4l2_rds_get_pty_str(const struct v4l2_rds *handle); -LIBV4L_PUBLIC const char *v4l2_rds_get_language_str(const struct v4l2_rds *handle); -LIBV4L_PUBLIC const char *v4l2_rds_get_country_str(const struct v4l2_rds *handle); -LIBV4L_PUBLIC const char *v4l2_rds_get_coverage_str(const struct v4l2_rds *handle); - -LIBV4L_PUBLIC const struct v4l2_rds_group *v4l2_rds_get_group(const struct v4l2_rds *handle); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/project/3rdparty/include/libv4l/libv4l2util.h b/project/3rdparty/include/libv4l/libv4l2util.h deleted file mode 100644 index 968f9936f..000000000 --- a/project/3rdparty/include/libv4l/libv4l2util.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef LIBV4L_V4L2UTIL_H -#define LIBV4L_V4L2UTIL_H - -struct v4l2_channel_list { - const char *const name; - unsigned freq; -}; - -struct v4l2_channel_lists { - const char *const name; - const struct v4l2_channel_list *const list; - unsigned count; -}; - -struct v4l2_country_std_map { - const char *const iso_code; - v4l2_std_id std; -}; - -extern const struct v4l2_channel_lists v4l2_channel_lists[]; -extern const struct v4l2_country_std_map v4l2_country_std_map[]; - -#endif diff --git a/project/3rdparty/include/libv4l/libv4lconvert.h b/project/3rdparty/include/libv4l/libv4lconvert.h deleted file mode 100644 index 7e7d34851..000000000 --- a/project/3rdparty/include/libv4l/libv4lconvert.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef LIBV4L_LIBV4LCONVERT_H -#define LIBV4L_LIBV4LCONVERT_H - -#include -#include -#include - -#include "videodev2.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if HAVE_VISIBILITY -#ifndef LIBV4L_PUBLIC -#define LIBV4L_PUBLIC __attribute__ ((visibility("default"))) -#endif -#else -#ifndef LIBV4L_PUBLIC -#define LIBV4L_PUBLIC -#endif -#endif - -struct libv4l_dev_ops; -struct v4lconvert_data; - -LIBV4L_PUBLIC const struct libv4l_dev_ops *v4lconvert_get_default_dev_ops(); - -LIBV4L_PUBLIC struct v4lconvert_data *v4lconvert_create(int fd); -LIBV4L_PUBLIC struct v4lconvert_data *v4lconvert_create_with_dev_ops(int fd, void *dev_ops_priv, const struct libv4l_dev_ops *dev_ops); -LIBV4L_PUBLIC void v4lconvert_destroy(struct v4lconvert_data *data); - -LIBV4L_PUBLIC int v4lconvert_supported_dst_fmt_only(struct v4lconvert_data *data); - -LIBV4L_PUBLIC int v4lconvert_try_format(struct v4lconvert_data *data, struct v4l2_format *dest_fmt, struct v4l2_format *src_fmt); -LIBV4L_PUBLIC int v4lconvert_enum_fmt(struct v4lconvert_data *data, struct v4l2_fmtdesc *fmt); - -LIBV4L_PUBLIC int v4lconvert_needs_conversion(struct v4lconvert_data *data, const struct v4l2_format *src_fmt, const struct v4l2_format *dest_fmt); - -LIBV4L_PUBLIC int v4lconvert_convert(struct v4lconvert_data *data, const struct v4l2_format *src_fmt, const struct v4l2_format *dest_fmt, unsigned char *src, int src_size, unsigned char *dest, int dest_size); - -LIBV4L_PUBLIC const char *v4lconvert_get_error_message(struct v4lconvert_data *data); - -LIBV4L_PUBLIC int v4lconvert_enum_framesizes(struct v4lconvert_data *data, struct v4l2_frmsizeenum *frmsize); -LIBV4L_PUBLIC int v4lconvert_enum_frameintervals(struct v4lconvert_data *data, struct v4l2_frmivalenum *frmival); - -LIBV4L_PUBLIC int v4lconvert_vidioc_queryctrl(struct v4lconvert_data *data, void *arg); -LIBV4L_PUBLIC int v4lconvert_vidioc_g_ctrl(struct v4lconvert_data *data, void *arg); -LIBV4L_PUBLIC int v4lconvert_vidioc_s_ctrl(struct v4lconvert_data *data, void *arg); -LIBV4L_PUBLIC int v4lconvert_vidioc_g_ext_ctrls(struct v4lconvert_data *data, void *arg); -LIBV4L_PUBLIC int v4lconvert_vidioc_try_ext_ctrls(struct v4lconvert_data *data, void *arg); -LIBV4L_PUBLIC int v4lconvert_vidioc_s_ext_ctrls(struct v4lconvert_data *data, void *arg); - -LIBV4L_PUBLIC int v4lconvert_supported_dst_format(unsigned int pixelformat); - -LIBV4L_PUBLIC int v4lconvert_get_fps(struct v4lconvert_data *data); -LIBV4L_PUBLIC void v4lconvert_set_fps(struct v4lconvert_data *data, int fps); - -LIBV4L_PUBLIC void v4lconvert_fixup_fmt(struct v4l2_format *fmt); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/project/3rdparty/include/libv4l/media-bus-format.h b/project/3rdparty/include/libv4l/media-bus-format.h deleted file mode 100644 index 06053af19..000000000 --- a/project/3rdparty/include/libv4l/media-bus-format.h +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef LIBV4L_LINUX_MEDIA_BUS_FORMAT_H -#define LIBV4L_LINUX_MEDIA_BUS_FORMAT_H - -#define MEDIA_BUS_FMT_FIXED 0x0001 - -#define MEDIA_BUS_FMT_RGB444_1X12 0x1016 -#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001 -#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002 -#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1003 -#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1004 -#define MEDIA_BUS_FMT_RGB565_1X16 0x1017 -#define MEDIA_BUS_FMT_BGR565_2X8_BE 0x1005 -#define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006 -#define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007 -#define MEDIA_BUS_FMT_RGB565_2X8_LE 0x1008 -#define MEDIA_BUS_FMT_RGB666_1X18 0x1009 -#define MEDIA_BUS_FMT_RBG888_1X24 0x100e -#define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015 -#define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG 0x1010 -#define MEDIA_BUS_FMT_BGR888_1X24 0x1013 -#define MEDIA_BUS_FMT_BGR888_3X8 0x101b -#define MEDIA_BUS_FMT_GBR888_1X24 0x1014 -#define MEDIA_BUS_FMT_RGB888_1X24 0x100a -#define MEDIA_BUS_FMT_RGB888_2X12_BE 0x100b -#define MEDIA_BUS_FMT_RGB888_2X12_LE 0x100c -#define MEDIA_BUS_FMT_RGB888_3X8 0x101c -#define MEDIA_BUS_FMT_RGB888_3X8_DELTA 0x101d -#define MEDIA_BUS_FMT_RGB888_1X7X4_SPWG 0x1011 -#define MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA 0x1012 -#define MEDIA_BUS_FMT_RGB666_1X30_CPADLO 0x101e -#define MEDIA_BUS_FMT_RGB888_1X30_CPADLO 0x101f -#define MEDIA_BUS_FMT_ARGB8888_1X32 0x100d -#define MEDIA_BUS_FMT_RGB888_1X32_PADHI 0x100f -#define MEDIA_BUS_FMT_RGB101010_1X30 0x1018 -#define MEDIA_BUS_FMT_RGB666_1X36_CPADLO 0x1020 -#define MEDIA_BUS_FMT_RGB888_1X36_CPADLO 0x1021 -#define MEDIA_BUS_FMT_RGB121212_1X36 0x1019 -#define MEDIA_BUS_FMT_RGB161616_1X48 0x101a - -#define MEDIA_BUS_FMT_Y8_1X8 0x2001 -#define MEDIA_BUS_FMT_UV8_1X8 0x2015 -#define MEDIA_BUS_FMT_UYVY8_1_5X8 0x2002 -#define MEDIA_BUS_FMT_VYUY8_1_5X8 0x2003 -#define MEDIA_BUS_FMT_YUYV8_1_5X8 0x2004 -#define MEDIA_BUS_FMT_YVYU8_1_5X8 0x2005 -#define MEDIA_BUS_FMT_UYVY8_2X8 0x2006 -#define MEDIA_BUS_FMT_VYUY8_2X8 0x2007 -#define MEDIA_BUS_FMT_YUYV8_2X8 0x2008 -#define MEDIA_BUS_FMT_YVYU8_2X8 0x2009 -#define MEDIA_BUS_FMT_Y10_1X10 0x200a -#define MEDIA_BUS_FMT_Y10_2X8_PADHI_LE 0x202c -#define MEDIA_BUS_FMT_UYVY10_2X10 0x2018 -#define MEDIA_BUS_FMT_VYUY10_2X10 0x2019 -#define MEDIA_BUS_FMT_YUYV10_2X10 0x200b -#define MEDIA_BUS_FMT_YVYU10_2X10 0x200c -#define MEDIA_BUS_FMT_Y12_1X12 0x2013 -#define MEDIA_BUS_FMT_UYVY12_2X12 0x201c -#define MEDIA_BUS_FMT_VYUY12_2X12 0x201d -#define MEDIA_BUS_FMT_YUYV12_2X12 0x201e -#define MEDIA_BUS_FMT_YVYU12_2X12 0x201f -#define MEDIA_BUS_FMT_Y14_1X14 0x202d -#define MEDIA_BUS_FMT_Y16_1X16 0x202e -#define MEDIA_BUS_FMT_UYVY8_1X16 0x200f -#define MEDIA_BUS_FMT_VYUY8_1X16 0x2010 -#define MEDIA_BUS_FMT_YUYV8_1X16 0x2011 -#define MEDIA_BUS_FMT_YVYU8_1X16 0x2012 -#define MEDIA_BUS_FMT_YDYUYDYV8_1X16 0x2014 -#define MEDIA_BUS_FMT_UYVY10_1X20 0x201a -#define MEDIA_BUS_FMT_VYUY10_1X20 0x201b -#define MEDIA_BUS_FMT_YUYV10_1X20 0x200d -#define MEDIA_BUS_FMT_YVYU10_1X20 0x200e -#define MEDIA_BUS_FMT_VUY8_1X24 0x2024 -#define MEDIA_BUS_FMT_YUV8_1X24 0x2025 -#define MEDIA_BUS_FMT_UYYVYY8_0_5X24 0x2026 -#define MEDIA_BUS_FMT_UYVY12_1X24 0x2020 -#define MEDIA_BUS_FMT_VYUY12_1X24 0x2021 -#define MEDIA_BUS_FMT_YUYV12_1X24 0x2022 -#define MEDIA_BUS_FMT_YVYU12_1X24 0x2023 -#define MEDIA_BUS_FMT_YUV10_1X30 0x2016 -#define MEDIA_BUS_FMT_UYYVYY10_0_5X30 0x2027 -#define MEDIA_BUS_FMT_AYUV8_1X32 0x2017 -#define MEDIA_BUS_FMT_UYYVYY12_0_5X36 0x2028 -#define MEDIA_BUS_FMT_YUV12_1X36 0x2029 -#define MEDIA_BUS_FMT_YUV16_1X48 0x202a -#define MEDIA_BUS_FMT_UYYVYY16_0_5X48 0x202b - -#define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001 -#define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013 -#define MEDIA_BUS_FMT_SGRBG8_1X8 0x3002 -#define MEDIA_BUS_FMT_SRGGB8_1X8 0x3014 -#define MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8 0x3015 -#define MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8 0x3016 -#define MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8 0x3017 -#define MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8 0x3018 -#define MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8 0x300b -#define MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8 0x300c -#define MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8 0x3009 -#define MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8 0x300d -#define MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE 0x3003 -#define MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE 0x3004 -#define MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE 0x3005 -#define MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE 0x3006 -#define MEDIA_BUS_FMT_SBGGR10_1X10 0x3007 -#define MEDIA_BUS_FMT_SGBRG10_1X10 0x300e -#define MEDIA_BUS_FMT_SGRBG10_1X10 0x300a -#define MEDIA_BUS_FMT_SRGGB10_1X10 0x300f -#define MEDIA_BUS_FMT_SBGGR12_1X12 0x3008 -#define MEDIA_BUS_FMT_SGBRG12_1X12 0x3010 -#define MEDIA_BUS_FMT_SGRBG12_1X12 0x3011 -#define MEDIA_BUS_FMT_SRGGB12_1X12 0x3012 -#define MEDIA_BUS_FMT_SBGGR14_1X14 0x3019 -#define MEDIA_BUS_FMT_SGBRG14_1X14 0x301a -#define MEDIA_BUS_FMT_SGRBG14_1X14 0x301b -#define MEDIA_BUS_FMT_SRGGB14_1X14 0x301c -#define MEDIA_BUS_FMT_SBGGR16_1X16 0x301d -#define MEDIA_BUS_FMT_SGBRG16_1X16 0x301e -#define MEDIA_BUS_FMT_SGRBG16_1X16 0x301f -#define MEDIA_BUS_FMT_SRGGB16_1X16 0x3020 - -#define MEDIA_BUS_FMT_JPEG_1X8 0x4001 -#define MEDIA_BUS_FMT_S5C_UYVY_JPEG_1X8 0x5001 -#define MEDIA_BUS_FMT_AHSV8888_1X32 0x6001 - -#define MEDIA_BUS_FMT_METADATA_FIXED 0x7001 - -#endif diff --git a/project/3rdparty/include/libv4l/media.h b/project/3rdparty/include/libv4l/media.h deleted file mode 100644 index bbb375cee..000000000 --- a/project/3rdparty/include/libv4l/media.h +++ /dev/null @@ -1,275 +0,0 @@ -#ifndef LIBV4L_LINUX_MEDIA_H -#define LIBV4L_LINUX_MEDIA_H - -#include -#include - -#if 1 -#include -#else -struct media_device_info { - char driver[16]; - char model[32]; - char serial[40]; - char bus_info[32]; - __u32 media_version; - __u32 hw_revision; - __u32 driver_version; - __u32 reserved[31]; -}; - -#define MEDIA_ENT_F_BASE 0x00000000 -#define MEDIA_ENT_F_OLD_BASE 0x00010000 -#define MEDIA_ENT_F_OLD_SUBDEV_BASE 0x00020000 - -#define MEDIA_ENT_F_UNKNOWN MEDIA_ENT_F_BASE - -#define MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN MEDIA_ENT_F_OLD_SUBDEV_BASE - -#define MEDIA_ENT_F_DTV_DEMOD (MEDIA_ENT_F_BASE + 0x00001) -#define MEDIA_ENT_F_TS_DEMUX (MEDIA_ENT_F_BASE + 0x00002) -#define MEDIA_ENT_F_DTV_CA (MEDIA_ENT_F_BASE + 0x00003) -#define MEDIA_ENT_F_DTV_NET_DECAP (MEDIA_ENT_F_BASE + 0x00004) - -#define MEDIA_ENT_F_IO_V4L (MEDIA_ENT_F_OLD_BASE + 1) -#define MEDIA_ENT_F_IO_DTV (MEDIA_ENT_F_BASE + 0x01001) -#define MEDIA_ENT_F_IO_VBI (MEDIA_ENT_F_BASE + 0x01002) -#define MEDIA_ENT_F_IO_SWRADIO (MEDIA_ENT_F_BASE + 0x01003) - -#define MEDIA_ENT_F_CAM_SENSOR (MEDIA_ENT_F_OLD_SUBDEV_BASE + 1) -#define MEDIA_ENT_F_FLASH (MEDIA_ENT_F_OLD_SUBDEV_BASE + 2) -#define MEDIA_ENT_F_LENS (MEDIA_ENT_F_OLD_SUBDEV_BASE + 3) - -#define MEDIA_ENT_F_TUNER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 5) - -#define MEDIA_ENT_F_IF_VID_DECODER (MEDIA_ENT_F_BASE + 0x02001) -#define MEDIA_ENT_F_IF_AUD_DECODER (MEDIA_ENT_F_BASE + 0x02002) - -#define MEDIA_ENT_F_AUDIO_CAPTURE (MEDIA_ENT_F_BASE + 0x03001) -#define MEDIA_ENT_F_AUDIO_PLAYBACK (MEDIA_ENT_F_BASE + 0x03002) -#define MEDIA_ENT_F_AUDIO_MIXER (MEDIA_ENT_F_BASE + 0x03003) - -#define MEDIA_ENT_F_PROC_VIDEO_COMPOSER (MEDIA_ENT_F_BASE + 0x4001) -#define MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER (MEDIA_ENT_F_BASE + 0x4002) -#define MEDIA_ENT_F_PROC_VIDEO_PIXEL_ENC_CONV (MEDIA_ENT_F_BASE + 0x4003) -#define MEDIA_ENT_F_PROC_VIDEO_LUT (MEDIA_ENT_F_BASE + 0x4004) -#define MEDIA_ENT_F_PROC_VIDEO_SCALER (MEDIA_ENT_F_BASE + 0x4005) -#define MEDIA_ENT_F_PROC_VIDEO_STATISTICS (MEDIA_ENT_F_BASE + 0x4006) -#define MEDIA_ENT_F_PROC_VIDEO_ENCODER (MEDIA_ENT_F_BASE + 0x4007) -#define MEDIA_ENT_F_PROC_VIDEO_DECODER (MEDIA_ENT_F_BASE + 0x4008) -#define MEDIA_ENT_F_PROC_VIDEO_ISP (MEDIA_ENT_F_BASE + 0x4009) - -#define MEDIA_ENT_F_VID_MUX (MEDIA_ENT_F_BASE + 0x5001) -#define MEDIA_ENT_F_VID_IF_BRIDGE (MEDIA_ENT_F_BASE + 0x5002) - -#define MEDIA_ENT_F_ATV_DECODER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 4) -#define MEDIA_ENT_F_DV_DECODER (MEDIA_ENT_F_BASE + 0x6001) -#define MEDIA_ENT_F_DV_ENCODER (MEDIA_ENT_F_BASE + 0x6002) - -#define MEDIA_ENT_FL_DEFAULT (1 << 0) -#define MEDIA_ENT_FL_CONNECTOR (1 << 1) - -#define MEDIA_ENT_ID_FLAG_NEXT (1U << 31) - -struct media_entity_desc { - __u32 id; - char name[32]; - __u32 type; - __u32 revision; - __u32 flags; - __u32 group_id; - __u16 pads; - __u16 links; - - __u32 reserved[4]; - - union { - struct { - __u32 major; - __u32 minor; - } dev; - - struct { - __u32 card; - __u32 device; - __u32 subdevice; - } alsa; - - struct { - __u32 major; - __u32 minor; - } v4l; - - struct { - __u32 major; - __u32 minor; - } fb; - - int dvb; - __u8 raw[184]; - }; -}; - -#define MEDIA_PAD_FL_SINK (1 << 0) -#define MEDIA_PAD_FL_SOURCE (1 << 1) -#define MEDIA_PAD_FL_MUST_CONNECT (1 << 2) - -struct media_pad_desc { - __u32 entity; - __u16 index; - __u32 flags; - __u32 reserved[2]; -}; - -#define MEDIA_LNK_FL_ENABLED (1 << 0) -#define MEDIA_LNK_FL_IMMUTABLE (1 << 1) -#define MEDIA_LNK_FL_DYNAMIC (1 << 2) - -#define MEDIA_LNK_FL_LINK_TYPE (0xf << 28) -#define MEDIA_LNK_FL_DATA_LINK (0 << 28) -#define MEDIA_LNK_FL_INTERFACE_LINK (1 << 28) -#define MEDIA_LNK_FL_ANCILLARY_LINK (2 << 28) - -struct media_link_desc { - struct media_pad_desc source; - struct media_pad_desc sink; - __u32 flags; - __u32 reserved[2]; -}; - -struct media_links_enum { - __u32 entity; - struct media_pad_desc *pads; - struct media_link_desc *links; - __u32 reserved[4]; -}; - -#define MEDIA_INTF_T_DVB_BASE 0x00000100 -#define MEDIA_INTF_T_V4L_BASE 0x00000200 - -#define MEDIA_INTF_T_DVB_FE (MEDIA_INTF_T_DVB_BASE) -#define MEDIA_INTF_T_DVB_DEMUX (MEDIA_INTF_T_DVB_BASE + 1) -#define MEDIA_INTF_T_DVB_DVR (MEDIA_INTF_T_DVB_BASE + 2) -#define MEDIA_INTF_T_DVB_CA (MEDIA_INTF_T_DVB_BASE + 3) -#define MEDIA_INTF_T_DVB_NET (MEDIA_INTF_T_DVB_BASE + 4) - -#define MEDIA_INTF_T_V4L_VIDEO (MEDIA_INTF_T_V4L_BASE) -#define MEDIA_INTF_T_V4L_VBI (MEDIA_INTF_T_V4L_BASE + 1) -#define MEDIA_INTF_T_V4L_RADIO (MEDIA_INTF_T_V4L_BASE + 2) -#define MEDIA_INTF_T_V4L_SUBDEV (MEDIA_INTF_T_V4L_BASE + 3) -#define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4) -#define MEDIA_INTF_T_V4L_TOUCH (MEDIA_INTF_T_V4L_BASE + 5) - -#define MEDIA_INTF_T_ALSA_BASE 0x00000300 -#define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE) -#define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1) -#define MEDIA_INTF_T_ALSA_CONTROL (MEDIA_INTF_T_ALSA_BASE + 2) - -#define MEDIA_V2_ENTITY_HAS_FLAGS(media_version) ((media_version) >= ((4 << 16) | (19 << 8) | 0)) - -struct media_v2_entity { - __u32 id; - char name[64]; - __u32 function; - __u32 flags; - __u32 reserved[5]; -} __attribute__ ((packed)); - -struct media_v2_intf_devnode { - __u32 major; - __u32 minor; -} __attribute__ ((packed)); - -struct media_v2_interface { - __u32 id; - __u32 intf_type; - __u32 flags; - __u32 reserved[9]; - - union { - struct media_v2_intf_devnode devnode; - __u32 raw[16]; - }; -} __attribute__ ((packed)); - -#define MEDIA_V2_PAD_HAS_INDEX(media_version) ((media_version) >= ((4 << 16) | (19 << 8) | 0)) - -struct media_v2_pad { - __u32 id; - __u32 entity_id; - __u32 flags; - __u32 index; - __u32 reserved[4]; -} __attribute__ ((packed)); - -struct media_v2_link { - __u32 id; - __u32 source_id; - __u32 sink_id; - __u32 flags; - __u32 reserved[6]; -} __attribute__ ((packed)); - -struct media_v2_topology { - __u64 topology_version; - - __u32 num_entities; - __u32 reserved1; - __u64 ptr_entities; - - __u32 num_interfaces; - __u32 reserved2; - __u64 ptr_interfaces; - - __u32 num_pads; - __u32 reserved3; - __u64 ptr_pads; - - __u32 num_links; - __u32 reserved4; - __u64 ptr_links; -} __attribute__ ((packed)); - -#define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info) -#define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc) -#define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) -#define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) -#define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology) -#define MEDIA_IOC_REQUEST_ALLOC _IOR ('|', 0x05, int) - -#define MEDIA_REQUEST_IOC_QUEUE _IO('|', 0x80) -#define MEDIA_REQUEST_IOC_REINIT _IO('|', 0x81) - -#define MEDIA_ENT_TYPE_SHIFT 16 -#define MEDIA_ENT_TYPE_MASK 0x00ff0000 -#define MEDIA_ENT_SUBTYPE_MASK 0x0000ffff - -#define MEDIA_ENT_T_DEVNODE_UNKNOWN (MEDIA_ENT_F_OLD_BASE | MEDIA_ENT_SUBTYPE_MASK) - -#define MEDIA_ENT_T_DEVNODE MEDIA_ENT_F_OLD_BASE -#define MEDIA_ENT_T_DEVNODE_V4L MEDIA_ENT_F_IO_V4L -#define MEDIA_ENT_T_DEVNODE_FB (MEDIA_ENT_F_OLD_BASE + 2) -#define MEDIA_ENT_T_DEVNODE_ALSA (MEDIA_ENT_F_OLD_BASE + 3) -#define MEDIA_ENT_T_DEVNODE_DVB (MEDIA_ENT_F_OLD_BASE + 4) - -#define MEDIA_ENT_T_UNKNOWN MEDIA_ENT_F_UNKNOWN -#define MEDIA_ENT_T_V4L2_VIDEO MEDIA_ENT_F_IO_V4L -#define MEDIA_ENT_T_V4L2_SUBDEV MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN -#define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR MEDIA_ENT_F_CAM_SENSOR -#define MEDIA_ENT_T_V4L2_SUBDEV_FLASH MEDIA_ENT_F_FLASH -#define MEDIA_ENT_T_V4L2_SUBDEV_LENS MEDIA_ENT_F_LENS -#define MEDIA_ENT_T_V4L2_SUBDEV_DECODER MEDIA_ENT_F_ATV_DECODER -#define MEDIA_ENT_T_V4L2_SUBDEV_TUNER MEDIA_ENT_F_TUNER - -#define MEDIA_ENT_F_DTV_DECODER MEDIA_ENT_F_DV_DECODER - -#define MEDIA_INTF_T_ALSA_COMPRESS (MEDIA_INTF_T_ALSA_BASE + 3) -#define MEDIA_INTF_T_ALSA_RAWMIDI (MEDIA_INTF_T_ALSA_BASE + 4) -#define MEDIA_INTF_T_ALSA_HWDEP (MEDIA_INTF_T_ALSA_BASE + 5) -#define MEDIA_INTF_T_ALSA_SEQUENCER (MEDIA_INTF_T_ALSA_BASE + 6) -#define MEDIA_INTF_T_ALSA_TIMER (MEDIA_INTF_T_ALSA_BASE + 7) - -#define MEDIA_API_VERSION ((0 << 16) | (1 << 8) | 0) -#endif - -#endif diff --git a/project/3rdparty/include/libv4l/mediactl-private.h b/project/3rdparty/include/libv4l/mediactl-private.h deleted file mode 100644 index 210b80e9a..000000000 --- a/project/3rdparty/include/libv4l/mediactl-private.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef LIBDRM_MEDIACTL_PRIVATE_H -#define LIBDRM_MEDIACTL_PRIVATE_H - -#include "media.h" -#include "mediactl.h" - -struct media_entity { - struct media_device *media; - struct media_entity_desc info; - struct media_pad *pads; - struct media_link *links; - unsigned int max_links; - unsigned int num_links; - char devname[32]; - int fd; -}; - -struct media_device { - int fd; - int refcount; - char *devnode; - - struct media_device_info info; - struct media_entity *entities; - unsigned int entities_count; - - void (*debug_handler)(void *, ...); - void *debug_priv; - - struct { - struct media_entity *v4l; - struct media_entity *fb; - struct media_entity *alsa; - struct media_entity *dvb; - } def; -}; - -#define media_dbg(media, ...) (media)->debug_handler((media)->debug_priv, __VA_ARGS__) - -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) -#endif - -#define FIELD_SIZEOF(t, f) (sizeof(((t *)0)->f)) - -#ifndef mediactl_print -#define mediactl_print(msg, ...) fprintf(stderr, msg, ##__VA_ARGS__); -#endif - -#ifndef mediactl_error -#define mediactl_error(msg, ...) mediactl_print("\033[1;31m[MEDIACTL][E]: " msg "\033[0m\n", ##__VA_ARGS__) -#endif - -#ifndef mediactl_warn -#define mediactl_warn(msg, ...) mediactl_print("\033[1;33m[MEDIACTL][W]: " msg "\033[0m\n", ##__VA_ARGS__) -#endif - -#ifndef mediactl_info -#define mediactl_info(msg, ...) mediactl_print("\033[1;32m[MEDIACTL][I]: " msg "\033[0m\n", ##__VA_ARGS__) -#endif - -#ifndef mediactl_debug -#define mediactl_debug(msg, ...) mediactl_print("\033[1;34m[MEDIACTL][D]: " msg "\033[0m\n", ##__VA_ARGS__) -#endif - -void media_print_streampos(struct media_device *media, const char *p, const char *end); - -#endif diff --git a/project/3rdparty/include/libv4l/mediactl.h b/project/3rdparty/include/libv4l/mediactl.h deleted file mode 100644 index e9d909fa2..000000000 --- a/project/3rdparty/include/libv4l/mediactl.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef LIBDRM_MEDIACTL_H -#define LIBDRM_MEDIACTL_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct media_link { - struct media_pad *source; - struct media_pad *sink; - struct media_link *twin; - __u32 flags; - __u32 padding[3]; -}; - -struct media_pad { - struct media_entity *entity; - __u32 index; - __u32 flags; - __u32 padding[3]; -}; - -struct media_device; -struct media_entity; - -struct media_device *media_device_new(const char *devnode); -struct media_device *media_device_new_emulated(struct media_device_info *info); - -struct media_device *media_device_ref(struct media_device *media); -void media_device_unref(struct media_device *media); - -int media_device_add_entity(struct media_device *media, const struct media_entity_desc *desc, const char *devnode); - -void media_debug_set_handler(struct media_device *media, void (*debug_handler)(void *, ...), void *debug_priv); - -int media_device_enumerate(struct media_device *media); -struct media_pad *media_entity_remote_source(struct media_pad *pad); - -const struct media_entity_desc *media_entity_get_info(struct media_entity *entity); -const struct media_pad *media_entity_get_pad(struct media_entity *entity, unsigned int index); - -unsigned int media_entity_get_links_count(struct media_entity *entity); -const struct media_link *media_entity_get_link(struct media_entity *entity, unsigned int index); - -const char *media_entity_get_devname(struct media_entity *entity); - -static inline unsigned int media_entity_type(struct media_entity *entity) -{ - return media_entity_get_info(entity)->type & MEDIA_ENT_TYPE_MASK; -} - -struct media_entity *media_get_entity_by_name(struct media_device *media, const char *name); - -struct media_entity *media_get_entity_by_id(struct media_device *media, __u32 id); - -unsigned int media_get_entities_count(struct media_device *media); -struct media_entity *media_get_entity(struct media_device *media, unsigned int index); -struct media_entity *media_get_default_entity(struct media_device *media, unsigned int type); - -const struct media_device_info *media_get_info(struct media_device *media); -const char *media_get_devnode(struct media_device *media); - -int media_setup_link(struct media_device *media, struct media_pad *source, struct media_pad *sink, __u32 flags); -int media_reset_links(struct media_device *media); - -struct media_entity *media_parse_entity(struct media_device *media, const char *p, char **endp); - -struct media_pad *media_parse_pad(struct media_device *media, const char *p, char **endp); -struct media_link *media_parse_link(struct media_device *media, const char *p, char **endp); - -int media_parse_setup_link(struct media_device *media, const char *p, char **endp); -int media_parse_setup_links(struct media_device *media, const char *p); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/project/3rdparty/include/libv4l/v4l2-common.h b/project/3rdparty/include/libv4l/v4l2-common.h deleted file mode 100644 index fb86bdd8d..000000000 --- a/project/3rdparty/include/libv4l/v4l2-common.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef LIBV4L_V4L2_COMMON_H -#define LIBV4L_V4L2_COMMON_H - -#include - -#if 1 -#include -#else -#define V4L2_SEL_TGT_CROP 0x0000 -#define V4L2_SEL_TGT_CROP_DEFAULT 0x0001 -#define V4L2_SEL_TGT_CROP_BOUNDS 0x0002 -#define V4L2_SEL_TGT_NATIVE_SIZE 0x0003 -#define V4L2_SEL_TGT_COMPOSE 0x0100 -#define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101 -#define V4L2_SEL_TGT_COMPOSE_BOUNDS 0x0102 -#define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103 - -#define V4L2_SEL_FLAG_GE (1 << 0) -#define V4L2_SEL_FLAG_LE (1 << 1) -#define V4L2_SEL_FLAG_KEEP_CONFIG (1 << 2) - -struct v4l2_edid { - __u32 pad; - __u32 start_block; - __u32 blocks; - __u32 reserved[5]; - __u8 *edid; -}; - -#define V4L2_SEL_TGT_CROP_ACTIVE V4L2_SEL_TGT_CROP -#define V4L2_SEL_TGT_COMPOSE_ACTIVE V4L2_SEL_TGT_COMPOSE -#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL V4L2_SEL_TGT_CROP -#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL V4L2_SEL_TGT_COMPOSE -#define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS V4L2_SEL_TGT_CROP_BOUNDS -#define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS V4L2_SEL_TGT_COMPOSE_BOUNDS - -#define V4L2_SUBDEV_SEL_FLAG_SIZE_GE V4L2_SEL_FLAG_GE -#define V4L2_SUBDEV_SEL_FLAG_SIZE_LE V4L2_SEL_FLAG_LE -#define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG -#endif - -#endif diff --git a/project/3rdparty/include/libv4l/v4l2-controls.h b/project/3rdparty/include/libv4l/v4l2-controls.h deleted file mode 100644 index c683ecf95..000000000 --- a/project/3rdparty/include/libv4l/v4l2-controls.h +++ /dev/null @@ -1,2003 +0,0 @@ -#ifndef LIBV4L_LINUX_V4L2_CONTROLS_H -#define LIBV4L_LINUX_V4L2_CONTROLS_H - -#include -#include - -#if 1 -#include -#else -#ifndef _BITUL -#define _BITUL(x) (1U << (x)) -#endif - -#define V4L2_CTRL_CLASS_USER 0x00980000 -#define V4L2_CTRL_CLASS_CODEC 0x00990000 -#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 -#define V4L2_CTRL_CLASS_FM_TX 0x009b0000 -#define V4L2_CTRL_CLASS_FLASH 0x009c0000 -#define V4L2_CTRL_CLASS_JPEG 0x009d0000 -#define V4L2_CTRL_CLASS_IMAGE_SOURCE 0x009e0000 -#define V4L2_CTRL_CLASS_IMAGE_PROC 0x009f0000 -#define V4L2_CTRL_CLASS_DV 0x00a00000 -#define V4L2_CTRL_CLASS_FM_RX 0x00a10000 -#define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 -#define V4L2_CTRL_CLASS_DETECT 0x00a30000 -#define V4L2_CTRL_CLASS_CODEC_STATELESS 0x00a40000 -#define V4L2_CTRL_CLASS_COLORIMETRY 0x00a50000 - -#define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900) -#define V4L2_CID_USER_BASE V4L2_CID_BASE -#define V4L2_CID_USER_CLASS (V4L2_CTRL_CLASS_USER | 1) -#define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0) -#define V4L2_CID_CONTRAST (V4L2_CID_BASE+1) -#define V4L2_CID_SATURATION (V4L2_CID_BASE+2) -#define V4L2_CID_HUE (V4L2_CID_BASE+3) -#define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5) -#define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6) -#define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7) -#define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8) -#define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9) -#define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10) -#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) -#define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12) -#define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13) -#define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14) -#define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15) -#define V4L2_CID_GAMMA (V4L2_CID_BASE+16) -#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) -#define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17) -#define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18) -#define V4L2_CID_GAIN (V4L2_CID_BASE+19) -#define V4L2_CID_HFLIP (V4L2_CID_BASE+20) -#define V4L2_CID_VFLIP (V4L2_CID_BASE+21) - -#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) - -enum v4l2_power_line_frequency { - V4L2_CID_POWER_LINE_FREQUENCY_DISABLED = 0, - V4L2_CID_POWER_LINE_FREQUENCY_50HZ = 1, - V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2, - V4L2_CID_POWER_LINE_FREQUENCY_AUTO = 3, -}; - -#define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25) -#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26) -#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27) -#define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28) -#define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29) -#define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30) -#define V4L2_CID_COLORFX (V4L2_CID_BASE+31) - -enum v4l2_colorfx { - V4L2_COLORFX_NONE = 0, - V4L2_COLORFX_BW = 1, - V4L2_COLORFX_SEPIA = 2, - V4L2_COLORFX_NEGATIVE = 3, - V4L2_COLORFX_EMBOSS = 4, - V4L2_COLORFX_SKETCH = 5, - V4L2_COLORFX_SKY_BLUE = 6, - V4L2_COLORFX_GRASS_GREEN = 7, - V4L2_COLORFX_SKIN_WHITEN = 8, - V4L2_COLORFX_VIVID = 9, - V4L2_COLORFX_AQUA = 10, - V4L2_COLORFX_ART_FREEZE = 11, - V4L2_COLORFX_SILHOUETTE = 12, - V4L2_COLORFX_SOLARIZATION = 13, - V4L2_COLORFX_ANTIQUE = 14, - V4L2_COLORFX_SET_CBCR = 15, - V4L2_COLORFX_SET_RGB = 16, -}; - -#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) -#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) - -#define V4L2_CID_ROTATE (V4L2_CID_BASE+34) -#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) - -#define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36) - -#define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE+37) -#define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE+38) - -#define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE+39) -#define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40) - -#define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41) -#define V4L2_CID_COLORFX_CBCR (V4L2_CID_BASE+42) -#define V4L2_CID_COLORFX_RGB (V4L2_CID_BASE+43) - -#define V4L2_CID_LASTP1 (V4L2_CID_BASE+44) - -#define V4L2_CID_USER_MEYE_BASE (V4L2_CID_USER_BASE + 0x1000) -#define V4L2_CID_USER_BTTV_BASE (V4L2_CID_USER_BASE + 0x1010) -#define V4L2_CID_USER_S2255_BASE (V4L2_CID_USER_BASE + 0x1030) -#define V4L2_CID_USER_SI476X_BASE (V4L2_CID_USER_BASE + 0x1040) -#define V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_USER_BASE + 0x1050) -#define V4L2_CID_USER_SAA7134_BASE (V4L2_CID_USER_BASE + 0x1060) -#define V4L2_CID_USER_ADV7180_BASE (V4L2_CID_USER_BASE + 0x1070) -#define V4L2_CID_USER_TC358743_BASE (V4L2_CID_USER_BASE + 0x1080) -#define V4L2_CID_USER_MAX217X_BASE (V4L2_CID_USER_BASE + 0x1090) -#define V4L2_CID_USER_IMX_BASE (V4L2_CID_USER_BASE + 0x10b0) -#define V4L2_CID_USER_ATMEL_ISC_BASE (V4L2_CID_USER_BASE + 0x10c0) -#define V4L2_CID_USER_CODA_BASE (V4L2_CID_USER_BASE + 0x10e0) -#define V4L2_CID_USER_CCS_BASE (V4L2_CID_USER_BASE + 0x10f0) -#define V4L2_CID_USER_ALLEGRO_BASE (V4L2_CID_USER_BASE + 0x1170) -#define V4L2_CID_USER_ISL7998X_BASE (V4L2_CID_USER_BASE + 0x1180) -#define V4L2_CID_USER_DW100_BASE (V4L2_CID_USER_BASE + 0x1190) -#define V4L2_CID_USER_ASPEED_BASE (V4L2_CID_USER_BASE + 0x11a0) - -#define V4L2_CID_CODEC_BASE (V4L2_CTRL_CLASS_CODEC | 0x900) -#define V4L2_CID_CODEC_CLASS (V4L2_CTRL_CLASS_CODEC | 1) - -#define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_CODEC_BASE+0) - -enum v4l2_mpeg_stream_type { - V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, - V4L2_MPEG_STREAM_TYPE_MPEG2_TS = 1, - V4L2_MPEG_STREAM_TYPE_MPEG1_SS = 2, - V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3, - V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4, - V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, -}; - -#define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_CODEC_BASE+1) -#define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_CODEC_BASE+2) -#define V4L2_CID_MPEG_STREAM_PID_VIDEO (V4L2_CID_CODEC_BASE+3) -#define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_CODEC_BASE+4) -#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_CODEC_BASE+5) -#define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_CODEC_BASE+6) -#define V4L2_CID_MPEG_STREAM_VBI_FMT (V4L2_CID_CODEC_BASE+7) - -enum v4l2_mpeg_stream_vbi_fmt { - V4L2_MPEG_STREAM_VBI_FMT_NONE = 0, - V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, -}; - -#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_CODEC_BASE+100) - -enum v4l2_mpeg_audio_sampling_freq { - V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0, - V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1, - V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2, -}; - -#define V4L2_CID_MPEG_AUDIO_ENCODING (V4L2_CID_CODEC_BASE+101) - -enum v4l2_mpeg_audio_encoding { - V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0, - V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1, - V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2, - V4L2_MPEG_AUDIO_ENCODING_AAC = 3, - V4L2_MPEG_AUDIO_ENCODING_AC3 = 4, -}; - -#define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_CODEC_BASE+102) - -enum v4l2_mpeg_audio_l1_bitrate { - V4L2_MPEG_AUDIO_L1_BITRATE_32K = 0, - V4L2_MPEG_AUDIO_L1_BITRATE_64K = 1, - V4L2_MPEG_AUDIO_L1_BITRATE_96K = 2, - V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3, - V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4, - V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5, - V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6, - V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7, - V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8, - V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9, - V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10, - V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11, - V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12, - V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13, -}; - -#define V4L2_CID_MPEG_AUDIO_L2_BITRATE (V4L2_CID_CODEC_BASE+103) - -enum v4l2_mpeg_audio_l2_bitrate { - V4L2_MPEG_AUDIO_L2_BITRATE_32K = 0, - V4L2_MPEG_AUDIO_L2_BITRATE_48K = 1, - V4L2_MPEG_AUDIO_L2_BITRATE_56K = 2, - V4L2_MPEG_AUDIO_L2_BITRATE_64K = 3, - V4L2_MPEG_AUDIO_L2_BITRATE_80K = 4, - V4L2_MPEG_AUDIO_L2_BITRATE_96K = 5, - V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6, - V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7, - V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8, - V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9, - V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10, - V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11, - V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12, - V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13, -}; - -#define V4L2_CID_MPEG_AUDIO_L3_BITRATE (V4L2_CID_CODEC_BASE+104) - -enum v4l2_mpeg_audio_l3_bitrate { - V4L2_MPEG_AUDIO_L3_BITRATE_32K = 0, - V4L2_MPEG_AUDIO_L3_BITRATE_40K = 1, - V4L2_MPEG_AUDIO_L3_BITRATE_48K = 2, - V4L2_MPEG_AUDIO_L3_BITRATE_56K = 3, - V4L2_MPEG_AUDIO_L3_BITRATE_64K = 4, - V4L2_MPEG_AUDIO_L3_BITRATE_80K = 5, - V4L2_MPEG_AUDIO_L3_BITRATE_96K = 6, - V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7, - V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8, - V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9, - V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10, - V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11, - V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12, - V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13, -}; - -#define V4L2_CID_MPEG_AUDIO_MODE (V4L2_CID_CODEC_BASE+105) - -enum v4l2_mpeg_audio_mode { - V4L2_MPEG_AUDIO_MODE_STEREO = 0, - V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1, - V4L2_MPEG_AUDIO_MODE_DUAL = 2, - V4L2_MPEG_AUDIO_MODE_MONO = 3, -}; - -#define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION (V4L2_CID_CODEC_BASE+106) - -enum v4l2_mpeg_audio_mode_extension { - V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4 = 0, - V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8 = 1, - V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2, - V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3, -}; - -#define V4L2_CID_MPEG_AUDIO_EMPHASIS (V4L2_CID_CODEC_BASE+107) - -enum v4l2_mpeg_audio_emphasis { - V4L2_MPEG_AUDIO_EMPHASIS_NONE = 0, - V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1, - V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17 = 2, -}; - -#define V4L2_CID_MPEG_AUDIO_CRC (V4L2_CID_CODEC_BASE+108) - -enum v4l2_mpeg_audio_crc { - V4L2_MPEG_AUDIO_CRC_NONE = 0, - V4L2_MPEG_AUDIO_CRC_CRC16 = 1, -}; - -#define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_CODEC_BASE+109) -#define V4L2_CID_MPEG_AUDIO_AAC_BITRATE (V4L2_CID_CODEC_BASE+110) -#define V4L2_CID_MPEG_AUDIO_AC3_BITRATE (V4L2_CID_CODEC_BASE+111) - -enum v4l2_mpeg_audio_ac3_bitrate { - V4L2_MPEG_AUDIO_AC3_BITRATE_32K = 0, - V4L2_MPEG_AUDIO_AC3_BITRATE_40K = 1, - V4L2_MPEG_AUDIO_AC3_BITRATE_48K = 2, - V4L2_MPEG_AUDIO_AC3_BITRATE_56K = 3, - V4L2_MPEG_AUDIO_AC3_BITRATE_64K = 4, - V4L2_MPEG_AUDIO_AC3_BITRATE_80K = 5, - V4L2_MPEG_AUDIO_AC3_BITRATE_96K = 6, - V4L2_MPEG_AUDIO_AC3_BITRATE_112K = 7, - V4L2_MPEG_AUDIO_AC3_BITRATE_128K = 8, - V4L2_MPEG_AUDIO_AC3_BITRATE_160K = 9, - V4L2_MPEG_AUDIO_AC3_BITRATE_192K = 10, - V4L2_MPEG_AUDIO_AC3_BITRATE_224K = 11, - V4L2_MPEG_AUDIO_AC3_BITRATE_256K = 12, - V4L2_MPEG_AUDIO_AC3_BITRATE_320K = 13, - V4L2_MPEG_AUDIO_AC3_BITRATE_384K = 14, - V4L2_MPEG_AUDIO_AC3_BITRATE_448K = 15, - V4L2_MPEG_AUDIO_AC3_BITRATE_512K = 16, - V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17, - V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18, -}; - -#define V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK (V4L2_CID_CODEC_BASE+112) - -enum v4l2_mpeg_audio_dec_playback { - V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO = 0, - V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO = 1, - V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT = 2, - V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT = 3, - V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO = 4, - V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO = 5, -}; - -#define V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK (V4L2_CID_CODEC_BASE+113) -#define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_CODEC_BASE+200) - -enum v4l2_mpeg_video_encoding { - V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0, - V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1, - V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC = 2, -}; - -#define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_CODEC_BASE+201) - -enum v4l2_mpeg_video_aspect { - V4L2_MPEG_VIDEO_ASPECT_1x1 = 0, - V4L2_MPEG_VIDEO_ASPECT_4x3 = 1, - V4L2_MPEG_VIDEO_ASPECT_16x9 = 2, - V4L2_MPEG_VIDEO_ASPECT_221x100 = 3, -}; - -#define V4L2_CID_MPEG_VIDEO_B_FRAMES (V4L2_CID_CODEC_BASE+202) -#define V4L2_CID_MPEG_VIDEO_GOP_SIZE (V4L2_CID_CODEC_BASE+203) -#define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (V4L2_CID_CODEC_BASE+204) -#define V4L2_CID_MPEG_VIDEO_PULLDOWN (V4L2_CID_CODEC_BASE+205) -#define V4L2_CID_MPEG_VIDEO_BITRATE_MODE (V4L2_CID_CODEC_BASE+206) - -enum v4l2_mpeg_video_bitrate_mode { - V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0, - V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1, - V4L2_MPEG_VIDEO_BITRATE_MODE_CQ = 2, -}; - -#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_CODEC_BASE+207) -#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_CODEC_BASE+208) -#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_CODEC_BASE+209) -#define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_CODEC_BASE+210) -#define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_CODEC_BASE+211) -#define V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (V4L2_CID_CODEC_BASE+212) -#define V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (V4L2_CID_CODEC_BASE+213) -#define V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (V4L2_CID_CODEC_BASE+214) -#define V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (V4L2_CID_CODEC_BASE+215) -#define V4L2_CID_MPEG_VIDEO_HEADER_MODE (V4L2_CID_CODEC_BASE+216) - -enum v4l2_mpeg_video_header_mode { - V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE = 0, - V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME = 1, -}; - -#define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (V4L2_CID_CODEC_BASE+217) -#define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (V4L2_CID_CODEC_BASE+218) -#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (V4L2_CID_CODEC_BASE+219) -#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (V4L2_CID_CODEC_BASE+220) -#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE (V4L2_CID_CODEC_BASE+221) - -enum v4l2_mpeg_video_multi_slice_mode { - V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE = 0, - V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB = 1, - V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES = 2, - V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB = 1, - V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES = 2, -}; - -#define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_CODEC_BASE+222) -#define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_CODEC_BASE+223) -#define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_CODEC_BASE+224) -#define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_CODEC_BASE+225) -#define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_CODEC_BASE+226) -#define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (V4L2_CID_CODEC_BASE+227) -#define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_CODEC_BASE+228) -#define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_CODEC_BASE+229) -#define V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (V4L2_CID_CODEC_BASE+230) -#define V4L2_CID_MPEG_VIDEO_AU_DELIMITER (V4L2_CID_CODEC_BASE+231) -#define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_CODEC_BASE+232) -#define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_CODEC_BASE+233) -#define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_CODEC_BASE+234) -#define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (V4L2_CID_CODEC_BASE+235) -#define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD (V4L2_CID_CODEC_BASE+236) -#define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE (V4L2_CID_CODEC_BASE+237) - -enum v4l2_mpeg_video_intra_refresh_period_type { - V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM = 0, - V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC = 1, -}; - -#define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_CODEC_BASE+270) - -enum v4l2_mpeg_video_mpeg2_level { - V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW = 0, - V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN = 1, - V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH_1440 = 2, - V4L2_MPEG_VIDEO_MPEG2_LEVEL_HIGH = 3, -}; - -#define V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE (V4L2_CID_CODEC_BASE+271) - -enum v4l2_mpeg_video_mpeg2_profile { - V4L2_MPEG_VIDEO_MPEG2_PROFILE_SIMPLE = 0, - V4L2_MPEG_VIDEO_MPEG2_PROFILE_MAIN = 1, - V4L2_MPEG_VIDEO_MPEG2_PROFILE_SNR_SCALABLE = 2, - V4L2_MPEG_VIDEO_MPEG2_PROFILE_SPATIALLY_SCALABLE = 3, - V4L2_MPEG_VIDEO_MPEG2_PROFILE_HIGH = 4, - V4L2_MPEG_VIDEO_MPEG2_PROFILE_MULTIVIEW = 5, -}; - -#define V4L2_CID_FWHT_I_FRAME_QP (V4L2_CID_CODEC_BASE + 290) -#define V4L2_CID_FWHT_P_FRAME_QP (V4L2_CID_CODEC_BASE + 291) - -#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_CODEC_BASE+300) -#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_CODEC_BASE+301) -#define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_CODEC_BASE+302) -#define V4L2_CID_MPEG_VIDEO_H263_MIN_QP (V4L2_CID_CODEC_BASE+303) -#define V4L2_CID_MPEG_VIDEO_H263_MAX_QP (V4L2_CID_CODEC_BASE+304) -#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (V4L2_CID_CODEC_BASE+350) -#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (V4L2_CID_CODEC_BASE+351) -#define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (V4L2_CID_CODEC_BASE+352) -#define V4L2_CID_MPEG_VIDEO_H264_MIN_QP (V4L2_CID_CODEC_BASE+353) -#define V4L2_CID_MPEG_VIDEO_H264_MAX_QP (V4L2_CID_CODEC_BASE+354) -#define V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (V4L2_CID_CODEC_BASE+355) -#define V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (V4L2_CID_CODEC_BASE+356) -#define V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE (V4L2_CID_CODEC_BASE+357) - -enum v4l2_mpeg_video_h264_entropy_mode { - V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC = 0, - V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC = 1, -}; - -#define V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (V4L2_CID_CODEC_BASE+358) -#define V4L2_CID_MPEG_VIDEO_H264_LEVEL (V4L2_CID_CODEC_BASE+359) - -enum v4l2_mpeg_video_h264_level { - V4L2_MPEG_VIDEO_H264_LEVEL_1_0 = 0, - V4L2_MPEG_VIDEO_H264_LEVEL_1B = 1, - V4L2_MPEG_VIDEO_H264_LEVEL_1_1 = 2, - V4L2_MPEG_VIDEO_H264_LEVEL_1_2 = 3, - V4L2_MPEG_VIDEO_H264_LEVEL_1_3 = 4, - V4L2_MPEG_VIDEO_H264_LEVEL_2_0 = 5, - V4L2_MPEG_VIDEO_H264_LEVEL_2_1 = 6, - V4L2_MPEG_VIDEO_H264_LEVEL_2_2 = 7, - V4L2_MPEG_VIDEO_H264_LEVEL_3_0 = 8, - V4L2_MPEG_VIDEO_H264_LEVEL_3_1 = 9, - V4L2_MPEG_VIDEO_H264_LEVEL_3_2 = 10, - V4L2_MPEG_VIDEO_H264_LEVEL_4_0 = 11, - V4L2_MPEG_VIDEO_H264_LEVEL_4_1 = 12, - V4L2_MPEG_VIDEO_H264_LEVEL_4_2 = 13, - V4L2_MPEG_VIDEO_H264_LEVEL_5_0 = 14, - V4L2_MPEG_VIDEO_H264_LEVEL_5_1 = 15, - V4L2_MPEG_VIDEO_H264_LEVEL_5_2 = 16, - V4L2_MPEG_VIDEO_H264_LEVEL_6_0 = 17, - V4L2_MPEG_VIDEO_H264_LEVEL_6_1 = 18, - V4L2_MPEG_VIDEO_H264_LEVEL_6_2 = 19, -}; - -#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (V4L2_CID_CODEC_BASE+360) -#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (V4L2_CID_CODEC_BASE+361) -#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE (V4L2_CID_CODEC_BASE+362) - -enum v4l2_mpeg_video_h264_loop_filter_mode { - V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED = 0, - V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED = 1, - V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2, -}; - -#define V4L2_CID_MPEG_VIDEO_H264_PROFILE (V4L2_CID_CODEC_BASE+363) - -enum v4l2_mpeg_video_h264_profile { - V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE = 0, - V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE = 1, - V4L2_MPEG_VIDEO_H264_PROFILE_MAIN = 2, - V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED = 3, - V4L2_MPEG_VIDEO_H264_PROFILE_HIGH = 4, - V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10 = 5, - V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422 = 6, - V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE = 7, - V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA = 8, - V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA = 9, - V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA = 10, - V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA = 11, - V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE = 12, - V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH = 13, - V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA = 14, - V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH = 15, - V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH = 16, - V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH = 17, -}; - -#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (V4L2_CID_CODEC_BASE+364) -#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (V4L2_CID_CODEC_BASE+365) -#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (V4L2_CID_CODEC_BASE+366) -#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC (V4L2_CID_CODEC_BASE+367) - -enum v4l2_mpeg_video_h264_vui_sar_idc { - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED = 0, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1 = 1, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11 = 2, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11 = 3, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11 = 4, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33 = 5, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11 = 6, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11 = 7, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11 = 8, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33 = 9, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11 = 10, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11 = 11, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33 = 12, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99 = 13, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3 = 14, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2 = 15, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16, - V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17, -}; - -#define V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (V4L2_CID_CODEC_BASE+368) -#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (V4L2_CID_CODEC_BASE+369) -#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE (V4L2_CID_CODEC_BASE+370) - -enum v4l2_mpeg_video_h264_sei_fp_arrangement_type { - V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHECKERBOARD = 0, - V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN = 1, - V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW = 2, - V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE = 3, - V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM = 4, - V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL = 5, -}; - -#define V4L2_CID_MPEG_VIDEO_H264_FMO (V4L2_CID_CODEC_BASE+371) -#define V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE (V4L2_CID_CODEC_BASE+372) - -enum v4l2_mpeg_video_h264_fmo_map_type { - V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES = 0, - V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES = 1, - V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER = 2, - V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT = 3, - V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN = 4, - V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN = 5, - V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT = 6, -}; - -#define V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (V4L2_CID_CODEC_BASE+373) -#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION (V4L2_CID_CODEC_BASE+374) - -enum v4l2_mpeg_video_h264_fmo_change_dir { - V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT = 0, - V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT = 1, -}; - -#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (V4L2_CID_CODEC_BASE+375) -#define V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (V4L2_CID_CODEC_BASE+376) -#define V4L2_CID_MPEG_VIDEO_H264_ASO (V4L2_CID_CODEC_BASE+377) -#define V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (V4L2_CID_CODEC_BASE+378) -#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (V4L2_CID_CODEC_BASE+379) -#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE (V4L2_CID_CODEC_BASE+380) - -enum v4l2_mpeg_video_h264_hierarchical_coding_type { - V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B = 0, - V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P = 1, -}; - -#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (V4L2_CID_CODEC_BASE+381) -#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (V4L2_CID_CODEC_BASE+382) -#define V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION (V4L2_CID_CODEC_BASE+383) -#define V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET (V4L2_CID_CODEC_BASE+384) -#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP (V4L2_CID_CODEC_BASE+385) -#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP (V4L2_CID_CODEC_BASE+386) -#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP (V4L2_CID_CODEC_BASE+387) -#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP (V4L2_CID_CODEC_BASE+388) -#define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP (V4L2_CID_CODEC_BASE+389) -#define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP (V4L2_CID_CODEC_BASE+390) -#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR (V4L2_CID_CODEC_BASE+391) -#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR (V4L2_CID_CODEC_BASE+392) -#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR (V4L2_CID_CODEC_BASE+393) -#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR (V4L2_CID_CODEC_BASE+394) -#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR (V4L2_CID_CODEC_BASE+395) -#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR (V4L2_CID_CODEC_BASE+396) -#define V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L6_BR (V4L2_CID_CODEC_BASE+397) -#define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_CODEC_BASE+400) -#define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_CODEC_BASE+401) -#define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_CODEC_BASE+402) -#define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (V4L2_CID_CODEC_BASE+403) -#define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (V4L2_CID_CODEC_BASE+404) -#define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL (V4L2_CID_CODEC_BASE+405) - -enum v4l2_mpeg_video_mpeg4_level { - V4L2_MPEG_VIDEO_MPEG4_LEVEL_0 = 0, - V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B = 1, - V4L2_MPEG_VIDEO_MPEG4_LEVEL_1 = 2, - V4L2_MPEG_VIDEO_MPEG4_LEVEL_2 = 3, - V4L2_MPEG_VIDEO_MPEG4_LEVEL_3 = 4, - V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B = 5, - V4L2_MPEG_VIDEO_MPEG4_LEVEL_4 = 6, - V4L2_MPEG_VIDEO_MPEG4_LEVEL_5 = 7, -}; - -#define V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE (V4L2_CID_CODEC_BASE+406) - -enum v4l2_mpeg_video_mpeg4_profile { - V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE = 0, - V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE = 1, - V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE = 2, - V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE = 3, - V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY = 4, -}; - -#define V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (V4L2_CID_CODEC_BASE+407) -#define V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS (V4L2_CID_CODEC_BASE+500) - -enum v4l2_vp8_num_partitions { - V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION = 0, - V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS = 1, - V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS = 2, - V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS = 3, -}; - -#define V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (V4L2_CID_CODEC_BASE+501) -#define V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES (V4L2_CID_CODEC_BASE+502) - -enum v4l2_vp8_num_ref_frames { - V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME = 0, - V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME = 1, - V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME = 2, -}; - -#define V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (V4L2_CID_CODEC_BASE+503) -#define V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (V4L2_CID_CODEC_BASE+504) -#define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (V4L2_CID_CODEC_BASE+505) -#define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL (V4L2_CID_CODEC_BASE+506) - -enum v4l2_vp8_golden_frame_sel { - V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV = 0, - V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD = 1, -}; - -#define V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (V4L2_CID_CODEC_BASE+507) -#define V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (V4L2_CID_CODEC_BASE+508) -#define V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (V4L2_CID_CODEC_BASE+509) -#define V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (V4L2_CID_CODEC_BASE+510) -#define V4L2_CID_MPEG_VIDEO_VP8_PROFILE (V4L2_CID_CODEC_BASE+511) - -enum v4l2_mpeg_video_vp8_profile { - V4L2_MPEG_VIDEO_VP8_PROFILE_0 = 0, - V4L2_MPEG_VIDEO_VP8_PROFILE_1 = 1, - V4L2_MPEG_VIDEO_VP8_PROFILE_2 = 2, - V4L2_MPEG_VIDEO_VP8_PROFILE_3 = 3, -}; - -#define V4L2_CID_MPEG_VIDEO_VPX_PROFILE V4L2_CID_MPEG_VIDEO_VP8_PROFILE -#define V4L2_CID_MPEG_VIDEO_VP9_PROFILE (V4L2_CID_CODEC_BASE+512) - -enum v4l2_mpeg_video_vp9_profile { - V4L2_MPEG_VIDEO_VP9_PROFILE_0 = 0, - V4L2_MPEG_VIDEO_VP9_PROFILE_1 = 1, - V4L2_MPEG_VIDEO_VP9_PROFILE_2 = 2, - V4L2_MPEG_VIDEO_VP9_PROFILE_3 = 3, -}; - -#define V4L2_CID_MPEG_VIDEO_VP9_LEVEL (V4L2_CID_CODEC_BASE+513) - -enum v4l2_mpeg_video_vp9_level { - V4L2_MPEG_VIDEO_VP9_LEVEL_1_0 = 0, - V4L2_MPEG_VIDEO_VP9_LEVEL_1_1 = 1, - V4L2_MPEG_VIDEO_VP9_LEVEL_2_0 = 2, - V4L2_MPEG_VIDEO_VP9_LEVEL_2_1 = 3, - V4L2_MPEG_VIDEO_VP9_LEVEL_3_0 = 4, - V4L2_MPEG_VIDEO_VP9_LEVEL_3_1 = 5, - V4L2_MPEG_VIDEO_VP9_LEVEL_4_0 = 6, - V4L2_MPEG_VIDEO_VP9_LEVEL_4_1 = 7, - V4L2_MPEG_VIDEO_VP9_LEVEL_5_0 = 8, - V4L2_MPEG_VIDEO_VP9_LEVEL_5_1 = 9, - V4L2_MPEG_VIDEO_VP9_LEVEL_5_2 = 10, - V4L2_MPEG_VIDEO_VP9_LEVEL_6_0 = 11, - V4L2_MPEG_VIDEO_VP9_LEVEL_6_1 = 12, - V4L2_MPEG_VIDEO_VP9_LEVEL_6_2 = 13, -}; - -#define V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (V4L2_CID_CODEC_BASE + 600) -#define V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (V4L2_CID_CODEC_BASE + 601) -#define V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (V4L2_CID_CODEC_BASE + 602) -#define V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (V4L2_CID_CODEC_BASE + 603) -#define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (V4L2_CID_CODEC_BASE + 604) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (V4L2_CID_CODEC_BASE + 605) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE (V4L2_CID_CODEC_BASE + 606) - -enum v4l2_mpeg_video_hevc_hier_coding_type { - V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B = 0, - V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P = 1, -}; - -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (V4L2_CID_CODEC_BASE + 607) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (V4L2_CID_CODEC_BASE + 608) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (V4L2_CID_CODEC_BASE + 609) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (V4L2_CID_CODEC_BASE + 610) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (V4L2_CID_CODEC_BASE + 611) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (V4L2_CID_CODEC_BASE + 612) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (V4L2_CID_CODEC_BASE + 613) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (V4L2_CID_CODEC_BASE + 614) -#define V4L2_CID_MPEG_VIDEO_HEVC_PROFILE (V4L2_CID_CODEC_BASE + 615) - -enum v4l2_mpeg_video_hevc_profile { - V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN = 0, - V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE = 1, - V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10 = 2, -}; - -#define V4L2_CID_MPEG_VIDEO_HEVC_LEVEL (V4L2_CID_CODEC_BASE + 616) - -enum v4l2_mpeg_video_hevc_level { - V4L2_MPEG_VIDEO_HEVC_LEVEL_1 = 0, - V4L2_MPEG_VIDEO_HEVC_LEVEL_2 = 1, - V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1 = 2, - V4L2_MPEG_VIDEO_HEVC_LEVEL_3 = 3, - V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1 = 4, - V4L2_MPEG_VIDEO_HEVC_LEVEL_4 = 5, - V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1 = 6, - V4L2_MPEG_VIDEO_HEVC_LEVEL_5 = 7, - V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1 = 8, - V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2 = 9, - V4L2_MPEG_VIDEO_HEVC_LEVEL_6 = 10, - V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1 = 11, - V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2 = 12, -}; - -#define V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (V4L2_CID_CODEC_BASE + 617) -#define V4L2_CID_MPEG_VIDEO_HEVC_TIER (V4L2_CID_CODEC_BASE + 618) - -enum v4l2_mpeg_video_hevc_tier { - V4L2_MPEG_VIDEO_HEVC_TIER_MAIN = 0, - V4L2_MPEG_VIDEO_HEVC_TIER_HIGH = 1, -}; - -#define V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (V4L2_CID_CODEC_BASE + 619) -#define V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE (V4L2_CID_CODEC_BASE + 620) - -enum v4l2_cid_mpeg_video_hevc_loop_filter_mode { - V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED = 0, - V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED = 1, - V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2, -}; - -#define V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (V4L2_CID_CODEC_BASE + 621) -#define V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (V4L2_CID_CODEC_BASE + 622) -#define V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE (V4L2_CID_CODEC_BASE + 623) - -enum v4l2_cid_mpeg_video_hevc_refresh_type { - V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE = 0, - V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA = 1, - V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR = 2, -}; - -#define V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (V4L2_CID_CODEC_BASE + 624) -#define V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (V4L2_CID_CODEC_BASE + 625) -#define V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (V4L2_CID_CODEC_BASE + 626) -#define V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (V4L2_CID_CODEC_BASE + 627) -#define V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (V4L2_CID_CODEC_BASE + 628) -#define V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (V4L2_CID_CODEC_BASE + 629) -#define V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (V4L2_CID_CODEC_BASE + 630) -#define V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (V4L2_CID_CODEC_BASE + 631) -#define V4L2_CID_MPEG_VIDEO_HEVC_INTRA_PU_SPLIT (V4L2_CID_CODEC_BASE + 632) -#define V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (V4L2_CID_CODEC_BASE + 633) -#define V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (V4L2_CID_CODEC_BASE + 634) -#define V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD (V4L2_CID_CODEC_BASE + 635) - -enum v4l2_cid_mpeg_video_hevc_size_of_length_field { - V4L2_MPEG_VIDEO_HEVC_SIZE_0 = 0, - V4L2_MPEG_VIDEO_HEVC_SIZE_1 = 1, - V4L2_MPEG_VIDEO_HEVC_SIZE_2 = 2, - V4L2_MPEG_VIDEO_HEVC_SIZE_4 = 3, -}; - -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (V4L2_CID_CODEC_BASE + 636) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (V4L2_CID_CODEC_BASE + 637) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (V4L2_CID_CODEC_BASE + 638) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (V4L2_CID_CODEC_BASE + 639) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (V4L2_CID_CODEC_BASE + 640) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (V4L2_CID_CODEC_BASE + 641) -#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (V4L2_CID_CODEC_BASE + 642) -#define V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (V4L2_CID_CODEC_BASE + 643) -#define V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (V4L2_CID_CODEC_BASE + 644) -#define V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY (V4L2_CID_CODEC_BASE + 645) -#define V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE (V4L2_CID_CODEC_BASE + 646) - -enum v4l2_mpeg_video_frame_skip_mode { - V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED = 0, - V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT = 1, - V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT = 2, -}; - -#define V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 647) -#define V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 648) -#define V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 649) -#define V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 650) -#define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 651) -#define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 652) - -#define V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY (V4L2_CID_CODEC_BASE + 653) -#define V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE (V4L2_CID_CODEC_BASE + 654) - -#define V4L2_CID_CODEC_CX2341X_BASE (V4L2_CTRL_CLASS_CODEC | 0x1000) -#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_CODEC_CX2341X_BASE+0) - -enum v4l2_mpeg_cx2341x_video_spatial_filter_mode { - V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0, - V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO = 1, -}; - -#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (V4L2_CID_CODEC_CX2341X_BASE+1) -#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (V4L2_CID_CODEC_CX2341X_BASE+2) - -enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type { - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF = 0, - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR = 1, - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT = 2, - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE = 3, - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4, -}; - -#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (V4L2_CID_CODEC_CX2341X_BASE+3) - -enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type { - V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF = 0, - V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1, -}; - -#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (V4L2_CID_CODEC_CX2341X_BASE+4) - -enum v4l2_mpeg_cx2341x_video_temporal_filter_mode { - V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0, - V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO = 1, -}; - -#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (V4L2_CID_CODEC_CX2341X_BASE+5) -#define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (V4L2_CID_CODEC_CX2341X_BASE+6) - -enum v4l2_mpeg_cx2341x_video_median_filter_type { - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF = 0, - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR = 1, - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT = 2, - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3, - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG = 4, -}; - -#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_CODEC_CX2341X_BASE+7) -#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_CODEC_CX2341X_BASE+8) -#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_CODEC_CX2341X_BASE+9) -#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_CODEC_CX2341X_BASE+10) -#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_CODEC_CX2341X_BASE+11) - -#define V4L2_CID_CODEC_MFC51_BASE (V4L2_CTRL_CLASS_CODEC | 0x1100) - -#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (V4L2_CID_CODEC_MFC51_BASE+0) -#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (V4L2_CID_CODEC_MFC51_BASE+1) -#define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE (V4L2_CID_CODEC_MFC51_BASE+2) - -enum v4l2_mpeg_mfc51_video_frame_skip_mode { - V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED = 0, - V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT = 1, - V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT = 2, -}; - -#define V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE (V4L2_CID_CODEC_MFC51_BASE+3) - -enum v4l2_mpeg_mfc51_video_force_frame_type { - V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED = 0, - V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME = 1, - V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_NOT_CODED = 2, -}; - -#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING (V4L2_CID_CODEC_MFC51_BASE+4) -#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (V4L2_CID_CODEC_MFC51_BASE+5) -#define V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (V4L2_CID_CODEC_MFC51_BASE+6) -#define V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (V4L2_CID_CODEC_MFC51_BASE+7) -#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (V4L2_CID_CODEC_MFC51_BASE+50) -#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (V4L2_CID_CODEC_MFC51_BASE+51) -#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (V4L2_CID_CODEC_MFC51_BASE+52) -#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (V4L2_CID_CODEC_MFC51_BASE+53) -#define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (V4L2_CID_CODEC_MFC51_BASE+54) - -#define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900) -#define V4L2_CID_CAMERA_CLASS (V4L2_CTRL_CLASS_CAMERA | 1) - -#define V4L2_CID_EXPOSURE_AUTO (V4L2_CID_CAMERA_CLASS_BASE+1) - -enum v4l2_exposure_auto_type { - V4L2_EXPOSURE_AUTO = 0, - V4L2_EXPOSURE_MANUAL = 1, - V4L2_EXPOSURE_SHUTTER_PRIORITY = 2, - V4L2_EXPOSURE_APERTURE_PRIORITY = 3 -}; - -#define V4L2_CID_EXPOSURE_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+2) -#define V4L2_CID_EXPOSURE_AUTO_PRIORITY (V4L2_CID_CAMERA_CLASS_BASE+3) - -#define V4L2_CID_PAN_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+4) -#define V4L2_CID_TILT_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+5) -#define V4L2_CID_PAN_RESET (V4L2_CID_CAMERA_CLASS_BASE+6) -#define V4L2_CID_TILT_RESET (V4L2_CID_CAMERA_CLASS_BASE+7) - -#define V4L2_CID_PAN_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+8) -#define V4L2_CID_TILT_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+9) - -#define V4L2_CID_FOCUS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+10) -#define V4L2_CID_FOCUS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+11) -#define V4L2_CID_FOCUS_AUTO (V4L2_CID_CAMERA_CLASS_BASE+12) - -#define V4L2_CID_ZOOM_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+13) -#define V4L2_CID_ZOOM_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+14) -#define V4L2_CID_ZOOM_CONTINUOUS (V4L2_CID_CAMERA_CLASS_BASE+15) - -#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) - -#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17) -#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18) - -#define V4L2_CID_AUTO_EXPOSURE_BIAS (V4L2_CID_CAMERA_CLASS_BASE+19) -#define V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE (V4L2_CID_CAMERA_CLASS_BASE+20) - -enum v4l2_auto_n_preset_white_balance { - V4L2_WHITE_BALANCE_MANUAL = 0, - V4L2_WHITE_BALANCE_AUTO = 1, - V4L2_WHITE_BALANCE_INCANDESCENT = 2, - V4L2_WHITE_BALANCE_FLUORESCENT = 3, - V4L2_WHITE_BALANCE_FLUORESCENT_H = 4, - V4L2_WHITE_BALANCE_HORIZON = 5, - V4L2_WHITE_BALANCE_DAYLIGHT = 6, - V4L2_WHITE_BALANCE_FLASH = 7, - V4L2_WHITE_BALANCE_CLOUDY = 8, - V4L2_WHITE_BALANCE_SHADE = 9, -}; - -#define V4L2_CID_WIDE_DYNAMIC_RANGE (V4L2_CID_CAMERA_CLASS_BASE+21) -#define V4L2_CID_IMAGE_STABILIZATION (V4L2_CID_CAMERA_CLASS_BASE+22) - -#define V4L2_CID_ISO_SENSITIVITY (V4L2_CID_CAMERA_CLASS_BASE+23) -#define V4L2_CID_ISO_SENSITIVITY_AUTO (V4L2_CID_CAMERA_CLASS_BASE+24) - -enum v4l2_iso_sensitivity_auto_type { - V4L2_ISO_SENSITIVITY_MANUAL = 0, - V4L2_ISO_SENSITIVITY_AUTO = 1, -}; - -#define V4L2_CID_EXPOSURE_METERING (V4L2_CID_CAMERA_CLASS_BASE+25) - -enum v4l2_exposure_metering { - V4L2_EXPOSURE_METERING_AVERAGE = 0, - V4L2_EXPOSURE_METERING_CENTER_WEIGHTED = 1, - V4L2_EXPOSURE_METERING_SPOT = 2, - V4L2_EXPOSURE_METERING_MATRIX = 3, -}; - -#define V4L2_CID_SCENE_MODE (V4L2_CID_CAMERA_CLASS_BASE+26) - -enum v4l2_scene_mode { - V4L2_SCENE_MODE_NONE = 0, - V4L2_SCENE_MODE_BACKLIGHT = 1, - V4L2_SCENE_MODE_BEACH_SNOW = 2, - V4L2_SCENE_MODE_CANDLE_LIGHT = 3, - V4L2_SCENE_MODE_DAWN_DUSK = 4, - V4L2_SCENE_MODE_FALL_COLORS = 5, - V4L2_SCENE_MODE_FIREWORKS = 6, - V4L2_SCENE_MODE_LANDSCAPE = 7, - V4L2_SCENE_MODE_NIGHT = 8, - V4L2_SCENE_MODE_PARTY_INDOOR = 9, - V4L2_SCENE_MODE_PORTRAIT = 10, - V4L2_SCENE_MODE_SPORTS = 11, - V4L2_SCENE_MODE_SUNSET = 12, - V4L2_SCENE_MODE_TEXT = 13, -}; - -#define V4L2_CID_3A_LOCK (V4L2_CID_CAMERA_CLASS_BASE+27) -#define V4L2_LOCK_EXPOSURE (1 << 0) -#define V4L2_LOCK_WHITE_BALANCE (1 << 1) -#define V4L2_LOCK_FOCUS (1 << 2) - -#define V4L2_CID_AUTO_FOCUS_START (V4L2_CID_CAMERA_CLASS_BASE+28) -#define V4L2_CID_AUTO_FOCUS_STOP (V4L2_CID_CAMERA_CLASS_BASE+29) -#define V4L2_CID_AUTO_FOCUS_STATUS (V4L2_CID_CAMERA_CLASS_BASE+30) -#define V4L2_AUTO_FOCUS_STATUS_IDLE (0 << 0) -#define V4L2_AUTO_FOCUS_STATUS_BUSY (1 << 0) -#define V4L2_AUTO_FOCUS_STATUS_REACHED (1 << 1) -#define V4L2_AUTO_FOCUS_STATUS_FAILED (1 << 2) - -#define V4L2_CID_AUTO_FOCUS_RANGE (V4L2_CID_CAMERA_CLASS_BASE+31) - -enum v4l2_auto_focus_range { - V4L2_AUTO_FOCUS_RANGE_AUTO = 0, - V4L2_AUTO_FOCUS_RANGE_NORMAL = 1, - V4L2_AUTO_FOCUS_RANGE_MACRO = 2, - V4L2_AUTO_FOCUS_RANGE_INFINITY = 3, -}; - -#define V4L2_CID_PAN_SPEED (V4L2_CID_CAMERA_CLASS_BASE+32) -#define V4L2_CID_TILT_SPEED (V4L2_CID_CAMERA_CLASS_BASE+33) - -#define V4L2_CID_CAMERA_ORIENTATION (V4L2_CID_CAMERA_CLASS_BASE+34) -#define V4L2_CAMERA_ORIENTATION_FRONT 0 -#define V4L2_CAMERA_ORIENTATION_BACK 1 -#define V4L2_CAMERA_ORIENTATION_EXTERNAL 2 - -#define V4L2_CID_CAMERA_SENSOR_ROTATION (V4L2_CID_CAMERA_CLASS_BASE+35) -#define V4L2_CID_HDR_SENSOR_MODE (V4L2_CID_CAMERA_CLASS_BASE+36) - -#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) -#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) - -#define V4L2_CID_RDS_TX_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 1) -#define V4L2_CID_RDS_TX_PI (V4L2_CID_FM_TX_CLASS_BASE + 2) -#define V4L2_CID_RDS_TX_PTY (V4L2_CID_FM_TX_CLASS_BASE + 3) -#define V4L2_CID_RDS_TX_PS_NAME (V4L2_CID_FM_TX_CLASS_BASE + 5) -#define V4L2_CID_RDS_TX_RADIO_TEXT (V4L2_CID_FM_TX_CLASS_BASE + 6) -#define V4L2_CID_RDS_TX_MONO_STEREO (V4L2_CID_FM_TX_CLASS_BASE + 7) -#define V4L2_CID_RDS_TX_ARTIFICIAL_HEAD (V4L2_CID_FM_TX_CLASS_BASE + 8) -#define V4L2_CID_RDS_TX_COMPRESSED (V4L2_CID_FM_TX_CLASS_BASE + 9) -#define V4L2_CID_RDS_TX_DYNAMIC_PTY (V4L2_CID_FM_TX_CLASS_BASE + 10) -#define V4L2_CID_RDS_TX_TRAFFIC_ANNOUNCEMENT (V4L2_CID_FM_TX_CLASS_BASE + 11) -#define V4L2_CID_RDS_TX_TRAFFIC_PROGRAM (V4L2_CID_FM_TX_CLASS_BASE + 12) -#define V4L2_CID_RDS_TX_MUSIC_SPEECH (V4L2_CID_FM_TX_CLASS_BASE + 13) -#define V4L2_CID_RDS_TX_ALT_FREQS_ENABLE (V4L2_CID_FM_TX_CLASS_BASE + 14) -#define V4L2_CID_RDS_TX_ALT_FREQS (V4L2_CID_FM_TX_CLASS_BASE + 15) - -#define V4L2_CID_AUDIO_LIMITER_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 64) -#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 65) -#define V4L2_CID_AUDIO_LIMITER_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 66) - -#define V4L2_CID_AUDIO_COMPRESSION_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 80) -#define V4L2_CID_AUDIO_COMPRESSION_GAIN (V4L2_CID_FM_TX_CLASS_BASE + 81) -#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD (V4L2_CID_FM_TX_CLASS_BASE + 82) -#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME (V4L2_CID_FM_TX_CLASS_BASE + 83) -#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 84) - -#define V4L2_CID_PILOT_TONE_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 96) -#define V4L2_CID_PILOT_TONE_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 97) -#define V4L2_CID_PILOT_TONE_FREQUENCY (V4L2_CID_FM_TX_CLASS_BASE + 98) - -#define V4L2_CID_TUNE_PREEMPHASIS (V4L2_CID_FM_TX_CLASS_BASE + 112) - -enum v4l2_preemphasis { - V4L2_PREEMPHASIS_DISABLED = 0, - V4L2_PREEMPHASIS_50_uS = 1, - V4L2_PREEMPHASIS_75_uS = 2, -}; - -#define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113) -#define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114) - -#define V4L2_CID_FLASH_CLASS_BASE (V4L2_CTRL_CLASS_FLASH | 0x900) -#define V4L2_CID_FLASH_CLASS (V4L2_CTRL_CLASS_FLASH | 1) - -#define V4L2_CID_FLASH_LED_MODE (V4L2_CID_FLASH_CLASS_BASE + 1) - -enum v4l2_flash_led_mode { - V4L2_FLASH_LED_MODE_NONE, - V4L2_FLASH_LED_MODE_FLASH, - V4L2_FLASH_LED_MODE_TORCH, -}; - -#define V4L2_CID_FLASH_STROBE_SOURCE (V4L2_CID_FLASH_CLASS_BASE + 2) - -enum v4l2_flash_strobe_source { - V4L2_FLASH_STROBE_SOURCE_SOFTWARE, - V4L2_FLASH_STROBE_SOURCE_EXTERNAL, -}; - -#define V4L2_CID_FLASH_STROBE (V4L2_CID_FLASH_CLASS_BASE + 3) -#define V4L2_CID_FLASH_STROBE_STOP (V4L2_CID_FLASH_CLASS_BASE + 4) -#define V4L2_CID_FLASH_STROBE_STATUS (V4L2_CID_FLASH_CLASS_BASE + 5) - -#define V4L2_CID_FLASH_TIMEOUT (V4L2_CID_FLASH_CLASS_BASE + 6) -#define V4L2_CID_FLASH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 7) -#define V4L2_CID_FLASH_TORCH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 8) -#define V4L2_CID_FLASH_INDICATOR_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 9) - -#define V4L2_CID_FLASH_FAULT (V4L2_CID_FLASH_CLASS_BASE + 10) -#define V4L2_FLASH_FAULT_OVER_VOLTAGE (1 << 0) -#define V4L2_FLASH_FAULT_TIMEOUT (1 << 1) -#define V4L2_FLASH_FAULT_OVER_TEMPERATURE (1 << 2) -#define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3) -#define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4) -#define V4L2_FLASH_FAULT_INDICATOR (1 << 5) -#define V4L2_FLASH_FAULT_UNDER_VOLTAGE (1 << 6) -#define V4L2_FLASH_FAULT_INPUT_VOLTAGE (1 << 7) -#define V4L2_FLASH_FAULT_LED_OVER_TEMPERATURE (1 << 8) - -#define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11) -#define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12) - -#define V4L2_CID_JPEG_CLASS_BASE (V4L2_CTRL_CLASS_JPEG | 0x900) -#define V4L2_CID_JPEG_CLASS (V4L2_CTRL_CLASS_JPEG | 1) - -#define V4L2_CID_JPEG_CHROMA_SUBSAMPLING (V4L2_CID_JPEG_CLASS_BASE + 1) - -enum v4l2_jpeg_chroma_subsampling { - V4L2_JPEG_CHROMA_SUBSAMPLING_444 = 0, - V4L2_JPEG_CHROMA_SUBSAMPLING_422 = 1, - V4L2_JPEG_CHROMA_SUBSAMPLING_420 = 2, - V4L2_JPEG_CHROMA_SUBSAMPLING_411 = 3, - V4L2_JPEG_CHROMA_SUBSAMPLING_410 = 4, - V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY = 5, -}; - -#define V4L2_CID_JPEG_RESTART_INTERVAL (V4L2_CID_JPEG_CLASS_BASE + 2) -#define V4L2_CID_JPEG_COMPRESSION_QUALITY (V4L2_CID_JPEG_CLASS_BASE + 3) - -#define V4L2_CID_JPEG_ACTIVE_MARKER (V4L2_CID_JPEG_CLASS_BASE + 4) -#define V4L2_JPEG_ACTIVE_MARKER_APP0 (1 << 0) -#define V4L2_JPEG_ACTIVE_MARKER_APP1 (1 << 1) -#define V4L2_JPEG_ACTIVE_MARKER_COM (1 << 16) -#define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17) -#define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18) - -#define V4L2_CID_IMAGE_SOURCE_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_SOURCE | 0x900) -#define V4L2_CID_IMAGE_SOURCE_CLASS (V4L2_CTRL_CLASS_IMAGE_SOURCE | 1) - -#define V4L2_CID_VBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1) -#define V4L2_CID_HBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2) -#define V4L2_CID_ANALOGUE_GAIN (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3) -#define V4L2_CID_TEST_PATTERN_RED (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 4) -#define V4L2_CID_TEST_PATTERN_GREENR (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 5) -#define V4L2_CID_TEST_PATTERN_BLUE (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6) -#define V4L2_CID_TEST_PATTERN_GREENB (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7) -#define V4L2_CID_UNIT_CELL_SIZE (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 8) -#define V4L2_CID_NOTIFY_GAINS (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 9) - -#define V4L2_CID_IMAGE_PROC_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_PROC | 0x900) -#define V4L2_CID_IMAGE_PROC_CLASS (V4L2_CTRL_CLASS_IMAGE_PROC | 1) - -#define V4L2_CID_LINK_FREQ (V4L2_CID_IMAGE_PROC_CLASS_BASE + 1) -#define V4L2_CID_PIXEL_RATE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 2) -#define V4L2_CID_TEST_PATTERN (V4L2_CID_IMAGE_PROC_CLASS_BASE + 3) -#define V4L2_CID_DEINTERLACING_MODE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 4) -#define V4L2_CID_DIGITAL_GAIN (V4L2_CID_IMAGE_PROC_CLASS_BASE + 5) - -#define V4L2_CID_DV_CLASS_BASE (V4L2_CTRL_CLASS_DV | 0x900) -#define V4L2_CID_DV_CLASS (V4L2_CTRL_CLASS_DV | 1) - -#define V4L2_CID_DV_TX_HOTPLUG (V4L2_CID_DV_CLASS_BASE + 1) -#define V4L2_CID_DV_TX_RXSENSE (V4L2_CID_DV_CLASS_BASE + 2) -#define V4L2_CID_DV_TX_EDID_PRESENT (V4L2_CID_DV_CLASS_BASE + 3) -#define V4L2_CID_DV_TX_MODE (V4L2_CID_DV_CLASS_BASE + 4) - -enum v4l2_dv_tx_mode { - V4L2_DV_TX_MODE_DVI_D = 0, - V4L2_DV_TX_MODE_HDMI = 1, -}; - -#define V4L2_CID_DV_TX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 5) - -enum v4l2_dv_rgb_range { - V4L2_DV_RGB_RANGE_AUTO = 0, - V4L2_DV_RGB_RANGE_LIMITED = 1, - V4L2_DV_RGB_RANGE_FULL = 2, -}; - -#define V4L2_CID_DV_TX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 6) - -enum v4l2_dv_it_content_type { - V4L2_DV_IT_CONTENT_TYPE_GRAPHICS = 0, - V4L2_DV_IT_CONTENT_TYPE_PHOTO = 1, - V4L2_DV_IT_CONTENT_TYPE_CINEMA = 2, - V4L2_DV_IT_CONTENT_TYPE_GAME = 3, - V4L2_DV_IT_CONTENT_TYPE_NO_ITC = 4, -}; - -#define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100) -#define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101) -#define V4L2_CID_DV_RX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 102) - -#define V4L2_CID_FM_RX_CLASS_BASE (V4L2_CTRL_CLASS_FM_RX | 0x900) -#define V4L2_CID_FM_RX_CLASS (V4L2_CTRL_CLASS_FM_RX | 1) - -#define V4L2_CID_TUNE_DEEMPHASIS (V4L2_CID_FM_RX_CLASS_BASE + 1) - -enum v4l2_deemphasis { - V4L2_DEEMPHASIS_DISABLED = V4L2_PREEMPHASIS_DISABLED, - V4L2_DEEMPHASIS_50_uS = V4L2_PREEMPHASIS_50_uS, - V4L2_DEEMPHASIS_75_uS = V4L2_PREEMPHASIS_75_uS, -}; - -#define V4L2_CID_RDS_RECEPTION (V4L2_CID_FM_RX_CLASS_BASE + 2) -#define V4L2_CID_RDS_RX_PTY (V4L2_CID_FM_RX_CLASS_BASE + 3) -#define V4L2_CID_RDS_RX_PS_NAME (V4L2_CID_FM_RX_CLASS_BASE + 4) -#define V4L2_CID_RDS_RX_RADIO_TEXT (V4L2_CID_FM_RX_CLASS_BASE + 5) -#define V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT (V4L2_CID_FM_RX_CLASS_BASE + 6) -#define V4L2_CID_RDS_RX_TRAFFIC_PROGRAM (V4L2_CID_FM_RX_CLASS_BASE + 7) -#define V4L2_CID_RDS_RX_MUSIC_SPEECH (V4L2_CID_FM_RX_CLASS_BASE + 8) - -#define V4L2_CID_RF_TUNER_CLASS_BASE (V4L2_CTRL_CLASS_RF_TUNER | 0x900) -#define V4L2_CID_RF_TUNER_CLASS (V4L2_CTRL_CLASS_RF_TUNER | 1) - -#define V4L2_CID_RF_TUNER_BANDWIDTH_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 11) -#define V4L2_CID_RF_TUNER_BANDWIDTH (V4L2_CID_RF_TUNER_CLASS_BASE + 12) -#define V4L2_CID_RF_TUNER_RF_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 32) -#define V4L2_CID_RF_TUNER_LNA_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 41) -#define V4L2_CID_RF_TUNER_LNA_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 42) -#define V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 51) -#define V4L2_CID_RF_TUNER_MIXER_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 52) -#define V4L2_CID_RF_TUNER_IF_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 61) -#define V4L2_CID_RF_TUNER_IF_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 62) -#define V4L2_CID_RF_TUNER_PLL_LOCK (V4L2_CID_RF_TUNER_CLASS_BASE + 91) - -#define V4L2_CID_DETECT_CLASS_BASE (V4L2_CTRL_CLASS_DETECT | 0x900) -#define V4L2_CID_DETECT_CLASS (V4L2_CTRL_CLASS_DETECT | 1) - -#define V4L2_CID_DETECT_MD_MODE (V4L2_CID_DETECT_CLASS_BASE + 1) - -enum v4l2_detect_md_mode { - V4L2_DETECT_MD_MODE_DISABLED = 0, - V4L2_DETECT_MD_MODE_GLOBAL = 1, - V4L2_DETECT_MD_MODE_THRESHOLD_GRID = 2, - V4L2_DETECT_MD_MODE_REGION_GRID = 3, -}; - -#define V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD (V4L2_CID_DETECT_CLASS_BASE + 2) -#define V4L2_CID_DETECT_MD_THRESHOLD_GRID (V4L2_CID_DETECT_CLASS_BASE + 3) -#define V4L2_CID_DETECT_MD_REGION_GRID (V4L2_CID_DETECT_CLASS_BASE + 4) - -#define V4L2_CID_CODEC_STATELESS_BASE (V4L2_CTRL_CLASS_CODEC_STATELESS | 0x900) -#define V4L2_CID_CODEC_STATELESS_CLASS (V4L2_CTRL_CLASS_CODEC_STATELESS | 1) - -#define V4L2_CID_STATELESS_H264_DECODE_MODE (V4L2_CID_CODEC_STATELESS_BASE + 0) - -enum v4l2_stateless_h264_decode_mode { - V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED, - V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED, -}; - -#define V4L2_CID_STATELESS_H264_START_CODE (V4L2_CID_CODEC_STATELESS_BASE + 1) - -enum v4l2_stateless_h264_start_code { - V4L2_STATELESS_H264_START_CODE_NONE, - V4L2_STATELESS_H264_START_CODE_ANNEX_B, -}; - -#define V4L2_H264_SPS_CONSTRAINT_SET0_FLAG 0x01 -#define V4L2_H264_SPS_CONSTRAINT_SET1_FLAG 0x02 -#define V4L2_H264_SPS_CONSTRAINT_SET2_FLAG 0x04 -#define V4L2_H264_SPS_CONSTRAINT_SET3_FLAG 0x08 -#define V4L2_H264_SPS_CONSTRAINT_SET4_FLAG 0x10 -#define V4L2_H264_SPS_CONSTRAINT_SET5_FLAG 0x20 - -#define V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE 0x01 -#define V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS 0x02 -#define V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO 0x04 -#define V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED 0x08 -#define V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY 0x10 -#define V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD 0x20 -#define V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE 0x40 - -#define V4L2_H264_SPS_HAS_CHROMA_FORMAT(sps) \ - ((sps)->profile_idc == 100 || (sps)->profile_idc == 110 || \ - (sps)->profile_idc == 122 || (sps)->profile_idc == 244 || \ - (sps)->profile_idc == 44 || (sps)->profile_idc == 83 || \ - (sps)->profile_idc == 86 || (sps)->profile_idc == 118 || \ - (sps)->profile_idc == 128 || (sps)->profile_idc == 138 || \ - (sps)->profile_idc == 139 || (sps)->profile_idc == 134 || \ - (sps)->profile_idc == 135) - -#define V4L2_CID_STATELESS_H264_SPS (V4L2_CID_CODEC_STATELESS_BASE + 2) - -struct v4l2_ctrl_h264_sps { - __u8 profile_idc; - __u8 constraint_set_flags; - __u8 level_idc; - __u8 seq_parameter_set_id; - __u8 chroma_format_idc; - __u8 bit_depth_luma_minus8; - __u8 bit_depth_chroma_minus8; - __u8 log2_max_frame_num_minus4; - __u8 pic_order_cnt_type; - __u8 log2_max_pic_order_cnt_lsb_minus4; - __u8 max_num_ref_frames; - __u8 num_ref_frames_in_pic_order_cnt_cycle; - __s32 offset_for_ref_frame[255]; - __s32 offset_for_non_ref_pic; - __s32 offset_for_top_to_bottom_field; - __u16 pic_width_in_mbs_minus1; - __u16 pic_height_in_map_units_minus1; - __u32 flags; -}; - -#define V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE 0x0001 -#define V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT 0x0002 -#define V4L2_H264_PPS_FLAG_WEIGHTED_PRED 0x0004 -#define V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT 0x0008 -#define V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED 0x0010 -#define V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT 0x0020 -#define V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE 0x0040 -#define V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT 0x0080 - -#define V4L2_CID_STATELESS_H264_PPS (V4L2_CID_CODEC_STATELESS_BASE + 3) - -struct v4l2_ctrl_h264_pps { - __u8 pic_parameter_set_id; - __u8 seq_parameter_set_id; - __u8 num_slice_groups_minus1; - __u8 num_ref_idx_l0_default_active_minus1; - __u8 num_ref_idx_l1_default_active_minus1; - __u8 weighted_bipred_idc; - __s8 pic_init_qp_minus26; - __s8 pic_init_qs_minus26; - __s8 chroma_qp_index_offset; - __s8 second_chroma_qp_index_offset; - __u16 flags; -}; - -#define V4L2_CID_STATELESS_H264_SCALING_MATRIX (V4L2_CID_CODEC_STATELESS_BASE + 4) - -struct v4l2_ctrl_h264_scaling_matrix { - __u8 scaling_list_4x4[6][16]; - __u8 scaling_list_8x8[6][64]; -}; - -struct v4l2_h264_weight_factors { - __s16 luma_weight[32]; - __s16 luma_offset[32]; - __s16 chroma_weight[32][2]; - __s16 chroma_offset[32][2]; -}; - -#define V4L2_H264_CTRL_PRED_WEIGHTS_REQUIRED(pps, slice) \ - ((((pps)->flags & V4L2_H264_PPS_FLAG_WEIGHTED_PRED) && \ - ((slice)->slice_type == V4L2_H264_SLICE_TYPE_P || \ - (slice)->slice_type == V4L2_H264_SLICE_TYPE_SP)) || \ - ((pps)->weighted_bipred_idc == 1 && \ - (slice)->slice_type == V4L2_H264_SLICE_TYPE_B)) - -#define V4L2_CID_STATELESS_H264_PRED_WEIGHTS (V4L2_CID_CODEC_STATELESS_BASE + 5) - -struct v4l2_ctrl_h264_pred_weights { - __u16 luma_log2_weight_denom; - __u16 chroma_log2_weight_denom; - struct v4l2_h264_weight_factors weight_factors[2]; -}; - -#define V4L2_H264_SLICE_TYPE_P 0 -#define V4L2_H264_SLICE_TYPE_B 1 -#define V4L2_H264_SLICE_TYPE_I 2 -#define V4L2_H264_SLICE_TYPE_SP 3 -#define V4L2_H264_SLICE_TYPE_SI 4 - -#define V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED 0x01 -#define V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH 0x02 - -#define V4L2_H264_TOP_FIELD_REF 0x1 -#define V4L2_H264_BOTTOM_FIELD_REF 0x2 -#define V4L2_H264_FRAME_REF 0x3 - -struct v4l2_h264_reference { - __u8 fields; - __u8 index; -}; - -#define V4L2_H264_NUM_DPB_ENTRIES 16 -#define V4L2_H264_REF_LIST_LEN (2 * V4L2_H264_NUM_DPB_ENTRIES) - -#define V4L2_CID_STATELESS_H264_SLICE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 6) - -struct v4l2_ctrl_h264_slice_params { - __u32 header_bit_size; - __u32 first_mb_in_slice; - __u8 slice_type; - __u8 colour_plane_id; - __u8 redundant_pic_cnt; - __u8 cabac_init_idc; - __s8 slice_qp_delta; - __s8 slice_qs_delta; - __u8 disable_deblocking_filter_idc; - __s8 slice_alpha_c0_offset_div2; - __s8 slice_beta_offset_div2; - __u8 num_ref_idx_l0_active_minus1; - __u8 num_ref_idx_l1_active_minus1; - - __u8 reserved; - - struct v4l2_h264_reference ref_pic_list0[V4L2_H264_REF_LIST_LEN]; - struct v4l2_h264_reference ref_pic_list1[V4L2_H264_REF_LIST_LEN]; - - __u32 flags; -}; - -#define V4L2_H264_DPB_ENTRY_FLAG_VALID 0x01 -#define V4L2_H264_DPB_ENTRY_FLAG_ACTIVE 0x02 -#define V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM 0x04 -#define V4L2_H264_DPB_ENTRY_FLAG_FIELD 0x08 - -struct v4l2_h264_dpb_entry { - __u64 reference_ts; - __u32 pic_num; - __u16 frame_num; - __u8 fields; - __u8 reserved[5]; - __s32 top_field_order_cnt; - __s32 bottom_field_order_cnt; - __u32 flags; -}; - -#define V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC 0x01 -#define V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC 0x02 -#define V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD 0x04 -#define V4L2_H264_DECODE_PARAM_FLAG_PFRAME 0x08 -#define V4L2_H264_DECODE_PARAM_FLAG_BFRAME 0x10 - -#define V4L2_CID_STATELESS_H264_DECODE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 7) - -struct v4l2_ctrl_h264_decode_params { - struct v4l2_h264_dpb_entry dpb[V4L2_H264_NUM_DPB_ENTRIES]; - __u16 nal_ref_idc; - __u16 frame_num; - __s32 top_field_order_cnt; - __s32 bottom_field_order_cnt; - __u16 idr_pic_id; - __u16 pic_order_cnt_lsb; - __s32 delta_pic_order_cnt_bottom; - __s32 delta_pic_order_cnt0; - __s32 delta_pic_order_cnt1; - __u32 dec_ref_pic_marking_bit_size; - __u32 pic_order_cnt_bit_size; - __u32 slice_group_change_cycle; - - __u32 reserved; - __u32 flags; -}; - -#define V4L2_FWHT_VERSION 3 - -#define V4L2_FWHT_FL_IS_INTERLACED _BITUL(0) -#define V4L2_FWHT_FL_IS_BOTTOM_FIRST _BITUL(1) -#define V4L2_FWHT_FL_IS_ALTERNATE _BITUL(2) -#define V4L2_FWHT_FL_IS_BOTTOM_FIELD _BITUL(3) -#define V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED _BITUL(4) -#define V4L2_FWHT_FL_CB_IS_UNCOMPRESSED _BITUL(5) -#define V4L2_FWHT_FL_CR_IS_UNCOMPRESSED _BITUL(6) -#define V4L2_FWHT_FL_CHROMA_FULL_HEIGHT _BITUL(7) -#define V4L2_FWHT_FL_CHROMA_FULL_WIDTH _BITUL(8) -#define V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED _BITUL(9) -#define V4L2_FWHT_FL_I_FRAME _BITUL(10) - -#define V4L2_FWHT_FL_COMPONENTS_NUM_MSK GENMASK(18, 16) -#define V4L2_FWHT_FL_COMPONENTS_NUM_OFFSET 16 - -#define V4L2_FWHT_FL_PIXENC_MSK GENMASK(20, 19) -#define V4L2_FWHT_FL_PIXENC_OFFSET 19 -#define V4L2_FWHT_FL_PIXENC_YUV (1 << V4L2_FWHT_FL_PIXENC_OFFSET) -#define V4L2_FWHT_FL_PIXENC_RGB (2 << V4L2_FWHT_FL_PIXENC_OFFSET) -#define V4L2_FWHT_FL_PIXENC_HSV (3 << V4L2_FWHT_FL_PIXENC_OFFSET) - -#define V4L2_CID_STATELESS_FWHT_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 100) - -struct v4l2_ctrl_fwht_params { - __u64 backward_ref_ts; - __u32 version; - __u32 width; - __u32 height; - __u32 flags; - __u32 colorspace; - __u32 xfer_func; - __u32 ycbcr_enc; - __u32 quantization; -}; - -#define V4L2_VP8_SEGMENT_FLAG_ENABLED 0x01 -#define V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP 0x02 -#define V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA 0x04 -#define V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE 0x08 - -struct v4l2_vp8_segment { - __s8 quant_update[4]; - __s8 lf_update[4]; - __u8 segment_probs[3]; - __u8 padding; - __u32 flags; -}; - -#define V4L2_VP8_LF_ADJ_ENABLE 0x01 -#define V4L2_VP8_LF_DELTA_UPDATE 0x02 -#define V4L2_VP8_LF_FILTER_TYPE_SIMPLE 0x04 - -struct v4l2_vp8_loop_filter { - __s8 ref_frm_delta[4]; - __s8 mb_mode_delta[4]; - __u8 sharpness_level; - __u8 level; - __u16 padding; - __u32 flags; -}; - -struct v4l2_vp8_quantization { - __u8 y_ac_qi; - __s8 y_dc_delta; - __s8 y2_dc_delta; - __s8 y2_ac_delta; - __s8 uv_dc_delta; - __s8 uv_ac_delta; - __u16 padding; -}; - -#define V4L2_VP8_COEFF_PROB_CNT 11 -#define V4L2_VP8_MV_PROB_CNT 19 - -struct v4l2_vp8_entropy { - __u8 coeff_probs[4][8][3][V4L2_VP8_COEFF_PROB_CNT]; - __u8 y_mode_probs[4]; - __u8 uv_mode_probs[3]; - __u8 mv_probs[2][V4L2_VP8_MV_PROB_CNT]; - __u8 padding[3]; -}; - -struct v4l2_vp8_entropy_coder_state { - __u8 range; - __u8 value; - __u8 bit_count; - __u8 padding; -}; - -#define V4L2_VP8_FRAME_FLAG_KEY_FRAME 0x01 -#define V4L2_VP8_FRAME_FLAG_EXPERIMENTAL 0x02 -#define V4L2_VP8_FRAME_FLAG_SHOW_FRAME 0x04 -#define V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF 0x08 -#define V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN 0x10 -#define V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT 0x20 - -#define V4L2_VP8_FRAME_IS_KEY_FRAME(hdr) (!!((hdr)->flags & V4L2_VP8_FRAME_FLAG_KEY_FRAME)) - -#define V4L2_CID_STATELESS_VP8_FRAME (V4L2_CID_CODEC_STATELESS_BASE + 200) - -struct v4l2_ctrl_vp8_frame { - struct v4l2_vp8_segment segment; - struct v4l2_vp8_loop_filter lf; - struct v4l2_vp8_quantization quant; - struct v4l2_vp8_entropy entropy; - struct v4l2_vp8_entropy_coder_state coder_state; - - __u16 width; - __u16 height; - __u8 horizontal_scale; - __u8 vertical_scale; - __u8 version; - __u8 prob_skip_false; - __u8 prob_intra; - __u8 prob_last; - __u8 prob_gf; - __u8 num_dct_parts; - __u32 first_part_size; - __u32 first_part_header_bits; - __u32 dct_part_sizes[8]; - __u64 last_frame_ts; - __u64 golden_frame_ts; - __u64 alt_frame_ts; - __u64 flags; -}; - -#define V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE 0x01 -#define V4L2_CID_STATELESS_MPEG2_SEQUENCE (V4L2_CID_CODEC_STATELESS_BASE+220) - -struct v4l2_ctrl_mpeg2_sequence { - __u16 horizontal_size; - __u16 vertical_size; - __u32 vbv_buffer_size; - __u16 profile_and_level_indication; - __u8 chroma_format; - __u8 flags; -}; - -#define V4L2_MPEG2_PIC_CODING_TYPE_I 1 -#define V4L2_MPEG2_PIC_CODING_TYPE_P 2 -#define V4L2_MPEG2_PIC_CODING_TYPE_B 3 -#define V4L2_MPEG2_PIC_CODING_TYPE_D 4 - -#define V4L2_MPEG2_PIC_TOP_FIELD 0x1 -#define V4L2_MPEG2_PIC_BOTTOM_FIELD 0x2 -#define V4L2_MPEG2_PIC_FRAME 0x3 - -#define V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST 0x0001 -#define V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT 0x0002 -#define V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV 0x0004 -#define V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE 0x0008 -#define V4L2_MPEG2_PIC_FLAG_INTRA_VLC 0x0010 -#define V4L2_MPEG2_PIC_FLAG_ALT_SCAN 0x0020 -#define V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST 0x0040 -#define V4L2_MPEG2_PIC_FLAG_PROGRESSIVE 0x0080 - -#define V4L2_CID_STATELESS_MPEG2_PICTURE (V4L2_CID_CODEC_STATELESS_BASE+221) - -struct v4l2_ctrl_mpeg2_picture { - __u64 backward_ref_ts; - __u64 forward_ref_ts; - __u32 flags; - __u8 f_code[2][2]; - __u8 picture_coding_type; - __u8 picture_structure; - __u8 intra_dc_precision; - __u8 reserved[5]; -}; - -#define V4L2_CID_STATELESS_MPEG2_QUANTISATION (V4L2_CID_CODEC_STATELESS_BASE+222) - -struct v4l2_ctrl_mpeg2_quantisation { - __u8 intra_quantiser_matrix[64]; - __u8 non_intra_quantiser_matrix[64]; - __u8 chroma_intra_quantiser_matrix[64]; - __u8 chroma_non_intra_quantiser_matrix[64]; -}; - -#define V4L2_CID_STATELESS_HEVC_SPS (V4L2_CID_CODEC_STATELESS_BASE + 400) -#define V4L2_CID_STATELESS_HEVC_PPS (V4L2_CID_CODEC_STATELESS_BASE + 401) -#define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 402) -#define V4L2_CID_STATELESS_HEVC_SCALING_MATRIX (V4L2_CID_CODEC_STATELESS_BASE + 403) -#define V4L2_CID_STATELESS_HEVC_DECODE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 404) -#define V4L2_CID_STATELESS_HEVC_DECODE_MODE (V4L2_CID_CODEC_STATELESS_BASE + 405) -#define V4L2_CID_STATELESS_HEVC_START_CODE (V4L2_CID_CODEC_STATELESS_BASE + 406) -#define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (V4L2_CID_CODEC_STATELESS_BASE + 407) - -enum v4l2_stateless_hevc_decode_mode { - V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED, - V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED, -}; - -enum v4l2_stateless_hevc_start_code { - V4L2_STATELESS_HEVC_START_CODE_NONE, - V4L2_STATELESS_HEVC_START_CODE_ANNEX_B, -}; - -#define V4L2_HEVC_SLICE_TYPE_B 0 -#define V4L2_HEVC_SLICE_TYPE_P 1 -#define V4L2_HEVC_SLICE_TYPE_I 2 - -#define V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE (1ULL << 0) -#define V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED (1ULL << 1) -#define V4L2_HEVC_SPS_FLAG_AMP_ENABLED (1ULL << 2) -#define V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET (1ULL << 3) -#define V4L2_HEVC_SPS_FLAG_PCM_ENABLED (1ULL << 4) -#define V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED (1ULL << 5) -#define V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT (1ULL << 6) -#define V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED (1ULL << 7) -#define V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED (1ULL << 8) - -struct v4l2_ctrl_hevc_sps { - __u8 video_parameter_set_id; - __u8 seq_parameter_set_id; - __u16 pic_width_in_luma_samples; - __u16 pic_height_in_luma_samples; - __u8 bit_depth_luma_minus8; - __u8 bit_depth_chroma_minus8; - __u8 log2_max_pic_order_cnt_lsb_minus4; - __u8 sps_max_dec_pic_buffering_minus1; - __u8 sps_max_num_reorder_pics; - __u8 sps_max_latency_increase_plus1; - __u8 log2_min_luma_coding_block_size_minus3; - __u8 log2_diff_max_min_luma_coding_block_size; - __u8 log2_min_luma_transform_block_size_minus2; - __u8 log2_diff_max_min_luma_transform_block_size; - __u8 max_transform_hierarchy_depth_inter; - __u8 max_transform_hierarchy_depth_intra; - __u8 pcm_sample_bit_depth_luma_minus1; - __u8 pcm_sample_bit_depth_chroma_minus1; - __u8 log2_min_pcm_luma_coding_block_size_minus3; - __u8 log2_diff_max_min_pcm_luma_coding_block_size; - __u8 num_short_term_ref_pic_sets; - __u8 num_long_term_ref_pics_sps; - __u8 chroma_format_idc; - __u8 sps_max_sub_layers_minus1; - __u8 reserved[6]; - __u64 flags; -}; - -#define V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED (1ULL << 0) -#define V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT (1ULL << 1) -#define V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED (1ULL << 2) -#define V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT (1ULL << 3) -#define V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED (1ULL << 4) -#define V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED (1ULL << 5) -#define V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED (1ULL << 6) -#define V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT (1ULL << 7) -#define V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED (1ULL << 8) -#define V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED (1ULL << 9) -#define V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED (1ULL << 10) -#define V4L2_HEVC_PPS_FLAG_TILES_ENABLED (1ULL << 11) -#define V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED (1ULL << 12) -#define V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED (1ULL << 13) -#define V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 14) -#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED (1ULL << 15) -#define V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER (1ULL << 16) -#define V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT (1ULL << 17) -#define V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT (1ULL << 18) -#define V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT (1ULL << 19) -#define V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING (1ULL << 20) - -struct v4l2_ctrl_hevc_pps { - __u8 pic_parameter_set_id; - __u8 num_extra_slice_header_bits; - __u8 num_ref_idx_l0_default_active_minus1; - __u8 num_ref_idx_l1_default_active_minus1; - __s8 init_qp_minus26; - __u8 diff_cu_qp_delta_depth; - __s8 pps_cb_qp_offset; - __s8 pps_cr_qp_offset; - __u8 num_tile_columns_minus1; - __u8 num_tile_rows_minus1; - __u8 column_width_minus1[20]; - __u8 row_height_minus1[22]; - __s8 pps_beta_offset_div2; - __s8 pps_tc_offset_div2; - __u8 log2_parallel_merge_level_minus2; - __u8 reserved; - __u64 flags; -}; - -#define V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE 0x01 - -#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME 0 -#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD 1 -#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD 2 -#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM 3 -#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP 4 -#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP 5 -#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM 6 -#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING 7 -#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING 8 -#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM 9 -#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP 10 -#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM 11 -#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP 12 - -#define V4L2_HEVC_DPB_ENTRIES_NUM_MAX 16 - -struct v4l2_hevc_dpb_entry { - __u64 timestamp; - __u8 flags; - __u8 field_pic; - __u16 reserved; - __s32 pic_order_cnt_val; -}; - -struct v4l2_hevc_pred_weight_table { - __s8 delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; - __s8 luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; - __s8 delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; - __s8 chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; - __s8 delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; - __s8 luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; - __s8 delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; - __s8 chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]; - __u8 luma_log2_weight_denom; - __s8 delta_chroma_log2_weight_denom; -}; - -#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA (1ULL << 0) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA (1ULL << 1) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED (1ULL << 2) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO (1ULL << 3) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT (1ULL << 4) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0 (1ULL << 5) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV (1ULL << 6) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED (1ULL << 7) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED (1ULL << 8) -#define V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT (1ULL << 9) - -struct v4l2_ctrl_hevc_slice_params { - __u32 bit_size; - __u32 data_byte_offset; - __u32 num_entry_point_offsets; - __u8 nal_unit_type; - __u8 nuh_temporal_id_plus1; - __u8 slice_type; - __u8 colour_plane_id; - __s32 slice_pic_order_cnt; - __u8 num_ref_idx_l0_active_minus1; - __u8 num_ref_idx_l1_active_minus1; - __u8 collocated_ref_idx; - __u8 five_minus_max_num_merge_cand; - __s8 slice_qp_delta; - __s8 slice_cb_qp_offset; - __s8 slice_cr_qp_offset; - __s8 slice_act_y_qp_offset; - __s8 slice_act_cb_qp_offset; - __s8 slice_act_cr_qp_offset; - __s8 slice_beta_offset_div2; - __s8 slice_tc_offset_div2; - __u8 pic_struct; - __u8 reserved0[3]; - __u32 slice_segment_addr; - __u8 ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; - __u8 ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; - __u16 short_term_ref_pic_set_size; - __u16 long_term_ref_pic_set_size; - - struct v4l2_hevc_pred_weight_table pred_weight_table; - __u8 reserved1[2]; - __u64 flags; -}; - -#define V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC 0x1 -#define V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC 0x2 -#define V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR 0x4 - -struct v4l2_ctrl_hevc_decode_params { - __s32 pic_order_cnt_val; - __u16 short_term_ref_pic_set_size; - __u16 long_term_ref_pic_set_size; - __u8 num_active_dpb_entries; - __u8 num_poc_st_curr_before; - __u8 num_poc_st_curr_after; - __u8 num_poc_lt_curr; - __u8 poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; - __u8 poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; - __u8 poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; - __u8 reserved[4]; - struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; - __u64 flags; -}; - -struct v4l2_ctrl_hevc_scaling_matrix { - __u8 scaling_list_4x4[6][16]; - __u8 scaling_list_8x8[6][64]; - __u8 scaling_list_16x16[6][64]; - __u8 scaling_list_32x32[2][64]; - __u8 scaling_list_dc_coef_16x16[6]; - __u8 scaling_list_dc_coef_32x32[2]; -}; - -#define V4L2_CID_COLORIMETRY_CLASS_BASE (V4L2_CTRL_CLASS_COLORIMETRY | 0x900) -#define V4L2_CID_COLORIMETRY_CLASS (V4L2_CTRL_CLASS_COLORIMETRY | 1) - -#define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO (V4L2_CID_COLORIMETRY_CLASS_BASE + 0) - -struct v4l2_ctrl_hdr10_cll_info { - __u16 max_content_light_level; - __u16 max_pic_average_light_level; -}; - -#define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY (V4L2_CID_COLORIMETRY_CLASS_BASE + 1) - -#define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW 5 -#define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH 37000 -#define V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW 5 -#define V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH 42000 -#define V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW 5 -#define V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH 37000 -#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW 5 -#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH 42000 -#define V4L2_HDR10_MASTERING_MAX_LUMA_LOW 50000 -#define V4L2_HDR10_MASTERING_MAX_LUMA_HIGH 100000000 -#define V4L2_HDR10_MASTERING_MIN_LUMA_LOW 1 -#define V4L2_HDR10_MASTERING_MIN_LUMA_HIGH 50000 - -struct v4l2_ctrl_hdr10_mastering_display { - __u16 display_primaries_x[3]; - __u16 display_primaries_y[3]; - __u16 white_point_x; - __u16 white_point_y; - __u32 max_display_mastering_luminance; - __u32 min_display_mastering_luminance; -}; - -#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED 0x1 -#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE 0x2 - -struct v4l2_vp9_loop_filter { - __s8 ref_deltas[4]; - __s8 mode_deltas[2]; - __u8 level; - __u8 sharpness; - __u8 flags; - __u8 reserved[7]; -}; - -struct v4l2_vp9_quantization { - __u8 base_q_idx; - __s8 delta_q_y_dc; - __s8 delta_q_uv_dc; - __s8 delta_q_uv_ac; - __u8 reserved[4]; -}; - -#define V4L2_VP9_SEGMENTATION_FLAG_ENABLED 0x01 -#define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP 0x02 -#define V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE 0x04 -#define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA 0x08 -#define V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE 0x10 - -#define V4L2_VP9_SEG_LVL_ALT_Q 0 -#define V4L2_VP9_SEG_LVL_ALT_L 1 -#define V4L2_VP9_SEG_LVL_REF_FRAME 2 -#define V4L2_VP9_SEG_LVL_SKIP 3 -#define V4L2_VP9_SEG_LVL_MAX 4 - -#define V4L2_VP9_SEGMENT_FEATURE_ENABLED(id) (1 << (id)) -#define V4L2_VP9_SEGMENT_FEATURE_ENABLED_MASK 0xf - -struct v4l2_vp9_segmentation { - __s16 feature_data[8][4]; - __u8 feature_enabled[8]; - __u8 tree_probs[7]; - __u8 pred_probs[3]; - __u8 flags; - __u8 reserved[5]; -}; - -#define V4L2_VP9_FRAME_FLAG_KEY_FRAME 0x001 -#define V4L2_VP9_FRAME_FLAG_SHOW_FRAME 0x002 -#define V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT 0x004 -#define V4L2_VP9_FRAME_FLAG_INTRA_ONLY 0x008 -#define V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV 0x010 -#define V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX 0x020 -#define V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE 0x040 -#define V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING 0x080 -#define V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING 0x100 -#define V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING 0x200 - -#define V4L2_VP9_SIGN_BIAS_LAST 0x1 -#define V4L2_VP9_SIGN_BIAS_GOLDEN 0x2 -#define V4L2_VP9_SIGN_BIAS_ALT 0x4 - -#define V4L2_VP9_RESET_FRAME_CTX_NONE 0 -#define V4L2_VP9_RESET_FRAME_CTX_SPEC 1 -#define V4L2_VP9_RESET_FRAME_CTX_ALL 2 - -#define V4L2_VP9_INTERP_FILTER_EIGHTTAP 0 -#define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH 1 -#define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP 2 -#define V4L2_VP9_INTERP_FILTER_BILINEAR 3 -#define V4L2_VP9_INTERP_FILTER_SWITCHABLE 4 - -#define V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE 0 -#define V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE 1 -#define V4L2_VP9_REFERENCE_MODE_SELECT 2 - -#define V4L2_VP9_PROFILE_MAX 3 - -#define V4L2_CID_STATELESS_VP9_FRAME (V4L2_CID_CODEC_STATELESS_BASE + 300) - -struct v4l2_ctrl_vp9_frame { - struct v4l2_vp9_loop_filter lf; - struct v4l2_vp9_quantization quant; - struct v4l2_vp9_segmentation seg; - __u32 flags; - __u16 compressed_header_size; - __u16 uncompressed_header_size; - __u16 frame_width_minus_1; - __u16 frame_height_minus_1; - __u16 render_width_minus_1; - __u16 render_height_minus_1; - __u64 last_frame_ts; - __u64 golden_frame_ts; - __u64 alt_frame_ts; - __u8 ref_frame_sign_bias; - __u8 reset_frame_context; - __u8 frame_context_idx; - __u8 profile; - __u8 bit_depth; - __u8 interpolation_filter; - __u8 tile_cols_log2; - __u8 tile_rows_log2; - __u8 reference_mode; - __u8 reserved[7]; -}; - -#define V4L2_VP9_NUM_FRAME_CTX 4 - -struct v4l2_vp9_mv_probs { - __u8 joint[3]; - __u8 sign[2]; - __u8 classes[2][10]; - __u8 class0_bit[2]; - __u8 bits[2][10]; - __u8 class0_fr[2][2][3]; - __u8 fr[2][3]; - __u8 class0_hp[2]; - __u8 hp[2]; -}; - -#define V4L2_CID_STATELESS_VP9_COMPRESSED_HDR (V4L2_CID_CODEC_STATELESS_BASE + 301) - -#define V4L2_VP9_TX_MODE_ONLY_4X4 0 -#define V4L2_VP9_TX_MODE_ALLOW_8X8 1 -#define V4L2_VP9_TX_MODE_ALLOW_16X16 2 -#define V4L2_VP9_TX_MODE_ALLOW_32X32 3 -#define V4L2_VP9_TX_MODE_SELECT 4 - -struct v4l2_ctrl_vp9_compressed_hdr { - __u8 tx_mode; - __u8 tx8[2][1]; - __u8 tx16[2][2]; - __u8 tx32[2][3]; - __u8 coef[4][2][2][6][6][3]; - __u8 skip[3]; - __u8 inter_mode[7][3]; - __u8 interp_filter[4][2]; - __u8 is_inter[4]; - __u8 comp_mode[5]; - __u8 single_ref[5][2]; - __u8 comp_ref[5]; - __u8 y_mode[4][9]; - __u8 uv_mode[10][9]; - __u8 partition[16][3]; - - struct v4l2_vp9_mv_probs mv; -}; - -#define V4L2_CTRL_CLASS_MPEG V4L2_CTRL_CLASS_CODEC -#define V4L2_CID_MPEG_CLASS V4L2_CID_CODEC_CLASS -#define V4L2_CID_MPEG_BASE V4L2_CID_CODEC_BASE -#define V4L2_CID_MPEG_CX2341X_BASE V4L2_CID_CODEC_CX2341X_BASE -#define V4L2_CID_MPEG_MFC51_BASE V4L2_CID_CODEC_MFC51_BASE -#endif - -#endif diff --git a/project/3rdparty/include/libv4l/v4l2-mediabus.h b/project/3rdparty/include/libv4l/v4l2-mediabus.h deleted file mode 100644 index 80b03c37c..000000000 --- a/project/3rdparty/include/libv4l/v4l2-mediabus.h +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef LIBV4L_LINUX_V4L2_MEDIABUS_H -#define LIBV4L_LINUX_V4L2_MEDIABUS_H - -#include - -#include "videodev2.h" -#include "media-bus-format.h" - -#if 1 -#include -#else -#define V4L2_MBUS_FRAMEFMT_SET_CSC 0x0001 - -struct v4l2_mbus_framefmt { - __u32 width; - __u32 height; - __u32 code; - __u32 field; - __u32 colorspace; - union { - __u16 ycbcr_enc; - __u16 hsv_enc; - }; - __u16 quantization; - __u16 xfer_func; - __u16 flags; - __u16 reserved[10]; -}; - -#define V4L2_MBUS_FROM_MEDIA_BUS_FMT(name) V4L2_MBUS_FMT_ ## name = MEDIA_BUS_FMT_ ## name - -enum v4l2_mbus_pixelcode { - V4L2_MBUS_FROM_MEDIA_BUS_FMT(FIXED), - - V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB444_2X8_PADHI_BE), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB444_2X8_PADHI_LE), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB555_2X8_PADHI_BE), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB555_2X8_PADHI_LE), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(BGR565_2X8_BE), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(BGR565_2X8_LE), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB565_2X8_BE), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB565_2X8_LE), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB666_1X18), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB888_1X24), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB888_2X12_BE), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB888_2X12_LE), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(ARGB8888_1X32), - - V4L2_MBUS_FROM_MEDIA_BUS_FMT(Y8_1X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(UV8_1X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY8_1_5X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY8_1_5X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV8_1_5X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU8_1_5X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY8_2X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY8_2X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV8_2X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU8_2X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(Y10_1X10), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY10_2X10), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY10_2X10), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV10_2X10), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU10_2X10), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(Y12_1X12), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY8_1X16), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY8_1X16), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV8_1X16), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU8_1X16), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YDYUYDYV8_1X16), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY10_1X20), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY10_1X20), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV10_1X20), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU10_1X20), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUV10_1X30), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(AYUV8_1X32), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY12_2X12), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY12_2X12), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV12_2X12), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU12_2X12), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY12_1X24), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY12_1X24), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV12_1X24), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU12_1X24), - - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR8_1X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG8_1X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG8_1X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB8_1X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_ALAW8_1X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG10_ALAW8_1X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG10_ALAW8_1X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB10_ALAW8_1X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_DPCM8_1X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG10_DPCM8_1X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG10_DPCM8_1X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB10_DPCM8_1X8), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADHI_BE), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADHI_LE), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADLO_BE), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADLO_LE), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_1X10), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG10_1X10), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG10_1X10), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB10_1X10), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR12_1X12), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG12_1X12), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG12_1X12), - V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB12_1X12), - - V4L2_MBUS_FROM_MEDIA_BUS_FMT(JPEG_1X8), - - V4L2_MBUS_FROM_MEDIA_BUS_FMT(S5C_UYVY_JPEG_1X8), - - V4L2_MBUS_FROM_MEDIA_BUS_FMT(AHSV8888_1X32), -}; -#endif - -#endif diff --git a/project/3rdparty/include/libv4l/v4l2-subdev.h b/project/3rdparty/include/libv4l/v4l2-subdev.h deleted file mode 100644 index 05f09bb24..000000000 --- a/project/3rdparty/include/libv4l/v4l2-subdev.h +++ /dev/null @@ -1,150 +0,0 @@ -#ifndef LIBV4L_LINUX_V4L2_SUBDEV_H -#define LIBV4L_LINUX_V4L2_SUBDEV_H - -#include -#include -#include - -#include "v4l2-common.h" -#include "v4l2-mediabus.h" - -#if 1 -#include -#else -enum v4l2_subdev_format_whence { - V4L2_SUBDEV_FORMAT_TRY = 0, - V4L2_SUBDEV_FORMAT_ACTIVE = 1, -}; - -struct v4l2_subdev_format { - __u32 which; - __u32 pad; - struct v4l2_mbus_framefmt format; - __u32 stream; - __u32 reserved[7]; -}; - -struct v4l2_subdev_crop { - __u32 which; - __u32 pad; - struct v4l2_rect rect; - __u32 stream; - __u32 reserved[7]; -}; - -#define V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE 0x00000001 -#define V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC 0x00000002 -#define V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC 0x00000004 -#define V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC -#define V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION 0x00000008 - -struct v4l2_subdev_mbus_code_enum { - __u32 pad; - __u32 index; - __u32 code; - __u32 which; - __u32 flags; - __u32 stream; - __u32 reserved[6]; -}; - -struct v4l2_subdev_frame_size_enum { - __u32 index; - __u32 pad; - __u32 code; - __u32 min_width; - __u32 max_width; - __u32 min_height; - __u32 max_height; - __u32 which; - __u32 stream; - __u32 reserved[7]; -}; - -struct v4l2_subdev_frame_interval { - __u32 pad; - struct v4l2_fract interval; - __u32 stream; - __u32 reserved[8]; -}; - -struct v4l2_subdev_frame_interval_enum { - __u32 index; - __u32 pad; - __u32 code; - __u32 width; - __u32 height; - struct v4l2_fract interval; - __u32 which; - __u32 stream; - __u32 reserved[7]; -}; - -struct v4l2_subdev_selection { - __u32 which; - __u32 pad; - __u32 target; - __u32 flags; - struct v4l2_rect r; - __u32 stream; - __u32 reserved[7]; -}; - -struct v4l2_subdev_capability { - __u32 version; - __u32 capabilities; - __u32 reserved[14]; -}; - -struct v4l2_subdev_route { - __u32 sink_pad; - __u32 sink_stream; - __u32 source_pad; - __u32 source_stream; - __u32 flags; - __u32 reserved[5]; -}; - -struct v4l2_subdev_routing { - __u32 which; - __u32 num_routes; - __u64 routes; - __u32 reserved[6]; -}; - -#define V4L2_SUBDEV_CAP_RO_SUBDEV 0x00000001 -#define V4L2_SUBDEV_CAP_STREAMS 0x00000002 - -#define V4L2_SUBDEV_ROUTE_FL_ACTIVE (1U << 0) - -#define v4l2_subdev_edid v4l2_edid - -#define VIDIOC_SUBDEV_QUERYCAP _IOR('V', 0, struct v4l2_subdev_capability) -#define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format) -#define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format) -#define VIDIOC_SUBDEV_G_FRAME_INTERVAL _IOWR('V', 21, struct v4l2_subdev_frame_interval) -#define VIDIOC_SUBDEV_S_FRAME_INTERVAL _IOWR('V', 22, struct v4l2_subdev_frame_interval) -#define VIDIOC_SUBDEV_ENUM_MBUS_CODE _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum) -#define VIDIOC_SUBDEV_ENUM_FRAME_SIZE _IOWR('V', 74, struct v4l2_subdev_frame_size_enum) -#define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum) -#define VIDIOC_SUBDEV_G_CROP _IOWR('V', 59, struct v4l2_subdev_crop) -#define VIDIOC_SUBDEV_S_CROP _IOWR('V', 60, struct v4l2_subdev_crop) -#define VIDIOC_SUBDEV_G_SELECTION _IOWR('V', 61, struct v4l2_subdev_selection) -#define VIDIOC_SUBDEV_S_SELECTION _IOWR('V', 62, struct v4l2_subdev_selection) -#define VIDIOC_SUBDEV_G_ROUTING _IOWR('V', 38, struct v4l2_subdev_routing) -#define VIDIOC_SUBDEV_S_ROUTING _IOWR('V', 39, struct v4l2_subdev_routing) - -#define VIDIOC_SUBDEV_G_STD _IOR('V', 23, v4l2_std_id) -#define VIDIOC_SUBDEV_S_STD _IOW('V', 24, v4l2_std_id) -#define VIDIOC_SUBDEV_ENUMSTD _IOWR('V', 25, struct v4l2_standard) -#define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_edid) -#define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_edid) -#define VIDIOC_SUBDEV_QUERYSTD _IOR('V', 63, v4l2_std_id) -#define VIDIOC_SUBDEV_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) -#define VIDIOC_SUBDEV_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) -#define VIDIOC_SUBDEV_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings) -#define VIDIOC_SUBDEV_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings) -#define VIDIOC_SUBDEV_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap) -#endif - -#endif diff --git a/project/3rdparty/include/libv4l/v4l2_driver.h b/project/3rdparty/include/libv4l/v4l2_driver.h deleted file mode 100644 index 555eb0568..000000000 --- a/project/3rdparty/include/libv4l/v4l2_driver.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef LIBV4L_V4L2_DRIVER_H -#define LIBV4L_V4L2_DRIVER_H - -#include -#include -#include - -#include "videodev2.h" - -struct drv_list { - void *curr; - struct drv_list *next; -}; - -struct v4l2_t_buf { - void *start; - size_t length; -}; - -typedef int v4l2_recebe_buffer (struct v4l2_buffer *v4l2_buf, struct v4l2_t_buf *buf); - -struct v4l2_driver { - int fd; - int debug; - struct v4l2_capability cap; - struct v4l2_streamparm parm; - struct drv_list *stds,*inputs,*fmt_caps; - struct v4l2_requestbuffers reqbuf; - struct v4l2_buffer **v4l2_bufs; - struct v4l2_t_buf *bufs; - uint32_t sizeimage,n_bufs; - uint32_t waitq, currq; -}; - -enum v4l2_direction { - V4L2_GET = 1, - V4L2_SET = 2, - V4L2_SET_GET = 3, - V4L2_TRY = 4, - V4L2_TRY_SET = 6, - V4L2_TRY_SET_GET = 7, -}; - -int v4l2_open(char *device, int debug, struct v4l2_driver *drv); -int v4l2_close(struct v4l2_driver *drv); - -int v4l2_enum_stds(struct v4l2_driver *drv); -int v4l2_enum_input(struct v4l2_driver *drv); - -int v4l2_enum_fmt(struct v4l2_driver *drv,enum v4l2_buf_type type); -int v4l2_get_parm(struct v4l2_driver *drv); - -int v4l2_setget_std(struct v4l2_driver *drv, enum v4l2_direction dir, v4l2_std_id *id); -int v4l2_setget_input(struct v4l2_driver *drv, enum v4l2_direction dir, struct v4l2_input *input); - -int v4l2_gettryset_fmt_cap(struct v4l2_driver *drv, enum v4l2_direction dir, struct v4l2_format *fmt,uint32_t width, uint32_t height, uint32_t pixelformat, enum v4l2_field field); - -int v4l2_mmap_bufs(struct v4l2_driver *drv, unsigned int num_buffers); -int v4l2_free_bufs(struct v4l2_driver *drv); - -int v4l2_start_streaming(struct v4l2_driver *drv); -int v4l2_stop_streaming(struct v4l2_driver *drv); - -int v4l2_rcvbuf(struct v4l2_driver *drv, v4l2_recebe_buffer *v4l2_rec_buf); -int v4l2_getset_freq(struct v4l2_driver *drv, enum v4l2_direction dir, double *freq); - -#endif diff --git a/project/3rdparty/include/libv4l/v4l2subdev.h b/project/3rdparty/include/libv4l/v4l2subdev.h deleted file mode 100644 index e45c99de9..000000000 --- a/project/3rdparty/include/libv4l/v4l2subdev.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef LIBDRM_MEDIACTL_V4L2SUBDEV_H -#define LIBDRM_MEDIACTL_V4L2SUBDEV_H - -#include "v4l2-subdev.h" - -struct media_device; -struct media_entity; - -int v4l2_subdev_open(struct media_entity *entity); -void v4l2_subdev_close(struct media_entity *entity); - -int v4l2_subdev_get_format(struct media_entity *entity, struct v4l2_mbus_framefmt *format, unsigned int pad, enum v4l2_subdev_format_whence which); -int v4l2_subdev_set_format(struct media_entity *entity, struct v4l2_mbus_framefmt *format, unsigned int pad, enum v4l2_subdev_format_whence which); - -int v4l2_subdev_get_selection(struct media_entity *entity, struct v4l2_rect *rect, unsigned int pad, unsigned int target, enum v4l2_subdev_format_whence which); -int v4l2_subdev_set_selection(struct media_entity *entity, struct v4l2_rect *rect, unsigned int pad, unsigned int target, enum v4l2_subdev_format_whence which); - -int v4l2_subdev_query_dv_timings(struct media_entity *entity, struct v4l2_dv_timings *timings); -int v4l2_subdev_get_dv_timings_caps(struct media_entity *entity, struct v4l2_dv_timings_cap *caps); - -int v4l2_subdev_get_dv_timings(struct media_entity *entity, struct v4l2_dv_timings *timings); -int v4l2_subdev_set_dv_timings(struct media_entity *entity, struct v4l2_dv_timings *timings); - -int v4l2_subdev_set_frame_interval(struct media_entity *entity, struct v4l2_fract *interval, unsigned int pad); -int v4l2_subdev_get_frame_interval(struct media_entity *entity, struct v4l2_fract *interval, unsigned int pad); - -int v4l2_subdev_parse_setup_formats(struct media_device *media, const char *p); - -const char *v4l2_subdev_pixelcode_to_string(enum v4l2_mbus_pixelcode code); -enum v4l2_mbus_pixelcode v4l2_subdev_string_to_pixelcode(const char *string); - -const char *v4l2_subdev_field_to_string(enum v4l2_field field); -enum v4l2_field v4l2_subdev_string_to_field(const char *string); - -const char *v4l2_subdev_colorspace_to_string(enum v4l2_colorspace colorspace); -enum v4l2_colorspace v4l2_subdev_string_to_colorspace(const char *string); - -const char *v4l2_subdev_xfer_func_to_string(enum v4l2_xfer_func xfer_func); -enum v4l2_xfer_func v4l2_subdev_string_to_xfer_func(const char *string); - -const char *v4l2_subdev_ycbcr_encoding_to_string(enum v4l2_ycbcr_encoding ycbcr_enc); -enum v4l2_ycbcr_encoding v4l2_subdev_string_to_ycbcr_encoding(const char *string); - -const char *v4l2_subdev_quantization_to_string(enum v4l2_quantization quantization); -enum v4l2_quantization v4l2_subdev_string_to_quantization(const char *string); - -const enum v4l2_mbus_pixelcode *v4l2_subdev_pixelcode_list(unsigned int *length); - -#endif diff --git a/project/3rdparty/include/libv4l/videodev2.h b/project/3rdparty/include/libv4l/videodev2.h deleted file mode 100644 index 234b240df..000000000 --- a/project/3rdparty/include/libv4l/videodev2.h +++ /dev/null @@ -1,1789 +0,0 @@ -#ifndef LIBV4L_LINUX_VIDEODEV2_H -#define LIBV4L_LINUX_VIDEODEV2_H - -#include -#include -#include - -#include "v4l2-common.h" -#include "v4l2-controls.h" - -#if 1 -#include - -#define V4L2_CAP_IO_MC 0x20000000 -#define V4L2_CAP_META_OUTPUT 0x08000000 - -#define V4L2_XFER_FUNC_OPRGB 3 -#define V4L2_COLORSPACE_OPRGB 9 - -#define V4L2_PIX_FMT_NV12_16L16 v4l2_fourcc('H', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */ -#else -#define VIDEO_MAX_FRAME 32 -#define VIDEO_MAX_PLANES 8 - -#define v4l2_fourcc(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24)) -#define v4l2_fourcc_be(a, b, c, d) (v4l2_fourcc(a, b, c, d) | (1U << 31)) - -enum v4l2_field { - V4L2_FIELD_ANY = 0, - V4L2_FIELD_NONE = 1, - V4L2_FIELD_TOP = 2, - V4L2_FIELD_BOTTOM = 3, - V4L2_FIELD_INTERLACED = 4, - V4L2_FIELD_SEQ_TB = 5, - V4L2_FIELD_SEQ_BT = 6, - V4L2_FIELD_ALTERNATE = 7, - V4L2_FIELD_INTERLACED_TB = 8, - V4L2_FIELD_INTERLACED_BT = 9, -}; - -#define V4L2_FIELD_HAS_TOP(field) \ - ((field) == V4L2_FIELD_TOP \ - || (field) == V4L2_FIELD_INTERLACED \ - || (field) == V4L2_FIELD_INTERLACED_TB \ - || (field) == V4L2_FIELD_INTERLACED_BT \ - || (field) == V4L2_FIELD_SEQ_TB \ - || (field) == V4L2_FIELD_SEQ_BT) - -#define V4L2_FIELD_HAS_BOTTOM(field) \ - ((field) == V4L2_FIELD_BOTTOM \ - || (field) == V4L2_FIELD_INTERLACED \ - || (field) == V4L2_FIELD_INTERLACED_TB \ - || (field) == V4L2_FIELD_INTERLACED_BT \ - || (field) == V4L2_FIELD_SEQ_TB \ - || (field) == V4L2_FIELD_SEQ_BT) - -#define V4L2_FIELD_HAS_BOTH(field) \ - ((field) == V4L2_FIELD_INTERLACED \ - || (field) == V4L2_FIELD_INTERLACED_TB \ - || (field) == V4L2_FIELD_INTERLACED_BT \ - || (field) == V4L2_FIELD_SEQ_TB \ - || (field) == V4L2_FIELD_SEQ_BT) - -#define V4L2_FIELD_HAS_T_OR_B(field) \ - ((field) == V4L2_FIELD_BOTTOM \ - || (field) == V4L2_FIELD_TOP \ - || (field) == V4L2_FIELD_ALTERNATE) - -#define V4L2_FIELD_IS_INTERLACED(field) \ - ((field) == V4L2_FIELD_INTERLACED \ - || (field) == V4L2_FIELD_INTERLACED_TB \ - || (field) == V4L2_FIELD_INTERLACED_BT) - -#define V4L2_FIELD_IS_SEQUENTIAL(field) \ - ((field) == V4L2_FIELD_SEQ_TB \ - || (field) == V4L2_FIELD_SEQ_BT) - -enum v4l2_buf_type { - V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, - V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, - V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, - V4L2_BUF_TYPE_VBI_CAPTURE = 4, - V4L2_BUF_TYPE_VBI_OUTPUT = 5, - V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, - V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, - V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8, - V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9, - V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, - V4L2_BUF_TYPE_SDR_CAPTURE = 11, - V4L2_BUF_TYPE_SDR_OUTPUT = 12, - V4L2_BUF_TYPE_META_CAPTURE = 13, - V4L2_BUF_TYPE_META_OUTPUT = 14, - V4L2_BUF_TYPE_PRIVATE = 0x80, -}; - -#define V4L2_TYPE_IS_MULTIPLANAR(type) \ - ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE \ - || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) - -#define V4L2_TYPE_IS_OUTPUT(type) \ - ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT \ - || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE \ - || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY \ - || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY \ - || (type) == V4L2_BUF_TYPE_VBI_OUTPUT \ - || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT \ - || (type) == V4L2_BUF_TYPE_SDR_OUTPUT \ - || (type) == V4L2_BUF_TYPE_META_OUTPUT) - -#define V4L2_TYPE_IS_CAPTURE(type) (!V4L2_TYPE_IS_OUTPUT(type)) - -enum v4l2_tuner_type { - V4L2_TUNER_RADIO = 1, - V4L2_TUNER_ANALOG_TV = 2, - V4L2_TUNER_DIGITAL_TV = 3, - V4L2_TUNER_SDR = 4, - V4L2_TUNER_RF = 5, -}; - -#define V4L2_TUNER_ADC V4L2_TUNER_SDR - -enum v4l2_memory { - V4L2_MEMORY_MMAP = 1, - V4L2_MEMORY_USERPTR = 2, - V4L2_MEMORY_OVERLAY = 3, - V4L2_MEMORY_DMABUF = 4, -}; - -enum v4l2_colorspace { - V4L2_COLORSPACE_DEFAULT = 0, - V4L2_COLORSPACE_SMPTE170M = 1, - V4L2_COLORSPACE_SMPTE240M = 2, - V4L2_COLORSPACE_REC709 = 3, - V4L2_COLORSPACE_BT878 = 4, - V4L2_COLORSPACE_470_SYSTEM_M = 5, - V4L2_COLORSPACE_470_SYSTEM_BG = 6, - V4L2_COLORSPACE_JPEG = 7, - V4L2_COLORSPACE_SRGB = 8, - V4L2_COLORSPACE_OPRGB = 9, - V4L2_COLORSPACE_BT2020 = 10, - V4L2_COLORSPACE_RAW = 11, - V4L2_COLORSPACE_DCI_P3 = 12, -}; - -#define V4L2_MAP_COLORSPACE_DEFAULT(is_sdtv, is_hdtv) \ - ((is_sdtv) ? V4L2_COLORSPACE_SMPTE170M : \ - ((is_hdtv) ? V4L2_COLORSPACE_REC709 : V4L2_COLORSPACE_SRGB)) - -enum v4l2_xfer_func { - V4L2_XFER_FUNC_DEFAULT = 0, - V4L2_XFER_FUNC_709 = 1, - V4L2_XFER_FUNC_SRGB = 2, - V4L2_XFER_FUNC_OPRGB = 3, - V4L2_XFER_FUNC_SMPTE240M = 4, - V4L2_XFER_FUNC_NONE = 5, - V4L2_XFER_FUNC_DCI_P3 = 6, - V4L2_XFER_FUNC_SMPTE2084 = 7, -}; - -#define V4L2_MAP_XFER_FUNC_DEFAULT(colsp) \ - ((colsp) == V4L2_COLORSPACE_OPRGB ? V4L2_XFER_FUNC_OPRGB : \ - ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_XFER_FUNC_SMPTE240M : \ - ((colsp) == V4L2_COLORSPACE_DCI_P3 ? V4L2_XFER_FUNC_DCI_P3 : \ - ((colsp) == V4L2_COLORSPACE_RAW ? V4L2_XFER_FUNC_NONE : \ - ((colsp) == V4L2_COLORSPACE_SRGB || (colsp) == V4L2_COLORSPACE_JPEG ? \ - V4L2_XFER_FUNC_SRGB : V4L2_XFER_FUNC_709))))) - -enum v4l2_ycbcr_encoding { - V4L2_YCBCR_ENC_DEFAULT = 0, - V4L2_YCBCR_ENC_601 = 1, - V4L2_YCBCR_ENC_709 = 2, - V4L2_YCBCR_ENC_XV601 = 3, - V4L2_YCBCR_ENC_XV709 = 4, - V4L2_YCBCR_ENC_SYCC = 5, - V4L2_YCBCR_ENC_BT2020 = 6, - V4L2_YCBCR_ENC_BT2020_CONST_LUM = 7, - V4L2_YCBCR_ENC_SMPTE240M = 8, -}; - -enum v4l2_hsv_encoding { - V4L2_HSV_ENC_180 = 128, - V4L2_HSV_ENC_256 = 129, -}; - -#define V4L2_MAP_YCBCR_ENC_DEFAULT(colsp) \ - (((colsp) == V4L2_COLORSPACE_REC709 || \ - (colsp) == V4L2_COLORSPACE_DCI_P3) ? V4L2_YCBCR_ENC_709 : \ - ((colsp) == V4L2_COLORSPACE_BT2020 ? V4L2_YCBCR_ENC_BT2020 : \ - ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_YCBCR_ENC_SMPTE240M : \ - V4L2_YCBCR_ENC_601))) - -enum v4l2_quantization { - V4L2_QUANTIZATION_DEFAULT = 0, - V4L2_QUANTIZATION_FULL_RANGE = 1, - V4L2_QUANTIZATION_LIM_RANGE = 2, -}; - -#define V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb_or_hsv, colsp, ycbcr_enc) \ - (((is_rgb_or_hsv) || (colsp) == V4L2_COLORSPACE_JPEG) ? \ - V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE) - -#define V4L2_COLORSPACE_ADOBERGB V4L2_COLORSPACE_OPRGB -#define V4L2_XFER_FUNC_ADOBERGB V4L2_XFER_FUNC_OPRGB - -enum v4l2_priority { - V4L2_PRIORITY_UNSET = 0, - V4L2_PRIORITY_BACKGROUND = 1, - V4L2_PRIORITY_INTERACTIVE = 2, - V4L2_PRIORITY_RECORD = 3, - V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE, -}; - -struct v4l2_rect { - __s32 left; - __s32 top; - __u32 width; - __u32 height; -}; - -struct v4l2_fract { - __u32 numerator; - __u32 denominator; -}; - -struct v4l2_area { - __u32 width; - __u32 height; -}; - -struct v4l2_capability { - __u8 driver[16]; - __u8 card[32]; - __u8 bus_info[32]; - __u32 version; - __u32 capabilities; - __u32 device_caps; - __u32 reserved[3]; -}; - -#define V4L2_CAP_VIDEO_CAPTURE 0x00000001 -#define V4L2_CAP_VIDEO_OUTPUT 0x00000002 -#define V4L2_CAP_VIDEO_OVERLAY 0x00000004 -#define V4L2_CAP_VBI_CAPTURE 0x00000010 -#define V4L2_CAP_VBI_OUTPUT 0x00000020 -#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 -#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 -#define V4L2_CAP_RDS_CAPTURE 0x00000100 -#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 -#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 -#define V4L2_CAP_RDS_OUTPUT 0x00000800 - -#define V4L2_CAP_VIDEO_CAPTURE_MPLANE 0x00001000 -#define V4L2_CAP_VIDEO_OUTPUT_MPLANE 0x00002000 -#define V4L2_CAP_VIDEO_M2M_MPLANE 0x00004000 -#define V4L2_CAP_VIDEO_M2M 0x00008000 - -#define V4L2_CAP_TUNER 0x00010000 -#define V4L2_CAP_AUDIO 0x00020000 -#define V4L2_CAP_RADIO 0x00040000 -#define V4L2_CAP_MODULATOR 0x00080000 - -#define V4L2_CAP_SDR_CAPTURE 0x00100000 -#define V4L2_CAP_EXT_PIX_FORMAT 0x00200000 -#define V4L2_CAP_SDR_OUTPUT 0x00400000 -#define V4L2_CAP_META_CAPTURE 0x00800000 - -#define V4L2_CAP_READWRITE 0x01000000 -#define V4L2_CAP_STREAMING 0x04000000 -#define V4L2_CAP_META_OUTPUT 0x08000000 - -#define V4L2_CAP_TOUCH 0x10000000 -#define V4L2_CAP_IO_MC 0x20000000 -#define V4L2_CAP_DEVICE_CAPS 0x80000000 - -struct v4l2_pix_format { - __u32 width; - __u32 height; - __u32 pixelformat; - __u32 field; - __u32 bytesperline; - __u32 sizeimage; - __u32 colorspace; - __u32 priv; - __u32 flags; - union { - __u32 ycbcr_enc; - __u32 hsv_enc; - }; - __u32 quantization; - __u32 xfer_func; -}; - -#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */ -#define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */ -#define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2') /* 16 aaaarrrr ggggbbbb */ -#define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R', '1', '2') /* 16 xxxxrrrr ggggbbbb */ -#define V4L2_PIX_FMT_RGBA444 v4l2_fourcc('R', 'A', '1', '2') /* 16 rrrrgggg bbbbaaaa */ -#define V4L2_PIX_FMT_RGBX444 v4l2_fourcc('R', 'X', '1', '2') /* 16 rrrrgggg bbbbxxxx */ -#define V4L2_PIX_FMT_ABGR444 v4l2_fourcc('A', 'B', '1', '2') /* 16 aaaabbbb ggggrrrr */ -#define V4L2_PIX_FMT_XBGR444 v4l2_fourcc('X', 'B', '1', '2') /* 16 xxxxbbbb ggggrrrr */ -#define V4L2_PIX_FMT_BGRA444 v4l2_fourcc('G', 'A', '1', '2') /* 16 bbbbgggg rrrraaaa */ -#define V4L2_PIX_FMT_BGRX444 v4l2_fourcc('B', 'X', '1', '2') /* 16 bbbbgggg rrrrxxxx */ -#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */ -#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */ -#define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */ -#define V4L2_PIX_FMT_RGBA555 v4l2_fourcc('R', 'A', '1', '5') /* 16 RGBA-5-5-5-1 */ -#define V4L2_PIX_FMT_RGBX555 v4l2_fourcc('R', 'X', '1', '5') /* 16 RGBX-5-5-5-1 */ -#define V4L2_PIX_FMT_ABGR555 v4l2_fourcc('A', 'B', '1', '5') /* 16 ABGR-1-5-5-5 */ -#define V4L2_PIX_FMT_XBGR555 v4l2_fourcc('X', 'B', '1', '5') /* 16 XBGR-1-5-5-5 */ -#define V4L2_PIX_FMT_BGRA555 v4l2_fourcc('B', 'A', '1', '5') /* 16 BGRA-5-5-5-1 */ -#define V4L2_PIX_FMT_BGRX555 v4l2_fourcc('B', 'X', '1', '5') /* 16 BGRX-5-5-5-1 */ -#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ -#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ -#define V4L2_PIX_FMT_ARGB555X v4l2_fourcc_be('A', 'R', '1', '5') /* 16 ARGB-5-5-5 BE */ -#define V4L2_PIX_FMT_XRGB555X v4l2_fourcc_be('X', 'R', '1', '5') /* 16 XRGB-5-5-5 BE */ -#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ - -#define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ -#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ -#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ -#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ -#define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4') /* 32 BGRA-8-8-8-8 */ -#define V4L2_PIX_FMT_XBGR32 v4l2_fourcc('X', 'R', '2', '4') /* 32 BGRX-8-8-8-8 */ -#define V4L2_PIX_FMT_BGRA32 v4l2_fourcc('R', 'A', '2', '4') /* 32 ABGR-8-8-8-8 */ -#define V4L2_PIX_FMT_BGRX32 v4l2_fourcc('R', 'X', '2', '4') /* 32 XBGR-8-8-8-8 */ -#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */ -#define V4L2_PIX_FMT_RGBA32 v4l2_fourcc('A', 'B', '2', '4') /* 32 RGBA-8-8-8-8 */ -#define V4L2_PIX_FMT_RGBX32 v4l2_fourcc('X', 'B', '2', '4') /* 32 RGBX-8-8-8-8 */ -#define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4') /* 32 ARGB-8-8-8-8 */ -#define V4L2_PIX_FMT_XRGB32 v4l2_fourcc('B', 'X', '2', '4') /* 32 XRGB-8-8-8-8 */ - -#define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ -#define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */ -#define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ -#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ -#define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ -#define V4L2_PIX_FMT_Y14 v4l2_fourcc('Y', '1', '4', ' ') /* 14 Greyscale */ -#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ -#define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ') /* 16 Greyscale BE */ - -#define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */ -#define V4L2_PIX_FMT_Y10P v4l2_fourcc('Y', '1', '0', 'P') /* 10 Greyscale, MIPI RAW10 packed */ -#define V4L2_PIX_FMT_IPU3_Y10 v4l2_fourcc('i', 'p', '3', 'y') /* IPU3 packed 10-bit greyscale */ - -#define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */ -#define V4L2_PIX_FMT_UV8 v4l2_fourcc('U', 'V', '8', ' ') /* 8 UV 4:4 */ - -#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16 YUV 4:2:2 */ -#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y', 'Y', 'U', 'V') /* 16 YUV 4:2:2 */ -#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ -#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16 YUV 4:2:2 */ -#define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16 YUV 4:2:2 */ -#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y', '4', '1', 'P') /* 12 YUV 4:1:1 */ -#define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4') /* 16 xxxxyyyy uuuuvvvv */ -#define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */ -#define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */ -#define V4L2_PIX_FMT_YUV24 v4l2_fourcc('Y', 'U', 'V', '3') /* 24 YUV-8-8-8 */ -#define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */ -#define V4L2_PIX_FMT_AYUV32 v4l2_fourcc('A', 'Y', 'U', 'V') /* 32 AYUV-8-8-8-8 */ -#define V4L2_PIX_FMT_XYUV32 v4l2_fourcc('X', 'Y', 'U', 'V') /* 32 XYUV-8-8-8-8 */ -#define V4L2_PIX_FMT_VUYA32 v4l2_fourcc('V', 'U', 'Y', 'A') /* 32 VUYA-8-8-8-8 */ -#define V4L2_PIX_FMT_VUYX32 v4l2_fourcc('V', 'U', 'Y', 'X') /* 32 VUYX-8-8-8-8 */ -#define V4L2_PIX_FMT_YUVA32 v4l2_fourcc('Y', 'U', 'V', 'A') /* 32 YUVA-8-8-8-8 */ -#define V4L2_PIX_FMT_YUVX32 v4l2_fourcc('Y', 'U', 'V', 'X') /* 32 YUVX-8-8-8-8 */ -#define V4L2_PIX_FMT_M420 v4l2_fourcc('M', '4', '2', '0') /* 12 YUV 4:2:0 2 lines y, 1 line uv interleaved */ - -#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ -#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */ -#define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ -#define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ -#define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4') /* 24 Y/CbCr 4:4:4 */ -#define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2') /* 24 Y/CrCb 4:4:4 */ -#define V4L2_PIX_FMT_P010 v4l2_fourcc('P', '0', '1', '0') /* 24 Y/CbCr 4:2:0 10-bit per component */ - -#define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */ -#define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') /* 21 Y/CrCb 4:2:0 */ -#define V4L2_PIX_FMT_NV16M v4l2_fourcc('N', 'M', '1', '6') /* 16 Y/CbCr 4:2:2 */ -#define V4L2_PIX_FMT_NV61M v4l2_fourcc('N', 'M', '6', '1') /* 16 Y/CrCb 4:2:2 */ - -#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */ -#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */ -#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4', '1', '1', 'P') /* 12 YVU411 planar */ -#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */ -#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */ -#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P') /* 16 YVU422 planar */ - -#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */ -#define V4L2_PIX_FMT_YVU420M v4l2_fourcc('Y', 'M', '2', '1') /* 12 YVU420 planar */ -#define V4L2_PIX_FMT_YUV422M v4l2_fourcc('Y', 'M', '1', '6') /* 16 YUV422 planar */ -#define V4L2_PIX_FMT_YVU422M v4l2_fourcc('Y', 'M', '6', '1') /* 16 YVU422 planar */ -#define V4L2_PIX_FMT_YUV444M v4l2_fourcc('Y', 'M', '2', '4') /* 24 YUV444 planar */ -#define V4L2_PIX_FMT_YVU444M v4l2_fourcc('Y', 'M', '4', '2') /* 24 YVU444 planar */ - -#define V4L2_PIX_FMT_NV12_4L4 v4l2_fourcc('V', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 4x4 tiles */ -#define V4L2_PIX_FMT_NV12_16L16 v4l2_fourcc('H', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */ -#define V4L2_PIX_FMT_NV12_32L32 v4l2_fourcc('S', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 32x32 tiles */ -#define V4L2_PIX_FMT_P010_4L4 v4l2_fourcc('T', '0', '1', '0') /* 12 Y/CbCr 4:2:0 10-bit 4x4 macroblocks */ - -#define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 tiles */ -#define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */ -#define V4L2_PIX_FMT_NV12M_8L128 v4l2_fourcc('N', 'A', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */ -#define V4L2_PIX_FMT_NV12M_10BE_8L128 v4l2_fourcc_be('N', 'T', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles */ - -#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ -#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ -#define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ -#define V4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R', 'G', 'G', 'B') /* 8 RGRG.. GBGB.. */ -#define V4L2_PIX_FMT_SBGGR10 v4l2_fourcc('B', 'G', '1', '0') /* 10 BGBG.. GRGR.. */ -#define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */ -#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */ -#define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */ - -#define V4L2_PIX_FMT_SBGGR10P v4l2_fourcc('p', 'B', 'A', 'A') -#define V4L2_PIX_FMT_SGBRG10P v4l2_fourcc('p', 'G', 'A', 'A') -#define V4L2_PIX_FMT_SGRBG10P v4l2_fourcc('p', 'g', 'A', 'A') -#define V4L2_PIX_FMT_SRGGB10P v4l2_fourcc('p', 'R', 'A', 'A') - -#define V4L2_PIX_FMT_SBGGR10ALAW8 v4l2_fourcc('a', 'B', 'A', '8') -#define V4L2_PIX_FMT_SGBRG10ALAW8 v4l2_fourcc('a', 'G', 'A', '8') -#define V4L2_PIX_FMT_SGRBG10ALAW8 v4l2_fourcc('a', 'g', 'A', '8') -#define V4L2_PIX_FMT_SRGGB10ALAW8 v4l2_fourcc('a', 'R', 'A', '8') - -#define V4L2_PIX_FMT_SBGGR10DPCM8 v4l2_fourcc('b', 'B', 'A', '8') -#define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('b', 'G', 'A', '8') -#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0') -#define V4L2_PIX_FMT_SRGGB10DPCM8 v4l2_fourcc('b', 'R', 'A', '8') - -#define V4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B', 'G', '1', '2') /* 12 BGBG.. GRGR.. */ -#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */ -#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */ -#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */ - -#define V4L2_PIX_FMT_SBGGR12P v4l2_fourcc('p', 'B', 'C', 'C') -#define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C') -#define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C') -#define V4L2_PIX_FMT_SRGGB12P v4l2_fourcc('p', 'R', 'C', 'C') -#define V4L2_PIX_FMT_SBGGR14 v4l2_fourcc('B', 'G', '1', '4') /* 14 BGBG.. GRGR.. */ -#define V4L2_PIX_FMT_SGBRG14 v4l2_fourcc('G', 'B', '1', '4') /* 14 GBGB.. RGRG.. */ -#define V4L2_PIX_FMT_SGRBG14 v4l2_fourcc('G', 'R', '1', '4') /* 14 GRGR.. BGBG.. */ -#define V4L2_PIX_FMT_SRGGB14 v4l2_fourcc('R', 'G', '1', '4') /* 14 RGRG.. GBGB.. */ - -#define V4L2_PIX_FMT_SBGGR14P v4l2_fourcc('p', 'B', 'E', 'E') -#define V4L2_PIX_FMT_SGBRG14P v4l2_fourcc('p', 'G', 'E', 'E') -#define V4L2_PIX_FMT_SGRBG14P v4l2_fourcc('p', 'g', 'E', 'E') -#define V4L2_PIX_FMT_SRGGB14P v4l2_fourcc('p', 'R', 'E', 'E') -#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ -#define V4L2_PIX_FMT_SGBRG16 v4l2_fourcc('G', 'B', '1', '6') /* 16 GBGB.. RGRG.. */ -#define V4L2_PIX_FMT_SGRBG16 v4l2_fourcc('G', 'R', '1', '6') /* 16 GRGR.. BGBG.. */ -#define V4L2_PIX_FMT_SRGGB16 v4l2_fourcc('R', 'G', '1', '6') /* 16 RGRG.. GBGB.. */ - -#define V4L2_PIX_FMT_HSV24 v4l2_fourcc('H', 'S', 'V', '3') -#define V4L2_PIX_FMT_HSV32 v4l2_fourcc('H', 'S', 'V', '4') - -#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */ -#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG */ -#define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */ -#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */ -#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */ -#define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */ -#define V4L2_PIX_FMT_H264_MVC v4l2_fourcc('M', '2', '6', '4') /* H264 MVC */ -#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */ -#define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */ -#define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */ -#define V4L2_PIX_FMT_MPEG2_SLICE v4l2_fourcc('M', 'G', '2', 'S') /* MPEG-2 parsed slice data */ -#define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M', 'P', 'G', '4') /* MPEG-4 part 2 ES */ -#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */ -#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */ -#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */ -#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */ -#define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') /* VP8 parsed frame */ -#define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* VP9 */ -#define V4L2_PIX_FMT_VP9_FRAME v4l2_fourcc('V', 'P', '9', 'F') /* VP9 parsed frame */ -#define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */ -#define V4L2_PIX_FMT_FWHT v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */ -#define V4L2_PIX_FMT_FWHT_STATELESS v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */ -#define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */ -#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ - -#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ -#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ -#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ -#define V4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */ -#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P', 'W', 'C', '1') /* pwc older webcam */ -#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P', 'W', 'C', '2') /* pwc newer webcam */ -#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E', '6', '2', '5') /* ET61X251 compression */ -#define V4L2_PIX_FMT_SPCA501 v4l2_fourcc('S', '5', '0', '1') /* YUYV per line */ -#define V4L2_PIX_FMT_SPCA505 v4l2_fourcc('S', '5', '0', '5') /* YYUV per line */ -#define V4L2_PIX_FMT_SPCA508 v4l2_fourcc('S', '5', '0', '8') /* YUVY per line */ -#define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ -#define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ -#define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ -#define V4L2_PIX_FMT_JL2005BCD v4l2_fourcc('J', 'L', '2', '0') /* compressed RGGB bayer */ -#define V4L2_PIX_FMT_SN9C2028 v4l2_fourcc('S', 'O', 'N', 'X') /* compressed GBRG bayer */ -#define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ -#define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ -#define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ -#define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ -#define V4L2_PIX_FMT_STV0680 v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */ -#define V4L2_PIX_FMT_TM6000 v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */ -#define V4L2_PIX_FMT_CIT_YYVYUY v4l2_fourcc('C', 'I', 'T', 'V') /* one line of Y then 1 line of VYUY */ -#define V4L2_PIX_FMT_KONICA420 v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */ -#define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */ -#define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */ -#define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */ -#define V4L2_PIX_FMT_Y8I v4l2_fourcc('Y', '8', 'I', ' ') /* Greyscale 8-bit L/R interleaved */ -#define V4L2_PIX_FMT_Y12I v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-bit L/R interleaved */ -#define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */ -#define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */ -#define V4L2_PIX_FMT_MM21 v4l2_fourcc('M', 'M', '2', '1') /* Mediatek 8-bit block mode, two non-contiguous planes */ -#define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */ -#define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */ -#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */ -#define V4L2_PIX_FMT_QC08C v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */ -#define V4L2_PIX_FMT_QC10C v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */ -#define V4L2_PIX_FMT_AJPG v4l2_fourcc('A', 'J', 'P', 'G') /* Aspeed JPEG */ - -#define V4L2_PIX_FMT_IPU3_SBGGR10 v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */ -#define V4L2_PIX_FMT_IPU3_SGBRG10 v4l2_fourcc('i', 'p', '3', 'g') /* IPU3 packed 10-bit GBRG bayer */ -#define V4L2_PIX_FMT_IPU3_SGRBG10 v4l2_fourcc('i', 'p', '3', 'G') /* IPU3 packed 10-bit GRBG bayer */ -#define V4L2_PIX_FMT_IPU3_SRGGB10 v4l2_fourcc('i', 'p', '3', 'r') /* IPU3 packed 10-bit RGGB bayer */ - -#define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */ -#define V4L2_SDR_FMT_CU16LE v4l2_fourcc('C', 'U', '1', '6') /* IQ u16le */ -#define V4L2_SDR_FMT_CS8 v4l2_fourcc('C', 'S', '0', '8') /* complex s8 */ -#define V4L2_SDR_FMT_CS14LE v4l2_fourcc('C', 'S', '1', '4') /* complex s14le */ -#define V4L2_SDR_FMT_RU12LE v4l2_fourcc('R', 'U', '1', '2') /* real u12le */ -#define V4L2_SDR_FMT_PCU16BE v4l2_fourcc('P', 'C', '1', '6') /* planar complex u16be */ -#define V4L2_SDR_FMT_PCU18BE v4l2_fourcc('P', 'C', '1', '8') /* planar complex u18be */ -#define V4L2_SDR_FMT_PCU20BE v4l2_fourcc('P', 'C', '2', '0') /* planar complex u20be */ - -#define V4L2_TCH_FMT_DELTA_TD16 v4l2_fourcc('T', 'D', '1', '6') /* 16-bit signed deltas */ -#define V4L2_TCH_FMT_DELTA_TD08 v4l2_fourcc('T', 'D', '0', '8') /* 8-bit signed deltas */ -#define V4L2_TCH_FMT_TU16 v4l2_fourcc('T', 'U', '1', '6') /* 16-bit unsigned touch data */ -#define V4L2_TCH_FMT_TU08 v4l2_fourcc('T', 'U', '0', '8') /* 8-bit unsigned touch data */ - -#define V4L2_META_FMT_VSP1_HGO v4l2_fourcc('V', 'S', 'P', 'H') /* R-Car VSP1 1-D Histogram */ -#define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */ -#define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */ -#define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */ -#define V4L2_META_FMT_VIVID v4l2_fourcc('V', 'I', 'V', 'D') /* Vivid Metadata */ - -#define V4L2_META_FMT_RK_ISP1_PARAMS v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 3A Parameters */ -#define V4L2_META_FMT_RK_ISP1_STAT_3A v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */ - -#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe - -#define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA 0x00000001 -#define V4L2_PIX_FMT_FLAG_SET_CSC 0x00000002 - -struct v4l2_fmtdesc { - __u32 index; - __u32 type; - __u32 flags; - __u8 description[32]; - __u32 pixelformat; - __u32 mbus_code; - __u32 reserved[3]; -}; - -#define V4L2_FMT_FLAG_COMPRESSED 0x0001 -#define V4L2_FMT_FLAG_EMULATED 0x0002 -#define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM 0x0004 -#define V4L2_FMT_FLAG_DYN_RESOLUTION 0x0008 -#define V4L2_FMT_FLAG_ENC_CAP_FRAME_INTERVAL 0x0010 -#define V4L2_FMT_FLAG_CSC_COLORSPACE 0x0020 -#define V4L2_FMT_FLAG_CSC_XFER_FUNC 0x0040 -#define V4L2_FMT_FLAG_CSC_YCBCR_ENC 0x0080 -#define V4L2_FMT_FLAG_CSC_HSV_ENC V4L2_FMT_FLAG_CSC_YCBCR_ENC -#define V4L2_FMT_FLAG_CSC_QUANTIZATION 0x0100 - -enum v4l2_frmsizetypes { - V4L2_FRMSIZE_TYPE_DISCRETE = 1, - V4L2_FRMSIZE_TYPE_CONTINUOUS = 2, - V4L2_FRMSIZE_TYPE_STEPWISE = 3, -}; - -struct v4l2_frmsize_discrete { - __u32 width; - __u32 height; -}; - -struct v4l2_frmsize_stepwise { - __u32 min_width; - __u32 max_width; - __u32 step_width; - __u32 min_height; - __u32 max_height; - __u32 step_height; -}; - -struct v4l2_frmsizeenum { - __u32 index; - __u32 pixel_format; - __u32 type; - - union { - struct v4l2_frmsize_discrete discrete; - struct v4l2_frmsize_stepwise stepwise; - }; - - __u32 reserved[2]; -}; - -enum v4l2_frmivaltypes { - V4L2_FRMIVAL_TYPE_DISCRETE = 1, - V4L2_FRMIVAL_TYPE_CONTINUOUS = 2, - V4L2_FRMIVAL_TYPE_STEPWISE = 3, -}; - -struct v4l2_frmival_stepwise { - struct v4l2_fract min; - struct v4l2_fract max; - struct v4l2_fract step; -}; - -struct v4l2_frmivalenum { - __u32 index; - __u32 pixel_format; - __u32 width; - __u32 height; - __u32 type; - - union { - struct v4l2_fract discrete; - struct v4l2_frmival_stepwise stepwise; - }; - - __u32 reserved[2]; -}; - -struct v4l2_timecode { - __u32 type; - __u32 flags; - __u8 frames; - __u8 seconds; - __u8 minutes; - __u8 hours; - __u8 userbits[4]; -}; - -#define V4L2_TC_TYPE_24FPS 1 -#define V4L2_TC_TYPE_25FPS 2 -#define V4L2_TC_TYPE_30FPS 3 -#define V4L2_TC_TYPE_50FPS 4 -#define V4L2_TC_TYPE_60FPS 5 - -#define V4L2_TC_FLAG_DROPFRAME 0x0001 -#define V4L2_TC_FLAG_COLORFRAME 0x0002 -#define V4L2_TC_USERBITS_field 0x000C -#define V4L2_TC_USERBITS_USERDEFINED 0x0000 -#define V4L2_TC_USERBITS_8BITCHARS 0x0008 - -struct v4l2_jpegcompression { - int quality; - int APPn; - int APP_len; - char APP_data[60]; - int COM_len; - char COM_data[60]; - __u32 jpeg_markers; - -#define V4L2_JPEG_MARKER_DHT (1<<3) -#define V4L2_JPEG_MARKER_DQT (1<<4) -#define V4L2_JPEG_MARKER_DRI (1<<5) -#define V4L2_JPEG_MARKER_COM (1<<6) -#define V4L2_JPEG_MARKER_APP (1<<7) -}; - -struct v4l2_requestbuffers { - __u32 count; - __u32 type; - __u32 memory; - __u32 capabilities; - __u8 flags; - __u8 reserved[3]; -}; - -#define V4L2_MEMORY_FLAG_NON_COHERENT (1 << 0) - -#define V4L2_BUF_CAP_SUPPORTS_MMAP (1 << 0) -#define V4L2_BUF_CAP_SUPPORTS_USERPTR (1 << 1) -#define V4L2_BUF_CAP_SUPPORTS_DMABUF (1 << 2) -#define V4L2_BUF_CAP_SUPPORTS_REQUESTS (1 << 3) -#define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4) -#define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF (1 << 5) -#define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS (1 << 6) - -struct v4l2_plane { - __u32 bytesused; - __u32 length; - union { - __u32 mem_offset; - unsigned long userptr; - __s32 fd; - } m; - __u32 data_offset; - __u32 reserved[11]; -}; - -struct v4l2_buffer { - __u32 index; - __u32 type; - __u32 bytesused; - __u32 flags; - __u32 field; - struct timeval timestamp; - struct v4l2_timecode timecode; - __u32 sequence; - - __u32 memory; - union { - __u32 offset; - unsigned long userptr; - struct v4l2_plane *planes; - __s32 fd; - } m; - __u32 length; - __u32 reserved2; - union { - __s32 request_fd; - __u32 reserved; - }; -}; - -static __inline__ __u64 v4l2_timeval_to_ns(const struct timeval *tv) -{ - return (__u64)tv->tv_sec * 1000000000ULL + tv->tv_usec * 1000; -} - -#define V4L2_BUF_FLAG_MAPPED 0x00000001 -#define V4L2_BUF_FLAG_QUEUED 0x00000002 -#define V4L2_BUF_FLAG_DONE 0x00000004 -#define V4L2_BUF_FLAG_KEYFRAME 0x00000008 -#define V4L2_BUF_FLAG_PFRAME 0x00000010 -#define V4L2_BUF_FLAG_BFRAME 0x00000020 -#define V4L2_BUF_FLAG_ERROR 0x00000040 -#define V4L2_BUF_FLAG_IN_REQUEST 0x00000080 -#define V4L2_BUF_FLAG_TIMECODE 0x00000100 -#define V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF 0x00000200 -#define V4L2_BUF_FLAG_PREPARED 0x00000400 -#define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x00000800 -#define V4L2_BUF_FLAG_NO_CACHE_CLEAN 0x00001000 -#define V4L2_BUF_FLAG_TIMESTAMP_MASK 0x0000e000 -#define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x00000000 -#define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x00002000 -#define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x00004000 -#define V4L2_BUF_FLAG_TSTAMP_SRC_MASK 0x00070000 -#define V4L2_BUF_FLAG_TSTAMP_SRC_EOF 0x00000000 -#define V4L2_BUF_FLAG_TSTAMP_SRC_SOE 0x00010000 -#define V4L2_BUF_FLAG_LAST 0x00100000 -#define V4L2_BUF_FLAG_REQUEST_FD 0x00800000 - -struct v4l2_exportbuffer { - __u32 type; - __u32 index; - __u32 plane; - __u32 flags; - __s32 fd; - __u32 reserved[11]; -}; - -struct v4l2_framebuffer { - __u32 capability; - __u32 flags; - void *base; - struct { - __u32 width; - __u32 height; - __u32 pixelformat; - __u32 field; - __u32 bytesperline; - __u32 sizeimage; - __u32 colorspace; - __u32 priv; - } fmt; -}; - -#define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001 -#define V4L2_FBUF_CAP_CHROMAKEY 0x0002 -#define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004 -#define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008 -#define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 -#define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 -#define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040 -#define V4L2_FBUF_CAP_SRC_CHROMAKEY 0x0080 - -#define V4L2_FBUF_FLAG_PRIMARY 0x0001 -#define V4L2_FBUF_FLAG_OVERLAY 0x0002 -#define V4L2_FBUF_FLAG_CHROMAKEY 0x0004 -#define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 -#define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 -#define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 -#define V4L2_FBUF_FLAG_SRC_CHROMAKEY 0x0040 - -struct v4l2_clip { - struct v4l2_rect c; - struct v4l2_clip *next; -}; - -struct v4l2_window { - struct v4l2_rect w; - __u32 field; - __u32 chromakey; - struct v4l2_clip *clips; - __u32 clipcount; - void *bitmap; - __u8 global_alpha; -}; - -struct v4l2_captureparm { - __u32 capability; - __u32 capturemode; - struct v4l2_fract timeperframe; - __u32 extendedmode; - __u32 readbuffers; - __u32 reserved[4]; -}; - -#define V4L2_MODE_HIGHQUALITY 0x0001 -#define V4L2_CAP_TIMEPERFRAME 0x1000 - -struct v4l2_outputparm { - __u32 capability; - __u32 outputmode; - struct v4l2_fract timeperframe; - __u32 extendedmode; - __u32 writebuffers; - __u32 reserved[4]; -}; - -struct v4l2_cropcap { - __u32 type; - struct v4l2_rect bounds; - struct v4l2_rect defrect; - struct v4l2_fract pixelaspect; -}; - -struct v4l2_crop { - __u32 type; - struct v4l2_rect c; -}; - -struct v4l2_selection { - __u32 type; - __u32 target; - __u32 flags; - struct v4l2_rect r; - __u32 reserved[9]; -}; - -typedef __u64 v4l2_std_id; - -#define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001) -#define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002) -#define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004) -#define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008) -#define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010) -#define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020) -#define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040) -#define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080) - -#define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100) -#define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200) -#define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400) -#define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800) - -#define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) -#define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) -#define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000) -#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000) - -#define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000) -#define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000) -#define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000) -#define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000) -#define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000) -#define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000) -#define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000) -#define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000) - -#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) -#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) - -#define V4L2_STD_NTSC (V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_JP | V4L2_STD_NTSC_M_KR) -#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D | V4L2_STD_SECAM_K | V4L2_STD_SECAM_K1) -#define V4L2_STD_SECAM (V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H | V4L2_STD_SECAM_DK | V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC) -#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B | V4L2_STD_PAL_B1 | V4L2_STD_PAL_G) -#define V4L2_STD_PAL_DK (V4L2_STD_PAL_D | V4L2_STD_PAL_D1 | V4L2_STD_PAL_K) -#define V4L2_STD_PAL (V4L2_STD_PAL_BG | V4L2_STD_PAL_DK | V4L2_STD_PAL_H | V4L2_STD_PAL_I) -#define V4L2_STD_B (V4L2_STD_PAL_B | V4L2_STD_PAL_B1 | V4L2_STD_SECAM_B) -#define V4L2_STD_G (V4L2_STD_PAL_G | V4L2_STD_SECAM_G) -#define V4L2_STD_H (V4L2_STD_PAL_H | V4L2_STD_SECAM_H) -#define V4L2_STD_L (V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC) -#define V4L2_STD_GH (V4L2_STD_G | V4L2_STD_H) -#define V4L2_STD_DK (V4L2_STD_PAL_DK | V4L2_STD_SECAM_DK) -#define V4L2_STD_BG (V4L2_STD_B | V4L2_STD_G) -#define V4L2_STD_MN (V4L2_STD_PAL_M | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc | V4L2_STD_NTSC) -#define V4L2_STD_MTS (V4L2_STD_NTSC_M | V4L2_STD_PAL_M | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc) - -#define V4L2_STD_525_60 (V4L2_STD_PAL_M | V4L2_STD_PAL_60 | V4L2_STD_NTSC | V4L2_STD_NTSC_443) -#define V4L2_STD_625_50 (V4L2_STD_PAL | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc | V4L2_STD_SECAM) - -#define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB | V4L2_STD_ATSC_16_VSB) -#define V4L2_STD_UNKNOWN 0 -#define V4L2_STD_ALL (V4L2_STD_525_60 | V4L2_STD_625_50) - -struct v4l2_standard { - __u32 index; - v4l2_std_id id; - __u8 name[24]; - struct v4l2_fract frameperiod; - __u32 framelines; - __u32 reserved[4]; -}; - -struct v4l2_bt_timings { - __u32 width; - __u32 height; - __u32 interlaced; - __u32 polarities; - __u64 pixelclock; - __u32 hfrontporch; - __u32 hsync; - __u32 hbackporch; - __u32 vfrontporch; - __u32 vsync; - __u32 vbackporch; - __u32 il_vfrontporch; - __u32 il_vsync; - __u32 il_vbackporch; - __u32 standards; - __u32 flags; - struct v4l2_fract picture_aspect; - __u8 cea861_vic; - __u8 hdmi_vic; - __u8 reserved[46]; -} __attribute__ ((packed)); - -#define V4L2_DV_PROGRESSIVE 0 -#define V4L2_DV_INTERLACED 1 - -#define V4L2_DV_VSYNC_POS_POL 0x00000001 -#define V4L2_DV_HSYNC_POS_POL 0x00000002 - -#define V4L2_DV_BT_STD_CEA861 (1 << 0) -#define V4L2_DV_BT_STD_DMT (1 << 1) -#define V4L2_DV_BT_STD_CVT (1 << 2) -#define V4L2_DV_BT_STD_GTF (1 << 3) -#define V4L2_DV_BT_STD_SDI (1 << 4) - -#define V4L2_DV_FL_REDUCED_BLANKING (1 << 0) -#define V4L2_DV_FL_CAN_REDUCE_FPS (1 << 1) -#define V4L2_DV_FL_REDUCED_FPS (1 << 2) -#define V4L2_DV_FL_HALF_LINE (1 << 3) -#define V4L2_DV_FL_IS_CE_VIDEO (1 << 4) -#define V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE (1 << 5) -#define V4L2_DV_FL_HAS_PICTURE_ASPECT (1 << 6) -#define V4L2_DV_FL_HAS_CEA861_VIC (1 << 7) -#define V4L2_DV_FL_HAS_HDMI_VIC (1 << 8) -#define V4L2_DV_FL_CAN_DETECT_REDUCED_FPS (1 << 9) - -#define V4L2_DV_BT_BLANKING_WIDTH(bt) ((bt)->hfrontporch + (bt)->hsync + (bt)->hbackporch) -#define V4L2_DV_BT_FRAME_WIDTH(bt) ((bt)->width + V4L2_DV_BT_BLANKING_WIDTH(bt)) -#define V4L2_DV_BT_BLANKING_HEIGHT(bt) ((bt)->vfrontporch + (bt)->vsync + (bt)->vbackporch + ((bt)->interlaced ? ((bt)->il_vfrontporch + (bt)->il_vsync + (bt)->il_vbackporch) : 0)) -#define V4L2_DV_BT_FRAME_HEIGHT(bt) ((bt)->height + V4L2_DV_BT_BLANKING_HEIGHT(bt)) - -struct v4l2_dv_timings { - __u32 type; - union { - struct v4l2_bt_timings bt; - __u32 reserved[32]; - }; -} __attribute__ ((packed)); - -#define V4L2_DV_BT_656_1120 0 - -struct v4l2_enum_dv_timings { - __u32 index; - __u32 pad; - __u32 reserved[2]; - struct v4l2_dv_timings timings; -}; - -struct v4l2_bt_timings_cap { - __u32 min_width; - __u32 max_width; - __u32 min_height; - __u32 max_height; - __u64 min_pixelclock; - __u64 max_pixelclock; - __u32 standards; - __u32 capabilities; - __u32 reserved[16]; -} __attribute__ ((packed)); - -#define V4L2_DV_BT_CAP_INTERLACED (1 << 0) -#define V4L2_DV_BT_CAP_PROGRESSIVE (1 << 1) -#define V4L2_DV_BT_CAP_REDUCED_BLANKING (1 << 2) -#define V4L2_DV_BT_CAP_CUSTOM (1 << 3) - -struct v4l2_dv_timings_cap { - __u32 type; - __u32 pad; - __u32 reserved[2]; - union { - struct v4l2_bt_timings_cap bt; - __u32 raw_data[32]; - }; -}; - -struct v4l2_input { - __u32 index; - __u8 name[32]; - __u32 type; - __u32 audioset; - __u32 tuner; - v4l2_std_id std; - __u32 status; - __u32 capabilities; - __u32 reserved[3]; -}; - -#define V4L2_INPUT_TYPE_TUNER 1 -#define V4L2_INPUT_TYPE_CAMERA 2 -#define V4L2_INPUT_TYPE_TOUCH 3 - -#define V4L2_IN_ST_NO_POWER 0x00000001 -#define V4L2_IN_ST_NO_SIGNAL 0x00000002 -#define V4L2_IN_ST_NO_COLOR 0x00000004 - -#define V4L2_IN_ST_HFLIP 0x00000010 -#define V4L2_IN_ST_VFLIP 0x00000020 - -#define V4L2_IN_ST_NO_H_LOCK 0x00000100 -#define V4L2_IN_ST_COLOR_KILL 0x00000200 -#define V4L2_IN_ST_NO_V_LOCK 0x00000400 -#define V4L2_IN_ST_NO_STD_LOCK 0x00000800 - -#define V4L2_IN_ST_NO_SYNC 0x00010000 -#define V4L2_IN_ST_NO_EQU 0x00020000 -#define V4L2_IN_ST_NO_CARRIER 0x00040000 - -#define V4L2_IN_ST_MACROVISION 0x01000000 -#define V4L2_IN_ST_NO_ACCESS 0x02000000 -#define V4L2_IN_ST_VTR 0x04000000 - -#define V4L2_IN_CAP_DV_TIMINGS 0x00000002 -#define V4L2_IN_CAP_CUSTOM_TIMINGS V4L2_IN_CAP_DV_TIMINGS -#define V4L2_IN_CAP_STD 0x00000004 -#define V4L2_IN_CAP_NATIVE_SIZE 0x00000008 - -struct v4l2_output { - __u32 index; - __u8 name[32]; - __u32 type; - __u32 audioset; - __u32 modulator; - v4l2_std_id std; - __u32 capabilities; - __u32 reserved[3]; -}; - -#define V4L2_OUTPUT_TYPE_MODULATOR 1 -#define V4L2_OUTPUT_TYPE_ANALOG 2 -#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 - -#define V4L2_OUT_CAP_DV_TIMINGS 0x00000002 -#define V4L2_OUT_CAP_CUSTOM_TIMINGS V4L2_OUT_CAP_DV_TIMINGS -#define V4L2_OUT_CAP_STD 0x00000004 -#define V4L2_OUT_CAP_NATIVE_SIZE 0x00000008 - -struct v4l2_control { - __u32 id; - __s32 value; -}; - -struct v4l2_ext_control { - __u32 id; - __u32 size; - __u32 reserved2[1]; - union { - __s32 value; - __s64 value64; - char *string; - __u8 *p_u8; - __u16 *p_u16; - __u32 *p_u32; - __u32 *p_s32; - __u32 *p_s64; - struct v4l2_area *p_area; - struct v4l2_ctrl_h264_sps *p_h264_sps; - struct v4l2_ctrl_h264_pps *p_h264_pps; - struct v4l2_ctrl_h264_scaling_matrix *p_h264_scaling_matrix; - struct v4l2_ctrl_h264_pred_weights *p_h264_pred_weights; - struct v4l2_ctrl_h264_slice_params *p_h264_slice_params; - struct v4l2_ctrl_h264_decode_params *p_h264_decode_params; - struct v4l2_ctrl_fwht_params *p_fwht_params; - struct v4l2_ctrl_vp8_frame *p_vp8_frame; - struct v4l2_ctrl_mpeg2_sequence *p_mpeg2_sequence; - struct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture; - struct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quantisation; - struct v4l2_ctrl_vp9_compressed_hdr *p_vp9_compressed_hdr_probs; - struct v4l2_ctrl_vp9_frame *p_vp9_frame; - struct v4l2_ctrl_hevc_sps *p_hevc_sps; - struct v4l2_ctrl_hevc_pps *p_hevc_pps; - struct v4l2_ctrl_hevc_slice_params *p_hevc_slice_params; - struct v4l2_ctrl_hevc_scaling_matrix *p_hevc_scaling_matrix; - struct v4l2_ctrl_hevc_decode_params *p_hevc_decode_params; - void *ptr; - }; -} __attribute__ ((packed)); - -struct v4l2_ext_controls { - union { - __u32 ctrl_class; - __u32 which; - }; - __u32 count; - __u32 error_idx; - __s32 request_fd; - __u32 reserved[1]; - struct v4l2_ext_control *controls; -}; - -#define V4L2_CTRL_ID_MASK (0x0fffffff) -#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) -#define V4L2_CTRL_ID2WHICH(id) ((id) & 0x0fff0000UL) -#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) -#define V4L2_CTRL_MAX_DIMS (4) -#define V4L2_CTRL_WHICH_CUR_VAL 0 -#define V4L2_CTRL_WHICH_DEF_VAL 0x0f000000 -#define V4L2_CTRL_WHICH_REQUEST_VAL 0x0f010000 - -enum v4l2_ctrl_type { - V4L2_CTRL_TYPE_INTEGER = 1, - V4L2_CTRL_TYPE_BOOLEAN = 2, - V4L2_CTRL_TYPE_MENU = 3, - V4L2_CTRL_TYPE_BUTTON = 4, - V4L2_CTRL_TYPE_INTEGER64 = 5, - V4L2_CTRL_TYPE_CTRL_CLASS = 6, - V4L2_CTRL_TYPE_STRING = 7, - V4L2_CTRL_TYPE_BITMASK = 8, - V4L2_CTRL_TYPE_INTEGER_MENU = 9, - - V4L2_CTRL_COMPOUND_TYPES = 0x0100, - V4L2_CTRL_TYPE_U8 = 0x0100, - V4L2_CTRL_TYPE_U16 = 0x0101, - V4L2_CTRL_TYPE_U32 = 0x0102, - V4L2_CTRL_TYPE_AREA = 0x0106, - - V4L2_CTRL_TYPE_HDR10_CLL_INFO = 0x0110, - V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY = 0x0111, - - V4L2_CTRL_TYPE_H264_SPS = 0x0200, - V4L2_CTRL_TYPE_H264_PPS = 0x0201, - V4L2_CTRL_TYPE_H264_SCALING_MATRIX = 0x0202, - V4L2_CTRL_TYPE_H264_SLICE_PARAMS = 0x0203, - V4L2_CTRL_TYPE_H264_DECODE_PARAMS = 0x0204, - V4L2_CTRL_TYPE_H264_PRED_WEIGHTS = 0x0205, - - V4L2_CTRL_TYPE_FWHT_PARAMS = 0x0220, - - V4L2_CTRL_TYPE_VP8_FRAME = 0x0240, - - V4L2_CTRL_TYPE_MPEG2_QUANTISATION = 0x0250, - V4L2_CTRL_TYPE_MPEG2_SEQUENCE = 0x0251, - V4L2_CTRL_TYPE_MPEG2_PICTURE = 0x0252, - - V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR = 0x0260, - V4L2_CTRL_TYPE_VP9_FRAME = 0x0261, - - V4L2_CTRL_TYPE_HEVC_SPS = 0x0270, - V4L2_CTRL_TYPE_HEVC_PPS = 0x0271, - V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS = 0x0272, - V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX = 0x0273, - V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS = 0x0274, -}; - -struct v4l2_queryctrl { - __u32 id; - __u32 type; - __u8 name[32]; - __s32 minimum; - __s32 maximum; - __s32 step; - __s32 default_value; - __u32 flags; - __u32 reserved[2]; -}; - -struct v4l2_query_ext_ctrl { - __u32 id; - __u32 type; - char name[32]; - __s64 minimum; - __s64 maximum; - __u64 step; - __s64 default_value; - __u32 flags; - __u32 elem_size; - __u32 elems; - __u32 nr_of_dims; - __u32 dims[V4L2_CTRL_MAX_DIMS]; - __u32 reserved[32]; -}; - -struct v4l2_querymenu { - __u32 id; - __u32 index; - union { - __u8 name[32]; - __s64 value; - }; - __u32 reserved; -} __attribute__ ((packed)); - -#define V4L2_CTRL_FLAG_DISABLED 0x0001 -#define V4L2_CTRL_FLAG_GRABBED 0x0002 -#define V4L2_CTRL_FLAG_READ_ONLY 0x0004 -#define V4L2_CTRL_FLAG_UPDATE 0x0008 -#define V4L2_CTRL_FLAG_INACTIVE 0x0010 -#define V4L2_CTRL_FLAG_SLIDER 0x0020 -#define V4L2_CTRL_FLAG_WRITE_ONLY 0x0040 -#define V4L2_CTRL_FLAG_VOLATILE 0x0080 -#define V4L2_CTRL_FLAG_HAS_PAYLOAD 0x0100 -#define V4L2_CTRL_FLAG_EXECUTE_ON_WRITE 0x0200 -#define V4L2_CTRL_FLAG_MODIFY_LAYOUT 0x0400 -#define V4L2_CTRL_FLAG_DYNAMIC_ARRAY 0x0800 - -#define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000 -#define V4L2_CTRL_FLAG_NEXT_COMPOUND 0x40000000 - -#define V4L2_CID_MAX_CTRLS 1024 -#define V4L2_CID_PRIVATE_BASE 0x08000000 - -struct v4l2_tuner { - __u32 index; - __u8 name[32]; - __u32 type; - __u32 capability; - __u32 rangelow; - __u32 rangehigh; - __u32 rxsubchans; - __u32 audmode; - __s32 signal; - __s32 afc; - __u32 reserved[4]; -}; - -struct v4l2_modulator { - __u32 index; - __u8 name[32]; - __u32 capability; - __u32 rangelow; - __u32 rangehigh; - __u32 txsubchans; - __u32 type; - __u32 reserved[3]; -}; - -#define V4L2_TUNER_CAP_LOW 0x0001 -#define V4L2_TUNER_CAP_NORM 0x0002 -#define V4L2_TUNER_CAP_HWSEEK_BOUNDED 0x0004 -#define V4L2_TUNER_CAP_HWSEEK_WRAP 0x0008 -#define V4L2_TUNER_CAP_STEREO 0x0010 -#define V4L2_TUNER_CAP_LANG2 0x0020 -#define V4L2_TUNER_CAP_SAP 0x0020 -#define V4L2_TUNER_CAP_LANG1 0x0040 -#define V4L2_TUNER_CAP_RDS 0x0080 -#define V4L2_TUNER_CAP_RDS_BLOCK_IO 0x0100 -#define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200 -#define V4L2_TUNER_CAP_FREQ_BANDS 0x0400 -#define V4L2_TUNER_CAP_HWSEEK_PROG_LIM 0x0800 -#define V4L2_TUNER_CAP_1HZ 0x1000 - -#define V4L2_TUNER_SUB_MONO 0x0001 -#define V4L2_TUNER_SUB_STEREO 0x0002 -#define V4L2_TUNER_SUB_LANG2 0x0004 -#define V4L2_TUNER_SUB_SAP 0x0004 -#define V4L2_TUNER_SUB_LANG1 0x0008 -#define V4L2_TUNER_SUB_RDS 0x0010 - -#define V4L2_TUNER_MODE_MONO 0x0000 -#define V4L2_TUNER_MODE_STEREO 0x0001 -#define V4L2_TUNER_MODE_LANG2 0x0002 -#define V4L2_TUNER_MODE_SAP 0x0002 -#define V4L2_TUNER_MODE_LANG1 0x0003 -#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 - -struct v4l2_frequency { - __u32 tuner; - __u32 type; - __u32 frequency; - __u32 reserved[8]; -}; - -#define V4L2_BAND_MODULATION_VSB (1 << 1) -#define V4L2_BAND_MODULATION_FM (1 << 2) -#define V4L2_BAND_MODULATION_AM (1 << 3) - -struct v4l2_frequency_band { - __u32 tuner; - __u32 type; - __u32 index; - __u32 capability; - __u32 rangelow; - __u32 rangehigh; - __u32 modulation; - __u32 reserved[9]; -}; - -struct v4l2_hw_freq_seek { - __u32 tuner; - __u32 type; - __u32 seek_upward; - __u32 wrap_around; - __u32 spacing; - __u32 rangelow; - __u32 rangehigh; - __u32 reserved[5]; -}; - -struct v4l2_rds_data { - __u8 lsb; - __u8 msb; - __u8 block; -} __attribute__ ((packed)); - -#define V4L2_RDS_BLOCK_MSK 0x7 -#define V4L2_RDS_BLOCK_A 0 -#define V4L2_RDS_BLOCK_B 1 -#define V4L2_RDS_BLOCK_C 2 -#define V4L2_RDS_BLOCK_D 3 -#define V4L2_RDS_BLOCK_C_ALT 4 -#define V4L2_RDS_BLOCK_INVALID 7 - -#define V4L2_RDS_BLOCK_CORRECTED 0x40 -#define V4L2_RDS_BLOCK_ERROR 0x80 - -struct v4l2_audio { - __u32 index; - __u8 name[32]; - __u32 capability; - __u32 mode; - __u32 reserved[2]; -}; - -#define V4L2_AUDCAP_STEREO 0x00001 -#define V4L2_AUDCAP_AVL 0x00002 - -#define V4L2_AUDMODE_AVL 0x00001 - -struct v4l2_audioout { - __u32 index; - __u8 name[32]; - __u32 capability; - __u32 mode; - __u32 reserved[2]; -}; - -#if 1 -#define V4L2_ENC_IDX_FRAME_I (0) -#define V4L2_ENC_IDX_FRAME_P (1) -#define V4L2_ENC_IDX_FRAME_B (2) -#define V4L2_ENC_IDX_FRAME_MASK (0xf) - -struct v4l2_enc_idx_entry { - __u64 offset; - __u64 pts; - __u32 length; - __u32 flags; - __u32 reserved[2]; -}; - -#define V4L2_ENC_IDX_ENTRIES (64) - -struct v4l2_enc_idx { - __u32 entries; - __u32 entries_cap; - __u32 reserved[4]; - struct v4l2_enc_idx_entry entry[V4L2_ENC_IDX_ENTRIES]; -}; - - -#define V4L2_ENC_CMD_START (0) -#define V4L2_ENC_CMD_STOP (1) -#define V4L2_ENC_CMD_PAUSE (2) -#define V4L2_ENC_CMD_RESUME (3) - -#define V4L2_ENC_CMD_STOP_AT_GOP_END (1 << 0) - -struct v4l2_encoder_cmd { - __u32 cmd; - __u32 flags; - union { - struct { - __u32 data[8]; - } raw; - }; -}; - -#define V4L2_DEC_CMD_START (0) -#define V4L2_DEC_CMD_STOP (1) -#define V4L2_DEC_CMD_PAUSE (2) -#define V4L2_DEC_CMD_RESUME (3) -#define V4L2_DEC_CMD_FLUSH (4) - -#define V4L2_DEC_CMD_START_MUTE_AUDIO (1 << 0) -#define V4L2_DEC_CMD_PAUSE_TO_BLACK (1 << 0) - -#define V4L2_DEC_CMD_STOP_TO_BLACK (1 << 0) -#define V4L2_DEC_CMD_STOP_IMMEDIATELY (1 << 1) - -#define V4L2_DEC_START_FMT_NONE (0) -#define V4L2_DEC_START_FMT_GOP (1) - -struct v4l2_decoder_cmd { - __u32 cmd; - __u32 flags; - union { - struct { - __u64 pts; - } stop; - - struct { - __s32 speed; - __u32 format; - } start; - - struct { - __u32 data[16]; - } raw; - }; -}; -#endif - -struct v4l2_vbi_format { - __u32 sampling_rate; - __u32 offset; - __u32 samples_per_line; - __u32 sample_format; - __s32 start[2]; - __u32 count[2]; - __u32 flags; - __u32 reserved[2]; -}; - -#define V4L2_VBI_UNSYNC (1 << 0) -#define V4L2_VBI_INTERLACED (1 << 1) - -#define V4L2_VBI_ITU_525_F1_START (1) -#define V4L2_VBI_ITU_525_F2_START (264) -#define V4L2_VBI_ITU_625_F1_START (1) -#define V4L2_VBI_ITU_625_F2_START (314) - -struct v4l2_sliced_vbi_format { - __u16 service_set; - __u16 service_lines[2][24]; - __u32 io_size; - __u32 reserved[2]; -}; - -#define V4L2_SLICED_TELETEXT_B (0x0001) -#define V4L2_SLICED_VPS (0x0400) -#define V4L2_SLICED_CAPTION_525 (0x1000) -#define V4L2_SLICED_WSS_625 (0x4000) - -#define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) -#define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) - -struct v4l2_sliced_vbi_cap { - __u16 service_set; - __u16 service_lines[2][24]; - __u32 type; - __u32 reserved[3]; -}; - -struct v4l2_sliced_vbi_data { - __u32 id; - __u32 field; - __u32 line; - __u32 reserved; - __u8 data[48]; -}; - -#define V4L2_MPEG_VBI_IVTV_TELETEXT_B (1) -#define V4L2_MPEG_VBI_IVTV_CAPTION_525 (4) -#define V4L2_MPEG_VBI_IVTV_WSS_625 (5) -#define V4L2_MPEG_VBI_IVTV_VPS (7) - -struct v4l2_mpeg_vbi_itv0_line { - __u8 id; - __u8 data[42]; -} __attribute__ ((packed)); - -struct v4l2_mpeg_vbi_itv0 { - __le32 linemask[2]; - struct v4l2_mpeg_vbi_itv0_line line[35]; -} __attribute__ ((packed)); - -struct v4l2_mpeg_vbi_ITV0 { - struct v4l2_mpeg_vbi_itv0_line line[36]; -} __attribute__ ((packed)); - -#define V4L2_MPEG_VBI_IVTV_MAGIC0 "itv0" -#define V4L2_MPEG_VBI_IVTV_MAGIC1 "ITV0" - -struct v4l2_mpeg_vbi_fmt_ivtv { - __u8 magic[4]; - union { - struct v4l2_mpeg_vbi_itv0 itv0; - struct v4l2_mpeg_vbi_ITV0 ITV0; - }; -} __attribute__ ((packed)); - -struct v4l2_plane_pix_format { - __u32 sizeimage; - __u32 bytesperline; - __u16 reserved[6]; -} __attribute__ ((packed)); - -struct v4l2_pix_format_mplane { - __u32 width; - __u32 height; - __u32 pixelformat; - __u32 field; - __u32 colorspace; - - struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES]; - __u8 num_planes; - __u8 flags; - union { - __u8 ycbcr_enc; - __u8 hsv_enc; - }; - __u8 quantization; - __u8 xfer_func; - __u8 reserved[7]; -} __attribute__ ((packed)); - -struct v4l2_sdr_format { - __u32 pixelformat; - __u32 buffersize; - __u8 reserved[24]; -} __attribute__ ((packed)); - -struct v4l2_meta_format { - __u32 dataformat; - __u32 buffersize; -} __attribute__ ((packed)); - -struct v4l2_format { - __u32 type; - union { - struct v4l2_pix_format pix; - struct v4l2_pix_format_mplane pix_mp; - struct v4l2_window win; - struct v4l2_vbi_format vbi; - struct v4l2_sliced_vbi_format sliced; - struct v4l2_sdr_format sdr; - struct v4l2_meta_format meta; - __u8 raw_data[200]; - } fmt; -}; - -struct v4l2_streamparm { - __u32 type; - union { - struct v4l2_captureparm capture; - struct v4l2_outputparm output; - __u8 raw_data[200]; - } parm; -}; - -#define V4L2_EVENT_ALL 0 -#define V4L2_EVENT_VSYNC 1 -#define V4L2_EVENT_EOS 2 -#define V4L2_EVENT_CTRL 3 -#define V4L2_EVENT_FRAME_SYNC 4 -#define V4L2_EVENT_SOURCE_CHANGE 5 -#define V4L2_EVENT_MOTION_DET 6 -#define V4L2_EVENT_PRIVATE_START 0x08000000 - -struct v4l2_event_vsync { - __u8 field; -} __attribute__ ((packed)); - -#define V4L2_EVENT_CTRL_CH_VALUE (1 << 0) -#define V4L2_EVENT_CTRL_CH_FLAGS (1 << 1) -#define V4L2_EVENT_CTRL_CH_RANGE (1 << 2) -#define V4L2_EVENT_CTRL_CH_DIMENSIONS (1 << 3) - -struct v4l2_event_ctrl { - __u32 changes; - __u32 type; - union { - __s32 value; - __s64 value64; - }; - __u32 flags; - __s32 minimum; - __s32 maximum; - __s32 step; - __s32 default_value; -}; - -struct v4l2_event_frame_sync { - __u32 frame_sequence; -}; - -#define V4L2_EVENT_SRC_CH_RESOLUTION (1 << 0) - -struct v4l2_event_src_change { - __u32 changes; -}; - -#define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ (1 << 0) - -struct v4l2_event_motion_det { - __u32 flags; - __u32 frame_sequence; - __u32 region_mask; -}; - -struct v4l2_event { - __u32 type; - union { - struct v4l2_event_vsync vsync; - struct v4l2_event_ctrl ctrl; - struct v4l2_event_frame_sync frame_sync; - struct v4l2_event_src_change src_change; - struct v4l2_event_motion_det motion_det; - __u8 data[64]; - } u; - __u32 pending; - __u32 sequence; - struct timespec timestamp; - __u32 id; - __u32 reserved[8]; -}; - -#define V4L2_EVENT_SUB_FL_SEND_INITIAL (1 << 0) -#define V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK (1 << 1) - -struct v4l2_event_subscription { - __u32 type; - __u32 id; - __u32 flags; - __u32 reserved[5]; -}; - -#define V4L2_CHIP_MATCH_BRIDGE 0 -#define V4L2_CHIP_MATCH_SUBDEV 4 - -#define V4L2_CHIP_MATCH_HOST V4L2_CHIP_MATCH_BRIDGE -#define V4L2_CHIP_MATCH_I2C_DRIVER 1 -#define V4L2_CHIP_MATCH_I2C_ADDR 2 -#define V4L2_CHIP_MATCH_AC97 3 - -struct v4l2_dbg_match { - __u32 type; - union { - __u32 addr; - char name[32]; - }; -} __attribute__ ((packed)); - -struct v4l2_dbg_register { - struct v4l2_dbg_match match; - __u32 size; - __u64 reg; - __u64 val; -} __attribute__ ((packed)); - -#define V4L2_CHIP_FL_READABLE (1 << 0) -#define V4L2_CHIP_FL_WRITABLE (1 << 1) - -struct v4l2_dbg_chip_info { - struct v4l2_dbg_match match; - char name[32]; - __u32 flags; - __u32 reserved[32]; -} __attribute__ ((packed)); - -struct v4l2_create_buffers { - __u32 index; - __u32 count; - __u32 memory; - struct v4l2_format format; - __u32 capabilities; - __u32 flags; - __u32 reserved[6]; -}; - -#define VIDIOC_QUERYCAP _IOR('V', 0, struct v4l2_capability) -#define VIDIOC_ENUM_FMT _IOWR('V', 2, struct v4l2_fmtdesc) -#define VIDIOC_G_FMT _IOWR('V', 4, struct v4l2_format) -#define VIDIOC_S_FMT _IOWR('V', 5, struct v4l2_format) -#define VIDIOC_REQBUFS _IOWR('V', 8, struct v4l2_requestbuffers) -#define VIDIOC_QUERYBUF _IOWR('V', 9, struct v4l2_buffer) -#define VIDIOC_G_FBUF _IOR('V', 10, struct v4l2_framebuffer) -#define VIDIOC_S_FBUF _IOW('V', 11, struct v4l2_framebuffer) -#define VIDIOC_OVERLAY _IOW('V', 14, int) -#define VIDIOC_QBUF _IOWR('V', 15, struct v4l2_buffer) -#define VIDIOC_EXPBUF _IOWR('V', 16, struct v4l2_exportbuffer) -#define VIDIOC_DQBUF _IOWR('V', 17, struct v4l2_buffer) -#define VIDIOC_STREAMON _IOW('V', 18, int) -#define VIDIOC_STREAMOFF _IOW('V', 19, int) -#define VIDIOC_G_PARM _IOWR('V', 21, struct v4l2_streamparm) -#define VIDIOC_S_PARM _IOWR('V', 22, struct v4l2_streamparm) -#define VIDIOC_G_STD _IOR('V', 23, v4l2_std_id) -#define VIDIOC_S_STD _IOW('V', 24, v4l2_std_id) -#define VIDIOC_ENUMSTD _IOWR('V', 25, struct v4l2_standard) -#define VIDIOC_ENUMINPUT _IOWR('V', 26, struct v4l2_input) -#define VIDIOC_G_CTRL _IOWR('V', 27, struct v4l2_control) -#define VIDIOC_S_CTRL _IOWR('V', 28, struct v4l2_control) -#define VIDIOC_G_TUNER _IOWR('V', 29, struct v4l2_tuner) -#define VIDIOC_S_TUNER _IOW('V', 30, struct v4l2_tuner) -#define VIDIOC_G_AUDIO _IOR('V', 33, struct v4l2_audio) -#define VIDIOC_S_AUDIO _IOW('V', 34, struct v4l2_audio) -#define VIDIOC_QUERYCTRL _IOWR('V', 36, struct v4l2_queryctrl) -#define VIDIOC_QUERYMENU _IOWR('V', 37, struct v4l2_querymenu) -#define VIDIOC_G_INPUT _IOR('V', 38, int) -#define VIDIOC_S_INPUT _IOWR('V', 39, int) -#define VIDIOC_G_EDID _IOWR('V', 40, struct v4l2_edid) -#define VIDIOC_S_EDID _IOWR('V', 41, struct v4l2_edid) -#define VIDIOC_G_OUTPUT _IOR('V', 46, int) -#define VIDIOC_S_OUTPUT _IOWR('V', 47, int) -#define VIDIOC_ENUMOUTPUT _IOWR('V', 48, struct v4l2_output) -#define VIDIOC_G_AUDOUT _IOR('V', 49, struct v4l2_audioout) -#define VIDIOC_S_AUDOUT _IOW('V', 50, struct v4l2_audioout) -#define VIDIOC_G_MODULATOR _IOWR('V', 54, struct v4l2_modulator) -#define VIDIOC_S_MODULATOR _IOW('V', 55, struct v4l2_modulator) -#define VIDIOC_G_FREQUENCY _IOWR('V', 56, struct v4l2_frequency) -#define VIDIOC_S_FREQUENCY _IOW('V', 57, struct v4l2_frequency) -#define VIDIOC_CROPCAP _IOWR('V', 58, struct v4l2_cropcap) -#define VIDIOC_G_CROP _IOWR('V', 59, struct v4l2_crop) -#define VIDIOC_S_CROP _IOW('V', 60, struct v4l2_crop) -#define VIDIOC_G_JPEGCOMP _IOR('V', 61, struct v4l2_jpegcompression) -#define VIDIOC_S_JPEGCOMP _IOW('V', 62, struct v4l2_jpegcompression) -#define VIDIOC_QUERYSTD _IOR('V', 63, v4l2_std_id) -#define VIDIOC_TRY_FMT _IOWR('V', 64, struct v4l2_format) -#define VIDIOC_ENUMAUDIO _IOWR('V', 65, struct v4l2_audio) -#define VIDIOC_ENUMAUDOUT _IOWR('V', 66, struct v4l2_audioout) -#define VIDIOC_G_PRIORITY _IOR('V', 67, __u32) -#define VIDIOC_S_PRIORITY _IOW('V', 68, __u32) -#define VIDIOC_G_SLICED_VBI_CAP _IOWR('V', 69, struct v4l2_sliced_vbi_cap) -#define VIDIOC_LOG_STATUS _IO('V', 70) -#define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct v4l2_ext_controls) -#define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct v4l2_ext_controls) -#define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct v4l2_ext_controls) -#define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct v4l2_frmsizeenum) -#define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct v4l2_frmivalenum) -#define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct v4l2_enc_idx) -#define VIDIOC_ENCODER_CMD _IOWR('V', 77, struct v4l2_encoder_cmd) -#define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct v4l2_encoder_cmd) - -#define VIDIOC_DBG_S_REGISTER _IOW('V', 79, struct v4l2_dbg_register) -#define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_dbg_register) - -#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) -#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) -#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) -#define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event) -#define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct v4l2_event_subscription) -#define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription) -#define VIDIOC_CREATE_BUFS _IOWR('V', 92, struct v4l2_create_buffers) -#define VIDIOC_PREPARE_BUF _IOWR('V', 93, struct v4l2_buffer) -#define VIDIOC_G_SELECTION _IOWR('V', 94, struct v4l2_selection) -#define VIDIOC_S_SELECTION _IOWR('V', 95, struct v4l2_selection) -#define VIDIOC_DECODER_CMD _IOWR('V', 96, struct v4l2_decoder_cmd) -#define VIDIOC_TRY_DECODER_CMD _IOWR('V', 97, struct v4l2_decoder_cmd) -#define VIDIOC_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings) -#define VIDIOC_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings) -#define VIDIOC_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap) -#define VIDIOC_ENUM_FREQ_BANDS _IOWR('V', 101, struct v4l2_frequency_band) - -#define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info) -#define VIDIOC_QUERY_EXT_CTRL _IOWR('V', 103, struct v4l2_query_ext_ctrl) - -#define BASE_VIDIOC_PRIVATE 192 - -#define V4L2_PIX_FMT_HM12 V4L2_PIX_FMT_NV12_16L16 -#define V4L2_PIX_FMT_SUNXI_TILED_NV12 V4L2_PIX_FMT_NV12_32L32 - -#define V4L2_CAP_ASYNCIO 0x02000000 -#endif - -#endif diff --git a/project/3rdparty/include/live555/BasicUsageEnvironment/BasicHashTable.hh b/project/3rdparty/include/live555/BasicUsageEnvironment/BasicHashTable.hh deleted file mode 100644 index d25f3caa2..000000000 --- a/project/3rdparty/include/live555/BasicUsageEnvironment/BasicHashTable.hh +++ /dev/null @@ -1,104 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Basic Hash Table implementation -// C++ header - -#ifndef _BASIC_HASH_TABLE_HH -#define _BASIC_HASH_TABLE_HH - -#ifndef _HASH_TABLE_HH -#include "../UsageEnvironment/HashTable.hh" -#endif -#ifndef _NET_COMMON_H -#include "../groupsock/NetCommon.h" // to ensure that "uintptr_t" is defined -#endif - -// A simple hash table implementation, inspired by the hash table -// implementation used in Tcl 7.6: - -#define SMALL_HASH_TABLE_SIZE 4 - -class BasicHashTable: public HashTable { -private: - class TableEntry; // forward - -public: - BasicHashTable(int keyType); - virtual ~BasicHashTable(); - - // Used to iterate through the members of the table: - class Iterator; friend class Iterator; // to make Sun's C++ compiler happy - class Iterator: public HashTable::Iterator { - public: - Iterator(BasicHashTable const& table); - - private: // implementation of inherited pure virtual functions - void* next(char const*& key); // returns 0 if none - - private: - BasicHashTable const& fTable; - unsigned fNextIndex; // index of next bucket to be enumerated after this - TableEntry* fNextEntry; // next entry in the current bucket - }; - -private: // implementation of inherited pure virtual functions - virtual void* Add(char const* key, void* value); - // Returns the old value if different, otherwise 0 - virtual Boolean Remove(char const* key); - virtual void* Lookup(char const* key) const; - // Returns 0 if not found - virtual unsigned numEntries() const; - -private: - class TableEntry { - public: - TableEntry* fNext; - char const* key; - void* value; - }; - - TableEntry* lookupKey(char const* key, unsigned& index) const; - // returns entry matching "key", or NULL if none - Boolean keyMatches(char const* key1, char const* key2) const; - // used to implement "lookupKey()" - - TableEntry* insertNewEntry(unsigned index, char const* key); - // creates a new entry, and inserts it in the table - void assignKey(TableEntry* entry, char const* key); - // used to implement "insertNewEntry()" - - void deleteEntry(unsigned index, TableEntry* entry); - void deleteKey(TableEntry* entry); - // used to implement "deleteEntry()" - - void rebuild(); // rebuilds the table as its size increases - - unsigned hashIndexFromKey(char const* key) const; - // used to implement many of the routines above - - unsigned randomIndex(uintptr_t i) const { - return (unsigned)(((i*1103515245) >> fDownShift) & fMask); - } - -private: - TableEntry** fBuckets; // pointer to bucket array - TableEntry* fStaticBuckets[SMALL_HASH_TABLE_SIZE];// used for small tables - unsigned fNumBuckets, fNumEntries, fRebuildSize, fDownShift, fMask; - int fKeyType; -}; - -#endif diff --git a/project/3rdparty/include/live555/BasicUsageEnvironment/BasicUsageEnvironment.hh b/project/3rdparty/include/live555/BasicUsageEnvironment/BasicUsageEnvironment.hh deleted file mode 100644 index b928eb8a9..000000000 --- a/project/3rdparty/include/live555/BasicUsageEnvironment/BasicUsageEnvironment.hh +++ /dev/null @@ -1,86 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Basic Usage Environment: for a simple, non-scripted, console application -// C++ header - -#ifndef _BASIC_USAGE_ENVIRONMENT_HH -#define _BASIC_USAGE_ENVIRONMENT_HH - -#ifndef _BASIC_USAGE_ENVIRONMENT0_HH -#include "BasicUsageEnvironment0.hh" -#endif - -class BasicUsageEnvironment: public BasicUsageEnvironment0 { -public: - static BasicUsageEnvironment* createNew(TaskScheduler& taskScheduler); - - // redefined virtual functions: - virtual int getErrno() const; - - virtual UsageEnvironment& operator<<(char const* str); - virtual UsageEnvironment& operator<<(int i); - virtual UsageEnvironment& operator<<(unsigned u); - virtual UsageEnvironment& operator<<(double d); - virtual UsageEnvironment& operator<<(void* p); - -protected: - BasicUsageEnvironment(TaskScheduler& taskScheduler); - // called only by "createNew()" (or subclass constructors) - virtual ~BasicUsageEnvironment(); -}; - - -class BasicTaskScheduler: public BasicTaskScheduler0 { -public: - static BasicTaskScheduler* createNew(unsigned maxSchedulerGranularity = 10000/*microseconds*/); - // "maxSchedulerGranularity" (default value: 10 ms) specifies the maximum time that we wait (in "select()") before - // returning to the event loop to handle non-socket or non-timer-based events, such as 'triggered events'. - // You can change this is you wish (but only if you know what you're doing!), or set it to 0, to specify no such maximum time. - // (You should set it to 0 only if you know that you will not be using 'event triggers'.) - virtual ~BasicTaskScheduler(); - -protected: - BasicTaskScheduler(unsigned maxSchedulerGranularity); - // called only by "createNew()" - - static void schedulerTickTask(void* clientData); - void schedulerTickTask(); - -protected: - // Redefined virtual functions: - virtual void SingleStep(unsigned maxDelayTime); - - virtual void setBackgroundHandling(int socketNum, int conditionSet, BackgroundHandlerProc* handlerProc, void* clientData); - virtual void moveSocketHandling(int oldSocketNum, int newSocketNum); - -protected: - unsigned fMaxSchedulerGranularity; - - // To implement background operations: - int fMaxNumSockets; - fd_set fReadSet; - fd_set fWriteSet; - fd_set fExceptionSet; - -private: -#if defined(__WIN32__) || defined(_WIN32) - // Hack to work around a bug in Windows' "select()" implementation: - int fDummySocketNum; -#endif -}; - -#endif diff --git a/project/3rdparty/include/live555/BasicUsageEnvironment/BasicUsageEnvironment0.hh b/project/3rdparty/include/live555/BasicUsageEnvironment/BasicUsageEnvironment0.hh deleted file mode 100644 index 7793431bc..000000000 --- a/project/3rdparty/include/live555/BasicUsageEnvironment/BasicUsageEnvironment0.hh +++ /dev/null @@ -1,115 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Basic Usage Environment: for a simple, non-scripted, console application -// C++ header - -#ifndef _BASIC_USAGE_ENVIRONMENT0_HH -#define _BASIC_USAGE_ENVIRONMENT0_HH - -#ifndef _BASICUSAGEENVIRONMENT_VERSION_HH -#include "BasicUsageEnvironment_version.hh" -#endif - -#ifndef _USAGE_ENVIRONMENT_HH -#include "../UsageEnvironment/UsageEnvironment.hh" -#endif - -#ifndef _DELAY_QUEUE_HH -#include "DelayQueue.hh" -#endif - -#define RESULT_MSG_BUFFER_MAX 1000 - -// An abstract base class, useful for subclassing -// (e.g., to redefine the implementation of "operator<<") -class BasicUsageEnvironment0: public UsageEnvironment { -public: - // redefined virtual functions: - virtual MsgString getResultMsg() const; - - virtual void setResultMsg(MsgString msg); - virtual void setResultMsg(MsgString msg1, - MsgString msg2); - virtual void setResultMsg(MsgString msg1, - MsgString msg2, - MsgString msg3); - virtual void setResultErrMsg(MsgString msg, int err = 0); - - virtual void appendToResultMsg(MsgString msg); - - virtual void reportBackgroundError(); - -protected: - BasicUsageEnvironment0(TaskScheduler& taskScheduler); - virtual ~BasicUsageEnvironment0(); - -private: - void reset(); - - char fResultMsgBuffer[RESULT_MSG_BUFFER_MAX]; - unsigned fCurBufferSize; - unsigned fBufferMaxSize; -}; - -class HandlerSet; // forward - -#define MAX_NUM_EVENT_TRIGGERS 32 - -// An abstract base class, useful for subclassing -// (e.g., to redefine the implementation of socket event handling) -class BasicTaskScheduler0: public TaskScheduler { -public: - virtual ~BasicTaskScheduler0(); - - virtual void SingleStep(unsigned maxDelayTime = 0) = 0; - // "maxDelayTime" is in microseconds. It allows a subclass to impose a limit - // on how long "select()" can delay, in case it wants to also do polling. - // 0 (the default value) means: There's no maximum; just look at the delay queue - -public: - // Redefined virtual functions: - virtual TaskToken scheduleDelayedTask(int64_t microseconds, TaskFunc* proc, - void* clientData); - virtual void unscheduleDelayedTask(TaskToken& prevTask); - - virtual void doEventLoop(char volatile* watchVariable); - - virtual EventTriggerId createEventTrigger(TaskFunc* eventHandlerProc); - virtual void deleteEventTrigger(EventTriggerId eventTriggerId); - virtual void triggerEvent(EventTriggerId eventTriggerId, void* clientData = NULL); - -protected: - BasicTaskScheduler0(); - -protected: - // To implement delayed operations: - intptr_t fTokenCounter; - DelayQueue fDelayQueue; - - // To implement background reads: - HandlerSet* fHandlers; - int fLastHandledSocketNum; - - // To implement event triggers: - EventTriggerId volatile fTriggersAwaitingHandling; // implemented as a 32-bit bitmap - EventTriggerId fLastUsedTriggerMask; // implemented as a 32-bit bitmap - TaskFunc* fTriggeredEventHandlers[MAX_NUM_EVENT_TRIGGERS]; - void* fTriggeredEventClientDatas[MAX_NUM_EVENT_TRIGGERS]; - unsigned fLastUsedTriggerNum; // in the range [0,MAX_NUM_EVENT_TRIGGERS) -}; - -#endif diff --git a/project/3rdparty/include/live555/BasicUsageEnvironment/BasicUsageEnvironment_version.hh b/project/3rdparty/include/live555/BasicUsageEnvironment/BasicUsageEnvironment_version.hh deleted file mode 100644 index dffbdcaf9..000000000 --- a/project/3rdparty/include/live555/BasicUsageEnvironment/BasicUsageEnvironment_version.hh +++ /dev/null @@ -1,25 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// Version information for the "BasicUsageEnvironment" library -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. - -#ifndef _BASICUSAGEENVIRONMENT_VERSION_HH -#define _BASICUSAGEENVIRONMENT_VERSION_HH - -#define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_STRING "2023.01.19" -#define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_INT 1674086400 - -#endif diff --git a/project/3rdparty/include/live555/BasicUsageEnvironment/DelayQueue.hh b/project/3rdparty/include/live555/BasicUsageEnvironment/DelayQueue.hh deleted file mode 100644 index e66ab05d2..000000000 --- a/project/3rdparty/include/live555/BasicUsageEnvironment/DelayQueue.hh +++ /dev/null @@ -1,181 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ - // Copyright (c) 1996-2023, Live Networks, Inc. All rights reserved -// Delay queue -// C++ header - -#ifndef _DELAY_QUEUE_HH -#define _DELAY_QUEUE_HH - -#ifndef _NET_COMMON_H -#include "../groupsock/NetCommon.h" -#endif - -#ifdef TIME_BASE -typedef TIME_BASE time_base_seconds; -#else -typedef long time_base_seconds; -#endif - -///// A "Timeval" can be either an absolute time, or a time interval ///// - -class Timeval { -public: - time_base_seconds seconds() const { - return fTv.tv_sec; - } - time_base_seconds seconds() { - return fTv.tv_sec; - } - time_base_seconds useconds() const { - return fTv.tv_usec; - } - time_base_seconds useconds() { - return fTv.tv_usec; - } - - int operator>=(Timeval const& arg2) const; - int operator<=(Timeval const& arg2) const { - return arg2 >= *this; - } - int operator<(Timeval const& arg2) const { - return !(*this >= arg2); - } - int operator>(Timeval const& arg2) const { - return arg2 < *this; - } - int operator==(Timeval const& arg2) const { - return *this >= arg2 && arg2 >= *this; - } - int operator!=(Timeval const& arg2) const { - return !(*this == arg2); - } - - void operator+=(class DelayInterval const& arg2); - void operator-=(class DelayInterval const& arg2); - // returns ZERO iff arg2 >= arg1 - -protected: - Timeval(time_base_seconds seconds, time_base_seconds useconds) { - fTv.tv_sec = seconds; fTv.tv_usec = useconds; - } - -private: - time_base_seconds& secs() { - return (time_base_seconds&)fTv.tv_sec; - } - time_base_seconds& usecs() { - return (time_base_seconds&)fTv.tv_usec; - } - - struct timeval fTv; -}; - -#ifndef max -inline Timeval max(Timeval const& arg1, Timeval const& arg2) { - return arg1 >= arg2 ? arg1 : arg2; -} -#endif -#ifndef min -inline Timeval min(Timeval const& arg1, Timeval const& arg2) { - return arg1 <= arg2 ? arg1 : arg2; -} -#endif - -class DelayInterval operator-(Timeval const& arg1, Timeval const& arg2); -// returns ZERO iff arg2 >= arg1 - - -///// DelayInterval ///// - -class DelayInterval: public Timeval { -public: - DelayInterval(time_base_seconds seconds, time_base_seconds useconds) - : Timeval(seconds, useconds) {} -}; - -DelayInterval operator*(short arg1, DelayInterval const& arg2); - -extern DelayInterval const DELAY_ZERO; -extern DelayInterval const DELAY_SECOND; -extern DelayInterval const DELAY_MINUTE; -extern DelayInterval const DELAY_HOUR; -extern DelayInterval const DELAY_DAY; - -///// _EventTime ///// - -class _EventTime: public Timeval { -public: - _EventTime(unsigned secondsSinceEpoch = 0, - unsigned usecondsSinceEpoch = 0) - // We use the Unix standard epoch: January 1, 1970 - : Timeval(secondsSinceEpoch, usecondsSinceEpoch) {} -}; - -_EventTime TimeNow(); - -extern _EventTime const THE_END_OF_TIME; - - -///// DelayQueueEntry ///// - -class DelayQueueEntry { -public: - virtual ~DelayQueueEntry(); - - intptr_t token() { - return fToken; - } - -protected: // abstract base class - DelayQueueEntry(DelayInterval delay, intptr_t token); - - virtual void handleTimeout(); - -private: - friend class DelayQueue; - DelayQueueEntry* fNext; - DelayQueueEntry* fPrev; - DelayInterval fDeltaTimeRemaining; - - intptr_t fToken; -}; - -///// DelayQueue ///// - -class DelayQueue: public DelayQueueEntry { -public: - DelayQueue(); - virtual ~DelayQueue(); - - void addEntry(DelayQueueEntry* newEntry); // returns a token for the entry - void updateEntry(DelayQueueEntry* entry, DelayInterval newDelay); - void updateEntry(intptr_t tokenToFind, DelayInterval newDelay); - void removeEntry(DelayQueueEntry* entry); // but doesn't delete it - DelayQueueEntry* removeEntry(intptr_t tokenToFind); // but doesn't delete it - - DelayInterval const& timeToNextAlarm(); - void handleAlarm(); - -private: - DelayQueueEntry* head() { return fNext; } - DelayQueueEntry* findEntryByToken(intptr_t token); - void synchronize(); // bring the 'time remaining' fields up-to-date - - _EventTime fLastSyncTime; -}; - -#endif diff --git a/project/3rdparty/include/live555/BasicUsageEnvironment/HandlerSet.hh b/project/3rdparty/include/live555/BasicUsageEnvironment/HandlerSet.hh deleted file mode 100644 index 2538ea9fd..000000000 --- a/project/3rdparty/include/live555/BasicUsageEnvironment/HandlerSet.hh +++ /dev/null @@ -1,77 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Basic Usage Environment: for a simple, non-scripted, console application -// C++ header - -#ifndef _HANDLER_SET_HH -#define _HANDLER_SET_HH - -#ifndef _BOOLEAN_HH -#include "../UsageEnvironment/Boolean.hh" -#endif - -////////// HandlerSet (etc.) definition ////////// - -class HandlerDescriptor { - HandlerDescriptor(HandlerDescriptor* nextHandler); - virtual ~HandlerDescriptor(); - -public: - int socketNum; - int conditionSet; - TaskScheduler::BackgroundHandlerProc* handlerProc; - void* clientData; - -private: - // Descriptors are linked together in a doubly-linked list: - friend class HandlerSet; - friend class HandlerIterator; - HandlerDescriptor* fNextHandler; - HandlerDescriptor* fPrevHandler; -}; - -class HandlerSet { -public: - HandlerSet(); - virtual ~HandlerSet(); - - void assignHandler(int socketNum, int conditionSet, TaskScheduler::BackgroundHandlerProc* handlerProc, void* clientData); - void clearHandler(int socketNum); - void moveHandler(int oldSocketNum, int newSocketNum); - -private: - HandlerDescriptor* lookupHandler(int socketNum); - -private: - friend class HandlerIterator; - HandlerDescriptor fHandlers; -}; - -class HandlerIterator { -public: - HandlerIterator(HandlerSet& handlerSet); - virtual ~HandlerIterator(); - - HandlerDescriptor* next(); // returns NULL if none - void reset(); - -private: - HandlerSet& fOurSet; - HandlerDescriptor* fNextPtr; -}; - -#endif diff --git a/project/3rdparty/include/live555/UsageEnvironment/Boolean.hh b/project/3rdparty/include/live555/UsageEnvironment/Boolean.hh deleted file mode 100644 index 3d8401eb5..000000000 --- a/project/3rdparty/include/live555/UsageEnvironment/Boolean.hh +++ /dev/null @@ -1,37 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -#ifndef _BOOLEAN_HH -#define _BOOLEAN_HH - -#if defined(__BORLANDC__) || (!defined(USE_LIVE555_BOOLEAN) && defined(_MSC_VER) && _MSC_VER >= 1400) -// Use the "bool" type defined by the Borland compiler, and MSVC++ 8.0, Visual Studio 2005 and higher -typedef bool Boolean; -#define False false -#define True true -#else -typedef unsigned char Boolean; -#ifndef __MSHTML_LIBRARY_DEFINED__ -#ifndef False -const Boolean False = 0; -#endif -#ifndef True -const Boolean True = 1; -#endif - -#endif -#endif - -#endif diff --git a/project/3rdparty/include/live555/UsageEnvironment/HashTable.hh b/project/3rdparty/include/live555/UsageEnvironment/HashTable.hh deleted file mode 100644 index 3297dbe91..000000000 --- a/project/3rdparty/include/live555/UsageEnvironment/HashTable.hh +++ /dev/null @@ -1,76 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Generic Hash Table -// C++ header - -#ifndef _HASH_TABLE_HH -#define _HASH_TABLE_HH - -#ifndef _BOOLEAN_HH -#include "Boolean.hh" -#endif - -class HashTable { -public: - virtual ~HashTable(); - - // The following must be implemented by a particular - // implementation (subclass): - static HashTable* create(int keyType); - - virtual void* Add(char const* key, void* value) = 0; - // Returns the old value if different, otherwise 0 - virtual Boolean Remove(char const* key) = 0; - virtual void* Lookup(char const* key) const = 0; - // Returns 0 if not found - virtual unsigned numEntries() const = 0; - Boolean IsEmpty() const { return numEntries() == 0; } - - // Used to iterate through the members of the table: - class Iterator { - public: - // The following must be implemented by a particular - // implementation (subclass): - static Iterator* create(HashTable const& hashTable); - - virtual ~Iterator(); - - virtual void* next(char const*& key) = 0; // returns 0 if none - - protected: - Iterator(); // abstract base class - }; - - // A shortcut that can be used to successively remove each of - // the entries in the table (e.g., so that their values can be - // deleted, if they happen to be pointers to allocated memory). - void* RemoveNext(); - - // Returns the first entry in the table. - // (This is useful for deleting each entry in the table, if the entry's destructor also removes itself from the table.) - void* getFirst(); - -protected: - HashTable(); // abstract base class -}; - -// Warning: The following are deliberately the same as in -// Tcl's hash table implementation -int const STRING_HASH_KEYS = 0; -int const ONE_WORD_HASH_KEYS = 1; - -#endif diff --git a/project/3rdparty/include/live555/UsageEnvironment/UsageEnvironment.hh b/project/3rdparty/include/live555/UsageEnvironment/UsageEnvironment.hh deleted file mode 100644 index 748ac9f65..000000000 --- a/project/3rdparty/include/live555/UsageEnvironment/UsageEnvironment.hh +++ /dev/null @@ -1,172 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Usage Environment -// C++ header - -#ifndef _USAGE_ENVIRONMENT_HH -#define _USAGE_ENVIRONMENT_HH - -#ifndef _USAGEENVIRONMENT_VERSION_HH -#include "UsageEnvironment_version.hh" -#endif - -#ifndef _NETCOMMON_H -#include "../groupsock/NetCommon.h" -#endif - -#ifndef _BOOLEAN_HH -#include "Boolean.hh" -#endif - -#ifndef _STRDUP_HH -// "strDup()" is used often, so include this here, so everyone gets it: -#include "strDup.hh" -#endif - -#ifndef NULL -#define NULL 0 -#endif - -#ifdef __BORLANDC__ -#define _setmode setmode -#define _O_BINARY O_BINARY -#endif - -class TaskScheduler; // forward - -// An abstract base class, subclassed for each use of the library - -class UsageEnvironment { -public: - Boolean reclaim(); - // returns True iff we were actually able to delete our object - - // task scheduler: - TaskScheduler& taskScheduler() const {return fScheduler;} - - // result message handling: - typedef char const* MsgString; - virtual MsgString getResultMsg() const = 0; - - virtual void setResultMsg(MsgString msg) = 0; - virtual void setResultMsg(MsgString msg1, MsgString msg2) = 0; - virtual void setResultMsg(MsgString msg1, MsgString msg2, MsgString msg3) = 0; - virtual void setResultErrMsg(MsgString msg, int err = 0) = 0; - // like setResultMsg(), except that an 'errno' message is appended. (If "err == 0", the "getErrno()" code is used instead.) - - virtual void appendToResultMsg(MsgString msg) = 0; - - virtual void reportBackgroundError() = 0; - // used to report a (previously set) error message within - // a background event - - virtual void internalError(); // used to 'handle' a 'should not occur'-type error condition within the library. - - // 'errno' - virtual int getErrno() const = 0; - - // 'console' output: - virtual UsageEnvironment& operator<<(char const* str) = 0; - virtual UsageEnvironment& operator<<(int i) = 0; - virtual UsageEnvironment& operator<<(unsigned u) = 0; - virtual UsageEnvironment& operator<<(double d) = 0; - virtual UsageEnvironment& operator<<(void* p) = 0; - - // a pointer to additional, optional, client-specific state - void* liveMediaPriv; - void* groupsockPriv; - -protected: - UsageEnvironment(TaskScheduler& scheduler); // abstract base class - virtual ~UsageEnvironment(); // we are deleted only by reclaim() - -private: - TaskScheduler& fScheduler; -}; - - -typedef void TaskFunc(void* clientData); -typedef void* TaskToken; -typedef u_int32_t EventTriggerId; - -class TaskScheduler { -public: - virtual ~TaskScheduler(); - - virtual TaskToken scheduleDelayedTask(int64_t microseconds, TaskFunc* proc, - void* clientData) = 0; - // Schedules a task to occur (after a delay) when we next - // reach a scheduling point. - // (Does not delay if "microseconds" <= 0) - // Returns a token that can be used in a subsequent call to - // unscheduleDelayedTask() or rescheduleDelayedTask() - // (but only if the task has not yet occurred). - - virtual void unscheduleDelayedTask(TaskToken& prevTask) = 0; - // (Has no effect if "prevTask" == NULL) - // Sets "prevTask" to NULL afterwards. - // Note: This MUST NOT be called if the scheduled task has already occurred. - - virtual void rescheduleDelayedTask(TaskToken& task, - int64_t microseconds, TaskFunc* proc, - void* clientData); - // Combines "unscheduleDelayedTask()" with "scheduleDelayedTask()" - // (setting "task" to the new task token). - // Note: This MUST NOT be called if the scheduled task has already occurred. - - // For handling socket operations in the background (from the event loop): - typedef void BackgroundHandlerProc(void* clientData, int mask); - // Possible bits to set in "mask". (These are deliberately defined - // the same as those in Tcl, to make a Tcl-based subclass easy.) - #define SOCKET_READABLE (1<<1) - #define SOCKET_WRITABLE (1<<2) - #define SOCKET_EXCEPTION (1<<3) - virtual void setBackgroundHandling(int socketNum, int conditionSet, BackgroundHandlerProc* handlerProc, void* clientData) = 0; - void disableBackgroundHandling(int socketNum) { setBackgroundHandling(socketNum, 0, NULL, NULL); } - virtual void moveSocketHandling(int oldSocketNum, int newSocketNum) = 0; - // Changes any socket handling for "oldSocketNum" so that occurs with "newSocketNum" instead. - - virtual void doEventLoop(char volatile* watchVariable = NULL) = 0; - // Causes further execution to take place within the event loop. - // Delayed tasks, background I/O handling, and other events are handled, sequentially (as a single thread of control). - // (If "watchVariable" is not NULL, then we return from this routine when *watchVariable != 0) - - virtual EventTriggerId createEventTrigger(TaskFunc* eventHandlerProc) = 0; - // Creates a 'trigger' for an event, which - if it occurs - will be handled (from the event loop) using "eventHandlerProc". - // (Returns 0 iff no such trigger can be created (e.g., because of implementation limits on the number of triggers).) - virtual void deleteEventTrigger(EventTriggerId eventTriggerId) = 0; - - virtual void triggerEvent(EventTriggerId eventTriggerId, void* clientData = NULL) = 0; - // Causes the (previously-registered) handler function for the specified event to be handled (from the event loop). - // The handler function is called with "clientData" as parameter. - // Note: This function (unlike other library functions) may be called from an external thread - // - to signal an external event. (However, "triggerEvent()" should not be called with the - // same 'event trigger id' from different threads.) - - // The following two functions are deprecated, and are provided for backwards-compatibility only: - void turnOnBackgroundReadHandling(int socketNum, BackgroundHandlerProc* handlerProc, void* clientData) { - setBackgroundHandling(socketNum, SOCKET_READABLE, handlerProc, clientData); - } - void turnOffBackgroundReadHandling(int socketNum) { disableBackgroundHandling(socketNum); } - - virtual void internalError(); // used to 'handle' a 'should not occur'-type error condition within the library. - -protected: - TaskScheduler(); // abstract base class -}; - -#endif diff --git a/project/3rdparty/include/live555/UsageEnvironment/UsageEnvironment_version.hh b/project/3rdparty/include/live555/UsageEnvironment/UsageEnvironment_version.hh deleted file mode 100644 index 1b66ac108..000000000 --- a/project/3rdparty/include/live555/UsageEnvironment/UsageEnvironment_version.hh +++ /dev/null @@ -1,25 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// Version information for the "UsageEnvironment" library -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. - -#ifndef _USAGEENVIRONMENT_VERSION_HH -#define _USAGEENVIRONMENT_VERSION_HH - -#define USAGEENVIRONMENT_LIBRARY_VERSION_STRING "2023.01.19" -#define USAGEENVIRONMENT_LIBRARY_VERSION_INT 1674086400 - -#endif diff --git a/project/3rdparty/include/live555/UsageEnvironment/strDup.hh b/project/3rdparty/include/live555/UsageEnvironment/strDup.hh deleted file mode 100644 index 0198a66ed..000000000 --- a/project/3rdparty/include/live555/UsageEnvironment/strDup.hh +++ /dev/null @@ -1,37 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ - -#ifndef _STRDUP_HH -#define _STRDUP_HH - -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A C++ equivalent to the standard C routine "strdup()". -// This generates a char* that can be deleted using "delete[]" -// Header - -#include - -char* strDup(char const* str); -// Note: strDup(NULL) returns NULL - -char* strDupSize(char const* str); -// Like "strDup()", except that it *doesn't* copy the original. -// (Instead, it just allocates a string of the same size as the original.) - -char* strDupSize(char const* str, size_t& resultBufSize); -// An alternative form of "strDupSize()" that also returns the size of the allocated buffer. - -#endif diff --git a/project/3rdparty/include/live555/groupsock/GroupEId.hh b/project/3rdparty/include/live555/groupsock/GroupEId.hh deleted file mode 100644 index f76914e43..000000000 --- a/project/3rdparty/include/live555/groupsock/GroupEId.hh +++ /dev/null @@ -1,64 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "multikit" Multicast Application Shell -// Copyright (c) 1996-2023, Live Networks, Inc. All rights reserved -// "Group Endpoint Id" -// C++ header - -#ifndef _GROUPEID_HH -#define _GROUPEID_HH - -#ifndef _BOOLEAN_HH -#include "../UsageEnvironment/Boolean.hh" -#endif - -#ifndef _NET_ADDRESS_HH -#include "NetAddress.hh" -#endif - -class GroupEId { -public: - GroupEId(struct sockaddr_storage const& groupAddr, - portNumBits portNum, u_int8_t ttl); - // used for a 'source-independent multicast' group - GroupEId(struct sockaddr_storage const& groupAddr, - struct sockaddr_storage const& sourceFilterAddr, - portNumBits portNum); - // used for a 'source-specific multicast' group - GroupEId(); // tmp default constructor, until "Groupsock" interface uses "sockaddr_storage" - - struct sockaddr_storage const& groupAddress() const { return fGroupAddress; } - struct sockaddr_storage const& sourceFilterAddress() const { return fSourceFilterAddress; } - - Boolean isSSM() const; - - portNumBits portNum() const; - - u_int8_t ttl() const { return fTTL; } - -private: - void init(struct sockaddr_storage const& groupAddr, - struct sockaddr_storage const& sourceFilterAddr, - portNumBits portNum, - u_int8_t ttl); - -private: - struct sockaddr_storage fGroupAddress; // also includes port number (in network byte order) - struct sockaddr_storage fSourceFilterAddress; - u_int8_t fTTL; -}; - -#endif diff --git a/project/3rdparty/include/live555/groupsock/Groupsock.hh b/project/3rdparty/include/live555/groupsock/Groupsock.hh deleted file mode 100644 index 33c96fbaa..000000000 --- a/project/3rdparty/include/live555/groupsock/Groupsock.hh +++ /dev/null @@ -1,201 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "groupsock" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// 'Group sockets' -// C++ header - -#ifndef _GROUPSOCK_HH -#define _GROUPSOCK_HH - -#ifndef _GROUPSOCK_VERSION_HH -#include "groupsock_version.hh" -#endif - -#ifndef _NET_INTERFACE_HH -#include "NetInterface.hh" -#endif - -#ifndef _GROUPEID_HH -#include "GroupEId.hh" -#endif - -// An "OutputSocket" is (by default) used only to send packets. -// No packets are received on it (unless a subclass arranges this) - -class OutputSocket: public Socket { -public: - OutputSocket(UsageEnvironment& env, int family); - virtual ~OutputSocket(); - - virtual Boolean write(struct sockaddr_storage const& addressAndPort, u_int8_t ttl, - unsigned char* buffer, unsigned bufferSize); - -protected: - OutputSocket(UsageEnvironment& env, Port port, int family); - - portNumBits sourcePortNum() const {return fSourcePort.num();} - -private: // redefined virtual function - virtual Boolean handleRead(unsigned char* buffer, unsigned bufferMaxSize, - unsigned& bytesRead, - struct sockaddr_storage& fromAddressAndPort); - -private: - Port fSourcePort; - unsigned fLastSentTTL; -}; - -class destRecord { -public: - destRecord(struct sockaddr_storage const& addr, Port const& port, u_int8_t ttl, unsigned sessionId, - destRecord* next); - virtual ~destRecord(); - -public: - destRecord* fNext; - GroupEId fGroupEId; - unsigned fSessionId; -}; - -// A "Groupsock" is used to both send and receive packets. -// As the name suggests, it was originally designed to send/receive -// multicast, but it can send/receive unicast as well. - -class Groupsock: public OutputSocket { -public: - Groupsock(UsageEnvironment& env, struct sockaddr_storage const& groupAddr, - Port port, u_int8_t ttl); - // used for a 'source-independent multicast' group - Groupsock(UsageEnvironment& env, struct sockaddr_storage const& groupAddr, - struct sockaddr_storage const& sourceFilterAddr, - Port port); - // used for a 'source-specific multicast' group - - virtual ~Groupsock(); - - virtual destRecord* createNewDestRecord(struct sockaddr_storage const& addr, Port const& port, u_int8_t ttl, unsigned sessionId, destRecord* next); - // Can be redefined by subclasses that also subclass "destRecord" - - void changeDestinationParameters(struct sockaddr_storage const& newDestAddr, - Port newDestPort, int newDestTTL, - unsigned sessionId = 0); - // By default, the destination address, port and ttl for - // outgoing packets are those that were specified in - // the constructor. This works OK for multicast sockets, - // but for unicast we usually want the destination port - // number, at least, to be different from the source port. - // (If a parameter is 0 (or ~0 for ttl), then no change is made to that parameter.) - // (If no existing "destRecord" exists with this "sessionId", then we add a new "destRecord".) - unsigned lookupSessionIdFromDestination(struct sockaddr_storage const& destAddrAndPort) const; - // returns 0 if not found - - // As a special case, we also allow multiple destinations (addresses & ports) - // (This can be used to implement multi-unicast.) - virtual void addDestination(struct sockaddr_storage const& addr, Port const& port, - unsigned sessionId); - virtual void removeDestination(unsigned sessionId); - void removeAllDestinations(); - Boolean hasMultipleDestinations() const { return fDests != NULL && fDests->fNext != NULL; } - - struct sockaddr_storage const& groupAddress() const { - return fIncomingGroupEId.groupAddress(); - } - struct sockaddr_storage const& sourceFilterAddress() const { - return fIncomingGroupEId.sourceFilterAddress(); - } - - Boolean isSSM() const { - return fIncomingGroupEId.isSSM(); - } - - u_int8_t ttl() const { return fIncomingGroupEId.ttl(); } - - void multicastSendOnly(); // send, but don't receive any multicast packets - - virtual Boolean output(UsageEnvironment& env, unsigned char* buffer, unsigned bufferSize); - - static NetInterfaceTrafficStats statsIncoming; - static NetInterfaceTrafficStats statsOutgoing; - NetInterfaceTrafficStats statsGroupIncoming; // *not* static - NetInterfaceTrafficStats statsGroupOutgoing; // *not* static - - Boolean wasLoopedBackFromUs(UsageEnvironment& env, - struct sockaddr_storage const& fromAddressAndPort); - -public: // redefined virtual functions - virtual Boolean handleRead(unsigned char* buffer, unsigned bufferMaxSize, - unsigned& bytesRead, - struct sockaddr_storage& fromAddressAndPort); - -protected: - destRecord* lookupDestRecordFromDestination(struct sockaddr_storage const& targetAddrAndPort) const; - -private: - void removeDestinationFrom(destRecord*& dests, unsigned sessionId); - // used to implement (the public) "removeDestination()", and "changeDestinationParameters()" -protected: - destRecord* fDests; -private: - GroupEId fIncomingGroupEId; -}; - -UsageEnvironment& operator<<(UsageEnvironment& s, const Groupsock& g); - -// A data structure for looking up a 'groupsock' -// by (multicast address, port), or by socket number -class GroupsockLookupTable { -public: - Groupsock* Fetch(UsageEnvironment& env, struct sockaddr_storage const& groupAddress, - Port port, u_int8_t ttl, Boolean& isNew); - // Creates a new Groupsock if none already exists - Groupsock* Fetch(UsageEnvironment& env, struct sockaddr_storage const& groupAddress, - struct sockaddr_storage const& sourceFilterAddr, - Port port, Boolean& isNew); - // Creates a new Groupsock if none already exists - Groupsock* Lookup(struct sockaddr_storage const& groupAddress, Port port); - // Returns NULL if none already exists - Groupsock* Lookup(struct sockaddr_storage const& groupAddress, - struct sockaddr_storage const& sourceFilterAddr, - Port port); - // Returns NULL if none already exists - Groupsock* Lookup(UsageEnvironment& env, int sock); - // Returns NULL if none already exists - Boolean Remove(Groupsock const* groupsock); - - // Used to iterate through the groupsocks in the table - class Iterator { - public: - Iterator(GroupsockLookupTable& groupsocks); - - Groupsock* next(); // NULL iff none - - private: - AddressPortLookupTable::Iterator fIter; - }; - -private: - Groupsock* AddNew(UsageEnvironment& env, - struct sockaddr_storage const& groupAddress, - struct sockaddr_storage const& sourceFilterAddress, - Port port, u_int8_t ttl); - -private: - friend class Iterator; - AddressPortLookupTable fTable; -}; - -#endif diff --git a/project/3rdparty/include/live555/groupsock/GroupsockHelper.hh b/project/3rdparty/include/live555/groupsock/GroupsockHelper.hh deleted file mode 100644 index 486a1d907..000000000 --- a/project/3rdparty/include/live555/groupsock/GroupsockHelper.hh +++ /dev/null @@ -1,162 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "groupsock" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Helper routines to implement 'group sockets' -// C++ header - -#ifndef _GROUPSOCK_HELPER_HH -#define _GROUPSOCK_HELPER_HH - -#ifndef _NET_ADDRESS_HH -#include "NetAddress.hh" -#endif - -int setupDatagramSocket(UsageEnvironment& env, Port port, int domain); -int setupStreamSocket(UsageEnvironment& env, Port port, int domain, - Boolean makeNonBlocking = True, Boolean setKeepAlive = False); - -int readSocket(UsageEnvironment& env, - int socket, unsigned char* buffer, unsigned bufferSize, - struct sockaddr_storage& fromAddress /*set only if we're a datagram socket*/); - -Boolean writeSocket(UsageEnvironment& env, - int socket, struct sockaddr_storage const& addressAndPort, - u_int8_t ttlArg, - unsigned char* buffer, unsigned bufferSize); - -Boolean writeSocket(UsageEnvironment& env, - int socket, struct sockaddr_storage const& addressAndPort, - unsigned char* buffer, unsigned bufferSize); - // An optimized version of "writeSocket" that omits the "setsockopt()" call to set the TTL. - -void ignoreSigPipeOnSocket(int socketNum); - -unsigned getSendBufferSize(UsageEnvironment& env, int socket); -unsigned getReceiveBufferSize(UsageEnvironment& env, int socket); -unsigned setSendBufferTo(UsageEnvironment& env, - int socket, unsigned requestedSize); -unsigned setReceiveBufferTo(UsageEnvironment& env, - int socket, unsigned requestedSize); -unsigned increaseSendBufferTo(UsageEnvironment& env, - int socket, unsigned requestedSize); -unsigned increaseReceiveBufferTo(UsageEnvironment& env, - int socket, unsigned requestedSize); - -Boolean makeSocketNonBlocking(int sock); -Boolean makeSocketBlocking(int sock, unsigned writeTimeoutInMilliseconds = 0); - // A "writeTimeoutInMilliseconds" value of 0 means: Don't timeout -Boolean setSocketKeepAlive(int sock); - -Boolean socketJoinGroup(UsageEnvironment& env, int socket, - struct sockaddr_storage const& groupAddress); -Boolean socketLeaveGroup(UsageEnvironment&, int socket, - struct sockaddr_storage const& groupAddress); - -// source-specific multicast join/leave -Boolean socketJoinGroupSSM(UsageEnvironment& env, int socket, - struct sockaddr_storage const& groupAddress, - struct sockaddr_storage const& sourceFilterAddr); -Boolean socketLeaveGroupSSM(UsageEnvironment&, int socket, - struct sockaddr_storage const& groupAddress, - struct sockaddr_storage const& sourceFilterAddr); - -Boolean getSourcePort(UsageEnvironment& env, int socket, int domain, Port& port); - -ipv4AddressBits ourIPv4Address(UsageEnvironment& env); // in network order -ipv6AddressBits const& ourIPv6Address(UsageEnvironment& env); - -Boolean weHaveAnIPv4Address(UsageEnvironment& env); -Boolean weHaveAnIPv6Address(UsageEnvironment& env); -Boolean weHaveAnIPAddress(UsageEnvironment& env); - // returns True if we have either an IPv4 or an IPv6 address - -// IPv4 addresses of our sending and receiving interfaces. (By default, these -// are INADDR_ANY (i.e., 0), specifying the default interface.) -extern ipv4AddressBits SendingInterfaceAddr; -extern ipv4AddressBits ReceivingInterfaceAddr; -extern in6_addr ReceivingInterfaceAddr6; - -// Allocates a randomly-chosen IPv4 SSM (multicast) address: -ipv4AddressBits chooseRandomIPv4SSMAddress(UsageEnvironment& env); - -// Returns a simple "hh:mm:ss" string, for use in debugging output (e.g.) -char const* timestampString(); - - -#ifdef HAVE_SOCKADDR_LEN -#define SET_SOCKADDR_SIN_LEN(var) var.sin_len = sizeof var -#define SET_SOCKADDR_SIN6_LEN(var) var.sin6_len = sizeof var -#else -#define SET_SOCKADDR_SIN_LEN(var) -#define SET_SOCKADDR_SIN6_LEN(var) -#endif - -#define MAKE_SOCKADDR_IN(var,adr,prt) /*adr,prt must be in network order*/\ - struct sockaddr_in var;\ - var.sin_family = AF_INET;\ - var.sin_addr.s_addr = (adr);\ - var.sin_port = (prt);\ - SET_SOCKADDR_SIN_LEN(var); -#define MAKE_SOCKADDR_IN6(var,adr,prt) /*adr,prt must be in network order*/\ - struct sockaddr_in6 var;\ - memset(&var, 0, sizeof var);\ - var.sin6_family = AF_INET6;\ - var.sin6_addr=adr;\ - var.sin6_port = (prt);\ - SET_SOCKADDR_SIN6_LEN(var); - - -// By default, we create sockets with the SO_REUSE_* flag set. -// If, instead, you want to create sockets without the SO_REUSE_* flags, -// Then enclose the creation code with: -// { -// NoReuse dummy; -// ... -// } -class NoReuse { -public: - NoReuse(UsageEnvironment& env); - ~NoReuse(); - -private: - UsageEnvironment& fEnv; -}; - - -// Define the "UsageEnvironment"-specific "groupsockPriv" structure: - -struct _groupsockPriv { // There should be only one of these allocated - HashTable* socketTable; - int reuseFlag; -}; -_groupsockPriv* groupsockPriv(UsageEnvironment& env); // allocates it if necessary -void reclaimGroupsockPriv(UsageEnvironment& env); - - -#if (defined(__WIN32__) || defined(_WIN32)) && !defined(__MINGW32__) -// For Windoze, we need to implement our own gettimeofday() -extern int gettimeofday(struct timeval*, int*); -#else -#include -#endif - -// The following are implemented in inet.c: -void our_srandom(unsigned x); -long our_random(); -u_int32_t our_random32(); // because "our_random()" returns a 31-bit number - -#endif diff --git a/project/3rdparty/include/live555/groupsock/IOHandlers.hh b/project/3rdparty/include/live555/groupsock/IOHandlers.hh deleted file mode 100644 index e44c58f9f..000000000 --- a/project/3rdparty/include/live555/groupsock/IOHandlers.hh +++ /dev/null @@ -1,31 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "groupsock" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// IO event handlers -// C++ header - -#ifndef _IO_HANDLERS_HH -#define _IO_HANDLERS_HH - -#ifndef _NET_INTERFACE_HH -#include "NetInterface.hh" -#endif - -// Handles incoming data on sockets: -void socketReadHandler(Socket* sock, int mask); - -#endif diff --git a/project/3rdparty/include/live555/groupsock/NetAddress.hh b/project/3rdparty/include/live555/groupsock/NetAddress.hh deleted file mode 100644 index ebc9a5433..000000000 --- a/project/3rdparty/include/live555/groupsock/NetAddress.hh +++ /dev/null @@ -1,209 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "groupsock" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Network Addresses -// C++ header - -#ifndef _NET_ADDRESS_HH -#define _NET_ADDRESS_HH - -#ifndef _HASH_TABLE_HH -#include "../UsageEnvironment/HashTable.hh" -#endif - -#ifndef _NET_COMMON_H -#include "NetCommon.h" -#endif - -#ifndef _USAGE_ENVIRONMENT_HH -#include "../UsageEnvironment/UsageEnvironment.hh" -#endif - -// Definition of a type representing a low-level network address. - // Note that the type "netAddressBits" is no longer defined; use "ipv4AddressBits" instead. -typedef u_int32_t ipv4AddressBits; -typedef u_int8_t ipv6AddressBits[16]; // 128 bits - -class NetAddress { -public: - NetAddress(u_int8_t const* data, - unsigned length = 4 /* default: 32 bits (for IPv4); use 16 (128 bits) for IPv6 */); - NetAddress(unsigned length = 4); // sets address data to all-zeros - NetAddress(NetAddress const& orig); - NetAddress& operator=(NetAddress const& rightSide); - virtual ~NetAddress(); - - unsigned length() const { return fLength; } - u_int8_t const* data() const // always in network byte order - { return fData; } - -private: - void assign(u_int8_t const* data, unsigned length); - void clean(); - - unsigned fLength; - u_int8_t* fData; -}; - -struct sockaddr_storage const& nullAddress(int addressFamily = AF_INET); -Boolean addressIsNull(sockaddr_storage const& address); - -SOCKLEN_T addressSize(sockaddr_storage const& address); - -void copyAddress(struct sockaddr_storage& to, NetAddress const* from); - -Boolean operator==(struct sockaddr_storage const& left, struct sockaddr_storage const& right); - // compares the family and address parts only; not the port number or anything else - -class NetAddressList { -public: - NetAddressList(char const* hostname, int addressFamily = AF_UNSPEC); - NetAddressList(NetAddressList const& orig); - NetAddressList& operator=(NetAddressList const& rightSide); - virtual ~NetAddressList(); - - unsigned numAddresses() const { return fNumAddresses; } - - NetAddress const* firstAddress() const; - - // Used to iterate through the addresses in a list: - class Iterator { - public: - Iterator(NetAddressList const& addressList); - NetAddress const* nextAddress(); // NULL iff none - private: - NetAddressList const& fAddressList; - unsigned fNextIndex; - }; - -private: - void assign(unsigned numAddresses, NetAddress** addressArray); - void clean(); - - friend class Iterator; - unsigned fNumAddresses; - NetAddress** fAddressArray; -}; - -typedef u_int16_t portNumBits; - -class Port { -public: - Port(portNumBits num /* in host byte order */); - - portNumBits num() const { return fPortNum; } // in network byte order - -private: - portNumBits fPortNum; // stored in network byte order -#ifdef IRIX - portNumBits filler; // hack to overcome a bug in IRIX C++ compiler -#endif -}; - -UsageEnvironment& operator<<(UsageEnvironment& s, const Port& p); - - -// A generic table for looking up objects by (address1, address2, port) -class AddressPortLookupTable { -public: - AddressPortLookupTable(); - virtual ~AddressPortLookupTable(); - - void* Add(struct sockaddr_storage const& address1, - struct sockaddr_storage const& address2, - Port port, - void* value); - // Returns the old value if different, otherwise 0 - void* Add(struct sockaddr_storage const& address1, - Port port, - void* value) { - return Add(address1, nullAddress(), port, value); - } - - Boolean Remove(struct sockaddr_storage const& address1, - struct sockaddr_storage const& address2, - Port port); - Boolean Remove(struct sockaddr_storage const& address1, - Port port) { - return Remove(address1, nullAddress(), port); - } - - void* Lookup(struct sockaddr_storage const& address1, - struct sockaddr_storage const& address2, - Port port); - // Returns 0 if not found - void* Lookup(struct sockaddr_storage const& address1, - Port port) { - return Lookup(address1, nullAddress(), port); - } - - void* RemoveNext() { return fTable->RemoveNext(); } - - // Used to iterate through the entries in the table - class Iterator { - public: - Iterator(AddressPortLookupTable& table); - virtual ~Iterator(); - - void* next(); // NULL iff none - - private: - HashTable::Iterator* fIter; - }; - -private: - friend class Iterator; - HashTable* fTable; -}; - - -Boolean IsMulticastAddress(struct sockaddr_storage const& address); - - -// A mechanism for displaying an IP (v4 or v6) address in ASCII. -// (This encapsulates the "inet_ntop()" function.) -class AddressString { -public: - // IPv4 input: - AddressString(struct sockaddr_in const& addr); - AddressString(struct in_addr const& addr); - AddressString(ipv4AddressBits const& addr); // "addr" is assumed to be in network byte order - - // IPv6 input: - AddressString(struct sockaddr_in6 const& addr); - AddressString(struct in6_addr const& addr); - AddressString(ipv6AddressBits const& addr); - - // IPv4 or IPv6 input: - AddressString(struct sockaddr_storage const& addr); - - virtual ~AddressString(); - - char const* val() const { return fVal; } - -private: - void init(ipv4AddressBits const& addr); // used to implement the IPv4 constructors - void init(ipv6AddressBits const& addr); // used to implement the IPv6 constructors - -private: - char* fVal; // The result ASCII string: allocated by the constructor; deleted by the destructor -}; - -portNumBits portNum(struct sockaddr_storage const& address); -void setPortNum(struct sockaddr_storage& address, portNumBits portNum/*in network order*/); - -#endif diff --git a/project/3rdparty/include/live555/groupsock/NetCommon.h b/project/3rdparty/include/live555/groupsock/NetCommon.h deleted file mode 100644 index 49f7c17f9..000000000 --- a/project/3rdparty/include/live555/groupsock/NetCommon.h +++ /dev/null @@ -1,126 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -/* "groupsock" interface - * Copyright (c) 1996-2022 Live Networks, Inc. All rights reserved. - * Common include files, typically used for networking - */ - -#ifndef _NET_COMMON_H -#define _NET_COMMON_H - -#if defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_WCE) -/* Windows */ -#if defined(WINNT) || defined(_WINNT) || defined(__BORLANDC__) || defined(__MINGW32__) || defined(_WIN32_WCE) || defined (_MSC_VER) -#define _MSWSOCK_ -#include -#include -#endif -#include -#include -#include - -#define closeSocket closesocket -#ifdef EWOULDBLOCK -#undef EWOULDBLOCK -#endif -#ifdef EINPROGRESS -#undef EINPROGRESS -#endif -#ifdef EAGAIN -#undef EAGAIN -#endif -#ifdef EINTR -#undef EINTR -#endif -#define EWOULDBLOCK WSAEWOULDBLOCK -#define EINPROGRESS WSAEWOULDBLOCK -#define EAGAIN WSAEWOULDBLOCK -#define EINTR WSAEINTR - -#if defined(_WIN32_WCE) -#define NO_STRSTREAM 1 -#endif - -/* Definitions of size-specific types: */ -typedef __int64 int64_t; -typedef unsigned __int64 u_int64_t; - -typedef int int32_t; -typedef unsigned u_int32_t; - -typedef short int16_t; -typedef unsigned short u_int16_t; - -typedef unsigned char u_int8_t; - -// For "uintptr_t" and "intptr_t", we assume that if they're not already defined, then this must be -// an old, 32-bit version of Windows: -#if !defined(_MSC_STDINT_H_) && !defined(_UINTPTR_T_DEFINED) && !defined(_UINTPTR_T_DECLARED) && !defined(_UINTPTR_T) -typedef unsigned uintptr_t; -#endif -#if !defined(_MSC_STDINT_H_) && !defined(_INTPTR_T_DEFINED) && !defined(_INTPTR_T_DECLARED) && !defined(_INTPTR_T) -typedef int intptr_t; -#endif - -#elif defined(VXWORKS) -/* VxWorks */ -#include -#include -#include -#include -#include -#include -#include - -typedef unsigned int u_int32_t; -typedef unsigned short u_int16_t; -typedef unsigned char u_int8_t; - -#else -/* Unix */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if defined(_QNX4) -#include -#include -#endif - -#define closeSocket close - -#ifdef SOLARIS -#define u_int64_t uint64_t -#define u_int32_t uint32_t -#define u_int16_t uint16_t -#define u_int8_t uint8_t -#endif -#endif - -#ifndef SOCKLEN_T -#define SOCKLEN_T socklen_t -#endif - -#endif diff --git a/project/3rdparty/include/live555/groupsock/NetInterface.hh b/project/3rdparty/include/live555/groupsock/NetInterface.hh deleted file mode 100644 index 2eeddc1f0..000000000 --- a/project/3rdparty/include/live555/groupsock/NetInterface.hh +++ /dev/null @@ -1,109 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "groupsock" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Network Interfaces -// C++ header - -#ifndef _NET_INTERFACE_HH -#define _NET_INTERFACE_HH - -#ifndef _NET_ADDRESS_HH -#include "NetAddress.hh" -#endif - -class NetInterface { -public: - virtual ~NetInterface(); - - static UsageEnvironment* DefaultUsageEnvironment; - // if non-NULL, used for each new interface - -protected: - NetInterface(); // virtual base class -}; - -class Socket: public NetInterface { -public: - virtual ~Socket(); - void reset(); // closes the socket, and sets "fSocketNum" to -1 - - virtual Boolean handleRead(unsigned char* buffer, unsigned bufferMaxSize, - unsigned& bytesRead, - struct sockaddr_storage& fromAddress) = 0; - // Returns False on error; resultData == NULL if data ignored - - int socketNum() const { return fSocketNum; } - - Port port() const { - return fPort; - } - - UsageEnvironment& env() const { return fEnv; } - - static int DebugLevel; - -protected: - Socket(UsageEnvironment& env, Port port, int family); // virtual base class - - Boolean changePort(Port newPort); // will also cause socketNum() to change - -private: - int fSocketNum; - UsageEnvironment& fEnv; - Port fPort; - int fFamily; -}; - -UsageEnvironment& operator<<(UsageEnvironment& s, const Socket& sock); - -// A data structure for looking up a Socket by port: - -class SocketLookupTable { -public: - virtual ~SocketLookupTable(); - - Socket* Fetch(UsageEnvironment& env, Port port, Boolean& isNew); - // Creates a new Socket if none already exists - Boolean Remove(Socket const* sock); - -protected: - SocketLookupTable(); // abstract base class - virtual Socket* CreateNew(UsageEnvironment& env, Port port) = 0; - -private: - HashTable* fTable; -}; - -// A data structure for counting traffic: - -class NetInterfaceTrafficStats { -public: - NetInterfaceTrafficStats(); - - void countPacket(unsigned packetSize); - - float totNumPackets() const {return fTotNumPackets;} - float totNumBytes() const {return fTotNumBytes;} - - Boolean haveSeenTraffic() const; - -private: - float fTotNumPackets; - float fTotNumBytes; -}; - -#endif diff --git a/project/3rdparty/include/live555/groupsock/groupsock_version.hh b/project/3rdparty/include/live555/groupsock/groupsock_version.hh deleted file mode 100644 index ce4739946..000000000 --- a/project/3rdparty/include/live555/groupsock/groupsock_version.hh +++ /dev/null @@ -1,25 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// Version information for the "groupsock" library -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. - -#ifndef _GROUPSOCK_VERSION_HH -#define _GROUPSOCK_VERSION_HH - -#define GROUPSOCK_LIBRARY_VERSION_STRING "2023.01.19" -#define GROUPSOCK_LIBRARY_VERSION_INT 1674086400 - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/AC3AudioFileServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/AC3AudioFileServerMediaSubsession.hh deleted file mode 100644 index 8af799768..000000000 --- a/project/3rdparty/include/live555/liveMedia/AC3AudioFileServerMediaSubsession.hh +++ /dev/null @@ -1,48 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from an AC3 audio file. -// C++ header - -#ifndef _AC3_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH -#define _AC3_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH -#include "FileServerMediaSubsession.hh" -#endif - -class AC3AudioFileServerMediaSubsession: public FileServerMediaSubsession{ -public: - static AC3AudioFileServerMediaSubsession* - createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); - -private: - AC3AudioFileServerMediaSubsession(UsageEnvironment& env, - char const* fileName, Boolean reuseFirstSource); - // called only by createNew(); - virtual ~AC3AudioFileServerMediaSubsession(); - -private: // redefined virtual functions - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, - unsigned& estBitrate); - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic, - FramedSource* inputSource); -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/AC3AudioRTPSink.hh b/project/3rdparty/include/live555/liveMedia/AC3AudioRTPSink.hh deleted file mode 100644 index 6c477fcfc..000000000 --- a/project/3rdparty/include/live555/liveMedia/AC3AudioRTPSink.hh +++ /dev/null @@ -1,57 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for AC3 audio -// C++ header - -#ifndef _AC3_AUDIO_RTP_SINK_HH -#define _AC3_AUDIO_RTP_SINK_HH - -#ifndef _AUDIO_RTP_SINK_HH -#include "AudioRTPSink.hh" -#endif - -class AC3AudioRTPSink: public AudioRTPSink { -public: - static AC3AudioRTPSink* createNew(UsageEnvironment& env, - Groupsock* RTPgs, - u_int8_t rtpPayloadFormat, - u_int32_t rtpTimestampFrequency); - -protected: - AC3AudioRTPSink(UsageEnvironment& env, Groupsock* RTPgs, - u_int8_t rtpPayloadFormat, - u_int32_t rtpTimestampFrequency); - // called only by createNew() - - virtual ~AC3AudioRTPSink(); - -private: // redefined virtual functions: - virtual Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual unsigned specialHeaderSize() const; - -private: - unsigned char fTotNumFragmentsUsed; // used only if a frame gets fragmented across multiple packets -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/AC3AudioRTPSource.hh b/project/3rdparty/include/live555/liveMedia/AC3AudioRTPSource.hh deleted file mode 100644 index 050c28209..000000000 --- a/project/3rdparty/include/live555/liveMedia/AC3AudioRTPSource.hh +++ /dev/null @@ -1,51 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// AC3 Audio RTP Sources -// C++ header - -#ifndef _AC3_AUDIO_RTP_SOURCE_HH -#define _AC3_AUDIO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class AC3AudioRTPSource: public MultiFramedRTPSource { -public: - static AC3AudioRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - -protected: - virtual ~AC3AudioRTPSource(); - -private: - AC3AudioRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - // called only by createNew() - -private: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/AC3AudioStreamFramer.hh b/project/3rdparty/include/live555/liveMedia/AC3AudioStreamFramer.hh deleted file mode 100644 index f4a32ec97..000000000 --- a/project/3rdparty/include/live555/liveMedia/AC3AudioStreamFramer.hh +++ /dev/null @@ -1,70 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter that breaks up an AC3 audio elementary stream into frames -// C++ header - -#ifndef _AC3_AUDIO_STREAM_FRAMER_HH -#define _AC3_AUDIO_STREAM_FRAMER_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -class AC3AudioStreamFramer: public FramedFilter { -public: - static AC3AudioStreamFramer* - createNew(UsageEnvironment& env, FramedSource* inputSource, - unsigned char streamCode = 0); - // If "streamCode" != 0, then we assume that there's a 1-byte code at the beginning of each chunk of data that we read from - // our source. If that code is not the value we want, we discard the chunk of data. - // However, if "streamCode" == 0 (the default), then we don't expect this 1-byte code. - - unsigned samplingRate(); - - void flushInput(); // called if there is a discontinuity (seeking) in the input - -private: - AC3AudioStreamFramer(UsageEnvironment& env, FramedSource* inputSource, - unsigned char streamCode); - // called only by createNew() - virtual ~AC3AudioStreamFramer(); - - static void handleNewData(void* clientData, - unsigned char* ptr, unsigned size, - struct timeval presentationTime); - void handleNewData(unsigned char* ptr, unsigned size); - - void parseNextFrame(); - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - -private: - struct timeval currentFramePlayTime() const; - -private: - struct timeval fNextFramePresentationTime; - -private: // parsing state - class AC3AudioStreamParser* fParser; - unsigned char fOurStreamCode; - friend class AC3AudioStreamParser; // hack -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/ADTSAudioFileServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/ADTSAudioFileServerMediaSubsession.hh deleted file mode 100644 index dd5d747c7..000000000 --- a/project/3rdparty/include/live555/liveMedia/ADTSAudioFileServerMediaSubsession.hh +++ /dev/null @@ -1,48 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from an AAC audio file in ADTS format -// C++ header - -#ifndef _ADTS_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH -#define _ADTS_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH -#include "FileServerMediaSubsession.hh" -#endif - -class ADTSAudioFileServerMediaSubsession: public FileServerMediaSubsession{ -public: - static ADTSAudioFileServerMediaSubsession* - createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); - -protected: - ADTSAudioFileServerMediaSubsession(UsageEnvironment& env, - char const* fileName, Boolean reuseFirstSource); - // called only by createNew(); - virtual ~ADTSAudioFileServerMediaSubsession(); - -protected: // redefined virtual functions - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, - unsigned& estBitrate); - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic, - FramedSource* inputSource); -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/ADTSAudioFileSource.hh b/project/3rdparty/include/live555/liveMedia/ADTSAudioFileSource.hh deleted file mode 100644 index 8e5fbaf98..000000000 --- a/project/3rdparty/include/live555/liveMedia/ADTSAudioFileSource.hh +++ /dev/null @@ -1,56 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A source object for AAC audio files in ADTS format -// C++ header - -#ifndef _ADTS_AUDIO_FILE_SOURCE_HH -#define _ADTS_AUDIO_FILE_SOURCE_HH - -#ifndef _FRAMED_FILE_SOURCE_HH -#include "FramedFileSource.hh" -#endif - -class ADTSAudioFileSource: public FramedFileSource { -public: - static ADTSAudioFileSource* createNew(UsageEnvironment& env, - char const* fileName); - - unsigned samplingFrequency() const { return fSamplingFrequency; } - unsigned numChannels() const { return fNumChannels; } - char const* configStr() const { return fConfigStr; } - // returns the 'AudioSpecificConfig' for this stream (in ASCII form) - -private: - ADTSAudioFileSource(UsageEnvironment& env, FILE* fid, u_int8_t profile, - u_int8_t samplingFrequencyIndex, u_int8_t channelConfiguration); - // called only by createNew() - - virtual ~ADTSAudioFileSource(); - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - -private: - unsigned fSamplingFrequency; - unsigned fNumChannels; - unsigned fuSecsPerFrame; - char fConfigStr[5]; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/ADTSAudioStreamDiscreteFramer.hh b/project/3rdparty/include/live555/liveMedia/ADTSAudioStreamDiscreteFramer.hh deleted file mode 100644 index 1f8ffa1ab..000000000 --- a/project/3rdparty/include/live555/liveMedia/ADTSAudioStreamDiscreteFramer.hh +++ /dev/null @@ -1,61 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter that reads (discrete) AAC audio frames, and outputs each frame with -// a preceding ADTS header. -// C++ header - -#ifndef _ADTS_AUDIO_STREAM_DISCRETE_FRAMER_HH -#define _ADTS_AUDIO_STREAM_DISCRETE_FRAMER_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -#define ADTS_HEADER_SIZE 7 // we don't include a checksum - -class ADTSAudioStreamDiscreteFramer: public FramedFilter { -public: - static ADTSAudioStreamDiscreteFramer* - createNew(UsageEnvironment& env, FramedSource* inputSource, char const* configStr); - // "configStr" should be a 4-character hexadecimal string for a 2-byte value - -protected: - ADTSAudioStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource, - u_int8_t profile, u_int8_t samplingFrequencyIndex, u_int8_t channelConfiguration); - // called only by createNew() - virtual ~ADTSAudioStreamDiscreteFramer(); - -protected: - // redefined virtual functions: - virtual void doGetNextFrame(); - -protected: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - -private: - u_int8_t fADTSHeader[ADTS_HEADER_SIZE]; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/AMRAudioFileServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/AMRAudioFileServerMediaSubsession.hh deleted file mode 100644 index cb7f1b8b2..000000000 --- a/project/3rdparty/include/live555/liveMedia/AMRAudioFileServerMediaSubsession.hh +++ /dev/null @@ -1,48 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from an AMR audio file. -// C++ header - -#ifndef _AMR_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH -#define _AMR_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH -#include "FileServerMediaSubsession.hh" -#endif - -class AMRAudioFileServerMediaSubsession: public FileServerMediaSubsession{ -public: - static AMRAudioFileServerMediaSubsession* - createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); - -private: - AMRAudioFileServerMediaSubsession(UsageEnvironment& env, - char const* fileName, Boolean reuseFirstSource); - // called only by createNew(); - virtual ~AMRAudioFileServerMediaSubsession(); - -private: // redefined virtual functions - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, - unsigned& estBitrate); - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic, - FramedSource* inputSource); -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/AMRAudioFileSink.hh b/project/3rdparty/include/live555/liveMedia/AMRAudioFileSink.hh deleted file mode 100644 index 6c714000c..000000000 --- a/project/3rdparty/include/live555/liveMedia/AMRAudioFileSink.hh +++ /dev/null @@ -1,51 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// AMR Audio File Sinks -// C++ header - -#ifndef _AMR_AUDIO_FILE_SINK_HH -#define _AMR_AUDIO_FILE_SINK_HH - -#ifndef _FILE_SINK_HH -#include "FileSink.hh" -#endif - -class AMRAudioFileSink: public FileSink { -public: - static AMRAudioFileSink* createNew(UsageEnvironment& env, char const* fileName, - unsigned bufferSize = 10000, - Boolean oneFilePerFrame = False); - // (See "FileSink.hh" for a description of these parameters.) - -protected: - AMRAudioFileSink(UsageEnvironment& env, FILE* fid, unsigned bufferSize, - char const* perFrameFileNamePrefix); - // called only by createNew() - virtual ~AMRAudioFileSink(); - -protected: // redefined virtual functions: - virtual Boolean sourceIsCompatibleWithUs(MediaSource& source); - virtual void afterGettingFrame(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime); - -protected: - Boolean fHaveWrittenHeader; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/AMRAudioFileSource.hh b/project/3rdparty/include/live555/liveMedia/AMRAudioFileSource.hh deleted file mode 100644 index d7d323316..000000000 --- a/project/3rdparty/include/live555/liveMedia/AMRAudioFileSource.hh +++ /dev/null @@ -1,48 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A source object for AMR audio files (as defined in RFC 4867, section 5) -// C++ header - -#ifndef _AMR_AUDIO_FILE_SOURCE_HH -#define _AMR_AUDIO_FILE_SOURCE_HH - -#ifndef _AMR_AUDIO_SOURCE_HH -#include "AMRAudioSource.hh" -#endif - -class AMRAudioFileSource: public AMRAudioSource { -public: - static AMRAudioFileSource* createNew(UsageEnvironment& env, - char const* fileName); - -private: - AMRAudioFileSource(UsageEnvironment& env, FILE* fid, - Boolean isWideband, unsigned numChannels); - // called only by createNew() - - virtual ~AMRAudioFileSource(); - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - -private: - FILE* fFid; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/AMRAudioRTPSink.hh b/project/3rdparty/include/live555/liveMedia/AMRAudioRTPSink.hh deleted file mode 100644 index 5fdc564a2..000000000 --- a/project/3rdparty/include/live555/liveMedia/AMRAudioRTPSink.hh +++ /dev/null @@ -1,65 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for AMR audio (RFC 4867) -// C++ header - -#ifndef _AMR_AUDIO_RTP_SINK_HH -#define _AMR_AUDIO_RTP_SINK_HH - -#ifndef _AUDIO_RTP_SINK_HH -#include "AudioRTPSink.hh" -#endif - -class AMRAudioRTPSink: public AudioRTPSink { -public: - static AMRAudioRTPSink* createNew(UsageEnvironment& env, - Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - Boolean sourceIsWideband = False, - unsigned numChannelsInSource = 1); - - Boolean sourceIsWideband() const { return fSourceIsWideband; } - -protected: - AMRAudioRTPSink(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - Boolean sourceIsWideband, unsigned numChannelsInSource); - // called only by createNew() - - virtual ~AMRAudioRTPSink(); - -private: // redefined virtual functions: - virtual Boolean sourceIsCompatibleWithUs(MediaSource& source); - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual Boolean - frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - - virtual unsigned specialHeaderSize() const; - virtual char const* auxSDPLine(); - -private: - Boolean fSourceIsWideband; - char* fFmtpSDPLine; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/AMRAudioRTPSource.hh b/project/3rdparty/include/live555/liveMedia/AMRAudioRTPSource.hh deleted file mode 100644 index 1d2387f20..000000000 --- a/project/3rdparty/include/live555/liveMedia/AMRAudioRTPSource.hh +++ /dev/null @@ -1,53 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// AMR Audio RTP Sources (RFC 4867) -// C++ header - -#ifndef _AMR_AUDIO_RTP_SOURCE_HH -#define _AMR_AUDIO_RTP_SOURCE_HH - -#ifndef _RTP_SOURCE_HH -#include "RTPSource.hh" -#endif -#ifndef _AMR_AUDIO_SOURCE_HH -#include "AMRAudioSource.hh" -#endif - -class AMRAudioRTPSource { -public: - static AMRAudioSource* createNew(UsageEnvironment& env, - Groupsock* RTPgs, - RTPSource*& resultRTPSource, - unsigned char rtpPayloadFormat, - Boolean isWideband = False, - unsigned numChannels = 1, - Boolean isOctetAligned = True, - unsigned interleaving = 0, - // relevant only if "isOctetAligned" - // The maximum # of frame-blocks in a group - // 0 means: no interleaving - Boolean robustSortingOrder = False, - // relevant only if "isOctetAligned" - Boolean CRCsArePresent = False - // relevant only if "isOctetAligned" - ); - // This returns a source to read from, but "resultRTPSource" will - // point to RTP-related state. -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/AMRAudioSource.hh b/project/3rdparty/include/live555/liveMedia/AMRAudioSource.hh deleted file mode 100644 index c92b51e7a..000000000 --- a/project/3rdparty/include/live555/liveMedia/AMRAudioSource.hh +++ /dev/null @@ -1,52 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A source object for AMR audio sources -// C++ header - -#ifndef _AMR_AUDIO_SOURCE_HH -#define _AMR_AUDIO_SOURCE_HH - -#ifndef _FRAMED_SOURCE_HH -#include "FramedSource.hh" -#endif - -class AMRAudioSource: public FramedSource { -public: - Boolean isWideband() const { return fIsWideband; } - unsigned numChannels() const { return fNumChannels; } - - u_int8_t lastFrameHeader() const { return fLastFrameHeader; } - // The frame header for the most recently read frame (RFC 4867, sec. 5.3) - -protected: - AMRAudioSource(UsageEnvironment& env, Boolean isWideband, unsigned numChannels); - // virtual base class - virtual ~AMRAudioSource(); - -private: - // redefined virtual functions: - virtual char const* MIMEtype() const; - virtual Boolean isAMRAudioSource() const; - -protected: - Boolean fIsWideband; - unsigned fNumChannels; - u_int8_t fLastFrameHeader; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/AVIFileSink.hh b/project/3rdparty/include/live555/liveMedia/AVIFileSink.hh deleted file mode 100644 index c573a6603..000000000 --- a/project/3rdparty/include/live555/liveMedia/AVIFileSink.hh +++ /dev/null @@ -1,115 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A sink that generates an AVI file from a composite media session -// C++ header - -#ifndef _AVI_FILE_SINK_HH -#define _AVI_FILE_SINK_HH - -#ifndef _MEDIA_SESSION_HH -#include "MediaSession.hh" -#endif - -class AVIFileSink: public Medium { -public: - static AVIFileSink* createNew(UsageEnvironment& env, - MediaSession& inputSession, - char const* outputFileName, - unsigned bufferSize = 20000, - unsigned short movieWidth = 240, - unsigned short movieHeight = 180, - unsigned movieFPS = 15, - Boolean packetLossCompensate = False); - - typedef void (afterPlayingFunc)(void* clientData); - Boolean startPlaying(afterPlayingFunc* afterFunc, - void* afterClientData); - - unsigned numActiveSubsessions() const { return fNumSubsessions; } - -private: - AVIFileSink(UsageEnvironment& env, MediaSession& inputSession, - char const* outputFileName, unsigned bufferSize, - unsigned short movieWidth, unsigned short movieHeight, - unsigned movieFPS, Boolean packetLossCompensate); - // called only by createNew() - virtual ~AVIFileSink(); - - Boolean continuePlaying(); - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - static void onSourceClosure(void* clientData); - void onSourceClosure1(); - static void onRTCPBye(void* clientData); - void addIndexRecord(class AVIIndexRecord* newIndexRecord); - void completeOutputFile(); - -private: - friend class AVISubsessionIOState; - MediaSession& fInputSession; - FILE* fOutFid; - class AVIIndexRecord *fIndexRecordsHead, *fIndexRecordsTail; - unsigned fNumIndexRecords; - unsigned fBufferSize; - Boolean fPacketLossCompensate; - Boolean fAreCurrentlyBeingPlayed; - afterPlayingFunc* fAfterFunc; - void* fAfterClientData; - unsigned fNumSubsessions; - unsigned fNumBytesWritten; - struct timeval fStartTime; - Boolean fHaveCompletedOutputFile; - -private: - ///// Definitions specific to the AVI file format: - - unsigned addWord(unsigned word); // outputs "word" in little-endian order - unsigned addHalfWord(unsigned short halfWord); - unsigned addByte(unsigned char byte) { - putc(byte, fOutFid); - return 1; - } - unsigned addZeroWords(unsigned numWords); - unsigned add4ByteString(char const* str); - void setWord(unsigned filePosn, unsigned size); - - // Define member functions for outputting various types of file header: -#define _header(name) unsigned addFileHeader_##name() - _header(AVI); - _header(hdrl); - _header(avih); - _header(strl); - _header(strh); - _header(strf); - _header(JUNK); -// _header(JUNK); - _header(movi); -private: - unsigned short fMovieWidth, fMovieHeight; - unsigned fMovieFPS; - unsigned fRIFFSizePosition, fRIFFSizeValue; - unsigned fAVIHMaxBytesPerSecondPosition; - unsigned fAVIHFrameCountPosition; - unsigned fMoviSizePosition, fMoviSizeValue; - class AVISubsessionIOState* fCurrentIOState; - unsigned fJunkNumber; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/AudioInputDevice.hh b/project/3rdparty/include/live555/liveMedia/AudioInputDevice.hh deleted file mode 100644 index 8c0449b5f..000000000 --- a/project/3rdparty/include/live555/liveMedia/AudioInputDevice.hh +++ /dev/null @@ -1,71 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Generic audio input device (such as a microphone, or an input sound card) -// C++ header - -#ifndef _AUDIO_INPUT_DEVICE_HH -#define _AUDIO_INPUT_DEVICE_HH - -#ifndef _FRAMED_SOURCE_HH -#include "FramedSource.hh" -#endif - -class AudioPortNames { -public: - AudioPortNames(); - virtual ~AudioPortNames(); - - unsigned numPorts; - char** portName; -}; - -class AudioInputDevice: public FramedSource { -public: - unsigned char bitsPerSample() const { return fBitsPerSample; } - unsigned char numChannels() const { return fNumChannels; } - unsigned samplingFrequency() const { return fSamplingFrequency; } - - virtual Boolean setInputPort(int portIndex) = 0; - virtual double getAverageLevel() const = 0; - - static AudioInputDevice* - createNew(UsageEnvironment& env, int inputPortNumber, - unsigned char bitsPerSample, unsigned char numChannels, - unsigned samplingFrequency, unsigned granularityInMS = 20); - static AudioPortNames* getPortNames(); - - static char** allowedDeviceNames; - // If this is set to non-NULL, then it's a NULL-terminated array of strings - // of device names that we are allowed to access. - -protected: - AudioInputDevice(UsageEnvironment& env, - unsigned char bitsPerSample, - unsigned char numChannels, - unsigned samplingFrequency, - unsigned granularityInMS); - // we're an abstract base class - - virtual ~AudioInputDevice(); - -protected: - unsigned char fBitsPerSample, fNumChannels; - unsigned fSamplingFrequency; - unsigned fGranularityInMS; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/AudioRTPSink.hh b/project/3rdparty/include/live555/liveMedia/AudioRTPSink.hh deleted file mode 100644 index 47042d85f..000000000 --- a/project/3rdparty/include/live555/liveMedia/AudioRTPSink.hh +++ /dev/null @@ -1,42 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A generic RTP sink for audio codecs (abstract base class) -// C++ header - -#ifndef _AUDIO_RTP_SINK_HH -#define _AUDIO_RTP_SINK_HH - -#ifndef _MULTI_FRAMED_RTP_SINK_HH -#include "MultiFramedRTPSink.hh" -#endif - -class AudioRTPSink: public MultiFramedRTPSink { -protected: - AudioRTPSink(UsageEnvironment& env, - Groupsock* rtpgs, unsigned char rtpPayloadType, - unsigned rtpTimestampFrequency, - char const* rtpPayloadFormatName, - unsigned numChannels = 1); - // (we're an abstract base class) - virtual ~AudioRTPSink(); - -private: // redefined virtual functions: - virtual char const* sdpMediaType() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/Base64.hh b/project/3rdparty/include/live555/liveMedia/Base64.hh deleted file mode 100644 index b61b23b07..000000000 --- a/project/3rdparty/include/live555/liveMedia/Base64.hh +++ /dev/null @@ -1,43 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Base64 encoding and decoding -// C++ header - -#ifndef _BASE64_HH -#define _BASE64_HH - -#ifndef _BOOLEAN_HH -#include "../UsageEnvironment/Boolean.hh" -#endif - -unsigned char* base64Decode(char const* in, unsigned& resultSize, - Boolean trimTrailingZeros = True); - // returns a newly allocated array - of size "resultSize" - that - // the caller is responsible for delete[]ing. - -unsigned char* base64Decode(char const* in, unsigned inSize, - unsigned& resultSize, - Boolean trimTrailingZeros = True); - // As above, but includes the size of the input string (i.e., the number of bytes to decode) as a parameter. - // This saves an extra call to "strlen()" if we already know the length of the input string. - -char* base64Encode(char const* orig, unsigned origLength); - // returns a 0-terminated string that - // the caller is responsible for delete[]ing. - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/BasicUDPSink.hh b/project/3rdparty/include/live555/liveMedia/BasicUDPSink.hh deleted file mode 100644 index 45f275497..000000000 --- a/project/3rdparty/include/live555/liveMedia/BasicUDPSink.hh +++ /dev/null @@ -1,62 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A simple UDP sink (i.e., without RTP or other headers added); one frame per packet -// C++ header - -#ifndef _BASIC_UDP_SINK_HH -#define _BASIC_UDP_SINK_HH - -#ifndef _MEDIA_SINK_HH -#include "MediaSink.hh" -#endif -#ifndef _GROUPSOCK_HH -#include "../groupsock/Groupsock.hh" -#endif - -class BasicUDPSink: public MediaSink { -public: - static BasicUDPSink* createNew(UsageEnvironment& env, Groupsock* gs, - unsigned maxPayloadSize = 1450); -protected: - BasicUDPSink(UsageEnvironment& env, Groupsock* gs, unsigned maxPayloadSize); - // called only by createNew() - virtual ~BasicUDPSink(); - -private: // redefined virtual functions: - virtual Boolean continuePlaying(); - -private: - void continuePlaying1(); - - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, unsigned numTruncatedBytes, - unsigned durationInMicroseconds); - - static void sendNext(void* firstArg); - -private: - Groupsock* fGS; - unsigned fMaxPayloadSize; - unsigned char* fOutputBuffer; - struct timeval fNextSendTime; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/BasicUDPSource.hh b/project/3rdparty/include/live555/liveMedia/BasicUDPSource.hh deleted file mode 100644 index aa02773ef..000000000 --- a/project/3rdparty/include/live555/liveMedia/BasicUDPSource.hh +++ /dev/null @@ -1,56 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A simple UDP source, where every UDP payload is a complete frame -// C++ header - -#ifndef _BASIC_UDP_SOURCE_HH -#define _BASIC_UDP_SOURCE_HH - -#ifndef _FRAMED_SOURCE_HH -#include "FramedSource.hh" -#endif -#ifndef _GROUPSOCK_HH -#include "../groupsock/Groupsock.hh" -#endif - -class BasicUDPSource: public FramedSource { -public: - static BasicUDPSource* createNew(UsageEnvironment& env, Groupsock* inputGS); - - virtual ~BasicUDPSource(); - - Groupsock* gs() const { return fInputGS; } - -private: - BasicUDPSource(UsageEnvironment& env, Groupsock* inputGS); - // called only by createNew() - - static void incomingPacketHandler(BasicUDPSource* source, int mask); - void incomingPacketHandler1(); - -private: // redefined virtual functions: - virtual unsigned maxFrameSize() const; - virtual void doGetNextFrame(); - virtual void doStopGettingFrames(); - -private: - Groupsock* fInputGS; - Boolean fHaveStartedReading; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/BitVector.hh b/project/3rdparty/include/live555/liveMedia/BitVector.hh deleted file mode 100644 index 89de5fb3e..000000000 --- a/project/3rdparty/include/live555/liveMedia/BitVector.hh +++ /dev/null @@ -1,67 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Bit Vector data structure -// C++ header - -#ifndef _BIT_VECTOR_HH -#define _BIT_VECTOR_HH - -#ifndef _BOOLEAN_HH -#include "../UsageEnvironment/Boolean.hh" -#endif - -class BitVector { -public: - BitVector(unsigned char* baseBytePtr, - unsigned baseBitOffset, - unsigned totNumBits); - - void setup(unsigned char* baseBytePtr, - unsigned baseBitOffset, - unsigned totNumBits); - - void putBits(unsigned from, unsigned numBits); // "numBits" <= 32 - void put1Bit(unsigned bit); - - unsigned getBits(unsigned numBits); // "numBits" <= 32 - unsigned get1Bit(); - Boolean get1BitBoolean() { return get1Bit() != 0; } - - void skipBits(unsigned numBits); - - unsigned curBitIndex() const { return fCurBitIndex; } - unsigned totNumBits() const { return fTotNumBits; } - unsigned numBitsRemaining() const { return fTotNumBits - fCurBitIndex; } - - unsigned get_expGolomb(); - // Returns the value of the next bits, assuming that they were encoded using an exponential-Golomb code of order 0 - int get_expGolombSigned(); // signed version of the above - -private: - unsigned char* fBaseBytePtr; - unsigned fBaseBitOffset; - unsigned fTotNumBits; - unsigned fCurBitIndex; -}; - -// A general bit copy operation: -void shiftBits(unsigned char* toBasePtr, unsigned toBitOffset, - unsigned char const* fromBasePtr, unsigned fromBitOffset, - unsigned numBits); - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/ByteStreamFileSource.hh b/project/3rdparty/include/live555/liveMedia/ByteStreamFileSource.hh deleted file mode 100644 index b445d5511..000000000 --- a/project/3rdparty/include/live555/liveMedia/ByteStreamFileSource.hh +++ /dev/null @@ -1,82 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A file source that is a plain byte stream (rather than frames) -// C++ header - -#ifndef _BYTE_STREAM_FILE_SOURCE_HH -#define _BYTE_STREAM_FILE_SOURCE_HH - -#ifndef _FRAMED_FILE_SOURCE_HH -#include "FramedFileSource.hh" -#endif - -class ByteStreamFileSource: public FramedFileSource { -public: - static ByteStreamFileSource* createNew(UsageEnvironment& env, - char const* fileName, - unsigned preferredFrameSize = 0, - unsigned playTimePerFrame = 0); - // "preferredFrameSize" == 0 means 'no preference' - // "playTimePerFrame" is in microseconds - - static ByteStreamFileSource* createNew(UsageEnvironment& env, - FILE* fid, - unsigned preferredFrameSize = 0, - unsigned playTimePerFrame = 0); - // an alternative version of "createNew()" that's used if you already have - // an open file. - - u_int64_t fileSize() const { return fFileSize; } - // 0 means zero-length, unbounded, or unknown - - void seekToByteAbsolute(u_int64_t byteNumber, u_int64_t numBytesToStream = 0); - // if "numBytesToStream" is >0, then we limit the stream to that number of bytes, before treating it as EOF - void seekToByteRelative(int64_t offset, u_int64_t numBytesToStream = 0); - void seekToEnd(); // to force EOF handling on the next read - -protected: - ByteStreamFileSource(UsageEnvironment& env, - FILE* fid, - unsigned preferredFrameSize, - unsigned playTimePerFrame); - // called only by createNew() - - virtual ~ByteStreamFileSource(); - - static void fileReadableHandler(ByteStreamFileSource* source, int mask); - void doReadFromFile(); - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - virtual void doStopGettingFrames(); - -protected: - u_int64_t fFileSize; - -private: - unsigned fPreferredFrameSize; - unsigned fPlayTimePerFrame; - Boolean fFidIsSeekable; - unsigned fLastPlayTime; - Boolean fHaveStartedReading; - Boolean fLimitNumBytesToStream; - u_int64_t fNumBytesToStream; // used iff "fLimitNumBytesToStream" is True -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/ByteStreamMemoryBufferSource.hh b/project/3rdparty/include/live555/liveMedia/ByteStreamMemoryBufferSource.hh deleted file mode 100644 index f83eb44d9..000000000 --- a/project/3rdparty/include/live555/liveMedia/ByteStreamMemoryBufferSource.hh +++ /dev/null @@ -1,70 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A class for streaming data from a (static) memory buffer, as if it were a file. -// C++ header - -#ifndef _BYTE_STREAM_MEMORY_BUFFER_SOURCE_HH -#define _BYTE_STREAM_MEMORY_BUFFER_SOURCE_HH - -#ifndef _FRAMED_SOURCE_HH -#include "FramedSource.hh" -#endif - -class ByteStreamMemoryBufferSource: public FramedSource { -public: - static ByteStreamMemoryBufferSource* createNew(UsageEnvironment& env, - u_int8_t* buffer, u_int64_t bufferSize, - Boolean deleteBufferOnClose = True, - unsigned preferredFrameSize = 0, - unsigned playTimePerFrame = 0); - // "preferredFrameSize" == 0 means 'no preference' - // "playTimePerFrame" is in microseconds - - u_int64_t bufferSize() const { return fBufferSize; } - - void seekToByteAbsolute(u_int64_t byteNumber, u_int64_t numBytesToStream = 0); - // if "numBytesToStream" is >0, then we limit the stream to that number of bytes, before treating it as EOF - void seekToByteRelative(int64_t offset, u_int64_t numBytesToStream = 0); - -protected: - ByteStreamMemoryBufferSource(UsageEnvironment& env, - u_int8_t* buffer, u_int64_t bufferSize, - Boolean deleteBufferOnClose, - unsigned preferredFrameSize, - unsigned playTimePerFrame); - // called only by createNew() - - virtual ~ByteStreamMemoryBufferSource(); - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - -private: - u_int8_t* fBuffer; - u_int64_t fBufferSize; - u_int64_t fCurIndex; - Boolean fDeleteBufferOnClose; - unsigned fPreferredFrameSize; - unsigned fPlayTimePerFrame; - unsigned fLastPlayTime; - Boolean fLimitNumBytesToStream; - u_int64_t fNumBytesToStream; // used iff "fLimitNumBytesToStream" is True -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/ByteStreamMultiFileSource.hh b/project/3rdparty/include/live555/liveMedia/ByteStreamMultiFileSource.hh deleted file mode 100644 index b29f8d91b..000000000 --- a/project/3rdparty/include/live555/liveMedia/ByteStreamMultiFileSource.hh +++ /dev/null @@ -1,69 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A source that consists of multiple byte-stream files, read sequentially. -// (The input is an array of file names, with a terminating 'file name' of NULL.) -// C++ header - -#ifndef _BYTE_STREAM_MULTI_FILE_SOURCE_HH -#define _BYTE_STREAM_MULTI_FILE_SOURCE_HH - -#ifndef _BYTE_STREAM_FILE_SOURCE_HH -#include "ByteStreamFileSource.hh" -#endif - -class ByteStreamMultiFileSource: public FramedSource { -public: - static ByteStreamMultiFileSource* - createNew(UsageEnvironment& env, char const** fileNameArray, - unsigned preferredFrameSize = 0, unsigned playTimePerFrame = 0); - // "fileNameArray" is a pointer to an array of (char const*) file names, with - // A 'file name' of NULL indicating the end of the array - - Boolean haveStartedNewFile() const { return fHaveStartedNewFile; } - // True iff the most recently delivered frame was the first from a newly-opened file - -protected: - ByteStreamMultiFileSource(UsageEnvironment& env, char const** fileNameArray, - unsigned preferredFrameSize, unsigned playTimePerFrame); - // called only by createNew() - - virtual ~ByteStreamMultiFileSource(); - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - -private: - static void onSourceClosure(void* clientData); - void onSourceClosure1(); - static void afterGettingFrame(void* clientData, - unsigned frameSize, unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - -private: - unsigned fPreferredFrameSize; - unsigned fPlayTimePerFrame; - unsigned fNumSources; - unsigned fCurrentlyReadSourceNumber; - Boolean fHaveStartedNewFile; - char const** fFileNameArray; - ByteStreamFileSource** fSourceArray; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/DVVideoFileServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/DVVideoFileServerMediaSubsession.hh deleted file mode 100644 index c09c0b06c..000000000 --- a/project/3rdparty/include/live555/liveMedia/DVVideoFileServerMediaSubsession.hh +++ /dev/null @@ -1,51 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from a DV video file. -// C++ header - -#ifndef _DV_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH -#define _DV_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH -#include "FileServerMediaSubsession.hh" -#endif - -class DVVideoFileServerMediaSubsession: public FileServerMediaSubsession{ -public: - static DVVideoFileServerMediaSubsession* - createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); - -private: - DVVideoFileServerMediaSubsession(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); - // called only by createNew(); - virtual ~DVVideoFileServerMediaSubsession(); - -private: // redefined virtual functions - virtual char const* getAuxSDPLine(RTPSink* rtpSink, FramedSource* inputSource); - virtual void seekStreamSource(FramedSource* inputSource, double& seekNPT, double streamDuration, u_int64_t& numBytes); - virtual void setStreamSourceDuration(FramedSource* inputSource, double streamDuration, u_int64_t& numBytes); - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, unsigned& estBitrate); - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource* inputSource); - virtual float duration() const; - -private: - float fFileDuration; // in seconds -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/DVVideoRTPSink.hh b/project/3rdparty/include/live555/liveMedia/DVVideoRTPSink.hh deleted file mode 100644 index 14424b09c..000000000 --- a/project/3rdparty/include/live555/liveMedia/DVVideoRTPSink.hh +++ /dev/null @@ -1,57 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for DV video (RFC 3189) -// (Thanks to Ben Hutchings for prototyping this.) -// C++ header - -#ifndef _DV_VIDEO_RTP_SINK_HH -#define _DV_VIDEO_RTP_SINK_HH - -#ifndef _VIDEO_RTP_SINK_HH -#include "VideoRTPSink.hh" -#endif -#ifndef _DV_VIDEO_STREAM_FRAMER_HH -#include "DVVideoStreamFramer.hh" -#endif - -class DVVideoRTPSink: public VideoRTPSink { -public: - static DVVideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); - char const* auxSDPLineFromFramer(DVVideoStreamFramer* framerSource); - -protected: - DVVideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); - // called only by createNew() - - virtual ~DVVideoRTPSink(); - -private: // redefined virtual functions: - virtual Boolean sourceIsCompatibleWithUs(MediaSource& source); - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual unsigned computeOverflowForNewFrame(unsigned newFrameSize) const; - virtual char const* auxSDPLine(); - -private: - char* fFmtpSDPLine; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/DVVideoRTPSource.hh b/project/3rdparty/include/live555/liveMedia/DVVideoRTPSource.hh deleted file mode 100644 index 9ed381e86..000000000 --- a/project/3rdparty/include/live555/liveMedia/DVVideoRTPSource.hh +++ /dev/null @@ -1,51 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// DV Video RTP Sources -// C++ header - -#ifndef _DV_VIDEO_RTP_SOURCE_HH -#define _DV_VIDEO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class DVVideoRTPSource: public MultiFramedRTPSource { -public: - static DVVideoRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - -protected: - virtual ~DVVideoRTPSource(); - -private: - DVVideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - // called only by createNew() - -private: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/DVVideoStreamFramer.hh b/project/3rdparty/include/live555/liveMedia/DVVideoStreamFramer.hh deleted file mode 100644 index 4d88e0d5a..000000000 --- a/project/3rdparty/include/live555/liveMedia/DVVideoStreamFramer.hh +++ /dev/null @@ -1,72 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter that parses a DV input stream into DV frames to deliver to the downstream object -// C++ header - -#ifndef _DV_VIDEO_STREAM_FRAMER_HH -#define _DV_VIDEO_STREAM_FRAMER_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -#define DV_DIF_BLOCK_SIZE 80 -#define DV_NUM_BLOCKS_PER_SEQUENCE 150 -#define DV_SAVED_INITIAL_BLOCKS_SIZE ((DV_NUM_BLOCKS_PER_SEQUENCE+6-1)*DV_DIF_BLOCK_SIZE) - /* enough data to ensure that it contains an intact 6-block header (which occurs at the start of a 150-block sequence) */ - -class DVVideoStreamFramer: public FramedFilter { -public: - static DVVideoStreamFramer* - createNew(UsageEnvironment& env, FramedSource* inputSource, - Boolean sourceIsSeekable = False, Boolean leavePresentationTimesUnmodified = False); - // Set "sourceIsSeekable" to True if the input source is a seekable object (e.g. a file), and the server that uses us - // does a seek-to-zero on the source before reading from it. (Our RTSP server implementation does this.) - char const* profileName(); - Boolean getFrameParameters(unsigned& frameSize/*bytes*/, double& frameDuration/*microseconds*/); - -protected: - DVVideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, - Boolean sourceIsSeekable, Boolean leavePresentationTimesUnmodified); - // called only by createNew(), or by subclass constructors - virtual ~DVVideoStreamFramer(); - -protected: - // redefined virtual functions: - virtual Boolean isDVVideoStreamFramer() const; - virtual void doGetNextFrame(); - -protected: - void getAndDeliverData(); // used to implement "doGetNextFrame()" - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame(unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime); - void getProfile(); - -protected: - Boolean fLeavePresentationTimesUnmodified; - void const* fOurProfile; - struct timeval fNextFramePresentationTime; - unsigned char fSavedInitialBlocks[DV_SAVED_INITIAL_BLOCKS_SIZE]; - char fInitialBlocksPresent; - Boolean fSourceIsSeekable; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/DeviceSource.hh b/project/3rdparty/include/live555/liveMedia/DeviceSource.hh deleted file mode 100644 index e4fd5029e..000000000 --- a/project/3rdparty/include/live555/liveMedia/DeviceSource.hh +++ /dev/null @@ -1,66 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A template for a MediaSource encapsulating an audio/video input device -// -// NOTE: Sections of this code labeled "%%% TO BE WRITTEN %%%" are incomplete, and needto be written by the programmer -// (depending on the features of the particulardevice). -// C++ header - -#ifndef _DEVICE_SOURCE_HH -#define _DEVICE_SOURCE_HH - -#ifndef _FRAMED_SOURCE_HH -#include "FramedSource.hh" -#endif - -// The following class can be used to define specific encoder parameters -class DeviceParameters { - //%%% TO BE WRITTEN %%% -}; - -class DeviceSource: public FramedSource { -public: - static DeviceSource* createNew(UsageEnvironment& env, - DeviceParameters params); - -public: - static EventTriggerId eventTriggerId; - // Note that this is defined here to be a static class variable, because this code is intended to illustrate how to - // encapsulate a *single* device - not a set of devices. - // You can, however, redefine this to be a non-static member variable. - -protected: - DeviceSource(UsageEnvironment& env, DeviceParameters params); - // called only by createNew(), or by subclass constructors - virtual ~DeviceSource(); - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - //virtual void doStopGettingFrames(); // optional - -private: - static void deliverFrame0(void* clientData); - void deliverFrame(); - -private: - static unsigned referenceCount; // used to count how many instances of this class currently exist - DeviceParameters fParams; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/DigestAuthentication.hh b/project/3rdparty/include/live555/liveMedia/DigestAuthentication.hh deleted file mode 100644 index 141f38223..000000000 --- a/project/3rdparty/include/live555/liveMedia/DigestAuthentication.hh +++ /dev/null @@ -1,75 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A class used for digest authentication. -// C++ header - -#ifndef _DIGEST_AUTHENTICATION_HH -#define _DIGEST_AUTHENTICATION_HH - -#ifndef _BOOLEAN_HH -#include "../UsageEnvironment/Boolean.hh" -#endif - -// A class used for digest authentication. -// The "realm", and "nonce" fields are supplied by the server -// (in a "401 Unauthorized" response). -// The "username" and "password" fields are supplied by the client. -class Authenticator { -public: - Authenticator(); - Authenticator(char const* username, char const* password, Boolean passwordIsMD5 = False); - // If "passwordIsMD5" is True, then "password" is actually the value computed - // by md5(::) - Authenticator(const Authenticator& orig); - Authenticator& operator=(const Authenticator& rightSide); - Boolean operator<(const Authenticator* rightSide); - virtual ~Authenticator(); - - void reset(); - void setRealmAndNonce(char const* realm, char const* nonce); - void setRealmAndRandomNonce(char const* realm); - // as above, except that the nonce is created randomly. - // (This is used by servers.) - void setUsernameAndPassword(char const* username, char const* password, Boolean passwordIsMD5 = False); - // If "passwordIsMD5" is True, then "password" is actually the value computed - // by md5(::) - - char const* realm() const { return fRealm; } - char const* nonce() const { return fNonce; } - char const* username() const { return fUsername; } - char const* password() const { return fPassword; } - - char const* computeDigestResponse(char const* cmd, char const* url) const; - // The returned string from this function must later be freed by calling: - void reclaimDigestResponse(char const* responseStr) const; - -private: - void resetRealmAndNonce(); - void resetUsernameAndPassword(); - void assignRealmAndNonce(char const* realm, char const* nonce); - void assignUsernameAndPassword(char const* username, char const* password, Boolean passwordIsMD5); - void assign(char const* realm, char const* nonce, - char const* username, char const* password, Boolean passwordIsMD5); - -private: - char* fRealm; char* fNonce; - char* fUsername; char* fPassword; - Boolean fPasswordIsMD5; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/FileServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/FileServerMediaSubsession.hh deleted file mode 100644 index 52c82252d..000000000 --- a/project/3rdparty/include/live555/liveMedia/FileServerMediaSubsession.hh +++ /dev/null @@ -1,43 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from a file. -// C++ header - -#ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH -#define _FILE_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _SERVER_MEDIA_SESSION_HH -#include "ServerMediaSession.hh" -#endif -#ifndef _ON_DEMAND_SERVER_MEDIA_SUBSESSION_HH -#include "OnDemandServerMediaSubsession.hh" -#endif - -class FileServerMediaSubsession: public OnDemandServerMediaSubsession { -protected: // we're a virtual base class - FileServerMediaSubsession(UsageEnvironment& env, char const* fileName, - Boolean reuseFirstSource); - virtual ~FileServerMediaSubsession(); - -protected: - char const* fFileName; - u_int64_t fFileSize; // if known -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/FileSink.hh b/project/3rdparty/include/live555/liveMedia/FileSink.hh deleted file mode 100644 index 125dac876..000000000 --- a/project/3rdparty/include/live555/liveMedia/FileSink.hh +++ /dev/null @@ -1,71 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// File Sinks -// C++ header - -#ifndef _FILE_SINK_HH -#define _FILE_SINK_HH - -#ifndef _MEDIA_SINK_HH -#include "MediaSink.hh" -#endif - -class FileSink: public MediaSink { -public: - static FileSink* createNew(UsageEnvironment& env, char const* fileName, - unsigned bufferSize = 20000, - Boolean oneFilePerFrame = False); - // "bufferSize" should be at least as large as the largest expected - // input frame. - // "oneFilePerFrame" - if True - specifies that each input frame will - // be written to a separate file (using the presentation time as a - // file name suffix). The default behavior ("oneFilePerFrame" == False) - // is to output all incoming data into a single file. - - virtual void addData(unsigned char const* data, unsigned dataSize, - struct timeval presentationTime); - // (Available in case a client wants to add extra data to the output file) - -protected: - FileSink(UsageEnvironment& env, FILE* fid, unsigned bufferSize, - char const* perFrameFileNamePrefix); - // called only by createNew() - virtual ~FileSink(); - -protected: // redefined virtual functions: - virtual Boolean continuePlaying(); - -protected: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - virtual void afterGettingFrame(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime); - - FILE* fOutFid; - unsigned char* fBuffer; - unsigned fBufferSize; - char* fPerFrameFileNamePrefix; // used if "oneFilePerFrame" is True - char* fPerFrameFileNameBuffer; // used if "oneFilePerFrame" is True - struct timeval fPrevPresentationTime; - unsigned fSamePresentationTimeCounter; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/FramedFileSource.hh b/project/3rdparty/include/live555/liveMedia/FramedFileSource.hh deleted file mode 100644 index b1ab4b794..000000000 --- a/project/3rdparty/include/live555/liveMedia/FramedFileSource.hh +++ /dev/null @@ -1,37 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Framed File Sources -// C++ header - -#ifndef _FRAMED_FILE_SOURCE_HH -#define _FRAMED_FILE_SOURCE_HH - -#ifndef _FRAMED_SOURCE_HH -#include "FramedSource.hh" -#endif - -class FramedFileSource: public FramedSource { -protected: - FramedFileSource(UsageEnvironment& env, FILE* fid); // abstract base class - virtual ~FramedFileSource(); - -protected: - FILE* fFid; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/FramedFilter.hh b/project/3rdparty/include/live555/liveMedia/FramedFilter.hh deleted file mode 100644 index 91836f547..000000000 --- a/project/3rdparty/include/live555/liveMedia/FramedFilter.hh +++ /dev/null @@ -1,52 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Framed Filters -// C++ header - -#ifndef _FRAMED_FILTER_HH -#define _FRAMED_FILTER_HH - -#ifndef _FRAMED_SOURCE_HH -#include "FramedSource.hh" -#endif - -class FramedFilter: public FramedSource { -public: - FramedSource* inputSource() const { return fInputSource; } - - void reassignInputSource(FramedSource* newInputSource) { fInputSource = newInputSource; } - - // Call before destruction if you want to prevent the destructor from closing the input source - void detachInputSource(); - -protected: - FramedFilter(UsageEnvironment& env, FramedSource* inputSource); - // abstract base class - virtual ~FramedFilter(); - -protected: - // Redefined virtual functions (with default 'null' implementations): - virtual char const* MIMEtype() const; - virtual void getAttributes() const; - virtual void doStopGettingFrames(); - -protected: - FramedSource* fInputSource; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/FramedSource.hh b/project/3rdparty/include/live555/liveMedia/FramedSource.hh deleted file mode 100644 index 3191a622d..000000000 --- a/project/3rdparty/include/live555/liveMedia/FramedSource.hh +++ /dev/null @@ -1,95 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Framed Sources -// C++ header - -#ifndef _FRAMED_SOURCE_HH -#define _FRAMED_SOURCE_HH - -#ifndef _NET_COMMON_H -#include "../groupsock/NetCommon.h" -#endif -#ifndef _MEDIA_SOURCE_HH -#include "MediaSource.hh" -#endif - -class FramedSource: public MediaSource { -public: - static Boolean lookupByName(UsageEnvironment& env, char const* sourceName, - FramedSource*& resultSource); - - typedef void (afterGettingFunc)(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - typedef void (onCloseFunc)(void* clientData); - void getNextFrame(unsigned char* to, unsigned maxSize, - afterGettingFunc* afterGettingFunc, - void* afterGettingClientData, - onCloseFunc* onCloseFunc, - void* onCloseClientData); - - static void handleClosure(void* clientData); - void handleClosure(); - // This should be called (on ourself) if the source is discovered - // to be closed (i.e., no longer readable) - - void stopGettingFrames(); - - virtual unsigned maxFrameSize() const; - // size of the largest possible frame that we may serve, or 0 - // if no such maximum is known (default) - - virtual void doGetNextFrame() = 0; - // called by getNextFrame() - - Boolean isCurrentlyAwaitingData() const {return fIsCurrentlyAwaitingData;} - - static void afterGetting(FramedSource* source); - // doGetNextFrame() should arrange for this to be called after the - // frame has been read (*iff* it is read successfully) - -protected: - FramedSource(UsageEnvironment& env); // abstract base class - virtual ~FramedSource(); - - virtual void doStopGettingFrames(); - -protected: - // The following variables are typically accessed/set by doGetNextFrame() - unsigned char* fTo; // in - unsigned fMaxSize; // in - unsigned fFrameSize; // out - unsigned fNumTruncatedBytes; // out - struct timeval fPresentationTime; // out - unsigned fDurationInMicroseconds; // out - -private: - // redefined virtual functions: - virtual Boolean isFramedSource() const; - -private: - afterGettingFunc* fAfterGettingFunc; - void* fAfterGettingClientData; - onCloseFunc* fOnCloseFunc; - void* fOnCloseClientData; - - Boolean fIsCurrentlyAwaitingData; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/GSMAudioRTPSink.hh b/project/3rdparty/include/live555/liveMedia/GSMAudioRTPSink.hh deleted file mode 100644 index cee714a99..000000000 --- a/project/3rdparty/include/live555/liveMedia/GSMAudioRTPSink.hh +++ /dev/null @@ -1,44 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for GSM audio -// C++ header - -#ifndef _GSM_AUDIO_RTP_SINK_HH -#define _GSM_AUDIO_RTP_SINK_HH - -#ifndef _AUDIO_RTP_SINK_HH -#include "AudioRTPSink.hh" -#endif - -class GSMAudioRTPSink: public AudioRTPSink { -public: - static GSMAudioRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs); - -protected: - GSMAudioRTPSink(UsageEnvironment& env, Groupsock* RTPgs); - // called only by createNew() - - virtual ~GSMAudioRTPSink(); - -private: // redefined virtual functions: - virtual - Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/GenericMediaServer.hh b/project/3rdparty/include/live555/liveMedia/GenericMediaServer.hh deleted file mode 100644 index 9ca04da3a..000000000 --- a/project/3rdparty/include/live555/liveMedia/GenericMediaServer.hh +++ /dev/null @@ -1,224 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A generic media server class, used to implement a RTSP server, and any other server that uses -// "ServerMediaSession" objects to describe media to be served. -// C++ header - -#ifndef _GENERIC_MEDIA_SERVER_HH -#define _GENERIC_MEDIA_SERVER_HH - -#ifndef _MEDIA_HH -#include "Media.hh" -#endif -#ifndef _SERVER_MEDIA_SESSION_HH -#include "ServerMediaSession.hh" -#endif - -#ifndef REQUEST_BUFFER_SIZE -#define REQUEST_BUFFER_SIZE 20000 // for incoming requests -#endif -#ifndef RESPONSE_BUFFER_SIZE -#define RESPONSE_BUFFER_SIZE 20000 -#endif - -// Typedef for a handler function that gets called when "lookupServerMediaSession()" -// (defined below) completes: -typedef void lookupServerMediaSessionCompletionFunc(void* clientData, - ServerMediaSession* sessionLookedUp); - -class GenericMediaServer: public Medium { -public: - virtual void addServerMediaSession(ServerMediaSession* serverMediaSession); - - virtual void lookupServerMediaSession(char const* streamName, - lookupServerMediaSessionCompletionFunc* completionFunc, - void* completionClientData, - Boolean isFirstLookupInSession = True); - // Note: This is a virtual function, so can be reimplemented by subclasses. - void lookupServerMediaSession(char const* streamName, - void (GenericMediaServer::*memberFunc)(ServerMediaSession*)); - // Special case of "lookupServerMediaSession()" where the 'completion function' is a - // member function of "GenericMediaServer" (and the 'completion client data' is "this".) - - void removeServerMediaSession(ServerMediaSession* serverMediaSession); - // Removes the "ServerMediaSession" object from our lookup table, so it will no longer be accessible by new clients. - // (However, any *existing* client sessions that use this "ServerMediaSession" object will continue streaming. - // The "ServerMediaSession" object will not get deleted until all of these client sessions have closed.) - // (To both delete the "ServerMediaSession" object *and* close all client sessions that use it, - // call "deleteServerMediaSession(serverMediaSession)" instead.) - virtual void removeServerMediaSession(char const* streamName); - // ditto - - void closeAllClientSessionsForServerMediaSession(ServerMediaSession* serverMediaSession); - // Closes (from the server) all client sessions that are currently using this "ServerMediaSession" object. - // Note, however, that the "ServerMediaSession" object remains accessible by new clients. - virtual void closeAllClientSessionsForServerMediaSession(char const* streamName); - // ditto - - void deleteServerMediaSession(ServerMediaSession* serverMediaSession); - // Equivalent to: - // "closeAllClientSessionsForServerMediaSession(serverMediaSession); removeServerMediaSession(serverMediaSession);" - virtual void deleteServerMediaSession(char const* streamName); - // Equivalent to: - // "closeAllClientSessionsForServerMediaSession(streamName); removeServerMediaSession(streamName); - - unsigned numClientSessions() const { return fClientSessions->numEntries(); } - -protected: - GenericMediaServer(UsageEnvironment& env, int ourSocketIPv4, int ourSocketIPv6, Port ourPort, - unsigned reclamationSeconds); - // If "reclamationSeconds" > 0, then the "ClientSession" state for each client will get - // reclaimed if no activity from the client is detected in at least "reclamationSeconds". - // we're an abstract base class - virtual ~GenericMediaServer(); - void cleanup(); // MUST be called in the destructor of any subclass of us - - static int setUpOurSocket(UsageEnvironment& env, Port& ourPort, int domain); - - static void incomingConnectionHandlerIPv4(void*, int /*mask*/); - static void incomingConnectionHandlerIPv6(void*, int /*mask*/); - void incomingConnectionHandlerIPv4(); - void incomingConnectionHandlerIPv6(); - void incomingConnectionHandlerOnSocket(int serverSocket); - - void setTLSFileNames(char const* certFileName, char const* privKeyFileName); - -public: // should be protected, but some old compilers complain otherwise - // The state of a TCP connection used by a client: - class ClientConnection { - protected: - ClientConnection(GenericMediaServer& ourServer, - int clientSocket, struct sockaddr_storage const& clientAddr, - Boolean useTLS); - virtual ~ClientConnection(); - - UsageEnvironment& envir() { return fOurServer.envir(); } - void closeSockets(); - - static void incomingRequestHandler(void*, int /*mask*/); - void incomingRequestHandler(); - virtual void handleRequestBytes(int newBytesRead) = 0; - void resetRequestBuffer(); - - protected: - friend class GenericMediaServer; - friend class ClientSession; - friend class RTSPServer; // needed to make some broken Windows compilers work; remove this in the future when we end support for Windows - GenericMediaServer& fOurServer; - int fOurSocket; - struct sockaddr_storage fClientAddr; - unsigned char fRequestBuffer[REQUEST_BUFFER_SIZE]; - unsigned char fResponseBuffer[RESPONSE_BUFFER_SIZE]; - unsigned fRequestBytesAlreadySeen, fRequestBufferBytesLeft; - - // Optional support for TLS: - ServerTLSState fTLS; - ServerTLSState* fInputTLS; // by default, just points to "fTLS", but subclasses may change - ServerTLSState* fOutputTLS; // ditto - }; - - // The state of an individual client session (using one or more sequential TCP connections) handled by a server: - class ClientSession { - protected: - ClientSession(GenericMediaServer& ourServer, u_int32_t sessionId); - virtual ~ClientSession(); - - UsageEnvironment& envir() { return fOurServer.envir(); } - void noteLiveness(); - static void noteClientLiveness(ClientSession* clientSession); - static void livenessTimeoutTask(ClientSession* clientSession); - - protected: - friend class GenericMediaServer; - friend class ClientConnection; - GenericMediaServer& fOurServer; - u_int32_t fOurSessionId; - ServerMediaSession* fOurServerMediaSession; - TaskToken fLivenessCheckTask; - }; - -protected: - virtual ClientConnection* createNewClientConnection(int clientSocket, struct sockaddr_storage const& clientAddr) = 0; - virtual ClientSession* createNewClientSession(u_int32_t sessionId) = 0; - - ClientSession* createNewClientSessionWithId(); - // Generates a new (unused) random session id, and calls the "createNewClientSession()" - // virtual function with this session id as parameter. - - // Lookup a "ClientSession" object by sessionId (integer, and string): - ClientSession* lookupClientSession(u_int32_t sessionId); - ClientSession* lookupClientSession(char const* sessionIdStr); - - // An iterator over our "ServerMediaSession" objects: - class ServerMediaSessionIterator { - public: - ServerMediaSessionIterator(GenericMediaServer& server); - virtual ~ServerMediaSessionIterator(); - ServerMediaSession* next(); - private: - HashTable::Iterator* fOurIterator; - }; - - // The basic, synchronous "ServerMediaSession" lookup operation; only for subclasses: - ServerMediaSession* getServerMediaSession(char const* streamName); - -protected: - friend class ClientConnection; - friend class ClientSession; - friend class ServerMediaSessionIterator; - int fServerSocketIPv4, fServerSocketIPv6; - Port fServerPort; - unsigned fReclamationSeconds; - -private: - HashTable* fServerMediaSessions; // maps 'stream name' strings to "ServerMediaSession" objects - HashTable* fClientConnections; // the "ClientConnection" objects that we're using - HashTable* fClientSessions; // maps 'session id' strings to "ClientSession" objects - u_int32_t fPreviousClientSessionId; - - char const* fTLSCertificateFileName; - char const* fTLSPrivateKeyFileName; -}; - -// A data structure used for optional user/password authentication: - -class UserAuthenticationDatabase { -public: - UserAuthenticationDatabase(char const* realm = NULL, - Boolean passwordsAreMD5 = False); - // If "passwordsAreMD5" is True, then each password stored into, or removed from, - // the database is actually the value computed - // by md5(::) - virtual ~UserAuthenticationDatabase(); - - virtual void addUserRecord(char const* username, char const* password); - virtual void removeUserRecord(char const* username); - - virtual char const* lookupPassword(char const* username); - // returns NULL if the user name was not present - - char const* realm() { return fRealm; } - Boolean passwordsAreMD5() { return fPasswordsAreMD5; } - -protected: - HashTable* fTable; - char* fRealm; - Boolean fPasswordsAreMD5; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H261VideoRTPSource.hh b/project/3rdparty/include/live555/liveMedia/H261VideoRTPSource.hh deleted file mode 100644 index 1ee1bda9d..000000000 --- a/project/3rdparty/include/live555/liveMedia/H261VideoRTPSource.hh +++ /dev/null @@ -1,56 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// H.261 Video RTP Sources -// C++ header - -#ifndef _H261_VIDEO_RTP_SOURCE_HH -#define _H261_VIDEO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class H261VideoRTPSource: public MultiFramedRTPSource { -public: - static H261VideoRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat = 31, - unsigned rtpTimestampFrequency = 90000); - - u_int32_t lastSpecialHeader() const {return fLastSpecialHeader;} - -protected: - virtual ~H261VideoRTPSource(); - -private: - H261VideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - // called only by createNew() - -private: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; - -private: - u_int32_t fLastSpecialHeader; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H263plusVideoFileServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/H263plusVideoFileServerMediaSubsession.hh deleted file mode 100644 index 5353539eb..000000000 --- a/project/3rdparty/include/live555/liveMedia/H263plusVideoFileServerMediaSubsession.hh +++ /dev/null @@ -1,48 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from a H.263 video file. -// C++ header - -#ifndef _H263PLUS_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH -#define _H263PLUS_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH -#include "FileServerMediaSubsession.hh" -#endif - -class H263plusVideoFileServerMediaSubsession: public FileServerMediaSubsession{ -public: - static H263plusVideoFileServerMediaSubsession* - createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); - -private: - H263plusVideoFileServerMediaSubsession(UsageEnvironment& env, - char const* fileName, Boolean reuseFirstSource); - // called only by createNew(); - virtual ~H263plusVideoFileServerMediaSubsession(); - -private: // redefined virtual functions - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, - unsigned& estBitrate); - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic, - FramedSource* inputSource); -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H263plusVideoRTPSink.hh b/project/3rdparty/include/live555/liveMedia/H263plusVideoRTPSink.hh deleted file mode 100644 index 074c4d20c..000000000 --- a/project/3rdparty/include/live555/liveMedia/H263plusVideoRTPSink.hh +++ /dev/null @@ -1,54 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for H.263+ video (RFC 4629) -// C++ header - -#ifndef _H263_PLUS_VIDEO_RTP_SINK_HH -#define _H263_PLUS_VIDEO_RTP_SINK_HH - -#ifndef _VIDEO_RTP_SINK_HH -#include "VideoRTPSink.hh" -#endif - -class H263plusVideoRTPSink: public VideoRTPSink { -public: - static H263plusVideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - u_int32_t rtpTimestampFrequency = 90000); - -protected: - H263plusVideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - u_int32_t rtpTimestampFrequency); - // called only by createNew() - - virtual ~H263plusVideoRTPSink(); - -private: // redefined virtual functions: - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual - Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - virtual unsigned specialHeaderSize() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H263plusVideoRTPSource.hh b/project/3rdparty/include/live555/liveMedia/H263plusVideoRTPSource.hh deleted file mode 100644 index 40dd4759c..000000000 --- a/project/3rdparty/include/live555/liveMedia/H263plusVideoRTPSource.hh +++ /dev/null @@ -1,60 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// H.263+ Video RTP Sources -// C++ header - -#ifndef _H263_PLUS_VIDEO_RTP_SOURCE_HH -#define _H263_PLUS_VIDEO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -#define SPECIAL_HEADER_BUFFER_SIZE 1000 - -class H263plusVideoRTPSource: public MultiFramedRTPSource { -public: - static H263plusVideoRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency = 90000); - - // A data structure that stores copies of the special header bytes - // from the most recent frame's RTP packets: - unsigned char fNumSpecialHeaders; - unsigned fSpecialHeaderBytesLength; - unsigned char fSpecialHeaderBytes[SPECIAL_HEADER_BUFFER_SIZE]; - unsigned fPacketSizes[256]; - -protected: - virtual ~H263plusVideoRTPSource(); - -private: - H263plusVideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - // called only by createNew() - -private: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H263plusVideoStreamFramer.hh b/project/3rdparty/include/live555/liveMedia/H263plusVideoStreamFramer.hh deleted file mode 100644 index 5dc2d6df0..000000000 --- a/project/3rdparty/include/live555/liveMedia/H263plusVideoStreamFramer.hh +++ /dev/null @@ -1,64 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter that breaks up an H263 video elementary stream into frames. -// Author Benhard Feiten - -#ifndef _H263PLUS_VIDEO_STREAM_FRAMER_HH -#define _H263PLUS_VIDEO_STREAM_FRAMER_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - - -class H263plusVideoStreamFramer: public FramedFilter { -public: - - static H263plusVideoStreamFramer* createNew(UsageEnvironment& env, FramedSource* inputSource); - - Boolean& pictureEndMarker() { return fPictureEndMarker; } // a hack for implementing the RTP 'M' bit - -protected: - // Constructor called only by createNew(), or by subclass constructors - H263plusVideoStreamFramer(UsageEnvironment& env, - FramedSource* inputSource, - Boolean createParser = True); - virtual ~H263plusVideoStreamFramer(); - - -public: - static void continueReadProcessing(void* clientData, - unsigned char* ptr, unsigned size, - struct timeval presentationTime); - void continueReadProcessing(); - -private: - virtual void doGetNextFrame(); - virtual Boolean isH263plusVideoStreamFramer() const; - -protected: - double fFrameRate; - unsigned fPictureCount; // hack used to implement doGetNextFrame() ?? - Boolean fPictureEndMarker; - -private: - class H263plusVideoStreamParser* fParser; - struct timeval fPresentationTimeBase; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H264VideoFileServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/H264VideoFileServerMediaSubsession.hh deleted file mode 100644 index 9d28b4f88..000000000 --- a/project/3rdparty/include/live555/liveMedia/H264VideoFileServerMediaSubsession.hh +++ /dev/null @@ -1,61 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from a H264 Elementary Stream video file. -// C++ header - -#ifndef _H264_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH -#define _H264_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH -#include "FileServerMediaSubsession.hh" -#endif - -class H264VideoFileServerMediaSubsession: public FileServerMediaSubsession { -public: - static H264VideoFileServerMediaSubsession* - createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); - - // Used to implement "getAuxSDPLine()": - void checkForAuxSDPLine1(); - void afterPlayingDummy1(); - -protected: - H264VideoFileServerMediaSubsession(UsageEnvironment& env, - char const* fileName, Boolean reuseFirstSource); - // called only by createNew(); - virtual ~H264VideoFileServerMediaSubsession(); - - void setDoneFlag() { fDoneFlag = ~0; } - -protected: // redefined virtual functions - virtual char const* getAuxSDPLine(RTPSink* rtpSink, - FramedSource* inputSource); - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, - unsigned& estBitrate); - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic, - FramedSource* inputSource); - -private: - char* fAuxSDPLine; - char fDoneFlag; // used when setting up "fAuxSDPLine" - RTPSink* fDummyRTPSink; // ditto -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H264VideoFileSink.hh b/project/3rdparty/include/live555/liveMedia/H264VideoFileSink.hh deleted file mode 100644 index 26a8ff948..000000000 --- a/project/3rdparty/include/live555/liveMedia/H264VideoFileSink.hh +++ /dev/null @@ -1,47 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// H.264 Video File Sinks -// C++ header - -#ifndef _H264_VIDEO_FILE_SINK_HH -#define _H264_VIDEO_FILE_SINK_HH - -#ifndef _H264_OR_5_VIDEO_FILE_SINK_HH -#include "H264or5VideoFileSink.hh" -#endif - -class H264VideoFileSink: public H264or5VideoFileSink { -public: - static H264VideoFileSink* createNew(UsageEnvironment& env, char const* fileName, - char const* sPropParameterSetsStr = NULL, - // "sPropParameterSetsStr" is an optional 'SDP format' string - // (comma-separated Base64-encoded) representing SPS and/or PPS NAL-units - // to prepend to the output - unsigned bufferSize = 100000, - Boolean oneFilePerFrame = False); - // See "FileSink.hh" for a description of these parameters. - -protected: - H264VideoFileSink(UsageEnvironment& env, FILE* fid, - char const* sPropParameterSetsStr, - unsigned bufferSize, char const* perFrameFileNamePrefix); - // called only by createNew() - virtual ~H264VideoFileSink(); -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H264VideoRTPSink.hh b/project/3rdparty/include/live555/liveMedia/H264VideoRTPSink.hh deleted file mode 100644 index a9126cd7c..000000000 --- a/project/3rdparty/include/live555/liveMedia/H264VideoRTPSink.hh +++ /dev/null @@ -1,59 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for H.264 video (RFC 3984) -// C++ header - -#ifndef _H264_VIDEO_RTP_SINK_HH -#define _H264_VIDEO_RTP_SINK_HH - -#ifndef _H264_OR_5_VIDEO_RTP_SINK_HH -#include "H264or5VideoRTPSink.hh" -#endif - -class H264VideoRTPSink: public H264or5VideoRTPSink { -public: - static H264VideoRTPSink* - createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); - static H264VideoRTPSink* - createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat, - u_int8_t const* sps, unsigned spsSize, u_int8_t const* pps, unsigned ppsSize); - // an optional variant of "createNew()", useful if we know, in advance, - // the stream's SPS and PPS NAL units. - // This avoids us having to 'pre-read' from the input source in order to get these values. - static H264VideoRTPSink* - createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat, - char const* sPropParameterSetsStr); - // an optional variant of "createNew()", useful if we know, in advance, - // the stream's SPS and PPS NAL units. - // This avoids us having to 'pre-read' from the input source in order to get these values. - -protected: - H264VideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat, - u_int8_t const* sps = NULL, unsigned spsSize = 0, - u_int8_t const* pps = NULL, unsigned ppsSize = 0); - // called only by createNew() - virtual ~H264VideoRTPSink(); - -protected: // redefined virtual functions: - virtual char const* auxSDPLine(); - -private: // redefined virtual functions: - virtual Boolean sourceIsCompatibleWithUs(MediaSource& source); -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H264VideoRTPSource.hh b/project/3rdparty/include/live555/liveMedia/H264VideoRTPSource.hh deleted file mode 100644 index ff53c45eb..000000000 --- a/project/3rdparty/include/live555/liveMedia/H264VideoRTPSource.hh +++ /dev/null @@ -1,70 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// H.264 Video RTP Sources -// C++ header - -#ifndef _H264_VIDEO_RTP_SOURCE_HH -#define _H264_VIDEO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class H264VideoRTPSource: public MultiFramedRTPSource { -public: - static H264VideoRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency = 90000); - -protected: - H264VideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - // called only by createNew() - - virtual ~H264VideoRTPSource(); - -protected: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; - -private: - friend class H264BufferedPacket; - unsigned char fCurPacketNALUnitType; -}; - -class SPropRecord { -public: - ~SPropRecord() { delete[] sPropBytes; } - - unsigned sPropLength; // in bytes - unsigned char* sPropBytes; -}; - -SPropRecord* parseSPropParameterSets(char const* sPropParameterSetsStr, - // result parameter: - unsigned& numSPropRecords); - // Returns the binary value of each 'parameter set' specified in a - // "sprop-parameter-sets" string (in the SDP description for a H.264/RTP stream). - // The value is returned as an array (length "numSPropRecords") of "SPropRecord"s. - // This array is dynamically allocated by this routine, and must be delete[]d by the caller. - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H264VideoStreamDiscreteFramer.hh b/project/3rdparty/include/live555/liveMedia/H264VideoStreamDiscreteFramer.hh deleted file mode 100644 index 38339b640..000000000 --- a/project/3rdparty/include/live555/liveMedia/H264VideoStreamDiscreteFramer.hh +++ /dev/null @@ -1,48 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A simplified version of "H264VideoStreamFramer" that takes only complete, -// discrete frames (rather than an arbitrary byte stream) as input. -// This avoids the parsing and data copying overhead of the full -// "H264VideoStreamFramer". -// C++ header - -#ifndef _H264_VIDEO_STREAM_DISCRETE_FRAMER_HH -#define _H264_VIDEO_STREAM_DISCRETE_FRAMER_HH - -#ifndef _H264_OR_5_VIDEO_STREAM_DISCRETE_FRAMER_HH -#include "H264or5VideoStreamDiscreteFramer.hh" -#endif - -class H264VideoStreamDiscreteFramer: public H264or5VideoStreamDiscreteFramer { -public: - static H264VideoStreamDiscreteFramer* - createNew(UsageEnvironment& env, FramedSource* inputSource, - Boolean includeStartCodeInOutput = False, Boolean insertAccessUnitDelimiters = False); - -protected: - H264VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource, - Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters); - // called only by createNew() - virtual ~H264VideoStreamDiscreteFramer(); - -private: - // redefined virtual functions: - virtual Boolean isH264VideoStreamFramer() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H264VideoStreamFramer.hh b/project/3rdparty/include/live555/liveMedia/H264VideoStreamFramer.hh deleted file mode 100644 index 82fe80a11..000000000 --- a/project/3rdparty/include/live555/liveMedia/H264VideoStreamFramer.hh +++ /dev/null @@ -1,45 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter that breaks up a H.264 Video Elementary Stream into NAL units. -// C++ header - -#ifndef _H264_VIDEO_STREAM_FRAMER_HH -#define _H264_VIDEO_STREAM_FRAMER_HH - -#ifndef _H264_OR_5_VIDEO_STREAM_FRAMER_HH -#include "H264or5VideoStreamFramer.hh" -#endif - -class H264VideoStreamFramer: public H264or5VideoStreamFramer { -public: - static H264VideoStreamFramer* createNew(UsageEnvironment& env, FramedSource* inputSource, - Boolean includeStartCodeInOutput = False, - Boolean insertAccessUnitDelimiters = False); - -protected: - H264VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, - Boolean createParser, - Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters); - // called only by "createNew()" - virtual ~H264VideoStreamFramer(); - - // redefined virtual functions: - virtual Boolean isH264VideoStreamFramer() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H264or5VideoFileSink.hh b/project/3rdparty/include/live555/liveMedia/H264or5VideoFileSink.hh deleted file mode 100644 index c370de58a..000000000 --- a/project/3rdparty/include/live555/liveMedia/H264or5VideoFileSink.hh +++ /dev/null @@ -1,46 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// H.264 or H.265 Video File Sinks -// C++ header - -#ifndef _H264_OR_5_VIDEO_FILE_SINK_HH -#define _H264_OR_5_VIDEO_FILE_SINK_HH - -#ifndef _FILE_SINK_HH -#include "FileSink.hh" -#endif - -class H264or5VideoFileSink: public FileSink { -protected: - H264or5VideoFileSink(UsageEnvironment& env, FILE* fid, - unsigned bufferSize, char const* perFrameFileNamePrefix, - char const* sPropParameterSetsStr1, - char const* sPropParameterSetsStr2 = NULL, - char const* sPropParameterSetsStr3 = NULL); - // we're an abstract base class - virtual ~H264or5VideoFileSink(); - -protected: // redefined virtual functions: - virtual void afterGettingFrame(unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime); - -private: - char const* fSPropParameterSetsStr[3]; - Boolean fHaveWrittenFirstFrame; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H264or5VideoRTPSink.hh b/project/3rdparty/include/live555/liveMedia/H264or5VideoRTPSink.hh deleted file mode 100644 index ed3a6bfe2..000000000 --- a/project/3rdparty/include/live555/liveMedia/H264or5VideoRTPSink.hh +++ /dev/null @@ -1,60 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for H.264 or H.265 video -// C++ header - -#ifndef _H264_OR_5_VIDEO_RTP_SINK_HH -#define _H264_OR_5_VIDEO_RTP_SINK_HH - -#ifndef _VIDEO_RTP_SINK_HH -#include "VideoRTPSink.hh" -#endif -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -class H264or5VideoRTPSink: public VideoRTPSink { -protected: - H264or5VideoRTPSink(int hNumber, // 264 or 265 - UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat, - u_int8_t const* vps = NULL, unsigned vpsSize = 0, - u_int8_t const* sps = NULL, unsigned spsSize = 0, - u_int8_t const* pps = NULL, unsigned ppsSize = 0); - // we're an abstrace base class - virtual ~H264or5VideoRTPSink(); - -private: // redefined virtual functions: - virtual Boolean continuePlaying(); - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - -protected: - int fHNumber; - FramedFilter* fOurFragmenter; - char* fFmtpSDPLine; - u_int8_t* fVPS; unsigned fVPSSize; - u_int8_t* fSPS; unsigned fSPSSize; - u_int8_t* fPPS; unsigned fPPSSize; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H264or5VideoStreamDiscreteFramer.hh b/project/3rdparty/include/live555/liveMedia/H264or5VideoStreamDiscreteFramer.hh deleted file mode 100644 index ab8f9a8bb..000000000 --- a/project/3rdparty/include/live555/liveMedia/H264or5VideoStreamDiscreteFramer.hh +++ /dev/null @@ -1,56 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A simplified version of "H264or5VideoStreamFramer" that takes only complete, -// discrete frames (rather than an arbitrary byte stream) as input. -// This avoids the parsing and data copying overhead of the full -// "H264or5VideoStreamFramer". -// C++ header - -#ifndef _H264_OR_5_VIDEO_STREAM_DISCRETE_FRAMER_HH -#define _H264_OR_5_VIDEO_STREAM_DISCRETE_FRAMER_HH - -#ifndef _H264_OR_5_VIDEO_STREAM_FRAMER_HH -#include "H264or5VideoStreamFramer.hh" -#endif - -class H264or5VideoStreamDiscreteFramer: public H264or5VideoStreamFramer { -protected: - H264or5VideoStreamDiscreteFramer(int hNumber, UsageEnvironment& env, FramedSource* inputSource, - Boolean includeStartCodeInOutput, - Boolean insertAccessUnitDelimiters); - // we're an abstract base class - virtual ~H264or5VideoStreamDiscreteFramer(); - -protected: - // redefined virtual functions: - virtual void doGetNextFrame(); - -protected: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - - virtual Boolean nalUnitEndsAccessUnit(u_int8_t nal_unit_type); -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H264or5VideoStreamFramer.hh b/project/3rdparty/include/live555/liveMedia/H264or5VideoStreamFramer.hh deleted file mode 100644 index bbf91c666..000000000 --- a/project/3rdparty/include/live555/liveMedia/H264or5VideoStreamFramer.hh +++ /dev/null @@ -1,92 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter that breaks up a H.264 or H.265 Video Elementary Stream into NAL units. -// C++ header - -#ifndef _H264_OR_5_VIDEO_STREAM_FRAMER_HH -#define _H264_OR_5_VIDEO_STREAM_FRAMER_HH - -#ifndef _MPEG_VIDEO_STREAM_FRAMER_HH -#include "MPEGVideoStreamFramer.hh" -#endif - -class H264or5VideoStreamFramer: public MPEGVideoStreamFramer { -public: - void getVPSandSPSandPPS(u_int8_t*& vps, unsigned& vpsSize, - u_int8_t*& sps, unsigned& spsSize, - u_int8_t*& pps, unsigned& ppsSize) const { - // Returns pointers to copies of the most recently seen VPS (video parameter set) - // SPS (sequence parameter set) and PPS (picture parameter set) NAL units. - // (NULL pointers are returned if the NAL units have not yet been seen.) - vps = fLastSeenVPS; vpsSize = fLastSeenVPSSize; - sps = fLastSeenSPS; spsSize = fLastSeenSPSSize; - pps = fLastSeenPPS; ppsSize = fLastSeenPPSSize; - } - - void setVPSandSPSandPPS(u_int8_t* vps, unsigned vpsSize, - u_int8_t* sps, unsigned spsSize, - u_int8_t* pps, unsigned ppsSize) { - // Assigns copies of the VPS, SPS and PPS NAL units. If this function is not called, - // then these NAL units are assigned only if/when they appear in the input stream. - saveCopyOfVPS(vps, vpsSize); - saveCopyOfSPS(sps, spsSize); - saveCopyOfPPS(pps, ppsSize); - } - -protected: - H264or5VideoStreamFramer(int hNumber, // 264 or 265 - UsageEnvironment& env, FramedSource* inputSource, - Boolean createParser, - Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters); - // We're an abstract base class. - virtual ~H264or5VideoStreamFramer(); - - void saveCopyOfVPS(u_int8_t* from, unsigned size); - void saveCopyOfSPS(u_int8_t* from, unsigned size); - void saveCopyOfPPS(u_int8_t* from, unsigned size); - - void setPresentationTime(); - - Boolean isVPS(u_int8_t nal_unit_type); - Boolean isSPS(u_int8_t nal_unit_type); - Boolean isPPS(u_int8_t nal_unit_type); - Boolean isVCL(u_int8_t nal_unit_type); - -protected: // redefined virtual functions - virtual void doGetNextFrame(); - -protected: - int fHNumber; - Boolean fIncludeStartCodeInOutput, fInsertAccessUnitDelimiters; - u_int8_t* fLastSeenVPS; - unsigned fLastSeenVPSSize; - u_int8_t* fLastSeenSPS; - unsigned fLastSeenSPSSize; - u_int8_t* fLastSeenPPS; - unsigned fLastSeenPPSSize; - struct timeval fNextPresentationTime; // the presentation time to be used for the next NAL unit to be parsed/delivered after this - friend class H264or5VideoStreamParser; // hack -}; - -// A general routine for making a copy of a (H.264 or H.265) NAL unit, -// removing 'emulation' bytes from the copy: -unsigned removeH264or5EmulationBytes(u_int8_t* to, unsigned toMaxSize, - u_int8_t const* from, unsigned fromSize); - // returns the size of the copy; it will be <= min(toMaxSize,fromSize) - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H265VideoFileServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/H265VideoFileServerMediaSubsession.hh deleted file mode 100644 index e50691af3..000000000 --- a/project/3rdparty/include/live555/liveMedia/H265VideoFileServerMediaSubsession.hh +++ /dev/null @@ -1,61 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from a H265 Elementary Stream video file. -// C++ header - -#ifndef _H265_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH -#define _H265_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH -#include "FileServerMediaSubsession.hh" -#endif - -class H265VideoFileServerMediaSubsession: public FileServerMediaSubsession { -public: - static H265VideoFileServerMediaSubsession* - createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); - - // Used to implement "getAuxSDPLine()": - void checkForAuxSDPLine1(); - void afterPlayingDummy1(); - -protected: - H265VideoFileServerMediaSubsession(UsageEnvironment& env, - char const* fileName, Boolean reuseFirstSource); - // called only by createNew(); - virtual ~H265VideoFileServerMediaSubsession(); - - void setDoneFlag() { fDoneFlag = ~0; } - -protected: // redefined virtual functions - virtual char const* getAuxSDPLine(RTPSink* rtpSink, - FramedSource* inputSource); - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, - unsigned& estBitrate); - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic, - FramedSource* inputSource); - -private: - char* fAuxSDPLine; - char fDoneFlag; // used when setting up "fAuxSDPLine" - RTPSink* fDummyRTPSink; // ditto -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H265VideoFileSink.hh b/project/3rdparty/include/live555/liveMedia/H265VideoFileSink.hh deleted file mode 100644 index 7c87046d1..000000000 --- a/project/3rdparty/include/live555/liveMedia/H265VideoFileSink.hh +++ /dev/null @@ -1,51 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// H.265 Video File Sinks -// C++ header - -#ifndef _H265_VIDEO_FILE_SINK_HH -#define _H265_VIDEO_FILE_SINK_HH - -#ifndef _H264_OR_5_VIDEO_FILE_SINK_HH -#include "H264or5VideoFileSink.hh" -#endif - -class H265VideoFileSink: public H264or5VideoFileSink { -public: - static H265VideoFileSink* createNew(UsageEnvironment& env, char const* fileName, - char const* sPropVPSStr = NULL, - char const* sPropSPSStr = NULL, - char const* sPropPPSStr = NULL, - // The "sProp*Str" parameters are optional 'SDP format' strings - // (comma-separated Base64-encoded) representing VPS, SPS, and/or PPS NAL-units - // to prepend to the output - unsigned bufferSize = 100000, - Boolean oneFilePerFrame = False); - // See "FileSink.hh" for a description of these parameters. - -protected: - H265VideoFileSink(UsageEnvironment& env, FILE* fid, - char const* sPropVPSStr, - char const* sPropSPSStr, - char const* sPropPPSStr, - unsigned bufferSize, char const* perFrameFileNamePrefix); - // called only by createNew() - virtual ~H265VideoFileSink(); -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H265VideoRTPSink.hh b/project/3rdparty/include/live555/liveMedia/H265VideoRTPSink.hh deleted file mode 100644 index 5e1a23f2b..000000000 --- a/project/3rdparty/include/live555/liveMedia/H265VideoRTPSink.hh +++ /dev/null @@ -1,62 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for H.265 video -// C++ header - -#ifndef _H265_VIDEO_RTP_SINK_HH -#define _H265_VIDEO_RTP_SINK_HH - -#ifndef _H264_OR_5_VIDEO_RTP_SINK_HH -#include "H264or5VideoRTPSink.hh" -#endif - -class H265VideoRTPSink: public H264or5VideoRTPSink { -public: - static H265VideoRTPSink* - createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); - static H265VideoRTPSink* - createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat, - u_int8_t const* vps, unsigned vpsSize, - u_int8_t const* sps, unsigned spsSize, - u_int8_t const* pps, unsigned ppsSize); - // an optional variant of "createNew()", useful if we know, in advance, - // the stream's VPS, SPS and PPS NAL units. - // This avoids us having to 'pre-read' from the input source in order to get these values. - static H265VideoRTPSink* - createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat, - char const* sPropVPSStr, char const* sPropSPSStr, char const* sPropPPSStr); - // an optional variant of "createNew()", useful if we know, in advance, - // the stream's VPS, SPS and PPS NAL units. - // This avoids us having to 'pre-read' from the input source in order to get these values. - -protected: - H265VideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat, - u_int8_t const* vps = NULL, unsigned vpsSize = 0, - u_int8_t const* sps = NULL, unsigned spsSize = 0, - u_int8_t const* pps = NULL, unsigned ppsSize = 0); - // called only by createNew() - virtual ~H265VideoRTPSink(); - -protected: // redefined virtual functions: - virtual char const* auxSDPLine(); - -private: // redefined virtual functions: - virtual Boolean sourceIsCompatibleWithUs(MediaSource& source); -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H265VideoRTPSource.hh b/project/3rdparty/include/live555/liveMedia/H265VideoRTPSource.hh deleted file mode 100644 index 25df2a383..000000000 --- a/project/3rdparty/include/live555/liveMedia/H265VideoRTPSource.hh +++ /dev/null @@ -1,67 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// H.265 Video RTP Sources -// C++ header - -#ifndef _H265_VIDEO_RTP_SOURCE_HH -#define _H265_VIDEO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class H265VideoRTPSource: public MultiFramedRTPSource { -public: - static H265VideoRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - Boolean expectDONFields = False, - unsigned rtpTimestampFrequency = 90000); - // "expectDONFields" is True iff we expect incoming H.265/RTP packets to contain - // DONL and DOND fields. I.e., if "tx-mode == "MST" or sprop-depack-buf-nalus > 0". - - u_int64_t currentNALUnitAbsDon() const { return fCurrentNALUnitAbsDon; } - // the 'absolute decoding order number (AbsDon)' for the most-recently delivered NAL unit - -protected: - H265VideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - Boolean expectDONFields, - unsigned rtpTimestampFrequency); - // called only by createNew() - - virtual ~H265VideoRTPSource(); - -protected: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; - -private: - void computeAbsDonFromDON(u_int16_t DON); - -private: - friend class H265BufferedPacket; - Boolean fExpectDONFields; - unsigned char fCurPacketNALUnitType; - u_int16_t fPreviousNALUnitDON; - u_int64_t fCurrentNALUnitAbsDon; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H265VideoStreamDiscreteFramer.hh b/project/3rdparty/include/live555/liveMedia/H265VideoStreamDiscreteFramer.hh deleted file mode 100644 index a1685beb1..000000000 --- a/project/3rdparty/include/live555/liveMedia/H265VideoStreamDiscreteFramer.hh +++ /dev/null @@ -1,48 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A simplified version of "H265VideoStreamFramer" that takes only complete, -// discrete frames (rather than an arbitrary byte stream) as input. -// This avoids the parsing and data copying overhead of the full -// "H265VideoStreamFramer". -// C++ header - -#ifndef _H265_VIDEO_STREAM_DISCRETE_FRAMER_HH -#define _H265_VIDEO_STREAM_DISCRETE_FRAMER_HH - -#ifndef _H264_OR_5_VIDEO_STREAM_DISCRETE_FRAMER_HH -#include "H264or5VideoStreamDiscreteFramer.hh" -#endif - -class H265VideoStreamDiscreteFramer: public H264or5VideoStreamDiscreteFramer { -public: - static H265VideoStreamDiscreteFramer* - createNew(UsageEnvironment& env, FramedSource* inputSource, - Boolean includeStartCodeInOutput = False, Boolean insertAccessUnitDelimiters = False); - -protected: - H265VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource, - Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters); - // called only by createNew() - virtual ~H265VideoStreamDiscreteFramer(); - -private: - // redefined virtual functions: - virtual Boolean isH265VideoStreamFramer() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/H265VideoStreamFramer.hh b/project/3rdparty/include/live555/liveMedia/H265VideoStreamFramer.hh deleted file mode 100644 index 2a64cd07b..000000000 --- a/project/3rdparty/include/live555/liveMedia/H265VideoStreamFramer.hh +++ /dev/null @@ -1,45 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter that breaks up a H.265 Video Elementary Stream into NAL units. -// C++ header - -#ifndef _H265_VIDEO_STREAM_FRAMER_HH -#define _H265_VIDEO_STREAM_FRAMER_HH - -#ifndef _H264_OR_5_VIDEO_STREAM_FRAMER_HH -#include "H264or5VideoStreamFramer.hh" -#endif - -class H265VideoStreamFramer: public H264or5VideoStreamFramer { -public: - static H265VideoStreamFramer* createNew(UsageEnvironment& env, FramedSource* inputSource, - Boolean includeStartCodeInOutput = False, - Boolean insertAccessUnitDelimiters = False); - -protected: - H265VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, - Boolean createParser, - Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters); - // called only by "createNew()" - virtual ~H265VideoStreamFramer(); - - // redefined virtual functions: - virtual Boolean isH265VideoStreamFramer() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/HLSSegmenter.hh b/project/3rdparty/include/live555/liveMedia/HLSSegmenter.hh deleted file mode 100644 index aaa17a640..000000000 --- a/project/3rdparty/include/live555/liveMedia/HLSSegmenter.hh +++ /dev/null @@ -1,76 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A media sink that takes - as input - a MPEG Transport Stream, and outputs a series -// of MPEG Transport Stream files, each representing a segment of the input stream, -// suitable for HLS (Apple's "HTTP Live Streaming"). -// C++ header - -#ifndef _HLS_SEGMENTER_HH -#define _HLS_SEGMENTER_HH - -#ifndef _MEDIA_SINK_HH -#include "MediaSink.hh" -#endif - -class HLSSegmenter: public MediaSink { -public: - typedef void (onEndOfSegmentFunc)(void* clientData, - char const* segmentFileName, double segmentDuration); - static HLSSegmenter* createNew(UsageEnvironment& env, - unsigned segmentationDuration, char const* fileNamePrefix, - onEndOfSegmentFunc* onEndOfSegmentFunc = NULL, - void* onEndOfSegmentClientData = NULL); - -private: - HLSSegmenter(UsageEnvironment& env, unsigned segmentationDuration, char const* fileNamePrefix, - onEndOfSegmentFunc* onEndOfSegmentFunc, void* onEndOfSegmentClientData); - // called only by createNew() - virtual ~HLSSegmenter(); - - static void ourEndOfSegmentHandler(void* clientData, double segmentDuration); - void ourEndOfSegmentHandler(double segmentDuration); - - Boolean openNextOutputSegment(); - - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - virtual void afterGettingFrame(unsigned frameSize, - unsigned numTruncatedBytes); - - static void ourOnSourceClosure(void* clientData); - void ourOnSourceClosure(); - -private: // redefined virtual functions: - virtual Boolean sourceIsCompatibleWithUs(MediaSource& source); - virtual Boolean continuePlaying(); - -private: - unsigned fSegmentationDuration; - char const* fFileNamePrefix; - onEndOfSegmentFunc* fOnEndOfSegmentFunc; - void* fOnEndOfSegmentClientData; - Boolean fHaveConfiguredUpstreamSource; - unsigned fCurrentSegmentCounter; - char* fOutputSegmentFileName; - FILE* fOutFid; - unsigned char* fOutputFileBuffer; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/HMAC_SHA1.hh b/project/3rdparty/include/live555/liveMedia/HMAC_SHA1.hh deleted file mode 100644 index 0830048a4..000000000 --- a/project/3rdparty/include/live555/liveMedia/HMAC_SHA1.hh +++ /dev/null @@ -1,36 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023, Live Networks, Inc. All rights reserved -// -// A function for computing the HMAC_SHA1 digest -// Definition - -#ifndef _HMAC_SHA1_HH -#define _HMAC_SHA1_HH - -#include - -#if defined(CONFIG_LIVE555_OPENSSL) -#ifndef _HMAC_HASH_HH -#include "HMAC_hash.hh" -#endif - -#define SHA1_DIGEST_LEN 20 - -HMAC_hash HMAC_SHA1; -#endif -#endif diff --git a/project/3rdparty/include/live555/liveMedia/HMAC_hash.hh b/project/3rdparty/include/live555/liveMedia/HMAC_hash.hh deleted file mode 100644 index 0a40b2489..000000000 --- a/project/3rdparty/include/live555/liveMedia/HMAC_hash.hh +++ /dev/null @@ -1,37 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023, Live Networks, Inc. All rights reserved -// -// Generic HMA_HASH functions -// Definition - -#ifndef _HMAC_HASH_HH -#define _HMAC_HASH_HH - -#ifndef _NET_COMMON_H -#include "../groupsock/NetCommon.h" -#endif - -// All HMAC hash functions have the following signature: -typedef void HMAC_hash(u_int8_t const* key, unsigned keyLength, - u_int8_t const* text, unsigned textLength, - u_int8_t* resultDigest); - // "resultDigest" must point to an array of sufficient size to hold the digest - -#define HMAC_BLOCK_SIZE 64 - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/InputFile.hh b/project/3rdparty/include/live555/liveMedia/InputFile.hh deleted file mode 100644 index fdf73de42..000000000 --- a/project/3rdparty/include/live555/liveMedia/InputFile.hh +++ /dev/null @@ -1,67 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Common routines for opening/closing named input files -// C++ header - -#ifndef _INPUT_FILE_HH -#define _INPUT_FILE_HH - -#include "../UsageEnvironment/UsageEnvironment.hh" -#include - -#if (defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_WCE)) -#ifndef _WIN32_WCE -// Include header files that might be needed by Windows (in code that uses this header file): -#include -#include -#endif - -#define READ_FROM_FILES_SYNCHRONOUSLY 1 - // Because Windows is a silly toy operating system that doesn't (reliably) treat - // open files as being readable sockets (which can be handled within the default - // "BasicTaskScheduler" event loop, using "select()"), we implement file reading - // in Windows using synchronous, rather than asynchronous, I/O. This can severely - // limit the scalability of servers using this code that run on Windows. - // If this is a problem for you, then either use a better operating system, - // or else write your own Windows-specific event loop ("TaskScheduler" subclass) - // that can handle readable data in Windows open files as an event. -#endif - -#ifndef _WIN32_WCE -#include -#endif - -FILE* OpenInputFile(UsageEnvironment& env, char const* fileName); - -void CloseInputFile(FILE* fid); - -#undef GetFileSize // because some platforms already define this as a macro -u_int64_t GetFileSize(char const* fileName, FILE* fid); - // 0 means zero-length, unbounded, or unknown - -int64_t SeekFile64(FILE *fid, int64_t offset, int whence); - // A platform-independent routine for seeking within (possibly) large files - -int64_t TellFile64(FILE *fid); - // A platform-independent routine for reporting the position within - // (possibly) large files - -Boolean FileIsSeekable(FILE *fid); - // Tests whether "fid" is seekable, by trying to seek within it. - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/JPEG2000VideoRTPSink.hh b/project/3rdparty/include/live555/liveMedia/JPEG2000VideoRTPSink.hh deleted file mode 100644 index 4a3fa00e6..000000000 --- a/project/3rdparty/include/live555/liveMedia/JPEG2000VideoRTPSink.hh +++ /dev/null @@ -1,46 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. - - -#ifndef _JPEG2000_VIDEO_RTP_SINK_HH -#define _JPEG2000_VIDEO_RTP_SINK_HH - -#ifndef _VIDEO_RTP_SINK_HH -#include "VideoRTPSink.hh" -#endif - -class JPEG2000VideoRTPSink: public VideoRTPSink { -public: - static JPEG2000VideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs); - -protected: - JPEG2000VideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs); - // called only by createNew() - - virtual ~JPEG2000VideoRTPSink(); - -private: // redefined virtual functions: - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual unsigned specialHeaderSize() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/JPEG2000VideoRTPSource.hh b/project/3rdparty/include/live555/liveMedia/JPEG2000VideoRTPSource.hh deleted file mode 100644 index aed63d67e..000000000 --- a/project/3rdparty/include/live555/liveMedia/JPEG2000VideoRTPSource.hh +++ /dev/null @@ -1,53 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. - -#ifndef _JPEG2000_VIDEO_RTP_SOURCE_HH -#define _JPEG2000_VIDEO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class JPEG2000VideoRTPSource: public MultiFramedRTPSource { -public: - static JPEG2000VideoRTPSource* createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency, - char const* sampling); - -protected: - virtual ~JPEG2000VideoRTPSource(); - -protected: - JPEG2000VideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency, - char const* sampling); - // called only by createNew() - -private: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; - -private: - char* fSampling; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/JPEGVideoRTPSink.hh b/project/3rdparty/include/live555/liveMedia/JPEGVideoRTPSink.hh deleted file mode 100644 index f602ba091..000000000 --- a/project/3rdparty/include/live555/liveMedia/JPEGVideoRTPSink.hh +++ /dev/null @@ -1,52 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for JPEG video (RFC 2435) -// C++ header - -#ifndef _JPEG_VIDEO_RTP_SINK_HH -#define _JPEG_VIDEO_RTP_SINK_HH - -#ifndef _VIDEO_RTP_SINK_HH -#include "VideoRTPSink.hh" -#endif - -class JPEGVideoRTPSink: public VideoRTPSink { -public: - static JPEGVideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs); - -protected: - JPEGVideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs); - // called only by createNew() - - virtual ~JPEGVideoRTPSink(); - -private: // redefined virtual functions: - virtual Boolean sourceIsCompatibleWithUs(MediaSource& source); - - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual - Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - virtual unsigned specialHeaderSize() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/JPEGVideoRTPSource.hh b/project/3rdparty/include/live555/liveMedia/JPEGVideoRTPSource.hh deleted file mode 100644 index 1bed8769b..000000000 --- a/project/3rdparty/include/live555/liveMedia/JPEGVideoRTPSource.hh +++ /dev/null @@ -1,59 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// JPEG Video (RFC 2435) RTP Sources -// C++ header - -#ifndef _JPEG_VIDEO_RTP_SOURCE_HH -#define _JPEG_VIDEO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -#define MAX_JPEG_HEADER_SIZE 1024 - -class JPEGVideoRTPSource: public MultiFramedRTPSource { -public: - static JPEGVideoRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat = 26, - unsigned rtpPayloadFrequency = 90000, - unsigned defaultWidth = 0, unsigned defaultHeight = 0); - -protected: - virtual ~JPEGVideoRTPSource(); - -private: - JPEGVideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency, - unsigned defaultWidth, unsigned defaultHeight); - // called only by createNew() - - // Image dimensions from the SDP description, if any - unsigned fDefaultWidth, fDefaultHeight; - -private: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - - virtual char const* MIMEtype() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/JPEGVideoSource.hh b/project/3rdparty/include/live555/liveMedia/JPEGVideoSource.hh deleted file mode 100644 index 5bc70f25e..000000000 --- a/project/3rdparty/include/live555/liveMedia/JPEGVideoSource.hh +++ /dev/null @@ -1,55 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// JPEG video sources -// C++ header - -#ifndef _JPEG_VIDEO_SOURCE_HH -#define _JPEG_VIDEO_SOURCE_HH - -#ifndef _FRAMED_SOURCE_HH -#include "FramedSource.hh" -#endif - -class JPEGVideoSource: public FramedSource { -public: - virtual u_int8_t type() = 0; - virtual u_int8_t qFactor() = 0; - virtual u_int8_t width() = 0; // # pixels/8 (or 0 for 2048 pixels) - virtual u_int8_t height() = 0; // # pixels/8 (or 0 for 2048 pixels) - - virtual u_int8_t const* quantizationTables(u_int8_t& precision, - u_int16_t& length); - // If "qFactor()" returns a value >= 128, then this function is called - // to tell us the quantization tables that are being used. - // (The default implementation of this function just returns NULL.) - // "precision" and "length" are as defined in RFC 2435, section 3.1.8. - - virtual u_int16_t restartInterval(); - // If restart intervals are being used (i.e., 64 <= type() <= 127), then this function must be - // redefined - by a subclass - to return a non-zero value. - -protected: - JPEGVideoSource(UsageEnvironment& env); // abstract base class - virtual ~JPEGVideoSource(); - -private: - // redefined virtual functions: - virtual Boolean isJPEGVideoSource() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/Locale.hh b/project/3rdparty/include/live555/liveMedia/Locale.hh deleted file mode 100644 index cbc043dc8..000000000 --- a/project/3rdparty/include/live555/liveMedia/Locale.hh +++ /dev/null @@ -1,75 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Support for temporarily setting the locale (e.g., to "C" or "POSIX") for (e.g.) parsing or printing -// floating-point numbers in protocol headers, or calling toupper()/tolower() on human-input strings. -// C++ header - -#ifndef _LOCALE_HH -#define _LOCALE_HH - -// If you're on a system that (for whatever reason) doesn't have either the "setlocale()" or the "newlocale()" function, then -// add "-DLOCALE_NOT_USED" to your "config.*" file. - -// If you're on a system that (for whatever reason) has "setlocale()" but not "newlocale()", then -// add "-DNEWLOCALE_NOT_USED" to your "config.*" file. -// (Note that -DLOCALE_NOT_USED implies -DNEWLOCALE_NOT_USED; you do not need both.) -// Also, for Windows systems, we define "NEWLOCALE_NOT_USED" by default, because at least some Windows systems -// (or their development environments) don't have "newlocale()". If, however, your Windows system *does* have "newlocale()", -// then you can override this by defining "NEWLOCALE_USED" before #including this file. - -// Finally, some old development environments need a header file "xlocale.h" to use "newlocale()". -// Should you need this header file, add "-DNEED_XLOCALE_H" to your "config.*" file. - -#ifdef NEWLOCALE_USED -#undef LOCALE_NOT_USED -#undef NEWLOCALE_NOT_USED -#else -#if defined(__WIN32__) || defined(_WIN32) -#define NEWLOCALE_NOT_USED 1 -#endif -#endif - -#ifndef LOCALE_NOT_USED -#include -#ifndef NEWLOCALE_NOT_USED -#ifdef NEED_XLOCALE_H -#include -#endif -#endif -#endif - - -enum LocaleCategory { All, Numeric }; // define and implement more categories later, as needed - -class Locale { -public: - Locale(char const* newLocale, LocaleCategory category = All); - virtual ~Locale(); - -private: -#ifndef LOCALE_NOT_USED -#ifndef NEWLOCALE_NOT_USED - locale_t fLocale, fPrevLocale; -#else - int fCategoryNum; - char* fPrevLocale; -#endif -#endif -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MIKEY.hh b/project/3rdparty/include/live555/liveMedia/MIKEY.hh deleted file mode 100644 index 1af8b0400..000000000 --- a/project/3rdparty/include/live555/liveMedia/MIKEY.hh +++ /dev/null @@ -1,75 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A data structure that implements a MIKEY message (RFC 3830) -// C++ header - -#ifndef _MIKEY_HH -#define _MIKEY_HH - -#ifndef _NET_COMMON_H -#include "../groupsock/NetCommon.h" -#endif -#ifndef _BOOLEAN_HH -#include "../UsageEnvironment/Boolean.hh" -#endif - -class MIKEYState { -public: - MIKEYState(Boolean useEncryption = True); // initialize with default parameters - virtual ~MIKEYState(); - - static MIKEYState* createNew(u_int8_t const* messageToParse, unsigned messageSize); - // (Attempts to) parse a binary MIKEY message, returning a new "MIKEYState" if successful - // (or NULL if unsuccessful). - - u_int8_t* generateMessage(unsigned& messageSize) const; - // Returns a binary message representing the current MIKEY state, of size "messageSize" bytes. - // This array is dynamically allocated by this routine, and must be delete[]d by the caller. - - // Accessors for the encryption/authentication parameters: - Boolean encryptSRTP() const { return fEncryptSRTP; } - Boolean encryptSRTCP() const { return fEncryptSRTCP; } - u_int8_t const* keyData() const { return fKeyData; } - u_int32_t MKI() const { return fMKI; } - Boolean useAuthentication() const { return fUseAuthentication; } - -private: - MIKEYState(u_int8_t const* messageToParse, unsigned messageSize, Boolean& parsedOK); - // called only by "createNew()" - - void addNewPayload(class MIKEYPayload* newPayload); - Boolean parseHDRPayload(u_int8_t const*& ptr, u_int8_t const* endPtr, u_int8_t& nextPayloadType); - Boolean parseNonHDRPayload(u_int8_t const*& ptr, u_int8_t const* endPtr, u_int8_t& nextPayloadType); - -private: - // Encryption/authentication parameters, either set by default - // (if the first (parameterless) constructor is used), or set by parsing an input message - // (if the second constructor is used): - Boolean fEncryptSRTP; - Boolean fEncryptSRTCP; - u_int8_t fKeyData[16+14]; // encryption key + salt - u_int32_t fMKI; // used only if encryption is used. (We assume a MKI length of 4.) - Boolean fUseAuthentication; - - // Our internal binary representation of the MIKEY payloads: - class MIKEYPayload* fHeaderPayload; - class MIKEYPayload* fTailPayload; - unsigned fTotalPayloadByteCount; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MP3ADU.hh b/project/3rdparty/include/live555/liveMedia/MP3ADU.hh deleted file mode 100644 index 59b9a0357..000000000 --- a/project/3rdparty/include/live555/liveMedia/MP3ADU.hh +++ /dev/null @@ -1,94 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// 'ADU' MP3 streams (for improved loss-tolerance) -// C++ header - -#ifndef _MP3_ADU_HH -#define _MP3_ADU_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -class ADUFromMP3Source: public FramedFilter { -public: - static ADUFromMP3Source* createNew(UsageEnvironment& env, - FramedSource* inputSource, - Boolean includeADUdescriptors = True); - - void resetInput(); - // This is called whenever there's a discontinuity in the input MP3 source - // (e.g., due to seeking within the source). It causes any still-unprocessed - // MP3 frame data within our queue to be discarded, so that it does not - // erroneously get used by backpointers from the new MP3 frames. - - Boolean setScaleFactor(int scale); - -protected: - ADUFromMP3Source(UsageEnvironment& env, - FramedSource* inputSource, - Boolean includeADUdescriptors); - // called only by createNew() - virtual ~ADUFromMP3Source(); - -private: - // Redefined virtual functions: - virtual void doGetNextFrame(); - virtual char const* MIMEtype() const; - -private: - Boolean doGetNextFrame1(); - -private: - Boolean fAreEnqueueingMP3Frame; - class SegmentQueue* fSegments; - Boolean fIncludeADUdescriptors; - unsigned fTotalDataSizeBeforePreviousRead; - int fScale; - unsigned fFrameCounter; -}; - -class MP3FromADUSource: public FramedFilter { -public: - static MP3FromADUSource* createNew(UsageEnvironment& env, - FramedSource* inputSource, - Boolean includeADUdescriptors = True); - -protected: - MP3FromADUSource(UsageEnvironment& env, - FramedSource* inputSource, - Boolean includeADUdescriptors); - // called only by createNew() - virtual ~MP3FromADUSource(); - -private: - // Redefined virtual functions: - virtual void doGetNextFrame(); - virtual char const* MIMEtype() const; - -private: - Boolean needToGetAnADU(); - void insertDummyADUsIfNecessary(); - Boolean generateFrameFromHeadADU(); - -private: - Boolean fAreEnqueueingADU; - class SegmentQueue* fSegments; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MP3ADURTPSink.hh b/project/3rdparty/include/live555/liveMedia/MP3ADURTPSink.hh deleted file mode 100644 index dcdd6aaf1..000000000 --- a/project/3rdparty/include/live555/liveMedia/MP3ADURTPSink.hh +++ /dev/null @@ -1,55 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for 'ADUized' MP3 frames ("mpa-robust") -// C++ header - -#ifndef _MP3_ADU_RTP_SINK_HH -#define _MP3_ADU_RTP_SINK_HH - -#ifndef _AUDIO_RTP_SINK_HH -#include "AudioRTPSink.hh" -#endif - -class MP3ADURTPSink: public AudioRTPSink { -public: - static MP3ADURTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char RTPPayloadType); - -protected: - virtual ~MP3ADURTPSink(); - -private: - MP3ADURTPSink(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char RTPPayloadType); - // called only by createNew() - - -private: - // Redefined virtual functions: - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual unsigned specialHeaderSize() const; - -private: - unsigned fCurADUSize; // used when fragmenting over multiple RTP packets -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MP3ADURTPSource.hh b/project/3rdparty/include/live555/liveMedia/MP3ADURTPSource.hh deleted file mode 100644 index fdad0b8c7..000000000 --- a/project/3rdparty/include/live555/liveMedia/MP3ADURTPSource.hh +++ /dev/null @@ -1,49 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP source for 'ADUized' MP3 frames ("mpa-robust") -// C++ header - -#ifndef _MP3_ADU_SOURCE_HH -#define _MP3_ADU_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class MP3ADURTPSource: public MultiFramedRTPSource { -public: - static MP3ADURTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency = 90000); - -protected: - virtual ~MP3ADURTPSource(); - -private: - MP3ADURTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - // called only by createNew() - -private: - // redefined virtual functions: - virtual char const* MIMEtype() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MP3ADUTranscoder.hh b/project/3rdparty/include/live555/liveMedia/MP3ADUTranscoder.hh deleted file mode 100644 index 88f16c99c..000000000 --- a/project/3rdparty/include/live555/liveMedia/MP3ADUTranscoder.hh +++ /dev/null @@ -1,64 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Transcoder for ADUized MP3 frames -// C++ header - -#ifndef _MP3_ADU_TRANSCODER_HH -#define _MP3_ADU_TRANSCODER_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -class MP3ADUTranscoder: public FramedFilter { -public: - static MP3ADUTranscoder* createNew(UsageEnvironment& env, - unsigned outBitrate /* in kbps */, - FramedSource* inputSource); - - unsigned outBitrate() const { return fOutBitrate; } -protected: - MP3ADUTranscoder(UsageEnvironment& env, - unsigned outBitrate /* in kbps */, - FramedSource* inputSource); - // called only by createNew() - virtual ~MP3ADUTranscoder(); - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - virtual void getAttributes() const; - -private: - static void afterGettingFrame(void* clientData, - unsigned numBytesRead, unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned numBytesRead, unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - -private: - unsigned fOutBitrate; // in kbps - unsigned fAvailableBytesForBackpointer; - - unsigned char* fOrigADU; - // used to store incoming ADU prior to transcoding -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MP3ADUinterleaving.hh b/project/3rdparty/include/live555/liveMedia/MP3ADUinterleaving.hh deleted file mode 100644 index 9a68feb6d..000000000 --- a/project/3rdparty/include/live555/liveMedia/MP3ADUinterleaving.hh +++ /dev/null @@ -1,129 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Interleaving of MP3 ADUs -// C++ header - -#ifndef _MP3_ADU_INTERLEAVING_HH -#define _MP3_ADU_INTERLEAVING_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -// A data structure used to represent an interleaving -#define MAX_CYCLE_SIZE 256 -class Interleaving { -public: - Interleaving(unsigned cycleSize, unsigned char const* cycleArray); - virtual ~Interleaving(); - - unsigned cycleSize() const {return fCycleSize;} - unsigned char lookupInverseCycle(unsigned char index) const { - return fInverseCycle[index]; - } - -private: - unsigned fCycleSize; - unsigned char fInverseCycle[MAX_CYCLE_SIZE]; -}; - -// This class is used only as a base for the following two: - -class MP3ADUinterleaverBase: public FramedFilter { -protected: - MP3ADUinterleaverBase(UsageEnvironment& env, - FramedSource* inputSource); - // abstract base class - virtual ~MP3ADUinterleaverBase(); - - static FramedSource* getInputSource(UsageEnvironment& env, - char const* inputSourceName); - static void afterGettingFrame(void* clientData, - unsigned numBytesRead, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - virtual void afterGettingFrame(unsigned numBytesRead, - struct timeval presentationTime, - unsigned durationInMicroseconds) = 0; -}; - -// This class is used to convert an ADU sequence from non-interleaved -// to interleaved form: - -class MP3ADUinterleaver: public MP3ADUinterleaverBase { -public: - static MP3ADUinterleaver* createNew(UsageEnvironment& env, - Interleaving const& interleaving, - FramedSource* inputSource); - -protected: - MP3ADUinterleaver(UsageEnvironment& env, - Interleaving const& interleaving, - FramedSource* inputSource); - // called only by createNew() - virtual ~MP3ADUinterleaver(); - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - virtual void afterGettingFrame(unsigned numBytesRead, - struct timeval presentationTime, - unsigned durationInMicroseconds); - -private: - void releaseOutgoingFrame(); - -private: - Interleaving const fInterleaving; - class InterleavingFrames* fFrames; - unsigned char fPositionOfNextIncomingFrame; - unsigned fII, fICC; -}; - -// This class is used to convert an ADU sequence from interleaved -// to non-interleaved form: - -class MP3ADUdeinterleaver: public MP3ADUinterleaverBase { -public: - static MP3ADUdeinterleaver* createNew(UsageEnvironment& env, - FramedSource* inputSource); - -protected: - MP3ADUdeinterleaver(UsageEnvironment& env, - FramedSource* inputSource); - // called only by createNew() - virtual ~MP3ADUdeinterleaver(); - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - virtual void afterGettingFrame(unsigned numBytesRead, - struct timeval presentationTime, - unsigned durationInMicroseconds); - -private: - void releaseOutgoingFrame(); - -private: - class DeinterleavingFrames* fFrames; - unsigned fIIlastSeen, fICClastSeen; -}; - -#endif - diff --git a/project/3rdparty/include/live555/liveMedia/MP3AudioFileServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/MP3AudioFileServerMediaSubsession.hh deleted file mode 100644 index 5ed5d1135..000000000 --- a/project/3rdparty/include/live555/liveMedia/MP3AudioFileServerMediaSubsession.hh +++ /dev/null @@ -1,73 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from an MP3 audio file. -// (Actually, any MPEG-1 or MPEG-2 audio file should work.) -// C++ header - -#ifndef _MP3_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH -#define _MP3_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH -#include "FileServerMediaSubsession.hh" -#endif -#ifndef _MP3_ADU_INTERLEAVING_HH -#include "MP3ADUinterleaving.hh" -#endif -#ifndef _MP3_ADU_HH -#include "MP3ADU.hh" -#endif - -class MP3AudioFileServerMediaSubsession: public FileServerMediaSubsession{ -public: - static MP3AudioFileServerMediaSubsession* - createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource, - Boolean generateADUs, Interleaving* interleaving); - // Note: "interleaving" is used only if "generateADUs" is True, - // (and a value of NULL means 'no interleaving') - -protected: - MP3AudioFileServerMediaSubsession(UsageEnvironment& env, - char const* fileName, Boolean reuseFirstSource, - Boolean generateADUs, - Interleaving* interleaving); - // called only by createNew(); - virtual ~MP3AudioFileServerMediaSubsession(); - - FramedSource* createNewStreamSourceCommon(FramedSource* baseMP3Source, unsigned mp3NumBytes, unsigned& estBitrate); - void getBaseStreams(FramedSource* frontStream, - FramedSource*& sourceMP3Stream, ADUFromMP3Source*& aduStream/*if any*/); - -protected: // redefined virtual functions - virtual void seekStreamSource(FramedSource* inputSource, double& seekNPT, double streamDuration, u_int64_t& numBytes); - virtual void setStreamSourceScale(FramedSource* inputSource, float scale); - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, - unsigned& estBitrate); - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic, - FramedSource* inputSource); - virtual void testScaleFactor(float& scale); - virtual float duration() const; - -protected: - Boolean fGenerateADUs; - Interleaving* fInterleaving; - float fFileDuration; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MP3FileSource.hh b/project/3rdparty/include/live555/liveMedia/MP3FileSource.hh deleted file mode 100644 index 0af803102..000000000 --- a/project/3rdparty/include/live555/liveMedia/MP3FileSource.hh +++ /dev/null @@ -1,71 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// MP3 File Sources -// C++ header - -#ifndef _MP3_FILE_SOURCE_HH -#define _MP3_FILE_SOURCE_HH - -#ifndef _FRAMED_FILE_SOURCE_HH -#include "FramedFileSource.hh" -#endif - -class MP3StreamState; // forward - -class MP3FileSource: public FramedFileSource { -public: - static MP3FileSource* createNew(UsageEnvironment& env, char const* fileName); - - float filePlayTime() const; - unsigned fileSize() const; - void setPresentationTimeScale(unsigned scale); - void seekWithinFile(double seekNPT, double streamDuration); - // if "streamDuration" is >0.0, then we limit the stream to that duration, before treating it as EOF - -protected: - MP3FileSource(UsageEnvironment& env, FILE* fid); - // called only by createNew() - - virtual ~MP3FileSource(); - -protected: - void assignStream(FILE* fid, unsigned filesize); - Boolean initializeStream(); - - MP3StreamState* streamState() {return fStreamState;} - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - virtual char const* MIMEtype() const; - virtual void getAttributes() const; - -private: - static void fileReadableHandler(MP3FileSource* source, int mask); - -private: - MP3StreamState* fStreamState; - Boolean fFidIsSeekable; - Boolean fHaveStartedReading; - unsigned fHaveBeenInitialized; - struct timeval fFirstFramePresentationTime; // set on stream init - Boolean fLimitNumBytesToStream; - unsigned fNumBytesToStream; // used iff "fLimitNumBytesToStream" is True -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MP3Transcoder.hh b/project/3rdparty/include/live555/liveMedia/MP3Transcoder.hh deleted file mode 100644 index 188629b03..000000000 --- a/project/3rdparty/include/live555/liveMedia/MP3Transcoder.hh +++ /dev/null @@ -1,44 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// MP3 Transcoder -// C++ header - -#ifndef _MP3_TRANSCODER_HH -#define _MP3_TRANSCODER_HH - -#ifndef _MP3_ADU_HH -#include "MP3ADU.hh" -#endif -#ifndef _MP3_ADU_TRANSCODER_HH -#include "MP3ADUTranscoder.hh" -#endif - -class MP3Transcoder: public MP3FromADUSource { -public: - static MP3Transcoder* createNew(UsageEnvironment& env, - unsigned outBitrate /* in kbps */, - FramedSource* inputSource); - -protected: - MP3Transcoder(UsageEnvironment& env, - MP3ADUTranscoder* aduTranscoder); - // called only by createNew() - virtual ~MP3Transcoder(); -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG1or2AudioRTPSink.hh b/project/3rdparty/include/live555/liveMedia/MPEG1or2AudioRTPSink.hh deleted file mode 100644 index f2d77960e..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG1or2AudioRTPSink.hh +++ /dev/null @@ -1,48 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for MPEG audio (RFC 2250) -// C++ header - -#ifndef _MPEG_1OR2_AUDIO_RTP_SINK_HH -#define _MPEG_1OR2_AUDIO_RTP_SINK_HH - -#ifndef _AUDIO_RTP_SINK_HH -#include "AudioRTPSink.hh" -#endif - -class MPEG1or2AudioRTPSink: public AudioRTPSink { -public: - static MPEG1or2AudioRTPSink* createNew(UsageEnvironment& env, - Groupsock* RTPgs); - -protected: - MPEG1or2AudioRTPSink(UsageEnvironment& env, Groupsock* RTPgs); - // called only by createNew() - - virtual ~MPEG1or2AudioRTPSink(); - -private: // redefined virtual functions: - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual unsigned specialHeaderSize() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG1or2AudioRTPSource.hh b/project/3rdparty/include/live555/liveMedia/MPEG1or2AudioRTPSource.hh deleted file mode 100644 index a7da51d42..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG1or2AudioRTPSource.hh +++ /dev/null @@ -1,51 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// MPEG-1 or MPEG-2 Audio RTP Sources -// C++ header - -#ifndef _MPEG_1OR2_AUDIO_RTP_SOURCE_HH -#define _MPEG_1OR2_AUDIO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class MPEG1or2AudioRTPSource: public MultiFramedRTPSource { -public: - static MPEG1or2AudioRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat = 14, - unsigned rtpTimestampFrequency = 90000); - -protected: - virtual ~MPEG1or2AudioRTPSource(); - -private: - MPEG1or2AudioRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - // called only by createNew() - -private: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG1or2AudioStreamFramer.hh b/project/3rdparty/include/live555/liveMedia/MPEG1or2AudioStreamFramer.hh deleted file mode 100644 index 6b06378a3..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG1or2AudioStreamFramer.hh +++ /dev/null @@ -1,70 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter that breaks up an MPEG (1,2) audio elementary stream into frames -// C++ header - -#ifndef _MPEG_1OR2_AUDIO_STREAM_FRAMER_HH -#define _MPEG_1OR2_AUDIO_STREAM_FRAMER_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -class MPEG1or2AudioStreamFramer: public FramedFilter { -public: - static MPEG1or2AudioStreamFramer* - createNew(UsageEnvironment& env, FramedSource* inputSource, - Boolean syncWithInputSource = False); - // If "syncWithInputSource" is True, the stream's presentation time - // will be reset to that of the input source, whenever new data - // is read from it. - - void flushInput(); // called if there is a discontinuity (seeking) in the input - -private: - MPEG1or2AudioStreamFramer(UsageEnvironment& env, FramedSource* inputSource, - Boolean syncWithInputSource); - // called only by createNew() - virtual ~MPEG1or2AudioStreamFramer(); - - static void continueReadProcessing(void* clientData, - unsigned char* ptr, unsigned size, - struct timeval presentationTime); - void continueReadProcessing(); - - void resetPresentationTime(struct timeval newPresentationTime); - // useful if we're being synced with a separate (e.g., video) stream - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - -private: - void reset(); - struct timeval currentFramePlayTime() const; - -private: - Boolean fSyncWithInputSource; - struct timeval fNextFramePresentationTime; - -private: // parsing state - class MPEG1or2AudioStreamParser* fParser; - friend class MPEG1or2AudioStreamParser; // hack -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG1or2Demux.hh b/project/3rdparty/include/live555/liveMedia/MPEG1or2Demux.hh deleted file mode 100644 index 8b1e9f1bc..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG1or2Demux.hh +++ /dev/null @@ -1,158 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Demultiplexer for a MPEG 1 or 2 Program Stream -// C++ header - -#ifndef _MPEG_1OR2_DEMUX_HH -#define _MPEG_1OR2_DEMUX_HH - -#ifndef _FRAMED_SOURCE_HH -#include "FramedSource.hh" -#endif - -class MPEG1or2DemuxedElementaryStream; // forward - -typedef void MPEG1or2DemuxOnDeletionFunc(void* objectToNotify, class MPEG1or2Demux* demuxBeingDeleted); - -class MPEG1or2Demux: public Medium { -public: - static MPEG1or2Demux* createNew(UsageEnvironment& env, - FramedSource* inputSource, - Boolean reclaimWhenLastESDies = False, - MPEG1or2DemuxOnDeletionFunc* onDeletionFunc = NULL, - void* objectToNotify = NULL); - // If "reclaimWhenLastESDies" is True, the the demux is deleted when - // all "MPEG1or2DemuxedElementaryStream"s that we created get deleted. - - MPEG1or2DemuxedElementaryStream* newElementaryStream(u_int8_t streamIdTag); - - // Specialized versions of the above for audio and video: - MPEG1or2DemuxedElementaryStream* newAudioStream(); - MPEG1or2DemuxedElementaryStream* newVideoStream(); - - // A hack for getting raw, undemuxed PES packets from the Program Stream: - MPEG1or2DemuxedElementaryStream* newRawPESStream(); - - void getNextFrame(u_int8_t streamIdTag, - unsigned char* to, unsigned maxSize, - FramedSource::afterGettingFunc* afterGettingFunc, - void* afterGettingClientData, - FramedSource::onCloseFunc* onCloseFunc, - void* onCloseClientData); - // similar to FramedSource::getNextFrame(), except that it also - // takes a stream id tag as parameter. - - void stopGettingFrames(u_int8_t streamIdTag); - // similar to FramedSource::stopGettingFrames(), except that it also - // takes a stream id tag as parameter. - - static void handleClosure(void* clientData); - // This should be called (on ourself) if the source is discovered - // to be closed (i.e., no longer readable) - - FramedSource* inputSource() const { return fInputSource; } - - class SCR { - public: - SCR(); - - u_int8_t highBit; - u_int32_t remainingBits; - u_int16_t extension; - - Boolean isValid; - }; - SCR& lastSeenSCR() { return fLastSeenSCR; } - - unsigned char mpegVersion() const { return fMPEGversion; } - - void flushInput(); // should be called before any 'seek' on the underlying source - -private: - MPEG1or2Demux(UsageEnvironment& env, - FramedSource* inputSource, Boolean reclaimWhenLastESDies, - MPEG1or2DemuxOnDeletionFunc* onDeletionFunc, void* objectToNotify); - // called only by createNew() - virtual ~MPEG1or2Demux(); - - void registerReadInterest(u_int8_t streamIdTag, - unsigned char* to, unsigned maxSize, - FramedSource::afterGettingFunc* afterGettingFunc, - void* afterGettingClientData, - FramedSource::onCloseFunc* onCloseFunc, - void* onCloseClientData); - - Boolean useSavedData(u_int8_t streamIdTag, - unsigned char* to, unsigned maxSize, - FramedSource::afterGettingFunc* afterGettingFunc, - void* afterGettingClientData); - - static void continueReadProcessing(void* clientData, - unsigned char* ptr, unsigned size, - struct timeval presentationTime); - void continueReadProcessing(); - -private: - friend class MPEG1or2DemuxedElementaryStream; - void noteElementaryStreamDeletion(MPEG1or2DemuxedElementaryStream* es); - -private: - FramedSource* fInputSource; - SCR fLastSeenSCR; - unsigned char fMPEGversion; - - unsigned char fNextAudioStreamNumber; - unsigned char fNextVideoStreamNumber; - Boolean fReclaimWhenLastESDies; - unsigned fNumOutstandingESs; - - // A descriptor for each possible stream id tag: - typedef struct OutputDescriptor { - // input parameters - unsigned char* to; unsigned maxSize; - FramedSource::afterGettingFunc* fAfterGettingFunc; - void* afterGettingClientData; - FramedSource::onCloseFunc* fOnCloseFunc; - void* onCloseClientData; - - // output parameters - unsigned frameSize; struct timeval presentationTime; - class SavedData; // forward - SavedData* savedDataHead; - SavedData* savedDataTail; - unsigned savedDataTotalSize; - - // status parameters - Boolean isPotentiallyReadable; - Boolean isCurrentlyActive; - Boolean isCurrentlyAwaitingData; - } OutputDescriptor_t; - OutputDescriptor_t fOutput[256]; - - unsigned fNumPendingReads; - Boolean fHaveUndeliveredData; - - MPEG1or2DemuxOnDeletionFunc* fOnDeletionFunc; - void* fOnDeletionObjectToNotify; - -private: // parsing state - class MPEGProgramStreamParser* fParser; - friend class MPEGProgramStreamParser; // hack -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG1or2DemuxedElementaryStream.hh b/project/3rdparty/include/live555/liveMedia/MPEG1or2DemuxedElementaryStream.hh deleted file mode 100644 index e55e999a9..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG1or2DemuxedElementaryStream.hh +++ /dev/null @@ -1,69 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A MPEG 1 or 2 Elementary Stream, demultiplexed from a Program Stream -// C++ header - -#ifndef _MPEG_1OR2_DEMUXED_ELEMENTARY_STREAM_HH -#define _MPEG_1OR2_DEMUXED_ELEMENTARY_STREAM_HH - -#ifndef _MPEG_1OR2_DEMUX_HH -#include "MPEG1or2Demux.hh" -#endif - -class MPEG1or2DemuxedElementaryStream: public FramedSource { -public: - MPEG1or2Demux::SCR lastSeenSCR() const { return fLastSeenSCR; } - - unsigned char mpegVersion() const { return fMPEGversion; } - - MPEG1or2Demux& sourceDemux() const { return fOurSourceDemux; } - -private: // We are created only by a MPEG1or2Demux (a friend) - MPEG1or2DemuxedElementaryStream(UsageEnvironment& env, - u_int8_t streamIdTag, - MPEG1or2Demux& sourceDemux); - virtual ~MPEG1or2DemuxedElementaryStream(); - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - virtual void doStopGettingFrames(); - virtual char const* MIMEtype() const; - virtual unsigned maxFrameSize() const; - -private: - static void afterGettingFrame(void* clientData, - unsigned frameSize, unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - - void afterGettingFrame1(unsigned frameSize, unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - -private: - u_int8_t fOurStreamIdTag; - MPEG1or2Demux& fOurSourceDemux; - char const* fMIMEtype; - MPEG1or2Demux::SCR fLastSeenSCR; - unsigned char fMPEGversion; - - friend class MPEG1or2Demux; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG1or2DemuxedServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/MPEG1or2DemuxedServerMediaSubsession.hh deleted file mode 100644 index cab197cc8..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG1or2DemuxedServerMediaSubsession.hh +++ /dev/null @@ -1,63 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from a MPEG-1 or 2 demuxer. -// C++ header - -#ifndef _MPEG_1OR2_DEMUXED_SERVER_MEDIA_SUBSESSION_HH -#define _MPEG_1OR2_DEMUXED_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _ON_DEMAND_SERVER_MEDIA_SUBSESSION_HH -#include "OnDemandServerMediaSubsession.hh" -#endif -#ifndef _MPEG_1OR2_FILE_SERVER_DEMUX_HH -#include "MPEG1or2FileServerDemux.hh" -#endif - -class MPEG1or2DemuxedServerMediaSubsession: public OnDemandServerMediaSubsession{ -public: - static MPEG1or2DemuxedServerMediaSubsession* - createNew(MPEG1or2FileServerDemux& demux, u_int8_t streamIdTag, - Boolean reuseFirstSource, - Boolean iFramesOnly = False, double vshPeriod = 5.0); - // The last two parameters are relevant for video streams only - -private: - MPEG1or2DemuxedServerMediaSubsession(MPEG1or2FileServerDemux& demux, - u_int8_t streamIdTag, Boolean reuseFirstSource, - Boolean iFramesOnly, double vshPeriod); - // called only by createNew(); - virtual ~MPEG1or2DemuxedServerMediaSubsession(); - -private: // redefined virtual functions - virtual void seekStreamSource(FramedSource* inputSource, double& seekNPT, double streamDuration, u_int64_t& numBytes); - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, - unsigned& estBitrate); - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic, - FramedSource* inputSource); - virtual float duration() const; - -private: - MPEG1or2FileServerDemux& fOurDemux; - u_int8_t fStreamIdTag; - Boolean fIFramesOnly; // for video streams - double fVSHPeriod; // for video streams -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG1or2FileServerDemux.hh b/project/3rdparty/include/live555/liveMedia/MPEG1or2FileServerDemux.hh deleted file mode 100644 index 331b4cfae..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG1or2FileServerDemux.hh +++ /dev/null @@ -1,70 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A server demultiplexer for a MPEG 1 or 2 Program Stream -// C++ header - -#ifndef _MPEG_1OR2_FILE_SERVER_DEMUX_HH -#define _MPEG_1OR2_FILE_SERVER_DEMUX_HH - -#ifndef _SERVER_MEDIA_SESSION_HH -#include "ServerMediaSession.hh" -#endif -#ifndef _MPEG_1OR2_DEMUXED_ELEMENTARY_STREAM_HH -#include "MPEG1or2DemuxedElementaryStream.hh" -#endif - -class MPEG1or2FileServerDemux: public Medium { -public: - static MPEG1or2FileServerDemux* - createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); - - ServerMediaSubsession* newAudioServerMediaSubsession(); // MPEG-1 or 2 audio - ServerMediaSubsession* newVideoServerMediaSubsession(Boolean iFramesOnly = False, - double vshPeriod = 5.0 - /* how often (in seconds) to inject a Video_Sequence_Header, - if one doesn't already appear in the stream */); - ServerMediaSubsession* newAC3AudioServerMediaSubsession(); // AC-3 audio (from VOB) - - unsigned fileSize() const { return fFileSize; } - float fileDuration() const { return fFileDuration; } - -private: - MPEG1or2FileServerDemux(UsageEnvironment& env, char const* fileName, - Boolean reuseFirstSource); - // called only by createNew(); - virtual ~MPEG1or2FileServerDemux(); - -private: - friend class MPEG1or2DemuxedServerMediaSubsession; - MPEG1or2DemuxedElementaryStream* newElementaryStream(unsigned clientSessionId, - u_int8_t streamIdTag); - - static void onDemuxDeletion(void* clientData, MPEG1or2Demux* demuxBeingDeleted); - void onDemuxDeletion(MPEG1or2Demux* demuxBeingDeleted); - -private: - char const* fFileName; - unsigned fFileSize; - float fFileDuration; - Boolean fReuseFirstSource; - MPEG1or2Demux* fSession0Demux; - MPEG1or2Demux* fLastCreatedDemux; - unsigned fLastClientSessionId; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoFileServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoFileServerMediaSubsession.hh deleted file mode 100644 index 33d86595b..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoFileServerMediaSubsession.hh +++ /dev/null @@ -1,59 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from a MPEG-1 or 2 Elementary Stream video file. -// C++ header - -#ifndef _MPEG_1OR2_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH -#define _MPEG_1OR2_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH -#include "FileServerMediaSubsession.hh" -#endif - -class MPEG1or2VideoFileServerMediaSubsession: public FileServerMediaSubsession{ -public: - static MPEG1or2VideoFileServerMediaSubsession* - createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource, - Boolean iFramesOnly = False, - double vshPeriod = 5.0 - /* how often (in seconds) to inject a Video_Sequence_Header, - if one doesn't already appear in the stream */); - -private: - MPEG1or2VideoFileServerMediaSubsession(UsageEnvironment& env, - char const* fileName, - Boolean reuseFirstSource, - Boolean iFramesOnly, - double vshPeriod); - // called only by createNew(); - virtual ~MPEG1or2VideoFileServerMediaSubsession(); - -private: // redefined virtual functions - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, - unsigned& estBitrate); - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic, - FramedSource* inputSource); - -private: - Boolean fIFramesOnly; - double fVSHPeriod; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoRTPSink.hh b/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoRTPSink.hh deleted file mode 100644 index be025901d..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoRTPSink.hh +++ /dev/null @@ -1,69 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for MPEG video (RFC 2250) -// C++ header - -#ifndef _MPEG_1OR2_VIDEO_RTP_SINK_HH -#define _MPEG_1OR2_VIDEO_RTP_SINK_HH - -#ifndef _VIDEO_RTP_SINK_HH -#include "VideoRTPSink.hh" -#endif - -class MPEG1or2VideoRTPSink: public VideoRTPSink { -public: - static MPEG1or2VideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs); - -protected: - MPEG1or2VideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs); - // called only by createNew() - - virtual ~MPEG1or2VideoRTPSink(); - -private: // redefined virtual functions: - virtual Boolean sourceIsCompatibleWithUs(MediaSource& source); - - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual Boolean allowFragmentationAfterStart() const; - virtual - Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - virtual unsigned specialHeaderSize() const; - -private: - // MPEG video-specific state, used to decide how to fill out the - // video-specific header, and when to include multiple 'frames' in a - // single outgoing RTP packet. Eventually we should somehow get this - // state from the source (MPEG1or2VideoStreamFramer) instead, as the source - // already has this info itself. - struct { - unsigned temporal_reference; - unsigned char picture_coding_type; - unsigned char vector_code_bits; // FBV,BFC,FFV,FFC from RFC 2250, sec. 3.4 - } fPictureState; - Boolean fPreviousFrameWasSlice; - // used to implement frameCanAppearAfterPacketStart() - Boolean fSequenceHeaderPresent; - Boolean fPacketBeginsSlice, fPacketEndsSlice; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoRTPSource.hh b/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoRTPSource.hh deleted file mode 100644 index ee6f9103d..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoRTPSource.hh +++ /dev/null @@ -1,53 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// MPEG-1 or MPEG-2 Video RTP Sources -// C++ header - -#ifndef _MPEG_1OR2_VIDEO_RTP_SOURCE_HH -#define _MPEG_1OR2_VIDEO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class MPEG1or2VideoRTPSource: public MultiFramedRTPSource { -public: - static MPEG1or2VideoRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat = 32, - unsigned rtpPayloadFrequency = 90000); - -protected: - virtual ~MPEG1or2VideoRTPSource(); - -private: - MPEG1or2VideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - // called only by createNew() - -private: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual Boolean packetIsUsableInJitterCalculation(unsigned char* packet, - unsigned packetSize); - virtual char const* MIMEtype() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoStreamDiscreteFramer.hh b/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoStreamDiscreteFramer.hh deleted file mode 100644 index 6a76fc39c..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoStreamDiscreteFramer.hh +++ /dev/null @@ -1,76 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A simplified version of "MPEG1or2VideoStreamFramer" that takes only -// complete, discrete frames (rather than an arbitrary byte stream) as input. -// This avoids the parsing and data copying overhead of the full -// "MPEG1or2VideoStreamFramer". -// C++ header - -#ifndef _MPEG1or2_VIDEO_STREAM_DISCRETE_FRAMER_HH -#define _MPEG1or2_VIDEO_STREAM_DISCRETE_FRAMER_HH - -#ifndef _MPEG1or2_VIDEO_STREAM_FRAMER_HH -#include "MPEG1or2VideoStreamFramer.hh" -#endif - -#define VSH_MAX_SIZE 1000 - -class MPEG1or2VideoStreamDiscreteFramer: public MPEG1or2VideoStreamFramer { -public: - static MPEG1or2VideoStreamDiscreteFramer* - createNew(UsageEnvironment& env, FramedSource* inputSource, - Boolean iFramesOnly = False, // see MPEG1or2VideoStreamFramer.hh - double vshPeriod = 5.0, // see MPEG1or2VideoStreamFramer.hh - Boolean leavePresentationTimesUnmodified = False); - -protected: - MPEG1or2VideoStreamDiscreteFramer(UsageEnvironment& env, - FramedSource* inputSource, - Boolean iFramesOnly, double vshPeriod, Boolean leavePresentationTimesUnmodified); - // called only by createNew() - virtual ~MPEG1or2VideoStreamDiscreteFramer(); - -protected: - // redefined virtual functions: - virtual void doGetNextFrame(); - -protected: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - -protected: - Boolean fLeavePresentationTimesUnmodified; - struct timeval fLastNonBFramePresentationTime; - unsigned fLastNonBFrameTemporal_reference; - - // A saved copy of the most recently seen 'video_sequence_header', - // in case we need to insert it into the stream periodically: - unsigned char fSavedVSHBuffer[VSH_MAX_SIZE]; - unsigned fSavedVSHSize; - double fSavedVSHTimestamp; - Boolean fIFramesOnly; - double fVSHPeriod; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoStreamFramer.hh b/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoStreamFramer.hh deleted file mode 100644 index 4c13ecf63..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG1or2VideoStreamFramer.hh +++ /dev/null @@ -1,56 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter that breaks up an MPEG 1 or 2 video elementary stream into -// frames for: Video_Sequence_Header, GOP_Header, Picture_Header -// C++ header - -#ifndef _MPEG_1OR2_VIDEO_STREAM_FRAMER_HH -#define _MPEG_1OR2_VIDEO_STREAM_FRAMER_HH - -#ifndef _MPEG_VIDEO_STREAM_FRAMER_HH -#include "MPEGVideoStreamFramer.hh" -#endif - -class MPEG1or2VideoStreamFramer: public MPEGVideoStreamFramer { -public: - static MPEG1or2VideoStreamFramer* - createNew(UsageEnvironment& env, FramedSource* inputSource, - Boolean iFramesOnly = False, - double vshPeriod = 5.0 - /* how often (in seconds) to inject a Video_Sequence_Header, - if one doesn't already appear in the stream */); - -protected: - MPEG1or2VideoStreamFramer(UsageEnvironment& env, - FramedSource* inputSource, - Boolean iFramesOnly, double vshPeriod, - Boolean createParser = True); - // called only by createNew(), or by subclass constructors - virtual ~MPEG1or2VideoStreamFramer(); - -private: - // redefined virtual functions: - virtual Boolean isMPEG1or2VideoStreamFramer() const; - -private: - double getCurrentPTS() const; - - friend class MPEG1or2VideoStreamParser; // hack -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG2IndexFromTransportStream.hh b/project/3rdparty/include/live555/liveMedia/MPEG2IndexFromTransportStream.hh deleted file mode 100644 index 9f72d318c..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG2IndexFromTransportStream.hh +++ /dev/null @@ -1,95 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter that produces a sequence of I-frame indices from a MPEG-2 Transport Stream -// C++ header - -#ifndef _MPEG2_IFRAME_INDEX_FROM_TRANSPORT_STREAM_HH -#define _MPEG2_IFRAME_INDEX_FROM_TRANSPORT_STREAM_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -#ifndef TRANSPORT_PACKET_SIZE -#define TRANSPORT_PACKET_SIZE 188 -#endif - -#ifndef MAX_PES_PACKET_SIZE -#define MAX_PES_PACKET_SIZE 65536 -#endif - -class IndexRecord; // forward - -class MPEG2IFrameIndexFromTransportStream: public FramedFilter { -public: - static MPEG2IFrameIndexFromTransportStream* - createNew(UsageEnvironment& env, FramedSource* inputSource); - -protected: - MPEG2IFrameIndexFromTransportStream(UsageEnvironment& env, - FramedSource* inputSource); - // called only by createNew() - virtual ~MPEG2IFrameIndexFromTransportStream(); - -private: - // Redefined virtual functions: - virtual void doGetNextFrame(); - -private: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - - static void handleInputClosure(void* clientData); - void handleInputClosure1(); - - void analyzePAT(unsigned char* pkt, unsigned size); - void analyzePMT(unsigned char* pkt, unsigned size); - - Boolean deliverIndexRecord(); - Boolean parseFrame(); - Boolean parseToNextCode(unsigned char& nextCode); - void compactParseBuffer(); - void addToTail(IndexRecord* newIndexRecord); - -private: - Boolean fIsH264; // True iff the video is H.264 (encapsulated in a Transport Stream) - Boolean fIsH265; // True iff the video is H.265 (encapsulated in a Transport Stream) - unsigned long fInputTransportPacketCounter; - unsigned fClosureNumber; - u_int8_t fLastContinuityCounter; - float fFirstPCR, fLastPCR; - Boolean fHaveSeenFirstPCR; - u_int16_t fPMT_PID, fVideo_PID; - // Note: We assume: 1 program per Transport Stream; 1 video stream per program - unsigned char fInputBuffer[TRANSPORT_PACKET_SIZE]; - unsigned char* fParseBuffer; - unsigned fParseBufferSize; - unsigned fParseBufferFrameStart; - unsigned fParseBufferParseEnd; - unsigned fParseBufferDataEnd; - IndexRecord* fHeadIndexRecord; - IndexRecord* fTailIndexRecord; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG2TransportFileServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/MPEG2TransportFileServerMediaSubsession.hh deleted file mode 100644 index 376248cea..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG2TransportFileServerMediaSubsession.hh +++ /dev/null @@ -1,131 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from a MPEG-2 Transport Stream file. -// C++ header - -#ifndef _MPEG2_TRANSPORT_FILE_SERVER_MEDIA_SUBSESSION_HH -#define _MPEG2_TRANSPORT_FILE_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH -#include "FileServerMediaSubsession.hh" -#endif -#ifndef _MPEG2_TRANSPORT_STREAM_FRAMER_HH -#include "MPEG2TransportStreamFramer.hh" -#endif -#ifndef _BYTE_STREAM_FILE_SOURCE_HH -#include "ByteStreamFileSource.hh" -#endif -#ifndef _MPEG2_TRANSPORT_STREAM_TRICK_MODE_FILTER_HH -#include "MPEG2TransportStreamTrickModeFilter.hh" -#endif -#ifndef _MPEG2_TRANSPORT_STREAM_FROM_ES_SOURCE_HH -#include "MPEG2TransportStreamFromESSource.hh" -#endif - -class ClientTrickPlayState; // forward - -class MPEG2TransportFileServerMediaSubsession: public FileServerMediaSubsession { -public: - static MPEG2TransportFileServerMediaSubsession* - createNew(UsageEnvironment& env, - char const* dataFileName, char const* indexFileName, - Boolean reuseFirstSource); - -protected: - MPEG2TransportFileServerMediaSubsession(UsageEnvironment& env, - char const* fileName, - MPEG2TransportStreamIndexFile* indexFile, - Boolean reuseFirstSource); - // called only by createNew(); - virtual ~MPEG2TransportFileServerMediaSubsession(); - - virtual ClientTrickPlayState* newClientTrickPlayState(); - -private: // redefined virtual functions - // Note that because - to implement 'trick play' operations - we're operating on - // more than just the input source, we reimplement some functions that are - // already implemented in "OnDemandServerMediaSubsession", rather than - // reimplementing "seekStreamSource()" and "setStreamSourceScale()": - virtual void startStream(unsigned clientSessionId, void* streamToken, - TaskFunc* rtcpRRHandler, - void* rtcpRRHandlerClientData, - unsigned short& rtpSeqNum, - unsigned& rtpTimestamp, - ServerRequestAlternativeByteHandler* serverRequestAlternativeByteHandler, - void* serverRequestAlternativeByteHandlerClientData); - virtual void pauseStream(unsigned clientSessionId, void* streamToken); - virtual void seekStream(unsigned clientSessionId, void* streamToken, double& seekNPT, double streamDuration, u_int64_t& numBytes); - virtual void setStreamScale(unsigned clientSessionId, void* streamToken, float scale); - virtual void deleteStream(unsigned clientSessionId, void*& streamToken); - - // The virtual functions that are usually implemented by "ServerMediaSubsession"s: - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, - unsigned& estBitrate); - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic, - FramedSource* inputSource); - - virtual void testScaleFactor(float& scale); - virtual float duration() const; - -private: - ClientTrickPlayState* lookupClient(unsigned clientSessionId); - -private: - MPEG2TransportStreamIndexFile* fIndexFile; - float fDuration; - HashTable* fClientSessionHashTable; // indexed by client session id -}; - - -// This class encapsulates the 'trick play' state for each current client (for -// a given "MPEG2TransportFileServerMediaSubsession" - i.e., Transport Stream file). -// It is used only within the implementation of "MPEG2TransportFileServerMediaSubsession", but is included here, -// in case subclasses of "MPEG2TransportFileServerMediaSubsession" want to use it. - -class ClientTrickPlayState { -public: - ClientTrickPlayState(MPEG2TransportStreamIndexFile* indexFile); - - // Functions to bring "fNPT", "fTSRecordNum" and "fIxRecordNum" in sync: - unsigned long updateStateFromNPT(double npt, double seekDuration); - void updateStateOnScaleChange(); - void updateStateOnPlayChange(Boolean reverseToPreviousVSH); - - void handleStreamDeletion(); - void setSource(MPEG2TransportStreamFramer* framer); - - void setNextScale(float nextScale) { fNextScale = nextScale; } - Boolean areChangingScale() const { return fNextScale != fScale; } - -protected: - void updateTSRecordNum(); - void reseekOriginalTransportStreamSource(); - -protected: - MPEG2TransportStreamIndexFile* fIndexFile; - ByteStreamFileSource* fOriginalTransportStreamSource; - MPEG2TransportStreamTrickModeFilter* fTrickModeFilter; - MPEG2TransportStreamFromESSource* fTrickPlaySource; - MPEG2TransportStreamFramer* fFramer; - float fScale, fNextScale, fNPT; - unsigned long fTSRecordNum, fIxRecordNum; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamAccumulator.hh b/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamAccumulator.hh deleted file mode 100644 index 692161f5a..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamAccumulator.hh +++ /dev/null @@ -1,60 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Collects a stream of incoming MPEG Transport Stream packets into -// a chunk sufficiently large to send in a single outgoing (RTP or UDP) packet. -// C++ header - -#ifndef _MPEG2_TRANSPORT_STREAM_ACCUMULATOR_HH -#define _MPEG2_TRANSPORT_STREAM_ACCUMULATOR_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -class MPEG2TransportStreamAccumulator: public FramedFilter { -public: - static MPEG2TransportStreamAccumulator* createNew(UsageEnvironment& env, - FramedSource* inputSource, - unsigned maxPacketSize = 1456); - -protected: - MPEG2TransportStreamAccumulator(UsageEnvironment& env, - FramedSource* inputSource, unsigned maxPacketSize); - // called only by createNew() - virtual ~MPEG2TransportStreamAccumulator(); - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - -private: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - -private: - unsigned const fDesiredPacketSize; - unsigned fNumBytesGathered; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamDemux.hh b/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamDemux.hh deleted file mode 100644 index dcc03104f..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamDemux.hh +++ /dev/null @@ -1,50 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Demultiplexer for a MPEG Transport Stream -// C++ header - -#ifndef _MPEG2_TRANSPORT_STREAM_DEMUX_HH -#define _MPEG2_TRANSPORT_STREAM_DEMUX_HH - -#ifndef _FRAMED_SOURCE_HH -#include "FramedSource.hh" -#endif - -class MPEG2TransportStreamDemux: public Medium { -public: - static MPEG2TransportStreamDemux* createNew(UsageEnvironment& env, - FramedSource* inputSource, - FramedSource::onCloseFunc* onCloseFunc, - void* onCloseClientData); - -private: - MPEG2TransportStreamDemux(UsageEnvironment& env, FramedSource* inputSource, - FramedSource::onCloseFunc* onCloseFunc, void* onCloseClientData); - // called only by createNew() - virtual ~MPEG2TransportStreamDemux(); - - static void handleEndOfFile(void* clientData); - void handleEndOfFile(); - -private: - class MPEG2TransportStreamParser* fParser; - FramedSource::onCloseFunc* fOnCloseFunc; - void* fOnCloseClientData; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamFramer.hh b/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamFramer.hh deleted file mode 100644 index b971bcb30..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamFramer.hh +++ /dev/null @@ -1,78 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter that passes through (unchanged) chunks that contain an integral number -// of MPEG-2 Transport Stream packets, but returning (in "fDurationInMicroseconds") -// an updated estimate of the time gap between chunks. -// C++ header - -#ifndef _MPEG2_TRANSPORT_STREAM_FRAMER_HH -#define _MPEG2_TRANSPORT_STREAM_FRAMER_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -#ifndef _HASH_TABLE_HH -#include "../UsageEnvironment/HashTable.hh" -#endif - -class MPEG2TransportStreamFramer: public FramedFilter { -public: - static MPEG2TransportStreamFramer* - createNew(UsageEnvironment& env, FramedSource* inputSource); - - u_int64_t tsPacketCount() const { return fTSPacketCount; } - - void changeInputSource(FramedSource* newInputSource) { fInputSource = newInputSource; } - - void clearPIDStatusTable(); - void setNumTSPacketsToStream(unsigned long numTSRecordsToStream); - void setPCRLimit(float pcrLimit); - -protected: - MPEG2TransportStreamFramer(UsageEnvironment& env, FramedSource* inputSource); - // called only by createNew() - virtual ~MPEG2TransportStreamFramer(); - -private: - // Redefined virtual functions: - virtual void doGetNextFrame(); - virtual void doStopGettingFrames(); - -private: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, - struct timeval presentationTime); - - Boolean updateTSPacketDurationEstimate(unsigned char* pkt, double timeNow); - -private: - u_int64_t fTSPacketCount; - double fTSPacketDurationEstimate; - HashTable* fPIDStatusTable; - u_int64_t fTSPCRCount; - Boolean fLimitNumTSPacketsToStream; - unsigned long fNumTSPacketsToStream; // used iff "fLimitNumTSPacketsToStream" is True - Boolean fLimitTSPacketsToStreamByPCR; - float fPCRLimit; // used iff "fLimitTSPacketsToStreamByPCR" is True -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamFromESSource.hh b/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamFromESSource.hh deleted file mode 100644 index 71322b3ae..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamFromESSource.hh +++ /dev/null @@ -1,66 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter for converting one or more MPEG Elementary Streams -// to a MPEG-2 Transport Stream -// C++ header - -#ifndef _MPEG2_TRANSPORT_STREAM_FROM_ES_SOURCE_HH -#define _MPEG2_TRANSPORT_STREAM_FROM_ES_SOURCE_HH - -#ifndef _MPEG2_TRANSPORT_STREAM_MULTIPLEXOR_HH -#include "MPEG2TransportStreamMultiplexor.hh" -#endif - -class MPEG2TransportStreamFromESSource: public MPEG2TransportStreamMultiplexor { -public: - static MPEG2TransportStreamFromESSource* createNew(UsageEnvironment& env); - - void addNewVideoSource(FramedSource* inputSource, int mpegVersion, int16_t PID = -1); - // Note: For MPEG-4 video, set "mpegVersion" to 4; for H.264 video, set "mpegVersion" to 5; - // for H.265 video, set "mpegVersion" to 6 - void addNewAudioSource(FramedSource* inputSource, int mpegVersion, int16_t PID = -1); - // Note: For Opus audio, set "mpegVersion" to 3 - - // Note: In these functions, if "PID" is not -1, then it (currently, just the low 8 bits) - // is used as the stream's PID. Otherwise (if "PID" is -1) the 'stream_id' is used as - // the PID. - - static unsigned maxInputESFrameSize; - -protected: - MPEG2TransportStreamFromESSource(UsageEnvironment& env); - // called only by createNew() - virtual ~MPEG2TransportStreamFromESSource(); - - void addNewInputSource(FramedSource* inputSource, - u_int8_t streamId, int mpegVersion, int16_t PID = -1); - // used to implement addNew*Source() above - -private: - // Redefined virtual functions: - virtual void doStopGettingFrames(); - virtual void awaitNewBuffer(unsigned char* oldBuffer); - -private: - friend class InputESSourceRecord; - class InputESSourceRecord* fInputSources; - unsigned fVideoSourceCounter, fAudioSourceCounter; - Boolean fAwaitingBackgroundDelivery; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamFromPESSource.hh b/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamFromPESSource.hh deleted file mode 100644 index 9b7231755..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamFromPESSource.hh +++ /dev/null @@ -1,62 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter for converting a stream of MPEG PES packets to a MPEG-2 Transport Stream -// C++ header - -#ifndef _MPEG2_TRANSPORT_STREAM_FROM_PES_SOURCE_HH -#define _MPEG2_TRANSPORT_STREAM_FROM_PES_SOURCE_HH - -#ifndef _MPEG2_TRANSPORT_STREAM_MULTIPLEXOR_HH -#include "MPEG2TransportStreamMultiplexor.hh" -#endif -#ifndef _MPEG_1OR2_DEMUXED_ELEMENTARY_STREAM_HH -#include "MPEG1or2DemuxedElementaryStream.hh" -#endif - -class MPEG2TransportStreamFromPESSource: public MPEG2TransportStreamMultiplexor { -public: - static MPEG2TransportStreamFromPESSource* - createNew(UsageEnvironment& env, MPEG1or2DemuxedElementaryStream* inputSource); - -protected: - MPEG2TransportStreamFromPESSource(UsageEnvironment& env, - MPEG1or2DemuxedElementaryStream* inputSource); - // called only by createNew() - virtual ~MPEG2TransportStreamFromPESSource(); - -private: - // Redefined virtual functions: - virtual void doStopGettingFrames(); - virtual void awaitNewBuffer(unsigned char* oldBuffer); - -private: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - -private: - MPEG1or2DemuxedElementaryStream* fInputSource; - unsigned char* fInputBuffer; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamIndexFile.hh b/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamIndexFile.hh deleted file mode 100644 index 8676d8034..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamIndexFile.hh +++ /dev/null @@ -1,96 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A class that encapsulates MPEG-2 Transport Stream 'index files'/ -// These index files are used to implement 'trick play' operations -// (seek-by-time, fast forward, reverse play) on Transport Stream files. -// -// C++ header - -#ifndef _MPEG2_TRANSPORT_STREAM_INDEX_FILE_HH -#define _MPEG2_TRANSPORT_STREAM_INDEX_FILE_HH - -#ifndef _MEDIA_HH -#include "Media.hh" -#endif - -#define INDEX_RECORD_SIZE 11 - -class MPEG2TransportStreamIndexFile: public Medium { -public: - static MPEG2TransportStreamIndexFile* createNew(UsageEnvironment& env, - char const* indexFileName); - - virtual ~MPEG2TransportStreamIndexFile(); - - // Functions that map between a playing time and a Transport packet number - // in the original Transport Stream file: - - void lookupTSPacketNumFromNPT(float& npt, unsigned long& tsPacketNumber, - unsigned long& indexRecordNumber); - // Looks up the Transport Stream Packet number corresponding to "npt". - // (This may modify "npt" to a more exact value.) - // (We also return the index record number that we looked up.) - - void lookupPCRFromTSPacketNum(unsigned long& tsPacketNumber, Boolean reverseToPreviousCleanPoint, - float& pcr, unsigned long& indexRecordNumber); - // Looks up the PCR timestamp for the transport packet "tsPacketNumber". - // (Adjust "tsPacketNumber" only if "reverseToPreviousCleanPoint" is True.) - // (We also return the index record number that we looked up.) - - // Miscellaneous functions used to implement 'trick play': - Boolean readIndexRecordValues(unsigned long indexRecordNum, - unsigned long& transportPacketNum, u_int8_t& offset, - u_int8_t& size, float& pcr, u_int8_t& recordType); - float getPlayingDuration(); - void stopReading() { closeFid(); } - - int mpegVersion(); - // returns the best guess for the version of MPEG being used for data within the underlying Transport Stream file. - // (1,2,4, or 5 (representing H.264). 0 means 'don't know' (usually because the index file is empty)) - -private: - MPEG2TransportStreamIndexFile(UsageEnvironment& env, char const* indexFileName); - - Boolean openFid(); - Boolean seekToIndexRecord(unsigned long indexRecordNumber); - Boolean readIndexRecord(unsigned long indexRecordNum); // into "fBuf" - Boolean readOneIndexRecord(unsigned long indexRecordNum); // closes "fFid" at end - void closeFid(); - - u_int8_t recordTypeFromBuf() { return fBuf[0]; } - u_int8_t offsetFromBuf() { return fBuf[1]; } - u_int8_t sizeFromBuf() { return fBuf[2]; } - float pcrFromBuf(); // after "fBuf" has been read - unsigned long tsPacketNumFromBuf(); - void setMPEGVersionFromRecordType(u_int8_t recordType); - - Boolean rewindToCleanPoint(unsigned long&ixFound); - // used to implement "lookupTSPacketNumber()" - -private: - char* fFileName; - FILE* fFid; // used internally when reading from the file - int fMPEGVersion; - unsigned long fCurrentIndexRecordNum; // within "fFid" - float fCachedPCR; - unsigned long fCachedTSPacketNumber, fCachedIndexRecordNumber; - unsigned long fNumIndexRecords; - unsigned char fBuf[INDEX_RECORD_SIZE]; // used for reading index records from file -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamMultiplexor.hh b/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamMultiplexor.hh deleted file mode 100644 index 52549632d..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamMultiplexor.hh +++ /dev/null @@ -1,120 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A class for generating MPEG-2 Transport Stream from one or more input -// Elementary Stream data sources -// C++ header - -#ifndef _MPEG2_TRANSPORT_STREAM_MULTIPLEXOR_HH -#define _MPEG2_TRANSPORT_STREAM_MULTIPLEXOR_HH - -#ifndef _FRAMED_SOURCE_HH -#include "FramedSource.hh" -#endif -#ifndef _MPEG_1OR2_DEMUX_HH -#include "MPEG1or2Demux.hh" // for SCR -#endif - -#define PID_TABLE_SIZE 0x2000 // 2^13 - -class MPEG2TransportStreamMultiplexor: public FramedSource { -public: - typedef void (onEndOfSegmentFunc)(void* clientData, double segmentDuration); - void setTimedSegmentation(unsigned segmentationDuration, - onEndOfSegmentFunc* onEndOfSegmentFunc = NULL, - void* onEndOfSegmentClientData = NULL); - // Specifies that PAT and PMT packets should be output every "segmentationDuration" seconds. - // (If "segmentationDuration" is 0 (the default value), then PAT and PMT packets are output - // at a preset frequency.) - // The optional function "onEndOfSegmentFunc" is called after each segment is output. - double currentSegmentDuration() const { return fCurrentSegmentDuration; } - // Valid only if "setTimedSegmentation()" was previously called with "segmentationDuration" > 0 - - Boolean canDeliverNewFrameImmediately() const { return fInputBufferBytesUsed < fInputBufferSize; } - // Can be used by a downstream reader to test whether the next call to "doGetNextFrame()" - // will deliver data immediately). - -protected: - MPEG2TransportStreamMultiplexor(UsageEnvironment& env); - virtual ~MPEG2TransportStreamMultiplexor(); - - virtual void awaitNewBuffer(unsigned char* oldBuffer) = 0; - // implemented by subclasses - - void handleNewBuffer(unsigned char* buffer, unsigned bufferSize, - int mpegVersion, MPEG1or2Demux::SCR scr, int16_t PID = -1); - // called by "awaitNewBuffer()" - // Note: For MPEG-4 video, set "mpegVersion" to 4; for H.264 video, set "mpegVersion" to 5; - // for H.265 video, set "mpegVersion" to 6. - // For Opus audio, set "mpegVersion" to 3. - // The buffer is assumed to be a PES packet, with a proper PES header. - // If "PID" is not -1, then it (currently, only the low 8 bits) is used as the stream's PID, - // otherwise the "stream_id" in the PES header is reused to be the stream's PID. - -private: - // Redefined virtual functions: - virtual Boolean isMPEG2TransportStreamMultiplexor() const; - virtual void doGetNextFrame(); - -private: - void deliverDataToClient(u_int16_t pid, unsigned char* buffer, unsigned bufferSize, - unsigned& startPositionInBuffer); - - void deliverPATPacket(); - void deliverPMTPacket(Boolean hasChanged); - - void setProgramStreamMap(unsigned frameSize); - -protected: - Boolean fHaveVideoStreams; - -private: - unsigned fOutgoingPacketCounter; - unsigned fProgramMapVersion; - u_int8_t fPreviousInputProgramMapVersion, fCurrentInputProgramMapVersion; - // These two fields are used if we see "program_stream_map"s in the input. - struct { - unsigned counter; - u_int8_t streamType; // for use in Program Maps - } fPIDState[PID_TABLE_SIZE]; - u_int16_t fPCR_PID, fCurrentPID; // only the low 13 bits are used - MPEG1or2Demux::SCR fPCR; - unsigned char* fInputBuffer; - unsigned fInputBufferSize, fInputBufferBytesUsed; - Boolean fIsFirstAdaptationField; - unsigned fSegmentationDuration; - // if nonzero, this is the number of seconds between successive 'segments'. Each 'segment' - // begins with a PAT, followed by a PMT. - // if zero (the default value), then the frequency of PATs and PMTs depends on the constants - // PAT_PERIOD_IF_UNTIMED and PMT_PERIOD_IF_UNTIMED, defined in the .cpp file. - Boolean segmentationIsTimed() const { return fSegmentationDuration > 0; } - u_int8_t fSegmentationIndication; - // used only if fSegmentationDuration > 0: - // 1 if a segment has just ended and the next packet is to be a PAT - // 2 if a segment has just ended and the following PAT has been sent; a PMT is next - // 0 otherwise - double fCurrentSegmentDuration, fPreviousPTS; // used only if fSegmentationDuration > 0 - onEndOfSegmentFunc* fOnEndOfSegmentFunc; // used only if fSegmentationDuration > 0 - void* fOnEndOfSegmentClientData; // ditto -}; - - -// The CRC calculation function that Transport Streams use. We make this function public -// here in case it's useful elsewhere: -u_int32_t calculateCRC(u_int8_t const* data, unsigned dataLength, u_int32_t initialValue = 0xFFFFFFFF); - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamTrickModeFilter.hh b/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamTrickModeFilter.hh deleted file mode 100644 index 883403d81..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG2TransportStreamTrickModeFilter.hh +++ /dev/null @@ -1,99 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved.// A filter that converts a MPEG Transport Stream file - with corresponding index file -// - to a corresponding Video Elementary Stream. It also uses a "scale" parameter -// to implement 'trick mode' (fast forward or reverse play, using I-frames) on -// the video stream. -// C++ header - -#ifndef _MPEG2_TRANSPORT_STREAM_TRICK_MODE_FILTER_HH -#define _MPEG2_TRANSPORT_STREAM_TRICK_MODE_FILTER_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -#ifndef _MPEG2_TRANSPORT_STREAM_INDEX_FILE_HH -#include "MPEG2TransportStreamIndexFile.hh" -#endif - -#ifndef TRANSPORT_PACKET_SIZE -#define TRANSPORT_PACKET_SIZE 188 -#endif - -class MPEG2TransportStreamTrickModeFilter: public FramedFilter { -public: - static MPEG2TransportStreamTrickModeFilter* - createNew(UsageEnvironment& env, FramedSource* inputSource, - MPEG2TransportStreamIndexFile* indexFile, int scale); - - Boolean seekTo(unsigned long tsPacketNumber, unsigned long indexRecordNumber); - - unsigned long nextIndexRecordNum() const { return fNextIndexRecordNum; } - - void forgetInputSource() { fInputSource = NULL; } - // this lets us delete this without also deleting the input Transport Stream - -protected: - MPEG2TransportStreamTrickModeFilter(UsageEnvironment& env, FramedSource* inputSource, - MPEG2TransportStreamIndexFile* indexFile, int scale); - // called only by createNew() - virtual ~MPEG2TransportStreamTrickModeFilter(); - -private: - // Redefined virtual functions: - virtual void doGetNextFrame(); - virtual void doStopGettingFrames(); - -private: - void attemptDeliveryToClient(); - void seekToTransportPacket(unsigned long tsPacketNum); - void readTransportPacket(unsigned long tsPacketNum); // asynchronously - - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize); - - static void onSourceClosure(void* clientData); - void onSourceClosure1(); - -private: - Boolean fHaveStarted; - MPEG2TransportStreamIndexFile* fIndexFile; - int fScale; // absolute value - int fDirection; // 1 => forward; -1 => reverse - enum { - SKIPPING_FRAME, - DELIVERING_SAVED_FRAME, - SAVING_AND_DELIVERING_FRAME - } fState; - unsigned fFrameCount; - unsigned long fNextIndexRecordNum; // next to be read from the index file - unsigned long fNextTSPacketNum; // next to be read from the transport stream file - unsigned char fInputBuffer[TRANSPORT_PACKET_SIZE]; - unsigned long fCurrentTSPacketNum; // corresponding to data currently in the buffer - unsigned long fDesiredTSPacketNum; - u_int8_t fDesiredDataOffset, fDesiredDataSize; - float fDesiredDataPCR, fFirstPCR; - unsigned long fSavedFrameIndexRecordStart; - unsigned long fSavedSequentialIndexRecordNum; - Boolean fUseSavedFrameNextTime; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG2TransportUDPServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/MPEG2TransportUDPServerMediaSubsession.hh deleted file mode 100644 index 8bb64aef7..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG2TransportUDPServerMediaSubsession.hh +++ /dev/null @@ -1,55 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from an incoming UDP (or RTP/UDP) MPEG-2 Transport Stream -// C++ header - -#ifndef _MPEG2_TRANSPORT_UDP_SERVER_MEDIA_SUBSESSION_HH -#define _MPEG2_TRANSPORT_UDP_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _ON_DEMAND_SERVER_MEDIA_SUBSESSION_HH -#include "OnDemandServerMediaSubsession.hh" -#endif - -class MPEG2TransportUDPServerMediaSubsession: public OnDemandServerMediaSubsession { -public: - static MPEG2TransportUDPServerMediaSubsession* - createNew(UsageEnvironment& env, - char const* inputAddressStr, // An IP multicast address, or use "0.0.0.0" or NULL for unicast input - Port const& inputPort, - Boolean inputStreamIsRawUDP = False); // otherwise (default) the input stream is RTP/UDP -protected: - MPEG2TransportUDPServerMediaSubsession(UsageEnvironment& env, - char const* inputAddressStr, Port const& inputPort, Boolean inputStreamIsRawUDP); - // called only by createNew(); - virtual ~MPEG2TransportUDPServerMediaSubsession(); - -protected: // redefined virtual functions - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, - unsigned& estBitrate); - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic, - FramedSource* inputSource); -protected: - char const* fInputAddressStr; - Port fInputPort; - Groupsock* fInputGroupsock; - Boolean fInputStreamIsRawUDP; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG4ESVideoRTPSink.hh b/project/3rdparty/include/live555/liveMedia/MPEG4ESVideoRTPSink.hh deleted file mode 100644 index 62cec934d..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG4ESVideoRTPSink.hh +++ /dev/null @@ -1,72 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for MPEG-4 Elementary Stream video (RFC 3016) -// C++ header - -#ifndef _MPEG4ES_VIDEO_RTP_SINK_HH -#define _MPEG4ES_VIDEO_RTP_SINK_HH - -#ifndef _VIDEO_RTP_SINK_HH -#include "VideoRTPSink.hh" -#endif - -class MPEG4ESVideoRTPSink: public VideoRTPSink { -public: - static MPEG4ESVideoRTPSink* createNew(UsageEnvironment& env, - Groupsock* RTPgs, unsigned char rtpPayloadFormat, - u_int32_t rtpTimestampFrequency = 90000); - static MPEG4ESVideoRTPSink* createNew(UsageEnvironment& env, - Groupsock* RTPgs, unsigned char rtpPayloadFormat, u_int32_t rtpTimestampFrequency, - u_int8_t profileAndLevelIndication, char const* configStr); - // an optional variant of "createNew()", useful if we know, in advance, the stream's 'configuration' info. - - -protected: - MPEG4ESVideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat, u_int32_t rtpTimestampFrequency, - u_int8_t profileAndLevelIndication = 0, char const* configStr = NULL); - // called only by createNew() - - virtual ~MPEG4ESVideoRTPSink(); - -protected: // redefined virtual functions: - virtual Boolean sourceIsCompatibleWithUs(MediaSource& source); - - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual Boolean allowFragmentationAfterStart() const; - virtual Boolean - frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - - virtual char const* auxSDPLine(); - -protected: - Boolean fVOPIsPresent; - -private: - u_int8_t fProfileAndLevelIndication; - unsigned char* fConfigBytes; - unsigned fNumConfigBytes; - - char* fFmtpSDPLine; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG4ESVideoRTPSource.hh b/project/3rdparty/include/live555/liveMedia/MPEG4ESVideoRTPSource.hh deleted file mode 100644 index e3b938996..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG4ESVideoRTPSource.hh +++ /dev/null @@ -1,51 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// MP4V-ES video RTP stream sources -// C++ header - -#ifndef _MPEG4_ES_VIDEO_RTP_SOURCE_HH -#define _MPEG4_ES_VIDEO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class MPEG4ESVideoRTPSource: public MultiFramedRTPSource { -public: - static MPEG4ESVideoRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - -protected: - virtual ~MPEG4ESVideoRTPSource(); - -private: - MPEG4ESVideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - // called only by createNew() - -private: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG4GenericRTPSink.hh b/project/3rdparty/include/live555/liveMedia/MPEG4GenericRTPSink.hh deleted file mode 100644 index 7f49b9855..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG4GenericRTPSink.hh +++ /dev/null @@ -1,70 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// MPEG4-GENERIC ("audio", "video", or "application") RTP stream sinks -// C++ header - -#ifndef _MPEG4_GENERIC_RTP_SINK_HH -#define _MPEG4_GENERIC_RTP_SINK_HH - -#ifndef _MULTI_FRAMED_RTP_SINK_HH -#include "MultiFramedRTPSink.hh" -#endif - -class MPEG4GenericRTPSink: public MultiFramedRTPSink { -public: - static MPEG4GenericRTPSink* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - u_int8_t rtpPayloadFormat, u_int32_t rtpTimestampFrequency, - char const* sdpMediaTypeString, char const* mpeg4Mode, - char const* configString, - unsigned numChannels = 1); - -protected: - MPEG4GenericRTPSink(UsageEnvironment& env, Groupsock* RTPgs, - u_int8_t rtpPayloadFormat, - u_int32_t rtpTimestampFrequency, - char const* sdpMediaTypeString, - char const* mpeg4Mode, char const* configString, - unsigned numChannels); - // called only by createNew() - - virtual ~MPEG4GenericRTPSink(); - -private: // redefined virtual functions: - virtual - Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual unsigned specialHeaderSize() const; - - virtual char const* sdpMediaType() const; - - virtual char const* auxSDPLine(); // for the "a=fmtp:" SDP line - -private: - char const* fSDPMediaTypeString; - char const* fMPEG4Mode; - char const* fConfigString; - char* fFmtpSDPLine; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG4GenericRTPSource.hh b/project/3rdparty/include/live555/liveMedia/MPEG4GenericRTPSource.hh deleted file mode 100644 index 2e6e5d4e8..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG4GenericRTPSource.hh +++ /dev/null @@ -1,78 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// MPEG4-GENERIC ("audio", "video", or "application") RTP stream sources -// C++ header - -#ifndef _MPEG4_GENERIC_RTP_SOURCE_HH -#define _MPEG4_GENERIC_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class MPEG4GenericRTPSource: public MultiFramedRTPSource { -public: - static MPEG4GenericRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency, - char const* mediumName, - char const* mode, unsigned sizeLength, unsigned indexLength, - unsigned indexDeltaLength - // add other parameters later - ); - // mediumName is "audio", "video", or "application" - // it *cannot* be NULL - -protected: - MPEG4GenericRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency, - char const* mediumName, - char const* mode, - unsigned sizeLength, unsigned indexLength, - unsigned indexDeltaLength - ); - // called only by createNew(), or by subclass constructors - virtual ~MPEG4GenericRTPSource(); - -protected: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; - -private: - char* fMIMEType; - - char* fMode; - unsigned fSizeLength, fIndexLength, fIndexDeltaLength; - unsigned fNumAUHeaders; // in the most recently read packet - unsigned fNextAUHeader; // index of the next AU Header to read - struct AUHeader* fAUHeaders; - - friend class MPEG4GenericBufferedPacket; -}; - - - -// A function that looks up the sampling frequency from an -// "AudioSpecificConfig" string. (0 means 'unknown') -unsigned samplingFrequencyFromAudioSpecificConfig(char const* configStr); - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG4LATMAudioRTPSink.hh b/project/3rdparty/include/live555/liveMedia/MPEG4LATMAudioRTPSink.hh deleted file mode 100644 index f6d9ace5b..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG4LATMAudioRTPSink.hh +++ /dev/null @@ -1,69 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for MPEG-4 audio, using LATM multiplexing (RFC 3016) -// (Note that the initial 'size' field is assumed to be present at the start of -// each frame.) -// C++ header - -#ifndef _MPEG4_LATM_AUDIO_RTP_SINK_HH -#define _MPEG4_LATM_AUDIO_RTP_SINK_HH - -#ifndef _AUDIO_RTP_SINK_HH -#include "AudioRTPSink.hh" -#endif - -class MPEG4LATMAudioRTPSink: public AudioRTPSink { -public: - static MPEG4LATMAudioRTPSink* createNew(UsageEnvironment& env, - Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - u_int32_t rtpTimestampFrequency, - char const* streamMuxConfigString, - unsigned numChannels, - Boolean allowMultipleFramesPerPacket = False); - -protected: - MPEG4LATMAudioRTPSink(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - u_int32_t rtpTimestampFrequency, - char const* streamMuxConfigString, - unsigned numChannels, - Boolean allowMultipleFramesPerPacket); - // called only by createNew() - - virtual ~MPEG4LATMAudioRTPSink(); - -private: // redefined virtual functions: - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual Boolean - frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - - virtual char const* auxSDPLine(); // for the "a=fmtp:" SDP line - -private: - char const* fStreamMuxConfigString; - char* fFmtpSDPLine; - Boolean fAllowMultipleFramesPerPacket; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG4LATMAudioRTPSource.hh b/project/3rdparty/include/live555/liveMedia/MPEG4LATMAudioRTPSource.hh deleted file mode 100644 index 319812fae..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG4LATMAudioRTPSource.hh +++ /dev/null @@ -1,101 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// MPEG-4 audio, using LATM multiplexing -// C++ header - -#ifndef _MPEG4_LATM_AUDIO_RTP_SOURCE_HH -#define _MPEG4_LATM_AUDIO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class MPEG4LATMAudioRTPSource: public MultiFramedRTPSource { -public: - static MPEG4LATMAudioRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - - // By default, the LATM data length field is included at the beginning of each - // returned frame. To omit this field, call the following: - void omitLATMDataLengthField(); - - Boolean returnedFrameIncludesLATMDataLengthField() const { return fIncludeLATMDataLengthField; } - -protected: - virtual ~MPEG4LATMAudioRTPSource(); - -private: - MPEG4LATMAudioRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - // called only by createNew() - -private: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; - -private: - Boolean fIncludeLATMDataLengthField; -}; - - -// A utility for parsing a "StreamMuxConfig" string -Boolean -parseStreamMuxConfigStr(char const* configStr, - // result parameters: - Boolean& audioMuxVersion, - Boolean& allStreamsSameTimeFraming, - unsigned char& numSubFrames, - unsigned char& numProgram, - unsigned char& numLayer, - unsigned char*& audioSpecificConfig, - unsigned& audioSpecificConfigSize); - // Parses "configStr" as a sequence of hexadecimal digits, representing - // a "StreamMuxConfig" (as defined in ISO.IEC 14496-3, table 1.21). - // Returns, in "audioSpecificConfig", a binary representation of - // the enclosed "AudioSpecificConfig" structure (of size - // "audioSpecificConfigSize" bytes). The memory for this is allocated - // dynamically by this function; the caller is responsible for - // freeing it. Other values, that precede "AudioSpecificConfig", - // are returned in the other parameters. - // Returns True iff the parsing succeeds. - // IMPORTANT NOTE: The implementation of this function currently assumes - // that everything after the first "numLayer" field is an - // "AudioSpecificConfig". Therefore, it will not work properly if - // "audioMuxVersion" != 0, "numProgram" > 0, or "numLayer" > 0. - // Also, any 'other data' or CRC info will be included at - // the end of "audioSpecificConfig". - -unsigned char* parseStreamMuxConfigStr(char const* configStr, - // result parameter: - unsigned& audioSpecificConfigSize); - // A variant of the above that returns just the "AudioSpecificConfig" data - // (or NULL) if the parsing failed, without bothering with the other - // result parameters. - -unsigned char* parseGeneralConfigStr(char const* configStr, - // result parameter: - unsigned& configSize); - // A routine that parses an arbitrary config string, returning - // the result in binary form. - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG4VideoFileServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/MPEG4VideoFileServerMediaSubsession.hh deleted file mode 100644 index 15cda5c29..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG4VideoFileServerMediaSubsession.hh +++ /dev/null @@ -1,61 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from a MPEG-4 video file. -// C++ header - -#ifndef _MPEG4_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH -#define _MPEG4_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH -#include "FileServerMediaSubsession.hh" -#endif - -class MPEG4VideoFileServerMediaSubsession: public FileServerMediaSubsession{ -public: - static MPEG4VideoFileServerMediaSubsession* - createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); - - // Used to implement "getAuxSDPLine()": - void checkForAuxSDPLine1(); - void afterPlayingDummy1(); - -protected: - MPEG4VideoFileServerMediaSubsession(UsageEnvironment& env, - char const* fileName, Boolean reuseFirstSource); - // called only by createNew(); - virtual ~MPEG4VideoFileServerMediaSubsession(); - - void setDoneFlag() { fDoneFlag = ~0; } - -protected: // redefined virtual functions - virtual char const* getAuxSDPLine(RTPSink* rtpSink, - FramedSource* inputSource); - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, - unsigned& estBitrate); - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic, - FramedSource* inputSource); - -private: - char* fAuxSDPLine; - char fDoneFlag; // used when setting up "fAuxSDPLine" - RTPSink* fDummyRTPSink; // ditto -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG4VideoStreamDiscreteFramer.hh b/project/3rdparty/include/live555/liveMedia/MPEG4VideoStreamDiscreteFramer.hh deleted file mode 100644 index 832572cd0..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG4VideoStreamDiscreteFramer.hh +++ /dev/null @@ -1,73 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A simplified version of "MPEG4VideoStreamFramer" that takes only complete, -// discrete frames (rather than an arbitrary byte stream) as input. -// This avoids the parsing and data copying overhead of the full -// "MPEG4VideoStreamFramer". -// C++ header - -#ifndef _MPEG4_VIDEO_STREAM_DISCRETE_FRAMER_HH -#define _MPEG4_VIDEO_STREAM_DISCRETE_FRAMER_HH - -#ifndef _MPEG4_VIDEO_STREAM_FRAMER_HH -#include "MPEG4VideoStreamFramer.hh" -#endif - -class MPEG4VideoStreamDiscreteFramer: public MPEG4VideoStreamFramer { -public: - static MPEG4VideoStreamDiscreteFramer* - createNew(UsageEnvironment& env, FramedSource* inputSource, Boolean leavePresentationTimesUnmodified = False); - -protected: - MPEG4VideoStreamDiscreteFramer(UsageEnvironment& env, - FramedSource* inputSource, Boolean leavePresentationTimesUnmodified); - // called only by createNew() - virtual ~MPEG4VideoStreamDiscreteFramer(); - -protected: - // redefined virtual functions: - virtual void doGetNextFrame(); - -protected: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - - Boolean getNextFrameBit(u_int8_t& result); - Boolean getNextFrameBits(unsigned numBits, u_int32_t& result); - // Which are used by: - void analyzeVOLHeader(); - -protected: - Boolean fLeavePresentationTimesUnmodified; - u_int32_t vop_time_increment_resolution; - unsigned fNumVTIRBits; - // # of bits needed to count to "vop_time_increment_resolution" - struct timeval fLastNonBFramePresentationTime; - unsigned fLastNonBFrameVop_time_increment; - -private: - unsigned fNumBitsSeenSoFar; // used by the getNextFrameBit*() routines -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEG4VideoStreamFramer.hh b/project/3rdparty/include/live555/liveMedia/MPEG4VideoStreamFramer.hh deleted file mode 100644 index 571f25724..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEG4VideoStreamFramer.hh +++ /dev/null @@ -1,75 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter that breaks up an MPEG-4 video elementary stream into -// frames for: -// - Visual Object Sequence (VS) Header + Visual Object (VO) Header -// + Video Object Layer (VOL) Header -// - Group of VOP (GOV) Header -// - VOP frame -// C++ header - -#ifndef _MPEG4_VIDEO_STREAM_FRAMER_HH -#define _MPEG4_VIDEO_STREAM_FRAMER_HH - -#ifndef _MPEG_VIDEO_STREAM_FRAMER_HH -#include "MPEGVideoStreamFramer.hh" -#endif - -class MPEG4VideoStreamFramer: public MPEGVideoStreamFramer { -public: - static MPEG4VideoStreamFramer* - createNew(UsageEnvironment& env, FramedSource* inputSource); - - u_int8_t profile_and_level_indication() const { - return fProfileAndLevelIndication; - } - - unsigned char* getConfigBytes(unsigned& numBytes) const; - - void setConfigInfo(u_int8_t profileAndLevelIndication, char const* configStr); - // Assigns the "profile_and_level_indication" number, and the 'config' bytes. - // If this function is not called, then this data is only assigned later, when it appears in the input stream. - -protected: - MPEG4VideoStreamFramer(UsageEnvironment& env, - FramedSource* inputSource, - Boolean createParser = True); - // called only by createNew(), or by subclass constructors - virtual ~MPEG4VideoStreamFramer(); - - void startNewConfig(); - void appendToNewConfig(unsigned char* newConfigBytes, - unsigned numNewBytes); - void completeNewConfig(); - -private: - // redefined virtual functions: - virtual Boolean isMPEG4VideoStreamFramer() const; - -protected: - u_int8_t fProfileAndLevelIndication; - unsigned char* fConfigBytes; - unsigned fNumConfigBytes; - -private: - unsigned char* fNewConfigBytes; - unsigned fNumNewConfigBytes; - friend class MPEG4VideoStreamParser; // hack -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MPEGVideoStreamFramer.hh b/project/3rdparty/include/live555/liveMedia/MPEGVideoStreamFramer.hh deleted file mode 100644 index 7fe1b7a10..000000000 --- a/project/3rdparty/include/live555/liveMedia/MPEGVideoStreamFramer.hh +++ /dev/null @@ -1,85 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A filter that breaks up an MPEG video elementary stream into -// headers and frames -// C++ header - -#ifndef _MPEG_VIDEO_STREAM_FRAMER_HH -#define _MPEG_VIDEO_STREAM_FRAMER_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -class TimeCode { -public: - TimeCode(); - virtual ~TimeCode(); - - int operator==(TimeCode const& arg2); - unsigned days, hours, minutes, seconds, pictures; -}; - -class MPEGVideoStreamFramer: public FramedFilter { -public: - Boolean& pictureEndMarker() { return fPictureEndMarker; } - // a hack for implementing the RTP 'M' bit - - void flushInput(); // called if there is a discontinuity (seeking) in the input - -protected: - MPEGVideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource); - // we're an abstract base class - virtual ~MPEGVideoStreamFramer(); - - void computePresentationTime(unsigned numAdditionalPictures); - // sets "fPresentationTime" - void setTimeCode(unsigned hours, unsigned minutes, unsigned seconds, - unsigned pictures, unsigned picturesSinceLastGOP); - -protected: // redefined virtual functions - virtual void doGetNextFrame(); - virtual void doStopGettingFrames(); - -private: - void reset(); - - static void continueReadProcessing(void* clientData, - unsigned char* ptr, unsigned size, - struct timeval presentationTime); - void continueReadProcessing(); - -protected: - double fFrameRate; // Note: For MPEG-4, this is really a 'tick rate' - unsigned fPictureCount; // hack used to implement doGetNextFrame() - Boolean fPictureEndMarker; - struct timeval fPresentationTimeBase; - - // parsing state - class MPEGVideoStreamParser* fParser; - friend class MPEGVideoStreamParser; // hack - -private: - TimeCode fCurGOPTimeCode, fPrevGOPTimeCode; - unsigned fPicturesAdjustment; - double fPictureTimeBase; - unsigned fTcSecsBase; - Boolean fHaveSeenFirstTimeCode; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MatroskaFile.hh b/project/3rdparty/include/live555/liveMedia/MatroskaFile.hh deleted file mode 100644 index 80411a500..000000000 --- a/project/3rdparty/include/live555/liveMedia/MatroskaFile.hh +++ /dev/null @@ -1,218 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A class that encapsulates a Matroska file. -// C++ header - -#ifndef _MATROSKA_FILE_HH -#define _MATROSKA_FILE_HH - -#ifndef _RTP_SINK_HH -#include "RTPSink.hh" -#endif -#ifndef _FILE_SINK_HH -#include "FileSink.hh" -#endif -#ifndef _HASH_TABLE_HH -#include "../UsageEnvironment/HashTable.hh" -#endif - -class MatroskaTrack; // forward -class MatroskaDemux; // forward - -typedef void MatroskaDemuxOnDeletionFunc(void* objectToNotify, MatroskaDemux* demuxBeingDeleted); - -class MatroskaFile: public Medium { -public: - typedef void (onCreationFunc)(MatroskaFile* newFile, void* clientData); - static void createNew(UsageEnvironment& env, char const* fileName, onCreationFunc* onCreation, void* onCreationClientData, - char const* preferredLanguage = "eng"); - // Note: Unlike most "createNew()" functions, this one doesn't return a new object immediately. Instead, because this class - // requires file reading (to parse the Matroska 'Track' headers) before a new object can be initialized, the creation of a new - // object is signalled by calling - from the event loop - an 'onCreationFunc' that is passed as a parameter to "createNew()". - - MatroskaTrack* lookup(unsigned trackNumber) const; - - MatroskaDemux* newDemux(MatroskaDemuxOnDeletionFunc* onDeletionFunc = NULL, void* objectToNotify = NULL); - // Creates a demultiplexor for extracting tracks from this file. - // (Separate clients will typically have separate demultiplexors.) - - // Parameters of the file ('Segment'); set when the file is parsed: - unsigned timecodeScale() { return fTimecodeScale; } // in nanoseconds - float segmentDuration() { return fSegmentDuration; } // in units of "timecodeScale()" - float fileDuration(); // in seconds - - char const* fileName() const { return fFileName; } - - unsigned chosenVideoTrackNumber() { return fChosenVideoTrackNumber; } - unsigned chosenAudioTrackNumber() { return fChosenAudioTrackNumber; } - unsigned chosenSubtitleTrackNumber() { return fChosenSubtitleTrackNumber; } - - FramedSource* - createSourceForStreaming(FramedSource* baseSource, unsigned trackNumber, - unsigned& estBitrate, unsigned& numFiltersInFrontOfTrack); - // Takes a data source (which must be a demultiplexed track from this file) and returns - // a (possibly modified) data source that can be used for streaming. - - char const* trackMIMEType(unsigned trackNumber) const; - // in the form "/", or NULL if no such track exists - - RTPSink* createRTPSinkForTrackNumber(unsigned trackNumber, Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic); - // Creates a "RTPSink" object that would be appropriate for streaming the specified track, - // or NULL if no appropriate "RTPSink" exists - - FileSink* createFileSinkForTrackNumber(unsigned trackNumber, char const* fileName); - // Creates a "FileSink" object that would be appropriate for recording the contents of - // the specified track, or NULL if no appropriate "FileSink" exists. - -private: - MatroskaFile(UsageEnvironment& env, char const* fileName, onCreationFunc* onCreation, void* onCreationClientData, - char const* preferredLanguage); - // called only by createNew() - virtual ~MatroskaFile(); - - static void handleEndOfTrackHeaderParsing(void* clientData); - void handleEndOfTrackHeaderParsing(); - - void addTrack(MatroskaTrack* newTrack, unsigned trackNumber); - void addCuePoint(double cueTime, u_int64_t clusterOffsetInFile, unsigned blockNumWithinCluster); - Boolean lookupCuePoint(double& cueTime, u_int64_t& resultClusterOffsetInFile, unsigned& resultBlockNumWithinCluster); - void printCuePoints(FILE* fid); - - void removeDemux(MatroskaDemux* demux); - - void getH264ConfigData(MatroskaTrack const* track, - u_int8_t*& sps, unsigned& spsSize, - u_int8_t*& pps, unsigned& ppsSize); - // "sps","pps" are dynamically allocated by this function, and must be delete[]d afterwards - void getH265ConfigData(MatroskaTrack const* track, - u_int8_t*& vps, unsigned& vpsSize, - u_int8_t*& sps, unsigned& spsSize, - u_int8_t*& pps, unsigned& ppsSize); - // "vps","sps","pps" are dynamically allocated by this function, and must be delete[]d afterwards - - void getVorbisOrTheoraConfigData(MatroskaTrack const* track, - u_int8_t*& identificationHeader, unsigned& identificationHeaderSize, - u_int8_t*& commentHeader, unsigned& commentHeaderSize, - u_int8_t*& setupHeader, unsigned& setupHeaderSize); - // "identificationHeader", "commentHeader", "setupHeader" are dynamically allocated by this function, and must be delete[]d afterwards - -private: - friend class MatroskaFileParser; - friend class MatroskaDemux; - char const* fFileName; - onCreationFunc* fOnCreation; - void* fOnCreationClientData; - char const* fPreferredLanguage; - - unsigned fTimecodeScale; // in nanoseconds - float fSegmentDuration; // in units of "fTimecodeScale" - u_int64_t fSegmentDataOffset, fClusterOffset, fCuesOffset; - - class MatroskaTrackTable* fTrackTable; - HashTable* fDemuxesTable; - class CuePoint* fCuePoints; - unsigned fChosenVideoTrackNumber, fChosenAudioTrackNumber, fChosenSubtitleTrackNumber; - class MatroskaFileParser* fParserForInitialization; -}; - -// We define our own track type codes as bits (powers of 2), so we can use the set of track types as a bitmap, representing a set: -// (Note that MATROSKA_TRACK_TYPE_OTHER must be last, and have the largest value.) -#define MATROSKA_TRACK_TYPE_VIDEO 0x01 -#define MATROSKA_TRACK_TYPE_AUDIO 0x02 -#define MATROSKA_TRACK_TYPE_SUBTITLE 0x04 -#define MATROSKA_TRACK_TYPE_OTHER 0x08 - -class MatroskaTrack { -public: - MatroskaTrack(); - virtual ~MatroskaTrack(); - - // track parameters - unsigned trackNumber; - u_int8_t trackType; - Boolean isEnabled, isDefault, isForced; - unsigned defaultDuration; - char* name; - char* language; - char* codecID; - unsigned samplingFrequency; - unsigned numChannels; - char const* mimeType; - unsigned codecPrivateSize; - u_int8_t* codecPrivate; - Boolean codecPrivateUsesH264FormatForH265; // a hack specifically for H.265 video tracks - Boolean codecIsOpus; // a hack for Opus audio - unsigned headerStrippedBytesSize; - u_int8_t* headerStrippedBytes; - char const* colorSampling; - char const* colorimetry; - unsigned pixelWidth; - unsigned pixelHeight; - unsigned bitDepth; - unsigned subframeSizeSize; // 0 means: frames do not have subframes (the default behavior) - Boolean haveSubframes() const { return subframeSizeSize > 0; } -}; - -class MatroskaDemux: public Medium { -public: - FramedSource* newDemuxedTrack(); - FramedSource* newDemuxedTrack(unsigned& resultTrackNumber); - // Returns a new stream ("FramedSource" subclass) that represents the next preferred media - // track (video, audio, subtitle - in that order) from the file. (Preferred media tracks - // are based on the file's language preference.) - // This function returns NULL when no more media tracks exist. - - FramedSource* newDemuxedTrackByTrackNumber(unsigned trackNumber); - // As above, but creates a new stream for a specific track number within the Matroska file. - // (You should not call this function more than once with the same track number.) - - // Note: We assume that: - // - Every track created by "newDemuxedTrack()" is later read - // - All calls to "newDemuxedTrack()" are made before any track is read - -protected: - friend class MatroskaFile; - friend class MatroskaFileParser; - class MatroskaDemuxedTrack* lookupDemuxedTrack(unsigned trackNumber); - - MatroskaDemux(MatroskaFile& ourFile); // we're created only by a "MatroskaFile" (a friend) - virtual ~MatroskaDemux(); - -private: - friend class MatroskaDemuxedTrack; - void removeTrack(unsigned trackNumber); - void continueReading(); // called by a demuxed track to tell us that it has a pending read ("doGetNextFrame()") - void seekToTime(double& seekNPT); - void pause(); - - static void handleEndOfFile(void* clientData); - void handleEndOfFile(); - - void resetState(); - -private: - MatroskaFile& fOurFile; - class MatroskaFileParser* fOurParser; - HashTable* fDemuxedTracksTable; - - // Used to implement "newServerMediaSubsession()": - u_int8_t fNextTrackTypeToCheck; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MatroskaFileServerDemux.hh b/project/3rdparty/include/live555/liveMedia/MatroskaFileServerDemux.hh deleted file mode 100644 index b2bae9052..000000000 --- a/project/3rdparty/include/live555/liveMedia/MatroskaFileServerDemux.hh +++ /dev/null @@ -1,88 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A server demultiplexor for a Matroska file -// C++ header - -#ifndef _MATROSKA_FILE_SERVER_DEMUX_HH -#define _MATROSKA_FILE_SERVER_DEMUX_HH - -#ifndef _SERVER_MEDIA_SESSION_HH -#include "ServerMediaSession.hh" -#endif - -#ifndef _MATROSKA_FILE_HH -#include "MatroskaFile.hh" -#endif - -class MatroskaFileServerDemux: public Medium { -public: - typedef void (onCreationFunc)(MatroskaFileServerDemux* newDemux, void* clientData); - static void createNew(UsageEnvironment& env, char const* fileName, - onCreationFunc* onCreation, void* onCreationClientData, - char const* preferredLanguage = "eng"); - // Note: Unlike most "createNew()" functions, this one doesn't return a new object immediately. Instead, because this class - // requires file reading (to parse the Matroska 'Track' headers) before a new object can be initialized, the creation of a new - // object is signalled by calling - from the event loop - an 'onCreationFunc' that is passed as a parameter to "createNew()". - - ServerMediaSubsession* newServerMediaSubsession(); - ServerMediaSubsession* newServerMediaSubsession(unsigned& resultTrackNumber); - // Returns a new "ServerMediaSubsession" object that represents the next preferred media track - // (video, audio, subtitle - in that order) from the file. (Preferred media tracks are based on the file's language preference.) - // This function returns NULL when no more media tracks exist. - - ServerMediaSubsession* newServerMediaSubsessionByTrackNumber(unsigned trackNumber); - // As above, but creates a new "ServerMediaSubsession" object for a specific track number within the Matroska file. - // (You should not call this function more than once with the same track number.) - - // The following public: member functions are called only by the "ServerMediaSubsession" objects: - - MatroskaFile* ourMatroskaFile() { return fOurMatroskaFile; } - char const* fileName() const { return fFileName; } - float fileDuration() const { return fOurMatroskaFile->fileDuration(); } - - FramedSource* newDemuxedTrack(unsigned clientSessionId, unsigned trackNumber); - // Used by the "ServerMediaSubsession" objects to implement their "createNewStreamSource()" virtual function. - -private: - MatroskaFileServerDemux(UsageEnvironment& env, char const* fileName, - onCreationFunc* onCreation, void* onCreationClientData, - char const* preferredLanguage); - // called only by createNew() - virtual ~MatroskaFileServerDemux(); - - static void onMatroskaFileCreation(MatroskaFile* newFile, void* clientData); - void onMatroskaFileCreation(MatroskaFile* newFile); - - static void onDemuxDeletion(void* clientData, MatroskaDemux* demuxBeingDeleted); - void onDemuxDeletion(MatroskaDemux* demuxBeingDeleted); - -private: - char const* fFileName; - onCreationFunc* fOnCreation; - void* fOnCreationClientData; - MatroskaFile* fOurMatroskaFile; - - // Used to implement "newServerMediaSubsession()": - u_int8_t fNextTrackTypeToCheck; - - // Used to set up demuxing, to implement "newDemuxedTrack()": - unsigned fLastClientSessionId; - MatroskaDemux* fLastCreatedDemux; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/Media.hh b/project/3rdparty/include/live555/liveMedia/Media.hh deleted file mode 100644 index c975a9dd8..000000000 --- a/project/3rdparty/include/live555/liveMedia/Media.hh +++ /dev/null @@ -1,137 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Medium -// C++ header - -#ifndef _MEDIA_HH -#define _MEDIA_HH - -#ifndef _LIVEMEDIA_VERSION_HH -#include "liveMedia_version.hh" -#endif - -#ifndef _HASH_TABLE_HH -#include "../UsageEnvironment/HashTable.hh" -#endif - -#ifndef _USAGE_ENVIRONMENT_HH -#include "../UsageEnvironment/UsageEnvironment.hh" -#endif - -// Lots of files end up needing the following, so just #include them here: -#ifndef _NET_COMMON_H -#include "../groupsock/NetCommon.h" -#endif -#include - -// The following makes the Borland compiler happy: -#ifdef __BORLANDC__ -#define _strnicmp strnicmp -#define fabsf(x) fabs(x) -#endif - -#define mediumNameMaxLen 30 - -class Medium { -public: - static Boolean lookupByName(UsageEnvironment& env, - char const* mediumName, - Medium*& resultMedium); - static void close(UsageEnvironment& env, char const* mediumName); - static void close(Medium* medium); // alternative close() method using ptrs - // (has no effect if medium == NULL) - - UsageEnvironment& envir() const {return fEnviron;} - - char const* name() const {return fMediumName;} - - // Test for specific types of media: - virtual Boolean isSource() const; - virtual Boolean isSink() const; - virtual Boolean isRTCPInstance() const; - virtual Boolean isRTSPClient() const; - virtual Boolean isRTSPServer() const; - virtual Boolean isMediaSession() const; - virtual Boolean isServerMediaSession() const; - -protected: - friend class MediaLookupTable; - Medium(UsageEnvironment& env); // abstract base class - virtual ~Medium(); // instances are deleted using close() only - - TaskToken& nextTask() { - return fNextTask; - } - -private: - UsageEnvironment& fEnviron; - char fMediumName[mediumNameMaxLen]; - TaskToken fNextTask; -}; - - -// A data structure for looking up a Medium by its string name. -// (It is used only to implement "Medium", but we make it visible here, in case developers want to use it to iterate over -// the whole set of "Medium" objects that we've created.) -class MediaLookupTable { -public: - static MediaLookupTable* ourMedia(UsageEnvironment& env); - HashTable const& getTable() { return *fTable; } - -protected: - MediaLookupTable(UsageEnvironment& env); - virtual ~MediaLookupTable(); - -private: - friend class Medium; - - Medium* lookup(char const* name) const; - // Returns NULL if none already exists - - void addNew(Medium* medium, char* mediumName); - void remove(char const* name); - - void generateNewName(char* mediumName, unsigned maxLen); - -private: - UsageEnvironment& fEnv; - HashTable* fTable; - unsigned fNameGenerator; -}; - - -// The structure pointed to by the "liveMediaPriv" UsageEnvironment field: -class _Tables { -public: - static _Tables* getOurTables(UsageEnvironment& env, Boolean createIfNotPresent = True); - // returns a pointer to a "_Tables" structure (creating it if necessary) - void reclaimIfPossible(); - // used to delete ourselves when we're no longer used - - MediaLookupTable* mediaTable; - void* socketTable; - -protected: - _Tables(UsageEnvironment& env); - virtual ~_Tables(); - -private: - UsageEnvironment& fEnv; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MediaSession.hh b/project/3rdparty/include/live555/liveMedia/MediaSession.hh deleted file mode 100644 index 309891cda..000000000 --- a/project/3rdparty/include/live555/liveMedia/MediaSession.hh +++ /dev/null @@ -1,370 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A data structure that represents a session that consists of -// potentially multiple (audio and/or video) sub-sessions -// (This data structure is used for media *receivers* - i.e., clients. -// For media streamers, use "ServerMediaSession" instead.) -// C++ header - -/* NOTE: To support receiving your own custom RTP payload format, you must first define a new - subclass of "MultiFramedRTPSource" (or "BasicUDPSource") that implements it. - Then define your own subclass of "MediaSession" and "MediaSubsession", as follows: - - In your subclass of "MediaSession" (named, for example, "myMediaSession"): - - Define and implement your own static member function - static myMediaSession* createNew(UsageEnvironment& env, char const* sdpDescription); - and call this - instead of "MediaSession::createNew()" - in your application, - when you create a new "MediaSession" object. - - Reimplement the "createNewMediaSubsession()" virtual function, as follows: - MediaSubsession* myMediaSession::createNewMediaSubsession() { return new myMediaSubsession(*this); } - - In your subclass of "MediaSubsession" (named, for example, "myMediaSubsession"): - - Reimplement the "createSourceObjects()" virtual function, perhaps similar to this: - Boolean myMediaSubsession::createSourceObjects(int useSpecialRTPoffset) { - if (strcmp(fCodecName, "X-MY-RTP-PAYLOAD-FORMAT") == 0) { - // This subsession uses our custom RTP payload format: - fReadSource = fRTPSource = myRTPPayloadFormatRTPSource::createNew( ); - return True; - } else { - // This subsession uses some other RTP payload format - perhaps one that we already implement: - return ::createSourceObjects(useSpecialRTPoffset); - } - } -*/ - -#ifndef _MEDIA_SESSION_HH -#define _MEDIA_SESSION_HH - -#ifndef _RTCP_HH -#include "RTCP.hh" -#endif -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif -#ifndef _SRTP_CRYPTOGRAPHIC_CONTEXT_HH -#include "SRTPCryptographicContext.hh" -#endif - -class MediaSubsession; // forward - -class MediaSession: public Medium { -public: - static MediaSession* createNew(UsageEnvironment& env, - char const* sdpDescription); - - static Boolean lookupByName(UsageEnvironment& env, char const* sourceName, - MediaSession*& resultSession); - - Boolean hasSubsessions() const { return fSubsessionsHead != NULL; } - - char* connectionEndpointName() const { return fConnectionEndpointName; } - int connectionEndpointNameAddressFamily() const { return fConnectionEndpointNameAddressFamily; } - char const* CNAME() const { return fCNAME; } - struct sockaddr_storage const& sourceFilterAddr() const { return fSourceFilterAddr; } - float& scale() { return fScale; } - float& speed() { return fSpeed; } - char* mediaSessionType() const { return fMediaSessionType; } - char* sessionName() const { return fSessionName; } - char* sessionDescription() const { return fSessionDescription; } - char const* controlPath() const { return fControlPath; } - - double& playStartTime() { return fMaxPlayStartTime; } - double& playEndTime() { return fMaxPlayEndTime; } - char* absStartTime() const; - char* absEndTime() const; - // Used only to set the local fields: - char*& _absStartTime() { return fAbsStartTime; } - char*& _absEndTime() { return fAbsEndTime; } - - Boolean initiateByMediaType(char const* mimeType, - MediaSubsession*& resultSubsession, - int useSpecialRTPoffset = -1); - // Initiates the first subsession with the specified MIME type - // Returns the resulting subsession, or 'multi source' (not both) - - MIKEYState* getMIKEYState() const { return fMIKEYState; } - SRTPCryptographicContext* getCrypto() const { return fCrypto; } - -protected: // redefined virtual functions - virtual Boolean isMediaSession() const; - -protected: - MediaSession(UsageEnvironment& env); - // called only by createNew(); - virtual ~MediaSession(); - - virtual MediaSubsession* createNewMediaSubsession(); - - Boolean initializeWithSDP(char const* sdpDescription); - Boolean parseSDPLine(char const* input, char const*& nextLine); - Boolean parseSDPLine_s(char const* sdpLine); - Boolean parseSDPLine_i(char const* sdpLine); - Boolean parseSDPLine_c(char const* sdpLine); - Boolean parseSDPAttribute_type(char const* sdpLine); - Boolean parseSDPAttribute_control(char const* sdpLine); - Boolean parseSDPAttribute_range(char const* sdpLine); - Boolean parseSDPAttribute_source_filter(char const* sdpLine); - Boolean parseSDPAttribute_key_mgmt(char const* sdpLine); - - static char* lookupPayloadFormat(unsigned char rtpPayloadType, - unsigned& rtpTimestampFrequency, - unsigned& numChannels); - static unsigned guessRTPTimestampFrequency(char const* mediumName, - char const* codecName); - -protected: - friend class MediaSubsessionIterator; - char* fCNAME; // used for RTCP - - // Linkage fields: - MediaSubsession* fSubsessionsHead; - MediaSubsession* fSubsessionsTail; - - // Fields set from a SDP description: - char* fConnectionEndpointName; - int fConnectionEndpointNameAddressFamily; - double fMaxPlayStartTime; - double fMaxPlayEndTime; - char* fAbsStartTime; - char* fAbsEndTime; - struct sockaddr_storage fSourceFilterAddr; // used for SSM - float fScale; // set from a RTSP "Scale:" header - float fSpeed; - char* fMediaSessionType; // holds a=type value - char* fSessionName; // holds s= value - char* fSessionDescription; // holds i= value - char* fControlPath; // holds optional a=control: string - - // Optional key management and crypto state: - MIKEYState* fMIKEYState; - SRTPCryptographicContext* fCrypto; -}; - - -class MediaSubsessionIterator { -public: - MediaSubsessionIterator(MediaSession const& session); - virtual ~MediaSubsessionIterator(); - - MediaSubsession* next(); // NULL if none - void reset(); - -private: - MediaSession const& fOurSession; - MediaSubsession* fNextPtr; -}; - - -class MediaSubsession { -public: - MediaSession& parentSession() { return fParent; } - MediaSession const& parentSession() const { return fParent; } - - unsigned short clientPortNum() const { return fClientPortNum; } - unsigned char rtpPayloadFormat() const { return fRTPPayloadFormat; } - char const* savedSDPLines() const { return fSavedSDPLines; } - char const* mediumName() const { return fMediumName; } - char const* codecName() const { return fCodecName; } - char const* protocolName() const { return fProtocolName; } - char const* controlPath() const { return fControlPath; } - - Boolean isSSM() const { return !addressIsNull(fSourceFilterAddr); } - - unsigned short videoWidth() const { return fVideoWidth; } - unsigned short videoHeight() const { return fVideoHeight; } - unsigned videoFPS() const { return fVideoFPS; } - unsigned numChannels() const { return fNumChannels; } - float& scale() { return fScale; } - float& speed() { return fSpeed; } - - RTPSource* rtpSource() { return fRTPSource; } - RTCPInstance* rtcpInstance() { return fRTCPInstance; } - unsigned rtpTimestampFrequency() const { return fRTPTimestampFrequency; } - Boolean rtcpIsMuxed() const { return fMultiplexRTCPWithRTP; } - FramedSource* readSource() { return fReadSource; } - // This is the source that client sinks read from. It is usually - // (but not necessarily) the same as "rtpSource()" - void addFilter(FramedFilter* filter); - // Changes "readSource()" to "filter" (which must have just been created with "readSource()" as its input) - - double playStartTime() const; - double playEndTime() const; - char* absStartTime() const; - char* absEndTime() const; - // Used only to set the local fields: - double& _playStartTime() { return fPlayStartTime; } - double& _playEndTime() { return fPlayEndTime; } - char*& _absStartTime() { return fAbsStartTime; } - char*& _absEndTime() { return fAbsEndTime; } - - Boolean initiate(int useSpecialRTPoffset = -1); - // Creates a "RTPSource" for this subsession. (Has no effect if it's - // already been created.) Returns True iff this succeeds. - void deInitiate(); // Destroys any previously created RTPSource - Boolean setClientPortNum(unsigned short portNum); - // Sets the preferred client port number that any "RTPSource" for - // this subsession would use. (By default, the client port number - // is gotten from the original SDP description, or - if the SDP - // description does not specfy a client port number - an ephemeral - // (even) port number is chosen.) This routine must *not* be - // called after initiate(). - void receiveRawMP3ADUs() { fReceiveRawMP3ADUs = True; } // optional hack for audio/MPA-ROBUST; must not be called after initiate() - void receiveRawJPEGFrames() { fReceiveRawJPEGFrames = True; } // optional hack for video/JPEG; must not be called after initiate() - char*& connectionEndpointName() { return fConnectionEndpointName; } - char const* connectionEndpointName() const { - return fConnectionEndpointName; - } - int connectionEndpointNameAddressFamily() const { - return fConnectionEndpointNameAddressFamily == AF_UNSPEC - ? parentSession().connectionEndpointNameAddressFamily() - : fConnectionEndpointNameAddressFamily; - } - - // 'Bandwidth' parameter, set in the "b=" SDP line: - unsigned bandwidth() const { return fBandwidth; } - - // General SDP attribute accessor functions: - char const* attrVal_str(char const* attrName) const; - // returns "" if attribute doesn't exist (and has no default value), or is not a string - char const* attrVal_strToLower(char const* attrName) const; - // returns "" if attribute doesn't exist (and has no default value), or is not a string - unsigned attrVal_int(char const* attrName) const; - // also returns 0 if attribute doesn't exist (and has no default value) - unsigned attrVal_unsigned(char const* attrName) const { return (unsigned)attrVal_int(attrName); } - Boolean attrVal_bool(char const* attrName) const { return attrVal_int(attrName) != 0; } - - // Old, now-deprecated SDP attribute accessor functions, kept here for backwards-compatibility: - char const* fmtp_config() const; - char const* fmtp_configuration() const { return fmtp_config(); } - char const* fmtp_spropparametersets() const { return attrVal_str("sprop-parameter-sets"); } - char const* fmtp_spropvps() const { return attrVal_str("sprop-vps"); } - char const* fmtp_spropsps() const { return attrVal_str("sprop-sps"); } - char const* fmtp_sproppps() const { return attrVal_str("sprop-pps"); } - - void getConnectionEndpointAddress(struct sockaddr_storage& addr) const; - // Converts "fConnectionEndpointName" to an address (or 0 if unknown) - void setDestinations(struct sockaddr_storage const& defaultDestAddress); - // Uses "fConnectionEndpointName" and "serverPortNum" to set - // the destination address and port of the RTP and RTCP objects. - // This is typically called by RTSP clients after doing "SETUP". - - char const* sessionId() const { return fSessionId; } - void setSessionId(char const* sessionId); - - // Public fields that external callers can use to keep state. - // (They are responsible for all storage management on these fields) - unsigned short serverPortNum; // in host byte order (used by RTSP) - unsigned char rtpChannelId, rtcpChannelId; // used by RTSP (for RTP/TCP) - MediaSink* sink; // callers can use this to keep track of who's playing us - void* miscPtr; // callers can use this for whatever they want - - // Parameters set from a RTSP "RTP-Info:" header: - struct { - u_int16_t seqNum; - u_int32_t timestamp; - Boolean infoIsNew; // not part of the RTSP header; instead, set whenever this struct is filled in - } rtpInfo; - - double getNormalPlayTime(struct timeval const& presentationTime); - // Computes the stream's "Normal Play Time" (NPT) from the given "presentationTime". - // (For the definition of "Normal Play Time", see RFC 2326, section 3.6.) - // This function is useful only if the "rtpInfo" structure was previously filled in - // (e.g., by a "RTP-Info:" header in a RTSP response). - // Also, for this function to work properly, the RTP stream's presentation times must (eventually) be - // synchronized via RTCP. - // (Note: If this function returns a negative number, then the result should be ignored by the caller.) - - MIKEYState* getMIKEYState() const { return fMIKEYState != NULL ? fMIKEYState : fParent.getMIKEYState(); } - SRTPCryptographicContext* getCrypto() const { return fCrypto != NULL ? fCrypto : fParent.getCrypto(); } - -protected: - friend class MediaSession; - friend class MediaSubsessionIterator; - MediaSubsession(MediaSession& parent); - virtual ~MediaSubsession(); - - UsageEnvironment& env() { return fParent.envir(); } - void setNext(MediaSubsession* next) { fNext = next; } - - void setAttribute(char const* name, char const* value = NULL, Boolean valueIsHexadecimal = False); - - Boolean parseSDPLine_c(char const* sdpLine); - Boolean parseSDPLine_b(char const* sdpLine); - Boolean parseSDPAttribute_rtpmap(char const* sdpLine); - Boolean parseSDPAttribute_rtcpmux(char const* sdpLine); - Boolean parseSDPAttribute_control(char const* sdpLine); - Boolean parseSDPAttribute_range(char const* sdpLine); - Boolean parseSDPAttribute_fmtp(char const* sdpLine); - Boolean parseSDPAttribute_source_filter(char const* sdpLine); - Boolean parseSDPAttribute_x_dimensions(char const* sdpLine); - Boolean parseSDPAttribute_framerate(char const* sdpLine); - Boolean parseSDPAttribute_key_mgmt(char const* sdpLine); - - virtual Boolean createSourceObjects(int useSpecialRTPoffset); - // create "fRTPSource" and "fReadSource" member objects, after we've been initialized via SDP - -protected: - // Linkage fields: - MediaSession& fParent; - MediaSubsession* fNext; - - // Fields set from a SDP description: - char* fConnectionEndpointName; // may also be set by RTSP SETUP response - int fConnectionEndpointNameAddressFamily; - unsigned short fClientPortNum; // in host byte order - // This field is also set by initiate() - unsigned char fRTPPayloadFormat; - char* fSavedSDPLines; - char* fMediumName; - char* fCodecName; - char* fProtocolName; - unsigned fRTPTimestampFrequency; - Boolean fMultiplexRTCPWithRTP; - char* fControlPath; // holds optional a=control: string - - // Optional key management and crypto state: - MIKEYState* fMIKEYState; - SRTPCryptographicContext* fCrypto; - - struct sockaddr_storage fSourceFilterAddr; // used for SSM - unsigned fBandwidth; // in kilobits-per-second, from b= line - - double fPlayStartTime; - double fPlayEndTime; - char* fAbsStartTime; - char* fAbsEndTime; - unsigned short fVideoWidth, fVideoHeight; - // screen dimensions (set by an optional a=x-dimensions: , line) - unsigned fVideoFPS; - // frame rate (set by an optional "a=framerate: " or "a=x-framerate: " line) - unsigned fNumChannels; - // optionally set by "a=rtpmap:" lines for audio sessions. Default: 1 - float fScale; // set from a RTSP "Scale:" header - float fSpeed; - double fNPT_PTS_Offset; // set by "getNormalPlayTime()"; add this to a PTS to get NPT - HashTable* fAttributeTable; // for "a=fmtp:" attributes. (Later an array by payload type #####) - - // Fields set or used by initiate(): - Groupsock* fRTPSocket; Groupsock* fRTCPSocket; // works even for unicast - RTPSource* fRTPSource; RTCPInstance* fRTCPInstance; - FramedSource* fReadSource; - Boolean fReceiveRawMP3ADUs, fReceiveRawJPEGFrames; - - // Other fields: - char* fSessionId; // used by RTSP -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MediaSink.hh b/project/3rdparty/include/live555/liveMedia/MediaSink.hh deleted file mode 100644 index 272614e04..000000000 --- a/project/3rdparty/include/live555/liveMedia/MediaSink.hh +++ /dev/null @@ -1,135 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Media Sinks -// C++ header - -#ifndef _MEDIA_SINK_HH -#define _MEDIA_SINK_HH - -#ifndef _FRAMED_SOURCE_HH -#include "FramedSource.hh" -#endif - -class MediaSink: public Medium { -public: - static Boolean lookupByName(UsageEnvironment& env, char const* sinkName, - MediaSink*& resultSink); - - typedef void (afterPlayingFunc)(void* clientData); - Boolean startPlaying(MediaSource& source, - afterPlayingFunc* afterFunc, - void* afterClientData); - virtual void stopPlaying(); - - // Test for specific types of sink: - virtual Boolean isRTPSink() const; - - FramedSource* source() const {return fSource;} - -protected: - MediaSink(UsageEnvironment& env); // abstract base class - virtual ~MediaSink(); - - virtual Boolean sourceIsCompatibleWithUs(MediaSource& source); - // called by startPlaying() - virtual Boolean continuePlaying() = 0; - // called by startPlaying() - - static void onSourceClosure(void* clientData); // can be used in "getNextFrame()" calls - void onSourceClosure(); - // should be called (on ourselves) by continuePlaying() when it - // discovers that the source we're playing from has closed. - - FramedSource* fSource; - -private: - // redefined virtual functions: - virtual Boolean isSink() const; - -private: - // The following fields are used when we're being played: - afterPlayingFunc* fAfterFunc; - void* fAfterClientData; -}; - -// A data structure that a sink may use for an output packet: -class OutPacketBuffer { -public: - OutPacketBuffer(unsigned preferredPacketSize, unsigned maxPacketSize, - unsigned maxBufferSize = 0); - // if "maxBufferSize" is >0, use it - instead of "maxSize" to compute the buffer size - ~OutPacketBuffer(); - - static unsigned maxSize; - static void increaseMaxSizeTo(unsigned newMaxSize) { if (newMaxSize > OutPacketBuffer::maxSize) OutPacketBuffer::maxSize = newMaxSize; } - - unsigned char* curPtr() const {return &fBuf[fPacketStart + fCurOffset];} - unsigned totalBytesAvailable() const { - return fLimit - (fPacketStart + fCurOffset); - } - unsigned totalBufferSize() const { return fLimit; } - unsigned char* packet() const {return &fBuf[fPacketStart];} - unsigned curPacketSize() const {return fCurOffset;} - - void increment(unsigned numBytes) {fCurOffset += numBytes;} - - void enqueue(unsigned char const* from, unsigned numBytes); - void enqueueWord(u_int32_t word); - void insert(unsigned char const* from, unsigned numBytes, unsigned toPosition); - void insertWord(u_int32_t word, unsigned toPosition); - void extract(unsigned char* to, unsigned numBytes, unsigned fromPosition); - u_int32_t extractWord(unsigned fromPosition); - - void skipBytes(unsigned numBytes); - - Boolean isPreferredSize() const {return fCurOffset >= fPreferred;} - Boolean wouldOverflow(unsigned numBytes) const { - return (fCurOffset+numBytes) > fMax; - } - unsigned numOverflowBytes(unsigned numBytes) const { - return (fCurOffset+numBytes) - fMax; - } - Boolean isTooBigForAPacket(unsigned numBytes) const { - return numBytes > fMax; - } - - void setOverflowData(unsigned overflowDataOffset, - unsigned overflowDataSize, - struct timeval const& presentationTime, - unsigned durationInMicroseconds); - unsigned overflowDataSize() const {return fOverflowDataSize;} - struct timeval overflowPresentationTime() const {return fOverflowPresentationTime;} - unsigned overflowDurationInMicroseconds() const {return fOverflowDurationInMicroseconds;} - Boolean haveOverflowData() const {return fOverflowDataSize > 0;} - void useOverflowData(); - - void adjustPacketStart(unsigned numBytes); - void resetPacketStart(); - void resetOffset() { fCurOffset = 0; } - void resetOverflowData() { fOverflowDataOffset = fOverflowDataSize = 0; } - -private: - unsigned fPacketStart, fCurOffset, fPreferred, fMax, fLimit; - unsigned char* fBuf; - - unsigned fOverflowDataOffset, fOverflowDataSize; - struct timeval fOverflowPresentationTime; - unsigned fOverflowDurationInMicroseconds; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MediaSource.hh b/project/3rdparty/include/live555/liveMedia/MediaSource.hh deleted file mode 100644 index e60f2e1fd..000000000 --- a/project/3rdparty/include/live555/liveMedia/MediaSource.hh +++ /dev/null @@ -1,59 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Media Sources -// C++ header - -#ifndef _MEDIA_SOURCE_HH -#define _MEDIA_SOURCE_HH - -#ifndef _MEDIA_HH -#include "Media.hh" -#endif - -class MediaSource: public Medium { -public: - static Boolean lookupByName(UsageEnvironment& env, char const* sourceName, - MediaSource*& resultSource); - virtual void getAttributes() const; - // attributes are returned in "env's" 'result message' - - // The MIME type of this source: - virtual char const* MIMEtype() const; - - // Test for specific types of source: - virtual Boolean isFramedSource() const; - virtual Boolean isRTPSource() const; - virtual Boolean isMPEG1or2VideoStreamFramer() const; - virtual Boolean isMPEG4VideoStreamFramer() const; - virtual Boolean isH264VideoStreamFramer() const; - virtual Boolean isH265VideoStreamFramer() const; - virtual Boolean isDVVideoStreamFramer() const; - virtual Boolean isJPEGVideoSource() const; - virtual Boolean isAMRAudioSource() const; - virtual Boolean isMPEG2TransportStreamMultiplexor() const; - -protected: - MediaSource(UsageEnvironment& env); // abstract base class - virtual ~MediaSource(); - -private: - // redefined virtual functions: - virtual Boolean isSource() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MediaTranscodingTable.hh b/project/3rdparty/include/live555/liveMedia/MediaTranscodingTable.hh deleted file mode 100644 index 8c64ddf94..000000000 --- a/project/3rdparty/include/live555/liveMedia/MediaTranscodingTable.hh +++ /dev/null @@ -1,66 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A class that implements a database that can be accessed to create -// "FramedFilter" (subclass) objects that transcode one codec into another. -// The implementation of this class just returns NULL for each codec lookup; -// To actually implement transcoding, you would subclass it. -// C++ header - -#ifndef _MEDIA_TRANSCODING_TABLE_HH -#define _MEDIA_TRANSCODING_TABLE_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif -#ifndef _MEDIA_SESSION_HH -#include "MediaSession.hh" -#endif - -class MediaTranscodingTable: public Medium { -public: - virtual FramedFilter* - lookupTranscoder(MediaSubsession& /*inputCodecDescription*/, // in - char*& outputCodecName/* out; must be delete[]d later */) { - // Default implementation: Return NULL (indicating: no transcoding). - // You would reimplement this virtual function in a subclass to return a new 'transcoding' - // "FramedFilter" (subclass) object for each ("mediumName","codecName") that you wish to - // transcode (or return NULL for no transcoding). - // (Note that "inputCodecDescription" must have a non-NULL "readSource()"; this is used - // as the input to the new "FramedFilter" (subclass) object.) - outputCodecName = NULL; - return NULL; - } - - virtual Boolean weWillTranscode(char const* /*mediumName*/, char const* /*codecName*/) { - // Default implementation: Return False. - // You would reimplement this in a subclass - returning True for each - // / for which you'll do transcoding. - // Note: Unlike "lookupTranscoder()", this function does not actually create any 'transcoding' - // filter objects. (It may be called before "MediaSubsession::initiate()".) - return False; - } - -protected: // we are to be subclassed only - MediaTranscodingTable(UsageEnvironment& env) - : Medium(env) { - } - virtual ~MediaTranscodingTable() { - } -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MultiFramedRTPSink.hh b/project/3rdparty/include/live555/liveMedia/MultiFramedRTPSink.hh deleted file mode 100644 index 3d2882833..000000000 --- a/project/3rdparty/include/live555/liveMedia/MultiFramedRTPSink.hh +++ /dev/null @@ -1,140 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for a common kind of payload format: Those which pack multiple, -// complete codec frames (as many as possible) into each RTP packet. -// C++ header - -#ifndef _MULTI_FRAMED_RTP_SINK_HH -#define _MULTI_FRAMED_RTP_SINK_HH - -#ifndef _RTP_SINK_HH -#include "RTPSink.hh" -#endif - -class MultiFramedRTPSink: public RTPSink { -public: - void setPacketSizes(unsigned preferredPacketSize, unsigned maxPacketSize); - - typedef void (onSendErrorFunc)(void* clientData); - void setOnSendErrorFunc(onSendErrorFunc* onSendErrorFunc, void* onSendErrorFuncData) { - // Can be used to set a callback function to be called if there's an error sending RTP packets on our socket. - fOnSendErrorFunc = onSendErrorFunc; - fOnSendErrorData = onSendErrorFuncData; - } - -protected: - MultiFramedRTPSink(UsageEnvironment& env, - Groupsock* rtpgs, unsigned char rtpPayloadType, - unsigned rtpTimestampFrequency, - char const* rtpPayloadFormatName, - unsigned numChannels = 1); - // we're a virtual base class - - virtual ~MultiFramedRTPSink(); - - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - // perform any processing specific to the particular payload format - virtual Boolean allowFragmentationAfterStart() const; - // whether a frame can be fragmented if other frame(s) appear earlier - // in the packet (by default: False) - virtual Boolean allowOtherFramesAfterLastFragment() const; - // whether other frames can be packed into a packet following the - // final fragment of a previous, fragmented frame (by default: False) - virtual Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - // whether this frame can appear in position >1 in a pkt (default: True) - virtual unsigned specialHeaderSize() const; - // returns the size of any special header used (following the RTP header) (default: 0) - virtual unsigned frameSpecificHeaderSize() const; - // returns the size of any frame-specific header used (before each frame - // within the packet) (default: 0) - virtual unsigned computeOverflowForNewFrame(unsigned newFrameSize) const; - // returns the number of overflow bytes that would be produced by adding a new - // frame of size "newFrameSize" to the current RTP packet. - // (By default, this just calls "numOverflowBytes()", but subclasses can redefine - // this to (e.g.) impose a granularity upon RTP payload fragments.) - - // Functions that might be called by doSpecialFrameHandling(), or other subclass virtual functions: - Boolean isFirstPacket() const { return fIsFirstPacket; } - Boolean isFirstFrameInPacket() const { return fNumFramesUsedSoFar == 0; } - unsigned curFragmentationOffset() const { return fCurFragmentationOffset; } - void setMarkerBit(); - void setTimestamp(struct timeval framePresentationTime); - void setSpecialHeaderWord(unsigned word, /* 32 bits, in host order */ - unsigned wordPosition = 0); - void setSpecialHeaderBytes(unsigned char const* bytes, unsigned numBytes, - unsigned bytePosition = 0); - void setFrameSpecificHeaderWord(unsigned word, /* 32 bits, in host order */ - unsigned wordPosition = 0); - void setFrameSpecificHeaderBytes(unsigned char const* bytes, unsigned numBytes, - unsigned bytePosition = 0); - void setFramePadding(unsigned numPaddingBytes); - unsigned numFramesUsedSoFar() const { return fNumFramesUsedSoFar; } - unsigned ourMaxPacketSize() const { return fOurMaxPacketSize; } - -public: // redefined virtual functions: - virtual void stopPlaying(); - -protected: // redefined virtual functions: - virtual Boolean continuePlaying(); - -private: - void buildAndSendPacket(Boolean isFirstPacket); - void packFrame(); - void sendPacketIfNecessary(); - static void sendNext(void* firstArg); - friend void sendNext(void*); - - static void afterGettingFrame(void* clientData, - unsigned numBytesRead, unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned numBytesRead, unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - Boolean isTooBigForAPacket(unsigned numBytes) const; - - static void ourHandleClosure(void* clientData); - -private: - OutPacketBuffer* fOutBuf; - - Boolean fNoFramesLeft; - unsigned fNumFramesUsedSoFar; - unsigned fCurFragmentationOffset; - Boolean fPreviousFrameEndedFragmentation; - - Boolean fIsFirstPacket; - struct timeval fNextSendTime; - unsigned fTimestampPosition; - unsigned fSpecialHeaderPosition; - unsigned fSpecialHeaderSize; // size in bytes of any special header used - unsigned fCurFrameSpecificHeaderPosition; - unsigned fCurFrameSpecificHeaderSize; // size in bytes of cur frame-specific header - unsigned fTotalFrameSpecificHeaderSizes; // size of all frame-specific hdrs in pkt - unsigned fOurMaxPacketSize; - - onSendErrorFunc* fOnSendErrorFunc; - void* fOnSendErrorData; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/MultiFramedRTPSource.hh b/project/3rdparty/include/live555/liveMedia/MultiFramedRTPSource.hh deleted file mode 100644 index 20134a572..000000000 --- a/project/3rdparty/include/live555/liveMedia/MultiFramedRTPSource.hh +++ /dev/null @@ -1,159 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP source for a common kind of payload format: Those which pack multiple, -// complete codec frames (as many as possible) into each RTP packet. -// C++ header - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#define _MULTI_FRAMED_RTP_SOURCE_HH - -#ifndef _RTP_SOURCE_HH -#include "RTPSource.hh" -#endif - -class BufferedPacket; // forward -class BufferedPacketFactory; // forward - -class MultiFramedRTPSource: public RTPSource { -protected: - MultiFramedRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency, - BufferedPacketFactory* packetFactory = NULL); - // virtual base class - virtual ~MultiFramedRTPSource(); - - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - // Subclasses redefine this to handle any special, payload format - // specific header that follows the RTP header. - - virtual Boolean packetIsUsableInJitterCalculation(unsigned char* packet, - unsigned packetSize); - // The default implementation returns True, but this can be redefined - -protected: - Boolean fCurrentPacketBeginsFrame; - Boolean fCurrentPacketCompletesFrame; - -protected: - // redefined virtual functions: - virtual void doGetNextFrame(); - virtual void doStopGettingFrames(); - -private: - // redefined virtual functions: - virtual void setPacketReorderingThresholdTime(unsigned uSeconds); - -private: - void reset(); - void doGetNextFrame1(); - - static void networkReadHandler(MultiFramedRTPSource* source, int /*mask*/); - void networkReadHandler1(); - - Boolean fAreDoingNetworkReads; - BufferedPacket* fPacketReadInProgress; - Boolean fNeedDelivery; - Boolean fPacketLossInFragmentedFrame; - unsigned char* fSavedTo; - unsigned fSavedMaxSize; - - // A buffer to (optionally) hold incoming pkts that have been reorderered - class ReorderingPacketBuffer* fReorderingBuffer; -}; - - -// A 'packet data' class that's used to implement the above. -// Note that this can be subclassed - if desired - to redefine -// "nextEnclosedFrameParameters()". - -class BufferedPacket { -public: - BufferedPacket(); - virtual ~BufferedPacket(); - - Boolean hasUsableData() const { return fTail > fHead; } - unsigned useCount() const { return fUseCount; } - - Boolean fillInData(RTPInterface& rtpInterface, struct sockaddr_storage& fromAddress, Boolean& packetReadWasIncomplete); - void assignMiscParams(unsigned short rtpSeqNo, unsigned rtpTimestamp, - struct timeval presentationTime, - Boolean hasBeenSyncedUsingRTCP, - Boolean rtpMarkerBit, struct timeval timeReceived); - void skip(unsigned numBytes); // used to skip over an initial header - void removePadding(unsigned numBytes); // used to remove trailing bytes - void appendData(unsigned char* newData, unsigned numBytes); - void use(unsigned char* to, unsigned toSize, - unsigned& bytesUsed, unsigned& bytesTruncated, - unsigned short& rtpSeqNo, unsigned& rtpTimestamp, - struct timeval& presentationTime, - Boolean& hasBeenSyncedUsingRTCP, Boolean& rtpMarkerBit); - - BufferedPacket*& nextPacket() { return fNextPacket; } - - unsigned short rtpSeqNo() const { return fRTPSeqNo; } - struct timeval const& timeReceived() const { return fTimeReceived; } - - unsigned char* data() const { return &fBuf[fHead]; } - unsigned dataSize() const { return fTail-fHead; } - Boolean rtpMarkerBit() const { return fRTPMarkerBit; } - Boolean& isFirstPacket() { return fIsFirstPacket; } - unsigned bytesAvailable() const { return fPacketSize - fTail; } - -protected: - virtual void reset(); - virtual unsigned nextEnclosedFrameSize(unsigned char*& framePtr, - unsigned dataSize); - // The above function has been deprecated. Instead, new subclasses should use: - virtual void getNextEnclosedFrameParameters(unsigned char*& framePtr, - unsigned dataSize, - unsigned& frameSize, - unsigned& frameDurationInMicroseconds); - - unsigned fPacketSize; - unsigned char* fBuf; - unsigned fHead; - unsigned fTail; - -private: - BufferedPacket* fNextPacket; // used to link together packets - - unsigned fUseCount; - unsigned short fRTPSeqNo; - unsigned fRTPTimestamp; - struct timeval fPresentationTime; // corresponding to "fRTPTimestamp" - Boolean fHasBeenSyncedUsingRTCP; - Boolean fRTPMarkerBit; - Boolean fIsFirstPacket; - struct timeval fTimeReceived; -}; - -// A 'factory' class for creating "BufferedPacket" objects. -// If you want to subclass "BufferedPacket", then you'll also -// want to subclass this, to redefine createNewPacket() - -class BufferedPacketFactory { -public: - BufferedPacketFactory(); - virtual ~BufferedPacketFactory(); - - virtual BufferedPacket* createNewPacket(MultiFramedRTPSource* ourSource); -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/OggFile.hh b/project/3rdparty/include/live555/liveMedia/OggFile.hh deleted file mode 100644 index 94b35081f..000000000 --- a/project/3rdparty/include/live555/liveMedia/OggFile.hh +++ /dev/null @@ -1,179 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A class that encapsulates an Ogg file -// C++ header - -#ifndef _OGG_FILE_HH -#define _OGG_FILE_HH - -#ifndef _RTP_SINK_HH -#include "RTPSink.hh" -#endif -#ifndef _HASH_TABLE_HH -#include "../UsageEnvironment/HashTable.hh" -#endif - -class OggTrack; // forward -class OggDemux; // forward - -typedef void OggDemuxOnDeletionFunc(void* objectToNotify, OggDemux* demuxBeingDeleted); - -class OggFile: public Medium { -public: - typedef void (onCreationFunc)(OggFile* newFile, void* clientData); - static void createNew(UsageEnvironment& env, char const* fileName, - onCreationFunc* onCreation, void* onCreationClientData); - // Note: Unlike most "createNew()" functions, this one doesn't return a new object - // immediately. Instead, because this class requires file reading (to parse the - // Ogg track headers) before a new object can be initialized, the creation of a new object - // is signalled by calling - from the event loop - an 'onCreationFunc' that is passed as - // a parameter to "createNew()". - - OggTrack* lookup(u_int32_t trackNumber); - - OggDemux* newDemux(OggDemuxOnDeletionFunc* onDeletionFunc = NULL, void* objectToNotify = NULL); - // Creates a demultiplexor for extracting tracks from this file. - // (Separate clients will typically have separate demultiplexors.) - - char const* fileName() const { return fFileName; } - unsigned numTracks() const; - - FramedSource* - createSourceForStreaming(FramedSource* baseSource, u_int32_t trackNumber, - unsigned& estBitrate, unsigned& numFiltersInFrontOfTrack); - // Takes a data source (which must be a demultiplexed track from this file) and returns - // a (possibly modified) data source that can be used for streaming. - - RTPSink* createRTPSinkForTrackNumber(u_int32_t trackNumber, Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic); - // Creates a "RTPSink" object that would be appropriate for streaming the specified track, - // or NULL if no appropriate "RTPSink" exists - - class OggTrackTable& trackTable() { return *fTrackTable; } - -private: - OggFile(UsageEnvironment& env, char const* fileName, onCreationFunc* onCreation, void* onCreationClientData); - // called only by createNew() - virtual ~OggFile(); - - static void handleEndOfBosPageParsing(void* clientData); - void handleEndOfBosPageParsing(); - - void addTrack(OggTrack* newTrack); - void removeDemux(OggDemux* demux); - -private: - friend class OggFileParser; - friend class OggDemux; - char const* fFileName; - onCreationFunc* fOnCreation; - void* fOnCreationClientData; - - class OggTrackTable* fTrackTable; - HashTable* fDemuxesTable; - class OggFileParser* fParserForInitialization; -}; - -class OggTrack { -public: - OggTrack(); - virtual ~OggTrack(); - - // track parameters - u_int32_t trackNumber; // bitstream serial number - char const* mimeType; // NULL if not known - - unsigned samplingFrequency, numChannels; // for audio tracks - unsigned estBitrate; // estimate, in kbps (for RTCP) - - // Special headers for Vorbis audio, Theora video, and Opus audio tracks: - struct _vtoHdrs { - u_int8_t* header[3]; // "identification", "comment", "setup" - unsigned headerSize[3]; - - // Fields specific to Vorbis audio: - unsigned blocksize[2]; // samples per frame (packet) - unsigned uSecsPerPacket[2]; // computed as (blocksize[i]*1000000)/samplingFrequency - unsigned vorbis_mode_count; - unsigned ilog_vorbis_mode_count_minus_1; - u_int8_t* vorbis_mode_blockflag; - // an array (of size "vorbis_mode_count") of indexes into the (2-entry) "blocksize" array - - // Fields specific to Theora video: - u_int8_t KFGSHIFT; - unsigned uSecsPerFrame; - - } vtoHdrs; - - Boolean weNeedHeaders() const { - return - vtoHdrs.header[0] == NULL || - vtoHdrs.header[1] == NULL || - (vtoHdrs.header[2] == NULL && strcmp(mimeType, "audio/OPUS") != 0); - } -}; - -class OggTrackTableIterator { -public: - OggTrackTableIterator(class OggTrackTable& ourTable); - virtual ~OggTrackTableIterator(); - - OggTrack* next(); - -private: - HashTable::Iterator* fIter; -}; - -class OggDemux: public Medium { -public: - FramedSource* newDemuxedTrack(u_int32_t& resultTrackNumber); - // Returns a new stream ("FramedSource" subclass) that represents the next media track - // from the file. This function returns NULL when no more media tracks exist. - - FramedSource* newDemuxedTrackByTrackNumber(unsigned trackNumber); - // As above, but creates a new stream for a specific track number within the Matroska file. - // (You should not call this function more than once with the same track number.) - - // Note: We assume that: - // - Every track created by "newDemuxedTrack()" is later read - // - All calls to "newDemuxedTrack()" are made before any track is read - -protected: - friend class OggFile; - friend class OggFileParser; - class OggDemuxedTrack* lookupDemuxedTrack(u_int32_t trackNumber); - - OggDemux(OggFile& ourFile); - virtual ~OggDemux(); - -private: - friend class OggDemuxedTrack; - void removeTrack(u_int32_t trackNumber); - void continueReading(); // called by a demuxed track to tell us that it has a pending read ("doGetNextFrame()") - - static void handleEndOfFile(void* clientData); - void handleEndOfFile(); - -private: - OggFile& fOurFile; - class OggFileParser* fOurParser; - HashTable* fDemuxedTracksTable; - OggTrackTableIterator* fIter; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/OggFileServerDemux.hh b/project/3rdparty/include/live555/liveMedia/OggFileServerDemux.hh deleted file mode 100644 index 1abf35fa5..000000000 --- a/project/3rdparty/include/live555/liveMedia/OggFileServerDemux.hh +++ /dev/null @@ -1,85 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A server demultiplexor for an Ogg file -// C++ header - -#ifndef _OGG_FILE_SERVER_DEMUX_HH -#define _OGG_FILE_SERVER_DEMUX_HH - -#ifndef _SERVER_MEDIA_SESSION_HH -#include "ServerMediaSession.hh" -#endif - -#ifndef _OGG_FILE_HH -#include "OggFile.hh" -#endif - -class OggFileServerDemux: public Medium { -public: - typedef void (onCreationFunc)(OggFileServerDemux* newDemux, void* clientData); - static void createNew(UsageEnvironment& env, char const* fileName, - onCreationFunc* onCreation, void* onCreationClientData); - // Note: Unlike most "createNew()" functions, this one doesn't return a new object immediately. Instead, because this class - // requires file reading (to parse the Ogg 'Track' headers) before a new object can be initialized, the creation of a new - // object is signalled by calling - from the event loop - an 'onCreationFunc' that is passed as a parameter to "createNew()". - - ServerMediaSubsession* newServerMediaSubsession(); - ServerMediaSubsession* newServerMediaSubsession(u_int32_t& resultTrackNumber); - // Returns a new "ServerMediaSubsession" object that represents the next media track - // from the file. This function returns NULL when no more media tracks exist. - - ServerMediaSubsession* newServerMediaSubsessionByTrackNumber(u_int32_t trackNumber); - // As above, but creates a new "ServerMediaSubsession" object for a specific track number - // within the Ogg file. - // (You should not call this function more than once with the same track number.) - - // The following public: member functions are called only by the "ServerMediaSubsession" objects: - - OggFile* ourOggFile() { return fOurOggFile; } - char const* fileName() const { return fFileName; } - - FramedSource* newDemuxedTrack(unsigned clientSessionId, u_int32_t trackNumber); - // Used by the "ServerMediaSubsession" objects to implement their "createNewStreamSource()" virtual function. - -private: - OggFileServerDemux(UsageEnvironment& env, char const* fileName, - onCreationFunc* onCreation, void* onCreationClientData); - // called only by createNew() - virtual ~OggFileServerDemux(); - - static void onOggFileCreation(OggFile* newFile, void* clientData); - void onOggFileCreation(OggFile* newFile); - - static void onDemuxDeletion(void* clientData, OggDemux* demuxBeingDeleted); - void onDemuxDeletion(OggDemux* demuxBeingDeleted); - -private: - char const* fFileName; - onCreationFunc* fOnCreation; - void* fOnCreationClientData; - OggFile* fOurOggFile; - - // Used to implement "newServerMediaSubsession()": - OggTrackTableIterator* fIter; - - // Used to set up demuxing, to implement "newDemuxedTrack()": - unsigned fLastClientSessionId; - OggDemux* fLastCreatedDemux; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/OggFileSink.hh b/project/3rdparty/include/live555/liveMedia/OggFileSink.hh deleted file mode 100644 index c657208e0..000000000 --- a/project/3rdparty/include/live555/liveMedia/OggFileSink.hh +++ /dev/null @@ -1,79 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// 'Ogg' File Sink (recording a single media track only) -// C++ header - -#ifndef _OGG_FILE_SINK_HH -#define _OGG_FILE_SINK_HH - -#ifndef _FILE_SINK_HH -#include "FileSink.hh" -#endif - -class OggFileSink: public FileSink { -public: - static OggFileSink* createNew(UsageEnvironment& env, char const* fileName, - unsigned samplingFrequency = 0, // used for granule_position - char const* configStr = NULL, - // "configStr" is an optional 'SDP format' string (Base64-encoded) - // representing 'packed configuration headers' ("identification", "comment", "setup") - // to prepend to the output. (For 'Vorbis" audio and 'Theora' video.) - unsigned bufferSize = 100000, - Boolean oneFilePerFrame = False); - // See "FileSink.hh" for a description of these parameters. - -protected: - OggFileSink(UsageEnvironment& env, FILE* fid, unsigned samplingFrequency, char const* configStr, - unsigned bufferSize, char const* perFrameFileNamePrefix); - // called only by createNew() - virtual ~OggFileSink(); - -protected: // redefined virtual functions: - virtual Boolean continuePlaying(); - virtual void addData(unsigned char const* data, unsigned dataSize, - struct timeval presentationTime); - virtual void afterGettingFrame(unsigned frameSize, unsigned numTruncatedBytes, - struct timeval presentationTime); - -private: - static void ourOnSourceClosure(void* clientData); - void ourOnSourceClosure(); - -private: - unsigned fSamplingFrequency; - char const* fConfigStr; - Boolean fHaveWrittenFirstFrame, fHaveSeenEOF; - struct timeval fFirstPresentationTime; - int64_t fGranulePosition; - int64_t fGranulePositionAdjustment; // used to ensure that "fGranulePosition" stays monotonic - u_int32_t fPageSequenceNumber; - u_int8_t fPageHeaderBytes[27]; - // the header of each Ogg page, through the "number_page_segments" byte - - // Special fields used for Theora video: - Boolean fIsTheora; - u_int64_t fGranuleIncrementPerFrame; // == 1 << KFGSHIFT - - // Because the last Ogg page before EOF needs to have a special 'eos' bit set in the header, - // we need to defer the writing of each incoming frame. To do this, we maintain a 2nd buffer: - unsigned char* fAltBuffer; - unsigned fAltFrameSize, fAltNumTruncatedBytes; - struct timeval fAltPresentationTime; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/OnDemandServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/OnDemandServerMediaSubsession.hh deleted file mode 100644 index 2ef86795e..000000000 --- a/project/3rdparty/include/live555/liveMedia/OnDemandServerMediaSubsession.hh +++ /dev/null @@ -1,233 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand. -// C++ header - -#ifndef _ON_DEMAND_SERVER_MEDIA_SUBSESSION_HH -#define _ON_DEMAND_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _SERVER_MEDIA_SESSION_HH -#include "ServerMediaSession.hh" -#endif -#ifndef _RTP_SINK_HH -#include "RTPSink.hh" -#endif -#ifndef _BASIC_UDP_SINK_HH -#include "BasicUDPSink.hh" -#endif -#ifndef _RTCP_HH -#include "RTCP.hh" -#endif - -class OnDemandServerMediaSubsession: public ServerMediaSubsession { -protected: // we're a virtual base class - OnDemandServerMediaSubsession(UsageEnvironment& env, Boolean reuseFirstSource, - portNumBits initialPortNum = 6970, - Boolean multiplexRTCPWithRTP = False); - virtual ~OnDemandServerMediaSubsession(); - -protected: // redefined virtual functions - virtual char const* sdpLines(int addressFamily); - virtual void getStreamParameters(unsigned clientSessionId, - struct sockaddr_storage const& clientAddress, - Port const& clientRTPPort, - Port const& clientRTCPPort, - int tcpSocketNum, - unsigned char rtpChannelId, - unsigned char rtcpChannelId, - TLSState* tlsState, - struct sockaddr_storage& destinationAddress, - u_int8_t& destinationTTL, - Boolean& isMulticast, - Port& serverRTPPort, - Port& serverRTCPPort, - void*& streamToken); - virtual void startStream(unsigned clientSessionId, void* streamToken, - TaskFunc* rtcpRRHandler, - void* rtcpRRHandlerClientData, - unsigned short& rtpSeqNum, - unsigned& rtpTimestamp, - ServerRequestAlternativeByteHandler* serverRequestAlternativeByteHandler, - void* serverRequestAlternativeByteHandlerClientData); - virtual void pauseStream(unsigned clientSessionId, void* streamToken); - virtual void seekStream(unsigned clientSessionId, void* streamToken, double& seekNPT, double streamDuration, u_int64_t& numBytes); - virtual void seekStream(unsigned clientSessionId, void* streamToken, char*& absStart, char*& absEnd); - virtual void nullSeekStream(unsigned clientSessionId, void* streamToken, - double streamEndTime, u_int64_t& numBytes); - virtual void setStreamScale(unsigned clientSessionId, void* streamToken, float scale); - virtual float getCurrentNPT(void* streamToken); - virtual FramedSource* getStreamSource(void* streamToken); - virtual void getRTPSinkandRTCP(void* streamToken, - RTPSink const*& rtpSink, RTCPInstance const*& rtcp); - virtual void deleteStream(unsigned clientSessionId, void*& streamToken); - -protected: // new virtual functions, possibly redefined by subclasses - virtual char const* getAuxSDPLine(RTPSink* rtpSink, - FramedSource* inputSource); - virtual void seekStreamSource(FramedSource* inputSource, double& seekNPT, double streamDuration, u_int64_t& numBytes); - // This routine is used to seek by relative (i.e., NPT) time. - // "streamDuration", if >0.0, specifies how much data to stream, past "seekNPT". (If <=0.0, all remaining data is streamed.) - // "numBytes" returns the size (in bytes) of the data to be streamed, or 0 if unknown or unlimited. - virtual void seekStreamSource(FramedSource* inputSource, char*& absStart, char*& absEnd); - // This routine is used to seek by 'absolute' time. - // "absStart" should be a string of the form "YYYYMMDDTHHMMSSZ" or "YYYYMMDDTHHMMSS.Z". - // "absEnd" should be either NULL (for no end time), or a string of the same form as "absStart". - // These strings may be modified in-place, or can be reassigned to a newly-allocated value (after delete[]ing the original). - virtual void setStreamSourceScale(FramedSource* inputSource, float scale); - virtual void setStreamSourceDuration(FramedSource* inputSource, double streamDuration, u_int64_t& numBytes); - virtual void closeStreamSource(FramedSource* inputSource); - -protected: // new virtual functions, defined by all subclasses - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, - unsigned& estBitrate) = 0; - // "estBitrate" is the stream's estimated bitrate, in kbps - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic, - FramedSource* inputSource) = 0; - -protected: // new virtual functions, may be redefined by a subclass: - virtual Groupsock* createGroupsock(struct sockaddr_storage const& addr, Port port); - virtual RTCPInstance* createRTCP(Groupsock* RTCPgs, unsigned totSessionBW, /* in kbps */ - unsigned char const* cname, RTPSink* sink); - -public: - void multiplexRTCPWithRTP() { fMultiplexRTCPWithRTP = True; } - // An alternative to passing the "multiplexRTCPWithRTP" parameter as True in the constructor - - void setRTCPAppPacketHandler(RTCPAppHandlerFunc* handler, void* clientData); - // Sets a handler to be called if a RTCP "APP" packet arrives from any future client. - // (Any current clients are not affected; any "APP" packets from them will continue to be - // handled by whatever handler existed when the client sent its first RTSP "PLAY" command.) - // (Call with (NULL, NULL) to remove an existing handler - for future clients only) - - void sendRTCPAppPacket(u_int8_t subtype, char const* name, - u_int8_t* appDependentData, unsigned appDependentDataSize); - // Sends a custom RTCP "APP" packet to the most recent client (if "reuseFirstSource" was False), - // or to all current clients (if "reuseFirstSource" was True). - // The parameters correspond to their - // respective fields as described in the RTP/RTCP definition (RFC 3550). - // Note that only the low-order 5 bits of "subtype" are used, and only the first 4 bytes - // of "name" are used. (If "name" has fewer than 4 bytes, or is NULL, - // then the remaining bytes are '\0'.) - -protected: - void setSDPLinesFromRTPSink(RTPSink* rtpSink, FramedSource* inputSource, - unsigned estBitrate); - // used to implement "sdpLines()" - -protected: - char* fSDPLines; - u_int8_t* fMIKEYStateMessage; // used if we're streaming SRTP - unsigned fMIKEYStateMessageSize; // ditto - HashTable* fDestinationsHashTable; // indexed by client session id - -private: - Boolean fReuseFirstSource; - portNumBits fInitialPortNum; - Boolean fMultiplexRTCPWithRTP; - void* fLastStreamToken; - char fCNAME[100]; // for RTCP - RTCPAppHandlerFunc* fAppHandlerTask; - void* fAppHandlerClientData; - friend class StreamState; -}; - - -// A class that represents the state of an ongoing stream. This is used only internally, in the implementation of -// "OnDemandServerMediaSubsession", but we expose the definition here, in case subclasses of "OnDemandServerMediaSubsession" -// want to access it. - -class Destinations { -public: - Destinations(struct sockaddr_storage const& destAddr, - Port const& rtpDestPort, - Port const& rtcpDestPort) - : isTCP(False), addr(destAddr), rtpPort(rtpDestPort), rtcpPort(rtcpDestPort) { - } - Destinations(int tcpSockNum, unsigned char rtpChanId, unsigned char rtcpChanId, - TLSState* tlsSt) - : isTCP(True), rtpPort(0) /*dummy*/, rtcpPort(0) /*dummy*/, - tcpSocketNum(tcpSockNum), rtpChannelId(rtpChanId), rtcpChannelId(rtcpChanId), - tlsState(tlsSt) { - } - -public: - Boolean isTCP; - struct sockaddr_storage addr; - Port rtpPort; - Port rtcpPort; - int tcpSocketNum; - unsigned char rtpChannelId, rtcpChannelId; - TLSState* tlsState; -}; - -class StreamState { -public: - StreamState(OnDemandServerMediaSubsession& master, - Port const& serverRTPPort, Port const& serverRTCPPort, - RTPSink* rtpSink, BasicUDPSink* udpSink, - unsigned totalBW, FramedSource* mediaSource, - Groupsock* rtpGS, Groupsock* rtcpGS); - virtual ~StreamState(); - - void startPlaying(Destinations* destinations, unsigned clientSessionId, - TaskFunc* rtcpRRHandler, void* rtcpRRHandlerClientData, - ServerRequestAlternativeByteHandler* serverRequestAlternativeByteHandler, - void* serverRequestAlternativeByteHandlerClientData); - void pause(); - void sendRTCPAppPacket(u_int8_t subtype, char const* name, - u_int8_t* appDependentData, unsigned appDependentDataSize); - void endPlaying(Destinations* destinations, unsigned clientSessionId); - void reclaim(); - - unsigned& referenceCount() { return fReferenceCount; } - - Port const& serverRTPPort() const { return fServerRTPPort; } - Port const& serverRTCPPort() const { return fServerRTCPPort; } - - RTPSink* rtpSink() const { return fRTPSink; } - RTCPInstance* rtcpInstance() const { return fRTCPInstance; } - - float streamDuration() const { return fStreamDuration; } - - FramedSource* mediaSource() const { return fMediaSource; } - float& startNPT() { return fStartNPT; } - -private: - OnDemandServerMediaSubsession& fMaster; - Boolean fAreCurrentlyPlaying; - unsigned fReferenceCount; - - Port fServerRTPPort, fServerRTCPPort; - - RTPSink* fRTPSink; - BasicUDPSink* fUDPSink; - - float fStreamDuration; - unsigned fTotalBW; - RTCPInstance* fRTCPInstance; - - FramedSource* fMediaSource; - float fStartNPT; // initial 'normal play time'; reset after each seek - - Groupsock* fRTPgs; - Groupsock* fRTCPgs; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/OutputFile.hh b/project/3rdparty/include/live555/liveMedia/OutputFile.hh deleted file mode 100644 index d0212752f..000000000 --- a/project/3rdparty/include/live555/liveMedia/OutputFile.hh +++ /dev/null @@ -1,31 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Common routines for opening/closing named output files -// C++ header - -#ifndef _OUTPUT_FILE_HH -#define _OUTPUT_FILE_HH - -#include "../UsageEnvironment/UsageEnvironment.hh" -#include - -FILE* OpenOutputFile(UsageEnvironment& env, char const* fileName); - -void CloseOutputFile(FILE* fid); - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/PassiveServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/PassiveServerMediaSubsession.hh deleted file mode 100644 index f81af6031..000000000 --- a/project/3rdparty/include/live555/liveMedia/PassiveServerMediaSubsession.hh +++ /dev/null @@ -1,83 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that represents an existing -// 'RTPSink', rather than one that creates new 'RTPSink's on demand. -// C++ header - -#ifndef _PASSIVE_SERVER_MEDIA_SUBSESSION_HH -#define _PASSIVE_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _SERVER_MEDIA_SESSION_HH -#include "ServerMediaSession.hh" -#endif - -#ifndef _RTP_SINK_HH -#include "RTPSink.hh" -#endif -#ifndef _RTCP_HH -#include "RTCP.hh" -#endif - -class PassiveServerMediaSubsession: public ServerMediaSubsession { -public: - static PassiveServerMediaSubsession* createNew(RTPSink& rtpSink, - RTCPInstance* rtcpInstance = NULL); - -protected: - PassiveServerMediaSubsession(RTPSink& rtpSink, RTCPInstance* rtcpInstance); - // called only by createNew(); - virtual ~PassiveServerMediaSubsession(); - - virtual Boolean rtcpIsMuxed(); - -protected: // redefined virtual functions - virtual char const* sdpLines(int addressFamily); - virtual void getStreamParameters(unsigned clientSessionId, - struct sockaddr_storage const& clientAddress, - Port const& clientRTPPort, - Port const& clientRTCPPort, - int tcpSocketNum, - unsigned char rtpChannelId, - unsigned char rtcpChannelId, - TLSState* tlsSTate, - struct sockaddr_storage& destinationAddress, - u_int8_t& destinationTTL, - Boolean& isMulticast, - Port& serverRTPPort, - Port& serverRTCPPort, - void*& streamToken); - virtual void startStream(unsigned clientSessionId, void* streamToken, - TaskFunc* rtcpRRHandler, - void* rtcpRRHandlerClientData, - unsigned short& rtpSeqNum, - unsigned& rtpTimestamp, - ServerRequestAlternativeByteHandler* serverRequestAlternativeByteHandler, - void* serverRequestAlternativeByteHandlerClientData); - virtual float getCurrentNPT(void* streamToken); - virtual void getRTPSinkandRTCP(void* streamToken, - RTPSink const*& rtpSink, RTCPInstance const*& rtcp); - virtual void deleteStream(unsigned clientSessionId, void*& streamToken); - -protected: - char* fSDPLines; - RTPSink& fRTPSink; - RTCPInstance* fRTCPInstance; - HashTable* fClientRTCPSourceRecords; // indexed by client session id; used to implement RTCP "RR" handling -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/ProxyServerMediaSession.hh b/project/3rdparty/include/live555/liveMedia/ProxyServerMediaSession.hh deleted file mode 100644 index 9dba2db75..000000000 --- a/project/3rdparty/include/live555/liveMedia/ProxyServerMediaSession.hh +++ /dev/null @@ -1,238 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A subclass of "ServerMediaSession" that can be used to create a (unicast) RTSP servers that acts as a 'proxy' for -// another (unicast or multicast) RTSP/RTP stream. -// C++ header - -#ifndef _PROXY_SERVER_MEDIA_SESSION_HH -#define _PROXY_SERVER_MEDIA_SESSION_HH - -#ifndef _SERVER_MEDIA_SESSION_HH -#include "ServerMediaSession.hh" -#endif -#ifndef _MEDIA_SESSION_HH -#include "MediaSession.hh" -#endif -#ifndef _RTSP_CLIENT_HH -#include "RTSPClient.hh" -#endif -#ifndef _MEDIA_TRANSCODING_TABLE_HH -#include "MediaTranscodingTable.hh" -#endif - -// A subclass of "RTSPClient", used to refer to the particular "ProxyServerMediaSession" object being used. -// It is used only within the implementation of "ProxyServerMediaSession", but is defined here, in case developers wish to -// subclass it. - -class ProxyRTSPClient: public RTSPClient { -public: - ProxyRTSPClient(class ProxyServerMediaSession& ourServerMediaSession, char const* rtspURL, - char const* username, char const* password, - portNumBits tunnelOverHTTPPortNum, int verbosityLevel, int socketNumToServer); - virtual ~ProxyRTSPClient(); - - void continueAfterDESCRIBE(char const* sdpDescription); - void continueAfterLivenessCommand(int resultCode, Boolean serverSupportsGetParameter); - void continueAfterSETUP(int resultCode); - void continueAfterPLAY(int resultCode); - void scheduleReset(); - -private: - void reset(); - int connectToServer(int socketNum, portNumBits remotePortNum); - - Authenticator* auth() { return fOurAuthenticator; } - - void scheduleLivenessCommand(); - static void sendLivenessCommand(void* clientData); - void doReset(); - static void doReset(void* clientData); - - void scheduleDESCRIBECommand(); - static void sendDESCRIBE(void* clientData); - void sendDESCRIBE(); - - static void subsessionTimeout(void* clientData); - void handleSubsessionTimeout(); - -private: - friend class ProxyServerMediaSession; - friend class ProxyServerMediaSubsession; - ProxyServerMediaSession& fOurServerMediaSession; - char* fOurURL; - Authenticator* fOurAuthenticator; - Boolean fStreamRTPOverTCP; - class ProxyServerMediaSubsession *fSetupQueueHead, *fSetupQueueTail; - unsigned fNumSetupsDone; - unsigned fNextDESCRIBEDelay; // in seconds - Boolean fServerSupportsGetParameter, fLastCommandWasPLAY, fDoneDESCRIBE; - TaskToken fLivenessCommandTask, fDESCRIBECommandTask, fSubsessionTimerTask, fResetTask; -}; - - -typedef ProxyRTSPClient* -createNewProxyRTSPClientFunc(ProxyServerMediaSession& ourServerMediaSession, - char const* rtspURL, - char const* username, char const* password, - portNumBits tunnelOverHTTPPortNum, int verbosityLevel, - int socketNumToServer); -ProxyRTSPClient* -defaultCreateNewProxyRTSPClientFunc(ProxyServerMediaSession& ourServerMediaSession, - char const* rtspURL, - char const* username, char const* password, - portNumBits tunnelOverHTTPPortNum, int verbosityLevel, - int socketNumToServer); - -class ProxyServerMediaSession: public ServerMediaSession { -public: - static ProxyServerMediaSession* createNew(UsageEnvironment& env, - GenericMediaServer* ourMediaServer, // Note: We can be used by just one server - char const* inputStreamURL, // the "rtsp://" URL of the stream we'll be proxying - char const* streamName = NULL, - char const* username = NULL, char const* password = NULL, - portNumBits tunnelOverHTTPPortNum = 0, - // for streaming the *proxied* (i.e., back-end) stream - int verbosityLevel = 0, - int socketNumToServer = -1, - MediaTranscodingTable* transcodingTable = NULL); - // Hack: "tunnelOverHTTPPortNum" == 0xFFFF (i.e., all-ones) means: Stream RTP/RTCP-over-TCP, but *not* using HTTP - // "verbosityLevel" == 1 means display basic proxy setup info; "verbosityLevel" == 2 means display RTSP client protocol also. - // If "socketNumToServer" is >= 0, then it is the socket number of an already-existing TCP connection to the server. - // (In this case, "inputStreamURL" must point to the socket's endpoint, so that it can be accessed via the socket.) - - virtual ~ProxyServerMediaSession(); - - char const* url() const; - - char describeCompletedFlag; - // initialized to 0; set to 1 when the back-end "DESCRIBE" completes. - // (This can be used as a 'watch variable' in "doEventLoop()".) - Boolean describeCompletedSuccessfully() const { return fClientMediaSession != NULL; } - // This can be used - along with "describeCompletedFlag" - to check whether the back-end "DESCRIBE" completed *successfully*. - -protected: - ProxyServerMediaSession(UsageEnvironment& env, GenericMediaServer* ourMediaServer, - char const* inputStreamURL, char const* streamName, - char const* username, char const* password, - portNumBits tunnelOverHTTPPortNum, int verbosityLevel, - int socketNumToServer, - MediaTranscodingTable* transcodingTable, - createNewProxyRTSPClientFunc* ourCreateNewProxyRTSPClientFunc - = defaultCreateNewProxyRTSPClientFunc, - portNumBits initialPortNum = 6970, - Boolean multiplexRTCPWithRTP = False); - - // If you subclass "ProxyRTSPClient", then you will also need to define your own function - // - with signature "createNewProxyRTSPClientFunc" (see above) - that creates a new object - // of this subclass. You should also subclass "ProxyServerMediaSession" and, in your - // subclass's constructor, initialize the parent class (i.e., "ProxyServerMediaSession") - // constructor by passing your new function as the "ourCreateNewProxyRTSPClientFunc" - // parameter. - - // Subclasses may redefine the following functions, if they want "ProxyServerSubsession"s - // to create subclassed "Groupsock" and/or "RTCPInstance" objects: - virtual Groupsock* createGroupsock(struct sockaddr_storage const& addr, Port port); - virtual RTCPInstance* createRTCP(Groupsock* RTCPgs, unsigned totSessionBW, /* in kbps */ - unsigned char const* cname, RTPSink* sink); - - virtual Boolean allowProxyingForSubsession(MediaSubsession const& mss); - // By default, this function always returns True. However, a subclass may redefine this - // if it wishes to restrict which subsessions of a stream get proxied - e.g., if it wishes - // to proxy only video tracks, but not audio (or other) tracks. - -protected: - GenericMediaServer* fOurMediaServer; - ProxyRTSPClient* fProxyRTSPClient; - MediaSession* fClientMediaSession; - -private: - friend class ProxyRTSPClient; - friend class ProxyServerMediaSubsession; - void continueAfterDESCRIBE(char const* sdpDescription); - void resetDESCRIBEState(); // undoes what was done by "contineAfterDESCRIBE()" - -private: - int fVerbosityLevel; - class PresentationTimeSessionNormalizer* fPresentationTimeSessionNormalizer; - createNewProxyRTSPClientFunc* fCreateNewProxyRTSPClientFunc; - MediaTranscodingTable* fTranscodingTable; - portNumBits fInitialPortNum; - Boolean fMultiplexRTCPWithRTP; -}; - - -////////// PresentationTimeSessionNormalizer and PresentationTimeSubsessionNormalizer definitions ////////// - -// The following two classes are used by proxies to convert incoming streams' presentation times into wall-clock-aligned -// presentation times that are suitable for our "RTPSink"s (for the corresponding outgoing streams). -// (For multi-subsession (i.e., audio+video) sessions, the outgoing streams' presentation times retain the same relative -// separation as those of the incoming streams.) - -class PresentationTimeSubsessionNormalizer: public FramedFilter { -public: - void setRTPSink(RTPSink* rtpSink) { fRTPSink = rtpSink; } - -private: - friend class PresentationTimeSessionNormalizer; - PresentationTimeSubsessionNormalizer(PresentationTimeSessionNormalizer& parent, FramedSource* inputSource, RTPSource* rtpSource, - char const* codecName, PresentationTimeSubsessionNormalizer* next); - // called only from within "PresentationTimeSessionNormalizer" - virtual ~PresentationTimeSubsessionNormalizer(); - - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - -private: // redefined virtual functions: - virtual void doGetNextFrame(); - -private: - PresentationTimeSessionNormalizer& fParent; - RTPSource* fRTPSource; - RTPSink* fRTPSink; - char const* fCodecName; - PresentationTimeSubsessionNormalizer* fNext; -}; - -class PresentationTimeSessionNormalizer: public Medium { -public: - PresentationTimeSessionNormalizer(UsageEnvironment& env); - virtual ~PresentationTimeSessionNormalizer(); - - PresentationTimeSubsessionNormalizer* - createNewPresentationTimeSubsessionNormalizer(FramedSource* inputSource, RTPSource* rtpSource, char const* codecName); - -private: // called only from within "~PresentationTimeSubsessionNormalizer": - friend class PresentationTimeSubsessionNormalizer; - void normalizePresentationTime(PresentationTimeSubsessionNormalizer* ssNormalizer, - struct timeval& toPT, struct timeval const& fromPT); - void removePresentationTimeSubsessionNormalizer(PresentationTimeSubsessionNormalizer* ssNormalizer); - -private: - PresentationTimeSubsessionNormalizer* fSubsessionNormalizers; - PresentationTimeSubsessionNormalizer* fMasterSSNormalizer; // used for subsessions that have been RTCP-synced - - struct timeval fPTAdjustment; // Added to (RTCP-synced) subsession presentation times to 'normalize' them with wall-clock time. -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/QCELPAudioRTPSource.hh b/project/3rdparty/include/live555/liveMedia/QCELPAudioRTPSource.hh deleted file mode 100644 index 49bec546d..000000000 --- a/project/3rdparty/include/live555/liveMedia/QCELPAudioRTPSource.hh +++ /dev/null @@ -1,39 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Qualcomm "PureVoice" (aka. "QCELP") Audio RTP Sources -// C++ header - -#ifndef _QCELP_AUDIO_RTP_SOURCE_HH -#define _QCELP_AUDIO_RTP_SOURCE_HH - -#ifndef _RTP_SOURCE_HH -#include "RTPSource.hh" -#endif - -class QCELPAudioRTPSource { -public: - static FramedSource* createNew(UsageEnvironment& env, - Groupsock* RTPgs, - RTPSource*& resultRTPSource, - unsigned char rtpPayloadFormat = 12, - unsigned rtpTimestampFrequency = 8000); - // This returns a source to read from, but "resultRTPSource" will - // point to RTP-related state. -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/QuickTimeFileSink.hh b/project/3rdparty/include/live555/liveMedia/QuickTimeFileSink.hh deleted file mode 100644 index 9311e5ad4..000000000 --- a/project/3rdparty/include/live555/liveMedia/QuickTimeFileSink.hh +++ /dev/null @@ -1,192 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A sink that generates a QuickTime file from a composite media session -// C++ header - -#ifndef _QUICKTIME_FILE_SINK_HH -#define _QUICKTIME_FILE_SINK_HH - -#ifndef _MEDIA_SESSION_HH -#include "MediaSession.hh" -#endif - -class QuickTimeFileSink: public Medium { -public: - static QuickTimeFileSink* createNew(UsageEnvironment& env, - MediaSession& inputSession, - char const* outputFileName, - unsigned bufferSize = 20000, - unsigned short movieWidth = 240, - unsigned short movieHeight = 180, - unsigned movieFPS = 15, - Boolean packetLossCompensate = False, - Boolean syncStreams = False, - Boolean generateHintTracks = False, - Boolean generateMP4Format = False); - - typedef void (afterPlayingFunc)(void* clientData); - Boolean startPlaying(afterPlayingFunc* afterFunc, - void* afterClientData); - - unsigned numActiveSubsessions() const { return fNumSubsessions; } - -protected: - QuickTimeFileSink(UsageEnvironment& env, MediaSession& inputSession, - char const* outputFileName, unsigned bufferSize, - unsigned short movieWidth, unsigned short movieHeight, - unsigned movieFPS, Boolean packetLossCompensate, - Boolean syncStreams, Boolean generateHintTracks, - Boolean generateMP4Format); - // called only by createNew() - virtual ~QuickTimeFileSink(); - - virtual void noteRecordedFrame(MediaSubsession& inputSubsession, - unsigned packetDataSize, struct timeval const& presentationTime); - -private: - Boolean continuePlaying(); - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - static void onSourceClosure(void* clientData); - void onSourceClosure1(); - static void onRTCPBye(void* clientData); - void completeOutputFile(); - -private: - friend class SubsessionIOState; - MediaSession& fInputSession; - FILE* fOutFid; - unsigned fBufferSize; - Boolean fPacketLossCompensate; - Boolean fSyncStreams, fGenerateMP4Format; - struct timeval fNewestSyncTime, fFirstDataTime; - Boolean fAreCurrentlyBeingPlayed; - afterPlayingFunc* fAfterFunc; - void* fAfterClientData; - unsigned fAppleCreationTime; - unsigned fLargestRTPtimestampFrequency; - unsigned fNumSubsessions, fNumSyncedSubsessions; - struct timeval fStartTime; - Boolean fHaveCompletedOutputFile; - -private: - ///// Definitions specific to the QuickTime file format: - - unsigned addWord64(u_int64_t word); - unsigned addWord(unsigned word); - unsigned addHalfWord(unsigned short halfWord); - unsigned addByte(unsigned char byte) { - putc(byte, fOutFid); - return 1; - } - unsigned addZeroWords(unsigned numWords); - unsigned add4ByteString(char const* str); - unsigned addArbitraryString(char const* str, - Boolean oneByteLength = True); - unsigned addAtomHeader(char const* atomName); - unsigned addAtomHeader64(char const* atomName); - // strlen(atomName) must be 4 - void setWord(int64_t filePosn, unsigned size); - void setWord64(int64_t filePosn, u_int64_t size); - - unsigned movieTimeScale() const {return fLargestRTPtimestampFrequency;} - - // Define member functions for outputting various types of atom: -#define _atom(name) unsigned addAtom_##name() - _atom(ftyp); // for MP4 format files - _atom(moov); - _atom(mvhd); - _atom(iods); // for MP4 format files - _atom(trak); - _atom(tkhd); - _atom(edts); - _atom(elst); - _atom(tref); - _atom(hint); - _atom(mdia); - _atom(mdhd); - _atom(hdlr); - _atom(minf); - _atom(smhd); - _atom(vmhd); - _atom(gmhd); - _atom(gmin); - unsigned addAtom_hdlr2(); - _atom(dinf); - _atom(dref); - _atom(alis); - _atom(stbl); - _atom(stsd); - unsigned addAtom_genericMedia(); - unsigned addAtom_soundMediaGeneral(); - _atom(ulaw); - _atom(alaw); - _atom(Qclp); - _atom(wave); - _atom(frma); - _atom(Fclp); - _atom(Hclp); - _atom(mp4a); -// _atom(wave); -// _atom(frma); - _atom(esds); - _atom(srcq); - _atom(h263); - _atom(avc1); - _atom(avcC); - _atom(mp4v); - _atom(rtp); - _atom(tims); - _atom(stts); - _atom(stss); - _atom(stsc); - _atom(stsz); - _atom(co64); - _atom(udta); - _atom(name); - _atom(hnti); - _atom(sdp); - _atom(hinf); - _atom(totl); - _atom(npck); - _atom(tpay); - _atom(trpy); - _atom(nump); - _atom(tpyl); - _atom(dmed); - _atom(dimm); - _atom(drep); - _atom(tmin); - _atom(tmax); - _atom(pmax); - _atom(dmax); - _atom(payt); - unsigned addAtom_dummy(); - -private: - unsigned short fMovieWidth, fMovieHeight; - unsigned fMovieFPS; - int64_t fMDATposition; - int64_t fMVHD_durationPosn; - unsigned fMaxTrackDurationM; // in movie time units - class SubsessionIOState* fCurrentIOState; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/QuickTimeGenericRTPSource.hh b/project/3rdparty/include/live555/liveMedia/QuickTimeGenericRTPSource.hh deleted file mode 100644 index 876a9a268..000000000 --- a/project/3rdparty/include/live555/liveMedia/QuickTimeGenericRTPSource.hh +++ /dev/null @@ -1,68 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP Sources containing generic QuickTime stream data, as defined in -// -// C++ header - -#ifndef _QUICKTIME_GENERIC_RTP_SOURCE_HH -#define _QUICKTIME_GENERIC_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class QuickTimeGenericRTPSource: public MultiFramedRTPSource { -public: - static QuickTimeGenericRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, unsigned rtpTimestampFrequency, - char const* mimeTypeString); - - // QuickTime-specific information, set from the QuickTime header - // in each packet. This, along with the data following the header, - // is used by receivers. - struct QTState { - char PCK; - unsigned timescale; - char* sdAtom; - unsigned sdAtomSize; - unsigned short width, height; - // later add other state as needed ##### - } qtState; - -protected: - virtual ~QuickTimeGenericRTPSource(); - -private: - QuickTimeGenericRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency, - char const* mimeTypeString); - // called only by createNew() - -private: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; - -private: - char const* fMIMEtypeString; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/RTCP.hh b/project/3rdparty/include/live555/liveMedia/RTCP.hh deleted file mode 100644 index d9eb73b83..000000000 --- a/project/3rdparty/include/live555/liveMedia/RTCP.hh +++ /dev/null @@ -1,250 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTCP -// C++ header - -#ifndef _RTCP_HH -#define _RTCP_HH - -#ifndef _RTP_SINK_HH -#include "RTPSink.hh" -#endif -#ifndef _RTP_SOURCE_HH -#include "RTPSource.hh" -#endif -#ifndef _SRTP_CRYPTOGRAPHIC_CONTEXT_HH -#include "SRTPCryptographicContext.hh" -#endif - -class SDESItem { -public: - SDESItem(unsigned char tag, unsigned char const* value); - - unsigned char const* data() const {return fData;} - unsigned totalSize() const; - -private: - unsigned char fData[2 + 0xFF]; // first 2 bytes are tag and length -}; - -typedef void RTCPAppHandlerFunc(void* clientData, - u_int8_t subtype, u_int32_t nameBytes/*big-endian order*/, - u_int8_t* appDependentData, unsigned appDependentDataSize); - -class RTCPMemberDatabase; // forward - -typedef void ByeWithReasonHandlerFunc(void* clientData, char const* reason); - -class RTCPInstance: public Medium { -public: - static RTCPInstance* createNew(UsageEnvironment& env, Groupsock* RTCPgs, - unsigned totSessionBW, /* in kbps */ - unsigned char const* cname, - RTPSink* sink, - RTPSource* source, - Boolean isSSMTransmitter = False, - SRTPCryptographicContext* crypto = NULL); - - static Boolean lookupByName(UsageEnvironment& env, char const* instanceName, - RTCPInstance*& resultInstance); - - unsigned numMembers() const; - unsigned totSessionBW() const { return fTotSessionBW; } - - void setupForSRTCP(); - - void setByeHandler(TaskFunc* handlerTask, void* clientData, - Boolean handleActiveParticipantsOnly = True); - // Assigns a handler routine to be called if a "BYE" arrives. - // The handler is called once only; for subsequent "BYE"s, - // "setByeHandler()" would need to be called again. - // If "handleActiveParticipantsOnly" is True, then the handler is called - // only if the SSRC is for a known sender (if we have a "RTPSource"), - // or if the SSRC is for a known receiver (if we have a "RTPSink"). - // This prevents (for example) the handler for a multicast receiver being - // called if some other multicast receiver happens to exit. - // If "handleActiveParticipantsOnly" is False, then the handler is called - // for any incoming RTCP "BYE". - // (To remove an existing "BYE" handler, call "setByeHandler()" again, with a "handlerTask" of NULL.) - void setByeWithReasonHandler(ByeWithReasonHandlerFunc* handlerTask, void* clientData, - Boolean handleActiveParticipantsOnly = True); - // Like "setByeHandler()", except that a string 'reason for the bye' (received as part of - // the RTCP "BYE" packet) is passed to the handler function (along with "clientData"). - // (The 'reason' parameter to the handler function will be a dynamically-allocated string, - // or NULL, and should be delete[]d by the handler function.) - void setSRHandler(TaskFunc* handlerTask, void* clientData); - void setRRHandler(TaskFunc* handlerTask, void* clientData); - // Assigns a handler routine to be called if a "SR" or "RR" packet - // (respectively) arrives. Unlike "setByeHandler()", the handler will - // be called once for each incoming "SR" or "RR". (To turn off handling, - // call the function again with "handlerTask" (and "clientData") as NULL.) - void setSpecificRRHandler(struct sockaddr_storage const& fromAddress, Port fromPort, - TaskFunc* handlerTask, void* clientData); - // Like "setRRHandler()", but applies only to "RR" packets that come from - // a specific source address and port. (Note that if both a specific - // and a general "RR" handler function is set, then both will be called.) - void unsetSpecificRRHandler(struct sockaddr_storage const& fromAddress, Port fromPort); // equivalent to setSpecificRRHandler(..., NULL, NULL); - void setAppHandler(RTCPAppHandlerFunc* handlerTask, void* clientData); - // Assigns a handler routine to be called whenever an "APP" packet arrives. (To turn off - // handling, call the function again with "handlerTask" (and "clientData") as NULL.) - void sendAppPacket(u_int8_t subtype, char const* name, - u_int8_t* appDependentData, unsigned appDependentDataSize); - // Sends a custom RTCP "APP" packet to the peer(s). The parameters correspond to their - // respective fields as described in the RTP/RTCP definition (RFC 3550). - // Note that only the low-order 5 bits of "subtype" are used, and only the first 4 bytes - // of "name" are used. (If "name" has fewer than 4 bytes, or is NULL, - // then the remaining bytes are '\0'.) - - Groupsock* RTCPgs() const { return fRTCPInterface.gs(); } - - void setStreamSocket(int sockNum, unsigned char streamChannelId, TLSState* tlsState); - void addStreamSocket(int sockNum, unsigned char streamChannelId, TLSState* tlsState); - void removeStreamSocket(int sockNum, unsigned char streamChannelId) { - fRTCPInterface.removeStreamSocket(sockNum, streamChannelId); - } - // hacks to allow sending RTP over TCP (RFC 2236, section 10.12) - - void setAuxilliaryReadHandler(AuxHandlerFunc* handlerFunc, - void* handlerClientData) { - fRTCPInterface.setAuxilliaryReadHandler(handlerFunc, - handlerClientData); - } - - void injectReport(u_int8_t const* packet, unsigned packetSize, struct sockaddr_storage const& fromAddress); - // Allows an outside party to inject an RTCP report (from other than the network interface) - -protected: - RTCPInstance(UsageEnvironment& env, Groupsock* RTPgs, unsigned totSessionBW, - unsigned char const* cname, - RTPSink* sink, RTPSource* source, - Boolean isSSMTransmitter, - SRTPCryptographicContext* crypto); - // called only by createNew() - virtual ~RTCPInstance(); - - virtual void noteArrivingRR(struct sockaddr_storage const& fromAddressAndPort, - int tcpSocketNum, unsigned char tcpStreamChannelId); - - void incomingReportHandler1(); - -private: - // redefined virtual functions: - virtual Boolean isRTCPInstance() const; - -private: - Boolean addReport(Boolean alwaysAdd = False); - void addSR(); - void addRR(); - void enqueueCommonReportPrefix(unsigned char packetType, u_int32_t SSRC, - unsigned numExtraWords = 0); - void enqueueCommonReportSuffix(); - void enqueueReportBlock(RTPReceptionStats* receptionStats); - void addSDES(); - void addBYE(char const* reason); - - void sendBuiltPacket(); - - static void onExpire(RTCPInstance* instance); - void onExpire1(); - - static void incomingReportHandler(RTCPInstance* instance, int /*mask*/); - void processIncomingReport(unsigned packetSize, struct sockaddr_storage const& fromAddressAndPort, - int tcpSocketNum, unsigned char tcpStreamChannelId); - void onReceive(int typeOfPacket, int totPacketSize, u_int32_t ssrc); - -private: - u_int8_t* fInBuf; - unsigned fNumBytesAlreadyRead; - OutPacketBuffer* fOutBuf; - RTPInterface fRTCPInterface; - unsigned fTotSessionBW; - RTPSink* fSink; - RTPSource* fSource; - Boolean fIsSSMTransmitter; - SRTPCryptographicContext* fCrypto; - - SDESItem fCNAME; - RTCPMemberDatabase* fKnownMembers; - unsigned fOutgoingReportCount; // used for SSRC member aging - - double fAveRTCPSize; - int fIsInitial; - double fPrevReportTime; - double fNextReportTime; - int fPrevNumMembers; - - int fLastSentSize; - int fLastReceivedSize; - u_int32_t fLastReceivedSSRC; - int fTypeOfEvent; - int fTypeOfPacket; - Boolean fHaveJustSentPacket; - unsigned fLastPacketSentSize; - - TaskFunc* fByeHandlerTask; - ByeWithReasonHandlerFunc* fByeWithReasonHandlerTask; - void* fByeHandlerClientData; - Boolean fByeHandleActiveParticipantsOnly; - TaskFunc* fSRHandlerTask; - void* fSRHandlerClientData; - TaskFunc* fRRHandlerTask; - void* fRRHandlerClientData; - AddressPortLookupTable* fSpecificRRHandlerTable; - RTCPAppHandlerFunc* fAppHandlerTask; - void* fAppHandlerClientData; - -public: // because this stuff is used by an external "C" function - void schedule(double nextTime); - void reschedule(double nextTime); - void sendReport(); - void sendBYE(char const* reason = NULL); - int typeOfEvent() {return fTypeOfEvent;} - int sentPacketSize() {return fLastSentSize;} - int packetType() {return fTypeOfPacket;} - int receivedPacketSize() {return fLastReceivedSize;} - int checkNewSSRC(); - void removeLastReceivedSSRC(); - void removeSSRC(u_int32_t ssrc, Boolean alsoRemoveStats); -}; - -// RTCP packet types: -const unsigned char RTCP_PT_SR = 200; -const unsigned char RTCP_PT_RR = 201; -const unsigned char RTCP_PT_SDES = 202; -const unsigned char RTCP_PT_BYE = 203; -const unsigned char RTCP_PT_APP = 204; -const unsigned char RTCP_PT_RTPFB = 205; // Generic RTP Feedback [RFC4585] -const unsigned char RTCP_PT_PSFB = 206; // Payload-specific [RFC4585] -const unsigned char RTCP_PT_XR = 207; // extended report [RFC3611] -const unsigned char RTCP_PT_AVB = 208; // AVB RTCP packet ["Standard for Layer 3 Transport Protocol for Time Sensitive Applications in Local Area Networks." Work in progress.] -const unsigned char RTCP_PT_RSI = 209; // Receiver Summary Information [RFC5760] -const unsigned char RTCP_PT_TOKEN = 210; // Port Mapping [RFC6284] -const unsigned char RTCP_PT_IDMS = 211; // IDMS Settings [RFC7272] - -// SDES tags: -const unsigned char RTCP_SDES_END = 0; -const unsigned char RTCP_SDES_CNAME = 1; -const unsigned char RTCP_SDES_NAME = 2; -const unsigned char RTCP_SDES_EMAIL = 3; -const unsigned char RTCP_SDES_PHONE = 4; -const unsigned char RTCP_SDES_LOC = 5; -const unsigned char RTCP_SDES_TOOL = 6; -const unsigned char RTCP_SDES_NOTE = 7; -const unsigned char RTCP_SDES_PRIV = 8; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/RTPInterface.hh b/project/3rdparty/include/live555/liveMedia/RTPInterface.hh deleted file mode 100644 index 6eda73ec4..000000000 --- a/project/3rdparty/include/live555/liveMedia/RTPInterface.hh +++ /dev/null @@ -1,115 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// An abstraction of a network interface used for RTP (or RTCP). -// (This allows the RTP-over-TCP hack (RFC 2326, section 10.12) to -// be implemented transparently.) -// C++ header - -#ifndef _RTP_INTERFACE_HH -#define _RTP_INTERFACE_HH - -#ifndef _MEDIA_HH -#include "Media.hh" -#endif -#ifndef _TLS_STATE_HH -#include "TLSState.hh" -#endif -#ifndef _GROUPSOCK_HH -#include "../groupsock/Groupsock.hh" -#endif - -// Typedef for an optional auxilliary handler function, to be called -// when each new packet is read: -typedef void AuxHandlerFunc(void* clientData, unsigned char* packet, - unsigned& packetSize); - -typedef void ServerRequestAlternativeByteHandler(void* instance, u_int8_t requestByte); -// A hack that allows a handler for RTP/RTCP packets received over TCP to process RTSP commands that may also appear within -// the same TCP connection. A RTSP server implementation would supply a function like this - as a parameter to -// "ServerMediaSubsession::startStream()". - -class RTPInterface { -public: - RTPInterface(Medium* owner, Groupsock* gs); - virtual ~RTPInterface(); - - Groupsock* gs() const { return fGS; } - - void setStreamSocket(int sockNum, unsigned char streamChannelId, TLSState* tlsState); - void addStreamSocket(int sockNum, unsigned char streamChannelId, TLSState* tlsState); - void removeStreamSocket(int sockNum, unsigned char streamChannelId); - static void setServerRequestAlternativeByteHandler(UsageEnvironment& env, int socketNum, - ServerRequestAlternativeByteHandler* handler, void* clientData); - static void clearServerRequestAlternativeByteHandler(UsageEnvironment& env, int socketNum); - - Boolean sendPacket(unsigned char* packet, unsigned packetSize); - void startNetworkReading(TaskScheduler::BackgroundHandlerProc* - handlerProc); - Boolean handleRead(unsigned char* buffer, unsigned bufferMaxSize, - // out parameters: - unsigned& bytesRead, struct sockaddr_storage& fromAddress, - int& tcpSocketNum, unsigned char& tcpStreamChannelId, - Boolean& packetReadWasIncomplete); - // Note: If "tcpSocketNum" < 0, then the packet was received over UDP, and "tcpStreamChannelId" - // is undefined (and irrelevant). - - - // Otherwise (if "tcpSocketNum" >= 0), the packet was received (interleaved) over TCP, and - // "tcpStreamChannelId" will return the channel id. - - void stopNetworkReading(); - - UsageEnvironment& envir() const { return fOwner->envir(); } - - void setAuxilliaryReadHandler(AuxHandlerFunc* handlerFunc, - void* handlerClientData) { - fAuxReadHandlerFunc = handlerFunc; - fAuxReadHandlerClientData = handlerClientData; - } - - void forgetOurGroupsock() { fGS = NULL; } - // This may be called - *only immediately prior* to deleting this - to prevent our destructor - // from turning off background reading on the 'groupsock'. (This is in case the 'groupsock' - // is also being read from elsewhere.) - -private: - // Helper functions for sending a RTP or RTCP packet over a TCP connection: - Boolean sendRTPorRTCPPacketOverTCP(unsigned char* packet, unsigned packetSize, - int socketNum, unsigned char streamChannelId, - TLSState* tlsState); - Boolean sendDataOverTCP(int socketNum, TLSState* tlsState, - u_int8_t const* data, unsigned dataSize, Boolean forceSendToSucceed); - -private: - friend class SocketDescriptor; - Medium* fOwner; - Groupsock* fGS; - class tcpStreamRecord* fTCPStreams; // optional, for RTP-over-TCP streaming/receiving - - unsigned short fNextTCPReadSize; - // how much data (if any) is available to be read from the TCP stream - int fNextTCPReadStreamSocketNum; - unsigned char fNextTCPReadStreamChannelId; - TLSState* fNextTCPReadTLSState; - TaskScheduler::BackgroundHandlerProc* fReadHandlerProc; // if any - - AuxHandlerFunc* fAuxReadHandlerFunc; - void* fAuxReadHandlerClientData; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/RTPSink.hh b/project/3rdparty/include/live555/liveMedia/RTPSink.hh deleted file mode 100644 index 0bc69307c..000000000 --- a/project/3rdparty/include/live555/liveMedia/RTPSink.hh +++ /dev/null @@ -1,250 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP Sinks -// C++ header - -#ifndef _RTP_SINK_HH -#define _RTP_SINK_HH - -#ifndef _MEDIA_SINK_HH -#include "MediaSink.hh" -#endif -#ifndef _RTP_INTERFACE_HH -#include "RTPInterface.hh" -#endif -#ifndef _SRTP_CRYPTOGRAPHIC_CONTEXT_HH -#include "SRTPCryptographicContext.hh" -#endif - -class RTPTransmissionStatsDB; // forward - -class RTPSink: public MediaSink { -public: - static Boolean lookupByName(UsageEnvironment& env, char const* sinkName, - RTPSink*& resultSink); - - // used by RTSP servers: - Groupsock const& groupsockBeingUsed() const { return *(fRTPInterface.gs()); } - Groupsock& groupsockBeingUsed() { return *(fRTPInterface.gs()); } - - unsigned char rtpPayloadType() const { return fRTPPayloadType; } - unsigned rtpTimestampFrequency() const { return fTimestampFrequency; } - void setRTPTimestampFrequency(unsigned freq) { - fTimestampFrequency = freq; - } - char const* rtpPayloadFormatName() const {return fRTPPayloadFormatName;} - - unsigned numChannels() const { return fNumChannels; } - - void setupForSRTP(Boolean useEncryption); - // sets up keying/encryption state for streaming via SRTP, using default values. - u_int8_t* setupForSRTP(Boolean useEncryption, unsigned& resultMIKEYStateMessageSize); - // as above, but returns the binary MIKEY state - void setupForSRTP(u_int8_t const* MIKEYStateMessage, unsigned MIKEYStateMessageSize); - // as above, but takes a MIKEY state message as parameter - - virtual char const* sdpMediaType() const; // for use in SDP m= lines - virtual char* rtpmapLine() const; // returns a string to be delete[]d - virtual char* keyMgmtLine(); // returns a string to be delete[]d - virtual char const* auxSDPLine(); - // optional SDP line (e.g. a=fmtp:...) - - u_int16_t currentSeqNo() const { return fSeqNo; } - u_int32_t presetNextTimestamp(); - // ensures that the next timestamp to be used will correspond to - // the current 'wall clock' time. - - RTPTransmissionStatsDB& transmissionStatsDB() const { - return *fTransmissionStatsDB; - } - - Boolean nextTimestampHasBeenPreset() const { return fNextTimestampHasBeenPreset; } - Boolean& enableRTCPReports() { return fEnableRTCPReports; } - - void getTotalBitrate(unsigned& outNumBytes, double& outElapsedTime); - // returns the number of bytes sent since the last time that we - // were called, and resets the counter. - - struct timeval const& creationTime() const { return fCreationTime; } - struct timeval const& initialPresentationTime() const { return fInitialPresentationTime; } - struct timeval const& mostRecentPresentationTime() const { return fMostRecentPresentationTime; } - void resetPresentationTimes(); - - // Hacks to allow sending RTP over TCP (RFC 2236, section 10.12): - void setStreamSocket(int sockNum, unsigned char streamChannelId, TLSState* tlsState) { - fRTPInterface.setStreamSocket(sockNum, streamChannelId, tlsState); - } - void addStreamSocket(int sockNum, unsigned char streamChannelId, TLSState* tlsState) { - fRTPInterface.addStreamSocket(sockNum, streamChannelId, tlsState); - } - void removeStreamSocket(int sockNum, unsigned char streamChannelId) { - fRTPInterface.removeStreamSocket(sockNum, streamChannelId); - } - unsigned& estimatedBitrate() { return fEstimatedBitrate; } // kbps; usually 0 (i.e., unset) - - u_int32_t SSRC() const {return fSSRC;} - // later need a means of changing the SSRC if there's a collision ##### - - SRTPCryptographicContext* getCrypto() const { return fCrypto; } - -protected: - RTPSink(UsageEnvironment& env, - Groupsock* rtpGS, unsigned char rtpPayloadType, - u_int32_t rtpTimestampFrequency, - char const* rtpPayloadFormatName, - unsigned numChannels); - // abstract base class - - virtual ~RTPSink(); - - // used by RTCP: - friend class RTCPInstance; - friend class RTPTransmissionStats; - u_int32_t convertToRTPTimestamp(struct timeval tv); - unsigned packetCount() const {return fPacketCount;} - unsigned octetCount() const {return fOctetCount;} - -protected: - RTPInterface fRTPInterface; - unsigned char fRTPPayloadType; - unsigned fPacketCount, fOctetCount, fTotalOctetCount /*incl RTP hdr*/; - struct timeval fTotalOctetCountStartTime, fInitialPresentationTime, fMostRecentPresentationTime; - u_int32_t fCurrentTimestamp; - u_int16_t fSeqNo; - - // Optional key management and crypto state; used if we are streaming SRTP - MIKEYState* fMIKEYState; - SRTPCryptographicContext* fCrypto; - -private: - // redefined virtual functions: - virtual Boolean isRTPSink() const; - -private: - u_int32_t fSSRC, fTimestampBase; - unsigned fTimestampFrequency; - Boolean fNextTimestampHasBeenPreset; - Boolean fEnableRTCPReports; // whether RTCP "SR" reports should be sent for this sink (default: True) - char const* fRTPPayloadFormatName; - unsigned fNumChannels; - struct timeval fCreationTime; - unsigned fEstimatedBitrate; // set on creation if known; otherwise 0 - - RTPTransmissionStatsDB* fTransmissionStatsDB; -}; - - -class RTPTransmissionStats; // forward - -class RTPTransmissionStatsDB { -public: - unsigned numReceivers() const { return fNumReceivers; } - - class Iterator { - public: - Iterator(RTPTransmissionStatsDB& receptionStatsDB); - virtual ~Iterator(); - - RTPTransmissionStats* next(); - // NULL if none - - private: - HashTable::Iterator* fIter; - }; - - // The following is called whenever a RTCP RR packet is received: - void noteIncomingRR(u_int32_t SSRC, struct sockaddr_storage const& lastFromAddress, - unsigned lossStats, unsigned lastPacketNumReceived, - unsigned jitter, unsigned lastSRTime, unsigned diffSR_RRTime); - - // The following is called when a RTCP BYE packet is received: - void removeRecord(u_int32_t SSRC); - - RTPTransmissionStats* lookup(u_int32_t SSRC) const; - -private: // constructor and destructor, called only by RTPSink: - friend class RTPSink; - RTPTransmissionStatsDB(RTPSink& rtpSink); - virtual ~RTPTransmissionStatsDB(); - -private: - void add(u_int32_t SSRC, RTPTransmissionStats* stats); - -private: - friend class Iterator; - unsigned fNumReceivers; - RTPSink& fOurRTPSink; - HashTable* fTable; -}; - -class RTPTransmissionStats { -public: - u_int32_t SSRC() const {return fSSRC;} - struct sockaddr_storage const& lastFromAddress() const {return fLastFromAddress;} - unsigned lastPacketNumReceived() const {return fLastPacketNumReceived;} - unsigned firstPacketNumReported() const {return fFirstPacketNumReported;} - unsigned totNumPacketsLost() const {return fTotNumPacketsLost;} - unsigned jitter() const {return fJitter;} - unsigned lastSRTime() const { return fLastSRTime; } - unsigned diffSR_RRTime() const { return fDiffSR_RRTime; } - unsigned roundTripDelay() const; - // The round-trip delay (in units of 1/65536 seconds) computed from - // the most recently-received RTCP RR packet. - struct timeval const& timeCreated() const {return fTimeCreated;} - struct timeval const& lastTimeReceived() const {return fTimeReceived;} - void getTotalOctetCount(u_int32_t& hi, u_int32_t& lo); - void getTotalPacketCount(u_int32_t& hi, u_int32_t& lo); - - // Information which requires at least two RRs to have been received: - unsigned packetsReceivedSinceLastRR() const; - u_int8_t packetLossRatio() const { return fPacketLossRatio; } - // as an 8-bit fixed-point number - int packetsLostBetweenRR() const; - -private: - // called only by RTPTransmissionStatsDB: - friend class RTPTransmissionStatsDB; - RTPTransmissionStats(RTPSink& rtpSink, u_int32_t SSRC); - virtual ~RTPTransmissionStats(); - - void noteIncomingRR(struct sockaddr_storage const& lastFromAddress, - unsigned lossStats, unsigned lastPacketNumReceived, - unsigned jitter, - unsigned lastSRTime, unsigned diffSR_RRTime); - -private: - RTPSink& fOurRTPSink; - u_int32_t fSSRC; - struct sockaddr_storage fLastFromAddress; - unsigned fLastPacketNumReceived; - u_int8_t fPacketLossRatio; - unsigned fTotNumPacketsLost; - unsigned fJitter; - unsigned fLastSRTime; - unsigned fDiffSR_RRTime; - struct timeval fTimeCreated, fTimeReceived; - Boolean fAtLeastTwoRRsHaveBeenReceived; - unsigned fOldLastPacketNumReceived; - unsigned fOldTotNumPacketsLost; - Boolean fFirstPacket; - unsigned fFirstPacketNumReported; - u_int32_t fLastOctetCount, fTotalOctetCount_hi, fTotalOctetCount_lo; - u_int32_t fLastPacketCount, fTotalPacketCount_hi, fTotalPacketCount_lo; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/RTPSource.hh b/project/3rdparty/include/live555/liveMedia/RTPSource.hh deleted file mode 100644 index 6ae7528f9..000000000 --- a/project/3rdparty/include/live555/liveMedia/RTPSource.hh +++ /dev/null @@ -1,272 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP Sources -// C++ header - -#ifndef _RTP_SOURCE_HH -#define _RTP_SOURCE_HH - -#ifndef _FRAMED_SOURCE_HH -#include "FramedSource.hh" -#endif -#ifndef _RTP_INTERFACE_HH -#include "RTPInterface.hh" -#endif -#ifndef _SRTP_CRYPTOGRAPHIC_CONTEXT_HH -#include "SRTPCryptographicContext.hh" -#endif - -class RTPReceptionStatsDB; // forward - -class RTPSource: public FramedSource { -public: - static Boolean lookupByName(UsageEnvironment& env, char const* sourceName, - RTPSource*& resultSource); - - Boolean curPacketMarkerBit() const { return fCurPacketMarkerBit; } - - unsigned char rtpPayloadFormat() const { return fRTPPayloadFormat; } - - virtual Boolean hasBeenSynchronizedUsingRTCP(); - - Groupsock* RTPgs() const { return fRTPInterface.gs(); } - - virtual void setPacketReorderingThresholdTime(unsigned uSeconds) = 0; - - void setCrypto(SRTPCryptographicContext* crypto) { fCrypto = crypto; } - - // used by RTCP: - u_int32_t SSRC() const { return fSSRC; } - // Note: This is *our* SSRC, not the SSRC in incoming RTP packets. - // later need a means of changing the SSRC if there's a collision ##### - void registerForMultiplexedRTCPPackets(class RTCPInstance* rtcpInstance) { - fRTCPInstanceForMultiplexedRTCPPackets = rtcpInstance; - } - void deregisterForMultiplexedRTCPPackets() { registerForMultiplexedRTCPPackets(NULL); } - - unsigned timestampFrequency() const {return fTimestampFrequency;} - - RTPReceptionStatsDB& receptionStatsDB() const { - return *fReceptionStatsDB; - } - - u_int32_t lastReceivedSSRC() const { return fLastReceivedSSRC; } - // Note: This is the SSRC in the most recently received RTP packet; not *our* SSRC - - Boolean& enableRTCPReports() { return fEnableRTCPReports; } - Boolean const& enableRTCPReports() const { return fEnableRTCPReports; } - - void setStreamSocket(int sockNum, unsigned char streamChannelId, TLSState* tlsState) { - // hack to allow sending RTP over TCP (RFC 2236, section 10.12) - fRTPInterface.setStreamSocket(sockNum, streamChannelId, tlsState); - } - - void setAuxilliaryReadHandler(AuxHandlerFunc* handlerFunc, - void* handlerClientData) { - fRTPInterface.setAuxilliaryReadHandler(handlerFunc, - handlerClientData); - } - - // Note that RTP receivers will usually not need to call either of the following two functions, because - // RTP sequence numbers and timestamps are usually not useful to receivers. - // (Our implementation of RTP reception already does all needed handling of RTP sequence numbers and timestamps.) - u_int16_t curPacketRTPSeqNum() const { return fCurPacketRTPSeqNum; } -private: friend class MediaSubsession; // "MediaSubsession" is the only outside class that ever needs to see RTP timestamps! - u_int32_t curPacketRTPTimestamp() const { return fCurPacketRTPTimestamp; } - -protected: - RTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, u_int32_t rtpTimestampFrequency); - // abstract base class - virtual ~RTPSource(); - -protected: - RTPInterface fRTPInterface; - u_int16_t fCurPacketRTPSeqNum; - u_int32_t fCurPacketRTPTimestamp; - Boolean fCurPacketMarkerBit; - Boolean fCurPacketHasBeenSynchronizedUsingRTCP; - u_int32_t fLastReceivedSSRC; - class RTCPInstance* fRTCPInstanceForMultiplexedRTCPPackets; - SRTPCryptographicContext* fCrypto; - -private: - // redefined virtual functions: - virtual Boolean isRTPSource() const; - virtual void getAttributes() const; - -private: - unsigned char fRTPPayloadFormat; - unsigned fTimestampFrequency; - u_int32_t fSSRC; - Boolean fEnableRTCPReports; // whether RTCP "RR" reports should be sent for this source (default: True) - - RTPReceptionStatsDB* fReceptionStatsDB; -}; - - -class RTPReceptionStats; // forward - -class RTPReceptionStatsDB { -public: - unsigned totNumPacketsReceived() const { return fTotNumPacketsReceived; } - unsigned numActiveSourcesSinceLastReset() const { - return fNumActiveSourcesSinceLastReset; - } - - void reset(); - // resets periodic stats (called each time they're used to - // generate a reception report) - - class Iterator { - public: - Iterator(RTPReceptionStatsDB& receptionStatsDB); - virtual ~Iterator(); - - RTPReceptionStats* next(Boolean includeInactiveSources = False); - // NULL if none - - private: - HashTable::Iterator* fIter; - }; - - // The following is called whenever a RTP packet is received: - void noteIncomingPacket(u_int32_t SSRC, u_int16_t seqNum, - u_int32_t rtpTimestamp, - unsigned timestampFrequency, - Boolean useForJitterCalculation, - struct timeval& resultPresentationTime, - Boolean& resultHasBeenSyncedUsingRTCP, - unsigned packetSize /* payload only */); - - // The following is called whenever a RTCP SR packet is received: - void noteIncomingSR(u_int32_t SSRC, - u_int32_t ntpTimestampMSW, u_int32_t ntpTimestampLSW, - u_int32_t rtpTimestamp); - - // The following is called when a RTCP BYE packet is received: - void removeRecord(u_int32_t SSRC); - - RTPReceptionStats* lookup(u_int32_t SSRC) const; - -protected: // constructor and destructor, called only by RTPSource: - friend class RTPSource; - RTPReceptionStatsDB(); - virtual ~RTPReceptionStatsDB(); - -protected: - void add(u_int32_t SSRC, RTPReceptionStats* stats); - -protected: - friend class Iterator; - unsigned fNumActiveSourcesSinceLastReset; - -private: - HashTable* fTable; - unsigned fTotNumPacketsReceived; // for all SSRCs -}; - -class RTPReceptionStats { -public: - u_int32_t SSRC() const { return fSSRC; } - unsigned numPacketsReceivedSinceLastReset() const { - return fNumPacketsReceivedSinceLastReset; - } - unsigned totNumPacketsReceived() const { return fTotNumPacketsReceived; } - double totNumKBytesReceived() const; - - unsigned totNumPacketsExpected() const { - return (fHighestExtSeqNumReceived - fBaseExtSeqNumReceived) + 1; - } - - unsigned baseExtSeqNumReceived() const { return fBaseExtSeqNumReceived; } - unsigned lastResetExtSeqNumReceived() const { - return fLastResetExtSeqNumReceived; - } - unsigned highestExtSeqNumReceived() const { - return fHighestExtSeqNumReceived; - } - - unsigned jitter() const; - - unsigned lastReceivedSR_NTPmsw() const { return fLastReceivedSR_NTPmsw; } - unsigned lastReceivedSR_NTPlsw() const { return fLastReceivedSR_NTPlsw; } - struct timeval const& lastReceivedSR_time() const { - return fLastReceivedSR_time; - } - - unsigned minInterPacketGapUS() const { return fMinInterPacketGapUS; } - unsigned maxInterPacketGapUS() const { return fMaxInterPacketGapUS; } - struct timeval const& totalInterPacketGaps() const { - return fTotalInterPacketGaps; - } - -protected: - // called only by RTPReceptionStatsDB: - friend class RTPReceptionStatsDB; - RTPReceptionStats(u_int32_t SSRC, u_int16_t initialSeqNum); - RTPReceptionStats(u_int32_t SSRC); - virtual ~RTPReceptionStats(); - -private: - void noteIncomingPacket(u_int16_t seqNum, u_int32_t rtpTimestamp, - unsigned timestampFrequency, - Boolean useForJitterCalculation, - struct timeval& resultPresentationTime, - Boolean& resultHasBeenSyncedUsingRTCP, - unsigned packetSize /* payload only */); - void noteIncomingSR(u_int32_t ntpTimestampMSW, u_int32_t ntpTimestampLSW, - u_int32_t rtpTimestamp); - void init(u_int32_t SSRC); - void initSeqNum(u_int16_t initialSeqNum); - void reset(); - // resets periodic stats (called each time they're used to - // generate a reception report) - -protected: - u_int32_t fSSRC; - unsigned fNumPacketsReceivedSinceLastReset; - unsigned fTotNumPacketsReceived; - u_int32_t fTotBytesReceived_hi, fTotBytesReceived_lo; - Boolean fHaveSeenInitialSequenceNumber; - unsigned fBaseExtSeqNumReceived; - unsigned fLastResetExtSeqNumReceived; - unsigned fHighestExtSeqNumReceived; - int fLastTransit; // used in the jitter calculation - u_int32_t fPreviousPacketRTPTimestamp; - double fJitter; - // The following are recorded whenever we receive a RTCP SR for this SSRC: - unsigned fLastReceivedSR_NTPmsw; // NTP timestamp (from SR), most-signif - unsigned fLastReceivedSR_NTPlsw; // NTP timestamp (from SR), least-signif - struct timeval fLastReceivedSR_time; - struct timeval fLastPacketReceptionTime; - unsigned fMinInterPacketGapUS, fMaxInterPacketGapUS; - struct timeval fTotalInterPacketGaps; - -private: - // Used to convert from RTP timestamp to 'wall clock' time: - Boolean fHasBeenSynchronized; - u_int32_t fSyncTimestamp; - struct timeval fSyncTime; -}; - - -Boolean seqNumLT(u_int16_t s1, u_int16_t s2); - // a 'less-than' on 16-bit sequence numbers - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/RTSPClient.hh b/project/3rdparty/include/live555/liveMedia/RTSPClient.hh deleted file mode 100644 index c01e8395c..000000000 --- a/project/3rdparty/include/live555/liveMedia/RTSPClient.hh +++ /dev/null @@ -1,416 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A generic RTSP client - for a single "rtsp://" URL -// C++ header - -#ifndef _RTSP_CLIENT_HH -#define _RTSP_CLIENT_HH - -#ifndef _MEDIA_SESSION_HH -#include "MediaSession.hh" -#endif -#ifndef _NET_ADDRESS_HH -#include "NetAddress.hh" -#endif -#ifndef _DIGEST_AUTHENTICATION_HH -#include "DigestAuthentication.hh" -#endif -#ifndef _TLS_STATE_HH -#include "TLSState.hh" -#endif -#ifndef OMIT_REGISTER_HANDLING -#ifndef _RTSP_SERVER_HH -#include "RTSPServer.hh" // For the optional "HandlerForREGISTERCommand" mini-server -#endif -#endif - -class RTSPClient: public Medium { -public: - static RTSPClient* createNew(UsageEnvironment& env, char const* rtspURL, - int verbosityLevel = 0, - char const* applicationName = NULL, - portNumBits tunnelOverHTTPPortNum = 0, - int socketNumToServer = -1); - // If "tunnelOverHTTPPortNum" is non-zero, we tunnel RTSP (and RTP) - // over a HTTP connection with the given port number, using the technique - // described in Apple's document - // If "socketNumToServer" is >= 0, then it is the socket number of an already-existing TCP connection to the server. - // (In this case, "rtspURL" must point to the socket's endpoint, so that it can be accessed via the socket.) - - typedef void (responseHandler)(RTSPClient* rtspClient, - int resultCode, char* resultString); - // A function that is called in response to a RTSP command. The parameters are as follows: - // "rtspClient": The "RTSPClient" object on which the original command was issued. - // "resultCode": If zero, then the command completed successfully. If non-zero, then the command did not complete - // successfully, and "resultCode" indicates the error, as follows: - // A positive "resultCode" is a RTSP error code (for example, 404 means "not found") - // A negative "resultCode" indicates a socket/network error; 0-"resultCode" is the standard "errno" code. - // "resultString": A ('\0'-terminated) string returned along with the response, or else NULL. - // In particular: - // "resultString" for a successful "DESCRIBE" command will be the media session's SDP description. - // "resultString" for a successful "OPTIONS" command will be a list of allowed commands. - // Note that this string can be present (i.e., not NULL) even if "resultCode" is non-zero - i.e., an error message. - // Also, "resultString" can be NULL, even if "resultCode" is zero (e.g., if the RTSP command succeeded, but without - // including an appropriate result header). - // Note also that this string is dynamically allocated, and must be freed by the handler (or the caller) - // - using "delete[]". - - unsigned sendDescribeCommand(responseHandler* responseHandler, Authenticator* authenticator = NULL); - // Issues a RTSP "DESCRIBE" command, then returns the "CSeq" sequence number that was used in the command. - // The (programmer-supplied) "responseHandler" function is called later to handle the response - // (or is called immediately - with an error code - if the command cannot be sent). - // "authenticator" (optional) is used for access control. If you have username and password strings, you can use this by - // passing an actual parameter that you created by creating an "Authenticator(username, password) object". - // (Note that if you supply a non-NULL "authenticator" parameter, you need do this only for the first command you send.) - - unsigned sendOptionsCommand(responseHandler* responseHandler, Authenticator* authenticator = NULL); - // Issues a RTSP "OPTIONS" command, then returns the "CSeq" sequence number that was used in the command. - // (The "responseHandler" and "authenticator" parameters are as described for "sendDescribeCommand".) - - unsigned sendAnnounceCommand(char const* sdpDescription, responseHandler* responseHandler, Authenticator* authenticator = NULL); - // Issues a RTSP "ANNOUNCE" command (with "sdpDescription" as parameter), - // then returns the "CSeq" sequence number that was used in the command. - // (The "responseHandler" and "authenticator" parameters are as described for "sendDescribeCommand".) - - unsigned sendSetupCommand(MediaSubsession& subsession, responseHandler* responseHandler, - Boolean streamOutgoing = False, - Boolean streamUsingTCP = False, - Boolean forceMulticastOnUnspecified = False, - Authenticator* authenticator = NULL); - // Issues a RTSP "SETUP" command, then returns the "CSeq" sequence number that was used in the command. - // (The "responseHandler" and "authenticator" parameters are as described for "sendDescribeCommand".) - - unsigned sendPlayCommand(MediaSession& session, responseHandler* responseHandler, - double start = 0.0f, double end = -1.0f, float scale = 1.0f, - Authenticator* authenticator = NULL); - // Issues an aggregate RTSP "PLAY" command on "session", then returns the "CSeq" sequence number that was used in the command. - // (Note: start=-1 means 'resume'; end=-1 means 'play to end') - // (The "responseHandler" and "authenticator" parameters are as described for "sendDescribeCommand".) - unsigned sendPlayCommand(MediaSubsession& subsession, responseHandler* responseHandler, - double start = 0.0f, double end = -1.0f, float scale = 1.0f, - Authenticator* authenticator = NULL); - // Issues a RTSP "PLAY" command on "subsession", then returns the "CSeq" sequence number that was used in the command. - // (Note: start=-1 means 'resume'; end=-1 means 'play to end') - // (The "responseHandler" and "authenticator" parameters are as described for "sendDescribeCommand".) - - // Alternative forms of "sendPlayCommand()", used to send "PLAY" commands that include an 'absolute' time range: - // (The "absStartTime" string (and "absEndTime" string, if present) *must* be of the form - // "YYYYMMDDTHHMMSSZ" or "YYYYMMDDTHHMMSS.Z") - unsigned sendPlayCommand(MediaSession& session, responseHandler* responseHandler, - char const* absStartTime, char const* absEndTime = NULL, float scale = 1.0f, - Authenticator* authenticator = NULL); - unsigned sendPlayCommand(MediaSubsession& subsession, responseHandler* responseHandler, - char const* absStartTime, char const* absEndTime = NULL, float scale = 1.0f, - Authenticator* authenticator = NULL); - - unsigned sendPauseCommand(MediaSession& session, responseHandler* responseHandler, Authenticator* authenticator = NULL); - // Issues an aggregate RTSP "PAUSE" command on "session", then returns the "CSeq" sequence number that was used in the command. - // (The "responseHandler" and "authenticator" parameters are as described for "sendDescribeCommand".) - unsigned sendPauseCommand(MediaSubsession& subsession, responseHandler* responseHandler, Authenticator* authenticator = NULL); - // Issues a RTSP "PAUSE" command on "subsession", then returns the "CSeq" sequence number that was used in the command. - // (The "responseHandler" and "authenticator" parameters are as described for "sendDescribeCommand".) - - unsigned sendRecordCommand(MediaSession& session, responseHandler* responseHandler, Authenticator* authenticator = NULL); - // Issues an aggregate RTSP "RECORD" command on "session", then returns the "CSeq" sequence number that was used in the command. - // (The "responseHandler" and "authenticator" parameters are as described for "sendDescribeCommand".) - unsigned sendRecordCommand(MediaSubsession& subsession, responseHandler* responseHandler, Authenticator* authenticator = NULL); - // Issues a RTSP "RECORD" command on "subsession", then returns the "CSeq" sequence number that was used in the command. - // (The "responseHandler" and "authenticator" parameters are as described for "sendDescribeCommand".) - - unsigned sendTeardownCommand(MediaSession& session, responseHandler* responseHandler, Authenticator* authenticator = NULL); - // Issues an aggregate RTSP "TEARDOWN" command on "session", then returns the "CSeq" sequence number that was used in the command. - // (The "responseHandler" and "authenticator" parameters are as described for "sendDescribeCommand".) - unsigned sendTeardownCommand(MediaSubsession& subsession, responseHandler* responseHandler, Authenticator* authenticator = NULL); - // Issues a RTSP "TEARDOWN" command on "subsession", then returns the "CSeq" sequence number that was used in the command. - // (The "responseHandler" and "authenticator" parameters are as described for "sendDescribeCommand".) - - unsigned sendSetParameterCommand(MediaSession& session, responseHandler* responseHandler, - char const* parameterName, char const* parameterValue, - Authenticator* authenticator = NULL); - // Issues an aggregate RTSP "SET_PARAMETER" command on "session", then returns the "CSeq" sequence number that was used in the command. - // (The "responseHandler" and "authenticator" parameters are as described for "sendDescribeCommand".) - - unsigned sendGetParameterCommand(MediaSession& session, responseHandler* responseHandler, char const* parameterName, - Authenticator* authenticator = NULL); - // Issues an aggregate RTSP "GET_PARAMETER" command on "session", then returns the "CSeq" sequence number that was used in the command. - // (The "responseHandler" and "authenticator" parameters are as described for "sendDescribeCommand".) - - void setRequireValue(char const* requireValue = NULL); - // Sets a string to be used as the value of a "Require:" header to be included in - // subsequent RTSP commands. Call "setRequireValue()" again (i.e., with no parameter) - // to clear this (and so stop "Require:" headers from being included in subsequent cmds). - - void sendDummyUDPPackets(MediaSession& session, unsigned numDummyPackets = 2); - void sendDummyUDPPackets(MediaSubsession& subsession, unsigned numDummyPackets = 2); - // Sends short 'dummy' (i.e., non-RTP or RTCP) UDP packets towards the server, to increase - // the likelihood of RTP/RTCP packets from the server reaching us if we're behind a NAT. - // (If we requested RTP-over-TCP streaming, then these functions have no effect.) - // Our implementation automatically does this just prior to sending each "PLAY" command; - // You should not call these functions yourself unless you know what you're doing. - - void setSpeed(MediaSession& session, float speed = 1.0f); - // Set (recorded) media download speed to given value to support faster download using 'Speed:' - // option on 'PLAY' command. - - Boolean changeResponseHandler(unsigned cseq, responseHandler* newResponseHandler); - // Changes the response handler for the previously-performed command (whose operation returned "cseq"). - // (To turn off any response handling for the command, use a "newResponseHandler" value of NULL. This might be done as part - // of an implementation of a 'timeout handler' on the command, for example.) - // This function returns True iff "cseq" was for a valid previously-performed command (whose response is still unhandled). - - int socketNum() const { return fInputSocketNum; } - - static Boolean lookupByName(UsageEnvironment& env, - char const* sourceName, - RTSPClient*& resultClient); - - Boolean parseRTSPURL(char const* url, - char*& username, char*& password, NetAddress& address, portNumBits& portNum, char const** urlSuffix = NULL); - // Parses "url" as "rtsp://[[:]@][:][/]" - // (Note that the returned "username" and "password" are either NULL, or heap-allocated strings that the caller must later delete[].) - - void setUserAgentString(char const* userAgentName); - // sets an alternative string to be used in RTSP "User-Agent:" headers - - void disallowBasicAuthentication() { fAllowBasicAuthentication = False; } - // call this if you don't want the server to request 'Basic' authentication - // (which would cause the client to send usernames and passwords over the net). - - unsigned sessionTimeoutParameter() const { return fSessionTimeoutParameter; } - - char const* url() const { return fBaseURL; } - char const *streamId() const { return fStreamId; } - - static unsigned responseBufferSize; - -public: // Some compilers complain if this is "private:" - // The state of a request-in-progress: - class RequestRecord { - public: - RequestRecord(unsigned cseq, char const* commandName, responseHandler* handler, - MediaSession* session = NULL, MediaSubsession* subsession = NULL, u_int32_t booleanFlags = 0, - double start = 0.0f, double end = -1.0f, float scale = 1.0f, char const* contentStr = NULL); - RequestRecord(unsigned cseq, responseHandler* handler, - char const* absStartTime, char const* absEndTime = NULL, float scale = 1.0f, - MediaSession* session = NULL, MediaSubsession* subsession = NULL); - // alternative constructor for creating "PLAY" requests that include 'absolute' time values - virtual ~RequestRecord(); - - RequestRecord*& next() { return fNext; } - unsigned& cseq() { return fCSeq; } - char const* commandName() const { return fCommandName; } - MediaSession* session() const { return fSession; } - MediaSubsession* subsession() const { return fSubsession; } - u_int32_t booleanFlags() const { return fBooleanFlags; } - double start() const { return fStart; } - double end() const { return fEnd; } - char const* absStartTime() const { return fAbsStartTime; } - char const* absEndTime() const { return fAbsEndTime; } - float scale() const { return fScale; } - char* contentStr() const { return fContentStr; } - responseHandler*& handler() { return fHandler; } - - private: - RequestRecord* fNext; - unsigned fCSeq; - char const* fCommandName; - MediaSession* fSession; - MediaSubsession* fSubsession; - u_int32_t fBooleanFlags; - double fStart, fEnd; - char *fAbsStartTime, *fAbsEndTime; // used for optional 'absolute' (i.e., "time=") range specifications - float fScale; - char* fContentStr; - responseHandler* fHandler; - }; - -protected: - RTSPClient(UsageEnvironment& env, char const* rtspURL, - int verbosityLevel, char const* applicationName, portNumBits tunnelOverHTTPPortNum, int socketNumToServer); - // called only by createNew(); - virtual ~RTSPClient(); - - void reset(); - void setBaseURL(char const* url); void setStreamId(char const *stream_id); - int grabSocket(); // allows a subclass to reuse our input socket, so that it won't get closed when we're deleted - virtual unsigned sendRequest(RequestRecord* request); - virtual Boolean setRequestFields(RequestRecord* request, - char*& cmdURL, Boolean& cmdURLWasAllocated, - char const*& protocolStr, - char*& extraHeaders, Boolean& extraHeadersWereAllocated); - // used to implement "sendRequest()"; subclasses may reimplement this (e.g., when implementing a new command name) - virtual int connectToServer(int socketNum, portNumBits remotePortNum); // used to implement "openConnection()"; result values: -1: failure; 0: pending; 1: success - -private: // redefined virtual functions - virtual Boolean isRTSPClient() const; - -private: - class RequestQueue { - public: - RequestQueue(); - RequestQueue(RequestQueue& origQueue); // moves the queue contents to the new queue - virtual ~RequestQueue(); - - void enqueue(RequestRecord* request); // "request" must not be NULL - RequestRecord* dequeue(); - void putAtHead(RequestRecord* request); // "request" must not be NULL - RequestRecord* findByCSeq(unsigned cseq); - Boolean isEmpty() const { return fHead == NULL; } - void reset(); - - private: - RequestRecord* fHead; - RequestRecord* fTail; - }; - - void resetTCPSockets(); - void resetResponseBuffer(); - int openConnection(); // result values: -1: failure; 0: pending; 1: success - char* createAuthenticatorString(char const* cmd, char const* url); - char* createBlocksizeString(Boolean streamUsingTCP); - char* createKeyMgmtString(char const* url, MediaSubsession const& subsession); - void handleRequestError(RequestRecord* request); - Boolean parseResponseCode(char const* line, unsigned& responseCode, char const*& responseString); - void handleIncomingRequest(); - static Boolean checkForHeader(char const* line, char const* headerName, unsigned headerNameLength, char const*& headerParams); - Boolean parseTransportParams(char const* paramsStr, - char*& serverAddressStr, portNumBits& serverPortNum, - unsigned char& rtpChannelId, unsigned char& rtcpChannelId); - Boolean parseScaleParam(char const* paramStr, float& scale); - Boolean parseSpeedParam(char const* paramStr, float& speed); - Boolean parseRTPInfoParams(char const*& paramStr, u_int16_t& seqNum, u_int32_t& timestamp); - Boolean handleSETUPResponse(MediaSubsession& subsession, char const* sessionParamsStr, char const* transportParamsStr, - Boolean streamUsingTCP); - Boolean handlePLAYResponse(MediaSession* session, MediaSubsession* subsession, - char const* scaleParamsStr, const char* speedParamsStr, - char const* rangeParamsStr, char const* rtpInfoParamsStr); - Boolean handleTEARDOWNResponse(MediaSession& session, MediaSubsession& subsession); - Boolean handleGET_PARAMETERResponse(char const* parameterName, char*& resultValueString, char* resultValueStringEnd); - Boolean handleAuthenticationFailure(char const* wwwAuthenticateParamsStr); - Boolean resendCommand(RequestRecord* request); - char const* sessionURL(MediaSession const& session) const; - static void handleAlternativeRequestByte(void*, u_int8_t requestByte); - void handleAlternativeRequestByte1(u_int8_t requestByte); - void constructSubsessionURL(MediaSubsession const& subsession, - char const*& prefix, - char const*& separator, - char const*& suffix); - - // Support for tunneling RTSP-over-HTTP: - Boolean setupHTTPTunneling1(); // send the HTTP "GET" - static void responseHandlerForHTTP_GET(RTSPClient* rtspClient, int responseCode, char* responseString); - void responseHandlerForHTTP_GET1(int responseCode, char* responseString); - Boolean setupHTTPTunneling2(); // send the HTTP "POST" - - // Support for asynchronous connections to the server: - static void connectionHandler(void*, int /*mask*/); - void connectionHandler1(); - - // Support for handling data sent back by a server: - static void incomingDataHandler(void*, int /*mask*/); - void incomingDataHandler1(); - void handleResponseBytes(int newBytesRead); - - // Writing/reading data over a (already set-up) connection: - int write(const char* data, unsigned count); - int read(u_int8_t* buffer, unsigned bufferSize); - -public: - u_int16_t desiredMaxIncomingPacketSize; - // If set to a value >0, then a "Blocksize:" header with this value (minus an allowance for - // IP, UDP, and RTP headers) will be sent with each "SETUP" request. - -protected: - int fVerbosityLevel; - unsigned fCSeq; // sequence number, used in consecutive requests - Authenticator fCurrentAuthenticator; - Boolean fAllowBasicAuthentication; - struct sockaddr_storage fServerAddress; - -private: - portNumBits fTunnelOverHTTPPortNum; - char* fUserAgentHeaderStr; - unsigned fUserAgentHeaderStrLen; - int fInputSocketNum, fOutputSocketNum; - char* fBaseURL, *fStreamId; - unsigned char fTCPStreamIdCount; // used for (optional) RTP/TCP - char* fLastSessionId; - unsigned fSessionTimeoutParameter; // optionally set in response "Session:" headers - char* fResponseBuffer; - unsigned fResponseBytesAlreadySeen, fResponseBufferBytesLeft; - RequestQueue fRequestsAwaitingConnection, fRequestsAwaitingHTTPTunneling, fRequestsAwaitingResponse; - char* fRequireStr; - - // Support for tunneling RTSP-over-HTTP: - char fSessionCookie[33]; - unsigned fSessionCookieCounter; - Boolean fHTTPTunnelingConnectionIsPending; - - // Optional support for TLS: - ClientTLSState fTLS; - ClientTLSState fPOSTSocketTLS; // used only for RTSP-over-HTTPS - ClientTLSState* fInputTLS; - ClientTLSState* fOutputTLS; - friend class ClientTLSState; -}; - - -#ifndef OMIT_REGISTER_HANDLING -////////// HandlerServerForREGISTERCommand ///////// - -// A simple server that creates a new "RTSPClient" object whenever a "REGISTER" request arrives (specifying the "rtsp://" URL -// of a stream). The new "RTSPClient" object will be created with the specified URL, and passed to the provided handler function. - -typedef void onRTSPClientCreationFunc(RTSPClient* newRTSPClient, Boolean requestStreamingOverTCP); - -class HandlerServerForREGISTERCommand: public RTSPServer { -public: - static HandlerServerForREGISTERCommand* createNew(UsageEnvironment& env, onRTSPClientCreationFunc* creationFunc, - Port ourPort = 0, UserAuthenticationDatabase* authDatabase = NULL, - int verbosityLevel = 0, char const* applicationName = NULL); - // If ourPort.num() == 0, we'll choose the port number ourself. (Use the following function to get it.) - portNumBits serverPortNum() const { return ntohs(fServerPort.num()); } - -protected: - HandlerServerForREGISTERCommand(UsageEnvironment& env, onRTSPClientCreationFunc* creationFunc, int ourSocketIPv4, int ourSocketIPv6, Port ourPort, - UserAuthenticationDatabase* authDatabase, int verbosityLevel, char const* applicationName); - // called only by createNew(); - virtual ~HandlerServerForREGISTERCommand(); - - virtual RTSPClient* createNewRTSPClient(char const* rtspURL, int verbosityLevel, char const* applicationName, - int socketNumToServer); - // This function - by default - creates a (base) "RTSPClient" object. If you want to create a subclass - // of "RTSPClient" instead, then subclass this class, and redefine this virtual function. - -protected: // redefined virtual functions - virtual char const* allowedCommandNames(); // "OPTIONS", "REGISTER", and (perhaps) "DEREGISTER" only - virtual Boolean weImplementREGISTER(char const* cmd/*"REGISTER" or "DEREGISTER"*/, - char const* proxyURLSuffix, char*& responseStr); - // redefined to return True (for cmd=="REGISTER") - virtual void implementCmd_REGISTER(char const* cmd/*"REGISTER" or "DEREGISTER"*/, - char const* url, char const* urlSuffix, int socketToRemoteServer, - Boolean deliverViaTCP, char const* proxyURLSuffix); - -private: - onRTSPClientCreationFunc* fCreationFunc; - int fVerbosityLevel; - char* fApplicationName; -}; -#endif - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/RTSPCommon.hh b/project/3rdparty/include/live555/liveMedia/RTSPCommon.hh deleted file mode 100644 index e092ae896..000000000 --- a/project/3rdparty/include/live555/liveMedia/RTSPCommon.hh +++ /dev/null @@ -1,65 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Common routines used by both RTSP clients and servers -// C++ header - -#ifndef _RTSP_COMMON_HH -#define _RTSP_COMMON_HH - -#ifndef _BOOLEAN_HH -#include "../UsageEnvironment/Boolean.hh" -#endif - -#ifndef _MEDIA_HH -#include "Media.hh" // includes some definitions perhaps needed for Borland compilers? -#endif - -#if defined(__WIN32__) || defined(_WIN32) || defined(_QNX4) -#define _strncasecmp _strnicmp -#define snprintf _snprintf -#else -#define _strncasecmp strncasecmp -#endif - -#define RTSP_PARAM_STRING_MAX 200 - -Boolean parseRTSPRequestString(char const *reqStr, unsigned reqStrSize, // in - char *resultCmdName, // out - unsigned resultCmdNameMaxSize, // in - char* resultURLPreSuffix, // out - unsigned resultURLPreSuffixMaxSize, // in - char* resultURLSuffix, // out - unsigned resultURLSuffixMaxSize, // in - char* resultCSeq, // out - unsigned resultCSeqMaxSize, // in - char* resultSessionId, // out - unsigned resultSessionIdMaxSize, // in - unsigned& contentLength, Boolean& urlIsRTSPS); // out - -Boolean parseRangeParam(char const* paramStr, double& rangeStart, double& rangeEnd, char*& absStartTime, char*& absEndTime, Boolean& startTimeIsNow); -Boolean parseRangeHeader(char const* buf, double& rangeStart, double& rangeEnd, char*& absStartTime, char*& absEndTime, Boolean& startTimeIsNow); - -Boolean parseScaleHeader(char const* buf, float& scale); - -Boolean RTSPOptionIsSupported(char const* commandName, char const* optionsResponseString); - // Returns True iff the RTSP command "commandName" is mentioned as one of the commands supported in "optionsResponseString" - // (which should be the 'resultString' from a previous RTSP "OPTIONS" request). - -char const* dateHeader(); // A "Date:" header that can be used in a RTSP (or HTTP) response - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/RTSPRegisterSender.hh b/project/3rdparty/include/live555/liveMedia/RTSPRegisterSender.hh deleted file mode 100644 index ca6d9fff2..000000000 --- a/project/3rdparty/include/live555/liveMedia/RTSPRegisterSender.hh +++ /dev/null @@ -1,138 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Special objects which, when created, sends a custom RTSP "REGISTER" (or "DEREGISTER") command -// to a specified client. -// C++ header - -#ifndef _RTSP_REGISTER_SENDER_HH -#define _RTSP_REGISTER_SENDER_HH - -#ifndef _RTSP_CLIENT_HH -#include "RTSPClient.hh" -#endif - -class RTSPRegisterOrDeregisterSender: public RTSPClient { -public: - virtual ~RTSPRegisterOrDeregisterSender(); -protected: // we're a virtual base class - RTSPRegisterOrDeregisterSender(UsageEnvironment& env, - char const* remoteClientNameOrAddress, portNumBits remoteClientPortNum, - Authenticator* authenticator, - int verbosityLevel, char const* applicationName); - -public: // Some compilers complain if this is "protected:" - // A subclass of "RTSPClient::RequestRecord", specific to our "REGISTER" and "DEREGISTER" commands: - class RequestRecord_REGISTER_or_DEREGISTER: public RTSPClient::RequestRecord { - public: - RequestRecord_REGISTER_or_DEREGISTER(unsigned cseq, char const* cmdName, RTSPClient::responseHandler* rtspResponseHandler, char const* rtspURLToRegisterOrDeregister, char const* proxyURLSuffix); - virtual ~RequestRecord_REGISTER_or_DEREGISTER(); - - char const* proxyURLSuffix() const { return fProxyURLSuffix; } - - protected: - char* fRTSPURLToRegisterOrDeregister; - char* fProxyURLSuffix; - }; - -protected: - portNumBits fRemoteClientPortNum; -}; - -////////// - -class RTSPRegisterSender: public RTSPRegisterOrDeregisterSender { -public: - static RTSPRegisterSender* - createNew(UsageEnvironment& env, - char const* remoteClientNameOrAddress, portNumBits remoteClientPortNum, char const* rtspURLToRegister, - RTSPClient::responseHandler* rtspResponseHandler, Authenticator* authenticator = NULL, - Boolean requestStreamingViaTCP = False, char const* proxyURLSuffix = NULL, Boolean reuseConnection = False, - int verbosityLevel = 0, char const* applicationName = NULL); - - void grabConnection(int& sock, struct sockaddr_storage& remoteAddress); // so that the socket doesn't get closed when we're deleted - -protected: - RTSPRegisterSender(UsageEnvironment& env, - char const* remoteClientNameOrAddress, portNumBits remoteClientPortNum, char const* rtspURLToRegister, - RTSPClient::responseHandler* rtspResponseHandler, Authenticator* authenticator, - Boolean requestStreamingViaTCP, char const* proxyURLSuffix, Boolean reuseConnection, - int verbosityLevel, char const* applicationName); - // called only by "createNew()" - virtual ~RTSPRegisterSender(); - - // Redefined virtual functions: - virtual Boolean setRequestFields(RequestRecord* request, - char*& cmdURL, Boolean& cmdURLWasAllocated, - char const*& protocolStr, - char*& extraHeaders, Boolean& extraHeadersWereAllocated); - -public: // Some compilers complain if this is "protected:" - // A subclass of "RequestRecord_REGISTER_or_DEREGISTER", specific to our "REGISTER" command: - class RequestRecord_REGISTER: public RTSPRegisterOrDeregisterSender::RequestRecord_REGISTER_or_DEREGISTER { - public: - RequestRecord_REGISTER(unsigned cseq, RTSPClient::responseHandler* rtspResponseHandler, char const* rtspURLToRegister, - Boolean reuseConnection, Boolean requestStreamingViaTCP, char const* proxyURLSuffix); - virtual ~RequestRecord_REGISTER(); - - char const* rtspURLToRegister() const { return fRTSPURLToRegisterOrDeregister; } - Boolean reuseConnection() const { return fReuseConnection; } - Boolean requestStreamingViaTCP() const { return fRequestStreamingViaTCP; } - - private: - Boolean fReuseConnection, fRequestStreamingViaTCP; - }; -}; - -////////// - -class RTSPDeregisterSender: public RTSPRegisterOrDeregisterSender { -public: - static RTSPDeregisterSender* - createNew(UsageEnvironment& env, - char const* remoteClientNameOrAddress, portNumBits remoteClientPortNum, char const* rtspURLToDeregister, - RTSPClient::responseHandler* rtspResponseHandler, Authenticator* authenticator = NULL, - char const* proxyURLSuffix = NULL, - int verbosityLevel = 0, char const* applicationName = NULL); - -protected: - RTSPDeregisterSender(UsageEnvironment& env, - char const* remoteClientNameOrAddress, portNumBits remoteClientPortNum, char const* rtspURLToDeregister, - RTSPClient::responseHandler* rtspResponseHandler, Authenticator* authenticator, - char const* proxyURLSuffix, - int verbosityLevel, char const* applicationName); - // called only by "createNew()" - virtual ~RTSPDeregisterSender(); - - // Redefined virtual functions: - virtual Boolean setRequestFields(RequestRecord* request, - char*& cmdURL, Boolean& cmdURLWasAllocated, - char const*& protocolStr, - char*& extraHeaders, Boolean& extraHeadersWereAllocated); - -public: // Some compilers complain if this is "protected:" - // A subclass of "RequestRecord_REGISTER_or_DEREGISTER", specific to our "DEREGISTER" command: - class RequestRecord_DEREGISTER: public RTSPRegisterOrDeregisterSender::RequestRecord_REGISTER_or_DEREGISTER { - public: - RequestRecord_DEREGISTER(unsigned cseq, RTSPClient::responseHandler* rtspResponseHandler, char const* rtspURLToDeregister, char const* proxyURLSuffix); - virtual ~RequestRecord_DEREGISTER(); - - char const* rtspURLToDeregister() const { return fRTSPURLToRegisterOrDeregister; } - }; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/RTSPServer.hh b/project/3rdparty/include/live555/liveMedia/RTSPServer.hh deleted file mode 100644 index 438089e93..000000000 --- a/project/3rdparty/include/live555/liveMedia/RTSPServer.hh +++ /dev/null @@ -1,397 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A RTSP server -// C++ header - -#ifndef _RTSP_SERVER_HH -#define _RTSP_SERVER_HH - -#ifndef _GENERIC_MEDIA_SERVER_HH -#include "GenericMediaServer.hh" -#endif -#ifndef _DIGEST_AUTHENTICATION_HH -#include "DigestAuthentication.hh" -#endif - -class RTSPServer: public GenericMediaServer { -public: - static RTSPServer* createNew(UsageEnvironment& env, Port ourPort = 554, - UserAuthenticationDatabase* authDatabase = NULL, - unsigned reclamationSeconds = 65); - // If ourPort.num() == 0, we'll choose the port number - // Note: The caller is responsible for reclaiming "authDatabase" - // If "reclamationSeconds" > 0, then the "RTSPClientSession" state for - // each client will get reclaimed (and the corresponding RTP stream(s) - // torn down) if no RTSP commands - or RTCP "RR" packets - from the - // client are received in at least "reclamationSeconds" seconds. - - static Boolean lookupByName(UsageEnvironment& env, char const* name, - RTSPServer*& resultServer); - - typedef void (responseHandlerForREGISTER)(RTSPServer* rtspServer, unsigned requestId, int resultCode, char* resultString); - unsigned registerStream(ServerMediaSession* serverMediaSession, - char const* remoteClientNameOrAddress, portNumBits remoteClientPortNum, - responseHandlerForREGISTER* responseHandler, - char const* username = NULL, char const* password = NULL, - Boolean receiveOurStreamViaTCP = False, - char const* proxyURLSuffix = NULL); - // 'Register' the stream represented by "serverMediaSession" with the given remote client (specifed by name and port number). - // This is done using our custom "REGISTER" RTSP command. - // The function returns a unique number that can be used to identify the request; this number is also passed to "responseHandler". - // When a response is received from the remote client (or the "REGISTER" request fails), the specified response handler - // (if non-NULL) is called. (Note that the "resultString" passed to the handler was dynamically allocated, - // and should be delete[]d by the handler after use.) - // If "receiveOurStreamViaTCP" is True, then we're requesting that the remote client access our stream using RTP/RTCP-over-TCP. - // (Otherwise, the remote client may choose regular RTP/RTCP-over-UDP streaming.) - // "proxyURLSuffix" (optional) is used only when the remote client is also a proxy server. - // It tells the proxy server the suffix that it should use in its "rtsp://" URL (when front-end clients access the stream) - - typedef void (responseHandlerForDEREGISTER)(RTSPServer* rtspServer, unsigned requestId, int resultCode, char* resultString); - unsigned deregisterStream(ServerMediaSession* serverMediaSession, - char const* remoteClientNameOrAddress, portNumBits remoteClientPortNum, - responseHandlerForDEREGISTER* responseHandler, - char const* username = NULL, char const* password = NULL, - char const* proxyURLSuffix = NULL); - // Used to turn off a previous "registerStream()" - using our custom "DEREGISTER" RTSP command. - - char* rtspURL(ServerMediaSession const* serverMediaSession, - int clientSocket = -1, Boolean useIPv6 = False) const; - // returns a "rtsp://" URL that could be used to access the - // specified session (which must already have been added to - // us using "addServerMediaSession()". - // This string is dynamically allocated; caller should delete[] - // (If "clientSocket" is non-negative, then it is used (by calling "getsockname()") to determine - // the IP address to be used in the URL.) - // Shortcuts: - char* ipv4rtspURL(ServerMediaSession const* serverMediaSession, int clientSocket = -1) { - return rtspURL(serverMediaSession, clientSocket, False); - } - char* ipv6rtspURL(ServerMediaSession const* serverMediaSession, int clientSocket = -1) { - return rtspURL(serverMediaSession, clientSocket, True); - } - - char* rtspURLPrefix(int clientSocket = -1, Boolean useIPv6 = False) const; - // like "rtspURL()", except that it returns just the common prefix used by - // each session's "rtsp://" URL. - // This string is dynamically allocated; caller should delete[] - // Shortcuts: - char* ipv4rtspURLPrefix(int clientSocket = -1) { return rtspURLPrefix(clientSocket, False); } - char* ipv6rtspURLPrefix(int clientSocket = -1) { return rtspURLPrefix(clientSocket, True); } - - UserAuthenticationDatabase* setAuthenticationDatabase(UserAuthenticationDatabase* newDB); - // Changes the server's authentication database to "newDB", returning a pointer to the old database (if there was one). - // "newDB" may be NULL (you can use this to disable authentication at runtime, if desired). - - void disableStreamingRTPOverTCP() { - fAllowStreamingRTPOverTCP = False; - } - - Boolean setUpTunnelingOverHTTP(Port httpPort); - // (Attempts to) enable RTSP-over-HTTP tunneling on the specified port. - // Returns True iff the specified port can be used in this way (i.e., it's not already being used for a separate HTTP server). - // Note: RTSP-over-HTTP tunneling is described in - // http://mirror.informatimago.com/next/developer.apple.com/quicktime/icefloe/dispatch028.html - // and http://images.apple.com/br/quicktime/pdf/QTSS_Modules.pdf - portNumBits httpServerPortNum() const; // in host byte order. (Returns 0 if not present.) - - void setTLSState(char const* certFileName, char const* privKeyFileName, - Boolean weServeSRTP = True, Boolean weEncryptSRTP = True); - -protected: - RTSPServer(UsageEnvironment& env, - int ourSocketIPv4, int ourSocketIPv6, Port ourPort, - UserAuthenticationDatabase* authDatabase, - unsigned reclamationSeconds); - // called only by createNew(); - virtual ~RTSPServer(); - - virtual char const* allowedCommandNames(); // used to implement "RTSPClientConnection::handleCmd_OPTIONS()" - virtual Boolean weImplementREGISTER(char const* cmd/*"REGISTER" or "DEREGISTER"*/, - char const* proxyURLSuffix, char*& responseStr); - // used to implement "RTSPClientConnection::handleCmd_REGISTER()" - // Note: "responseStr" is dynamically allocated (or NULL), and should be delete[]d after the call - virtual void implementCmd_REGISTER(char const* cmd/*"REGISTER" or "DEREGISTER"*/, - char const* url, char const* urlSuffix, int socketToRemoteServer, - Boolean deliverViaTCP, char const* proxyURLSuffix); - // used to implement "RTSPClientConnection::handleCmd_REGISTER()" - - virtual UserAuthenticationDatabase* getAuthenticationDatabaseForCommand(char const* cmdName); - virtual Boolean specialClientAccessCheck(int clientSocket, - struct sockaddr_storage const& clientAddr, - char const* urlSuffix); - // a hook that allows subclassed servers to do server-specific access checking - // on each client (e.g., based on client IP address), without using digest authentication. - virtual Boolean specialClientUserAccessCheck(int clientSocket, - struct sockaddr_storage const& clientAddr, - char const* urlSuffix, char const *username); - // another hook that allows subclassed servers to do server-specific access checking - // - this time after normal digest authentication has already taken place (and would otherwise allow access). - // (This test can only be used to further restrict access, not to grant additional access.) - virtual void specialHandlingOfAuthenticationFailure(int clientSocket, - struct sockaddr_storage const& clientAddr, - char const* urlSuffix); - // a hook that allows subclassed servers to take extra action whenevever an authentication failure occurs - -public: // redefined virtual functions - virtual Boolean isRTSPServer() const; - virtual void addServerMediaSession(ServerMediaSession* serverMediaSession); - -public: // should be protected, but some old compilers complain otherwise - // The state of a TCP connection used by a RTSP client: - class RTSPClientSession; // forward - class RTSPClientConnection: public GenericMediaServer::ClientConnection { - public: - // A data structure that's used to implement the "REGISTER" command: - class ParamsForREGISTER { - public: - ParamsForREGISTER(char const* cmd/*"REGISTER" or "DEREGISTER"*/, - RTSPClientConnection* ourConnection, char const* url, char const* urlSuffix, - Boolean reuseConnection, Boolean deliverViaTCP, char const* proxyURLSuffix); - virtual ~ParamsForREGISTER(); - private: - friend class RTSPClientConnection; - char const* fCmd; - RTSPClientConnection* fOurConnection; - char* fURL; - char* fURLSuffix; - Boolean fReuseConnection, fDeliverViaTCP; - char* fProxyURLSuffix; - }; - protected: // redefined virtual functions: - virtual void handleRequestBytes(int newBytesRead); - - protected: - RTSPClientConnection(RTSPServer& ourServer, - int clientSocket, struct sockaddr_storage const& clientAddr, - Boolean useTLS = False); - virtual ~RTSPClientConnection(); - - friend class RTSPServer; - friend class RTSPClientSession; - - // Make the handler functions for each command virtual, to allow subclasses to reimplement them, if necessary: - virtual void handleCmd_OPTIONS(); - // You probably won't need to subclass/reimplement this function; reimplement "RTSPServer::allowedCommandNames()" instead. - virtual void handleCmd_GET_PARAMETER(char const* fullRequestStr); // when operating on the entire server - virtual void handleCmd_SET_PARAMETER(char const* fullRequestStr); // when operating on the entire server - virtual void handleCmd_DESCRIBE(char const* urlPreSuffix, char const* urlSuffix, char const* fullRequestStr); - static void DESCRIBELookupCompletionFunction(void* clientData, ServerMediaSession* sessionLookedUp); - virtual void handleCmd_DESCRIBE_afterLookup(ServerMediaSession* session); - virtual void handleCmd_REGISTER(char const* cmd/*"REGISTER" or "DEREGISTER"*/, - char const* url, char const* urlSuffix, char const* fullRequestStr, - Boolean reuseConnection, Boolean deliverViaTCP, char const* proxyURLSuffix); - // You probably won't need to subclass/reimplement this function; - // reimplement "RTSPServer::weImplementREGISTER()" and "RTSPServer::implementCmd_REGISTER()" instead. - virtual void handleCmd_bad(); - virtual void handleCmd_notSupported(); - virtual void handleCmd_redirect(char const* urlSuffix); - virtual void handleCmd_notFound(); - virtual void handleCmd_sessionNotFound(); - virtual void handleCmd_unsupportedTransport(); - // Support for optional RTSP-over-HTTP tunneling: - virtual Boolean parseHTTPRequestString(char* resultCmdName, unsigned resultCmdNameMaxSize, - char* urlSuffix, unsigned urlSuffixMaxSize, - char* sessionCookie, unsigned sessionCookieMaxSize, - char* acceptStr, unsigned acceptStrMaxSize); - virtual void handleHTTPCmd_notSupported(); - virtual void handleHTTPCmd_notFound(); - virtual void handleHTTPCmd_OPTIONS(); - virtual void handleHTTPCmd_TunnelingGET(char const* sessionCookie); - virtual Boolean handleHTTPCmd_TunnelingPOST(char const* sessionCookie, unsigned char const* extraData, unsigned extraDataSize); - virtual void handleHTTPCmd_StreamingGET(char const* urlSuffix, char const* fullRequestStr); - protected: - void resetRequestBuffer(); - void closeSocketsRTSP(); - static void handleAlternativeRequestByte(void*, u_int8_t requestByte); - void handleAlternativeRequestByte1(u_int8_t requestByte); - Boolean authenticationOK(char const* cmdName, char const* urlSuffix, char const* fullRequestStr); - void changeClientInputSocket(int newSocketNum, ServerTLSState const* newTLSState, - unsigned char const* extraData, unsigned extraDataSize); - // used to implement RTSP-over-HTTP tunneling - static void continueHandlingREGISTER(ParamsForREGISTER* params); - virtual void continueHandlingREGISTER1(ParamsForREGISTER* params); - - // Shortcuts for setting up a RTSP response (prior to sending it): - void setRTSPResponse(char const* responseStr); - void setRTSPResponse(char const* responseStr, u_int32_t sessionId); - void setRTSPResponse(char const* responseStr, char const* contentStr); - void setRTSPResponse(char const* responseStr, u_int32_t sessionId, char const* contentStr); - - RTSPServer& fOurRTSPServer; // same as ::fOurServer - int& fClientInputSocket; // aliased to ::fOurSocket - int fClientOutputSocket; - ServerTLSState fPOSTSocketTLS; // used only for RTSP-over-HTTPS - int fAddressFamily; - Boolean fIsActive; - unsigned char* fLastCRLF; - unsigned fRecursionCount; - char const* fCurrentCSeq; - Authenticator fCurrentAuthenticator; // used if access control is needed - char* fOurSessionCookie; // used for optional RTSP-over-HTTP tunneling - unsigned fBase64RemainderCount; // used for optional RTSP-over-HTTP tunneling (possible values: 0,1,2,3) - unsigned fScheduledDelayedTask; - }; - - // The state of an individual client session (using one or more sequential TCP connections) handled by a RTSP server: - class RTSPClientSession: public GenericMediaServer::ClientSession { - protected: - RTSPClientSession(RTSPServer& ourServer, u_int32_t sessionId); - virtual ~RTSPClientSession(); - - friend class RTSPServer; - friend class RTSPClientConnection; - // Make the handler functions for each command virtual, to allow subclasses to redefine them: - virtual void handleCmd_SETUP(RTSPClientConnection* ourClientConnection, - char const* urlPreSuffix, char const* urlSuffix, char const* fullRequestStr); - static void SETUPLookupCompletionFunction1(void* clientData, ServerMediaSession* sessionLookedUp); - virtual void handleCmd_SETUP_afterLookup1(ServerMediaSession* sms); - static void SETUPLookupCompletionFunction2(void* clientData, ServerMediaSession* sessionLookedUp); - virtual void handleCmd_SETUP_afterLookup2(ServerMediaSession* sms); - virtual void handleCmd_withinSession(RTSPClientConnection* ourClientConnection, - char const* cmdName, - char const* urlPreSuffix, char const* urlSuffix, - char const* fullRequestStr); - virtual void handleCmd_TEARDOWN(RTSPClientConnection* ourClientConnection, - ServerMediaSubsession* subsession); - virtual void handleCmd_PLAY(RTSPClientConnection* ourClientConnection, - ServerMediaSubsession* subsession, char const* fullRequestStr); - virtual void handleCmd_PAUSE(RTSPClientConnection* ourClientConnection, - ServerMediaSubsession* subsession); - virtual void handleCmd_GET_PARAMETER(RTSPClientConnection* ourClientConnection, - ServerMediaSubsession* subsession, char const* fullRequestStr); - virtual void handleCmd_SET_PARAMETER(RTSPClientConnection* ourClientConnection, - ServerMediaSubsession* subsession, char const* fullRequestStr); - protected: - void deleteStreamByTrack(unsigned trackNum); - void reclaimStreamStates(); - Boolean isMulticast() const { return fIsMulticast; } - - // Shortcuts for setting up a RTSP response (prior to sending it): - void setRTSPResponse(RTSPClientConnection* ourClientConnection, char const* responseStr) { ourClientConnection->setRTSPResponse(responseStr); } - void setRTSPResponse(RTSPClientConnection* ourClientConnection, char const* responseStr, u_int32_t sessionId) { ourClientConnection->setRTSPResponse(responseStr, sessionId); } - void setRTSPResponse(RTSPClientConnection* ourClientConnection, char const* responseStr, char const* contentStr) { ourClientConnection->setRTSPResponse(responseStr, contentStr); } - void setRTSPResponse(RTSPClientConnection* ourClientConnection, char const* responseStr, u_int32_t sessionId, char const* contentStr) { ourClientConnection->setRTSPResponse(responseStr, sessionId, contentStr); } - - protected: - RTSPServer& fOurRTSPServer; // same as ::fOurServer - Boolean fIsMulticast, fStreamAfterSETUP; - unsigned char fTCPStreamIdCount; // used for (optional) RTP/TCP - Boolean usesTCPTransport() const { return fTCPStreamIdCount > 0; } - unsigned fNumStreamStates; - struct streamState { - ServerMediaSubsession* subsession; - int tcpSocketNum; - void* streamToken; - } * fStreamStates; - - // Member variables used to implement "handleCmd_SETUP()": - RTSPServer::RTSPClientConnection* fOurClientConnection; - char const* fURLPreSuffix; char const* fURLSuffix; char const* fFullRequestStr; char const* fTrackId; - }; - -protected: // redefined virtual functions - // If you subclass "RTSPClientConnection", then you must also redefine this virtual function in order - // to create new objects of your subclass: - virtual ClientConnection* createNewClientConnection(int clientSocket, struct sockaddr_storage const& clientAddr); - -protected: - // If you subclass "RTSPClientSession", then you must also redefine this virtual function in order - // to create new objects of your subclass: - virtual ClientSession* createNewClientSession(u_int32_t sessionId); - -private: - static void incomingConnectionHandlerHTTPIPv4(void*, int /*mask*/); - void incomingConnectionHandlerHTTPIPv4(); - static void incomingConnectionHandlerHTTPIPv6(void*, int /*mask*/); - void incomingConnectionHandlerHTTPIPv6(); - - void noteTCPStreamingOnSocket(int socketNum, RTSPClientSession* clientSession, unsigned trackNum); - void unnoteTCPStreamingOnSocket(int socketNum, RTSPClientSession* clientSession, unsigned trackNum); - void stopTCPStreamingOnSocket(int socketNum); - -private: - friend class RTSPClientConnection; - friend class RTSPClientSession; - friend class RegisterRequestRecord; - friend class DeregisterRequestRecord; - int fHTTPServerSocketIPv4, fHTTPServerSocketIPv6; // for optional RTSP-over-HTTP tunneling - Port fHTTPServerPort; // ditto - HashTable* fClientConnectionsForHTTPTunneling; // maps client-supplied 'session cookie' strings to "RTSPClientConnection"s - // (used only for optional RTSP-over-HTTP tunneling) - HashTable* fTCPStreamingDatabase; - // maps TCP socket numbers to ids of sessions that are streaming over it (RTP/RTCP-over-TCP) - HashTable* fPendingRegisterOrDeregisterRequests; - unsigned fRegisterOrDeregisterRequestCounter; - UserAuthenticationDatabase* fAuthDB; - Boolean fAllowStreamingRTPOverTCP; // by default, True - Boolean fOurConnectionsUseTLS; // by default, False - Boolean fWeServeSRTP; // used only if "fOurConnectionsUseTLS" is True - Boolean fWeEncryptSRTP; // used only if "fWeServeSRTP" is True -}; - - -////////// A subclass of "RTSPServer" that implements the "REGISTER" command to set up proxying on the specified URL ////////// - -class RTSPServerWithREGISTERProxying: public RTSPServer { -public: - static RTSPServerWithREGISTERProxying* createNew(UsageEnvironment& env, Port ourPort = 554, - UserAuthenticationDatabase* authDatabase = NULL, - UserAuthenticationDatabase* authDatabaseForREGISTER = NULL, - unsigned reclamationSeconds = 65, - Boolean streamRTPOverTCP = False, - int verbosityLevelForProxying = 0, - char const* backEndUsername = NULL, - char const* backEndPassword = NULL); - -protected: - RTSPServerWithREGISTERProxying(UsageEnvironment& env, int ourSocketIPv4, int ourSocketIPv6, Port ourPort, - UserAuthenticationDatabase* authDatabase, UserAuthenticationDatabase* authDatabaseForREGISTER, - unsigned reclamationSeconds, - Boolean streamRTPOverTCP, int verbosityLevelForProxying, - char const* backEndUsername, char const* backEndPassword); - // called only by createNew(); - virtual ~RTSPServerWithREGISTERProxying(); - -protected: // redefined virtual functions - virtual char const* allowedCommandNames(); - virtual Boolean weImplementREGISTER(char const* cmd/*"REGISTER" or "DEREGISTER"*/, - char const* proxyURLSuffix, char*& responseStr); - virtual void implementCmd_REGISTER(char const* cmd/*"REGISTER" or "DEREGISTER"*/, - char const* url, char const* urlSuffix, int socketToRemoteServer, - Boolean deliverViaTCP, char const* proxyURLSuffix); - virtual UserAuthenticationDatabase* getAuthenticationDatabaseForCommand(char const* cmdName); - -private: - Boolean fStreamRTPOverTCP; - int fVerbosityLevelForProxying; - unsigned fRegisteredProxyCounter; - char* fAllowedCommandNames; - UserAuthenticationDatabase* fAuthDBForREGISTER; - char* fBackEndUsername; - char* fBackEndPassword; -}; - - -// A special version of "parseTransportHeader()", used just for parsing the "Transport:" header -// in an incoming "REGISTER" command: -void parseTransportHeaderForREGISTER(char const* buf, // in - Boolean &reuseConnection, // out - Boolean& deliverViaTCP, // out - char*& proxyURLSuffix); // out - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/RawVideoFrameParameters.hh b/project/3rdparty/include/live555/liveMedia/RawVideoFrameParameters.hh deleted file mode 100644 index d365dca6e..000000000 --- a/project/3rdparty/include/live555/liveMedia/RawVideoFrameParameters.hh +++ /dev/null @@ -1,37 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Parameters used for streaming (transmitting and receiving) raw video frames over RTP -// C++ header - -#ifndef _RAW_VIDEO_FRAME_PARAMETERS_HH -#define _RAW_VIDEO_FRAME_PARAMETERS_HH - -class RawVideoFrameParameters { -public: - RawVideoFrameParameters(unsigned width, unsigned height, unsigned depth, char const* sampling); - virtual ~RawVideoFrameParameters(); - -public: - u_int16_t pgroupSize; // in octets - u_int16_t numPixelsInPgroup; - u_int32_t scanLineSize; // in octets - u_int32_t frameSize; // in octets - u_int16_t scanLineIterationStep; // usually 1, but 2 for sampling=="YCbCr-4:2:0" -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/RawVideoRTPSink.hh b/project/3rdparty/include/live555/liveMedia/RawVideoRTPSink.hh deleted file mode 100644 index c39210927..000000000 --- a/project/3rdparty/include/live555/liveMedia/RawVideoRTPSink.hh +++ /dev/null @@ -1,71 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for Raw video -// C++ header - -#ifndef _RAW_VIDEO_RTP_SINK_HH -#define _RAW_VIDEO_RTP_SINK_HH - -#ifndef _VIDEO_RTP_SINK_HH -#include "VideoRTPSink.hh" -#endif - -#ifndef _RAW_VIDEO_FRAME_PARAMETERS_HH -#include "RawVideoFrameParameters.hh" -#endif - -class RawVideoRTPSink: public VideoRTPSink { -public: - static RawVideoRTPSink* - createNew(UsageEnvironment& env, Groupsock* RTPgs, u_int8_t rtpPayloadFormat, - unsigned width, unsigned height, unsigned depth, // as defined by RFC 4175, sec 6.1 - char const* sampling, char const* colorimetry); - -protected: - RawVideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, - u_int8_t rtpPayloadFormat, - unsigned width, unsigned height, unsigned depth, - char const* sampling, char const* colorimetry); - // called only by createNew() - - virtual ~RawVideoRTPSink(); - -private: // redefined virtual functions: - virtual char const* auxSDPLine(); // for the "a=fmtp:" SDP line - - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - virtual unsigned specialHeaderSize() const; - virtual unsigned computeOverflowForNewFrame(unsigned newFrameSize) const; - -private: - char* fFmtpSDPLine; - unsigned fLineIndex; - RawVideoFrameParameters fP; - - unsigned getNumLinesInPacket(unsigned fragOffset, u_int16_t*& lengths, u_int16_t*& offsets) const; - // return the number of lines, their lengths and offsets from the fragmentation offset of the whole frame. - // call delete[] on lengths and offsets after use of the function -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/RawVideoRTPSource.hh b/project/3rdparty/include/live555/liveMedia/RawVideoRTPSource.hh deleted file mode 100644 index 281722979..000000000 --- a/project/3rdparty/include/live555/liveMedia/RawVideoRTPSource.hh +++ /dev/null @@ -1,60 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Raw Video RTP Sources (RFC 4175) -// C++ header - -#ifndef _RAW_VIDEO_RTP_SOURCE_HH -#define _RAW_VIDEO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class RawVideoRTPSource: public MultiFramedRTPSource { -public: - static RawVideoRTPSource* createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - - u_int16_t currentLineNumber() const; // of the most recently-read/processed scan line - u_int8_t currentLineFieldId() const; // of the most recently-read/processed scan line (0 or 1) - u_int16_t currentOffsetWithinLine() const; // of the most recently-read/processed scan line - -protected: - RawVideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency = 90000); - // called only by createNew() - - virtual ~RawVideoRTPSource(); - -protected: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; - -private: - unsigned fNumLines; // in the most recently read packet - unsigned fNextLine; // index of the next AU Header to read - struct LineHeader* fLineHeaders; - - friend class RawVideoBufferedPacket; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/SIPClient.hh b/project/3rdparty/include/live555/liveMedia/SIPClient.hh deleted file mode 100644 index c6c199af3..000000000 --- a/project/3rdparty/include/live555/liveMedia/SIPClient.hh +++ /dev/null @@ -1,150 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A generic SIP client -// C++ header - -#ifndef _SIP_CLIENT_HH -#define _SIP_CLIENT_HH - -#ifndef _MEDIA_SESSION_HH -#include "MediaSession.hh" -#endif -#ifndef _NET_ADDRESS_HH -#include "../groupsock/NetAddress.hh" -#endif -#ifndef _DIGEST_AUTHENTICATION_HH -#include "DigestAuthentication.hh" -#endif - -// Possible states in the "INVITE" transition diagram (RFC 3261, Figure 5) -enum inviteClientState { Calling, Proceeding, Completed, Terminated }; - -class SIPClient: public Medium { -public: - static SIPClient* createNew(UsageEnvironment& env, - unsigned char desiredAudioRTPPayloadFormat, - char const* mimeSubtype = NULL, - int verbosityLevel = 0, - char const* applicationName = NULL); - - void setProxyServer(struct sockaddr_storage const& proxyServerAddress, - portNumBits proxyServerPortNum); - - void setClientStartPortNum(portNumBits clientStartPortNum) { - fClientStartPortNum = clientStartPortNum; - } - - char* invite(char const* url, Authenticator* authenticator = NULL); - // Issues a SIP "INVITE" command - // Returns the session SDP description if this command succeeds - char* inviteWithPassword(char const* url, - char const* username, char const* password); - // Uses "invite()" to do an "INVITE" - first - // without using "password", then (if we get an Unauthorized - // response) with an authentication response computed from "password" - - Boolean sendACK(); // on current call - Boolean sendBYE(); // on current call - - static Boolean parseSIPURL(UsageEnvironment& env, char const* url, - NetAddress& address, portNumBits& portNum); - // (ignores any "[:]@" in "url") - static Boolean parseSIPURLUsernamePassword(char const* url, - char*& username, - char*& password); - char const* getInviteSdpReply() const { return fInviteSDPDescriptionReturned; } - - void setUserAgentString(char const* userAgentName); - // sets an alternative string to be used in SIP "User-Agent:" headers - -protected: - virtual ~SIPClient(); - -private: - SIPClient(UsageEnvironment& env, - unsigned char desiredAudioRTPPayloadFormat, - char const* mimeSubtype, - int verbosityLevel, - char const* applicationName); - // called only by createNew(); - - void reset(); - - // Routines used to implement invite*(): - char* invite1(Authenticator* authenticator); - Boolean processURL(char const* url); - Boolean sendINVITE(); - static void inviteResponseHandler(void* clientData, int mask); - void doInviteStateMachine(unsigned responseCode); - void doInviteStateTerminated(unsigned responseCode); - TaskToken fTimerA, fTimerB, fTimerD; - static void timerAHandler(void* clientData); - static void timerBHandler(void* clientData); - static void timerDHandler(void* clientData); - unsigned const fT1; // in microseconds - unsigned fTimerALen; // in microseconds; initially fT1, then doubles - unsigned fTimerACount; - - // Routines used to implement all commands: - char* createAuthenticatorString(Authenticator const* authenticator, - char const* cmd, char const* url); - Boolean sendRequest(char const* requestString, unsigned requestLength); - unsigned getResponseCode(); - unsigned getResponse(char*& responseBuffer, unsigned responseBufferSize); - Boolean parseResponseCode(char const* line, unsigned& responseCode); - -private: - // Set for all calls: - unsigned char fDesiredAudioRTPPayloadFormat; - char* fMIMESubtype; - unsigned fMIMESubtypeSize; - int fVerbosityLevel; - unsigned fCSeq; // sequence number, used in consecutive requests - char const* fApplicationName; - unsigned fApplicationNameSize; - char const* fOurAddressStr; - unsigned fOurAddressStrSize; - portNumBits fOurPortNum; - Groupsock* fOurSocket; - char* fUserAgentHeaderStr; - unsigned fUserAgentHeaderStrLen; - - // Set for each call: - char const* fURL; - unsigned fURLSize; - struct sockaddr_storage fServerAddress; - Boolean fServerAddressIsSet; - portNumBits fServerPortNum; // in host order - portNumBits fClientStartPortNum; // in host order - unsigned fCallId, fFromTag; // set by us - char const* fToTagStr; // set by the responder - unsigned fToTagStrSize; - Authenticator fValidAuthenticator; - char const* fUserName; // 'user' name used in "From:" & "Contact:" lines - unsigned fUserNameSize; - - char* fInviteSDPDescription; - char* fInviteSDPDescriptionReturned; - char* fInviteCmd; - unsigned fInviteCmdSize; - Authenticator* fWorkingAuthenticator; - inviteClientState fInviteClientState; - char fEventLoopStopFlag; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/SRTPCryptographicContext.hh b/project/3rdparty/include/live555/liveMedia/SRTPCryptographicContext.hh deleted file mode 100644 index 21dd030d8..000000000 --- a/project/3rdparty/include/live555/liveMedia/SRTPCryptographicContext.hh +++ /dev/null @@ -1,152 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// The SRTP 'Cryptographic Context', used in all of our uses of SRTP. -// Definition - -#ifndef _SRTP_CRYPTOGRAPHIC_CONTEXT_HH -#define _SRTP_CRYPTOGRAPHIC_CONTEXT_HH - -#ifndef _MIKEY_HH -#include "MIKEY.hh" -#endif - -class SRTPCryptographicContext { -public: - SRTPCryptographicContext(MIKEYState const& mikeyState); - virtual ~SRTPCryptographicContext(); - - // Authenticate (if necessary) and decrypt (if necessary) incoming SRTP and SRTCP packets. - // Returns True iff the packet is well-formed and authenticates OK. - // ("outPacketSize" will be <= "inPacketSize".) - Boolean processIncomingSRTPPacket(u_int8_t* buffer, unsigned inPacketSize, - unsigned& outPacketSize); - Boolean processIncomingSRTCPPacket(u_int8_t* buffer, unsigned inPacketSize, - unsigned& outPacketSize); - - // Encrypt (if necessary) and add an authentication tag (if necessary) to an outgoing - // RTP and RTCP packet. - // Returns True iff the packet is well-formed. - // ("outPacketSize" will be >= "inPacketSize"; there must be enough space at the end of - // "buffer" for the extra (4+10 bytes for SRTP; 4+4+10 bytes for SRTCP).) - Boolean processOutgoingSRTPPacket(u_int8_t* buffer, unsigned inPacketSize, - unsigned& outPacketSize); - Boolean processOutgoingSRTCPPacket(u_int8_t* buffer, unsigned inPacketSize, - unsigned& outPacketSize); - -#if defined(CONFIG_LIVE555_OPENSSL) -private: - // Definitions specific to the "SRTP_AES128_CM_HMAC_SHA1_80" ciphersuite. - // Later generalize to support more SRTP ciphersuites ##### -#define SRTP_CIPHER_KEY_LENGTH (128/8) // in bytes -#define SRTP_CIPHER_SALT_LENGTH (112/8) // in bytes -#define SRTP_MKI_LENGTH 4 // in bytes -#define SRTP_AUTH_KEY_LENGTH (160/8) // in bytes -#define SRTP_AUTH_TAG_LENGTH (80/8) // in bytes - - struct derivedKeys { - u_int8_t cipherKey[SRTP_CIPHER_KEY_LENGTH]; - u_int8_t salt[SRTP_CIPHER_SALT_LENGTH]; - u_int8_t authKey[SRTP_AUTH_KEY_LENGTH]; - }; - - struct allDerivedKeys { - derivedKeys srtp; - derivedKeys srtcp; - }; - - typedef enum { - label_srtp_encryption = 0x00, - label_srtp_msg_auth = 0x01, - label_srtp_salt = 0x02, - label_srtcp_encryption = 0x03, - label_srtcp_msg_auth = 0x04, - label_srtcp_salt = 0x05 - } SRTPKeyDerivationLabel; - - unsigned generateSRTPAuthenticationTag(u_int8_t const* dataToAuthenticate, unsigned numBytesToAuthenticate, - u_int8_t* resultAuthenticationTag); - // returns the size of the resulting authentication tag - unsigned generateSRTCPAuthenticationTag(u_int8_t const* dataToAuthenticate, unsigned numBytesToAuthenticate, - u_int8_t* resultAuthenticationTag); - // returns the size of the resulting authentication tag - - Boolean verifySRTPAuthenticationTag(u_int8_t* dataToAuthenticate, unsigned numBytesToAuthenticate, - u_int32_t roc, u_int8_t const* authenticationTag); - Boolean verifySRTCPAuthenticationTag(u_int8_t const* dataToAuthenticate, unsigned numBytesToAuthenticate, - u_int8_t const* authenticationTag); - - void decryptSRTPPacket(u_int64_t index, u_int32_t ssrc, u_int8_t* data, unsigned numDataBytes); - void decryptSRTCPPacket(u_int32_t index, u_int32_t ssrc, u_int8_t* data, unsigned numDataBytes); - - void encryptSRTPPacket(u_int64_t index, u_int32_t ssrc, u_int8_t* data, unsigned numDataBytes); - void encryptSRTCPPacket(u_int32_t index, u_int32_t ssrc, u_int8_t* data, unsigned numDataBytes); - - unsigned generateAuthenticationTag(derivedKeys& keysToUse, - u_int8_t const* dataToAuthenticate, unsigned numBytesToAuthenticate, - u_int8_t* resultAuthenticationTag); - // returns the size of the resulting authentication tag - // "resultAuthenticationTag" must point to an array of at least SRTP_AUTH_TAG_LENGTH - Boolean verifyAuthenticationTag(derivedKeys& keysToUse, - u_int8_t const* dataToAuthenticate, unsigned numBytesToAuthenticate, - u_int8_t const* authenticationTag); - - void cryptData(derivedKeys& keys, u_int64_t index, u_int32_t ssrc, - u_int8_t* data, unsigned numDataBytes); - - void performKeyDerivation(); - - void deriveKeysFromMaster(u_int8_t const* masterKey, u_int8_t const* salt, - allDerivedKeys& allKeysResult); - // used to implement "performKeyDerivation()" - void deriveSingleKey(u_int8_t const* masterKey, u_int8_t const* salt, - SRTPKeyDerivationLabel label, - unsigned resultKeyLength, u_int8_t* resultKey); - // used to implement "deriveKeysFromMaster()". - // ("resultKey" must be an existing buffer, of size >= "resultKeyLength") - -private: - MIKEYState const& fMIKEYState; - - // Master key + salt: - u_int8_t const* masterKeyPlusSalt() const { return fMIKEYState.keyData(); } - - u_int8_t const* masterKey() const { return &masterKeyPlusSalt()[0]; } - u_int8_t const* masterSalt() const { return &masterKeyPlusSalt()[SRTP_CIPHER_KEY_LENGTH]; } - - Boolean weEncryptSRTP() const { return fMIKEYState.encryptSRTP(); } - Boolean weEncryptSRTCP() const { return fMIKEYState.encryptSRTCP(); } - Boolean weAuthenticate() const { return fMIKEYState.useAuthentication(); } - u_int32_t MKI() const { return fMIKEYState.MKI(); } - - // Derived (i.e., session) keys: - allDerivedKeys fDerivedKeys; - - // State used for handling the reception of SRTP packets: - Boolean fHaveReceivedSRTPPackets; - u_int16_t fPreviousHighRTPSeqNum; - u_int32_t fReceptionROC; // rollover counter - - // State used for handling the sending of SRTP packets: - Boolean fHaveSentSRTPPackets; - u_int32_t fSendingROC; - - // State used for handling the sending of SRTCP packets: - u_int32_t fSRTCPIndex; -#endif -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/ServerMediaSession.hh b/project/3rdparty/include/live555/liveMedia/ServerMediaSession.hh deleted file mode 100644 index 218cb1510..000000000 --- a/project/3rdparty/include/live555/liveMedia/ServerMediaSession.hh +++ /dev/null @@ -1,200 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A data structure that represents a session that consists of -// potentially multiple (audio and/or video) sub-sessions -// (This data structure is used for media *streamers* - i.e., servers. -// For media receivers, use "MediaSession" instead.) -// C++ header - -#ifndef _SERVER_MEDIA_SESSION_HH -#define _SERVER_MEDIA_SESSION_HH - -#ifndef _RTCP_HH -#include "RTCP.hh" -#endif - -class ServerMediaSubsession; // forward - -class ServerMediaSession: public Medium { -public: - static ServerMediaSession* createNew(UsageEnvironment& env, - char const* streamName = NULL, - char const* info = NULL, - char const* description = NULL, - Boolean isSSM = False, - char const* miscSDPLines = NULL); - - static Boolean lookupByName(UsageEnvironment& env, - char const* mediumName, - ServerMediaSession*& resultSession); - - char* generateSDPDescription(int addressFamily); // based on the entire session - // Note: The caller is responsible for freeing the returned string - - char const* streamName() const { return fStreamName; } - - Boolean addSubsession(ServerMediaSubsession* subsession); - unsigned numSubsessions() const { return fSubsessionCounter; } - - void testScaleFactor(float& scale); // sets "scale" to the actual supported scale - float duration() const; - // a result == 0 means an unbounded session (the default) - // a result < 0 means: subsession durations differ; the result is -(the largest). - // a result > 0 means: this is the duration of a bounded session - - virtual void noteLiveness(); - // called whenever a client - accessing this media - notes liveness. - // The default implementation does nothing, but subclasses can redefine this - e.g., if you - // want to remove long-unused "ServerMediaSession"s from the server. - - unsigned referenceCount() const { return fReferenceCount; } - void incrementReferenceCount() { ++fReferenceCount; } - void decrementReferenceCount() { if (fReferenceCount > 0) --fReferenceCount; } - Boolean& deleteWhenUnreferenced() { return fDeleteWhenUnreferenced; } - - void deleteAllSubsessions(); - // Removes and deletes all subsessions added by "addSubsession()", returning us to an 'empty' state - // Note: If you have already added this "ServerMediaSession" to a server then, before calling this function, - // you must first close any client connections that use it, - // by calling "GenericMediaServer::closeAllClientSessionsForServerMediaSession()". - - Boolean streamingUsesSRTP; // by default, False - Boolean streamingIsEncrypted; // by default, False - -protected: - ServerMediaSession(UsageEnvironment& env, char const* streamName, - char const* info, char const* description, - Boolean isSSM, char const* miscSDPLines); - // called only by "createNew()" - - virtual ~ServerMediaSession(); - -private: // redefined virtual functions - virtual Boolean isServerMediaSession() const; - -private: - Boolean fIsSSM; - - // Linkage fields: - friend class ServerMediaSubsessionIterator; - ServerMediaSubsession* fSubsessionsHead; - ServerMediaSubsession* fSubsessionsTail; - unsigned fSubsessionCounter; - - char* fStreamName; - char* fInfoSDPString; - char* fDescriptionSDPString; - char* fMiscSDPLines; - struct timeval fCreationTime; - unsigned fReferenceCount; - Boolean fDeleteWhenUnreferenced; -}; - - -class ServerMediaSubsessionIterator { -public: - ServerMediaSubsessionIterator(ServerMediaSession& session); - virtual ~ServerMediaSubsessionIterator(); - - ServerMediaSubsession* next(); // NULL if none - void reset(); - -private: - ServerMediaSession& fOurSession; - ServerMediaSubsession* fNextPtr; -}; - - -class ServerMediaSubsession: public Medium { -public: - unsigned trackNumber() const { return fTrackNumber; } - char const* trackId(); - virtual char const* sdpLines(int addressFamily) = 0; - virtual void getStreamParameters(unsigned clientSessionId, // in - struct sockaddr_storage const& clientAddress, // in - Port const& clientRTPPort, // in - Port const& clientRTCPPort, // in - int tcpSocketNum, // in (-1 means use UDP, not TCP) - unsigned char rtpChannelId, // in (used if TCP) - unsigned char rtcpChannelId, // in (used if TCP) - TLSState* tlsState, // in (used if TCP) - struct sockaddr_storage& destinationAddress, // in out - u_int8_t& destinationTTL, // in out - Boolean& isMulticast, // out - Port& serverRTPPort, // out - Port& serverRTCPPort, // out - void*& streamToken // out - ) = 0; - virtual void startStream(unsigned clientSessionId, void* streamToken, - TaskFunc* rtcpRRHandler, - void* rtcpRRHandlerClientData, - unsigned short& rtpSeqNum, - unsigned& rtpTimestamp, - ServerRequestAlternativeByteHandler* serverRequestAlternativeByteHandler, - void* serverRequestAlternativeByteHandlerClientData) = 0; - virtual void pauseStream(unsigned clientSessionId, void* streamToken); - virtual void seekStream(unsigned clientSessionId, void* streamToken, double& seekNPT, - double streamDuration, u_int64_t& numBytes); - // This routine is used to seek by relative (i.e., NPT) time. - // "streamDuration", if >0.0, specifies how much data to stream, past "seekNPT". (If <=0.0, all remaining data is streamed.) - // "numBytes" returns the size (in bytes) of the data to be streamed, or 0 if unknown or unlimited. - virtual void seekStream(unsigned clientSessionId, void* streamToken, char*& absStart, char*& absEnd); - // This routine is used to seek by 'absolute' time. - // "absStart" should be a string of the form "YYYYMMDDTHHMMSSZ" or "YYYYMMDDTHHMMSS.Z". - // "absEnd" should be either NULL (for no end time), or a string of the same form as "absStart". - // These strings may be modified in-place, or can be reassigned to a newly-allocated value (after delete[]ing the original). - virtual void nullSeekStream(unsigned clientSessionId, void* streamToken, - double streamEndTime, u_int64_t& numBytes); - // Called whenever we're handling a "PLAY" command without a specified start time. - virtual void setStreamScale(unsigned clientSessionId, void* streamToken, float scale); - virtual float getCurrentNPT(void* streamToken); - virtual FramedSource* getStreamSource(void* streamToken); - virtual void getRTPSinkandRTCP(void* streamToken, - RTPSink const*& rtpSink, RTCPInstance const*& rtcp) = 0; - // Returns pointers to the "RTPSink" and "RTCPInstance" objects for "streamToken". - // (This can be useful if you want to get the associated 'Groupsock' objects, for example.) - // You must not delete these objects, or start/stop playing them; instead, that is done - // using the "startStream()" and "deleteStream()" functions. - virtual void deleteStream(unsigned clientSessionId, void*& streamToken); - - virtual void testScaleFactor(float& scale); // sets "scale" to the actual supported scale - virtual float duration() const; - // returns 0 for an unbounded session (the default) - // returns > 0 for a bounded session - virtual void getAbsoluteTimeRange(char*& absStartTime, char*& absEndTime) const; - // Subclasses can reimplement this iff they support seeking by 'absolute' time. - -protected: // we're a virtual base class - ServerMediaSubsession(UsageEnvironment& env); - virtual ~ServerMediaSubsession(); - - char const* rangeSDPLine() const; - // returns a string to be delete[]d - - ServerMediaSession* fParentSession; - -private: - friend class ServerMediaSession; - friend class ServerMediaSubsessionIterator; - ServerMediaSubsession* fNext; - - unsigned fTrackNumber; // within an enclosing ServerMediaSession - char const* fTrackId; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/SimpleRTPSink.hh b/project/3rdparty/include/live555/liveMedia/SimpleRTPSink.hh deleted file mode 100644 index 74516e04f..000000000 --- a/project/3rdparty/include/live555/liveMedia/SimpleRTPSink.hh +++ /dev/null @@ -1,76 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A simple RTP sink that packs frames into each outgoing -// packet, without any fragmentation or special headers. -// C++ header - -#ifndef _SIMPLE_RTP_SINK_HH -#define _SIMPLE_RTP_SINK_HH - -#ifndef _MULTI_FRAMED_RTP_SINK_HH -#include "MultiFramedRTPSink.hh" -#endif - -class SimpleRTPSink: public MultiFramedRTPSink { -public: - static SimpleRTPSink* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency, - char const* sdpMediaTypeString, - char const* rtpPayloadFormatName, - unsigned numChannels = 1, - Boolean allowMultipleFramesPerPacket = True, - Boolean doNormalMBitRule = True); - // "doNormalMBitRule" means: If the medium (i.e., "sdpMediaTypeString") is other than "audio", set the RTP "M" bit - // on each outgoing packet iff it contains the last (or only) fragment of a frame. - // Otherwise (i.e., if "doNormalMBitRule" is False, or the medium is "audio"), leave the "M" bit unset. - - void setMBitOnNextPacket() { fSetMBitOnNextPacket = True; } // hack for optionally setting the RTP 'M' bit from outside the class - -protected: - SimpleRTPSink(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency, - char const* sdpMediaTypeString, - char const* rtpPayloadFormatName, - unsigned numChannels, - Boolean allowMultipleFramesPerPacket, - Boolean doNormalMBitRule); - // called only by createNew() - - virtual ~SimpleRTPSink(); - -protected: // redefined virtual functions - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual - Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - virtual char const* sdpMediaType() const; - -private: - char const* fSDPMediaTypeString; - Boolean fAllowMultipleFramesPerPacket; - Boolean fSetMBitOnLastFrames, fSetMBitOnNextPacket; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/SimpleRTPSource.hh b/project/3rdparty/include/live555/liveMedia/SimpleRTPSource.hh deleted file mode 100644 index 705070963..000000000 --- a/project/3rdparty/include/live555/liveMedia/SimpleRTPSource.hh +++ /dev/null @@ -1,65 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A RTP source for a simple RTP payload format that -// - doesn't have any special headers following the RTP header -// (if necessary, the "offset" parameter can be used to specify a -// special header that we just skip over) -// - doesn't have any special framing apart from the packet data itself -// C++ header - -#ifndef _SIMPLE_RTP_SOURCE_HH -#define _SIMPLE_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class SimpleRTPSource: public MultiFramedRTPSource { -public: - static SimpleRTPSource* createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency, - char const* mimeTypeString, - unsigned offset = 0, - Boolean doNormalMBitRule = True); - // "doNormalMBitRule" means: If the medium is not audio, use the RTP "M" - // bit on each incoming packet to indicate the last (or only) fragment - // of a frame. Otherwise (i.e., if "doNormalMBitRule" is False, or the medium is "audio"), the "M" bit is ignored. - -protected: - SimpleRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency, - char const* mimeTypeString, unsigned offset, - Boolean doNormalMBitRule); - // called only by createNew(), or by subclass constructors - virtual ~SimpleRTPSource(); - -protected: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; - -private: - char const* fMIMEtypeString; - unsigned fOffset; - Boolean fUseMBitForFrameEnd; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/StreamReplicator.hh b/project/3rdparty/include/live555/liveMedia/StreamReplicator.hh deleted file mode 100644 index 0490149b4..000000000 --- a/project/3rdparty/include/live555/liveMedia/StreamReplicator.hh +++ /dev/null @@ -1,84 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// An class that can be used to create (possibly multiple) 'replicas' of an incoming stream. -// C++ header - -#ifndef _STREAM_REPLICATOR_HH -#define _STREAM_REPLICATOR_HH - -#ifndef _FRAMED_SOURCE_HH -#include "FramedSource.hh" -#endif - -class StreamReplica; // forward - -class StreamReplicator: public Medium { -public: - static StreamReplicator* createNew(UsageEnvironment& env, FramedSource* inputSource, Boolean deleteWhenLastReplicaDies = True); - // If "deleteWhenLastReplicaDies" is True (the default), then the "StreamReplicator" object is deleted when (and only when) - // all replicas have been deleted. (In this case, you must *not* call "Medium::close()" on the "StreamReplicator" object, - // unless you never created any replicas from it to begin with.) - // If "deleteWhenLastReplicaDies" is False, then the "StreamReplicator" object remains in existence, even when all replicas - // have been deleted. (This allows you to create new replicas later, if you wish.) In this case, you delete the - // "StreamReplicator" object by calling "Medium::close()" on it - but you must do so only when "numReplicas()" returns 0. - - FramedSource* createStreamReplica(); - - unsigned numReplicas() const { return fNumReplicas; } - - FramedSource* inputSource() const { return fInputSource; } - - // Call before destruction if you want to prevent the destructor from closing the input source - void detachInputSource() { fInputSource = NULL; } - -protected: - StreamReplicator(UsageEnvironment& env, FramedSource* inputSource, Boolean deleteWhenLastReplicaDies); - // called only by "createNew()" - virtual ~StreamReplicator(); - -private: - // Routines called by replicas to implement frame delivery, and the stopping/restarting/deletion of replicas: - friend class StreamReplica; - void getNextFrame(StreamReplica* replica); - void deactivateStreamReplica(StreamReplica* replica); - void removeStreamReplica(StreamReplica* replica); - -private: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame(unsigned frameSize, unsigned numTruncatedBytes, - struct timeval presentationTime, unsigned durationInMicroseconds); - - static void onSourceClosure(void* clientData); - void onSourceClosure(); - - void deliverReceivedFrame(); - -private: - FramedSource* fInputSource; - Boolean fDeleteWhenLastReplicaDies, fInputSourceHasClosed; - unsigned fNumReplicas, fNumActiveReplicas, fNumDeliveriesMadeSoFar; - int fFrameIndex; // 0 or 1; used to figure out if a replica is requesting the current frame, or the next frame - - StreamReplica* fPrimaryReplica; // the first replica that requests each frame. We use its buffer when copying to the others. - StreamReplica* fReplicasAwaitingCurrentFrame; // other than the 'primary' replica - StreamReplica* fReplicasAwaitingNextFrame; // replicas that have already received the current frame, and have asked for the next -}; -#endif diff --git a/project/3rdparty/include/live555/liveMedia/T140TextRTPSink.hh b/project/3rdparty/include/live555/liveMedia/T140TextRTPSink.hh deleted file mode 100644 index 7c52514df..000000000 --- a/project/3rdparty/include/live555/liveMedia/T140TextRTPSink.hh +++ /dev/null @@ -1,103 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for T.140 text (RFC 2793) -// C++ header - -#ifndef _T140_TEXT_RTP_SINK_HH -#define _T140_TEXT_RTP_SINK_HH - -#ifndef _TEXT_RTP_SINK_HH -#include "TextRTPSink.hh" -#endif -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -class T140IdleFilter; - -class T140TextRTPSink: public TextRTPSink { -public: - static T140TextRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); - -protected: - T140TextRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); - // called only by createNew() - - virtual ~T140TextRTPSink(); - -protected: // redefined virtual functions: - virtual Boolean continuePlaying(); - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - -protected: - T140IdleFilter* fOurIdleFilter; - Boolean fAreInIdlePeriod; -}; - - -////////// T140IdleFilter definition ////////// - -// Because the T.140 text RTP payload format specification recommends that (empty) RTP packets be sent during 'idle periods' -// when no new text is available, we implement "T140TextRTPSink" using a separate "T140IdleFilter" class - sitting in front -// - that delivers, to the "T140TextRTPSink", a continuous sequence of (possibly) empty frames. -// (Note: This class should be used only by "T140TextRTPSink", or a subclass.) - -class T140IdleFilter: public FramedFilter { -public: - T140IdleFilter(UsageEnvironment& env, FramedSource* inputSource); - virtual ~T140IdleFilter(); - -private: // redefined virtual functions: - virtual void doGetNextFrame(); - virtual void doStopGettingFrames(); - -private: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - - static void handleIdleTimeout(void* clientData); - void handleIdleTimeout(); - - void deliverFromBuffer(); - void deliverEmptyFrame(); - - static void onSourceClosure(void* clientData); - void onSourceClosure(); - -private: - TaskToken fIdleTimerTask; - unsigned fBufferSize, fNumBufferedBytes; - char* fBuffer; - unsigned fBufferedNumTruncatedBytes; // a count of truncated bytes from the upstream - struct timeval fBufferedDataPresentationTime; - unsigned fBufferedDataDurationInMicroseconds; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/TLSState.hh b/project/3rdparty/include/live555/liveMedia/TLSState.hh deleted file mode 100644 index 43cef3dc6..000000000 --- a/project/3rdparty/include/live555/liveMedia/TLSState.hh +++ /dev/null @@ -1,103 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// State encapsulating a TLS connection -// C++ header - -#ifndef _TLS_STATE_HH -#define _TLS_STATE_HH - -#include - -#ifndef _NET_COMMON_H -#include "../groupsock/NetCommon.h" -#endif -#ifndef _BOOLEAN_HH -#include "../UsageEnvironment/Boolean.hh" -#endif -#ifndef _USAGE_ENVIRONMENT_HH -#include "../UsageEnvironment/UsageEnvironment.hh" -#endif - -#if defined(CONFIG_LIVE555_OPENSSL) -#include -#endif - -class TLSState { -public: - Boolean isNeeded; - - int write(const char* data, unsigned count); - int read(u_int8_t* buffer, unsigned bufferSize); - - void nullify(); // clear the state so that the destructor will have no effect - -protected: // we're an abstract base class - TLSState(); - virtual ~TLSState(); - -#if defined(CONFIG_LIVE555_OPENSSL) - void initLibrary(); - void reset(); - -protected: - Boolean fHasBeenSetup; - SSL_CTX* fCtx; - SSL* fCon; -#endif -}; - -class ClientTLSState: public TLSState { -public: - ClientTLSState(class RTSPClient& client); - virtual ~ClientTLSState(); - - int connect(int socketNum); // returns: <0 (error), 0 (pending), >0 (success) - -#if defined(CONFIG_LIVE555_OPENSSL) -private: - Boolean setup(int socketNum); - -private: - class RTSPClient& fClient; -#endif -}; - -class ServerTLSState: public TLSState { -public: - ServerTLSState(UsageEnvironment& env); - virtual ~ServerTLSState(); - - void setCertificateAndPrivateKeyFileNames(char const* certFileName, char const* privKeyFileName); - void assignStateFrom(ServerTLSState const& from); - - int accept(int socketNum); // returns: <0 (error), 0 (pending), >0 (success) - - Boolean tlsAcceptIsNeeded; - -#if defined(CONFIG_LIVE555_OPENSSL) -private: - Boolean setup(int socketNum); - -private: - UsageEnvironment& fEnv; - char const* fCertificateFileName; - char const* fPrivateKeyFileName; -#endif -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/TextRTPSink.hh b/project/3rdparty/include/live555/liveMedia/TextRTPSink.hh deleted file mode 100644 index 697ef8bf9..000000000 --- a/project/3rdparty/include/live555/liveMedia/TextRTPSink.hh +++ /dev/null @@ -1,41 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A generic RTP sink for text codecs (abstract base class) -// C++ header - -#ifndef _TEXT_RTP_SINK_HH -#define _TEXT_RTP_SINK_HH - -#ifndef _MULTI_FRAMED_RTP_SINK_HH -#include "MultiFramedRTPSink.hh" -#endif - -class TextRTPSink: public MultiFramedRTPSink { -protected: - TextRTPSink(UsageEnvironment& env, - Groupsock* rtpgs, unsigned char rtpPayloadType, - unsigned rtpTimestampFrequency, - char const* rtpPayloadFormatName); - // (we're an abstract base class) - virtual ~TextRTPSink(); - -private: // redefined virtual functions: - virtual char const* sdpMediaType() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/TheoraVideoRTPSink.hh b/project/3rdparty/include/live555/liveMedia/TheoraVideoRTPSink.hh deleted file mode 100644 index 238a14059..000000000 --- a/project/3rdparty/include/live555/liveMedia/TheoraVideoRTPSink.hh +++ /dev/null @@ -1,72 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for Theora video -// C++ header - -#ifndef _THEORA_VIDEO_RTP_SINK_HH -#define _THEORA_VIDEO_RTP_SINK_HH - -#ifndef _VIDEO_RTP_SINK_HH -#include "VideoRTPSink.hh" -#endif - -class TheoraVideoRTPSink: public VideoRTPSink { -public: - static TheoraVideoRTPSink* - createNew(UsageEnvironment& env, Groupsock* RTPgs, u_int8_t rtpPayloadFormat, - // The following headers provide the 'configuration' information, for the SDP description: - u_int8_t* identificationHeader, unsigned identificationHeaderSize, - u_int8_t* commentHeader, unsigned commentHeaderSize, - u_int8_t* setupHeader, unsigned setupHeaderSize, - u_int32_t identField = 0xFACADE); - - static TheoraVideoRTPSink* - createNew(UsageEnvironment& env, Groupsock* RTPgs, u_int8_t rtpPayloadFormat, - char const* configStr); - // an optional variant of "createNew()" that takes a Base-64-encoded 'configuration' string, - // rather than the raw configuration headers as parameter. - -protected: - TheoraVideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, - u_int8_t rtpPayloadFormat, - u_int8_t* identificationHeader, unsigned identificationHeaderSize, - u_int8_t* commentHeader, unsigned commentHeaderSize, - u_int8_t* setupHeader, unsigned setupHeaderSize, - u_int32_t identField); - // called only by createNew() - - virtual ~TheoraVideoRTPSink(); - -private: // redefined virtual functions: - virtual char const* auxSDPLine(); // for the "a=fmtp:" SDP line - - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - virtual unsigned specialHeaderSize() const; - -private: - u_int32_t fIdent; // "Ident" field used by this stream. (Only the low 24 bits of this are used.) - char* fFmtpSDPLine; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/TheoraVideoRTPSource.hh b/project/3rdparty/include/live555/liveMedia/TheoraVideoRTPSource.hh deleted file mode 100644 index 9ecef6665..000000000 --- a/project/3rdparty/include/live555/liveMedia/TheoraVideoRTPSource.hh +++ /dev/null @@ -1,53 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Theora Video Audio RTP Sources -// C++ header - -#ifndef _THEORA_VIDEO_RTP_SOURCE_HH -#define _THEORA_VIDEO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class TheoraVideoRTPSource: public MultiFramedRTPSource { -public: - static TheoraVideoRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat); - - u_int32_t curPacketIdent() const { return fCurPacketIdent; } // The current "Ident" field; only the low-order 24 bits are used - -protected: - TheoraVideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat); - // called only by createNew() - - virtual ~TheoraVideoRTPSource(); - -protected: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; - -private: - u_int32_t fCurPacketIdent; // only the low-order 24 bits are used -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/VP8VideoRTPSink.hh b/project/3rdparty/include/live555/liveMedia/VP8VideoRTPSink.hh deleted file mode 100644 index d1b7ca0a6..000000000 --- a/project/3rdparty/include/live555/liveMedia/VP8VideoRTPSink.hh +++ /dev/null @@ -1,50 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for VP8 video -// C++ header - -#ifndef _VP8_VIDEO_RTP_SINK_HH -#define _VP8_VIDEO_RTP_SINK_HH - -#ifndef _VIDEO_RTP_SINK_HH -#include "VideoRTPSink.hh" -#endif - -class VP8VideoRTPSink: public VideoRTPSink { -public: - static VP8VideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); - -protected: - VP8VideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); - // called only by createNew() - - virtual ~VP8VideoRTPSink(); - -private: // redefined virtual functions: - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual - Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - virtual unsigned specialHeaderSize() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/VP8VideoRTPSource.hh b/project/3rdparty/include/live555/liveMedia/VP8VideoRTPSource.hh deleted file mode 100644 index d5a8f07ac..000000000 --- a/project/3rdparty/include/live555/liveMedia/VP8VideoRTPSource.hh +++ /dev/null @@ -1,50 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// VP8 Video RTP Sources -// C++ header - -#ifndef _VP8_VIDEO_RTP_SOURCE_HH -#define _VP8_VIDEO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class VP8VideoRTPSource: public MultiFramedRTPSource { -public: - static VP8VideoRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency = 90000); - -protected: - VP8VideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - // called only by createNew() - - virtual ~VP8VideoRTPSource(); - -protected: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/VP9VideoRTPSink.hh b/project/3rdparty/include/live555/liveMedia/VP9VideoRTPSink.hh deleted file mode 100644 index 2124101a7..000000000 --- a/project/3rdparty/include/live555/liveMedia/VP9VideoRTPSink.hh +++ /dev/null @@ -1,50 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for VP9 video -// C++ header - -#ifndef _VP9_VIDEO_RTP_SINK_HH -#define _VP9_VIDEO_RTP_SINK_HH - -#ifndef _VIDEO_RTP_SINK_HH -#include "VideoRTPSink.hh" -#endif - -class VP9VideoRTPSink: public VideoRTPSink { -public: - static VP9VideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); - -protected: - VP9VideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); - // called only by createNew() - - virtual ~VP9VideoRTPSink(); - -private: // redefined virtual functions: - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual - Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - virtual unsigned specialHeaderSize() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/VP9VideoRTPSource.hh b/project/3rdparty/include/live555/liveMedia/VP9VideoRTPSource.hh deleted file mode 100644 index c6f0b5048..000000000 --- a/project/3rdparty/include/live555/liveMedia/VP9VideoRTPSource.hh +++ /dev/null @@ -1,50 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// VP9 Video RTP Sources -// C++ header - -#ifndef _VP9_VIDEO_RTP_SOURCE_HH -#define _VP9_VIDEO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class VP9VideoRTPSource: public MultiFramedRTPSource { -public: - static VP9VideoRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency = 90000); - -protected: - VP9VideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - // called only by createNew() - - virtual ~VP9VideoRTPSource(); - -protected: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/VideoRTPSink.hh b/project/3rdparty/include/live555/liveMedia/VideoRTPSink.hh deleted file mode 100644 index c4d180e85..000000000 --- a/project/3rdparty/include/live555/liveMedia/VideoRTPSink.hh +++ /dev/null @@ -1,41 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A generic RTP sink for video codecs (abstract base class) -// C++ header - -#ifndef _VIDEO_RTP_SINK_HH -#define _VIDEO_RTP_SINK_HH - -#ifndef _MULTI_FRAMED_RTP_SINK_HH -#include "MultiFramedRTPSink.hh" -#endif - -class VideoRTPSink: public MultiFramedRTPSink { -protected: - VideoRTPSink(UsageEnvironment& env, - Groupsock* rtpgs, unsigned char rtpPayloadType, - unsigned rtpTimestampFrequency, - char const* rtpPayloadFormatName); - // (we're an abstract base class) - virtual ~VideoRTPSink(); - -private: // redefined virtual functions: - virtual char const* sdpMediaType() const; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/VorbisAudioRTPSink.hh b/project/3rdparty/include/live555/liveMedia/VorbisAudioRTPSink.hh deleted file mode 100644 index 1abf33f84..000000000 --- a/project/3rdparty/include/live555/liveMedia/VorbisAudioRTPSink.hh +++ /dev/null @@ -1,85 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// RTP sink for Vorbis audio -// C++ header - -#ifndef _VORBIS_AUDIO_RTP_SINK_HH -#define _VORBIS_AUDIO_RTP_SINK_HH - -#ifndef _AUDIO_RTP_SINK_HH -#include "AudioRTPSink.hh" -#endif - -class VorbisAudioRTPSink: public AudioRTPSink { -public: - static VorbisAudioRTPSink* - createNew(UsageEnvironment& env, Groupsock* RTPgs, u_int8_t rtpPayloadFormat, - u_int32_t rtpTimestampFrequency, unsigned numChannels, - // The following headers provide the 'configuration' information, for the SDP description: - u_int8_t* identificationHeader, unsigned identificationHeaderSize, - u_int8_t* commentHeader, unsigned commentHeaderSize, - u_int8_t* setupHeader, unsigned setupHeaderSize, - u_int32_t identField = 0xFACADE); - - static VorbisAudioRTPSink* - createNew(UsageEnvironment& env, Groupsock* RTPgs, u_int8_t rtpPayloadFormat, - u_int32_t rtpTimestampFrequency, unsigned numChannels, - char const* configStr); - // an optional variant of "createNew()" that takes a Base-64-encoded 'configuration' string, - // rather than the raw configuration headers as parameter. - -protected: - VorbisAudioRTPSink(UsageEnvironment& env, Groupsock* RTPgs, - u_int8_t rtpPayloadFormat, u_int32_t rtpTimestampFrequency, unsigned numChannels, - u_int8_t* identificationHeader, unsigned identificationHeaderSize, - u_int8_t* commentHeader, unsigned commentHeaderSize, - u_int8_t* setupHeader, unsigned setupHeaderSize, - u_int32_t identField); - // called only by createNew() - - virtual ~VorbisAudioRTPSink(); - -private: // redefined virtual functions: - virtual char const* auxSDPLine(); // for the "a=fmtp:" SDP line - - virtual void doSpecialFrameHandling(unsigned fragmentationOffset, - unsigned char* frameStart, - unsigned numBytesInFrame, - struct timeval framePresentationTime, - unsigned numRemainingBytes); - virtual Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, - unsigned numBytesInFrame) const; - virtual unsigned specialHeaderSize() const; - virtual unsigned frameSpecificHeaderSize() const; - -private: - u_int32_t fIdent; // "Ident" field used by this stream. (Only the low 24 bits of this are used.) - char* fFmtpSDPLine; -}; - - -// A general function used by both "VorbisAudioRTPSink" and "TheoraVideoRTPSink" to construct -// a Base64-encoded 'config' string (for SDP) from "identification", "comment", "setup" headers. -// (Note: The result string was heap-allocated, and the caller should delete[] it afterwards.) - -char* generateVorbisOrTheoraConfigStr(u_int8_t* identificationHeader, unsigned identificationHeaderSize, - u_int8_t* commentHeader, unsigned commentHeaderSize, - u_int8_t* setupHeader, unsigned setupHeaderSize, - u_int32_t identField); - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/VorbisAudioRTPSource.hh b/project/3rdparty/include/live555/liveMedia/VorbisAudioRTPSource.hh deleted file mode 100644 index 8eec0ec71..000000000 --- a/project/3rdparty/include/live555/liveMedia/VorbisAudioRTPSource.hh +++ /dev/null @@ -1,66 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Vorbis Audio RTP Sources -// C++ header - -#ifndef _VORBIS_AUDIO_RTP_SOURCE_HH -#define _VORBIS_AUDIO_RTP_SOURCE_HH - -#ifndef _MULTI_FRAMED_RTP_SOURCE_HH -#include "MultiFramedRTPSource.hh" -#endif - -class VorbisAudioRTPSource: public MultiFramedRTPSource { -public: - static VorbisAudioRTPSource* - createNew(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - - u_int32_t curPacketIdent() const { return fCurPacketIdent; } // The current "Ident" field; only the low-order 24 bits are used - -protected: - VorbisAudioRTPSource(UsageEnvironment& env, Groupsock* RTPgs, - unsigned char rtpPayloadFormat, - unsigned rtpTimestampFrequency); - // called only by createNew() - - virtual ~VorbisAudioRTPSource(); - -protected: - // redefined virtual functions: - virtual Boolean processSpecialHeader(BufferedPacket* packet, - unsigned& resultSpecialHeaderSize); - virtual char const* MIMEtype() const; - -private: - u_int32_t fCurPacketIdent; // only the low-order 24 bits are used -}; - -void parseVorbisOrTheoraConfigStr(char const* configStr, - u_int8_t*& identificationHdr, unsigned& identificationHdrSize, - u_int8_t*& commentHdr, unsigned& commentHdrSize, - u_int8_t*& setupHdr, unsigned& setupHdrSize, - u_int32_t& identField); - // Returns (in each of the result parameters) unpacked Vorbis or Theora - // "identification", "comment", and "setup" headers that were specified in a - // "config" string (in the SDP description for a Vorbis/RTP or Theora/RTP stream). - // Each of the "*Hdr" result arrays are dynamically allocated by this routine, - // and must be delete[]d by the caller. - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/WAVAudioFileServerMediaSubsession.hh b/project/3rdparty/include/live555/liveMedia/WAVAudioFileServerMediaSubsession.hh deleted file mode 100644 index 66a59fa69..000000000 --- a/project/3rdparty/include/live555/liveMedia/WAVAudioFileServerMediaSubsession.hh +++ /dev/null @@ -1,68 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s -// on demand, from an WAV audio file. -// C++ header - -#ifndef _WAV_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH -#define _WAV_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH - -#ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH -#include "FileServerMediaSubsession.hh" -#endif - -class WAVAudioFileServerMediaSubsession: public FileServerMediaSubsession{ -public: - static WAVAudioFileServerMediaSubsession* - createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource, - Boolean convertToULaw = False); - // If "convertToULaw" is True, 16-bit audio streams are converted to - // 8-bit u-law audio prior to streaming. - -protected: - WAVAudioFileServerMediaSubsession(UsageEnvironment& env, char const* fileName, - Boolean reuseFirstSource, Boolean convertToULaw); - // called only by createNew(); - virtual ~WAVAudioFileServerMediaSubsession(); - -protected: // redefined virtual functions - virtual void seekStreamSource(FramedSource* inputSource, double& seekNPT, double streamDuration, u_int64_t& numBytes); - virtual void setStreamSourceScale(FramedSource* inputSource, float scale); - virtual void setStreamSourceDuration(FramedSource* inputSource, double streamDuration, u_int64_t& numBytes); - - virtual FramedSource* createNewStreamSource(unsigned clientSessionId, - unsigned& estBitrate); - virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, - unsigned char rtpPayloadTypeIfDynamic, - FramedSource* inputSource); - virtual void testScaleFactor(float& scale); - virtual float duration() const; - -protected: - Boolean fConvertToULaw; - - // The following parameters of the input stream are set after - // "createNewStreamSource" is called: - unsigned char fAudioFormat; - unsigned char fBitsPerSample; - unsigned fSamplingFrequency; - unsigned fNumChannels; - float fFileDuration; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/WAVAudioFileSource.hh b/project/3rdparty/include/live555/liveMedia/WAVAudioFileSource.hh deleted file mode 100644 index 7972a6663..000000000 --- a/project/3rdparty/include/live555/liveMedia/WAVAudioFileSource.hh +++ /dev/null @@ -1,86 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// A WAV audio file source -// NOTE: Samples are returned in little-endian order (the same order in which -// they were stored in the file). -// C++ header - -#ifndef _WAV_AUDIO_FILE_SOURCE_HH -#define _WAV_AUDIO_FILE_SOURCE_HH - -#ifndef _AUDIO_INPUT_DEVICE_HH -#include "AudioInputDevice.hh" -#endif - -typedef enum { - WA_PCM = 0x01, - WA_PCMA = 0x06, - WA_PCMU = 0x07, - WA_IMA_ADPCM = 0x11, - WA_UNKNOWN -} WAV_AUDIO_FORMAT; - - -class WAVAudioFileSource: public AudioInputDevice { -public: - - static WAVAudioFileSource* createNew(UsageEnvironment& env, - char const* fileName); - - unsigned numPCMBytes() const; - void setScaleFactor(int scale); - void seekToPCMByte(unsigned byteNumber); - void limitNumBytesToStream(unsigned numBytesToStream); - // if "numBytesToStream" is >0, then we limit the stream to that number of bytes, before treating it as EOF - - unsigned char getAudioFormat(); - -protected: - WAVAudioFileSource(UsageEnvironment& env, FILE* fid); - // called only by createNew() - - virtual ~WAVAudioFileSource(); - - static void fileReadableHandler(WAVAudioFileSource* source, int mask); - void doReadFromFile(); - -private: - // redefined virtual functions: - virtual void doGetNextFrame(); - virtual void doStopGettingFrames(); - virtual Boolean setInputPort(int portIndex); - virtual double getAverageLevel() const; - -protected: - unsigned fPreferredFrameSize; - -private: - FILE* fFid; - double fPlayTimePerSample; // useconds - Boolean fFidIsSeekable; - unsigned fLastPlayTime; // useconds - Boolean fHaveStartedReading; - unsigned fWAVHeaderSize; - unsigned fFileSize; - int fScaleFactor; - Boolean fLimitNumBytesToStream; - unsigned fNumBytesToStream; // used iff "fLimitNumBytesToStream" is True - unsigned char fAudioFormat; -}; - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/liveMedia.hh b/project/3rdparty/include/live555/liveMedia/liveMedia.hh deleted file mode 100644 index 325119e46..000000000 --- a/project/3rdparty/include/live555/liveMedia/liveMedia.hh +++ /dev/null @@ -1,137 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Inclusion of header files representing the interface -// for the entire library -// -// Programs that use the library can include this header file, -// instead of each of the individual media header files - -#ifndef _LIVEMEDIA_HH -#define _LIVEMEDIA_HH -#include "JPEG2000VideoRTPSource.hh" -#include "JPEG2000VideoRTPSink.hh" -//#include "JPEG2000VideoStreamFramer.hh" -//#include "JPEG2000VideoFileServerMediaSubsession.hh" -#include "MPEG1or2AudioRTPSink.hh" -#include "MP3ADURTPSink.hh" -#include "MPEG1or2VideoRTPSink.hh" -#include "MPEG4ESVideoRTPSink.hh" -#include "AMRAudioFileSink.hh" -#include "H264VideoFileSink.hh" -#include "H265VideoFileSink.hh" -#include "OggFileSink.hh" -#include "BasicUDPSink.hh" -#include "GSMAudioRTPSink.hh" -#include "H263plusVideoRTPSink.hh" -#include "H264VideoRTPSink.hh" -#include "H265VideoRTPSink.hh" -#include "DVVideoRTPSource.hh" -#include "DVVideoRTPSink.hh" -#include "DVVideoStreamFramer.hh" -#include "H264VideoStreamFramer.hh" -#include "H265VideoStreamFramer.hh" -#include "H264VideoStreamDiscreteFramer.hh" -#include "H265VideoStreamDiscreteFramer.hh" -#include "JPEGVideoRTPSink.hh" -#include "SimpleRTPSink.hh" -#include "uLawAudioFilter.hh" -#include "MPEG2IndexFromTransportStream.hh" -#include "MPEG2TransportStreamTrickModeFilter.hh" -#include "ByteStreamMultiFileSource.hh" -#include "ByteStreamMemoryBufferSource.hh" -#include "BasicUDPSource.hh" -#include "SimpleRTPSource.hh" -#include "MPEG1or2AudioRTPSource.hh" -#include "MPEG4LATMAudioRTPSource.hh" -#include "MPEG4LATMAudioRTPSink.hh" -#include "MPEG4ESVideoRTPSource.hh" -#include "MPEG4GenericRTPSource.hh" -#include "MP3ADURTPSource.hh" -#include "QCELPAudioRTPSource.hh" -#include "AMRAudioRTPSource.hh" -#include "JPEGVideoRTPSource.hh" -#include "JPEGVideoSource.hh" -#include "MPEG1or2VideoRTPSource.hh" -#include "VorbisAudioRTPSource.hh" -#include "TheoraVideoRTPSource.hh" -#include "VP8VideoRTPSource.hh" -#include "VP9VideoRTPSource.hh" -#include "RawVideoRTPSource.hh" -#include "MPEG2TransportStreamFromPESSource.hh" -#include "MPEG2TransportStreamFromESSource.hh" -#include "MPEG2TransportStreamFramer.hh" -#include "ADTSAudioFileSource.hh" -#include "ADTSAudioStreamDiscreteFramer.hh" -#include "H261VideoRTPSource.hh" -#include "H263plusVideoRTPSource.hh" -#include "H264VideoRTPSource.hh" -#include "H265VideoRTPSource.hh" -#include "MP3FileSource.hh" -#include "MP3ADU.hh" -#include "MP3ADUinterleaving.hh" -#include "MP3Transcoder.hh" -#include "MPEG1or2DemuxedElementaryStream.hh" -#include "MPEG1or2AudioStreamFramer.hh" -#include "H263plusVideoStreamFramer.hh" -#include "AC3AudioStreamFramer.hh" -#include "AC3AudioRTPSource.hh" -#include "AC3AudioRTPSink.hh" -#include "VorbisAudioRTPSink.hh" -#include "TheoraVideoRTPSink.hh" -#include "VP8VideoRTPSink.hh" -#include "VP9VideoRTPSink.hh" -#include "MPEG4GenericRTPSink.hh" -#include "RawVideoRTPSink.hh" -#include "MPEG1or2VideoStreamDiscreteFramer.hh" -#include "MPEG4VideoStreamDiscreteFramer.hh" -#include "DeviceSource.hh" -#include "AudioInputDevice.hh" -#include "WAVAudioFileSource.hh" -#include "StreamReplicator.hh" -#include "RTSPRegisterSender.hh" -#include "RTSPClient.hh" -#include "SIPClient.hh" -#include "QuickTimeFileSink.hh" -#include "QuickTimeGenericRTPSource.hh" -#include "AVIFileSink.hh" -#include "PassiveServerMediaSubsession.hh" -#include "MPEG4VideoFileServerMediaSubsession.hh" -#include "H264VideoFileServerMediaSubsession.hh" -#include "H265VideoFileServerMediaSubsession.hh" -#include "WAVAudioFileServerMediaSubsession.hh" -#include "AMRAudioFileServerMediaSubsession.hh" -#include "AMRAudioFileSource.hh" -#include "AMRAudioRTPSink.hh" -#include "T140TextRTPSink.hh" -#include "MP3AudioFileServerMediaSubsession.hh" -#include "MPEG1or2VideoFileServerMediaSubsession.hh" -#include "MPEG1or2FileServerDemux.hh" -#include "MPEG2TransportFileServerMediaSubsession.hh" -#include "H263plusVideoFileServerMediaSubsession.hh" -#include "ADTSAudioFileServerMediaSubsession.hh" -#include "DVVideoFileServerMediaSubsession.hh" -#include "AC3AudioFileServerMediaSubsession.hh" -#include "MPEG2TransportUDPServerMediaSubsession.hh" -#include "MatroskaFileServerDemux.hh" -#include "OggFileServerDemux.hh" -#include "MPEG2TransportStreamDemux.hh" -#include "ProxyServerMediaSession.hh" -#include "HLSSegmenter.hh" -#include "MPEG2TransportStreamAccumulator.hh" - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/liveMedia_version.hh b/project/3rdparty/include/live555/liveMedia/liveMedia_version.hh deleted file mode 100644 index 064db4ac6..000000000 --- a/project/3rdparty/include/live555/liveMedia/liveMedia_version.hh +++ /dev/null @@ -1,25 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// Version information for the "liveMedia" library -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. - -#ifndef _LIVEMEDIA_VERSION_HH -#define _LIVEMEDIA_VERSION_HH - -#define LIVEMEDIA_LIBRARY_VERSION_STRING "2023.01.19" -#define LIVEMEDIA_LIBRARY_VERSION_INT 1674086400 - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/ourMD5.hh b/project/3rdparty/include/live555/liveMedia/ourMD5.hh deleted file mode 100644 index e92d13ce6..000000000 --- a/project/3rdparty/include/live555/liveMedia/ourMD5.hh +++ /dev/null @@ -1,38 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Because MD5 may not be implemented (at least, with the same interface) on all systems, -// we have our own implementation. -// C++ header - -#ifndef _OUR_MD5_HH -#define _OUR_MD5_HH - -extern char* our_MD5Data(unsigned char const* data, unsigned dataSize, char* outputDigest); - // "outputDigest" must be either NULL (in which case this function returns a heap-allocated - // buffer, which should be later delete[]d by the caller), or else it must point to - // a (>=)33-byte buffer (which this function will also return). - -extern unsigned char* our_MD5DataRaw(unsigned char const* data, unsigned dataSize, - unsigned char* outputDigest); - // Like "ourMD5Data()", except that it returns the digest in 'raw' binary form, rather than - // as an ASCII hex string. - // "outputDigest" must be either NULL (in which case this function returns a heap-allocated - // buffer, which should be later delete[]d by the caller), or else it must point to - // a (>=)16-byte buffer (which this function will also return). - -#endif diff --git a/project/3rdparty/include/live555/liveMedia/uLawAudioFilter.hh b/project/3rdparty/include/live555/liveMedia/uLawAudioFilter.hh deleted file mode 100644 index 881bd8a8c..000000000 --- a/project/3rdparty/include/live555/liveMedia/uLawAudioFilter.hh +++ /dev/null @@ -1,208 +0,0 @@ -/********** -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. (See .) - -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -**********/ -// "liveMedia" -// Copyright (c) 1996-2023 Live Networks, Inc. All rights reserved. -// Filters for converting between raw PCM audio and uLaw -// C++ header - -#ifndef _ULAW_AUDIO_FILTER_HH -#define _ULAW_AUDIO_FILTER_HH - -#ifndef _FRAMED_FILTER_HH -#include "FramedFilter.hh" -#endif - -////////// 16-bit PCM (in various byte orderings) -> 8-bit u-Law ////////// - -class uLawFromPCMAudioSource: public FramedFilter { -public: - static uLawFromPCMAudioSource* - createNew(UsageEnvironment& env, FramedSource* inputSource, - int byteOrdering = 0); - // "byteOrdering" == 0 => host order (the default) - // "byteOrdering" == 1 => little-endian order - // "byteOrdering" == 2 => network (i.e., big-endian) order - -protected: - uLawFromPCMAudioSource(UsageEnvironment& env, FramedSource* inputSource, - int byteOrdering); - // called only by createNew() - virtual ~uLawFromPCMAudioSource(); - -private: - // Redefined virtual functions: - virtual void doGetNextFrame(); - -private: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - -private: - int fByteOrdering; - unsigned char* fInputBuffer; - unsigned fInputBufferSize; -}; - - -////////// u-Law -> 16-bit PCM (in host order) ////////// - -class PCMFromuLawAudioSource: public FramedFilter { -public: - static PCMFromuLawAudioSource* - createNew(UsageEnvironment& env, FramedSource* inputSource); - -protected: - PCMFromuLawAudioSource(UsageEnvironment& env, - FramedSource* inputSource); - // called only by createNew() - virtual ~PCMFromuLawAudioSource(); - -private: - // Redefined virtual functions: - virtual void doGetNextFrame(); - -private: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - -private: - unsigned char* fInputBuffer; - unsigned fInputBufferSize; -}; - - -////////// 16-bit values (in host order) -> 16-bit network order ////////// - -class NetworkFromHostOrder16: public FramedFilter { -public: - static NetworkFromHostOrder16* - createNew(UsageEnvironment& env, FramedSource* inputSource); - -protected: - NetworkFromHostOrder16(UsageEnvironment& env, FramedSource* inputSource); - // called only by createNew() - virtual ~NetworkFromHostOrder16(); - -private: - // Redefined virtual functions: - virtual void doGetNextFrame(); - -private: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); -}; - - -////////// 16-bit values (in network order) -> 16-bit host order ////////// - -class HostFromNetworkOrder16: public FramedFilter { -public: - static HostFromNetworkOrder16* - createNew(UsageEnvironment& env, FramedSource* inputSource); - -protected: - HostFromNetworkOrder16(UsageEnvironment& env, FramedSource* inputSource); - // called only by createNew() - virtual ~HostFromNetworkOrder16(); - -private: - // Redefined virtual functions: - virtual void doGetNextFrame(); - -private: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); -}; - - -////////// 16-bit values: little-endian <-> big-endian ////////// - -class EndianSwap16: public FramedFilter { -public: - static EndianSwap16* createNew(UsageEnvironment& env, FramedSource* inputSource); - -protected: - EndianSwap16(UsageEnvironment& env, FramedSource* inputSource); - // called only by createNew() - virtual ~EndianSwap16(); - -private: - // Redefined virtual functions: - virtual void doGetNextFrame(); - -private: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); -}; - - -////////// 24-bit values: little-endian <-> big-endian ////////// - -class EndianSwap24: public FramedFilter { -public: - static EndianSwap24* createNew(UsageEnvironment& env, FramedSource* inputSource); - -protected: - EndianSwap24(UsageEnvironment& env, FramedSource* inputSource); - // called only by createNew() - virtual ~EndianSwap24(); - -private: - // Redefined virtual functions: - virtual void doGetNextFrame(); - -private: - static void afterGettingFrame(void* clientData, unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); - void afterGettingFrame1(unsigned frameSize, - unsigned numTruncatedBytes, - struct timeval presentationTime, - unsigned durationInMicroseconds); -}; - -#endif diff --git a/project/3rdparty/include/live555/readme.txt b/project/3rdparty/include/live555/readme.txt deleted file mode 100644 index 6baf5721e..000000000 --- a/project/3rdparty/include/live555/readme.txt +++ /dev/null @@ -1,12 +0,0 @@ -UsageEnvironment: - "UsageEnvironment"和"TaskScheduler"类用于调度延迟事件、为异步读取事件分配处理程序以及输出错误/警告消息。此外,"HashTable"类定义了通用哈希表的接口,供其余代码使用。 - 这些都是抽象基类;它们必须被子类化以便在实现中使用。这些子类可以利用程序将在其中运行的环境的特定属性 —— 例如,它的GUI和/或脚本环境 - -groupsock" - 这个库中的类封装了网络接口和套接字。特别是,"Groupsock"类封装了一个用于发送(和/或接收)多播数据报的套接字 - -liveMedia: - 这个库为各种流媒体类型和编解码器定义了一个类层次结构——植根于"Medium"类 - -BasicUsageEnvironment: - 该库定义了"UsageEnvironment"类的一个具体实现(即子类),用于简单的控制台应用程序。使用select()循环处理读取事件和延迟操作 diff --git a/project/3rdparty/include/media/drm_media_api.h b/project/3rdparty/include/media/drm_media_api.h deleted file mode 100644 index a3fc079e2..000000000 --- a/project/3rdparty/include/media/drm_media_api.h +++ /dev/null @@ -1,158 +0,0 @@ -#ifndef LIBDRM_MEDIA_API_H -#define LIBDRM_MEDIA_API_H - -#include "drm_media_vi.h" -#include "drm_media_vo.h" -#include "drm_media_vp.h" -#include "drm_media_rga.h" -#include "drm_media_vdec.h" -#include "drm_media_venc.h" -#include "drm_media_vmix.h" -#include "drm_media_common.h" -#include "drm_media_buffer.h" - -#ifdef __cplusplus -extern "C" { -#endif - -int drm_mpi_system_init(void); - -int drm_mpi_system_bind(const drm_chn_t *pstSrcChn, const drm_chn_t *pstDstChn); -int drm_mpi_system_unbind(const drm_chn_t *pstSrcChn, const drm_chn_t *pstDstChn); - -int drm_mpi_system_send_media_buffer(mod_id_e enModID, int s32ChnId, media_buffer_t buffer); -int drm_mpi_system_device_send_media_buffer(mod_id_e enModID, int s32DevId, int s32ChnId, media_buffer_t buffer); - -int drm_mpi_system_stop_get_media_buffer(mod_id_e enModID, int s32ChnId); -int drm_mpi_system_start_get_media_buffer(mod_id_e enModID, int s32ChnId); -media_buffer_t drm_mpi_system_get_media_buffer(mod_id_e enModID, int s32ChnId, int s32MilliSec); - -int drm_mpi_system_set_framerate(mod_id_e enModID, int s32ChnId, drm_fps_attr_t *pstFpsAttr); -int drm_mpi_system_start_recv_frame(mod_id_e enModID, int s32ChnId, const drm_recv_pic_param_t *pstRecvParam); - -int drm_mpi_system_set_media_buffer_depth(mod_id_e enModID, int s32ChnId, int depth); - -int drm_mpi_system_register_output_callback(const drm_chn_t *pstChn, OutCallbackFunction callback); -int drm_mpi_system_register_output_callbackEx(const drm_chn_t *pstChn, OutCallbackFunctionEx callback, void *handle); - -int drm_mpi_system_register_event_callback(const drm_chn_t *pstChn, void *handle, EventCallbackFunction callback); - -int drm_mpi_vp_enable_channel(int channel); -int drm_mpi_vp_disable_channel(int channel); -int drm_mpi_vp_set_channel_attribute(int channel, const drm_vp_chn_attr_t *pstChnAttr); - -int drm_mpi_vi_get_status(int channel); -int drm_mpi_vi_start_stream(int channel); - -int drm_mpi_vi_enable_channel(int channel); -int drm_mpi_vi_disable_channel(int channel); - -int drm_mpi_vi_get_channel_attribute(int channel, drm_vi_chn_attr_t *pstChnAttr); -int drm_mpi_vi_set_channel_attribute(int channel, const drm_vi_chn_attr_t *pstChnAttr); - -int drm_mpi_vi_enable_user_picture(int channel); -int drm_mpi_vi_disable_user_picture(int channel); -int drm_mpi_vi_set_user_picture(int channel, drm_vi_userpic_attr_t *pstUsrPicAttr); - -int drm_mpi_vi_stop_region_luma(int channel); -int drm_mpi_vi_start_region_luma(int channel); -int drm_mpi_vi_get_channel_region_luma(int channel, const drm_video_region_info_t *pstRegionInfo, uint64_t *pu64LumaData, int s32MilliSec); - -int drm_mpi_vi_region_set_cover(int channel, const drm_osd_region_info_t *pstRgnInfo, const drm_cover_info_t *pstCoverInfo); -int drm_mpi_vi_region_set_bitmap(int channel, const drm_osd_region_info_t *pstRgnInfo, const drm_bitmap_t *pstBitmap); - -int drm_mpi_vo_destroy_channel(int channel); -int drm_mpi_vo_create_channel(int channel, const drm_vo_chn_attr_t *pstAttr); - -int drm_mpi_vo_get_channel_attribute(int channel, drm_vo_chn_attr_t *pstAttr); -int drm_mpi_vo_set_channel_attribute(int channel, const drm_vo_chn_attr_t *pstAttr); - -int drm_destroy_video_output(int channel); -int drm_create_video_output(int channel, int zpos, drm_plane_type_e layer, size_t dispWidth, size_t dispHeight, size_t dispXoffset, size_t dispYoffset, drm_image_type_e imageType, const char *card); - -int drm_send_frame_video_output(int channel, media_buffer_t frame); - -int drm_mpi_rga_destroy_channel(int channel); -int drm_mpi_rga_create_channel(int channel, drm_rga_attr_t *pstAttr); - -int drm_mpi_rga_get_channel_attribute(int channel, drm_rga_attr_t *pstAttr); -int drm_mpi_rga_set_channel_attribute(int channel, const drm_rga_attr_t *pstAttr); - -int drm_mpi_rga_get_channel_region_luma(int channel, const drm_video_region_info_t *pstRegionInfo, uint64_t *pu64LumaData, int s32MilliSec); - -int drm_mpi_rga_region_set_cover(int channel, const drm_osd_region_info_t *pstRgnInfo, const drm_cover_info_t *pstCoverInfo); -int drm_mpi_rga_region_set_bitmap(int channel, const drm_osd_region_info_t *pstRgnInfo, const drm_bitmap_t *pstBitmap); - -int drm_mpi_vmix_destroy_device(int device); -int drm_mpi_vmix_create_device(int device, drm_vmix_dev_info_t *pstDevInfo); - -int drm_mpi_vmix_hide_channel(int device, int channel); -int drm_mpi_vmix_show_channel(int device, int channel); - -int drm_mpi_vmix_enable_channel(int device, int channel); -int drm_mpi_vmix_disable_channel(int device, int channel); - -int drm_mpi_vmix_set_layout_line(int device, int channel, drm_vmix_line_info_t *pstVmixLine); - -int drm_mpi_vmix_get_device_region_luma(int device, const drm_video_region_info_t *pstRegionInfo, uint64_t *pu64LumaData, int s32MilliSec); -int drm_mpi_vmix_get_channel_region_luma(int device, int channel, const drm_video_region_info_t *pstRegionInfo, uint64_t *pu64LumaData, int s32MilliSec); - -int drm_mpi_vmix_region_set_cover(int device, int channel, const drm_osd_region_info_t *pstRgnInfo, const drm_cover_info_t *pstCoverInfo); -int drm_mpi_vmix_region_set_bitmap(int device, int channel, const drm_osd_region_info_t *pstRgnInfo, const drm_bitmap_t *pstBitmap); - -int drm_mpi_vdec_destroy_channel(int channel); -int drm_mpi_vdec_create_channel(int channel, const drm_vdec_chn_attr_t *pstAttr); - -int drm_mpi_venc_destroy_channel(int channel); -int drm_mpi_venc_create_channel(int channel, drm_venc_chn_attr_t *stVencChnAttr); - -int drm_mpi_venc_create_jpeg_light_channel(int channel, drm_venc_chn_attr_t *stVencChnAttr); - -int drm_mpi_venc_set_gop(int channel, uint32_t u32Gop); -int drm_mpi_venc_set_gop_mode(int channel, drm_venc_gop_attr_t *pstGopModeAttr); -int drm_mpi_venc_set_fps(int channel, uint8_t u8OutNum, uint8_t u8OutDen, uint8_t u8InNum, uint8_t u8InDen); -int drm_mpi_venc_set_bitrate(int channel, uint32_t u32BitRate, uint32_t u32MinBitRate, uint32_t u32MaxBitRate); -int drm_mpi_venc_set_avc_profile(int channel, uint32_t u32Profile, uint32_t u32Level); -int drm_mpi_venc_set_resolution(int channel, drm_venc_resolution_param_t stResolutionParam); -int drm_mpi_venc_set_rotation(int channel, drm_venc_rotation_e rotation_rate); -int drm_mpi_venc_set_rc_mode(int channel, drm_venc_rc_mode_e RcMode); -int drm_mpi_venc_set_rc_quality(int channel, drm_venc_rc_quality_e RcQuality); - -int drm_mpi_venc_request_idr(int channel, bool bInstant); - -int drm_mpi_venc_get_channel_attribute(int channel, drm_venc_chn_attr_t *stVencChnAttr); -int drm_mpi_venc_set_channel_attribute(int channel, drm_venc_chn_attr_t *stVencChnAttr); - -int drm_mpi_venc_get_channel_parameter(int channel, drm_venc_chn_param_t *stVencChnParam); -int drm_mpi_venc_set_channel_parameter(int channel, drm_venc_chn_param_t *stVencChnParam); - -int drm_mpi_venc_get_rc_parameter(int channel, drm_venc_rc_param_t *pstRcParam); -int drm_mpi_venc_set_rc_parameter(int channel, drm_venc_rc_param_t *pstRcParam); - -int drm_mpi_venc_set_jpeg_parameter(int channel, drm_venc_jpeg_param_t *pstJpegParam); - -int drm_mpi_venc_insert_userdata(int channel, uint8_t *pu8Data, uint32_t u32Len); - -int drm_mpi_venc_get_roi_attribute(int channel, drm_venc_roi_attr_t *pstRoiAttr, int roi_index07); -int drm_mpi_venc_set_roi_attribute(int channel, const drm_venc_roi_attr_t *pstRoiAttr, int region_cnt); - -int drm_mpi_venc_get_fd(int channel); -int drm_mpi_venc_query_status(int channel, drm_venc_chn_status_t *pstStatus); - -int drm_mpi_venc_get_super_frame_strategy(int channel, drm_venc_superframe_cfg_t *pstSuperFrmParam); -int drm_mpi_venc_set_super_frame_strategy(int channel, const drm_venc_superframe_cfg_t *pstSuperFrmParam); - -int drm_mpi_venc_start_recv_frame(int channel, const drm_recv_pic_param_t *pstRecvParam); - -int drm_mpi_venc_region_init(int channel, drm_venc_color_tbl_t *stColorTbl); - -int drm_mpi_venc_region_set_bitmap(int channel, const drm_osd_region_info_t *pstRgnInfo, const drm_bitmap_t *pstBitmap); -int drm_mpi_venc_region_set_cover(int channel, const drm_osd_region_info_t *pstRgnInfo, const drm_cover_info_t *pstCoverInfo); -int drm_mpi_venc_region_set_coverEx(int channel, const drm_osd_region_info_t *pstRgnInfo, const drm_cover_info_t *pstCoverInfo); -int drm_mpi_venc_region_set_palette_id(int channel, const drm_osd_region_info_t *pstRgnInfo, const drm_osd_color_palette_buf_t *pstColPalBuf); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/project/3rdparty/include/media/drm_media_buffer.h b/project/3rdparty/include/media/drm_media_buffer.h deleted file mode 100644 index b9151f1df..000000000 --- a/project/3rdparty/include/media/drm_media_buffer.h +++ /dev/null @@ -1,110 +0,0 @@ -#ifndef LIBDRM_MEDIA_BUFFER_H -#define LIBDRM_MEDIA_BUFFER_H - -#include "drm_media_common.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define MB_FLAG_NOCACHED 0x01 -#define MB_FLAG_PHY_ADDR_CONSECUTIVE 0x02 - -#define MB_TYPE_IMAGE_MASK 0x0100 -#define MB_TYPE_VIDEO_MASK 0x0200 -#define MB_TYPE_AUDIO_MASK 0x0400 - -typedef void *media_buffer_t; -typedef void *media_buffer_pool_t; - -typedef void (*OutCallbackFunction)(media_buffer_t mb); -typedef void (*EventCallbackFunction)(void *pHandle, void *event); -typedef void (*OutCallbackFunctionEx)(media_buffer_t mb, void *pHandle); - -typedef enum MB_TYPE { - MB_TYPE_COMMON = 0, - MB_TYPE_IMAGE = MB_TYPE_IMAGE_MASK | 0x0000, - MB_TYPE_VIDEO = MB_TYPE_VIDEO_MASK | 0x0000, - MB_TYPE_H264 = MB_TYPE_VIDEO_MASK | 0x0001, - MB_TYPE_H265 = MB_TYPE_VIDEO_MASK | 0x0002, - MB_TYPE_JPEG = MB_TYPE_VIDEO_MASK | 0x0003, - MB_TYPE_MJPEG = MB_TYPE_VIDEO_MASK | 0x0004, - MB_TYPE_AUDIO = MB_TYPE_AUDIO_MASK | 0x0000, -} mb_type_e; - -typedef struct MB_IMAGE_INFO { - uint32_t u32Width; - uint32_t u32Height; - uint32_t u32HorStride; - uint32_t u32VerStride; - drm_image_type_e enImgType; -} mb_image_info_t; - -typedef struct MB_AUDIO_INFO { - uint32_t u32Channels; - uint32_t u32SampleRate; - uint32_t u32NBSamples; - drm_sample_format_e enSampleFmt; -} mb_audio_info_t; - -typedef struct MB_POOL_PARAM_S { - mb_type_e enMediaType; - uint32_t u32Cnt; - uint32_t u32Size; - bool bHardWare; - uint16_t u16Flag; - union { - mb_image_info_t stImageInfo; - }; -} mb_pool_param_t; - -typedef struct HANDLE_MB { - void *handle; - void *mb; -} handle_mb_t; - -int drm_mpi_mb_get_fd(media_buffer_t mb); -void *drm_mpi_mb_get_ptr(media_buffer_t mb); -int drm_mpi_mb_get_handle(media_buffer_t mb); -size_t drm_mpi_mb_get_size(media_buffer_t mb); -int drm_mpi_mb_get_device_fd(media_buffer_t mb); - -mod_id_e drm_mpi_mb_get_mode_id(media_buffer_t mb); -int16_t drm_mpi_mb_get_channel_id(media_buffer_t mb); -uint64_t drm_mpi_mb_get_timestamp(media_buffer_t mb); - -int drm_mpi_mb_release_buffer(media_buffer_t mb); -media_buffer_t drm_mpi_mb_create_buffer(uint32_t u32Size, bool boolHardWare, uint8_t u8Flag); - -media_buffer_t drm_mpi_mb_convert_to_audio_buffer(media_buffer_t mb); -media_buffer_t drm_mpi_mb_convert_to_image_buffer(media_buffer_t mb, mb_image_info_t *pstImageInfo); -media_buffer_t drm_mpi_mb_convert_to_audio_bufferEx(media_buffer_t mb, mb_audio_info_t *pstAudioInfo); - -media_buffer_t drm_mpi_mb_create_audio_buffer(uint32_t u32BufferSize, bool boolHardWare); -media_buffer_t drm_mpi_mb_create_image_buffer(mb_image_info_t *pstImageInfo, bool boolHardWare, uint8_t u8Flag); -media_buffer_t drm_mpi_mb_create_audio_bufferEx(mb_audio_info_t *pstAudioInfo, bool boolHardWare, uint8_t u8Flag); - -int drm_mpi_mb_set_size(media_buffer_t mb, uint32_t size); -int drm_mpi_mb_set_timestamp(media_buffer_t mb, uint64_t timestamp); - -int drm_mpi_mb_get_flag(media_buffer_t mb); -int drm_mpi_mb_get_tsvc_level(media_buffer_t mb); - -int drm_mpi_mb_get_image_info(media_buffer_t mb, mb_image_info_t *pstImageInfo); -int drm_mpi_mb_get_audio_info(media_buffer_t mb, mb_audio_info_t *pstAudioInfo); - -int drm_mpi_mb_start_cpu_access(media_buffer_t mb, bool bReadonly); -int drm_mpi_mb_finish_cpu_access(media_buffer_t mb, bool bReadonly); - -int drm_mpi_mb_timestamp_node_dump(media_buffer_t mb); -media_buffer_t drm_mpi_mb_copy(media_buffer_t mb, bool bZeroCopy); - -int drm_mpi_mb_pool_destroy(media_buffer_pool_t MBPHandle); -media_buffer_pool_t drm_mpi_mb_pool_create(mb_pool_param_t *pstPoolParam); -media_buffer_t drm_mpi_mb_pool_get_buffer(media_buffer_pool_t MBPHandle, bool bIsBlock); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/project/3rdparty/include/media/drm_media_common.h b/project/3rdparty/include/media/drm_media_common.h deleted file mode 100644 index cec0853fc..000000000 --- a/project/3rdparty/include/media/drm_media_common.h +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef LIBDRM_MEDIA_COMMON_H -#define LIBDRM_MEDIA_COMMON_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum MOD_ID_E { - MOD_ID_UNKNOW = 0, - MOD_ID_VB, - MOD_ID_SYS, - MOD_ID_VDEC, - MOD_ID_VENC, - MOD_ID_VO, - MOD_ID_VI, - MOD_ID_VP, - MOD_ID_RGA, - MOD_ID_VMIX, - MOD_ID_BUTT -} mod_id_e; - -typedef enum DRM_IMAGE_TYPE_E { - DRM_IMAGE_TYPE_UNKNOW = 0, - DRM_IMAGE_TYPE_GRAY8, - DRM_IMAGE_TYPE_GRAY16, - DRM_IMAGE_TYPE_YUV420P, - DRM_IMAGE_TYPE_NV12, - DRM_IMAGE_TYPE_NV21, - DRM_IMAGE_TYPE_YV12, - DRM_IMAGE_TYPE_FBC2, - DRM_IMAGE_TYPE_FBC0, - DRM_IMAGE_TYPE_YUV422P, - DRM_IMAGE_TYPE_NV16, - DRM_IMAGE_TYPE_NV61, - DRM_IMAGE_TYPE_YV16, - DRM_IMAGE_TYPE_YUYV422, - DRM_IMAGE_TYPE_UYVY422, - DRM_IMAGE_TYPE_YUV444SP, - DRM_IMAGE_TYPE_RGB332, - DRM_IMAGE_TYPE_RGB565, - DRM_IMAGE_TYPE_BGR565, - DRM_IMAGE_TYPE_RGB888, - DRM_IMAGE_TYPE_BGR888, - DRM_IMAGE_TYPE_ARGB8888, - DRM_IMAGE_TYPE_ABGR8888, - DRM_IMAGE_TYPE_RGBA8888, - DRM_IMAGE_TYPE_BGRA8888, - DRM_IMAGE_TYPE_JPEG, - DRM_IMAGE_TYPE_XRGB8888, - DRM_IMAGE_TYPE_BUTT -} drm_image_type_e; - -typedef enum { - DRM_CODEC_TYPE_NONE = -1, - DRM_CODEC_TYPE_MP3, - DRM_CODEC_TYPE_MP2, - DRM_CODEC_TYPE_G711A, - DRM_CODEC_TYPE_G711U, - DRM_CODEC_TYPE_G726, - DRM_CODEC_TYPE_H264, - DRM_CODEC_TYPE_H265, - DRM_CODEC_TYPE_JPEG, - DRM_CODEC_TYPE_MJPEG, - DRM_CODEC_TYPE_NB -} DrmCodecType, drm_codec_type_e; - -typedef enum { - DRM_SAMPLE_FMT_NONE = -1, - DRM_SAMPLE_FMT_U8, - DRM_SAMPLE_FMT_S16, - DRM_SAMPLE_FMT_S32, - DRM_SAMPLE_FMT_FLT, - DRM_SAMPLE_FMT_U8P, - DRM_SAMPLE_FMT_S16P, - DRM_SAMPLE_FMT_S32P, - DRM_SAMPLE_FMT_FLTP, - DRM_SAMPLE_FMT_G711A, - DRM_SAMPLE_FMT_G711U, - DRM_SAMPLE_FMT_NB -} DrmSampleFormat, drm_sample_format_e; - -typedef struct SIZE_S { - uint32_t u32Width; - uint32_t u32Height; -} drm_size_t; - -typedef struct RECT_S { - int32_t s32X; - int32_t s32Y; - uint32_t u32Width; - uint32_t u32Height; -} drm_rect_t; - -typedef struct DRM_CHN_S { - mod_id_e enModId; - int s32DevId; - int s32ChnId; -} drm_chn_t; - -typedef struct DRM_FPS_ATTR_S { - int s32FpsInNum; - int s32FpsInDen; - int s32FpsOutNum; - int s32FpsOutDen; -} drm_fps_attr_t; - -typedef struct DRM_RECV_PIC_PARAM_S { - int s32RecvPicNum; -} drm_recv_pic_param_t; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/project/3rdparty/include/media/drm_media_rga.h b/project/3rdparty/include/media/drm_media_rga.h deleted file mode 100644 index 5e10c2d6f..000000000 --- a/project/3rdparty/include/media/drm_media_rga.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef LIBDRM_MEDIA_RGA_H -#define LIBDRM_MEDIA_RGA_H - -#include "drm_media_common.h" - -#ifdef __cplusplus -extern "C" { -#endif - -enum DRM_RGA_CHANNELS { - DRM_RGA_CHANNEL_00 = 0, - DRM_RGA_CHANNEL_02, - DRM_RGA_CHANNEL_03, - DRM_RGA_CHANNEL_04, - DRM_RGA_CHANNEL_05, - DRM_RGA_CHANNEL_06, - DRM_RGA_CHANNEL_07, - DRM_RGA_CHANNEL_08, - DRM_RGA_CHANNEL_09, - DRM_RGA_CHANNEL_10, - DRM_RGA_CHANNEL_11, - DRM_RGA_CHANNEL_12, - DRM_RGA_CHANNEL_13, - DRM_RGA_CHANNEL_14, - DRM_RGA_CHANNEL_15, - DRM_RGA_CHANNEL_BUTT -}; - -typedef struct RGA_INFO_S { - drm_image_type_e imgType; - uint32_t u32X; - uint32_t u32Y; - uint32_t u32Width; - uint32_t u32Height; - uint32_t u32HorStride; - uint32_t u32VirStride; -} drm_rga_info_t; - -typedef enum RGA_FLIP_E { - RGA_FLIP_NULL, - RGA_FLIP_H, - RGA_FLIP_V, - RGA_FLIP_HV, -} drm_rga_flip_e; - -typedef struct RGA_ATTR_S { - drm_rga_info_t stImgIn; - drm_rga_info_t stImgOut; - uint16_t u16Rotaion; - bool bEnBufPool; - uint16_t u16BufPoolCnt; - drm_rga_flip_e enFlip; -} drm_rga_attr_t; - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/project/3rdparty/include/media/drm_media_vdec.h b/project/3rdparty/include/media/drm_media_vdec.h deleted file mode 100644 index 9318df4ab..000000000 --- a/project/3rdparty/include/media/drm_media_vdec.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef LIBDRM_MEDIA_VDEC_H -#define LIBDRM_MEDIA_VDEC_H - -#include "drm_media_common.h" - -#ifdef __cplusplus -extern "C" { -#endif - -enum DRM_VDEC_CHANNELS { - DRM_VDEC_CHANNEL_00 = 0, - DRM_VDEC_CHANNEL_02, - DRM_VDEC_CHANNEL_03, - DRM_VDEC_CHANNEL_04, - DRM_VDEC_CHANNEL_05, - DRM_VDEC_CHANNEL_06, - DRM_VDEC_CHANNEL_07, - DRM_VDEC_CHANNEL_08, - DRM_VDEC_CHANNEL_09, - DRM_VDEC_CHANNEL_10, - DRM_VDEC_CHANNEL_11, - DRM_VDEC_CHANNEL_12, - DRM_VDEC_CHANNEL_13, - DRM_VDEC_CHANNEL_14, - DRM_VDEC_CHANNEL_15, - DRM_VDEC_CHANNEL_BUTT -}; - -typedef enum VIDEO_MODE_E { - VIDEO_MODE_STREAM = 0, - VIDEO_MODE_FRAME, - VIDEO_MODE_COMPAT, - VIDEO_MODE_BUTT -} drm_video_mode_e; - -typedef enum VIDEO_DECODEC_MODE_E { - VIDEO_DECODEC_SOFTWARE = 0, - VIDEO_DECODEC_HADRWARE, -} drm_video_decodec_mode_e; - -typedef struct VDEC_ATTR_VIDEO_S { - -} drm_video_vdec_attr_t; - -typedef struct VDEC_CHN_ATTR_S { - drm_codec_type_e enCodecType; - drm_video_mode_e enMode; - drm_video_decodec_mode_e enDecodecMode; - union { - drm_video_vdec_attr_t stVdecVideoAttr; - }; -} drm_vdec_chn_attr_t; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/project/3rdparty/include/media/drm_media_venc.h b/project/3rdparty/include/media/drm_media_venc.h deleted file mode 100644 index 53d63b13a..000000000 --- a/project/3rdparty/include/media/drm_media_venc.h +++ /dev/null @@ -1,372 +0,0 @@ -#ifndef LIBDRM_MEDIA_VENC_H -#define LIBDRM_MEDIA_VENC_H - -#include "drm_media_common.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define RC_HEIR_SIZE 4 -#define RC_TEXTURE_THR_SIZE 16 -#define VENC_RGN_COLOR_NUM 256 - -enum DRM_VENC_CHANNELS { - DRM_VENC_CHANNEL_00 = 0, - DRM_VENC_CHANNEL_02, - DRM_VENC_CHANNEL_03, - DRM_VENC_CHANNEL_04, - DRM_VENC_CHANNEL_05, - DRM_VENC_CHANNEL_06, - DRM_VENC_CHANNEL_07, - DRM_VENC_CHANNEL_08, - DRM_VENC_CHANNEL_09, - DRM_VENC_CHANNEL_10, - DRM_VENC_CHANNEL_11, - DRM_VENC_CHANNEL_12, - DRM_VENC_CHANNEL_13, - DRM_VENC_CHANNEL_14, - DRM_VENC_CHANNEL_15, - DRM_VENC_CHANNEL_BUTT -}; - -typedef enum VENC_RC_QUALITY_E { - VENC_RC_QUALITY_HIGHEST, - VENC_RC_QUALITY_HIGHER, - VENC_RC_QUALITY_HIGH, - VENC_RC_QUALITY_MEDIUM, - VENC_RC_QUALITY_LOW, - VENC_RC_QUALITY_LOWER, - VENC_RC_QUALITY_LOWEST, - VENC_RC_QUALITY_BUTT, -} drm_venc_rc_quality_e; - -typedef enum VENC_RC_MODE_E { - VENC_RC_MODE_H264CBR = 1, - VENC_RC_MODE_H264VBR, - VENC_RC_MODE_H264AVBR, - VENC_RC_MODE_MJPEGCBR, - VENC_RC_MODE_MJPEGVBR, - VENC_RC_MODE_H265CBR, - VENC_RC_MODE_H265VBR, - VENC_RC_MODE_H265AVBR, - VENC_RC_MODE_BUTT, -} drm_venc_rc_mode_e; - -typedef enum VENC_NALU_TYPE_E { - VENC_NALU_BSLICE = 1, - VENC_NALU_PSLICE, - VENC_NALU_ISLICE, - VENC_NALU_IDRSLICE, - VENC_NALU_SEI, - VENC_NALU_VPS, - VENC_NALU_SPS, - VENC_NALU_PPS, - VENC_NALU_BUTT -} drm_venc_nalu_type_e; - -typedef struct VENC_H264_CBR_S { - uint32_t u32Gop; - uint32_t u32SrcFrameRateNum; - uint32_t u32SrcFrameRateDen; - uint32_t fr32DstFrameRateNum; - uint32_t fr32DstFrameRateDen; - uint32_t u32BitRate; -} drm_venc_h264_cbr_t, drm_venc_h265_cbr_t; - -typedef struct VENC_H264_VBR_S { - uint32_t u32Gop; - uint32_t u32SrcFrameRateNum; - uint32_t u32SrcFrameRateDen; - uint32_t fr32DstFrameRateNum; - uint32_t fr32DstFrameRateDen; - uint32_t u32MaxBitRate; -} drm_venc_h264_vbr_t, drm_venc_h265_vbr_t; - -typedef struct VENC_H264_AVBR_S { - uint32_t u32Gop; - uint32_t u32SrcFrameRateNum; - uint32_t u32SrcFrameRateDen; - uint32_t fr32DstFrameRateNum; - uint32_t fr32DstFrameRateDen; - uint32_t u32MaxBitRate; -} drm_venc_h264_avbr_t, drm_venc_h265_avbr_t; - -typedef struct VENC_MJPEG_CBR_S { - uint32_t u32SrcFrameRateNum; - uint32_t u32SrcFrameRateDen; - uint32_t fr32DstFrameRateNum; - uint32_t fr32DstFrameRateDen; - uint32_t u32BitRate; -} drm_venc_mjpeg_cbr_t; - -typedef struct VENC_MJPEG_VBR_S { - uint32_t u32SrcFrameRateNum; - uint32_t u32SrcFrameRateDen; - uint32_t fr32DstFrameRateNum; - uint32_t fr32DstFrameRateDen; - uint32_t u32BitRate; -} drm_venc_mjpeg_vbr_t; - -typedef struct VENC_RC_ATTR_S { - drm_venc_rc_mode_e enRcMode; - union { - drm_venc_h264_cbr_t stH264Cbr; - drm_venc_h264_vbr_t stH264Vbr; - drm_venc_h264_avbr_t stH264Avbr; - - drm_venc_mjpeg_cbr_t stMjpegCbr; - drm_venc_mjpeg_vbr_t stMjpegVbr; - - drm_venc_h265_cbr_t stH265Cbr; - drm_venc_h265_vbr_t stH265Vbr; - drm_venc_h265_avbr_t stH265Avbr; - }; -} drm_venc_rc_attr_t; - -typedef enum VENC_GOP_MODE_E { - VENC_GOPMODE_NORMALP = 0, - VENC_GOPMODE_TSVC, - VENC_GOPMODE_SMARTP, - VENC_GOPMODE_BUTT, -} drm_venc_gop_mode_e; - -typedef enum VENC_ROTATION_E { - VENC_ROTATION_0 = 0, - VENC_ROTATION_90 = 90, - VENC_ROTATION_180 = 180, - VENC_ROTATION_270 = 270, - VENC_ROTATION_BUTT -} drm_venc_rotation_e; - -typedef struct VENC_MPF_CFG_S { - uint8_t u8LargeThumbNailNum; - drm_size_t astLargeThumbNailSize[2]; -} drm_venc_mpf_cfg_t; - -typedef enum VENC_PIC_RECEIVE_MODE_E { - VENC_PIC_RECEIVE_SINGLE = 0, - VENC_PIC_RECEIVE_MULTI, - VENC_PIC_RECEIVE_BUTT -} drm_venc_pic_receive_mode_e; - -typedef struct VENC_ATTR_JPEG_S { - uint32_t u32ZoomWidth; - uint32_t u32ZoomHeight; - uint32_t u32ZoomVirWidth; - uint32_t u32ZoomVirHeight; - bool bSupportDCF; - drm_venc_mpf_cfg_t stMPFCfg; - drm_venc_pic_receive_mode_e enReceiveMode; -} drm_venc_attr_jpeg_t; - -typedef struct VENC_ATTR_MJPEG_S { - uint32_t u32ZoomWidth; - uint32_t u32ZoomHeight; - uint32_t u32ZoomVirWidth; - uint32_t u32ZoomVirHeight; -} drm_venc_attr_mjpeg_t; - -typedef struct VENC_ATTR_H264_S { - uint32_t u32Level; -} drm_venc_attr_h264_t; - -typedef struct VENC_ATTR_H265_S { - bool bScaleList; -} drm_venc_attr_h265_t; - -typedef struct VENC_ATTR_S { - drm_codec_type_e enType; - drm_image_type_e imageType; - uint32_t u32VirWidth; - uint32_t u32VirHeight; - uint32_t u32Profile; - bool bByFrame; - uint32_t u32PicWidth; - uint32_t u32PicHeight; - drm_venc_rotation_e enRotation; - bool bFullRange; - union { - drm_venc_attr_h264_t stAttrH264e; - drm_venc_attr_h265_t stAttrH265e; - drm_venc_attr_mjpeg_t stAttrMjpege; - drm_venc_attr_jpeg_t stAttrJpege; - }; -} drm_venc_attr_t; - -typedef struct VENC_GOP_ATTR_S { - drm_venc_gop_mode_e enGopMode; - uint32_t u32GopSize; - int s32IPQpDelta; - uint32_t u32BgInterval; - int s32ViQpDelta; -} drm_venc_gop_attr_t; - -typedef struct VENC_CHN_ATTR_S { - drm_venc_attr_t stVencAttr; - drm_venc_rc_attr_t stRcAttr; - drm_venc_gop_attr_t stGopAttr; -} drm_venc_chn_attr_t; - -typedef struct VENC_CROP_INFO_S { - bool bEnable; - drm_rect_t stRect; -} drm_venc_crop_info_t; - -typedef struct VENC_FRAME_RATE_S { - int s32SrcFrmRate; - int s32DstFrmRate; -} drm_venc_frame_rate_t; - -typedef struct VENC_CHN_PARAM_S { - bool bColor2Grey; - uint32_t u32Priority; - uint32_t u32MaxStrmCnt; - uint32_t u32PollWakeUpFrmCnt; - drm_venc_crop_info_t stCropCfg; - drm_venc_frame_rate_t stFrameRate; -} drm_venc_chn_param_t; - -typedef struct VENC_PARAM_H264_S { - uint32_t u32StepQp; - uint32_t u32MaxQp; - uint32_t u32MinQp; - uint32_t u32MaxIQp; - uint32_t u32MinIQp; -} drm_venc_param_h264_t; - -typedef struct VENC_PARAM_H265_S { - uint32_t u32StepQp; - uint32_t u32MaxQp; - uint32_t u32MinQp; - uint32_t u32MaxIQp; - uint32_t u32MinIQp; -} drm_venc_param_h265_t; - -typedef struct VENC_PARAM_MJPEG_S { - -} drm_venc_param_mjpeg_t; - -typedef struct VENC_RC_PARAM_S { - uint32_t u32ThrdI[RC_TEXTURE_THR_SIZE]; - uint32_t u32ThrdP[RC_TEXTURE_THR_SIZE]; - uint32_t u32RowQpDeltaI; - uint32_t u32RowQpDeltaP; - - bool bEnableHierQp; - int s32HierQpDelta[RC_HEIR_SIZE]; - int s32HierFrameNum[RC_HEIR_SIZE]; - - uint32_t s32FirstFrameStartQp; - union { - drm_venc_param_h264_t stParamH264; - drm_venc_param_h265_t stParamH265; - drm_venc_param_mjpeg_t stParamMjpeg; - }; -} drm_venc_rc_param_t; - -typedef struct VENC_ROI_ATTR_S { - uint32_t u32Index; - bool bEnable; - bool bAbsQp; - int s32Qp; - bool bIntra; - drm_rect_t stRect; -} drm_venc_roi_attr_t; - -typedef struct VENC_COLOR_TBL { - uint32_t u32ArgbTbl[VENC_RGN_COLOR_NUM]; - bool bColorDichotomyEnable; -} drm_venc_color_tbl_t; - -typedef enum OSD_REGION_ID_E { - REGION_ID_0 = 0, - REGION_ID_1, - REGION_ID_2, - REGION_ID_3, - REGION_ID_4, - REGION_ID_5, - REGION_ID_6, - REGION_ID_7 -} drm_osd_region_id_e; - -typedef enum OSD_PIXEL_FORMAT_E { - PIXEL_FORMAT_ARGB_8888 = 0, - PIXEL_FORMAT_BUTT -} drm_osd_pixel_format_e; - -typedef struct BITMAP_S { - drm_osd_pixel_format_e enPixelFormat; - uint32_t u32Width; - uint32_t u32Height; - void *pData; -} drm_bitmap_t; - -typedef struct COVER_INFO_S { - drm_osd_pixel_format_e enPixelFormat; - uint32_t u32Color; -} drm_cover_info_t; - -typedef struct OSD_COLOR_PALETTE_BUF_S { - uint32_t u32Width; - uint32_t u32Height; - void *pIdBuf; -} drm_osd_color_palette_buf_t; - -typedef struct OSD_REGION_INFO_S { - drm_osd_region_id_e enRegionId; - uint32_t u32PosX; - uint32_t u32PosY; - uint32_t u32Width; - uint32_t u32Height; - uint8_t u8Inverse; - uint8_t u8Enable; -} drm_osd_region_info_t; - -typedef struct VENC_JPEG_PARAM_S { - uint32_t u32Qfactor; - uint8_t u8YQt[64]; - uint8_t u8CbQt[64]; - uint8_t u8CrQt[64]; - uint32_t u32MCUPerECS; -} drm_venc_jpeg_param_t; - -typedef struct VENC_RESOLUTION_PARAM_S { - uint32_t u32Width; - uint32_t u32Height; - uint32_t u32VirWidth; - uint32_t u32VirHeight; -} drm_venc_resolution_param_t; - -typedef struct VENC_CHN_STATUS_S { - uint32_t u32LeftFrames; - uint32_t u32TotalFrames; - uint32_t u32LeftPackets; - uint32_t u32TotalPackets; -} drm_venc_chn_status_t; - -typedef enum RC_SUPERFRM_MODE_E { - SUPERFRM_NONE = 0, - SUPERFRM_DISCARD, - SUPERFRM_REENCODE, - SUPERFRM_BUTT -} drm_venc_superfrm_mode_e; - -typedef enum VENC_RC_PRIORITY_E { - VENC_RC_PRIORITY_BITRATE_FIRST = 1, - VENC_RC_PRIORITY_FRAMEBITS_FIRST, - VENC_RC_PRIORITY_BUTT, -} drm_venc_rc_priority_e; - -typedef struct VENC_SUPERFRAME_CFG_S { - drm_venc_superfrm_mode_e enSuperFrmMode; - uint32_t u32SuperIFrmBitsThr; - uint32_t u32SuperPFrmBitsThr; - drm_venc_rc_priority_e enRcPriority; -} drm_venc_superframe_cfg_t; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/project/3rdparty/include/media/drm_media_vi.h b/project/3rdparty/include/media/drm_media_vi.h deleted file mode 100644 index 04acb108e..000000000 --- a/project/3rdparty/include/media/drm_media_vi.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef LIBDRM_MEDIA_VI_H -#define LIBDRM_MEDIA_VI_H - -#include "drm_media_common.h" - -#ifdef __cplusplus -extern "C" { -#endif - -enum DRM_VI_CHANNELS { - DRM_VI_CHANNEL_00 = 0, - DRM_VI_CHANNEL_01, - DRM_VI_CHANNEL_02, - DRM_VI_CHANNEL_03, - DRM_VI_CHANNEL_04, - DRM_VI_CHANNEL_05, - DRM_VI_CHANNEL_06, - DRM_VI_CHANNEL_07, - DRM_VI_CHANNEL_BUTT -}; - -typedef enum DRM_VI_CHN_WORK_MODE { - DRM_VI_WORK_MODE_NORMAL = 0, - DRM_VI_WORK_MODE_LUMA_ONLY, - DRM_VI_WORK_MODE_BUTT -} drm_vi_chn_work_mode_e; - -typedef enum DRM_VI_CHN_BUF_TYPE { - DRM_VI_CHN_BUF_TYPE_DMA = 0, - DRM_VI_CHN_BUF_TYPE_MMAP, -} drm_vi_chn_buf_type_e; - -typedef struct DRM_VI_CHN_ATTR { - const char *pcVideoNode; - uint32_t u32Width; - uint32_t u32Height; - drm_image_type_e enPixFmt; - uint32_t u32BufCnt; - drm_vi_chn_buf_type_e enBufType; - drm_vi_chn_work_mode_e enWorkMode; -} drm_vi_chn_attr_t; - -typedef struct DRM_VIDEO_REGION_INFO { - uint32_t u32RegionNum; - drm_rect_t *pstRegion; -} drm_video_region_info_t; - -typedef struct DRM_VI_USERPOC_ATTR { - drm_image_type_e enPixFmt; - uint32_t u32Width; - uint32_t u32Height; - void *pvPicPtr; -} drm_vi_userpic_attr_t; - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/project/3rdparty/include/media/drm_media_vmix.h b/project/3rdparty/include/media/drm_media_vmix.h deleted file mode 100644 index efdee94b8..000000000 --- a/project/3rdparty/include/media/drm_media_vmix.h +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef LIBDRM_MEDIA_VMIX_H -#define LIBDRM_MEDIA_VMIX_H - -#include "drm_media_rga.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define VMIX_MAX_LINE_NUM 64 - -enum DRM_VMIX_CHANNELS { - DRM_VMIX_CHANNEL_00 = 0, - DRM_VMIX_CHANNEL_01, - DRM_VMIX_CHANNEL_02, - DRM_VMIX_CHANNEL_03, - DRM_VMIX_CHANNEL_04, - DRM_VMIX_CHANNEL_05, - DRM_VMIX_CHANNEL_06, - DRM_VMIX_CHANNEL_07, - DRM_VMIX_CHANNEL_08, - DRM_VMIX_CHANNEL_09, - DRM_VMIX_CHANNEL_10, - DRM_VMIX_CHANNEL_11, - DRM_VMIX_CHANNEL_12, - DRM_VMIX_CHANNEL_13, - DRM_VMIX_CHANNEL_14, - DRM_VMIX_CHANNEL_15, - DRM_VMIX_CHANNEL_BUTT -}; - -enum DRM_VMIX_DEVICES { - DRM_VMIX_DEVICE_00 = 0, - DRM_VMIX_DEVICE_01, - DRM_VMIX_DEVICE_02, - DRM_VMIX_DEVICE_03, - DRM_VMIX_DEVICE_04, - DRM_VMIX_DEVICE_05, - DRM_VMIX_DEVICE_06, - DRM_VMIX_DEVICE_07, - DRM_VMIX_DEVICE_08, - DRM_VMIX_DEVICE_09, - DRM_VMIX_DEVICE_10, - DRM_VMIX_DEVICE_11, - DRM_VMIX_DEVICE_12, - DRM_VMIX_DEVICE_13, - DRM_VMIX_DEVICE_14, - DRM_VMIX_DEVICE_15, - DRM_VMIX_DEVICE_BUTT -}; - -typedef struct VMIX_CHN_INFO_S { - drm_image_type_e enImgInType; - drm_image_type_e enImgOutType; - drm_rect_t stInRect; - drm_rect_t stOutRect; - uint16_t u16Rotaion; - drm_rga_flip_e enFlip; -} drm_vmix_chn_info_t; - -typedef struct VMIX_DEV_INFO_S { - uint16_t u16ChnCnt; - uint16_t u16Fps; - uint32_t u32ImgWidth; - uint32_t u32ImgHeight; - drm_image_type_e enImgType; - bool bEnBufPool; - uint16_t u16BufPoolCnt; - drm_vmix_chn_info_t stChnInfo[DRM_VMIX_CHANNEL_BUTT]; -} drm_vmix_dev_info_t; - -typedef struct rkVMIX_LINE_INFO_S { - uint32_t u32LineCnt; - uint32_t u32Color; - drm_rect_t stLines[VMIX_MAX_LINE_NUM]; - uint8_t u8Enable[VMIX_MAX_LINE_NUM]; -} drm_vmix_line_info_t; - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/project/3rdparty/include/media/drm_media_vo.h b/project/3rdparty/include/media/drm_media_vo.h deleted file mode 100644 index cd6019926..000000000 --- a/project/3rdparty/include/media/drm_media_vo.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef LIBDRM_MEDIA_VO_H -#define LIBDRM_MEDIA_VO_H - -#include "drm_media_common.h" - -#ifdef __cplusplus -extern "C" { -#endif - -enum DRM_VO_CHANNELS { - DRM_VO_CHANNEL_00 = 0, - DRM_VO_CHANNEL_01, - DRM_VO_CHANNEL_BUTT -}; - -typedef enum VO_PLANE_TYPE_E { - VO_PLANE_PRIMARY = 0, - VO_PLANE_OVERLAY, - VO_PLANE_CURSOR, - VO_PLANE_BUTT -} drm_plane_type_e; - -typedef struct VO_CHN_ATTR_S { - const char *pcDevNode; - uint16_t u16ConIdx; - uint16_t u16EncIdx; - uint16_t u16CrtcIdx; - drm_plane_type_e emPlaneType; - drm_image_type_e enImgType; - uint32_t u32Width; - uint32_t u32Height; - uint16_t u16Fps; - uint16_t u16Zpos; - drm_rect_t stImgRect; - drm_rect_t stDispRect; -} drm_vo_chn_attr_t; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/project/3rdparty/include/media/drm_media_vp.h b/project/3rdparty/include/media/drm_media_vp.h deleted file mode 100644 index 6f9699218..000000000 --- a/project/3rdparty/include/media/drm_media_vp.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef LIBDRM_MEDIA_VP_H -#define LIBDRM_MEDIA_VP_H - -#include "drm_media_common.h" - -#ifdef __cplusplus -extern "C" { -#endif - -enum DRM_VP_CHANNELS { - DRM_VP_CHANNEL_00 = 0, - DRM_VP_CHANNEL_01, - DRM_VP_CHANNEL_02, - DRM_VP_CHANNEL_03, - DRM_VP_CHANNEL_04, - DRM_VP_CHANNEL_05, - DRM_VP_CHANNEL_06, - DRM_VP_CHANNEL_07, - DRM_VP_CHANNEL_BUTT -}; - -typedef enum VP_CHN_WORK_MODE { - VP_WORK_MODE_NORMAL = 0, - VP_WORK_MODE_BUTT -} drm_vp_chn_work_mode_e; - -typedef enum VP_CHN_BUF_TYPE { - VP_CHN_BUF_TYPE_DMA = 0, - VP_CHN_BUF_TYPE_MMAP, -} drm_vp_chn_buf_type_e; - -typedef struct VP_CHN_ATTR_S { - const char *pcVideoNode; - uint32_t u32Width; - uint32_t u32Height; - drm_image_type_e enPixFmt; - uint32_t u32BufCnt; - drm_vp_chn_buf_type_e enBufType; - drm_vp_chn_work_mode_e enWorkMode; -} drm_vp_chn_attr_t; - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/project/3rdparty/include/media/utils/buffer.h b/project/3rdparty/include/media/utils/buffer.h deleted file mode 100644 index d54f5307b..000000000 --- a/project/3rdparty/include/media/utils/buffer.h +++ /dev/null @@ -1,583 +0,0 @@ -#ifndef LIBDRM_DISPLAY_BUFFER_H -#define LIBDRM_DISPLAY_BUFFER_H - -#include -#include -#include - -#include -#include -#include - -#include "lock.h" -#include "image.h" -#include "sound.h" -#include "media_type.h" - -#define NUM_DATA_POINTERS 8 - -typedef int (*DeleteFunction)(void *arg); - -namespace libdrm { -enum drm_gem_mem_type { - DRM_BO_CONTIG = 1 << 0, - DRM_BO_CACHABLE = 1 << 1, - DRM_BO_WC = 1 << 2, - DRM_BO_SECURE = 1 << 3, - DRM_BO_MASK = DRM_BO_CONTIG | DRM_BO_CACHABLE | DRM_BO_WC -}; - -class TimeStampNode { -public: - TimeStampNode(std::string name, int64_t ts) : NodeName(name), NodeTs(ts) { - - } - - TimeStampNode(const TimeStampNode &TsNode) { - NodeName = TsNode.NodeName; - NodeTs = TsNode.NodeTs; - } - - ~TimeStampNode() = default; - - TimeStampNode operator=(const TimeStampNode &TsNode) { - if (this != &TsNode) { - NodeName = TsNode.NodeName; - NodeTs = TsNode.NodeTs; - } - - return *this; - } - - std::string NodeName; - int64_t NodeTs; -}; - -class TimeStampRecorder { -public: - TimeStampRecorder() { - TsNodeList.clear(); - } - - ~TimeStampRecorder() { - TsNodeList.clear(); - } - - void Record(std::string name, int64_t ts) { - TsNodeListMtx.lock(); - TsNodeList.push_back(TimeStampNode(name, ts)); - TsNodeListMtx.unlock(); - } - - void Reset() { - TsNodeListMtx.lock(); - TsNodeList.clear(); - TsNodeListMtx.unlock(); - } - - void Dump() { - int64_t ts_pre = 0; - int64_t ts_cur = 0; - - TsNodeListMtx.lock(); - for (size_t i = 0; i < TsNodeList.size(); i++) { - ts_cur = TsNodeList[i].NodeTs; - printf("#[%s]:[%lld]: %0.3fms\n", TsNodeList[i].NodeName.c_str(), (long long)TsNodeList[i].NodeTs, (ts_cur - ts_pre) / 1000.0); - ts_pre = ts_cur; - } - TsNodeListMtx.unlock(); - } - - std::vector TsNodeList; - std::mutex TsNodeListMtx; -}; - -class MediaBuffer { -public: - static const uint32_t kExtraIntra = (1 << 0); - static const uint32_t kIntra = (1 << 1); - static const uint32_t kPredicted = (1 << 2); - static const uint32_t kBiPredictive = (1 << 3); - static const uint32_t kBiDirectional = (1 << 4); - static const uint32_t kSingleNalUnit = (1 << 5); - static const uint32_t kBuildinLibvorbisenc = (1 << 16); - - MediaBuffer() : ptr(nullptr), size(0), fd(-1), handle(0), dev_fd(-1), valid_size(0), type(DrmType::None), user_flag(0), ustimestamp(0), eof(false), tsvc_level(-1), dbg_info(nullptr) - { - TsRecorder = std::make_shared(); - } - - MediaBuffer(void *buffer_ptr, size_t buffer_size, int buffer_fd = -1, int buffer_handle = 0, int device_fd = -1, void *user_data = nullptr, DeleteFunction df = nullptr) - : ptr(buffer_ptr), size(buffer_size), fd(buffer_fd), handle(buffer_handle), dev_fd(device_fd), valid_size(0), type(DrmType::None), user_flag(0), ustimestamp(0), eof(false), tsvc_level(-1), dbg_info(nullptr) - { - SetUserData(user_data, df); - TsRecorder = std::make_shared(); - } - - virtual ~MediaBuffer() = default; - - virtual DrmPixelFormat GetPixelFormat() const { - return DRM_PIX_FMT_NONE; - } - - virtual DrmSampleFormat GetSampleFormat() const { - return DRM_SAMPLE_FMT_NONE; - } - - void BeginCPUAccess(bool readonly); - void EndCPUAccess(bool readonly); - - int GetDevFD() const { - return dev_fd; - } - - void SetDevFD(int new_dev_fd) { - dev_fd = new_dev_fd; - } - - int GetHandle() const { - return handle; - } - - void SetHandle(int new_handle) { - handle = new_handle; - } - - int GetFD() const { - return fd; - } - - void SetFD(int new_fd) { - fd = new_fd; - } - - void *GetPtr() const { - return ptr; - } - - void SetPtr(void *addr) { - ptr = addr; - } - - void **GetPtrArrayBase() { - return ptrArray; - } - - void *GetPtrArray(size_t index) const { - return ptrArray[index]; - } - - void SetPtrArray(void *addr, size_t index) { - ptrArray[index] = addr; - } - - size_t GetSize() const { - return size; - } - - void SetSize(size_t s) { - size = s; - } - - size_t GetValidSize() const { - return valid_size; - } - - void SetValidSize(size_t s) { - valid_size = s; - } - - DrmType GetType() const { - return type; - } - - void SetType(DrmType t) { - type = t; - } - - uint32_t GetUserFlag() const { - return user_flag; - } - - void SetUserFlag(uint32_t flag) { - user_flag = flag; - } - - int64_t GetUSTimeStamp() const { - return ustimestamp; - } - - struct timeval GetTimeVal() const { - struct timeval ret; - ret.tv_sec = ustimestamp / 1000000LL; - ret.tv_usec = ustimestamp % 1000000LL; - return ret; - } - - void SetUSTimeStamp(int64_t us) { - ustimestamp = us; - } - - void SetTimeVal(const struct timeval &val) { - ustimestamp = val.tv_sec * 1000000LL + val.tv_usec; - } - - bool IsEOF() const { - return eof; - } - - void SetEOF(bool val) { - eof = val; - } - - int GetTsvcLevel() { - return tsvc_level; - } - - void SetTsvcLevel(int _level) { - tsvc_level = _level; - } - - void SetUserData(void *user_data, DeleteFunction df) { - if (user_data) { - if (df) { - userdata.reset(user_data, df); - } else { - userdata.reset(user_data, [](void *) {}); - } - } else { - userdata.reset(); - } - } - - int64_t GetAtomicClock() const { - return atomic_clock; - } - - struct timeval GetAtomicTimeVal() const { - struct timeval ret; - ret.tv_sec = atomic_clock / 1000000LL; - ret.tv_usec = atomic_clock % 1000000LL; - return ret; - } - - void SetAtomicClock(int64_t us) { - atomic_clock = us; - } - - void SetAtomicTimeVal(const struct timeval &val) { - atomic_clock = val.tv_sec * 1000000LL + val.tv_usec; - } - - void SetUserData(std::shared_ptr user_data) { - userdata = user_data; - } - - std::shared_ptr GetUserData() { - return userdata; - } - - void SetRelatedSPtr(const std::shared_ptr &rdata, int index = -1) { - if (index < 0) { - related_sptrs.push_back(rdata); - return; - } else if (index >= (int)related_sptrs.size()) { - related_sptrs.resize(index + 1); - } - - related_sptrs[index] = rdata; - } - - std::vector> &GetRelatedSPtrs() { - return related_sptrs; - } - - bool IsValid() { - return valid_size > 0; - } - - bool IsHwBuffer() { - return fd >= 0; - } - - enum class MemType { - MEM_COMMON, - MEM_HARD_WARE, - }; - - static std::shared_ptr Alloc(size_t size, MemType type = MemType::MEM_COMMON, unsigned int flag = DRM_BO_CACHABLE); - static MediaBuffer Alloc2(size_t size, MemType type = MemType::MEM_COMMON, unsigned int flag = DRM_BO_CACHABLE); - - static std::shared_ptr Clone(MediaBuffer &src, MemType dst_type = MemType::MEM_COMMON); - static std::shared_ptr Clone2(MediaBuffer &src, MemType dst_type = MemType::MEM_COMMON); - - void *GetDbgInfo() const { - return dbg_info; - } - - void SetDbgInfo(void *addr) { - dbg_info = addr; - } - - size_t GetDbgInfoSize() const { - return dbg_info_size; - } - - void SetDbgInfoSize(size_t s) { - dbg_info_size = s; - } - - void TimeStampRecord(std::string name, int64_t ts) { - TsRecorder->Record(name, ts); - } - - void TimeStampCopy(std::shared_ptr mb) { - TsRecorder = mb->TsRecorder; - } - - void TimeStampReset() { - TsRecorder->Reset(); - } - - void TimeStampDump() { - TsRecorder->Dump(); - } - - std::shared_ptr TsRecorder; - -private: - void CopyAttribute(MediaBuffer &src_attr); - - void *ptr; - void *ptrArray[NUM_DATA_POINTERS]; - size_t size; - int fd; - int handle; - int dev_fd; - size_t valid_size; - DrmType type; - uint32_t user_flag; - int64_t ustimestamp; - int64_t atomic_clock; - bool eof; - int tsvc_level; - void *dbg_info; - size_t dbg_info_size; - std::shared_ptr userdata; - std::vector> related_sptrs; -}; - -MediaBuffer::MemType StringToMemType(const char *s); - -class SampleBuffer : public MediaBuffer { -public: - SampleBuffer() { - ResetValues(); - } - - SampleBuffer(const MediaBuffer &buffer, DrmSampleFormat fmt = DRM_SAMPLE_FMT_NONE) : MediaBuffer(buffer) { - ResetValues(); - sample_info.fmt = fmt; - } - - SampleBuffer(const MediaBuffer &buffer, const DrmSampleInfo &info) : MediaBuffer(buffer), sample_info(info) { - SetType(DrmType::Audio); - } - - virtual ~SampleBuffer() = default; - - virtual DrmSampleFormat GetSampleFormat() const override { - return sample_info.fmt; - } - - DrmSampleInfo &GetSampleInfo() { - return sample_info; - } - - size_t GetSampleSize() const { - return ::GetSampleSize(sample_info); - } - - void SetSamples(int num) { - sample_info.nb_samples = num; - SetValidSize(num * GetSampleSize()); - } - - int GetSamples() const { - return sample_info.nb_samples; - } - - void SetChannels(int num) { - sample_info.channels = num; - } - - int GetChannels() { - return sample_info.channels; - } - - void SetSampleRate(int sample_rate) { - sample_info.sample_rate = sample_rate; - } - - int GetSampleRate() { - return sample_info.sample_rate; - } - - void SetFormat(DrmSampleFormat fmt) { - sample_info.fmt = fmt; - } - - DrmSampleFormat GetFormat() { - return sample_info.fmt; - } - -private: - void ResetValues() { - SetType(DrmType::Audio); - memset(&sample_info, 0x00, sizeof(sample_info)); - sample_info.fmt = DRM_SAMPLE_FMT_NONE; - } - - DrmSampleInfo sample_info; -}; - -class ImageBuffer : public MediaBuffer { -public: - ImageBuffer() { - ResetValues(); - } - - ImageBuffer(const MediaBuffer &buffer) : MediaBuffer(buffer) { - ResetValues(); - } - - ImageBuffer(const MediaBuffer &buffer, const DrmImageInfo &info) : MediaBuffer(buffer), image_info(info) { - SetType(DrmType::Image); - - size_t s = CalPixFmtSize(info); - if (s > 0) { - SetValidSize(s); - } - } - - virtual ~ImageBuffer() = default; - - virtual DrmPixelFormat GetPixelFormat() const override { - return image_info.pix_fmt; - } - - int GetWidth() const { - return image_info.width; - } - - int GetHeight() const { - return image_info.height; - } - - int GetVirWidth() const { - return image_info.vir_width; - } - - int GetVirHeight() const { - return image_info.vir_height; - } - - DrmImageInfo &GetImageInfo() { - return image_info; - } - -private: - void ResetValues() { - SetType(DrmType::Image); - memset(&image_info, 0x00, sizeof(image_info)); - image_info.pix_fmt = DRM_PIX_FMT_NONE; - } - - DrmImageInfo image_info; -}; - -class MediaGroupBuffer { -public: - MediaGroupBuffer() : pool(nullptr), ptr(nullptr), size(0), fd(-1), handle(0), dev_fd(-1) { - - } - - MediaGroupBuffer(void *buffer_ptr, size_t buffer_size, int buffer_fd = -1, int buffer_handle = 0, int device_fd = -1, void *user_data = nullptr, DeleteFunction df = nullptr) - : pool(nullptr), ptr(buffer_ptr), size(buffer_size), fd(buffer_fd), handle(buffer_handle), dev_fd(device_fd) - { - SetUserData(user_data, df); - } - - virtual ~MediaGroupBuffer() = default; - - void SetUserData(void *user_data, DeleteFunction df) { - if (user_data) { - if (df) { - userdata.reset(user_data, df); - } else { - userdata.reset(user_data, [](void *) {}); - } - } else { - userdata.reset(); - } - } - - void SetBufferPool(void *bp) { - pool = bp; - } - - int GetFD() const { - return fd; - } - - void *GetPtr() const { - return ptr; - } - - size_t GetSize() const { - return size; - } - - int GetHandle() const { - return handle; - } - - int GetDevFD() const { - return dev_fd; - } - - static MediaGroupBuffer *Alloc(size_t size, MediaBuffer::MemType type = MediaBuffer::MemType::MEM_COMMON, unsigned int flag = DRM_BO_CACHABLE); - -public: - void *pool; - -private: - void *ptr; - size_t size; - int fd; - int handle; - int dev_fd; - std::shared_ptr userdata; -}; - -class BufferPool { -public: - BufferPool(int cnt, int size, MediaBuffer::MemType type); - BufferPool(int cnt, int size, MediaBuffer::MemType type, unsigned int flag); - ~BufferPool(); - - std::shared_ptr GetBuffer(bool block = true); - int PutBuffer(MediaGroupBuffer *mgb); - - void DumpInfo(); - -private: - std::list ready_buffers; - std::list busy_buffers; - ConditionLockMutex mtx; - int buf_cnt; - int buf_size; -}; -} - -#endif diff --git a/project/3rdparty/include/media/utils/codec.h b/project/3rdparty/include/media/utils/codec.h deleted file mode 100644 index 960640f21..000000000 --- a/project/3rdparty/include/media/utils/codec.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef LIBDRM_DISPLAY_CODEC_H -#define LIBDRM_DISPLAY_CODEC_H - -#include -#include - -#include "media_config.h" - -namespace libdrm { -class MediaBuffer; - -class Codec { -public: - Codec() { - memset(&config, 0x00, sizeof(config)); - } - - ~Codec() { - - } - - static const char *GetCodecName() { - return nullptr; - } - - DrmMediaConfig &GetConfig() { - return config; - } - - void SetConfig(const DrmMediaConfig &cfg) { - config = cfg; - } - - std::shared_ptr GetExtraData(void **data = nullptr, size_t *size = nullptr); - - bool SetExtraData(void *data, size_t size, bool realloc = true); - void SetExtraData(const std::shared_ptr &data) { - extra_data = data; - } - - virtual bool Init() = 0; - - virtual int Process(const std::shared_ptr &input, std::shared_ptr &output, std::shared_ptr extra_output = nullptr) = 0; - - virtual int SendInput(const std::shared_ptr &input) = 0; - virtual std::shared_ptr FetchOutput() = 0; - -private: - DrmMediaConfig config; - std::shared_ptr extra_data; -}; - -const uint8_t *find_nalu_startcode(const uint8_t *p, const uint8_t *end); - -std::list> split_h264_separate(const uint8_t *buffer, size_t length, int64_t timestamp); -std::list> split_h265_separate(const uint8_t *buffer, size_t length, int64_t timestamp); - -void *GetVpsFromBuffer(std::shared_ptr &mb, int &size, DrmCodecType c_type); -void *GetSpsFromBuffer(std::shared_ptr &mb, int &size, DrmCodecType c_type); -void *GetPpsFromBuffer(std::shared_ptr &mb, int &size, DrmCodecType c_type); -void *GetSpsPpsFromBuffer(std::shared_ptr &mb, int &size, DrmCodecType c_type); -void *GetVpsSpsPpsFromBuffer(std::shared_ptr &mb, int &size, DrmCodecType c_type); -void *GetSeiFromBuffer(std::shared_ptr &mb, int &size, DrmCodecType c_type); -void *GetIntraFromBuffer(std::shared_ptr &mb, int &size, DrmCodecType c_type); -} - -#endif diff --git a/project/3rdparty/include/media/utils/control.h b/project/3rdparty/include/media/utils/control.h deleted file mode 100644 index 2e2da2cc3..000000000 --- a/project/3rdparty/include/media/utils/control.h +++ /dev/null @@ -1,103 +0,0 @@ -#ifndef LIBDRM_DISPLAY_CONTROL_H -#define LIBDRM_DISPLAY_CONTROL_H - -#include - -#include "image.h" - -namespace libdrm { -typedef struct { - const char *name; - uint64_t value; -} DRMPropertyArg; - -typedef struct { - unsigned long int sub_request; - int size; - void *arg; -} SubRequest; - -typedef struct { - size_t size; - void *data; -} UserPicArg; - -enum { - S_FIRST_CONTROL = 10000, - S_SUB_REQUEST, - S_SOURCE_RECT, - G_SOURCE_RECT, - S_DESTINATION_RECT, - G_DESTINATION_RECT, - S_SRC_DST_RECT, - G_SRC_DST_RECT, - S_SET_MUTE, - - G_PLANE_IMAGE_INFO = 10100, - G_PLANE_SUPPORT_SCALE, - S_CRTC_PROPERTY, - S_CONNECTOR_PROPERTY, - - S_STREAM_OFF = 10200, - S_INSERT_USER_PICTURE, - S_ENABLE_USER_PICTURE, - S_DISABLE_USER_PICTURE, - G_STREAM_RECENT_TIME, - - S_ALSA_VOLUME = 10300, - G_ALSA_VOLUME, - S_VQE_ENABLE, - S_VQE_ATTR, - G_VQE_ATTR, - - S_ALLOW_THROUGH_COUNT = 10400, - - S_ANR_ON = 10500, - G_ANR_ON, - - S_NN_CALLBACK = 10600, - G_NN_CALLBACK, - S_NN_HANDLER, - G_NN_HANDLER, - S_NN_DRAW_HANDLER, - G_NN_DRAW_HANDLER, - S_NN_INFO, - G_NN_INFO, - - S_MD_ROI_ENABLE = 10700, - G_MD_ROI_ENABLE, - S_MD_ROI_RECTS, - G_MD_ROI_RECTS, - S_MD_SENSITIVITY, - G_MD_SENSITIVITY, - - S_START_SRTEAM = 10800, - S_STOP_SRTEAM, - S_MANUAL_SPLIT_STREAM, - G_MUXER_GET_STATUS, - S_MUXER_FILE_DURATION, - S_MUXER_FILE_PATH, - S_MUXER_FILE_PREFIX, - S_MUXER_FILE_NAME_CB, - S_MUXER_SET_FPS, - - S_OD_ROI_ENABLE = 10900, - G_OD_ROI_ENABLE, - S_OD_ROI_RECTS, - G_OD_ROI_RECTS, - S_OD_SENSITIVITY, - G_OD_SENSITIVITY, - - S_RGA_CFG = 11000, - G_RGA_CFG, - S_RGA_LINE_INFO, - G_RGA_LINE_INFO, - S_RGA_SHOW, - S_RGA_HIDE, - S_RGA_OSD_INFO, - G_RGA_OSD_INFO, - G_RGA_REGION_LUMA, -}; -} - -#endif diff --git a/project/3rdparty/include/media/utils/decoder.h b/project/3rdparty/include/media/utils/decoder.h deleted file mode 100644 index 35bfc19af..000000000 --- a/project/3rdparty/include/media/utils/decoder.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef LIBDRM_DISPLAY_DECODER_H -#define LIBDRM_DISPLAY_DECODER_H - -#include "codec.h" -#include "media_reflector.h" - -namespace libdrm { -DECLARE_FACTORY(Decoder) -DECLARE_REFLECTOR(Decoder) - -#define DEFINE_DECODER_FACTORY(REAL_PRODUCT, FINAL_EXPOSE_PRODUCT) \ - DEFINE_MEDIA_CHILD_FACTORY(REAL_PRODUCT, REAL_PRODUCT::GetCodecName(), FINAL_EXPOSE_PRODUCT, Decoder) \ - DEFINE_MEDIA_CHILD_FACTORY_EXTRA(REAL_PRODUCT) \ - DEFINE_MEDIA_NEW_PRODUCT_BY(REAL_PRODUCT, Decoder, Init() != true) - -#define DEFINE_AUDIO_DECODER_FACTORY(REAL_PRODUCT) \ - DEFINE_DECODER_FACTORY(REAL_PRODUCT, AudioDecoder) - -class Decoder : public Codec { -public: - virtual ~Decoder() = default; - virtual bool InitConfig(const DrmMediaConfig &cfg) { - DRM_UNUSED(cfg); - return true; - } -}; - -class AudioDecoder : public Decoder { -public: - virtual ~AudioDecoder() = default; - virtual int GetNbSamples() { - return 0; - } - -protected: - DrmCodecType codec_type; - - DECLARE_PART_FINAL_EXPOSE_PRODUCT(Decoder) -}; - -#define DEFINE_VIDEO_DECODER_FACTORY(REAL_PRODUCT) \ - DEFINE_DECODER_FACTORY(REAL_PRODUCT, VideoDecoder) - -class VideoDecoder : public Decoder { -public: - virtual ~VideoDecoder() = default; - - DECLARE_PART_FINAL_EXPOSE_PRODUCT(Decoder) -}; -} - -#endif diff --git a/project/3rdparty/include/media/utils/demuxer.h b/project/3rdparty/include/media/utils/demuxer.h deleted file mode 100644 index cdf54ba6a..000000000 --- a/project/3rdparty/include/media/utils/demuxer.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef LIBDRM_DISPLAY_DEMUXER_H -#define LIBDRM_DISPLAY_DEMUXER_H - -#include - -#include "stream.h" -#include "media_config.h" -#include "media_reflector.h" - -namespace libdrm { - -DECLARE_FACTORY(Demuxer) -DECLARE_REFLECTOR(Demuxer) - -#define DEFINE_DEMUXER_FACTORY(REAL_PRODUCT, FINAL_EXPOSE_PRODUCT) \ - DEFINE_MEDIA_CHILD_FACTORY(REAL_PRODUCT, REAL_PRODUCT::GetDemuxName(), FINAL_EXPOSE_PRODUCT, Demuxer) \ - DEFINE_MEDIA_CHILD_FACTORY_EXTRA(REAL_PRODUCT) \ - DEFINE_MEDIA_NEW_PRODUCT_BY(REAL_PRODUCT, FINAL_EXPOSE_PRODUCT, GetError() < 0) - -class MediaBuffer; -class Demuxer { -public: - Demuxer(const char *param); - virtual ~Demuxer() = default; - - static const char *GetDemuxName() { - return nullptr; - } - - virtual bool IncludeDecoder() { - return false; - } - - virtual bool Init(std::shared_ptr input, DrmMediaConfig *out_cfg) = 0; - virtual char **GetComment() { - return nullptr; - } - - virtual std::shared_ptr Read(size_t request_size = 0) = 0; - -public: - double total_time; - -protected: - std::string path; - - DEFINE_ERR_GETSET() - DECLARE_PART_FINAL_EXPOSE_PRODUCT(Demuxer) -}; -} - -#endif diff --git a/project/3rdparty/include/media/utils/encoder.h b/project/3rdparty/include/media/utils/encoder.h deleted file mode 100644 index 81f1b8b06..000000000 --- a/project/3rdparty/include/media/utils/encoder.h +++ /dev/null @@ -1,149 +0,0 @@ -#ifndef LIBDRM_DISPLAY_ENCODER_H -#define LIBDRM_DISPLAY_ENCODER_H - -#include - -#ifdef __cplusplus -#include "codec.h" -#include "media_reflector.h" - -namespace libdrm { -DECLARE_FACTORY(Encoder) -DECLARE_REFLECTOR(Encoder) - -#define DEFINE_ENCODER_FACTORY(REAL_PRODUCT, FINAL_EXPOSE_PRODUCT) \ - DEFINE_MEDIA_CHILD_FACTORY(REAL_PRODUCT, REAL_PRODUCT::GetCodecName(), FINAL_EXPOSE_PRODUCT, Encoder) \ - DEFINE_MEDIA_CHILD_FACTORY_EXTRA(REAL_PRODUCT) \ - DEFINE_MEDIA_NEW_PRODUCT_BY(REAL_PRODUCT, Encoder, Init() != true) - -class ParameterBuffer { -public: - ParameterBuffer(size_t st = sizeof(int)) : size(st), ptr(nullptr) { - if (sizeof(int) != st && st != 0) { - ptr = malloc(st); - if (!ptr) { - size = 0; - } - } - } - - ~ParameterBuffer() { - if (ptr) { - free(ptr); - } - } - - size_t GetSize() { - return size; - } - - int GetValue() { - return value; - } - - void SetValue(int v) { - value = v; - } - - void *GetPtr() { - return ptr; - } - - void SetPtr(void *data, size_t data_len) { - if (ptr && ptr != data) { - free(ptr); - } - - ptr = data; - size = data_len; - } - -private: - size_t size; - int value; - void *ptr; -}; - -class Encoder : public Codec { -public: - virtual ~Encoder() = default; - virtual bool InitConfig(const DrmMediaConfig &cfg) { - Codec::SetConfig(cfg); - return true; - } - - virtual bool CheckConfigChange(std::pair>) { - return true; - } -}; - -#define DEFINE_VIDEO_ENCODER_FACTORY(REAL_PRODUCT) \ - DEFINE_ENCODER_FACTORY(REAL_PRODUCT, VideoEncoder) - -class VideoEncoder : public Encoder { -public: - static const uint32_t kQPChange = (1 << 0); - static const uint32_t kFrameRateChange = (1 << 1); - static const uint32_t kBitRateChange = (1 << 2); - static const uint32_t kForceIdrFrame = (1 << 3); - static const uint32_t kOSDDataChange = (1 << 4); - static const uint32_t kOSDPltChange = (1 << 5); - static const uint32_t kMoveDetectionFlow = (1 << 6); - static const uint32_t kROICfgChange = (1 << 7); - static const uint32_t kRcModeChange = (1 << 8); - static const uint32_t kRcQualityChange = (1 << 9); - static const uint32_t kSplitChange = (1 << 10); - static const uint32_t kGopChange = (1 << 11); - static const uint32_t kGopModeChange = (1 << 12); - static const uint32_t kProfileChange = (1 << 13); - static const uint32_t kUserDataChange = (1 << 14); - static const uint32_t kResolutionChange = (1 << 15); - static const uint32_t kSuperFrmChange = (1 << 16); - static const uint32_t kRotationChange = (1 << 17); - static const uint32_t kEnableStatistics = (1 << 30); - static const uint32_t kGetFlag = (1 << 31); - - VideoEncoder() : codec_type(DRM_CODEC_TYPE_NONE) {} - virtual ~VideoEncoder() = default; - - void RequestChange(uint32_t change, std::shared_ptr value); - virtual void QueryChange(uint32_t change, void *value, int32_t size); - -protected: - bool HasChangeReq() { - std::lock_guard _lg(change_mtx); - return !change_list.empty(); - } - - std::pair> PeekChange(); - - DrmCodecType codec_type; - -private: - std::mutex change_mtx; - std::list>> change_list; - - DECLARE_PART_FINAL_EXPOSE_PRODUCT(Encoder) -}; - -#define DEFINE_AUDIO_ENCODER_FACTORY(REAL_PRODUCT) \ - DEFINE_ENCODER_FACTORY(REAL_PRODUCT, AudioEncoder) - -class AudioEncoder : public Encoder { -public: - AudioEncoder() : codec_type(DRM_CODEC_TYPE_NONE) {} - virtual ~AudioEncoder() = default; - - virtual int GetNbSamples() { - return 0; - } - -protected: - DrmCodecType codec_type; - - DECLARE_PART_FINAL_EXPOSE_PRODUCT(Encoder) -}; -} -#endif - -#endif diff --git a/project/3rdparty/include/media/utils/filter.h b/project/3rdparty/include/media/utils/filter.h deleted file mode 100644 index fce2a9d90..000000000 --- a/project/3rdparty/include/media/utils/filter.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef LIBDRM_DISPLAY_FILTER_H -#define LIBDRM_DISPLAY_FILTER_H - -#include -#include - -#include "control.h" -#include "media_reflector.h" - -namespace libdrm { -DECLARE_FACTORY(Filter) - -DECLARE_REFLECTOR(Filter) - -#define DEFINE_FILTER_FACTORY(REAL_PRODUCT, FINAL_EXPOSE_PRODUCT) \ - DEFINE_MEDIA_CHILD_FACTORY(REAL_PRODUCT, REAL_PRODUCT::GetFilterName(), FINAL_EXPOSE_PRODUCT, Filter) \ - DEFINE_MEDIA_CHILD_FACTORY_EXTRA(REAL_PRODUCT) \ - DEFINE_MEDIA_NEW_PRODUCT_BY(REAL_PRODUCT, Filter, GetError() < 0) - -#define DEFINE_COMMON_FILTER_FACTORY(REAL_PRODUCT) \ - DEFINE_FILTER_FACTORY(REAL_PRODUCT, Filter) - -class MediaBuffer; - -class Filter { -public: - virtual ~Filter() = 0; - - static const char *GetFilterName() { - return nullptr; - } - - virtual int Process(std::shared_ptr input, std::shared_ptr &output); - - virtual int SendInput(std::shared_ptr input); - virtual std::shared_ptr FetchOutput(); - - virtual int IoCtrl(unsigned long int request _DRM_UNUSED, ...) { - return -1; - } - - DEFINE_ERR_GETSET() - DECLARE_PART_FINAL_EXPOSE_PRODUCT(Filter) -}; -} - -#endif diff --git a/project/3rdparty/include/media/utils/flow.h b/project/3rdparty/include/media/utils/flow.h deleted file mode 100644 index ca7c33a4b..000000000 --- a/project/3rdparty/include/media/utils/flow.h +++ /dev/null @@ -1,383 +0,0 @@ -#ifndef LIBDRM_DISPLAY_FLOW_H -#define LIBDRM_DISPLAY_FLOW_H - -#include "lock.h" -#include "utils.h" -#include "message.h" -#include "reflector.h" - -#include - -#include -#include -#include -#include - -#include "control.h" - -namespace libdrm { -DECLARE_FACTORY(Flow) - -DECLARE_REFLECTOR(Flow) - -#define DEFINE_FLOW_FACTORY(REAL_PRODUCT, FINAL_EXPOSE_PRODUCT) \ - DEFINE_MEDIA_CHILD_FACTORY(REAL_PRODUCT, REAL_PRODUCT::GetFlowName(), FINAL_EXPOSE_PRODUCT, Flow) \ - DEFINE_MEDIA_CHILD_FACTORY_EXTRA(REAL_PRODUCT) \ - DEFINE_MEDIA_NEW_PRODUCT_BY(REAL_PRODUCT, FINAL_EXPOSE_PRODUCT, GetError() < 0) - -class MediaBuffer; -enum class Model { - NONE, - ASYNCCOMMON, - ASYNCATOMIC, - SYNC -}; - -enum class InputMode { - NONE, - BLOCKING, - DROPFRONT, - DROPCURRENT -}; - -enum class HoldInputMode { - NONE, - HOLD_INPUT, - INHERIT_FORM_INPUT -}; - -using MediaBufferVector = std::vector>; -using FunctionProcess = std::add_pointer::type; - -template -bool void_transaction(Flow *f, MediaBufferVector &input_vector); - -using LinkVideoHandler = std::add_pointer::type; -using LinkAudioHandler = std::add_pointer::type; -using LinkCaptureHandler = std::add_pointer::type; -using PlayVideoHandler = std::add_pointer::type; -using PlayAudioHandler = std::add_pointer::type; -using CallBackHandler = std::add_pointer::type; -using UserCallBack = std::add_pointer::type; -using OutputCallBack = std::add_pointer mb)>::type; -using EventCallBack = std::add_pointer::type; - -class SlotMap { -public: - SlotMap() : thread_model(Model::SYNC), mode_when_full(InputMode::DROPFRONT), process(nullptr), interval(16.66f) {} - - std::vector input_slots; - Model thread_model; - InputMode mode_when_full; - std::vector fetch_block; - std::vector input_maxcachenum; - std::vector output_slots; - std::vector hold_input; - FunctionProcess process; - float interval; -}; - -class FlowCoroutine; -class Flow { -public: - Flow(); - virtual ~Flow(); - - static const char *GetFlowName() { - return nullptr; - } - - const char *GetFlowTag() { - return flow_tag.c_str(); - } - - void SetFlowTag(std::string tag) { - flow_tag = tag; - } - - bool AddDownFlow(std::shared_ptr down, int out_slot_index, int in_slot_index_of_down); - void RemoveDownFlow(std::shared_ptr down); - - void SendInput(std::shared_ptr &input, int in_slot_index); - - void SetDisable() { - enable = false; - } - - virtual int Control(unsigned long int request _DRM_UNUSED, ...) { - return -1; - } - - virtual int SubControl(unsigned long int request, void *arg, int size = 0) { - SubRequest subreq = {request, size, arg}; - return Control(S_SUB_REQUEST, &subreq); - } - - virtual int GetInputSize() { - return 0; - } - - void RegisterEventHandler(std::shared_ptr flow, EventHook proc); - void UnRegisterEventHandler(); - void EventHookWait(); - - void NotifyToEventHandler(EventParamPtr param, int type = MESSAGE_TYPE_FIFO); - void NotifyToEventHandler(int id, int type = MESSAGE_TYPE_FIFO); - - MessagePtr GetEventMessage(); - EventParamPtr GetEventParam(MessagePtr msg); - - void SetVideoHandler(LinkVideoHandler hander) { - link_video_handler_ = hander; - } - - LinkVideoHandler GetVideoHandler() { - return link_video_handler_; - } - - void SetAudioHandler(LinkAudioHandler hander) { - link_audio_handler_ = hander; - } - - LinkAudioHandler GetAudioHandler() { - return link_audio_handler_; - } - - void SetCaptureHandler(LinkCaptureHandler hander) { - link_capture_handler_ = hander; - } - - LinkCaptureHandler GetCaptureHandler() { - return link_capture_handler_; - } - - void SetPlayVideoHandler(PlayVideoHandler handler) { - play_video_handler_ = handler; - } - - PlayVideoHandler GetPlayVideoHandler() { - return play_video_handler_; - } - - void SetPlayAudioHandler(PlayAudioHandler handler) { - play_audio_handler_ = handler; - } - - PlayAudioHandler GetPlayAudioHandler() { - return play_audio_handler_; - } - - void SetUserCallBack(CallBackHandler handler, UserCallBack callback) { - user_handler_ = handler; - user_callback_ = callback; - } - - void SetOutputCallBack(CallBackHandler handler, OutputCallBack callback) { - out_handler_ = handler; - out_callback_ = callback; - } - - void SetEventCallBack(CallBackHandler handler, EventCallBack callback) { - event_handler2_ = handler; - event_callback_ = callback; - } - - CallBackHandler GetUserHandler() { - return user_handler_; - } - - UserCallBack GetUserCallBack() { - return user_callback_; - } - - int SetInputFpsControl(int in, int out) { - if (!in || (out > in)) { - printf("Flow:%s: invalid fps(%d --> %d)\n", GetFlowTag(), in, out); - return -1; - } - - if ((in < 0) || (out < 0)) { - in = -1; - out = -1; - } - - fps_in = in; - fps_out = out; - fps_cnt = -1; - - return 0; - } - - int GetInputFpsControl(int &in, int &out) { - in = fps_in; - out = fps_out; - return 0; - } - - int SetRunTimes(int _run_times); - int GetRunTimesRemaining(); - - bool IsAllBuffEmpty(); - void DumpBase(std::string &dump_info); - - virtual void Dump(std::string &dump_info) { - DumpBase(dump_info); - } - - void StartStream(); - int GetCachedBufferNum(unsigned int &total, unsigned int &used); - void ClearCachedBuffers(); - -protected: - class FlowInputMap { - public: - FlowInputMap(std::shared_ptr &f, int i) : flow(f), index_of_in(i) {} - - std::shared_ptr flow; - int index_of_in; - - bool operator==(const std::shared_ptr f) { - return flow == f; - } - }; - - class FlowMap { - private: - void SetOutputBehavior(const std::shared_ptr &output); - void SetOutputToQueueBehavior(const std::shared_ptr &output); - - public: - FlowMap() : valid(false), hold_input(HoldInputMode::NONE) { - assert(list_mtx.valid); - } - - FlowMap(FlowMap &&); - - void Init(Model m, HoldInputMode hold_in); - - void AddFlow(std::shared_ptr flow, int index); - void RemoveFlow(std::shared_ptr flow); - - bool valid; - HoldInputMode hold_input; - - std::list flows; - ReadWriteLockMutex list_mtx; - std::deque> cached_buffers; - std::shared_ptr cached_buffer; - decltype(&FlowMap::SetOutputBehavior) set_output_behavior; - }; - - class Input { - private: - void SyncSendInputBehavior(std::shared_ptr &input); - void ASyncSendInputCommonBehavior(std::shared_ptr &input); - void ASyncSendInputAtomicBehavior(std::shared_ptr &input); - - bool ASyncFullBlockingBehavior(volatile bool &pred); - bool ASyncFullDropFrontBehavior(volatile bool &pred); - bool ASyncFullDropCurrentBehavior(volatile bool &pred); - - public: - Input() : valid(false), flow(nullptr), fetch_block(true) {} - Input(Input &&); - - void Init(Flow *f, Model m, int mcn, InputMode im, bool f_block, std::shared_ptr fc); - - bool valid; - Flow *flow; - Model thread_model; - bool fetch_block; - std::deque> cached_buffers; - ConditionLockMutex mtx; - int max_cache_num; - InputMode mode_when_full; - std::shared_ptr cached_buffer; - SpinLockMutex spin_mtx; - decltype(&Input::SyncSendInputBehavior) send_input_behavior; - decltype(&Input::ASyncFullBlockingBehavior) async_full_behavior; - std::shared_ptr coroutine; - }; - - int out_slot_num; - std::vector downflowmap; - int input_slot_num; - std::vector v_input; - std::list> coroutines; - std::shared_ptr source_start_cond_mtx; - - int down_flow_num; - bool waite_down_flow; - - bool SetAsSource(const std::vector &output_slots, FunctionProcess f, const std::string &mark); - bool InstallSlotMap(SlotMap &map, const std::string &mark, int exp_process_time); - bool SetOutput(const std::shared_ptr &output, int out_slot_index); - bool ParseWrapFlowParams(const char *param, std::map &flow_params, std::list &sub_param_list); - - void StopAllThread(); - - bool IsEnable() { - return enable; - } - - template - friend bool void_transaction(Flow *f, MediaBufferVector &input_vector) { - return f->SetOutput(input_vector[in_index], out_index); - } - - static const FunctionProcess void_transaction00; - -public: - CallBackHandler event_handler2_; - EventCallBack event_callback_; - - int fps_in; - int fps_out; - int fps_cnt; - -private: - volatile bool enable; - volatile bool quit; - ConditionLockMutex cond_mtx; - - std::unique_ptr event_handler_; - - friend class FlowCoroutine; - - LinkVideoHandler link_video_handler_; - LinkAudioHandler link_audio_handler_; - LinkCaptureHandler link_capture_handler_; - - PlayVideoHandler play_video_handler_; - PlayAudioHandler play_audio_handler_; - - CallBackHandler user_handler_; - UserCallBack user_callback_; - - CallBackHandler out_handler_; - OutputCallBack out_callback_; - - std::string flow_tag; - - int run_times; - - DEFINE_ERR_GETSET() - DECLARE_PART_FINAL_EXPOSE_PRODUCT(Flow) -}; - -#define FLOW_PARAM_SEPARATE_CHAR ' ' - -std::string gen_datatype_rule(std::map ¶ms); -Model GetModelByString(const std::string &model); - -InputMode GetInputModelByString(const std::string &in_model); -void ParseParamToSlotMap(std::map ¶ms, SlotMap &sm, int &input_maxcachenum); - -size_t FlowOutputHoldInput(std::shared_ptr &out_buffer, const MediaBufferVector &input_vector); -size_t FlowOutputInheritFromInput(std::shared_ptr &out_buffer, const MediaBufferVector &input_vector); - -std::string JoinFlowParam(const std::string &flow_param, size_t num_elem, ...); -std::list ParseFlowParamToList(const char *param); -} - -#endif diff --git a/project/3rdparty/include/media/utils/image.h b/project/3rdparty/include/media/utils/image.h deleted file mode 100644 index ed9782570..000000000 --- a/project/3rdparty/include/media/utils/image.h +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef LIBDRM_DISPLAY_IMAGE_H -#define LIBDRM_DISPLAY_IMAGE_H - -typedef enum { - DRM_PIX_FMT_NONE = -1, - DRM_PIX_FMT_YUV420P, - DRM_PIX_FMT_NV12, - DRM_PIX_FMT_NV21, - DRM_PIX_FMT_YUV422P, - DRM_PIX_FMT_NV16, - DRM_PIX_FMT_NV61, - DRM_PIX_FMT_YUYV422, - DRM_PIX_FMT_UYVY422, - DRM_PIX_FMT_YUV444SP, - DRM_PIX_FMT_RGB332, - DRM_PIX_FMT_RGB565, - DRM_PIX_FMT_BGR565, - DRM_PIX_FMT_RGB888, - DRM_PIX_FMT_BGR888, - DRM_PIX_FMT_ARGB8888, - DRM_PIX_FMT_ABGR8888, - DRM_PIX_FMT_RGBA8888, - DRM_PIX_FMT_BGRA8888, - - DRM_PIX_FMT_FBC0, - DRM_PIX_FMT_FBC2, - DRM_PIX_FMT_MJPEG, - - DRM_PIX_FMT_XRGB8888, - DRM_PIX_FMT_NB -} DrmPixelFormat; - -typedef struct { - DrmPixelFormat pix_fmt; - int width; - int height; - int vir_width; - int vir_height; -} DrmImageInfo; - -typedef struct { - int x, y; - int w, h; -} DrmImageRect; - -typedef struct { - int priv; - int x; - int y; - int w; - int h; - int color; - int offset; - unsigned char enable; - int id; -} DrmImageBorder; - -typedef struct { - int priv; - int x; - int y; - int w; - int h; - void *data; - DrmPixelFormat pix_fmt; - unsigned char enable; - int id; -} DrmImageOsd; - -typedef struct { - int x; - int y; - int w; - int h; - void *data; - DrmPixelFormat fmt; - unsigned char enable; -} DrmOsdInfo; - -#define REGION_LUMA_MAX 64 -typedef struct { - int priv; - unsigned int region_num; - DrmImageRect region[REGION_LUMA_MAX]; - unsigned long long luma_data[REGION_LUMA_MAX]; - int ms; - int offset; -} DrmImageRegionLuma; - -#include "utils.h" - -void GetPixFmtNumDen(const DrmPixelFormat &fmt, int &num, int &den); -int CalPixFmtSize(const DrmPixelFormat &fmt, const int width, const int height, int align = 0); - -inline int CalPixFmtSize(const DrmImageInfo &ii, int align = 0) -{ - return CalPixFmtSize(ii.pix_fmt, ii.vir_width, ii.vir_height, align); -} - -const char *PixFmtToString(DrmPixelFormat fmt); -DrmPixelFormat StringToPixFmt(const char *type); - -#include -#include -#include - -namespace libdrm { -std::string to_param_string(const DrmImageInfo &ii, bool input = true); -bool ParseImageInfoFromMap(std::map ¶ms, DrmImageInfo &ii, bool input = true); - -std::string TwoImageRectToString(const std::vector &src_dst); -std::vector StringToTwoImageRect(const std::string &str_rect); - -std::string ImageRectToString(const DrmImageRect &src_dst); -std::vector StringToImageRect(const std::string &str_rect); -} - -#endif diff --git a/project/3rdparty/include/media/utils/key_string.h b/project/3rdparty/include/media/utils/key_string.h deleted file mode 100644 index 64847469e..000000000 --- a/project/3rdparty/include/media/utils/key_string.h +++ /dev/null @@ -1,231 +0,0 @@ -#ifndef LIBDRM_DISPLAY_KEY_STRING_H -#define LIBDRM_DISPLAY_KEY_STRING_H - -#define _DRM_STR(s) #s -#define DRM_STR(s) _DRM_STR(s) - -#define DRM_KEY_PATH "path" -#define DRM_KEY_OPEN_MODE "mode" -#define DRM_KEY_SAVE_MODE "save_mode" -#define DRM_KEY_SAVE_MODE_SINGLE "single_frame" -#define DRM_KEY_SAVE_MODE_CONTIN "continuous_frame" -#define DRM_KEY_DEVICE "device" -#define DRM_KEY_CAMERA_ID "camera_id" - -#define DRM_KEY_NAME "name" -#define DRM_KEY_INPUTDATATYPE "input_data_type" -#define DRM_KEY_OUTPUTDATATYPE "output_data_type" - -#define DRM_KEY_PIXFMT "pixel_fomat" -#define DRM_KEY_BUFFER_WIDTH "width" -#define DRM_KEY_BUFFER_HEIGHT "height" -#define DRM_KEY_BUFFER_VIR_WIDTH "virtual_width" -#define DRM_KEY_BUFFER_VIR_HEIGHT "virtual_height" -#define DRM_KEY_CODECTYPE "codec_type" - -#define DRM_KEY_RECT_X "rect_x" -#define DRM_KEY_RECT_Y "rect_y" -#define DRM_KEY_RECT_W "rect_w" -#define DRM_KEY_RECT_H "rect_h" - -#define DRM_KEY_RIGHT_DIRECTION "->" -#define DRM_KEY_BUFFER_RECT "rect" -#define DRM_KEY_BUFFER_ROTATE "rotate" -#define DRM_KEY_BUFFER_FLIP "flip" - -#define DRM_KEY_COMPRESS_QP_INIT "qp_init" -#define DRM_KEY_COMPRESS_QP_STEP "qp_step" -#define DRM_KEY_COMPRESS_QP_MIN "qp_min" -#define DRM_KEY_COMPRESS_QP_MAX "qp_max" -#define DRM_KEY_COMPRESS_QP_MAX_I "qp_max_i" -#define DRM_KEY_COMPRESS_QP_MIN_I "qp_min_i" -#define DRM_KEY_COMPRESS_BITRATE "bitrate" -#define DRM_KEY_COMPRESS_BITRATE_MAX "bitrate_max" -#define DRM_KEY_COMPRESS_BITRATE_MIN "bitrate_min" - -#define DRM_KEY_FPS "framerate" -#define DRM_KEY_FPS_IN "framerate_in" -#define DRM_KEY_LEVEL "level" -#define DRM_KEY_VIDEO_GOP "gop" -#define DRM_KEY_PROFILE "profile" -#define DRM_KEY_ROTATION "rotation" -#define DRM_KEY_ENABLE_JPEG_DCF "jpeg_en_dcf" -#define DRM_KEY_JPEG_MPF_CNT "jpeg_mpf_cnt" -#define DRM_KEY_JPEG_MPF0_W "jpeg_mpf0_w" -#define DRM_KEY_JPEG_MPF0_H "jpeg_mpf0_h" -#define DRM_KEY_JPEG_MPF1_W "jpeg_mpf1_w" -#define DRM_KEY_JPEG_MPF1_H "jpeg_mpf1_h" -#define DRM_KEY_COMPRESS_RC_QUALITY "rc_quality" -#define DRM_KEY_COMPRESS_RC_MODE "rc_mode" -#define DRM_KEY_NEED_EXTRA_OUTPUT "need_extra_output" -#define DRM_KEY_NEED_EXTRA_MERGE "need_extra_merge" -#define DRM_KEY_FULL_RANGE "full_range" -#define DRM_KEY_H264_TRANS_8x8 "h264_trans_8x8" -#define DRM_KEY_SCALING_LIST "scaling_list" - -#define DRM_KEY_JPEG_QFACTOR "jpeg_qfactor" -#define DRM_KEY_ROI_REGIONS "roi_regions" - -#define DRM_KEY_LOWEST "lowest" -#define DRM_KEY_LOWER "lower" -#define DRM_KEY_LOW "low" -#define DRM_KEY_MEDIUM "medium" -#define DRM_KEY_HIGH "high" -#define DRM_KEY_HIGHER "higher" -#define DRM_KEY_HIGHEST "highest" - -#define DRM_KEY_FIXQP "fixqp" -#define DRM_KEY_VBR "vbr" -#define DRM_KEY_CBR "cbr" -#define DRM_KEY_AVBR "avbr" - -#define DRM_KEY_REF_FRM_CFG "reference_frame_config" - -#define DRM_KEY_MPP_GROUP_MAX_FRAMES "fg_max_frames" -#define DRM_KEY_MPP_SPLIT_MODE "split_mode" -#define DRM_KEY_OUTPUT_TIMEOUT "output_timeout" - -#define DRM_KEY_MD_SINGLE_REF "md_single_ref" -#define DRM_KEY_MD_ORI_WIDTH "md_orignal_width" -#define DRM_KEY_MD_ORI_HEIGHT "md_orignal_height" -#define DRM_KEY_MD_DS_WIDTH "md_down_scale_width" -#define DRM_KEY_MD_DS_HEIGHT "md_down_scale_height" -#define DRM_KEY_MD_ROI_CNT "md_roi_cnt" -#define DRM_KEY_MD_ROI_RECT "md_roi_rect" -#define DRM_KEY_MD_SENSITIVITY "md_sensitivity" - -#define DRM_KEY_OD_WIDTH "od_width" -#define DRM_KEY_OD_HEIGHT "od_height" -#define DRM_KEY_OD_ROI_CNT "od_roi_cnt" -#define DRM_KEY_OD_ROI_RECT "od_roi_rect" -#define DRM_KEY_OD_SENSITIVITY "od_sensitivity" - -#define DRM_KEY_SAMPLE_FMT "sample_format" -#define DRM_KEY_CHANNELS "channel_num" -#define DRM_KEY_SAMPLE_RATE "sample_rate" -#define DRM_KEY_FRAMES "frame_num" -#define DRM_KEY_FLOAT_QUALITY "compress_quality" -#define DRM_KEY_LAYOUT "layout" -#define DRM_KEY_VQE_ENABLE "vqe_enable" -#define DRM_KEY_VQE_MODE "vqe_mode" -#define DRM_KEY_VQE_OPEN_MASK "vqe_open_mask" -#define DRM_KEY_VQE_WORK_SAMPLE_RATE "vqe_work_sample_rate" -#define DRM_KEY_VQE_FRAME_SAMPLE "vqe_frame_sample" -#define DRM_KEY_VQE_PARAM_FILE_PATH "vqe_param_file_path" -#define DRM_KEY_ANR_POST_ADD_GAIN "anr_post_add_gain" -#define DRM_KEY_ANR_GMIN "gmin" -#define DRM_KEY_ANR_NOISE_FACTOR "noise_factor" - -#define DRM_KEY_USE_LIBV4L2 "use_libv4l2" -#define DRM_KEY_SUB_DEVICE "sub_device" -#define DRM_KEY_V4L2_CAP_TYPE "v4l2_capture_type" -#define DRM_KEY_V4L2_C_TYPE(t) DRM_STR(t) -#define DRM_KEY_V4L2_MEM_TYPE "v4l2_mem_type" -#define DRM_KEY_V4L2_M_TYPE(t) DRM_STR(t) -#define DRM_KEY_V4L2_COLORSPACE "v4l2_colorspace" -#define DRM_KEY_V4L2_QUANTIZATION "v4l2_quantization" -#define DRM_KEY_V4L2_CS(t) DRM_STR(t) - -#define DRM_KEY_PORT_NUM "portnum" -#define DRM_KEY_USERNAME "username" -#define DRM_KEY_USERPASSWORD "userpwd" -#define DRM_KEY_CHANNEL_NAME "channel_name" - -#define DRM_KEY_MEM_CNT "mem_cnt" -#define DRM_KEY_MEM_TYPE "mem_type" -#define DRM_KEY_MEM_ION "ion" -#define DRM_KEY_MEM_DRM "drm" -#define DRM_KEY_MEM_HARDWARE "hw_mem" - -#define DRM_KEY_MEM_SIZE_PERTIME "size_pertime" -#define DRM_KEY_LOOP_TIME "loop_time" - -#define DRM_KEK_THREAD_SYNC_MODEL "thread_model" -#define DRM_KEY_ASYNCCOMMON "asynccommon" -#define DRM_KEY_ASYNCATOMIC "asyncatomic" -#define DRM_KEY_SYNC "sync" - -#define DRM_KEK_INPUT_MODEL "input_model" -#define DRM_KEY_BLOCKING "blocking" -#define DRM_KEY_DROPFRONT "dropfront" -#define DRM_KEY_DROPCURRENT "dropcurrent" - -#define DRM_KEY_INPUT_CACHE_NUM "input_cache_num" -#define DRM_KEY_OUTPUT_CACHE_NUM "output_cache_num" - -#define DRM_KEY_OUTPUT_HOLD_INPUT "output_hold_input" - -#define DRM_KEY_FILE_PREFIX "file_prefix" -#define DRM_KEY_FILE_SUFFIX "file_suffix" -#define DRM_KEY_FILE_DURATION "file_duration" -#define DRM_KEY_FILE_INDEX "file_index" -#define DRM_KEY_FILE_TIME "file_time" -#define DRM_KEY_MUXER_ID "muxer_id" -#define DRM_KEY_MUXER_RKAUDIO_AVDICTIONARY "muxer_rkaudio_avdictionary" -#define DRM_KEY_ENABLE_STREAMING "enable_streaming" -#define DRM_KEY_PRE_RECORD_TIME "pre_record_time" -#define DRM_KEY_PRE_RECORD_CACHE_TIME "pre_record_cache_time" -#define DRM_KEY_PRE_RECORD_MODE "pre_record_mode" -#define DRM_KEY_LAPSE_RECORD "lapse_record" - -#define DRM_KEY_CONNECTOR_ID "connector_id" -#define DRM_KEY_CRTC_ID "crtc_id" -#define DRM_KEY_ENCODER_ID "encoder_id" -#define DRM_KEY_PLANE_ID "plane_id" -#define DRM_KEY_SKIP_PLANE_IDS "skip_plane_ids" -#define DRM_KEY_PLANE_TYPE "plane_type" -#define DRM_KEY_OVERLAY "Overlay" -#define DRM_KEY_PRIMARY "Primary" -#define DRM_KEY_CURSOR "Cursor" - -#define DRM_KEY_FB_ID "FB_ID" -#define DRM_KEY_CRTC_X "CRTC_X" -#define DRM_KEY_CRTC_Y "CRTC_Y" -#define DRM_KEY_CRTC_W "CRTC_W" -#define DRM_KEY_CRTC_H "CRTC_H" -#define DRM_KEY_SRC_X "SRC_X" -#define DRM_KEY_SRC_Y "SRC_Y" -#define DRM_KEY_SRC_W "SRC_W" -#define DRM_KEY_SRC_H "SRC_H" -#define DRM_KEY_ZPOS "ZPOS" -#define DRM_KEY_FEATURE "FEATURE" -#define DRM_KEY_ASYNC_COMMIT "ASYNC_COMMIT" - -#define DRM_KEY_DETECT_RECT "detect_rect" -#define DRM_KEY_OUTPUT_WANT_FLOAT "rknn_output_want_float" -#define DRM_KEY_TENSOR_TYPE "tensor_type" -#define DRM_KEY_TENSOR_FMT "tensor_fmt" -#define DRM_KEY_NCHW "NCHW" -#define DRM_KEY_NHWC "NHWC" -#define DRM_KEY_FACE_DETECT_TRACK_FRAME "track_frame" -#define DRM_KEY_FACE_DETECT_LANDMARK "detect_landmark" -#define DRM_KEY_NEED_HW_DRAW "need_hw_draw" -#define DRM_KEY_DRAW_RECT_THICK "draw_rect_thick" -#define DRM_KEY_DRAW_MIN_RECT "min_rect" -#define DRM_KEY_DRAW_OFFSET_X "offset_x" -#define DRM_KEY_DRAW_OFFSET_Y "offset_y" -#define DRM_KEY_FRAME_INTERVAL "frame_interval" -#define DRM_KEY_SCORE_THRESHOD "score_threshod" -#define DRM_KEY_FRAME_RATE "frame_rate" -#define DRM_KEY_FRAME_CACHES "frame_caches" -#define DRM_KEY_ENABLE "enable" -#define DRM_KEY_BODY_PERCENTAGE "percentage" -#define DRM_KEY_BODY_DURATION "duration" -#define DRM_KEY_ENBALE_FACE_DETECT "enable_face_detect" -#define DRM_KEY_ENABLE_FACE_REG "enable_face_reg" -#define DRM_KEY_CACHE_SIZE "cache_size" -#define DRM_KEY_CLOCK_DELTA "clock_delta" - -#define DRM_KEY_ROCKX_MODEL "rockx_model" -#define DRM_KEY_DB_PATH "db_path" - -#define DRM_KEY_ALLOW_THROUGH_COUNT "allow_through_count" - -#define DRM_KEY_UVC_EVENT_CODE "uvc_event_code" -#define DRM_KEY_UVC_WIDTH "uvc_width" -#define DRM_KEY_UVC_HEIGHT "uvc_height" -#define DRM_KEY_UVC_FORMAT "uvc_format" - -#define DRM_KEY_ROCKX_ASYNC_CALLBACK "aysnc_callback_enable" - -#endif diff --git a/project/3rdparty/include/media/utils/link_config.h b/project/3rdparty/include/media/utils/link_config.h deleted file mode 100644 index 54c733a5b..000000000 --- a/project/3rdparty/include/media/utils/link_config.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef LIBDRM_DISPLAY_LINK_CONFIG_H -#define LIBDRM_DISPLAY_LINK_CONFIG_H - -#include - -namespace libdrm { -enum LinkType { - LINK_NONE, - LINK_VIDEO, - LINK_AUDIO, - LINK_PICTURE -}; - -typedef struct linkvideo { - void *buffer_ptr; - unsigned int buffer_size; - time_t timestamp; - int nat_type; -} linkvideo_s; - -typedef struct linkaudio { - void *buffer_ptr; - unsigned int buffer_size; - time_t timestamp; -} linkaudio_s; - -typedef struct linkpicture { - void *buffer_ptr; - unsigned int buffer_size; - int type; - const char *id; -} linkpicture_s; - -typedef struct linkcommon { - int linktype; - union { - linkvideo_s video; - linkaudio_s audio; - linkpicture picture; - }; -} linkcommon_s; -} - -#endif diff --git a/project/3rdparty/include/media/utils/lock.h b/project/3rdparty/include/media/utils/lock.h deleted file mode 100644 index 2cf9ee260..000000000 --- a/project/3rdparty/include/media/utils/lock.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef LIBDRM_DISPLAY_LOCK_H -#define LIBDRM_DISPLAY_LOCK_H - -#include -#include - -#include -#include -#include - -namespace libdrm { -class LockMutex { -public: - LockMutex(); - virtual ~LockMutex(); - - virtual void lock() = 0; - virtual void unlock() = 0; - - virtual void wait() {}; - virtual void notify() {}; - - void locktimeinc(); - void locktimedec(); - -protected: - std::atomic_int lock_times; -}; - -class NonLockMutex : public LockMutex { -public: - virtual ~NonLockMutex() = default; - - virtual void lock() {} - virtual void unlock() {} -}; - -class ConditionLockMutex : public LockMutex { -public: - virtual ~ConditionLockMutex() = default; - - virtual void lock() override; - virtual void unlock() override; - - virtual void wait() override; - virtual void notify() override; - -private: - std::mutex mtx; - std::condition_variable_any cond; -}; - -class ReadWriteLockMutex : public LockMutex { -public: - ReadWriteLockMutex(); - virtual ~ReadWriteLockMutex(); - - virtual void lock() override; - virtual void unlock() override; - void read_lock(); - - bool valid; - -private: - pthread_rwlock_t rwlock; -}; - -class SpinLockMutex : public LockMutex { -public: - SpinLockMutex(); - virtual ~SpinLockMutex() = default; - - SpinLockMutex(const SpinLockMutex &) = delete; - SpinLockMutex &operator=(const SpinLockMutex &) = delete; - - virtual void lock() override; - virtual void unlock() override; - -private: - std::atomic_flag flag; -}; - -class AutoLockMutex { -public: - AutoLockMutex(LockMutex &lm) : m_lm(lm) { - m_lm.lock(); - } - - ~AutoLockMutex() { - m_lm.unlock(); - } - -private: - LockMutex &m_lm; -}; -} - -#endif diff --git a/project/3rdparty/include/media/utils/media_config.h b/project/3rdparty/include/media/utils/media_config.h deleted file mode 100644 index ce48953e7..000000000 --- a/project/3rdparty/include/media/utils/media_config.h +++ /dev/null @@ -1,219 +0,0 @@ -#ifndef LIBDRM_DISPLAY_MEDIA_CONFIG_H -#define LIBDRM_DISPLAY_MEDIA_CONFIG_H - -#include "flow.h" -#include "image.h" -#include "sound.h" -#include "media_type.h" - -typedef struct { - DrmImageInfo image_info; - DrmImageRect rect_info; - DrmCodecType codec_type; - - int qfactor; - int dcf; - int mpf_cnt; - int mpfw[2]; - int mpfh[2]; -} DrmImageConfig; - -typedef struct { - char *type; - uint32_t max_bps; - const char *rc_quality; - const char *rc_mode; - uint16_t fps; - uint16_t gop; - uint8_t profile; - uint8_t enc_levle; -} DrmVideoEncoderCfg; - -typedef struct { - int qp_init; - int qp_step; - int qp_min; - int qp_max; - int qp_min_i; - int qp_max_i; - int thrd_i[16]; - int thrd_p[16]; - int row_qp_delta_i; - int row_qp_delta_p; - int hier_qp_en; - int hier_qp_delta[4]; - int hier_frame_num[4]; -} DrmVideoEncoderQp; - -typedef struct { - DrmImageConfig image_cfg; - DrmVideoEncoderQp encode_qp; - int bit_rate; - int bit_rate_max; - int bit_rate_min; - int frame_rate; - int frame_rate_den; - int frame_in_rate; - int frame_in_rate_den; - int trans_8x8; - int level; - int gop_size; - int profile; - int full_range; - int ref_frm_cfg; - int rotation; - const char *rc_quality; - const char *rc_mode; - int scaling_list; -} DrmVideoConfig; - -typedef struct { - DrmSampleInfo sample_info; - DrmCodecType codec_type; - int bit_rate; - float quality; -} DrmAudioConfig; - -typedef struct { - union { - DrmVideoConfig vid_cfg; - DrmImageConfig img_cfg; - DrmAudioConfig aud_cfg; - }; - DrmType type; -} DrmMediaConfig; - -#define OSD_REGIONS_CNT 8 - -typedef enum { - REGION_TYPE_OVERLAY = 0, - REGION_TYPE_COVER, - REGION_TYPE_MOSAIC, - REGION_TYPE_OVERLAY_EX, - REGION_TYPE_COVER_EX, -} drm_region_type_e; - -typedef struct { - uint8_t *buffer; - uint32_t pos_x; - uint32_t pos_y; - uint32_t width; - uint32_t height; - uint32_t inverse; - uint32_t region_id; - uint8_t enable; - drm_region_type_e region_type; - uint32_t cover_color; -} DrmOsdRegionData; - -typedef struct { - uint16_t x; - uint16_t y; - uint16_t w; - uint16_t h; - uint16_t intra; - int16_t quality; - uint16_t qp_area_idx; - uint8_t area_map_en; - uint8_t abs_qp_en; -} DrmEncROIRegion; - -typedef enum { - GOP_MODE_NORMALP = 0, - GOP_MODE_TSVC2, - GOP_MODE_TSVC3, - GOP_MODE_TSVC4, - GOP_MODE_SMARTP, -} DrmEncGopMode; - -typedef struct { - DrmEncGopMode mode; - int gop_size; - int ip_qp_delta; - int interval; - int vi_qp_delta; -} DrmEncGopModeParam; - -typedef struct { - int width; - int height; - int vir_width; - int vir_height; - int x; - int y; - int w; - int h; -} DrmVideoResolutionCfg; - -typedef enum EncSuperFrmMode_ { - DRM_MEDIA_SUPERFRM_NONE = 0, - DRM_MEDIA_SUPERFRM_DISCARD, - DRM_MEDIA_SUPERFRM_REENCODE, - DRM_MEDIA_SUPERFRM_BUTT -} DrmEncSuperFrmMode; - -typedef enum VencRcPriority_ { - DRM_MEDIA_VENC_RC_PRIORITY_BITRATE_FIRST = 0, - DRM_MEDIA_VENC_RC_PRIORITY_FRAMEBITS_FIRST, - DRM_MEDIA_VENC_RC_PRIORITY_BUTT, -} DrmVencRcPriority; - -typedef struct VencSuperFrmCfg_ { - DrmEncSuperFrmMode SuperFrmMode; - unsigned int SuperIFrmBitsThr; - unsigned int SuperPFrmBitsThr; - DrmVencRcPriority RcPriority; -} DrmVencSuperFrmCfg; - -typedef struct RgaConfig_ { - DrmImageRect src_rect; - DrmImageRect dst_rect; - int rotation; - int flip; -} DrmRgaConfig; - -#include - -namespace libdrm { -extern const char *rc_mode_strings[4]; -extern const char *rc_quality_strings[7]; - -const char *ConvertRcQuality(const std::string &s); -const char *ConvertRcMode(const std::string &s); -bool ParseMediaConfigFromMap(std::map ¶ms, DrmMediaConfig &mc); - -std::vector StringToRoiRegions(const std::string &str_regions); -std::string to_param_string(const DrmImageConfig &img_cfg); -std::string to_param_string(const DrmVideoConfig &vid_cfg); -std::string to_param_string(const DrmAudioConfig &aud_cfg); -std::string to_param_string(const DrmMediaConfig &mc, const std::string &out_type); -std::string get_video_encoder_config_string(const DrmImageInfo &info, const DrmVideoEncoderCfg &cfg); -int video_encoder_set_bps(std::shared_ptr &enc_flow, unsigned int target, unsigned int min = 0, unsigned int max = 0); - -int video_encoder_set_rc_quality(std::shared_ptr &enc_flow, const char *rc_quality); -int video_encoder_set_rc_mode(std::shared_ptr &enc_flow, const char *rc_mode); -int video_encoder_set_qp(std::shared_ptr &enc_flow, DrmVideoEncoderQp &qps); -int video_encoder_get_qp(std::shared_ptr &enc_flow, DrmVideoEncoderQp &qps); -int video_encoder_force_idr(std::shared_ptr &enc_flow); -int video_encoder_set_fps(std::shared_ptr &enc_flow, uint8_t out_num, uint8_t out_den, uint8_t in_num = 0, uint8_t in_den = 0); -int video_encoder_set_osd_plt(std::shared_ptr &enc_flow, const uint32_t *yuv_plt); -int video_encoder_set_osd_region(std::shared_ptr &enc_flow, DrmOsdRegionData *region_data, int plane_cnt = 1); -int video_encoder_set_move_detection(std::shared_ptr &enc_flow, std::shared_ptr &md_flow); -int video_encoder_set_roi_regions(std::shared_ptr &enc_flow, DrmEncROIRegion *regions, int region_cnt); -int video_encoder_set_roi_regions(std::shared_ptr &enc_flow, std::string roi_param); -int video_encoder_set_gop_size(std::shared_ptr &enc_flow, int gop); -int video_encoder_set_resolution(std::shared_ptr &enc_flow, DrmVideoResolutionCfg *vid_cfg); -int video_encoder_set_rotation(std::shared_ptr &enc_flow, int rotation_cfg); -int video_move_detect_set_rects(std::shared_ptr &md_flow, DrmImageRect *rects, int rect_cnt); -int video_move_detect_set_rects(std::shared_ptr &md_flow, std::string rects_param); -int video_encoder_set_avc_profile(std::shared_ptr &enc_flow, int profile_idc, int level = 0); -int video_encoder_set_super_frame(std::shared_ptr &enc_flow, DrmVencSuperFrmCfg *super_frm_cfg); - -int video_encoder_set_split(std::shared_ptr &enc_flow, unsigned int mode, unsigned int size); -int video_encoder_set_gop_mode(std::shared_ptr &enc_flow, DrmEncGopModeParam *params); -int video_encoder_set_userdata(std::shared_ptr &enc_flow, void *data, int len, int all_frames = 0); -int video_encoder_enable_statistics(std::shared_ptr &enc_flow, int enable); -int jpeg_encoder_set_qfactor(std::shared_ptr &enc_flow, int qfactor); -} - -#endif diff --git a/project/3rdparty/include/media/utils/media_reflector.h b/project/3rdparty/include/media/utils/media_reflector.h deleted file mode 100644 index 07c733b1e..000000000 --- a/project/3rdparty/include/media/utils/media_reflector.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef LIBDRM_DISPLAY_MEDIA_REFLECTOR_H -#define LIBDRM_DISPLAY_MEDIA_REFLECTOR_H - -#include "key_string.h" -#include "reflector.h" - -#include -#include -#include -#include -#include - -#define DEFINE_MEDIA_CHILD_FACTORY(REAL_PRODUCT, IDENTIFIER, FINAL_EXPOSE_PRODUCT, PRODUCT) \ - DEFINE_CHILD_FACTORY(REAL_PRODUCT, IDENTIFIER, FINAL_EXPOSE_PRODUCT, PRODUCT, \ - public: \ - virtual bool AcceptRules(const std::map &maps) const override; \ - \ - static const char *ExpectedInputDataType(); \ - static const char *OutPutDataType(); \ - \ - ) - -#define DEFINE_MEDIA_CHILD_FACTORY_EXTRA(REAL_PRODUCT) \ - bool REAL_PRODUCT##Factory::AcceptRules(const std::map &maps) const { \ - static std::list expected_data_type_list; \ - static std::list out_data_type_list; \ - static const char *static_keys[] = {DRM_KEY_INPUTDATATYPE, DRM_KEY_OUTPUTDATATYPE, NULL}; \ - static const decltype(ExpectedInputDataType) *static_call[] = {&ExpectedInputDataType, &OutPutDataType, NULL}; \ - static std::list *static_list[] = {&expected_data_type_list, &out_data_type_list, NULL}; \ - const char **keys = static_keys; \ - const decltype(ExpectedInputDataType) **call = static_call; \ - std::list **list = static_list; \ - \ - while (*keys) { \ - try { \ - auto it = maps.find(*keys); \ - if (it == maps.end()) { \ - if ((*call)()) { \ - return false; \ - } \ - } else { \ - const std::string &value = it->second; \ - if (!value.empty() && !has_intersection(value.c_str(), (*call)(), *list)) { \ - return false; \ - } \ - } \ - } catch (const std::exception &e) { \ - printf("catch exception:[%s]\n", e.what()); \ - } \ - \ - ++keys; \ - ++call; \ - ++list; \ - } \ - \ - return true; \ - } - -#define DEFINE_MEDIA_NEW_PRODUCT_BY(REAL_PRODUCT, PRODUCT, COND) \ - std::shared_ptr FACTORY(REAL_PRODUCT)::NewProduct(const char *param) { \ - auto ret = std::make_shared(param); \ - if (ret && ret->COND) { \ - return nullptr; \ - } \ - \ - return ret; \ - } - -#endif diff --git a/project/3rdparty/include/media/utils/media_type.h b/project/3rdparty/include/media/utils/media_type.h deleted file mode 100644 index d107831d4..000000000 --- a/project/3rdparty/include/media/utils/media_type.h +++ /dev/null @@ -1,116 +0,0 @@ -#ifndef LIBDRM_DISPLAY_MEDIA_TYPE_H -#define LIBDRM_DISPLAY_MEDIA_TYPE_H - -#include "../drm_media_common.h" - -enum class DrmType { - None = -1, - Audio = 0, - Image, - Video, - Text -}; - -#define DRM_TYPENEAR(type) type "\n" - -#define DRM_TYPE_NOTHING nullptr -#define DRM_TYPE_ANYTHING "" - -#define DRM_IMAGE_PREFIX "image:" -#define DRM_IMAGE_GRAY8 "imamge:gray8" -#define DRM_IMAGE_GRAY16 "image:gray16" -#define DRM_IMAGE_YUV420P "image:yuv420p" -#define DRM_IMAGE_NV12 "image:nv12" -#define DRM_IMAGE_NV21 "image:nv21" -#define DRM_IMAGE_YV12 "image:yv12" -#define DRM_IMAGE_FBC2 "image:fbc2" -#define DRM_IMAGE_FBC0 "image:fbc0" -#define DRM_IMAGE_YUV422P "image:yuv422p" -#define DRM_IMAGE_NV16 "image:nv16" -#define DRM_IMAGE_NV61 "image:nv61" -#define DRM_IMAGE_YV16 "image:yv16" -#define DRM_IMAGE_YUYV422 "image:yuyv422" -#define DRM_IMAGE_UYVY422 "image:uyvy422" -#define DRM_IMAGE_YUV444SP "image:yuv444sp" -#define DRM_IMAGE_RGB332 "image:rgb332" -#define DRM_IMAGE_RGB565 "image:rgb565" -#define DRM_IMAGE_BGR565 "image:bgr565" -#define DRM_IMAGE_RGB888 "image:rgb888" -#define DRM_IMAGE_BGR888 "image:bgr888" -#define DRM_IMAGE_ARGB8888 "image:argb8888" -#define DRM_IMAGE_XRGB8888 "image:xrgb8888" -#define DRM_IMAGE_ABGR8888 "image:abgr8888" -#define DRM_IMAGE_RGBA8888 "image:rgba8888" -#define DRM_IMAGE_BGRA8888 "image:bgra8888" - -#define DRM_IMAGE_PREFIX "image:" -#define DRM_IMAGE_JPEG "image:jpeg" - -#define DRM_VIDEO_PREFIX "video:" -#define DRM_VIDEO_H264 "video:h264" -#define DRM_VIDEO_H265 "video:h265" -#define DRM_VIDEO_MJPEG "video:mjpeg" - -#define DRM_AUDIO_MP3 "audio:mp3" -#define DRM_AUDIO_MP2 "audio:mp2" -#define DRM_AUDIO_G711A "audio:g711a" -#define DRM_AUDIO_G711U "audio:g711U" -#define DRM_AUDIO_G726 "audio:g726" - -#define DRM_AUDIO_PREFIX "audio:" -#define DRM_AUDIO_PCM_U8 "audio:pcm_u8" -#define DRM_AUDIO_PCM_S16 "audio:pcm_s16" -#define DRM_AUDIO_PCM_S32 "audio:pcm_s32" -#define DRM_AUDIO_PCM_FLT "audio:pcm_flt" -#define DRM_AUDIO_PCM_U8P "audio:pcm_u8p" -#define DRM_AUDIO_PCM_S16P "audio:pcm_s16p" -#define DRM_AUDIO_PCM_S32P "audio:pcm_s32p" -#define DRM_AUDIO_PCM_FLTP "audio:pcm_fltp" -#define DRM_AUDIO_PCM_G711A "audio:pcm_g711a" -#define DRM_AUDIO_PCM_G711U "audio:pcm_g711u" - -#define DRM_AUDIO_PCM \ - DRM_TYPENEAR(DRM_AUDIO_PCM_U8) \ - DRM_TYPENEAR(DRM_AUDIO_PCM_S16) \ - DRM_TYPENEAR(DRM_AUDIO_PCM_S32) \ - DRM_TYPENEAR(DRM_AUDIO_PCM_FLT) \ - DRM_TYPENEAR(DRM_AUDIO_PCM_U8P) \ - DRM_TYPENEAR(DRM_AUDIO_PCM_S16P) \ - DRM_TYPENEAR(DRM_AUDIO_PCM_S32P) \ - DRM_TYPENEAR(DRM_AUDIO_PCM_FLTP) - -#define DRM_TEXT_PREFIX "text:" - -#define DRM_STREAM_OGG "stream:ogg" -#define DRM_STREAM_FILE "stream:file" - -#define DRM_NN_MODEL_PREFIX "nn_model:" -#define DRM_NN_FLOAT32 "nn:float32" -#define DRM_NN_FLOAT16 "nn:float16" -#define DRM_NN_INT8 "nn:int8" -#define DRM_NN_UINT8 "nn:uint8" -#define DRM_NN_INT16 "nn:int16" - -#define DRM_MUXER_MP4 "mp4" -#define DRM_MUXER_FLV "flv" -#define DRM_MUXER_F4V "f4v" -#define DRM_MUXER_MKV "mkv" -#define DRM_MUXER_AVI "avi" -#define DRM_MUXER_MPEG_TS "mpegts" -#define DRM_MUXER_MPEG_PS "mpeg" - -const char *CodecTypeToString(DrmCodecType fmt); -DrmCodecType StringToCodecType(const char *fmt_str); - -#include - -namespace libdrm { -DrmType StringToDataType(const char *data_type); - -class SupportMediaTypes { -public: - std::string types; -}; -} - -#endif diff --git a/project/3rdparty/include/media/utils/message.h b/project/3rdparty/include/media/utils/message.h deleted file mode 100644 index 059e6aaeb..000000000 --- a/project/3rdparty/include/media/utils/message.h +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef LIBDRM_DISPLAY_MESSAGE_H -#define LIBDRM_DISPLAY_MESSAGE_H - -#include -#include -#include - -#include -#include - -#include "lock.h" -#include "message_type.h" - -namespace libdrm { -class Flow; -class EventMessage; - -class EventParam { -public: - EventParam() = delete; - EventParam(int id, int param = 0) : id_(id), param_(param), params_(nullptr) {} - - ~EventParam() { - if (params_) { - free(params_); - params_ = nullptr; - } - } - - int SetParams(void *params, int size) { - if (params_) { - free(params_); - } - - params_ = params; - params_size_ = size; - return 0; - } - - int GetId() { - return id_; - } - - int GetParam() { - return param_; - } - - void *GetParams() { - return params_; - } - - int GetParamsSize() { - return params_size_; - } - -private: - int id_; - int param_; - void *params_; - int params_size_; -}; - -typedef std::shared_ptr EventParamPtr; - -class EventMessage { -public: - EventMessage(); - EventMessage(void *sender, EventParamPtr param, int type = 0) : sender_(sender), param_(param), type_(type) {} - ~EventMessage() {} - - void *GetSender() { - return sender_; - } - - EventParamPtr GetEventParam() { - return param_; - } - - int GetType() { - return type_; - } - -private: - void *sender_; - EventParamPtr param_; - int type_; -}; - -typedef int (*EventHook)(std::shared_ptr flow, bool &loop); -typedef std::shared_ptr MessagePtr; -typedef std::vector MessagePtrQueue; - -class EventHandler { -public: - EventHandler() {} - virtual ~EventHandler() {} - - void RegisterEventHook(std::shared_ptr flow, EventHook proc); - void UnRegisterEventHook(); - void EventHookWait(); - void SignalEventHook(); - - void CleanRepeatMessage(MessagePtr msg); - void InsertMessage(MessagePtr msg, bool front = false); - MessagePtr GetEventMessage(); - void NotifyToEventHandler(MessagePtr msg); - -private: - EventHook process_; - bool event_thread_loop_; - std::unique_ptr event_thread_; - MessagePtrQueue event_msgs_; - ConditionLockMutex event_cond_mtx_; - ReadWriteLockMutex event_queue_mtx_; -}; -} - -#endif diff --git a/project/3rdparty/include/media/utils/message_type.h b/project/3rdparty/include/media/utils/message_type.h deleted file mode 100644 index c73bfafa9..000000000 --- a/project/3rdparty/include/media/utils/message_type.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef LIBDRM_DISPLAY_MESSAGE_TYPE_H -#define LIBDRM_DISPLAY_MESSAGE_TYPE_H - -#define MSG_INFO_MASK 0x000000 -#define MSG_WARN_MASK 0x100000 -#define MSG_ERROR_MASK 0x200000 - -typedef enum { - MSG_FLOW_EVENT_INFO_UNKNOW = MSG_INFO_MASK, - MSG_FLOW_EVENT_INFO_EOS, - MSG_FLOW_EVENT_WARN_UNKNOW = MSG_WARN_MASK, - MSG_FLOW_EVENT_ERROR_UNKNOW = MSG_ERROR_MASK, -} DrmMessageId; - -typedef enum { - MUX_EVENT_STREAM_START = 0, - MUX_EVENT_STREAM_STOP, - MUX_EVENT_FILE_BEGIN, - MUX_EVENT_FILE_END, - MUX_EVENT_MANUAL_SPLIT_END, - MUX_EVENT_ERR_CREATE_FILE_FAIL, - MUX_EVENT_ERR_WRITE_FILE_FAIL, - MUX_EVENT_WARN_FILE_WRITING_SLOW, - MUX_EVENT_WARN_FILE_WRITING_NORMAL, - MUX_EVENT_BUTT -} DrmMuxerEventType; - -typedef struct { - DrmMuxerEventType type; - char file_name[256]; - int value; -} DrmMuxerEvent; - -typedef enum { - MESSAGE_TYPE_FIFO = 0, - MESSAGE_TYPE_LIFO, - MESSAGE_TYPE_UNIQUE -} DrmMessageType; - -#endif diff --git a/project/3rdparty/include/media/utils/muxer.h b/project/3rdparty/include/media/utils/muxer.h deleted file mode 100644 index 22e280433..000000000 --- a/project/3rdparty/include/media/utils/muxer.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef LIBDRM_DISPLAY_MUXER_H -#define LIBDRM_DISPLAY_MUXER_H - -#include "media_config.h" -#include "media_reflector.h" -#include "media_type.h" -#include "stream.h" - -namespace libdrm { -DECLARE_FACTORY(Muxer) - -DECLARE_REFLECTOR(Muxer) - -#define DEFINE_MUXER_FACTORY(REAL_PRODUCT, FINAL_EXPOSE_PRODUCT) \ - DEFINE_MEDIA_CHILD_FACTORY(REAL_PRODUCT, REAL_PRODUCT::GetMuxName(), FINAL_EXPOSE_PRODUCT, Muxer) \ - DEFINE_MEDIA_CHILD_FACTORY_EXTRA(REAL_PRODUCT) \ - DEFINE_MEDIA_NEW_PRODUCT_BY(REAL_PRODUCT, Muxer, Init() != true) - -#define DEFINE_COMMON_MUXER_FACTORY(REAL_PRODUCT) \ - DEFINE_MUXER_FACTORY(REAL_PRODUCT, Muxer) - -class MediaBuffer; - -class Encoder; -typedef int (*write_callback_func)(void *, uint8_t *, int); - -class Muxer { -public: - Muxer(const char *param); - virtual ~Muxer() = default; - - static const char *GetMuxName() { - return nullptr; - } - - virtual bool Init() = 0; - virtual bool IncludeEncoder() { - return false; - } - - virtual bool NewMuxerStream(const DrmMediaConfig &mc, const std::shared_ptr &enc_extra_data, int &stream_no) = 0; - - virtual bool SetIoStream(std::shared_ptr output) { - io_output = output; - return true; - } - - virtual bool SetWriteCallback(void *handler, write_callback_func callback) { - m_handler = handler; - m_write_callback_func = callback; - return true; - } - - virtual std::shared_ptr WriteHeader(int stream_no) = 0; - virtual std::shared_ptr Write(std::shared_ptr orig_data, int stream_no) = 0; - -protected: - std::shared_ptr io_output; - void *m_handler; - write_callback_func m_write_callback_func; - - DECLARE_PART_FINAL_EXPOSE_PRODUCT(Muxer) -}; -} - -#endif diff --git a/project/3rdparty/include/media/utils/reflector.h b/project/3rdparty/include/media/utils/reflector.h deleted file mode 100644 index 9af9cd679..000000000 --- a/project/3rdparty/include/media/utils/reflector.h +++ /dev/null @@ -1,252 +0,0 @@ -#ifndef LIBDRM_DISPLAY_REFLECTOR_H -#define LIBDRM_DISPLAY_REFLECTOR_H - -#include -#include -#include -#include -#include - -#include "utils.h" - -#define REFLECTOR(PRODUCT) PRODUCT##Reflector -#define FACTORY(PRODUCT) PRODUCT##Factory - -#define DECLARE_REFLECTOR(PRODUCT) \ - class PRODUCT; \ - class PRODUCT##Factory; \ - class PRODUCT##Reflector { \ - public: \ - static const char *FindFirstMatchIdentifier(const char *rules); \ - static bool IsMatch(const char *identifier, const char *rules); \ - \ - template \ - static std::shared_ptr Create(const char *request, const char *param = nullptr) { \ - /*try {*/ \ - if (!IsDerived::Result) { \ - printf("The template class type is not derived of required type\n"); \ - return nullptr; \ - } \ - \ - const char *identifier = PRODUCT##Factory::Parse(request); \ - if (!identifier) { \ - return nullptr; \ - } \ - \ - auto it = factories.find(identifier); \ - if (it != factories.end()) { \ - const PRODUCT##Factory *f = it->second; \ - if (!T::Compatible(f)) { \ - printf("%s is not compatible with the template\n", request); \ - return nullptr; \ - } \ - \ - return std::static_pointer_cast(const_cast(f)->NewProduct(param)); \ - } \ - \ - printf("%s is not Integrated\n", request); \ - return nullptr; \ - /*} catch (const std::exception &e) { \ - printf("[1] catch exception:[%s]\n", e.what()); \ - return nullptr; \ - }*/ \ - } \ - \ - static void RegisterFactory(std::string identifier, const PRODUCT##Factory *factory); \ - static void DumpFactories(); \ - \ - private: \ - PRODUCT##Reflector() = default; \ - ~PRODUCT##Reflector() = default; \ - PRODUCT##Reflector(const PRODUCT##Reflector &) = delete; \ - PRODUCT##Reflector &operator=(const PRODUCT##Reflector &) = delete; \ - \ - static std::map factories; \ - }; - -#define DEFINE_REFLECTOR(PRODUCT) \ - std::map PRODUCT##Reflector::factories; \ - const char *PRODUCT##Reflector::FindFirstMatchIdentifier(const char *rules) { \ - try { \ - for (auto &it : factories) { \ - const PRODUCT##Factory *f = it.second; \ - if (f->AcceptRules(rules)) { \ - return it.first.c_str(); \ - } \ - } \ - } catch (const std::exception &e) { \ - printf("[2] catch exception:[%s]\n", e.what()); \ - } \ - \ - return nullptr; \ - } \ - \ - bool PRODUCT##Reflector::IsMatch(const char *identifier, const char *rules) { \ - try { \ - auto it = factories.find(identifier); \ - if (it == factories.end()) { \ - printf("%s is not Integrated\n", identifier); \ - return false; \ - } \ - \ - return it->second->AcceptRules(rules); \ - } catch (const std::exception &e) { \ - printf("[3] catch exception:[%s]\n", e.what()); \ - return false; \ - } \ - } \ - \ - void PRODUCT##Reflector::RegisterFactory(std::string identifier, const PRODUCT##Factory *factory) { \ - try { \ - auto it = factories.find(identifier); \ - if (it == factories.end()) { \ - factories[identifier] = factory; \ - printf("register factory:[%s]\n", identifier.c_str()); \ - } else { \ - printf("repeated identifier:[%s]\n", identifier.c_str()); \ - } \ - } catch (const std::exception &e) { \ - printf("[4] catch exception:[%s]\n", e.what()); \ - } \ - } \ - \ - void PRODUCT##Reflector::DumpFactories() { \ - printf("\n%s:\n", #PRODUCT); \ - for (auto &it : factories) { \ - printf(" %s", it.first.c_str()); \ - } \ - printf("\n\n"); \ - } - -#define DECLARE_FACTORY(PRODUCT) \ - class PRODUCT; \ - class PRODUCT##Factory { \ - public: \ - virtual const char *Identifier() const = 0; \ - static const char *Parse(const char *request); \ - virtual std::shared_ptr NewProduct(const char *param) = 0; \ - \ - bool AcceptRules(const char *rules) const { \ - std::map maps; \ - if (!parse_media_param_map(rules, maps)) { \ - return false; \ - } \ - \ - return AcceptRules(maps); \ - } \ - \ - virtual bool AcceptRules(const std::map &maps) const = 0; \ - \ - protected: \ - PRODUCT##Factory() = default; \ - virtual ~PRODUCT##Factory() = default; \ - \ - private: \ - PRODUCT##Factory(const PRODUCT##Factory &) = delete; \ - PRODUCT##Factory &operator=(const PRODUCT##Factory &) = delete; \ - }; - -#define DEFINE_FACTORY_COMMON_PARSE(PRODUCT) \ - const char *PRODUCT##Factory::Parse(const char *request) { \ - return request; \ - } - -#define FACTORY_IDENTIFIER_DEFINITION(IDENTIFIER) \ - const char *Identifier() const override { \ - return IDENTIFIER; \ - } - -#define FACTORY_INSTANCE_DEFINITION(FACTORY) \ - static const FACTORY &Instance() { \ - static const FACTORY object; \ - return object; \ - } - -#define FACTORY_REGISTER(FACTORY, REFLECTOR, FINAL_EXPOSE_PRODUCT) \ - class Register_##FACTORY { \ - public: \ - Register_##FACTORY() { \ - const FACTORY &obj = FACTORY::Instance(); \ - REFLECTOR::RegisterFactory(obj.Identifier(), &obj); \ - FINAL_EXPOSE_PRODUCT::RegisterFactory(&obj); \ - } \ - }; \ - Register_##FACTORY reg_##FACTORY; - -#define DEFINE_ERR_GETSET() \ - protected: \ - class ErrGetSet { \ - public: \ - ErrGetSet() : err_val(0) {} \ - \ - void Set(int val) { \ - err_val = val; \ - } \ - \ - int Get() { \ - return err_val; \ - } \ - \ - private: \ - int err_val; \ - }; \ - ErrGetSet IErr; \ - \ - public: \ - void SetError(int val) { \ - IErr.Set(val); \ - } \ - \ - int GetError() { \ - return IErr.Get(); \ - } - -#define DECLARE_PART_FINAL_EXPOSE_PRODUCT(PRODUCT) \ - public: \ - static bool Compatible(const PRODUCT##Factory *factory); \ - static void RegisterFactory(const PRODUCT##Factory *factory); \ - \ - private: \ - static std::list compatiable_factories; - -#define DEFINE_PART_FINAL_EXPOSE_PRODUCT(FINAL_EXPOSE_PRODUCT, PRODUCT) \ - std::list FINAL_EXPOSE_PRODUCT::compatiable_factories; \ - bool FINAL_EXPOSE_PRODUCT::Compatible(const PRODUCT##Factory *factory) { \ - try { \ - auto it = std::find(compatiable_factories.begin(), compatiable_factories.end(), factory); \ - if (it != compatiable_factories.end()) { \ - return true; \ - } \ - } catch (const std::exception &e) { \ - printf("[5] catch exception:[%s]\n", e.what()); \ - } \ - return false; \ - } \ - \ - void FINAL_EXPOSE_PRODUCT::RegisterFactory(const PRODUCT##Factory *factory) { \ - try { \ - auto it = std::find(compatiable_factories.begin(), compatiable_factories.end(), factory); \ - if (it == compatiable_factories.end()) { \ - compatiable_factories.push_back(factory); \ - } \ - } catch (const std::exception &e) { \ - printf("[6] catch exception:[%s]\n", e.what()); \ - } \ - } - -#define DEFINE_CHILD_FACTORY(REAL_PRODUCT, IDENTIFIER, FINAL_EXPOSE_PRODUCT, PRODUCT, EXTRA_CODE) \ - class REAL_PRODUCT##Factory : public PRODUCT##Factory { \ - public: \ - FACTORY_IDENTIFIER_DEFINITION(IDENTIFIER) \ - std::shared_ptr NewProduct(const char *param) override; \ - FACTORY_INSTANCE_DEFINITION(REAL_PRODUCT##Factory) \ - \ - private: \ - REAL_PRODUCT##Factory() = default; \ - ~REAL_PRODUCT##Factory() = default; \ - EXTRA_CODE \ - }; \ - \ - FACTORY_REGISTER(REAL_PRODUCT##Factory, PRODUCT##Reflector, FINAL_EXPOSE_PRODUCT) - -#endif diff --git a/project/3rdparty/include/media/utils/rga_filter.h b/project/3rdparty/include/media/utils/rga_filter.h deleted file mode 100644 index 9393490cf..000000000 --- a/project/3rdparty/include/media/utils/rga_filter.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef LIBDRM_DISPLAY_RGA_FILTER_H -#define LIBDRM_DISPLAY_RGA_FILTER_H - -#include - -#include "image.h" -#include "buffer.h" -#include "filter.h" - -#if defined(CONFIG_RKRGA) -#if defined(CONFIG_RKRGA_OLD) -#include -#include -#include -#else -#include -#include -#include -#endif -#endif - -namespace libdrm { -class ImageBuffer; - -typedef enum { - FLIP_NULL, - FLIP_H, - FLIP_V, - FLIP_HV -} FlipEnum; - -class RgaFilter : public Filter { -public: - RgaFilter(const char *param); - virtual ~RgaFilter(); - - static const char *GetFilterName() { - return "rkrga"; - } - - virtual int Process(std::shared_ptr input, std::shared_ptr &output) override; - - void SetRects(std::vector vec_rect); - - static RockchipRga gRkRga; - virtual int IoCtrl(unsigned long int request _DRM_UNUSED, ...) override; - -private: - unsigned int src_max_width; - unsigned int src_max_height; - unsigned int dst_max_width; - unsigned int dst_max_height; - ConditionLockMutex param_mtx; - std::vector vec_rect; - int rotate; - FlipEnum flip; - std::vector lines; - int hide; - std::map osds; - std::mutex luma_mutex; - std::condition_variable luma_cond; - DrmImageRegionLuma region_luma; -}; - -int rga_blit(std::shared_ptr src, std::shared_ptr dst, std::vector &lines, std::map osds, DrmImageRegionLuma *region_luma, DrmImageRect *src_rect = nullptr, DrmImageRect *dst_rect = nullptr, int rotate = 0, FlipEnum flip = FLIP_NULL, int hide = 0); -int get_rga_format(DrmPixelFormat f); -} - -#endif diff --git a/project/3rdparty/include/media/utils/sound.h b/project/3rdparty/include/media/utils/sound.h deleted file mode 100644 index 0b4eb7576..000000000 --- a/project/3rdparty/include/media/utils/sound.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef LIBDRM_DISPLAY_SOUND_H -#define LIBDRM_DISPLAY_SOUND_H - -#include - -#include "utils.h" -#include "../drm_media_common.h" - -typedef struct { - DrmSampleFormat fmt; - int channels; - int sample_rate; - int nb_samples; -} DrmSampleInfo; - -const char *SampleFmtToString(DrmSampleFormat fmt); -DrmSampleFormat StringToSampleFmt(const char *fmt_str); - -bool SampleInfoIsValid(const DrmSampleInfo &sample_info); -size_t GetSampleSize(const DrmSampleInfo &sample_info); - -#include -#include - -namespace libdrm { -bool ParseSampleInfoFromMap(std::map ¶ms, DrmSampleInfo &si); -std::string to_param_string(const DrmSampleInfo &si); -} - -#endif diff --git a/project/3rdparty/include/media/utils/stream.h b/project/3rdparty/include/media/utils/stream.h deleted file mode 100644 index fdb1ada2d..000000000 --- a/project/3rdparty/include/media/utils/stream.h +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef LIBDRM_DISPLAY_STREAM_H -#define LIBDRM_DISPLAY_STREAM_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -typedef struct { - int (*close)(void *stream); - size_t (*read)(void *ptr, size_t size, size_t nmemb, void *stream); - size_t (*write)(const void *ptr, size_t size, size_t nmemb, void *stream); - int (*seek)(void *stream, int64_t offset, int whence); - long (*tell)(void *stream); -} StreamOperation; -} -#endif - -#include "control.h" -#include "image.h" -#include "media_reflector.h" -#include "utils.h" - -namespace libdrm { -DECLARE_FACTORY(Stream) - -DECLARE_REFLECTOR(Stream) - -#define DEFINE_STREAM_FACTORY(REAL_PRODUCT, FINAL_EXPOSE_PRODUCT) \ - DEFINE_MEDIA_CHILD_FACTORY(REAL_PRODUCT, REAL_PRODUCT::GetStreamName(), FINAL_EXPOSE_PRODUCT, Stream) \ - DEFINE_MEDIA_CHILD_FACTORY_EXTRA(REAL_PRODUCT) \ - DEFINE_MEDIA_NEW_PRODUCT_BY(REAL_PRODUCT, FINAL_EXPOSE_PRODUCT, Open() < 0) - -class MediaBuffer; - -int local_close(void *stream); - -class Stream { -public: - static StreamOperation c_operations; - - Stream() : readable(false), writeable(false), seekable(false) {} - virtual ~Stream() = default; - - virtual size_t Read(void *ptr, size_t size, size_t nmemb) = 0; - virtual size_t Write(const void *ptr, size_t size, size_t nmemb) = 0; - - virtual int Seek(int64_t offset, int whence) = 0; - virtual long Tell() = 0; - - virtual int NewStream(std::string new_path _DRM_UNUSED) { - return -1; - }; - - virtual size_t WriteAndClose(const void *ptr _DRM_UNUSED, size_t size _DRM_UNUSED, size_t nmemb _DRM_UNUSED) { - return -1; - }; - - virtual int ReName(std::string old_path _DRM_UNUSED, std::string new_path _DRM_UNUSED) { - return -1; - }; - - virtual bool Readable() { - return readable; - } - - virtual bool Writeable() { - return writeable; - } - - virtual bool Seekable() { - return seekable; - } - - void SetReadable(bool able) { - readable = able; - } - - void SetWriteable(bool able) { - writeable = able; - } - - void SetSeekable(bool able) { - seekable = able; - } - - virtual bool Eof() { - return false; - } - - virtual std::shared_ptr Read() { - return nullptr; - } - - virtual bool Write(std::shared_ptr) { - return false; - } - - virtual int IoCtrl(unsigned long int request _DRM_UNUSED, ...) { - return -1; - } - - virtual int SubIoCtrl(unsigned long int request _DRM_UNUSED, void *arg, int size = 0) { - SubRequest subreq = {request, size, arg}; - return IoCtrl(S_SUB_REQUEST, &subreq); - } - - bool ReadImage(void *ptr, const DrmImageInfo &info); - -protected: - virtual int Open() = 0; - virtual int Close() = 0; - - friend int local_close(void *stream); - -private: - bool readable; - bool writeable; - bool seekable; - - DECLARE_PART_FINAL_EXPOSE_PRODUCT(Stream) -}; -} - -#endif diff --git a/project/3rdparty/include/media/utils/utils.h b/project/3rdparty/include/media/utils/utils.h deleted file mode 100644 index 61cc25394..000000000 --- a/project/3rdparty/include/media/utils/utils.h +++ /dev/null @@ -1,242 +0,0 @@ -#ifndef LIBDRM_DISPLAY_UTILS_H -#define LIBDRM_DISPLAY_UTILS_H - -#include -#include - -#include "../drm_media_common.h" - -#define DRM_LOG_LEVEL_ERR 0 -#define DRM_LOG_LEVEL_WARN 1 -#define DRM_LOG_LEVEL_INFO 2 -#define DRM_LOG_LEVEL_DEBUG 3 - -#ifndef MOD_TAG -#define MOD_TAG MOD_ID_SYS -#endif - -#define _DRM_UNUSED __attribute__((unused)) -#define DRM_UNUSED(x) (void)x - -#define DRM_UPALIGNTO(value, align) ((value + align - 1) & (~(align - 1))) -#define DRM_UPALIGNTO16(value) DRM_UPALIGNTO(value, 16) -#define DRM_DOWNALIGNTO16(value) (DRM_UPALIGNTO(value, 16) - 16) - -#ifndef ARRAY_ELEMS -#define ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) -#endif - -#define MATH_LOG2(x) (31 - __builtin_clz((x) | 1)) - -#ifndef PAGE_SIZE -#define PAGE_SIZE (sysconf(_SC_PAGESIZE)) -#endif - -#define DRM_DUMP_FOURCC(f) f & 0xFF, (f >> 8) & 0xFF, (f >> 16) & 0xFF, (f >> 24) & 0xFF - -#define DRM_VALUE_MAX(A, B) ((A) > (B) ? (A) : (B)) -#define DRM_VALUE_MIN(A, B) ((A) < (B) ? (A) : (B)) -#define DRM_VALUE_SCOPE_CHECK(X, MIN, MAX) assert((X >= MIN) && (X <= MAX)) - -extern int drm_media_log_method; -extern short g_level_list[MOD_ID_BUTT]; - -#define DRM_LOG_LEVEL_JUDGE(FILTER_LEVEL) \ - { \ - if (g_level_list[MOD_TAG] < FILTER_LEVEL) { \ - break; \ - } \ - } - -#define DRM_MEDIA_LOGE(format, ...) \ - do { \ - DRM_LOG_LEVEL_JUDGE(DRM_LOG_LEVEL_ERR); \ - fprintf(stderr, "\033[1;31m[MEDIA][E]: " format "\033[0m\n", ##__VA_ARGS__); \ - } while (0); - -#define DRM_MEDIA_LOGW(format, ...) \ - do { \ - DRM_LOG_LEVEL_JUDGE(DRM_LOG_LEVEL_ERR); \ - fprintf(stderr, "\033[1;33m[MEDIA][W]: " format "\033[0m\n", ##__VA_ARGS__); \ - } while (0); - -#define DRM_MEDIA_LOGI(format, ...) \ - do { \ - DRM_LOG_LEVEL_JUDGE(DRM_LOG_LEVEL_ERR); \ - fprintf(stderr, "\033[1;32m[MEDIA][I]: " format "\033[0m\n", ##__VA_ARGS__); \ - } while (0); - -#define DRM_MEDIA_LOGD(format, ...) \ - do { \ - DRM_LOG_LEVEL_JUDGE(DRM_LOG_LEVEL_ERR); \ - fprintf(stderr, "\033[1;34m[MEDIA][D]: " format "\033[0m\n", ##__VA_ARGS__); \ - } while (0); - -void drm_log_init(); -void drm_log_exit(); - -#define DRM_LOG_MEMORY() \ - DRM_MEDIA_LOGI("no memory %s:%04d", __FUNCTION__, __LINE__) - -#define DRM_FILE_FUNC_LINE() \ - DRM_MEDIA_LOGI("%s -> %s:%04d", __FILE__, __FUNCTION__, __LINE__) - -#define DRM_TODO() \ - DRM_MEDIA_LOGI("Todo: %s -> %s:%04d", __FILE__, __FUNCTION__, __LINE__) - -template -class IsDerived { -public: - static int t(TBase *base) { - return 1; - } - - static char t(void *t2) { - return 0; - } - - static const bool Result = (sizeof(int) == sizeof(t((T *)nullptr))); -}; - -#include -#include -#include -#include - -namespace libdrm { -#define GET_STRING_TO_INT(var, map, key, defalut) \ - if (!map[key].empty()) { \ - var = std::stoi(map[key]); \ - } else { \ - var = defalut; \ - } - -#define CHECK_EMPTY_SETERRNO_RETURN(v_type, v, map, k, seterrno, ret) \ - v_type v = map[k]; \ - if (v.empty()) { \ - DRM_MEDIA_LOGE("%s: miss %s", __func__, k); \ - seterrno; \ - return ret; \ - } - -#define CHECK_EMPTY(v, map, k) \ - CHECK_EMPTY_SETERRNO_RETURN(, v, map, k, , false) - -#define CHECK_EMPTY_WITH_DECLARE(v_type, v, map, k) \ - CHECK_EMPTY_SETERRNO_RETURN(v_type, v, map, k, , false) - -#define CHECK_EMPTY_SETERRNO(v, map, k, err) \ - CHECK_EMPTY_SETERRNO_RETURN(, v, map, k, errno = err, ) - -#define PARAM_STRING_APPEND(s, s1, s2) \ - s.append(s1 "=").append(s2).append("\n") - -#define PARAM_STRING_APPEND_TO(s, s1, s2) \ - s.append(s1 "=").append(std::to_string(s2)).append("\n") - -#define PARAM_STRING_APPEND_PARAM_STRING(p1, p2) \ - p1.append(" ").append(p2) - -#define FIND_ENTRY_TARGET(INPUT, MAP, KEY, TARGET) \ - for (size_t i = 0; i < ARRAY_ELEMS(MAP); i++) { \ - if (INPUT == MAP[i].KEY) { \ - return MAP[i].TARGET; \ - } \ - } - -#define FIND_ENTRY_TARGET_BY_STRCMP(INPUT, MAP, KEY, TARGET) \ - if (INPUT) { \ - for (size_t i = 0; i < ARRAY_ELEMS(MAP); i++) { \ - if (!strcmp(INPUT, MAP[i].KEY)) { \ - return MAP[i].TARGET; \ - } \ - } \ - } - -#define CALL_MEMBER_FN(object, ptrToMember) \ - ((object).*(ptrToMember)) - -bool parse_media_param_map(const char *param, std::map &map); -bool parse_media_param_list(const char *param, std::list &list, const char delim = '\n'); -int parse_media_param_match(const char *param, std::map &map, std::list> &list); - -bool has_intersection(const char *str, const char *expect, std::list *expect_list); - -std::string get_media_value_by_key(const char *param, const char *key); - -bool string_end_withs(std::string const &fullString, std::string const &ending); -bool string_start_withs(std::string const &fullString, std::string const &starting); - -inline int64_t gettimeofday() -{ - std::chrono::microseconds us = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()); - return us.count(); -} - -inline void msleep(int ms) -{ - std::this_thread::sleep_for(std::chrono::milliseconds(ms)); -} - -inline void usleep(int us) -{ - std::this_thread::sleep_for(std::chrono::microseconds(us)); -} - -typedef int (*Ioctl_f)(int fd, unsigned long int request, ...); -inline int xioctl(Ioctl_f f, int fd, int request, void *argp) -{ - int r; - - do - r = f(fd, request, argp); - while ((-1 == r) && (EINTR == errno)); - - return r; -} - -bool DumpToFile(std::string path, const char *ptr, size_t len); - -class AutoDuration { -public: - AutoDuration() { - Reset(); - } - - int64_t Get() { - return (gettimeofday() - start); - } - - void Reset() { - start = gettimeofday(); - } - - int64_t GetAndReset() { - int64_t now = gettimeofday(); - int64_t pretime = start; - - start = now; - return (now - pretime); - } - -private: - int64_t start; -}; - -class AutoPrintLine { -public: -public: - AutoPrintLine(const char *f) : func(f) { - DRM_MEDIA_LOGD("Enter %s", f); - } - - ~AutoPrintLine() { - DRM_MEDIA_LOGD("Exit %s", func); - } - -private: - const char *func; -}; -} - -#endif diff --git a/project/3rdparty/include/nlohmann/fifomap.hpp b/project/3rdparty/include/nlohmann/fifomap.hpp deleted file mode 100644 index 951096337..000000000 --- a/project/3rdparty/include/nlohmann/fifomap.hpp +++ /dev/null @@ -1,334 +0,0 @@ -#ifndef NLOHMANN_FIFO_MAP_HPP -#define NLOHMANN_FIFO_MAP_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace nlohmann { -template -class fifo_map_compare { -public: - fifo_map_compare(std::unordered_map *keys, std::size_t timestamp = 1) : m_timestamp(timestamp), m_keys(keys) {} - - bool operator()(const Key &lhs, const Key &rhs) const { - const auto timestamp_lhs = m_keys->find(lhs); - const auto timestamp_rhs = m_keys->find(rhs); - - if (timestamp_lhs == m_keys->end()) { - return false; - } - - if (timestamp_rhs == m_keys->end()) { - return true; - } - - return (timestamp_lhs->second < timestamp_rhs->second); - } - - void add_key(const Key& key) { - m_keys->insert({key, m_timestamp++}); - } - - void remove_key(const Key& key) { - m_keys->erase(key); - } - -private: - template friend class fifo_map; - -private: - std::size_t m_timestamp = 1; - std::unordered_map *m_keys = nullptr; -}; - -template , class Allocator = std::allocator>> -class fifo_map { -public: - using key_type = Key; - using mapped_type = T; - using value_type = std::pair; - using size_type = std::size_t; - using difference_type = std::ptrdiff_t; - using key_compare = Compare; - using allocator_type = Allocator; - using reference = value_type&; - using const_reference = const value_type&; - using pointer = typename std::allocator_traits::pointer; - using const_pointer = typename std::allocator_traits::const_pointer; - - using internal_map_type = std::map; - - using iterator = typename internal_map_type::iterator; - using const_iterator = typename internal_map_type::const_iterator; - using reverse_iterator = typename internal_map_type::reverse_iterator; - using const_reverse_iterator = typename internal_map_type::const_reverse_iterator; - -public: - fifo_map() : m_keys(), m_compare(&m_keys), m_map(m_compare) {} - fifo_map(const fifo_map &f) : m_keys(f.m_keys), m_compare(&m_keys, f.m_compare.m_timestamp), m_map(f.m_map.begin(), f.m_map.end(), m_compare) {} - - template - fifo_map(InputIterator first, InputIterator last) : m_keys(), m_compare(&m_keys), m_map(m_compare) { - for (auto it = first; it != last; ++it) { - insert(*it); - } - } - - fifo_map(std::initializer_list init) : fifo_map() { - for (auto x : init) { - insert(x); - } - } - - T &at(const Key &key) { - return m_map.at(key); - } - - const T &at(const Key &key) const { - return m_map.at(key); - } - - T &operator[](const Key &key) { - m_compare.add_key(key); - return m_map[key]; - } - - T &operator[](Key &&key) { - m_compare.add_key(key); - return m_map[key]; - } - - iterator begin() noexcept { - return m_map.begin(); - } - - iterator end() noexcept { - return m_map.end(); - } - - const_iterator begin() const noexcept { - return m_map.begin(); - } - - const_iterator end() const noexcept { - return m_map.end(); - } - - const_iterator cbegin() const noexcept { - return m_map.cbegin(); - } - - const_iterator cend() const noexcept { - return m_map.cend(); - } - - reverse_iterator rbegin() noexcept { - return m_map.rbegin(); - } - - reverse_iterator rend() noexcept { - return m_map.rend(); - } - - const_reverse_iterator rbegin() const noexcept { - return m_map.rbegin(); - } - - const_reverse_iterator rend() const noexcept { - return m_map.rend(); - } - - const_reverse_iterator crbegin() const noexcept { - return m_map.crbegin(); - } - - const_reverse_iterator crend() const noexcept { - return m_map.crend(); - } - - bool empty() const noexcept { - return m_map.empty(); - } - - size_type size() const noexcept { - return m_map.size(); - } - - size_type max_size() const noexcept { - return m_map.max_size(); - } - - void clear() noexcept { - m_map.clear(); - m_keys.clear(); - } - - std::pair insert(const value_type &value) { - m_compare.add_key(value.first); - return m_map.insert(value); - } - - template - std::pair insert(P &&value) { - m_compare.add_key(value.first); - return m_map.insert(value); - } - - iterator insert(const_iterator hint, const value_type &value) { - m_compare.add_key(value.first); - return m_map.insert(hint, value); - } - - iterator insert(const_iterator hint, value_type&& value) { - m_compare.add_key(value.first); - return m_map.insert(hint, value); - } - - template - void insert(InputIt first, InputIt last) { - for (const_iterator it = first; it != last; ++it) { - m_compare.add_key(it->first); - } - - m_map.insert(first, last); - } - - void insert(std::initializer_list ilist) { - for (auto value : ilist) { - m_compare.add_key(value.first); - } - - m_map.insert(ilist); - } - - template - std::pair emplace(Args && ... args) { - typename fifo_map::value_type value(std::forward(args)...); - m_compare.add_key(value.first); - return m_map.emplace(std::move(value)); - } - - template - iterator emplace_hint(const_iterator hint, Args&& ... args) { - typename fifo_map::value_type value(std::forward(args)...); - m_compare.add_key(value.first); - return m_map.emplace_hint(hint, std::move(value)); - } - - iterator erase(const_iterator pos) { - m_compare.remove_key(pos->first); - return m_map.erase(pos); - } - - iterator erase(const_iterator first, const_iterator last) { - for (const_iterator it = first; it != last; ++it) { - m_compare.remove_key(it->first); - } - - return m_map.erase(first, last); - } - - size_type erase(const key_type& key) { - size_type res = m_map.erase(key); - - if (res > 0) { - m_compare.remove_key(key); - } - - return res; - } - - void swap(fifo_map &other) { - std::swap(m_map, other.m_map); - std::swap(m_compare, other.m_compare); - std::swap(m_keys, other.m_keys); - } - - size_type count(const Key &key) const { - return m_map.count(key); - } - - iterator find(const Key& key) { - return m_map.find(key); - } - - const_iterator find(const Key& key) const { - return m_map.find(key); - } - - std::pair equal_range(const Key &key) { - return m_map.equal_range(key); - } - - std::pair equal_range(const Key &key) const { - return m_map.equal_range(key); - } - - iterator lower_bound(const Key &key) { - return m_map.lower_bound(key); - } - - const_iterator lower_bound(const Key &key) const { - return m_map.lower_bound(key); - } - - iterator upper_bound(const Key& key) { - return m_map.upper_bound(key); - } - - const_iterator upper_bound(const Key& key) const { - return m_map.upper_bound(key); - } - - key_compare key_comp() const { - return m_compare; - } - - friend bool operator==(const fifo_map &lhs, const fifo_map &rhs) { - return (lhs.m_map == rhs.m_map); - } - - friend bool operator!=(const fifo_map &lhs, const fifo_map &rhs) { - return (lhs.m_map != rhs.m_map); - } - - friend bool operator<(const fifo_map &lhs, const fifo_map &rhs) { - return (lhs.m_map < rhs.m_map); - } - - friend bool operator<=(const fifo_map &lhs, const fifo_map &rhs) { - return (lhs.m_map <= rhs.m_map); - } - - friend bool operator>(const fifo_map &lhs, const fifo_map &rhs) { - return (lhs.m_map > rhs.m_map); - } - - friend bool operator>=(const fifo_map &lhs, const fifo_map &rhs) { - return (lhs.m_map >= rhs.m_map); - } - -private: - std::unordered_map m_keys; - Compare m_compare; - internal_map_type m_map; -}; -} - -namespace std { -template -inline void swap(nlohmann::fifo_map &m1, nlohmann::fifo_map &m2) -{ - m1.swap(m2); -} -} - -#endif \ No newline at end of file diff --git a/project/3rdparty/include/nlohmann/json.hpp b/project/3rdparty/include/nlohmann/json.hpp deleted file mode 100755 index 08dc2c236..000000000 --- a/project/3rdparty/include/nlohmann/json.hpp +++ /dev/null @@ -1,24651 +0,0 @@ -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - -/****************************************************************************\ - * Note on documentation: The source files contain links to the online * - * documentation of the public API at https://json.nlohmann.me. This URL * - * contains the most recent documentation and should also be applicable to * - * previous versions; documentation for deprecated functions is not * - * removed, but marked deprecated. See "Generate documentation" section in * - * file docs/README.md. * -\****************************************************************************/ - -#ifndef INCLUDE_NLOHMANN_JSON_HPP_ -#define INCLUDE_NLOHMANN_JSON_HPP_ - -#include // all_of, find, for_each -#include // nullptr_t, ptrdiff_t, size_t -#include // hash, less -#include // initializer_list -#ifndef JSON_NO_IO - #include // istream, ostream -#endif // JSON_NO_IO -#include // random_access_iterator_tag -#include // unique_ptr -#include // string, stoi, to_string -#include // declval, forward, move, pair, swap -#include // vector - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT -#include "fifomap.hpp" - - -#include - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -// This file contains all macro definitions affecting or depending on the ABI - -#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK - #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH) - #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 2 - #warning "Already included a different version of the library!" - #endif - #endif -#endif - -#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum) -#define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum) -#define NLOHMANN_JSON_VERSION_PATCH 2 // NOLINT(modernize-macro-to-enum) - -#ifndef JSON_DIAGNOSTICS - #define JSON_DIAGNOSTICS 0 -#endif - -#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON - #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0 -#endif - -#if JSON_DIAGNOSTICS - #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag -#else - #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS -#endif - -#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON - #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp -#else - #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON -#endif - -#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION - #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0 -#endif - -// Construct the namespace ABI tags component -#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b -#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \ - NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) - -#define NLOHMANN_JSON_ABI_TAGS \ - NLOHMANN_JSON_ABI_TAGS_CONCAT( \ - NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \ - NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON) - -// Construct the namespace version component -#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \ - _v ## major ## _ ## minor ## _ ## patch -#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \ - NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) - -#if NLOHMANN_JSON_NAMESPACE_NO_VERSION -#define NLOHMANN_JSON_NAMESPACE_VERSION -#else -#define NLOHMANN_JSON_NAMESPACE_VERSION \ - NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \ - NLOHMANN_JSON_VERSION_MINOR, \ - NLOHMANN_JSON_VERSION_PATCH) -#endif - -// Combine namespace components -#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b -#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \ - NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) - -#ifndef NLOHMANN_JSON_NAMESPACE -#define NLOHMANN_JSON_NAMESPACE \ - nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \ - NLOHMANN_JSON_ABI_TAGS, \ - NLOHMANN_JSON_NAMESPACE_VERSION) -#endif - -#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN -#define NLOHMANN_JSON_NAMESPACE_BEGIN \ - namespace nlohmann \ - { \ - inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \ - NLOHMANN_JSON_ABI_TAGS, \ - NLOHMANN_JSON_NAMESPACE_VERSION) \ - { -#endif - -#ifndef NLOHMANN_JSON_NAMESPACE_END -#define NLOHMANN_JSON_NAMESPACE_END \ - } /* namespace (inline namespace) NOLINT(readability/namespace) */ \ - } // namespace nlohmann -#endif - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include // transform -#include // array -#include // forward_list -#include // inserter, front_inserter, end -#include // map -#include // string -#include // tuple, make_tuple -#include // is_arithmetic, is_same, is_enum, underlying_type, is_convertible -#include // unordered_map -#include // pair, declval -#include // valarray - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include // nullptr_t -#include // exception -#if JSON_DIAGNOSTICS - #include // accumulate -#endif -#include // runtime_error -#include // to_string -#include // vector - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include // array -#include // size_t -#include // uint8_t -#include // string - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include // declval, pair -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN -namespace detail -{ - -template struct make_void -{ - using type = void; -}; -template using void_t = typename make_void::type; - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - - -NLOHMANN_JSON_NAMESPACE_BEGIN -namespace detail -{ - -// https://en.cppreference.com/w/cpp/experimental/is_detected -struct nonesuch -{ - nonesuch() = delete; - ~nonesuch() = delete; - nonesuch(nonesuch const&) = delete; - nonesuch(nonesuch const&&) = delete; - void operator=(nonesuch const&) = delete; - void operator=(nonesuch&&) = delete; -}; - -template class Op, - class... Args> -struct detector -{ - using value_t = std::false_type; - using type = Default; -}; - -template class Op, class... Args> -struct detector>, Op, Args...> -{ - using value_t = std::true_type; - using type = Op; -}; - -template class Op, class... Args> -using is_detected = typename detector::value_t; - -template class Op, class... Args> -struct is_detected_lazy : is_detected { }; - -template class Op, class... Args> -using detected_t = typename detector::type; - -template class Op, class... Args> -using detected_or = detector; - -template class Op, class... Args> -using detected_or_t = typename detected_or::type; - -template class Op, class... Args> -using is_detected_exact = std::is_same>; - -template class Op, class... Args> -using is_detected_convertible = - std::is_convertible, To>; - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - -// #include - - -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-FileCopyrightText: 2016-2021 Evan Nemerson -// SPDX-License-Identifier: MIT - -/* Hedley - https://nemequ.github.io/hedley - * Created by Evan Nemerson - */ - -#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 15) -#if defined(JSON_HEDLEY_VERSION) - #undef JSON_HEDLEY_VERSION -#endif -#define JSON_HEDLEY_VERSION 15 - -#if defined(JSON_HEDLEY_STRINGIFY_EX) - #undef JSON_HEDLEY_STRINGIFY_EX -#endif -#define JSON_HEDLEY_STRINGIFY_EX(x) #x - -#if defined(JSON_HEDLEY_STRINGIFY) - #undef JSON_HEDLEY_STRINGIFY -#endif -#define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x) - -#if defined(JSON_HEDLEY_CONCAT_EX) - #undef JSON_HEDLEY_CONCAT_EX -#endif -#define JSON_HEDLEY_CONCAT_EX(a,b) a##b - -#if defined(JSON_HEDLEY_CONCAT) - #undef JSON_HEDLEY_CONCAT -#endif -#define JSON_HEDLEY_CONCAT(a,b) JSON_HEDLEY_CONCAT_EX(a,b) - -#if defined(JSON_HEDLEY_CONCAT3_EX) - #undef JSON_HEDLEY_CONCAT3_EX -#endif -#define JSON_HEDLEY_CONCAT3_EX(a,b,c) a##b##c - -#if defined(JSON_HEDLEY_CONCAT3) - #undef JSON_HEDLEY_CONCAT3 -#endif -#define JSON_HEDLEY_CONCAT3(a,b,c) JSON_HEDLEY_CONCAT3_EX(a,b,c) - -#if defined(JSON_HEDLEY_VERSION_ENCODE) - #undef JSON_HEDLEY_VERSION_ENCODE -#endif -#define JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision)) - -#if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR) - #undef JSON_HEDLEY_VERSION_DECODE_MAJOR -#endif -#define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000) - -#if defined(JSON_HEDLEY_VERSION_DECODE_MINOR) - #undef JSON_HEDLEY_VERSION_DECODE_MINOR -#endif -#define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000) - -#if defined(JSON_HEDLEY_VERSION_DECODE_REVISION) - #undef JSON_HEDLEY_VERSION_DECODE_REVISION -#endif -#define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000) - -#if defined(JSON_HEDLEY_GNUC_VERSION) - #undef JSON_HEDLEY_GNUC_VERSION -#endif -#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__) - #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) -#elif defined(__GNUC__) - #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0) -#endif - -#if defined(JSON_HEDLEY_GNUC_VERSION_CHECK) - #undef JSON_HEDLEY_GNUC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_GNUC_VERSION) - #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_MSVC_VERSION) - #undef JSON_HEDLEY_MSVC_VERSION -#endif -#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000) && !defined(__ICL) - #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100) -#elif defined(_MSC_FULL_VER) && !defined(__ICL) - #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10) -#elif defined(_MSC_VER) && !defined(__ICL) - #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0) -#endif - -#if defined(JSON_HEDLEY_MSVC_VERSION_CHECK) - #undef JSON_HEDLEY_MSVC_VERSION_CHECK -#endif -#if !defined(JSON_HEDLEY_MSVC_VERSION) - #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) - #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch))) -#elif defined(_MSC_VER) && (_MSC_VER >= 1200) - #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch))) -#else - #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor))) -#endif - -#if defined(JSON_HEDLEY_INTEL_VERSION) - #undef JSON_HEDLEY_INTEL_VERSION -#endif -#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && !defined(__ICL) - #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE) -#elif defined(__INTEL_COMPILER) && !defined(__ICL) - #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0) -#endif - -#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK) - #undef JSON_HEDLEY_INTEL_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_INTEL_VERSION) - #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_INTEL_CL_VERSION) - #undef JSON_HEDLEY_INTEL_CL_VERSION -#endif -#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && defined(__ICL) - #define JSON_HEDLEY_INTEL_CL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER, __INTEL_COMPILER_UPDATE, 0) -#endif - -#if defined(JSON_HEDLEY_INTEL_CL_VERSION_CHECK) - #undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_INTEL_CL_VERSION) - #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_CL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_PGI_VERSION) - #undef JSON_HEDLEY_PGI_VERSION -#endif -#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__) - #define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__) -#endif - -#if defined(JSON_HEDLEY_PGI_VERSION_CHECK) - #undef JSON_HEDLEY_PGI_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_PGI_VERSION) - #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_SUNPRO_VERSION) - #undef JSON_HEDLEY_SUNPRO_VERSION -#endif -#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000) - #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), (__SUNPRO_C & 0xf) * 10) -#elif defined(__SUNPRO_C) - #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf) -#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000) - #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), (__SUNPRO_CC & 0xf) * 10) -#elif defined(__SUNPRO_CC) - #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf) -#endif - -#if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK) - #undef JSON_HEDLEY_SUNPRO_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_SUNPRO_VERSION) - #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) - #undef JSON_HEDLEY_EMSCRIPTEN_VERSION -#endif -#if defined(__EMSCRIPTEN__) - #define JSON_HEDLEY_EMSCRIPTEN_VERSION JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__) -#endif - -#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK) - #undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) - #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_ARM_VERSION) - #undef JSON_HEDLEY_ARM_VERSION -#endif -#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION) - #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100) -#elif defined(__CC_ARM) && defined(__ARMCC_VERSION) - #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100) -#endif - -#if defined(JSON_HEDLEY_ARM_VERSION_CHECK) - #undef JSON_HEDLEY_ARM_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_ARM_VERSION) - #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_IBM_VERSION) - #undef JSON_HEDLEY_IBM_VERSION -#endif -#if defined(__ibmxl__) - #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__) -#elif defined(__xlC__) && defined(__xlC_ver__) - #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff) -#elif defined(__xlC__) - #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0) -#endif - -#if defined(JSON_HEDLEY_IBM_VERSION_CHECK) - #undef JSON_HEDLEY_IBM_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_IBM_VERSION) - #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_VERSION) - #undef JSON_HEDLEY_TI_VERSION -#endif -#if \ - defined(__TI_COMPILER_VERSION__) && \ - ( \ - defined(__TMS470__) || defined(__TI_ARM__) || \ - defined(__MSP430__) || \ - defined(__TMS320C2000__) \ - ) -#if (__TI_COMPILER_VERSION__ >= 16000000) - #define JSON_HEDLEY_TI_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) -#endif -#endif - -#if defined(JSON_HEDLEY_TI_VERSION_CHECK) - #undef JSON_HEDLEY_TI_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_VERSION) - #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CL2000_VERSION) - #undef JSON_HEDLEY_TI_CL2000_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__) - #define JSON_HEDLEY_TI_CL2000_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CL2000_VERSION_CHECK) - #undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CL2000_VERSION) - #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL2000_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CL430_VERSION) - #undef JSON_HEDLEY_TI_CL430_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__) - #define JSON_HEDLEY_TI_CL430_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CL430_VERSION_CHECK) - #undef JSON_HEDLEY_TI_CL430_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CL430_VERSION) - #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL430_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) - #undef JSON_HEDLEY_TI_ARMCL_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && (defined(__TMS470__) || defined(__TI_ARM__)) - #define JSON_HEDLEY_TI_ARMCL_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK) - #undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) - #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_ARMCL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CL6X_VERSION) - #undef JSON_HEDLEY_TI_CL6X_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C6X__) - #define JSON_HEDLEY_TI_CL6X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CL6X_VERSION_CHECK) - #undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CL6X_VERSION) - #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL6X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CL7X_VERSION) - #undef JSON_HEDLEY_TI_CL7X_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__C7000__) - #define JSON_HEDLEY_TI_CL7X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CL7X_VERSION_CHECK) - #undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CL7X_VERSION) - #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL7X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) - #undef JSON_HEDLEY_TI_CLPRU_VERSION -#endif -#if defined(__TI_COMPILER_VERSION__) && defined(__PRU__) - #define JSON_HEDLEY_TI_CLPRU_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) -#endif - -#if defined(JSON_HEDLEY_TI_CLPRU_VERSION_CHECK) - #undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) - #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CLPRU_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_CRAY_VERSION) - #undef JSON_HEDLEY_CRAY_VERSION -#endif -#if defined(_CRAYC) - #if defined(_RELEASE_PATCHLEVEL) - #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL) - #else - #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0) - #endif -#endif - -#if defined(JSON_HEDLEY_CRAY_VERSION_CHECK) - #undef JSON_HEDLEY_CRAY_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_CRAY_VERSION) - #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_IAR_VERSION) - #undef JSON_HEDLEY_IAR_VERSION -#endif -#if defined(__IAR_SYSTEMS_ICC__) - #if __VER__ > 1000 - #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000)) - #else - #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(__VER__ / 100, __VER__ % 100, 0) - #endif -#endif - -#if defined(JSON_HEDLEY_IAR_VERSION_CHECK) - #undef JSON_HEDLEY_IAR_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_IAR_VERSION) - #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_TINYC_VERSION) - #undef JSON_HEDLEY_TINYC_VERSION -#endif -#if defined(__TINYC__) - #define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100) -#endif - -#if defined(JSON_HEDLEY_TINYC_VERSION_CHECK) - #undef JSON_HEDLEY_TINYC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_TINYC_VERSION) - #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_DMC_VERSION) - #undef JSON_HEDLEY_DMC_VERSION -#endif -#if defined(__DMC__) - #define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf) -#endif - -#if defined(JSON_HEDLEY_DMC_VERSION_CHECK) - #undef JSON_HEDLEY_DMC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_DMC_VERSION) - #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_COMPCERT_VERSION) - #undef JSON_HEDLEY_COMPCERT_VERSION -#endif -#if defined(__COMPCERT_VERSION__) - #define JSON_HEDLEY_COMPCERT_VERSION JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100) -#endif - -#if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK) - #undef JSON_HEDLEY_COMPCERT_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_COMPCERT_VERSION) - #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_PELLES_VERSION) - #undef JSON_HEDLEY_PELLES_VERSION -#endif -#if defined(__POCC__) - #define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0) -#endif - -#if defined(JSON_HEDLEY_PELLES_VERSION_CHECK) - #undef JSON_HEDLEY_PELLES_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_PELLES_VERSION) - #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_MCST_LCC_VERSION) - #undef JSON_HEDLEY_MCST_LCC_VERSION -#endif -#if defined(__LCC__) && defined(__LCC_MINOR__) - #define JSON_HEDLEY_MCST_LCC_VERSION JSON_HEDLEY_VERSION_ENCODE(__LCC__ / 100, __LCC__ % 100, __LCC_MINOR__) -#endif - -#if defined(JSON_HEDLEY_MCST_LCC_VERSION_CHECK) - #undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_MCST_LCC_VERSION) - #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_MCST_LCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_GCC_VERSION) - #undef JSON_HEDLEY_GCC_VERSION -#endif -#if \ - defined(JSON_HEDLEY_GNUC_VERSION) && \ - !defined(__clang__) && \ - !defined(JSON_HEDLEY_INTEL_VERSION) && \ - !defined(JSON_HEDLEY_PGI_VERSION) && \ - !defined(JSON_HEDLEY_ARM_VERSION) && \ - !defined(JSON_HEDLEY_CRAY_VERSION) && \ - !defined(JSON_HEDLEY_TI_VERSION) && \ - !defined(JSON_HEDLEY_TI_ARMCL_VERSION) && \ - !defined(JSON_HEDLEY_TI_CL430_VERSION) && \ - !defined(JSON_HEDLEY_TI_CL2000_VERSION) && \ - !defined(JSON_HEDLEY_TI_CL6X_VERSION) && \ - !defined(JSON_HEDLEY_TI_CL7X_VERSION) && \ - !defined(JSON_HEDLEY_TI_CLPRU_VERSION) && \ - !defined(__COMPCERT__) && \ - !defined(JSON_HEDLEY_MCST_LCC_VERSION) - #define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION -#endif - -#if defined(JSON_HEDLEY_GCC_VERSION_CHECK) - #undef JSON_HEDLEY_GCC_VERSION_CHECK -#endif -#if defined(JSON_HEDLEY_GCC_VERSION) - #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) -#else - #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0) -#endif - -#if defined(JSON_HEDLEY_HAS_ATTRIBUTE) - #undef JSON_HEDLEY_HAS_ATTRIBUTE -#endif -#if \ - defined(__has_attribute) && \ - ( \ - (!defined(JSON_HEDLEY_IAR_VERSION) || JSON_HEDLEY_IAR_VERSION_CHECK(8,5,9)) \ - ) -# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute) -#else -# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE) - #undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE -#endif -#if defined(__has_attribute) - #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) -#else - #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE) - #undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE -#endif -#if defined(__has_attribute) - #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) -#else - #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE) - #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE -#endif -#if \ - defined(__has_cpp_attribute) && \ - defined(__cplusplus) && \ - (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) - #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute) -#else - #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0) -#endif - -#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS) - #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS -#endif -#if !defined(__cplusplus) || !defined(__has_cpp_attribute) - #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) -#elif \ - !defined(JSON_HEDLEY_PGI_VERSION) && \ - !defined(JSON_HEDLEY_IAR_VERSION) && \ - (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \ - (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0)) - #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute) -#else - #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE) - #undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE -#endif -#if defined(__has_cpp_attribute) && defined(__cplusplus) - #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) -#else - #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE) - #undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE -#endif -#if defined(__has_cpp_attribute) && defined(__cplusplus) - #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) -#else - #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_HAS_BUILTIN) - #undef JSON_HEDLEY_HAS_BUILTIN -#endif -#if defined(__has_builtin) - #define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin) -#else - #define JSON_HEDLEY_HAS_BUILTIN(builtin) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN) - #undef JSON_HEDLEY_GNUC_HAS_BUILTIN -#endif -#if defined(__has_builtin) - #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) -#else - #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_BUILTIN) - #undef JSON_HEDLEY_GCC_HAS_BUILTIN -#endif -#if defined(__has_builtin) - #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) -#else - #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_HAS_FEATURE) - #undef JSON_HEDLEY_HAS_FEATURE -#endif -#if defined(__has_feature) - #define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature) -#else - #define JSON_HEDLEY_HAS_FEATURE(feature) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE) - #undef JSON_HEDLEY_GNUC_HAS_FEATURE -#endif -#if defined(__has_feature) - #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) -#else - #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_FEATURE) - #undef JSON_HEDLEY_GCC_HAS_FEATURE -#endif -#if defined(__has_feature) - #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) -#else - #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_HAS_EXTENSION) - #undef JSON_HEDLEY_HAS_EXTENSION -#endif -#if defined(__has_extension) - #define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension) -#else - #define JSON_HEDLEY_HAS_EXTENSION(extension) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION) - #undef JSON_HEDLEY_GNUC_HAS_EXTENSION -#endif -#if defined(__has_extension) - #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) -#else - #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_EXTENSION) - #undef JSON_HEDLEY_GCC_HAS_EXTENSION -#endif -#if defined(__has_extension) - #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) -#else - #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE) - #undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE -#endif -#if defined(__has_declspec_attribute) - #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute) -#else - #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE) - #undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE -#endif -#if defined(__has_declspec_attribute) - #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) -#else - #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE) - #undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE -#endif -#if defined(__has_declspec_attribute) - #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) -#else - #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_HAS_WARNING) - #undef JSON_HEDLEY_HAS_WARNING -#endif -#if defined(__has_warning) - #define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning) -#else - #define JSON_HEDLEY_HAS_WARNING(warning) (0) -#endif - -#if defined(JSON_HEDLEY_GNUC_HAS_WARNING) - #undef JSON_HEDLEY_GNUC_HAS_WARNING -#endif -#if defined(__has_warning) - #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) -#else - #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_GCC_HAS_WARNING) - #undef JSON_HEDLEY_GCC_HAS_WARNING -#endif -#if defined(__has_warning) - #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) -#else - #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if \ - (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ - defined(__clang__) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,0,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \ - JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \ - (JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR)) - #define JSON_HEDLEY_PRAGMA(value) _Pragma(#value) -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) - #define JSON_HEDLEY_PRAGMA(value) __pragma(value) -#else - #define JSON_HEDLEY_PRAGMA(value) -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH) - #undef JSON_HEDLEY_DIAGNOSTIC_PUSH -#endif -#if defined(JSON_HEDLEY_DIAGNOSTIC_POP) - #undef JSON_HEDLEY_DIAGNOSTIC_POP -#endif -#if defined(__clang__) - #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push") - #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") - #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) - #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push") - #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop") -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push)) - #define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop)) -#elif JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) - #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("push") - #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("pop") -#elif \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,4,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) - #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push") - #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop") -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) - #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") - #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") -#else - #define JSON_HEDLEY_DIAGNOSTIC_PUSH - #define JSON_HEDLEY_DIAGNOSTIC_POP -#endif - -/* JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for - HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) - #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ -#endif -#if defined(__cplusplus) -# if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat") -# if JSON_HEDLEY_HAS_WARNING("-Wc++17-extensions") -# if JSON_HEDLEY_HAS_WARNING("-Wc++1z-extensions") -# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ - _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ - _Pragma("clang diagnostic ignored \"-Wc++1z-extensions\"") \ - xpr \ - JSON_HEDLEY_DIAGNOSTIC_POP -# else -# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ - _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ - xpr \ - JSON_HEDLEY_DIAGNOSTIC_POP -# endif -# else -# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ - xpr \ - JSON_HEDLEY_DIAGNOSTIC_POP -# endif -# endif -#endif -#if !defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x -#endif - -#if defined(JSON_HEDLEY_CONST_CAST) - #undef JSON_HEDLEY_CONST_CAST -#endif -#if defined(__cplusplus) -# define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast(expr)) -#elif \ - JSON_HEDLEY_HAS_WARNING("-Wcast-qual") || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) -# define JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \ - ((T) (expr)); \ - JSON_HEDLEY_DIAGNOSTIC_POP \ - })) -#else -# define JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr)) -#endif - -#if defined(JSON_HEDLEY_REINTERPRET_CAST) - #undef JSON_HEDLEY_REINTERPRET_CAST -#endif -#if defined(__cplusplus) - #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast(expr)) -#else - #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) ((T) (expr)) -#endif - -#if defined(JSON_HEDLEY_STATIC_CAST) - #undef JSON_HEDLEY_STATIC_CAST -#endif -#if defined(__cplusplus) - #define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast(expr)) -#else - #define JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr)) -#endif - -#if defined(JSON_HEDLEY_CPP_CAST) - #undef JSON_HEDLEY_CPP_CAST -#endif -#if defined(__cplusplus) -# if JSON_HEDLEY_HAS_WARNING("-Wold-style-cast") -# define JSON_HEDLEY_CPP_CAST(T, expr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wold-style-cast\"") \ - ((T) (expr)) \ - JSON_HEDLEY_DIAGNOSTIC_POP -# elif JSON_HEDLEY_IAR_VERSION_CHECK(8,3,0) -# define JSON_HEDLEY_CPP_CAST(T, expr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("diag_suppress=Pe137") \ - JSON_HEDLEY_DIAGNOSTIC_POP -# else -# define JSON_HEDLEY_CPP_CAST(T, expr) ((T) (expr)) -# endif -#else -# define JSON_HEDLEY_CPP_CAST(T, expr) (expr) -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED) - #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wdeprecated-declarations") - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)") -#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:1478 1786)) -#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1216,1444,1445") -#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996)) -#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") -#elif \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718") -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)") -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215") -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)") -#else - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS) - #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)") -#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:161)) -#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068)) -#elif \ - JSON_HEDLEY_TI_VERSION_CHECK(16,9,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") -#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161") -#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 161") -#else - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES) - #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunknown-attributes") - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("clang diagnostic ignored \"-Wunknown-attributes\"") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("warning(disable:1292)") -#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:1292)) -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030)) -#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097,1098") -#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("error_messages(off,attrskipunsup)") -#elif \ - JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1173") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress=Pe1097") -#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") -#else - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL) - #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wcast-qual") - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"") -#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"") -#else - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL -#endif - -#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION) - #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunused-function") - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("clang diagnostic ignored \"-Wunused-function\"") -#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("GCC diagnostic ignored \"-Wunused-function\"") -#elif JSON_HEDLEY_MSVC_VERSION_CHECK(1,0,0) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION __pragma(warning(disable:4505)) -#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("diag_suppress 3142") -#else - #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION -#endif - -#if defined(JSON_HEDLEY_DEPRECATED) - #undef JSON_HEDLEY_DEPRECATED -#endif -#if defined(JSON_HEDLEY_DEPRECATED_FOR) - #undef JSON_HEDLEY_DEPRECATED_FOR -#endif -#if \ - JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since)) - #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement)) -#elif \ - (JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(18,1,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since))) - #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement))) -#elif defined(__cplusplus) && (__cplusplus >= 201402L) - #define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since)]]) - #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]]) -#elif \ - JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) - #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__)) - #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__)) -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ - JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated) - #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated) -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) - #define JSON_HEDLEY_DEPRECATED(since) _Pragma("deprecated") - #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated") -#else - #define JSON_HEDLEY_DEPRECATED(since) - #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) -#endif - -#if defined(JSON_HEDLEY_UNAVAILABLE) - #undef JSON_HEDLEY_UNAVAILABLE -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(warning) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since))) -#else - #define JSON_HEDLEY_UNAVAILABLE(available_since) -#endif - -#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT) - #undef JSON_HEDLEY_WARN_UNUSED_RESULT -#endif -#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT_MSG) - #undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) - #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__)) -#elif (JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) >= 201907L) - #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) - #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]]) -#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) - #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) - #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) -#elif defined(_Check_return_) /* SAL */ - #define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_ - #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) _Check_return_ -#else - #define JSON_HEDLEY_WARN_UNUSED_RESULT - #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) -#endif - -#if defined(JSON_HEDLEY_SENTINEL) - #undef JSON_HEDLEY_SENTINEL -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position))) -#else - #define JSON_HEDLEY_SENTINEL(position) -#endif - -#if defined(JSON_HEDLEY_NO_RETURN) - #undef JSON_HEDLEY_NO_RETURN -#endif -#if JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) - #define JSON_HEDLEY_NO_RETURN __noreturn -#elif \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) -#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L - #define JSON_HEDLEY_NO_RETURN _Noreturn -#elif defined(__cplusplus) && (__cplusplus >= 201103L) - #define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]]) -#elif \ - JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) - #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) - #define JSON_HEDLEY_NO_RETURN _Pragma("does_not_return") -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) -#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) - #define JSON_HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;") -#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) - #define JSON_HEDLEY_NO_RETURN __attribute((noreturn)) -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) - #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) -#else - #define JSON_HEDLEY_NO_RETURN -#endif - -#if defined(JSON_HEDLEY_NO_ESCAPE) - #undef JSON_HEDLEY_NO_ESCAPE -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(noescape) - #define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__)) -#else - #define JSON_HEDLEY_NO_ESCAPE -#endif - -#if defined(JSON_HEDLEY_UNREACHABLE) - #undef JSON_HEDLEY_UNREACHABLE -#endif -#if defined(JSON_HEDLEY_UNREACHABLE_RETURN) - #undef JSON_HEDLEY_UNREACHABLE_RETURN -#endif -#if defined(JSON_HEDLEY_ASSUME) - #undef JSON_HEDLEY_ASSUME -#endif -#if \ - JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_ASSUME(expr) __assume(expr) -#elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume) - #define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr) -#elif \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) - #if defined(__cplusplus) - #define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr) - #else - #define JSON_HEDLEY_ASSUME(expr) _nassert(expr) - #endif -#endif -#if \ - (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(JSON_HEDLEY_ARM_VERSION))) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(18,10,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5) || \ - JSON_HEDLEY_CRAY_VERSION_CHECK(10,0,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable() -#elif defined(JSON_HEDLEY_ASSUME) - #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) -#endif -#if !defined(JSON_HEDLEY_ASSUME) - #if defined(JSON_HEDLEY_UNREACHABLE) - #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, ((expr) ? 1 : (JSON_HEDLEY_UNREACHABLE(), 1))) - #else - #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, expr) - #endif -#endif -#if defined(JSON_HEDLEY_UNREACHABLE) - #if \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) - #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (JSON_HEDLEY_STATIC_CAST(void, JSON_HEDLEY_ASSUME(0)), (value)) - #else - #define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE() - #endif -#else - #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (value) -#endif -#if !defined(JSON_HEDLEY_UNREACHABLE) - #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) -#endif - -JSON_HEDLEY_DIAGNOSTIC_PUSH -#if JSON_HEDLEY_HAS_WARNING("-Wpedantic") - #pragma clang diagnostic ignored "-Wpedantic" -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic") && defined(__cplusplus) - #pragma clang diagnostic ignored "-Wc++98-compat-pedantic" -#endif -#if JSON_HEDLEY_GCC_HAS_WARNING("-Wvariadic-macros",4,0,0) - #if defined(__clang__) - #pragma clang diagnostic ignored "-Wvariadic-macros" - #elif defined(JSON_HEDLEY_GCC_VERSION) - #pragma GCC diagnostic ignored "-Wvariadic-macros" - #endif -#endif -#if defined(JSON_HEDLEY_NON_NULL) - #undef JSON_HEDLEY_NON_NULL -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) - #define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__))) -#else - #define JSON_HEDLEY_NON_NULL(...) -#endif -JSON_HEDLEY_DIAGNOSTIC_POP - -#if defined(JSON_HEDLEY_PRINTF_FORMAT) - #undef JSON_HEDLEY_PRINTF_FORMAT -#endif -#if defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO) - #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check))) -#elif defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO) - #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check))) -#elif \ - JSON_HEDLEY_HAS_ATTRIBUTE(format) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check))) -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0) - #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check)) -#else - #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) -#endif - -#if defined(JSON_HEDLEY_CONSTEXPR) - #undef JSON_HEDLEY_CONSTEXPR -#endif -#if defined(__cplusplus) - #if __cplusplus >= 201103L - #define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr) - #endif -#endif -#if !defined(JSON_HEDLEY_CONSTEXPR) - #define JSON_HEDLEY_CONSTEXPR -#endif - -#if defined(JSON_HEDLEY_PREDICT) - #undef JSON_HEDLEY_PREDICT -#endif -#if defined(JSON_HEDLEY_LIKELY) - #undef JSON_HEDLEY_LIKELY -#endif -#if defined(JSON_HEDLEY_UNLIKELY) - #undef JSON_HEDLEY_UNLIKELY -#endif -#if defined(JSON_HEDLEY_UNPREDICTABLE) - #undef JSON_HEDLEY_UNPREDICTABLE -#endif -#if JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable) - #define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable((expr)) -#endif -#if \ - (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) && !defined(JSON_HEDLEY_PGI_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) -# define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability( (expr), (value), (probability)) -# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1 , (probability)) -# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0 , (probability)) -# define JSON_HEDLEY_LIKELY(expr) __builtin_expect (!!(expr), 1 ) -# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect (!!(expr), 0 ) -#elif \ - (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27) || \ - JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) -# define JSON_HEDLEY_PREDICT(expr, expected, probability) \ - (((probability) >= 0.9) ? __builtin_expect((expr), (expected)) : (JSON_HEDLEY_STATIC_CAST(void, expected), (expr))) -# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) \ - (__extension__ ({ \ - double hedley_probability_ = (probability); \ - ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \ - })) -# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) \ - (__extension__ ({ \ - double hedley_probability_ = (probability); \ - ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \ - })) -# define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1) -# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0) -#else -# define JSON_HEDLEY_PREDICT(expr, expected, probability) (JSON_HEDLEY_STATIC_CAST(void, expected), (expr)) -# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr)) -# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr)) -# define JSON_HEDLEY_LIKELY(expr) (!!(expr)) -# define JSON_HEDLEY_UNLIKELY(expr) (!!(expr)) -#endif -#if !defined(JSON_HEDLEY_UNPREDICTABLE) - #define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1, 0.5) -#endif - -#if defined(JSON_HEDLEY_MALLOC) - #undef JSON_HEDLEY_MALLOC -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_MALLOC __attribute__((__malloc__)) -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) - #define JSON_HEDLEY_MALLOC _Pragma("returns_new_memory") -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_MALLOC __declspec(restrict) -#else - #define JSON_HEDLEY_MALLOC -#endif - -#if defined(JSON_HEDLEY_PURE) - #undef JSON_HEDLEY_PURE -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(pure) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) -# define JSON_HEDLEY_PURE __attribute__((__pure__)) -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) -# define JSON_HEDLEY_PURE _Pragma("does_not_write_global_data") -#elif defined(__cplusplus) && \ - ( \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) \ - ) -# define JSON_HEDLEY_PURE _Pragma("FUNC_IS_PURE;") -#else -# define JSON_HEDLEY_PURE -#endif - -#if defined(JSON_HEDLEY_CONST) - #undef JSON_HEDLEY_CONST -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(const) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_CONST __attribute__((__const__)) -#elif \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) - #define JSON_HEDLEY_CONST _Pragma("no_side_effect") -#else - #define JSON_HEDLEY_CONST JSON_HEDLEY_PURE -#endif - -#if defined(JSON_HEDLEY_RESTRICT) - #undef JSON_HEDLEY_RESTRICT -#endif -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus) - #define JSON_HEDLEY_RESTRICT restrict -#elif \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ - JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,4) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ - defined(__clang__) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_RESTRICT __restrict -#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus) - #define JSON_HEDLEY_RESTRICT _Restrict -#else - #define JSON_HEDLEY_RESTRICT -#endif - -#if defined(JSON_HEDLEY_INLINE) - #undef JSON_HEDLEY_INLINE -#endif -#if \ - (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ - (defined(__cplusplus) && (__cplusplus >= 199711L)) - #define JSON_HEDLEY_INLINE inline -#elif \ - defined(JSON_HEDLEY_GCC_VERSION) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0) - #define JSON_HEDLEY_INLINE __inline__ -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,1,0) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_INLINE __inline -#else - #define JSON_HEDLEY_INLINE -#endif - -#if defined(JSON_HEDLEY_ALWAYS_INLINE) - #undef JSON_HEDLEY_ALWAYS_INLINE -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) -# define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) -# define JSON_HEDLEY_ALWAYS_INLINE __forceinline -#elif defined(__cplusplus) && \ - ( \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) \ - ) -# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) -# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("inline=forced") -#else -# define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE -#endif - -#if defined(JSON_HEDLEY_NEVER_INLINE) - #undef JSON_HEDLEY_NEVER_INLINE -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ - JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ - (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ - (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ - (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ - JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ - JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ - JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) - #define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__)) -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) -#elif JSON_HEDLEY_PGI_VERSION_CHECK(10,2,0) - #define JSON_HEDLEY_NEVER_INLINE _Pragma("noinline") -#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) - #define JSON_HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;") -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) - #define JSON_HEDLEY_NEVER_INLINE _Pragma("inline=never") -#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) - #define JSON_HEDLEY_NEVER_INLINE __attribute((noinline)) -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) - #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) -#else - #define JSON_HEDLEY_NEVER_INLINE -#endif - -#if defined(JSON_HEDLEY_PRIVATE) - #undef JSON_HEDLEY_PRIVATE -#endif -#if defined(JSON_HEDLEY_PUBLIC) - #undef JSON_HEDLEY_PUBLIC -#endif -#if defined(JSON_HEDLEY_IMPORT) - #undef JSON_HEDLEY_IMPORT -#endif -#if defined(_WIN32) || defined(__CYGWIN__) -# define JSON_HEDLEY_PRIVATE -# define JSON_HEDLEY_PUBLIC __declspec(dllexport) -# define JSON_HEDLEY_IMPORT __declspec(dllimport) -#else -# if \ - JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ - JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ - ( \ - defined(__TI_EABI__) && \ - ( \ - (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) \ - ) \ - ) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) -# define JSON_HEDLEY_PRIVATE __attribute__((__visibility__("hidden"))) -# define JSON_HEDLEY_PUBLIC __attribute__((__visibility__("default"))) -# else -# define JSON_HEDLEY_PRIVATE -# define JSON_HEDLEY_PUBLIC -# endif -# define JSON_HEDLEY_IMPORT extern -#endif - -#if defined(JSON_HEDLEY_NO_THROW) - #undef JSON_HEDLEY_NO_THROW -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__)) -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) - #define JSON_HEDLEY_NO_THROW __declspec(nothrow) -#else - #define JSON_HEDLEY_NO_THROW -#endif - -#if defined(JSON_HEDLEY_FALL_THROUGH) - #undef JSON_HEDLEY_FALL_THROUGH -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(fallthrough) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(7,0,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__)) -#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough) - #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]]) -#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough) - #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]]) -#elif defined(__fallthrough) /* SAL */ - #define JSON_HEDLEY_FALL_THROUGH __fallthrough -#else - #define JSON_HEDLEY_FALL_THROUGH -#endif - -#if defined(JSON_HEDLEY_RETURNS_NON_NULL) - #undef JSON_HEDLEY_RETURNS_NON_NULL -#endif -#if \ - JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__)) -#elif defined(_Ret_notnull_) /* SAL */ - #define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_ -#else - #define JSON_HEDLEY_RETURNS_NON_NULL -#endif - -#if defined(JSON_HEDLEY_ARRAY_PARAM) - #undef JSON_HEDLEY_ARRAY_PARAM -#endif -#if \ - defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ - !defined(__STDC_NO_VLA__) && \ - !defined(__cplusplus) && \ - !defined(JSON_HEDLEY_PGI_VERSION) && \ - !defined(JSON_HEDLEY_TINYC_VERSION) - #define JSON_HEDLEY_ARRAY_PARAM(name) (name) -#else - #define JSON_HEDLEY_ARRAY_PARAM(name) -#endif - -#if defined(JSON_HEDLEY_IS_CONSTANT) - #undef JSON_HEDLEY_IS_CONSTANT -#endif -#if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR) - #undef JSON_HEDLEY_REQUIRE_CONSTEXPR -#endif -/* JSON_HEDLEY_IS_CONSTEXPR_ is for - HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ -#if defined(JSON_HEDLEY_IS_CONSTEXPR_) - #undef JSON_HEDLEY_IS_CONSTEXPR_ -#endif -#if \ - JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ - JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ - (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) && !defined(__cplusplus)) || \ - JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ - JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) - #define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr) -#endif -#if !defined(__cplusplus) -# if \ - JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ - JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ - JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24) -#if defined(__INTPTR_TYPE__) - #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*) -#else - #include - #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*) -#endif -# elif \ - ( \ - defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \ - !defined(JSON_HEDLEY_SUNPRO_VERSION) && \ - !defined(JSON_HEDLEY_PGI_VERSION) && \ - !defined(JSON_HEDLEY_IAR_VERSION)) || \ - (JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \ - JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ - JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0) -#if defined(__INTPTR_TYPE__) - #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0) -#else - #include - #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0) -#endif -# elif \ - defined(JSON_HEDLEY_GCC_VERSION) || \ - defined(JSON_HEDLEY_INTEL_VERSION) || \ - defined(JSON_HEDLEY_TINYC_VERSION) || \ - defined(JSON_HEDLEY_TI_ARMCL_VERSION) || \ - JSON_HEDLEY_TI_CL430_VERSION_CHECK(18,12,0) || \ - defined(JSON_HEDLEY_TI_CL2000_VERSION) || \ - defined(JSON_HEDLEY_TI_CL6X_VERSION) || \ - defined(JSON_HEDLEY_TI_CL7X_VERSION) || \ - defined(JSON_HEDLEY_TI_CLPRU_VERSION) || \ - defined(__clang__) -# define JSON_HEDLEY_IS_CONSTEXPR_(expr) ( \ - sizeof(void) != \ - sizeof(*( \ - 1 ? \ - ((void*) ((expr) * 0L) ) : \ -((struct { char v[sizeof(void) * 2]; } *) 1) \ - ) \ - ) \ - ) -# endif -#endif -#if defined(JSON_HEDLEY_IS_CONSTEXPR_) - #if !defined(JSON_HEDLEY_IS_CONSTANT) - #define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr) - #endif - #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1)) -#else - #if !defined(JSON_HEDLEY_IS_CONSTANT) - #define JSON_HEDLEY_IS_CONSTANT(expr) (0) - #endif - #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr) -#endif - -#if defined(JSON_HEDLEY_BEGIN_C_DECLS) - #undef JSON_HEDLEY_BEGIN_C_DECLS -#endif -#if defined(JSON_HEDLEY_END_C_DECLS) - #undef JSON_HEDLEY_END_C_DECLS -#endif -#if defined(JSON_HEDLEY_C_DECL) - #undef JSON_HEDLEY_C_DECL -#endif -#if defined(__cplusplus) - #define JSON_HEDLEY_BEGIN_C_DECLS extern "C" { - #define JSON_HEDLEY_END_C_DECLS } - #define JSON_HEDLEY_C_DECL extern "C" -#else - #define JSON_HEDLEY_BEGIN_C_DECLS - #define JSON_HEDLEY_END_C_DECLS - #define JSON_HEDLEY_C_DECL -#endif - -#if defined(JSON_HEDLEY_STATIC_ASSERT) - #undef JSON_HEDLEY_STATIC_ASSERT -#endif -#if \ - !defined(__cplusplus) && ( \ - (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \ - (JSON_HEDLEY_HAS_FEATURE(c_static_assert) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ - JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ - defined(_Static_assert) \ - ) -# define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message) -#elif \ - (defined(__cplusplus) && (__cplusplus >= 201103L)) || \ - JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) -# define JSON_HEDLEY_STATIC_ASSERT(expr, message) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message)) -#else -# define JSON_HEDLEY_STATIC_ASSERT(expr, message) -#endif - -#if defined(JSON_HEDLEY_NULL) - #undef JSON_HEDLEY_NULL -#endif -#if defined(__cplusplus) - #if __cplusplus >= 201103L - #define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr) - #elif defined(NULL) - #define JSON_HEDLEY_NULL NULL - #else - #define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0) - #endif -#elif defined(NULL) - #define JSON_HEDLEY_NULL NULL -#else - #define JSON_HEDLEY_NULL ((void*) 0) -#endif - -#if defined(JSON_HEDLEY_MESSAGE) - #undef JSON_HEDLEY_MESSAGE -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") -# define JSON_HEDLEY_MESSAGE(msg) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ - JSON_HEDLEY_PRAGMA(message msg) \ - JSON_HEDLEY_DIAGNOSTIC_POP -#elif \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) -# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg) -#elif JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) -# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg) -#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) -# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) -#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0) -# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) -#else -# define JSON_HEDLEY_MESSAGE(msg) -#endif - -#if defined(JSON_HEDLEY_WARNING) - #undef JSON_HEDLEY_WARNING -#endif -#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") -# define JSON_HEDLEY_WARNING(msg) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ - JSON_HEDLEY_PRAGMA(clang warning msg) \ - JSON_HEDLEY_DIAGNOSTIC_POP -#elif \ - JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0) || \ - JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ - JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) -# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg) -#elif \ - JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) -# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg)) -#else -# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg) -#endif - -#if defined(JSON_HEDLEY_REQUIRE) - #undef JSON_HEDLEY_REQUIRE -#endif -#if defined(JSON_HEDLEY_REQUIRE_MSG) - #undef JSON_HEDLEY_REQUIRE_MSG -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if) -# if JSON_HEDLEY_HAS_WARNING("-Wgcc-compat") -# define JSON_HEDLEY_REQUIRE(expr) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ - __attribute__((diagnose_if(!(expr), #expr, "error"))) \ - JSON_HEDLEY_DIAGNOSTIC_POP -# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ - __attribute__((diagnose_if(!(expr), msg, "error"))) \ - JSON_HEDLEY_DIAGNOSTIC_POP -# else -# define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, "error"))) -# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, "error"))) -# endif -#else -# define JSON_HEDLEY_REQUIRE(expr) -# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) -#endif - -#if defined(JSON_HEDLEY_FLAGS) - #undef JSON_HEDLEY_FLAGS -#endif -#if JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum) && (!defined(__cplusplus) || JSON_HEDLEY_HAS_WARNING("-Wbitfield-enum-conversion")) - #define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__)) -#else - #define JSON_HEDLEY_FLAGS -#endif - -#if defined(JSON_HEDLEY_FLAGS_CAST) - #undef JSON_HEDLEY_FLAGS_CAST -#endif -#if JSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0) -# define JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \ - JSON_HEDLEY_DIAGNOSTIC_PUSH \ - _Pragma("warning(disable:188)") \ - ((T) (expr)); \ - JSON_HEDLEY_DIAGNOSTIC_POP \ - })) -#else -# define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr) -#endif - -#if defined(JSON_HEDLEY_EMPTY_BASES) - #undef JSON_HEDLEY_EMPTY_BASES -#endif -#if \ - (JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,23918) && !JSON_HEDLEY_MSVC_VERSION_CHECK(20,0,0)) || \ - JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) - #define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases) -#else - #define JSON_HEDLEY_EMPTY_BASES -#endif - -/* Remaining macros are deprecated. */ - -#if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK) - #undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK -#endif -#if defined(__clang__) - #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0) -#else - #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) -#endif - -#if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE) - #undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE -#endif -#define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) - -#if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE) - #undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE -#endif -#define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) - -#if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN) - #undef JSON_HEDLEY_CLANG_HAS_BUILTIN -#endif -#define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin) - -#if defined(JSON_HEDLEY_CLANG_HAS_FEATURE) - #undef JSON_HEDLEY_CLANG_HAS_FEATURE -#endif -#define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature) - -#if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION) - #undef JSON_HEDLEY_CLANG_HAS_EXTENSION -#endif -#define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension) - -#if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE) - #undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE -#endif -#define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) - -#if defined(JSON_HEDLEY_CLANG_HAS_WARNING) - #undef JSON_HEDLEY_CLANG_HAS_WARNING -#endif -#define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning) - -#endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */ - - -// This file contains all internal macro definitions (except those affecting ABI) -// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them - -// #include - - -// exclude unsupported compilers -#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) - #if defined(__clang__) - #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 - #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" - #endif - #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) - #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 - #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" - #endif - #endif -#endif - -// C++ language standard detection -// if the user manually specified the used c++ version this is skipped -#if !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11) - #if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L) - #define JSON_HAS_CPP_20 - #define JSON_HAS_CPP_17 - #define JSON_HAS_CPP_14 - #elif (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 - #define JSON_HAS_CPP_17 - #define JSON_HAS_CPP_14 - #elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) - #define JSON_HAS_CPP_14 - #endif - // the cpp 11 flag is always specified because it is the minimal required version - #define JSON_HAS_CPP_11 -#endif - -#ifdef __has_include - #if __has_include() - #include - #endif -#endif - -#if !defined(JSON_HAS_FILESYSTEM) && !defined(JSON_HAS_EXPERIMENTAL_FILESYSTEM) - #ifdef JSON_HAS_CPP_17 - #if defined(__cpp_lib_filesystem) - #define JSON_HAS_FILESYSTEM 1 - #elif defined(__cpp_lib_experimental_filesystem) - #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 - #elif !defined(__has_include) - #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 - #elif __has_include() - #define JSON_HAS_FILESYSTEM 1 - #elif __has_include() - #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 - #endif - - // std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ - #if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 - #undef JSON_HAS_FILESYSTEM - #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - #endif - - // no filesystem support before GCC 8: https://en.cppreference.com/w/cpp/compiler_support - #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 8 - #undef JSON_HAS_FILESYSTEM - #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - #endif - - // no filesystem support before Clang 7: https://en.cppreference.com/w/cpp/compiler_support - #if defined(__clang_major__) && __clang_major__ < 7 - #undef JSON_HAS_FILESYSTEM - #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - #endif - - // no filesystem support before MSVC 19.14: https://en.cppreference.com/w/cpp/compiler_support - #if defined(_MSC_VER) && _MSC_VER < 1914 - #undef JSON_HAS_FILESYSTEM - #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - #endif - - // no filesystem support before iOS 13 - #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 - #undef JSON_HAS_FILESYSTEM - #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - #endif - - // no filesystem support before macOS Catalina - #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500 - #undef JSON_HAS_FILESYSTEM - #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - #endif - #endif -#endif - -#ifndef JSON_HAS_EXPERIMENTAL_FILESYSTEM - #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 0 -#endif - -#ifndef JSON_HAS_FILESYSTEM - #define JSON_HAS_FILESYSTEM 0 -#endif - -#ifndef JSON_HAS_THREE_WAY_COMPARISON - #if defined(__cpp_impl_three_way_comparison) && __cpp_impl_three_way_comparison >= 201907L \ - && defined(__cpp_lib_three_way_comparison) && __cpp_lib_three_way_comparison >= 201907L - #define JSON_HAS_THREE_WAY_COMPARISON 1 - #else - #define JSON_HAS_THREE_WAY_COMPARISON 0 - #endif -#endif - -#ifndef JSON_HAS_RANGES - // ranges header shipping in GCC 11.1.0 (released 2021-04-27) has syntax error - #if defined(__GLIBCXX__) && __GLIBCXX__ == 20210427 - #define JSON_HAS_RANGES 0 - #elif defined(__cpp_lib_ranges) - #define JSON_HAS_RANGES 1 - #else - #define JSON_HAS_RANGES 0 - #endif -#endif - -#ifdef JSON_HAS_CPP_17 - #define JSON_INLINE_VARIABLE inline -#else - #define JSON_INLINE_VARIABLE -#endif - -#if JSON_HEDLEY_HAS_ATTRIBUTE(no_unique_address) - #define JSON_NO_UNIQUE_ADDRESS [[no_unique_address]] -#else - #define JSON_NO_UNIQUE_ADDRESS -#endif - -// disable documentation warnings on clang -#if defined(__clang__) - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wdocumentation" - #pragma clang diagnostic ignored "-Wdocumentation-unknown-command" -#endif - -// allow disabling exceptions -#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) - #define JSON_THROW(exception) throw exception - #define JSON_TRY try - #define JSON_CATCH(exception) catch(exception) - #define JSON_INTERNAL_CATCH(exception) catch(exception) -#else - #include - #define JSON_THROW(exception) std::abort() - #define JSON_TRY if(true) - #define JSON_CATCH(exception) if(false) - #define JSON_INTERNAL_CATCH(exception) if(false) -#endif - -// override exception macros -#if defined(JSON_THROW_USER) - #undef JSON_THROW - #define JSON_THROW JSON_THROW_USER -#endif -#if defined(JSON_TRY_USER) - #undef JSON_TRY - #define JSON_TRY JSON_TRY_USER -#endif -#if defined(JSON_CATCH_USER) - #undef JSON_CATCH - #define JSON_CATCH JSON_CATCH_USER - #undef JSON_INTERNAL_CATCH - #define JSON_INTERNAL_CATCH JSON_CATCH_USER -#endif -#if defined(JSON_INTERNAL_CATCH_USER) - #undef JSON_INTERNAL_CATCH - #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER -#endif - -// allow overriding assert -#if !defined(JSON_ASSERT) - #include // assert - #define JSON_ASSERT(x) assert(x) -#endif - -// allow to access some private functions (needed by the test suite) -#if defined(JSON_TESTS_PRIVATE) - #define JSON_PRIVATE_UNLESS_TESTED public -#else - #define JSON_PRIVATE_UNLESS_TESTED private -#endif - -/*! -@brief macro to briefly define a mapping between an enum and JSON -@def NLOHMANN_JSON_SERIALIZE_ENUM -@since version 3.4.0 -*/ -#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ - template \ - inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ - { \ - static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ - static const std::pair m[] = __VA_ARGS__; \ - auto it = std::find_if(std::begin(m), std::end(m), \ - [e](const std::pair& ej_pair) -> bool \ - { \ - return ej_pair.first == e; \ - }); \ - j = ((it != std::end(m)) ? it : std::begin(m))->second; \ - } \ - template \ - inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ - { \ - static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ - static const std::pair m[] = __VA_ARGS__; \ - auto it = std::find_if(std::begin(m), std::end(m), \ - [&j](const std::pair& ej_pair) -> bool \ - { \ - return ej_pair.second == j; \ - }); \ - e = ((it != std::end(m)) ? it : std::begin(m))->first; \ - } - -// Ugly macros to avoid uglier copy-paste when specializing basic_json. They -// may be removed in the future once the class is split. - -#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ - template class ObjectType, \ - template class ArrayType, \ - class StringType, class BooleanType, class NumberIntegerType, \ - class NumberUnsignedType, class NumberFloatType, \ - template class AllocatorType, \ - template class JSONSerializer, \ - class BinaryType, \ - class CustomBaseClass> - -#define NLOHMANN_BASIC_JSON_TPL \ - basic_json - -// Macros to simplify conversion from/to types - -#define NLOHMANN_JSON_EXPAND( x ) x -#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...) NAME -#define NLOHMANN_JSON_PASTE(...) NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_GET_MACRO(__VA_ARGS__, \ - NLOHMANN_JSON_PASTE64, \ - NLOHMANN_JSON_PASTE63, \ - NLOHMANN_JSON_PASTE62, \ - NLOHMANN_JSON_PASTE61, \ - NLOHMANN_JSON_PASTE60, \ - NLOHMANN_JSON_PASTE59, \ - NLOHMANN_JSON_PASTE58, \ - NLOHMANN_JSON_PASTE57, \ - NLOHMANN_JSON_PASTE56, \ - NLOHMANN_JSON_PASTE55, \ - NLOHMANN_JSON_PASTE54, \ - NLOHMANN_JSON_PASTE53, \ - NLOHMANN_JSON_PASTE52, \ - NLOHMANN_JSON_PASTE51, \ - NLOHMANN_JSON_PASTE50, \ - NLOHMANN_JSON_PASTE49, \ - NLOHMANN_JSON_PASTE48, \ - NLOHMANN_JSON_PASTE47, \ - NLOHMANN_JSON_PASTE46, \ - NLOHMANN_JSON_PASTE45, \ - NLOHMANN_JSON_PASTE44, \ - NLOHMANN_JSON_PASTE43, \ - NLOHMANN_JSON_PASTE42, \ - NLOHMANN_JSON_PASTE41, \ - NLOHMANN_JSON_PASTE40, \ - NLOHMANN_JSON_PASTE39, \ - NLOHMANN_JSON_PASTE38, \ - NLOHMANN_JSON_PASTE37, \ - NLOHMANN_JSON_PASTE36, \ - NLOHMANN_JSON_PASTE35, \ - NLOHMANN_JSON_PASTE34, \ - NLOHMANN_JSON_PASTE33, \ - NLOHMANN_JSON_PASTE32, \ - NLOHMANN_JSON_PASTE31, \ - NLOHMANN_JSON_PASTE30, \ - NLOHMANN_JSON_PASTE29, \ - NLOHMANN_JSON_PASTE28, \ - NLOHMANN_JSON_PASTE27, \ - NLOHMANN_JSON_PASTE26, \ - NLOHMANN_JSON_PASTE25, \ - NLOHMANN_JSON_PASTE24, \ - NLOHMANN_JSON_PASTE23, \ - NLOHMANN_JSON_PASTE22, \ - NLOHMANN_JSON_PASTE21, \ - NLOHMANN_JSON_PASTE20, \ - NLOHMANN_JSON_PASTE19, \ - NLOHMANN_JSON_PASTE18, \ - NLOHMANN_JSON_PASTE17, \ - NLOHMANN_JSON_PASTE16, \ - NLOHMANN_JSON_PASTE15, \ - NLOHMANN_JSON_PASTE14, \ - NLOHMANN_JSON_PASTE13, \ - NLOHMANN_JSON_PASTE12, \ - NLOHMANN_JSON_PASTE11, \ - NLOHMANN_JSON_PASTE10, \ - NLOHMANN_JSON_PASTE9, \ - NLOHMANN_JSON_PASTE8, \ - NLOHMANN_JSON_PASTE7, \ - NLOHMANN_JSON_PASTE6, \ - NLOHMANN_JSON_PASTE5, \ - NLOHMANN_JSON_PASTE4, \ - NLOHMANN_JSON_PASTE3, \ - NLOHMANN_JSON_PASTE2, \ - NLOHMANN_JSON_PASTE1)(__VA_ARGS__)) -#define NLOHMANN_JSON_PASTE2(func, v1) func(v1) -#define NLOHMANN_JSON_PASTE3(func, v1, v2) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE2(func, v2) -#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE3(func, v2, v3) -#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE4(func, v2, v3, v4) -#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE5(func, v2, v3, v4, v5) -#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE6(func, v2, v3, v4, v5, v6) -#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE7(func, v2, v3, v4, v5, v6, v7) -#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE8(func, v2, v3, v4, v5, v6, v7, v8) -#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE9(func, v2, v3, v4, v5, v6, v7, v8, v9) -#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE10(func, v2, v3, v4, v5, v6, v7, v8, v9, v10) -#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE11(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE12(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE13(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE14(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE15(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE16(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE17(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) -#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE18(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) -#define NLOHMANN_JSON_PASTE20(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE19(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) -#define NLOHMANN_JSON_PASTE21(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE20(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) -#define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE21(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) -#define NLOHMANN_JSON_PASTE23(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE22(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) -#define NLOHMANN_JSON_PASTE24(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE23(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) -#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE24(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) -#define NLOHMANN_JSON_PASTE26(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE25(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) -#define NLOHMANN_JSON_PASTE27(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE26(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) -#define NLOHMANN_JSON_PASTE28(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE27(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) -#define NLOHMANN_JSON_PASTE29(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE28(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) -#define NLOHMANN_JSON_PASTE30(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE29(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) -#define NLOHMANN_JSON_PASTE31(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE30(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) -#define NLOHMANN_JSON_PASTE32(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE31(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) -#define NLOHMANN_JSON_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE32(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) -#define NLOHMANN_JSON_PASTE34(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE33(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) -#define NLOHMANN_JSON_PASTE35(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE34(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) -#define NLOHMANN_JSON_PASTE36(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE35(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) -#define NLOHMANN_JSON_PASTE37(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE36(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) -#define NLOHMANN_JSON_PASTE38(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE37(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) -#define NLOHMANN_JSON_PASTE39(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE38(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) -#define NLOHMANN_JSON_PASTE40(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE39(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) -#define NLOHMANN_JSON_PASTE41(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE40(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) -#define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE41(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) -#define NLOHMANN_JSON_PASTE43(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE42(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) -#define NLOHMANN_JSON_PASTE44(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE43(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) -#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE44(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) -#define NLOHMANN_JSON_PASTE46(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE45(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) -#define NLOHMANN_JSON_PASTE47(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE46(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) -#define NLOHMANN_JSON_PASTE48(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE47(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) -#define NLOHMANN_JSON_PASTE49(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE48(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) -#define NLOHMANN_JSON_PASTE50(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE49(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) -#define NLOHMANN_JSON_PASTE51(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE50(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) -#define NLOHMANN_JSON_PASTE52(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE51(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) -#define NLOHMANN_JSON_PASTE53(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE52(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) -#define NLOHMANN_JSON_PASTE54(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE53(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) -#define NLOHMANN_JSON_PASTE55(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE54(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) -#define NLOHMANN_JSON_PASTE56(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE55(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) -#define NLOHMANN_JSON_PASTE57(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE56(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) -#define NLOHMANN_JSON_PASTE58(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE57(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) -#define NLOHMANN_JSON_PASTE59(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE58(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) -#define NLOHMANN_JSON_PASTE60(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE59(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) -#define NLOHMANN_JSON_PASTE61(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE60(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) -#define NLOHMANN_JSON_PASTE62(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE61(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) -#define NLOHMANN_JSON_PASTE63(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE62(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) -#define NLOHMANN_JSON_PASTE64(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE63(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) - -#define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1; -#define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1); -#define NLOHMANN_JSON_FROM_WITH_DEFAULT(v1) nlohmann_json_t.v1 = nlohmann_json_j.value(#v1, nlohmann_json_default_obj.v1); - -/*! -@brief macro -@def NLOHMANN_DEFINE_TYPE_INTRUSIVE -@since version 3.9.0 -*/ -#define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...) \ - friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ - friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } - -#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(Type, ...) \ - friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ - friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } - -/*! -@brief macro -@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE -@since version 3.9.0 -*/ -#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \ - inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ - inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } - -#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, ...) \ - inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ - inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } - - -// inspired from https://stackoverflow.com/a/26745591 -// allows to call any std function as if (e.g. with begin): -// using std::begin; begin(x); -// -// it allows using the detected idiom to retrieve the return type -// of such an expression -#define NLOHMANN_CAN_CALL_STD_FUNC_IMPL(std_name) \ - namespace detail { \ - using std::std_name; \ - \ - template \ - using result_of_##std_name = decltype(std_name(std::declval()...)); \ - } \ - \ - namespace detail2 { \ - struct std_name##_tag \ - { \ - }; \ - \ - template \ - std_name##_tag std_name(T&&...); \ - \ - template \ - using result_of_##std_name = decltype(std_name(std::declval()...)); \ - \ - template \ - struct would_call_std_##std_name \ - { \ - static constexpr auto const value = ::nlohmann::detail:: \ - is_detected_exact::value; \ - }; \ - } /* namespace detail2 */ \ - \ - template \ - struct would_call_std_##std_name : detail2::would_call_std_##std_name \ - { \ - } - -#ifndef JSON_USE_IMPLICIT_CONVERSIONS - #define JSON_USE_IMPLICIT_CONVERSIONS 1 -#endif - -#if JSON_USE_IMPLICIT_CONVERSIONS - #define JSON_EXPLICIT -#else - #define JSON_EXPLICIT explicit -#endif - -#ifndef JSON_DISABLE_ENUM_SERIALIZATION - #define JSON_DISABLE_ENUM_SERIALIZATION 0 -#endif - -#ifndef JSON_USE_GLOBAL_UDLS - #define JSON_USE_GLOBAL_UDLS 1 -#endif - -#if JSON_HAS_THREE_WAY_COMPARISON - #include // partial_ordering -#endif - -NLOHMANN_JSON_NAMESPACE_BEGIN -namespace detail -{ - -/////////////////////////// -// JSON type enumeration // -/////////////////////////// - -/*! -@brief the JSON type enumeration - -This enumeration collects the different JSON types. It is internally used to -distinguish the stored values, and the functions @ref basic_json::is_null(), -@ref basic_json::is_object(), @ref basic_json::is_array(), -@ref basic_json::is_string(), @ref basic_json::is_boolean(), -@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), -@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), -@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and -@ref basic_json::is_structured() rely on it. - -@note There are three enumeration entries (number_integer, number_unsigned, and -number_float), because the library distinguishes these three types for numbers: -@ref basic_json::number_unsigned_t is used for unsigned integers, -@ref basic_json::number_integer_t is used for signed integers, and -@ref basic_json::number_float_t is used for floating-point numbers or to -approximate integers which do not fit in the limits of their respective type. - -@sa see @ref basic_json::basic_json(const value_t value_type) -- create a JSON -value with the default value for a given type - -@since version 1.0.0 -*/ -enum class value_t : std::uint8_t -{ - null, ///< null value - object, ///< object (unordered set of name/value pairs) - array, ///< array (ordered collection of values) - string, ///< string value - boolean, ///< boolean value - number_integer, ///< number value (signed integer) - number_unsigned, ///< number value (unsigned integer) - number_float, ///< number value (floating-point) - binary, ///< binary array (ordered collection of bytes) - discarded ///< discarded by the parser callback function -}; - -/*! -@brief comparison operator for JSON types - -Returns an ordering that is similar to Python: -- order: null < boolean < number < object < array < string < binary -- furthermore, each type is not smaller than itself -- discarded values are not comparable -- binary is represented as a b"" string in python and directly comparable to a - string; however, making a binary array directly comparable with a string would - be surprising behavior in a JSON file. - -@since version 1.0.0 -*/ -#if JSON_HAS_THREE_WAY_COMPARISON - inline std::partial_ordering operator<=>(const value_t lhs, const value_t rhs) noexcept // *NOPAD* -#else - inline bool operator<(const value_t lhs, const value_t rhs) noexcept -#endif -{ - static constexpr std::array order = {{ - 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, - 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */, - 6 /* binary */ - } - }; - - const auto l_index = static_cast(lhs); - const auto r_index = static_cast(rhs); -#if JSON_HAS_THREE_WAY_COMPARISON - if (l_index < order.size() && r_index < order.size()) - { - return order[l_index] <=> order[r_index]; // *NOPAD* - } - return std::partial_ordering::unordered; -#else - return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index]; -#endif -} - -// GCC selects the built-in operator< over an operator rewritten from -// a user-defined spaceship operator -// Clang, MSVC, and ICC select the rewritten candidate -// (see GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105200) -#if JSON_HAS_THREE_WAY_COMPARISON && defined(__GNUC__) -inline bool operator<(const value_t lhs, const value_t rhs) noexcept -{ - return std::is_lt(lhs <=> rhs); // *NOPAD* -} -#endif - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN -namespace detail -{ - -/*! -@brief replace all occurrences of a substring by another string - -@param[in,out] s the string to manipulate; changed so that all - occurrences of @a f are replaced with @a t -@param[in] f the substring to replace with @a t -@param[in] t the string to replace @a f - -@pre The search string @a f must not be empty. **This precondition is -enforced with an assertion.** - -@since version 2.0.0 -*/ -template -inline void replace_substring(StringType& s, const StringType& f, - const StringType& t) -{ - JSON_ASSERT(!f.empty()); - for (auto pos = s.find(f); // find first occurrence of f - pos != StringType::npos; // make sure f was found - s.replace(pos, f.size(), t), // replace with t, and - pos = s.find(f, pos + t.size())) // find next occurrence of f - {} -} - -/*! - * @brief string escaping as described in RFC 6901 (Sect. 4) - * @param[in] s string to escape - * @return escaped string - * - * Note the order of escaping "~" to "~0" and "/" to "~1" is important. - */ -template -inline StringType escape(StringType s) -{ - replace_substring(s, StringType{"~"}, StringType{"~0"}); - replace_substring(s, StringType{"/"}, StringType{"~1"}); - return s; -} - -/*! - * @brief string unescaping as described in RFC 6901 (Sect. 4) - * @param[in] s string to unescape - * @return unescaped string - * - * Note the order of escaping "~1" to "/" and "~0" to "~" is important. - */ -template -static void unescape(StringType& s) -{ - replace_substring(s, StringType{"~1"}, StringType{"/"}); - replace_substring(s, StringType{"~0"}, StringType{"~"}); -} - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include // size_t - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN -namespace detail -{ - -/// struct to capture the start position of the current token -struct position_t -{ - /// the total number of characters read - std::size_t chars_read_total = 0; - /// the number of characters read in the current line - std::size_t chars_read_current_line = 0; - /// the number of lines read - std::size_t lines_read = 0; - - /// conversion to size_t to preserve SAX interface - constexpr operator size_t() const - { - return chars_read_total; - } -}; - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - -// #include - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-FileCopyrightText: 2018 The Abseil Authors -// SPDX-License-Identifier: MIT - - - -#include // array -#include // size_t -#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type -#include // index_sequence, make_index_sequence, index_sequence_for - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN -namespace detail -{ - -template -using uncvref_t = typename std::remove_cv::type>::type; - -#ifdef JSON_HAS_CPP_14 - -// the following utilities are natively available in C++14 -using std::enable_if_t; -using std::index_sequence; -using std::make_index_sequence; -using std::index_sequence_for; - -#else - -// alias templates to reduce boilerplate -template -using enable_if_t = typename std::enable_if::type; - -// The following code is taken from https://github.com/abseil/abseil-cpp/blob/10cb35e459f5ecca5b2ff107635da0bfa41011b4/absl/utility/utility.h -// which is part of Google Abseil (https://github.com/abseil/abseil-cpp), licensed under the Apache License 2.0. - -//// START OF CODE FROM GOOGLE ABSEIL - -// integer_sequence -// -// Class template representing a compile-time integer sequence. An instantiation -// of `integer_sequence` has a sequence of integers encoded in its -// type through its template arguments (which is a common need when -// working with C++11 variadic templates). `absl::integer_sequence` is designed -// to be a drop-in replacement for C++14's `std::integer_sequence`. -// -// Example: -// -// template< class T, T... Ints > -// void user_function(integer_sequence); -// -// int main() -// { -// // user_function's `T` will be deduced to `int` and `Ints...` -// // will be deduced to `0, 1, 2, 3, 4`. -// user_function(make_integer_sequence()); -// } -template -struct integer_sequence -{ - using value_type = T; - static constexpr std::size_t size() noexcept - { - return sizeof...(Ints); - } -}; - -// index_sequence -// -// A helper template for an `integer_sequence` of `size_t`, -// `absl::index_sequence` is designed to be a drop-in replacement for C++14's -// `std::index_sequence`. -template -using index_sequence = integer_sequence; - -namespace utility_internal -{ - -template -struct Extend; - -// Note that SeqSize == sizeof...(Ints). It's passed explicitly for efficiency. -template -struct Extend, SeqSize, 0> -{ - using type = integer_sequence < T, Ints..., (Ints + SeqSize)... >; -}; - -template -struct Extend, SeqSize, 1> -{ - using type = integer_sequence < T, Ints..., (Ints + SeqSize)..., 2 * SeqSize >; -}; - -// Recursion helper for 'make_integer_sequence'. -// 'Gen::type' is an alias for 'integer_sequence'. -template -struct Gen -{ - using type = - typename Extend < typename Gen < T, N / 2 >::type, N / 2, N % 2 >::type; -}; - -template -struct Gen -{ - using type = integer_sequence; -}; - -} // namespace utility_internal - -// Compile-time sequences of integers - -// make_integer_sequence -// -// This template alias is equivalent to -// `integer_sequence`, and is designed to be a drop-in -// replacement for C++14's `std::make_integer_sequence`. -template -using make_integer_sequence = typename utility_internal::Gen::type; - -// make_index_sequence -// -// This template alias is equivalent to `index_sequence<0, 1, ..., N-1>`, -// and is designed to be a drop-in replacement for C++14's -// `std::make_index_sequence`. -template -using make_index_sequence = make_integer_sequence; - -// index_sequence_for -// -// Converts a typename pack into an index sequence of the same length, and -// is designed to be a drop-in replacement for C++14's -// `std::index_sequence_for()` -template -using index_sequence_for = make_index_sequence; - -//// END OF CODE FROM GOOGLE ABSEIL - -#endif - -// dispatch utility (taken from ranges-v3) -template struct priority_tag : priority_tag < N - 1 > {}; -template<> struct priority_tag<0> {}; - -// taken from ranges-v3 -template -struct static_const -{ - static JSON_INLINE_VARIABLE constexpr T value{}; -}; - -#ifndef JSON_HAS_CPP_17 - template - constexpr T static_const::value; -#endif - -template -inline constexpr std::array make_array(Args&& ... args) -{ - return std::array {{static_cast(std::forward(args))...}}; -} - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include // numeric_limits -#include // false_type, is_constructible, is_integral, is_same, true_type -#include // declval -#include // tuple - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -#include // random_access_iterator_tag - -// #include - -// #include - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN -namespace detail -{ - -template -struct iterator_types {}; - -template -struct iterator_types < - It, - void_t> -{ - using difference_type = typename It::difference_type; - using value_type = typename It::value_type; - using pointer = typename It::pointer; - using reference = typename It::reference; - using iterator_category = typename It::iterator_category; -}; - -// This is required as some compilers implement std::iterator_traits in a way that -// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. -template -struct iterator_traits -{ -}; - -template -struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> - : iterator_types -{ -}; - -template -struct iterator_traits::value>> -{ - using iterator_category = std::random_access_iterator_tag; - using value_type = T; - using difference_type = ptrdiff_t; - using pointer = T*; - using reference = T&; -}; - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - -// #include - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN - -NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin); - -NLOHMANN_JSON_NAMESPACE_END - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - - - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN - -NLOHMANN_CAN_CALL_STD_FUNC_IMPL(end); - -NLOHMANN_JSON_NAMESPACE_END - -// #include - -// #include - -// #include -// __ _____ _____ _____ -// __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.2 -// |_____|_____|_____|_|___| https://github.com/nlohmann/json -// -// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann -// SPDX-License-Identifier: MIT - -#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_ - #define INCLUDE_NLOHMANN_JSON_FWD_HPP_ - - #include // int64_t, uint64_t - #include // map - #include // allocator - #include // string - #include // vector - - // #include - - - /*! - @brief namespace for Niels Lohmann - @see https://github.com/nlohmann - @since version 1.0.0 - */ - NLOHMANN_JSON_NAMESPACE_BEGIN - - /*! - @brief default JSONSerializer template argument - - This serializer ignores the template arguments and uses ADL - ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) - for serialization. - */ - template - struct adl_serializer; - - /// a class to store JSON values - /// @sa https://json.nlohmann.me/api/basic_json/ - template class ObjectType = - std::map, - template class ArrayType = std::vector, - class StringType = std::string, class BooleanType = bool, - class NumberIntegerType = std::int64_t, - class NumberUnsignedType = std::uint64_t, - class NumberFloatType = double, - template class AllocatorType = std::allocator, - template class JSONSerializer = - adl_serializer, - class BinaryType = std::vector, // cppcheck-suppress syntaxError - class CustomBaseClass = void> - class basic_json; - - /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document - /// @sa https://json.nlohmann.me/api/json_pointer/ - template - class json_pointer; - - /*! - @brief default specialization - @sa https://json.nlohmann.me/api/json/ - */ - using json = basic_json<>; - - /// @brief a minimal map-like container that preserves insertion order - /// @sa https://json.nlohmann.me/api/ordered_map/ - template - struct ordered_map; - - /// @brief specialization that maintains the insertion order of object keys - /// @sa https://json.nlohmann.me/api/ordered_json/ - using ordered_json = basic_json; - - NLOHMANN_JSON_NAMESPACE_END - -#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ - - -NLOHMANN_JSON_NAMESPACE_BEGIN -/*! -@brief detail namespace with internal helper functions - -This namespace collects functions that should not be exposed, -implementations of some @ref basic_json methods, and meta-programming helpers. - -@since version 2.1.0 -*/ -namespace detail -{ - -///////////// -// helpers // -///////////// - -// Note to maintainers: -// -// Every trait in this file expects a non CV-qualified type. -// The only exceptions are in the 'aliases for detected' section -// (i.e. those of the form: decltype(T::member_function(std::declval()))) -// -// In this case, T has to be properly CV-qualified to constraint the function arguments -// (e.g. to_json(BasicJsonType&, const T&)) - -template struct is_basic_json : std::false_type {}; - -NLOHMANN_BASIC_JSON_TPL_DECLARATION -struct is_basic_json : std::true_type {}; - -// used by exceptions create() member functions -// true_type for pointer to possibly cv-qualified basic_json or std::nullptr_t -// false_type otherwise -template -struct is_basic_json_context : - std::integral_constant < bool, - is_basic_json::type>::type>::value - || std::is_same::value > -{}; - -////////////////////// -// json_ref helpers // -////////////////////// - -template -class json_ref; - -template -struct is_json_ref : std::false_type {}; - -template -struct is_json_ref> : std::true_type {}; - -////////////////////////// -// aliases for detected // -////////////////////////// - -template -using mapped_type_t = typename T::mapped_type; - -template -using key_type_t = typename T::key_type; - -template -using value_type_t = typename T::value_type; - -template -using difference_type_t = typename T::difference_type; - -template -using pointer_t = typename T::pointer; - -template -using reference_t = typename T::reference; - -template -using iterator_category_t = typename T::iterator_category; - -template -using to_json_function = decltype(T::to_json(std::declval()...)); - -template -using from_json_function = decltype(T::from_json(std::declval()...)); - -template -using get_template_function = decltype(std::declval().template get()); - -// trait checking if JSONSerializer::from_json(json const&, udt&) exists -template -struct has_from_json : std::false_type {}; - -// trait checking if j.get is valid -// use this trait instead of std::is_constructible or std::is_convertible, -// both rely on, or make use of implicit conversions, and thus fail when T -// has several constructors/operator= (see https://github.com/nlohmann/json/issues/958) -template -struct is_getable -{ - static constexpr bool value = is_detected::value; -}; - -template -struct has_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> -{ - using serializer = typename BasicJsonType::template json_serializer; - - static constexpr bool value = - is_detected_exact::value; -}; - -// This trait checks if JSONSerializer::from_json(json const&) exists -// this overload is used for non-default-constructible user-defined-types -template -struct has_non_default_from_json : std::false_type {}; - -template -struct has_non_default_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> -{ - using serializer = typename BasicJsonType::template json_serializer; - - static constexpr bool value = - is_detected_exact::value; -}; - -// This trait checks if BasicJsonType::json_serializer::to_json exists -// Do not evaluate the trait when T is a basic_json type, to avoid template instantiation infinite recursion. -template -struct has_to_json : std::false_type {}; - -template -struct has_to_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> -{ - using serializer = typename BasicJsonType::template json_serializer; - - static constexpr bool value = - is_detected_exact::value; -}; - -template -using detect_key_compare = typename T::key_compare; - -template -struct has_key_compare : std::integral_constant::value> {}; - -// obtains the actual object key comparator -template -struct actual_object_comparator -{ - using object_t = typename BasicJsonType::object_t; - using object_comparator_t = typename BasicJsonType::default_object_comparator_t; - using type = typename std::conditional < has_key_compare::value, - typename object_t::key_compare, object_comparator_t>::type; -}; - -template -using actual_object_comparator_t = typename actual_object_comparator::type; - -/////////////////// -// is_ functions // -/////////////////// - -// https://en.cppreference.com/w/cpp/types/conjunction -template struct conjunction : std::true_type { }; -template struct conjunction : B { }; -template -struct conjunction -: std::conditional(B::value), conjunction, B>::type {}; - -// https://en.cppreference.com/w/cpp/types/negation -template struct negation : std::integral_constant < bool, !B::value > { }; - -// Reimplementation of is_constructible and is_default_constructible, due to them being broken for -// std::pair and std::tuple until LWG 2367 fix (see https://cplusplus.github.io/LWG/lwg-defects.html#2367). -// This causes compile errors in e.g. clang 3.5 or gcc 4.9. -template -struct is_default_constructible : std::is_default_constructible {}; - -template -struct is_default_constructible> - : conjunction, is_default_constructible> {}; - -template -struct is_default_constructible> - : conjunction, is_default_constructible> {}; - -template -struct is_default_constructible> - : conjunction...> {}; - -template -struct is_default_constructible> - : conjunction...> {}; - - -template -struct is_constructible : std::is_constructible {}; - -template -struct is_constructible> : is_default_constructible> {}; - -template -struct is_constructible> : is_default_constructible> {}; - -template -struct is_constructible> : is_default_constructible> {}; - -template -struct is_constructible> : is_default_constructible> {}; - - -template -struct is_iterator_traits : std::false_type {}; - -template -struct is_iterator_traits> -{ - private: - using traits = iterator_traits; - - public: - static constexpr auto value = - is_detected::value && - is_detected::value && - is_detected::value && - is_detected::value && - is_detected::value; -}; - -template -struct is_range -{ - private: - using t_ref = typename std::add_lvalue_reference::type; - - using iterator = detected_t; - using sentinel = detected_t; - - // to be 100% correct, it should use https://en.cppreference.com/w/cpp/iterator/input_or_output_iterator - // and https://en.cppreference.com/w/cpp/iterator/sentinel_for - // but reimplementing these would be too much work, as a lot of other concepts are used underneath - static constexpr auto is_iterator_begin = - is_iterator_traits>::value; - - public: - static constexpr bool value = !std::is_same::value && !std::is_same::value && is_iterator_begin; -}; - -template -using iterator_t = enable_if_t::value, result_of_begin())>>; - -template -using range_value_t = value_type_t>>; - -// The following implementation of is_complete_type is taken from -// https://blogs.msdn.microsoft.com/vcblog/2015/12/02/partial-support-for-expression-sfinae-in-vs-2015-update-1/ -// and is written by Xiang Fan who agreed to using it in this library. - -template -struct is_complete_type : std::false_type {}; - -template -struct is_complete_type : std::true_type {}; - -template -struct is_compatible_object_type_impl : std::false_type {}; - -template -struct is_compatible_object_type_impl < - BasicJsonType, CompatibleObjectType, - enable_if_t < is_detected::value&& - is_detected::value >> -{ - using object_t = typename BasicJsonType::object_t; - - // macOS's is_constructible does not play well with nonesuch... - static constexpr bool value = - is_constructible::value && - is_constructible::value; -}; - -template -struct is_compatible_object_type - : is_compatible_object_type_impl {}; - -template -struct is_constructible_object_type_impl : std::false_type {}; - -template -struct is_constructible_object_type_impl < - BasicJsonType, ConstructibleObjectType, - enable_if_t < is_detected::value&& - is_detected::value >> -{ - using object_t = typename BasicJsonType::object_t; - - static constexpr bool value = - (is_default_constructible::value && - (std::is_move_assignable::value || - std::is_copy_assignable::value) && - (is_constructible::value && - std::is_same < - typename object_t::mapped_type, - typename ConstructibleObjectType::mapped_type >::value)) || - (has_from_json::value || - has_non_default_from_json < - BasicJsonType, - typename ConstructibleObjectType::mapped_type >::value); -}; - -template -struct is_constructible_object_type - : is_constructible_object_type_impl {}; - -template -struct is_compatible_string_type -{ - static constexpr auto value = - is_constructible::value; -}; - -template -struct is_constructible_string_type -{ - // launder type through decltype() to fix compilation failure on ICPC -#ifdef __INTEL_COMPILER - using laundered_type = decltype(std::declval()); -#else - using laundered_type = ConstructibleStringType; -#endif - - static constexpr auto value = - conjunction < - is_constructible, - is_detected_exact>::value; -}; - -template -struct is_compatible_array_type_impl : std::false_type {}; - -template -struct is_compatible_array_type_impl < - BasicJsonType, CompatibleArrayType, - enable_if_t < - is_detected::value&& - is_iterator_traits>>::value&& -// special case for types like std::filesystem::path whose iterator's value_type are themselves -// c.f. https://github.com/nlohmann/json/pull/3073 - !std::is_same>::value >> -{ - static constexpr bool value = - is_constructible>::value; -}; - -template -struct is_compatible_array_type - : is_compatible_array_type_impl {}; - -template -struct is_constructible_array_type_impl : std::false_type {}; - -template -struct is_constructible_array_type_impl < - BasicJsonType, ConstructibleArrayType, - enable_if_t::value >> - : std::true_type {}; - -template -struct is_constructible_array_type_impl < - BasicJsonType, ConstructibleArrayType, - enable_if_t < !std::is_same::value&& - !is_compatible_string_type::value&& - is_default_constructible::value&& -(std::is_move_assignable::value || - std::is_copy_assignable::value)&& -is_detected::value&& -is_iterator_traits>>::value&& -is_detected::value&& -// special case for types like std::filesystem::path whose iterator's value_type are themselves -// c.f. https://github.com/nlohmann/json/pull/3073 -!std::is_same>::value&& - is_complete_type < - detected_t>::value >> -{ - using value_type = range_value_t; - - static constexpr bool value = - std::is_same::value || - has_from_json::value || - has_non_default_from_json < - BasicJsonType, - value_type >::value; -}; - -template -struct is_constructible_array_type - : is_constructible_array_type_impl {}; - -template -struct is_compatible_integer_type_impl : std::false_type {}; - -template -struct is_compatible_integer_type_impl < - RealIntegerType, CompatibleNumberIntegerType, - enable_if_t < std::is_integral::value&& - std::is_integral::value&& - !std::is_same::value >> -{ - // is there an assert somewhere on overflows? - using RealLimits = std::numeric_limits; - using CompatibleLimits = std::numeric_limits; - - static constexpr auto value = - is_constructible::value && - CompatibleLimits::is_integer && - RealLimits::is_signed == CompatibleLimits::is_signed; -}; - -template -struct is_compatible_integer_type - : is_compatible_integer_type_impl {}; - -template -struct is_compatible_type_impl: std::false_type {}; - -template -struct is_compatible_type_impl < - BasicJsonType, CompatibleType, - enable_if_t::value >> -{ - static constexpr bool value = - has_to_json::value; -}; - -template -struct is_compatible_type - : is_compatible_type_impl {}; - -template -struct is_constructible_tuple : std::false_type {}; - -template -struct is_constructible_tuple> : conjunction...> {}; - -template -struct is_json_iterator_of : std::false_type {}; - -template -struct is_json_iterator_of : std::true_type {}; - -template -struct is_json_iterator_of : std::true_type -{}; - -// checks if a given type T is a template specialization of Primary -template