├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── README.md ├── README_en.md ├── cmake ├── Findexiv2.cmake ├── Findglog.cmake └── toolchain-aarch64-linux.cmake ├── configs ├── cameras_face_detect.json ├── cameras_face_recognition.json ├── cameras_multi.json ├── cameras_openpose.json ├── cameras_ppyoloe.json ├── cameras_retinaface.json ├── cameras_video_stitch.json ├── cameras_yolact.json └── cameras_yolov5.json ├── data └── .gitkeep ├── docs ├── docs_en │ ├── FAQ_en.md │ ├── arm_pcie_en.md │ ├── arm_soc_en.md │ ├── face_detect_en.md │ ├── face_recognition_en.md │ ├── multi_en.md │ ├── openpose_en.md │ ├── pipeline_client_visualization_en.md │ ├── ppyoloe_en.md │ ├── retinaface_en.md │ ├── video_stitch_en.md │ ├── yolact_en.md │ └── yolov5_en.md ├── docs_zh │ ├── FAQ.md │ ├── arm_pcie.md │ ├── arm_soc.md │ ├── face_detect.md │ ├── face_recognition.md │ ├── multi.md │ ├── openpose.md │ ├── pipeline_client_visualization.md │ ├── ppyoloe.md │ ├── retinaface.md │ ├── video_stitch.md │ ├── yolact.md │ └── yolov5.md └── pics │ ├── faq │ ├── pipeline_client_bmffmpeg.jpg │ └── pipeline_client_rtsp_decode_failed.png │ ├── pipeline_client_ui.jpg │ └── sophon-pipeline.png ├── examples ├── CMakeLists.txt ├── common │ ├── configuration.h │ ├── inference.h │ ├── inference3.h │ └── inference_serial.h ├── face_detect │ ├── CMakeLists.txt │ ├── face_detector.cpp │ ├── face_detector.h │ ├── main.cpp │ ├── worker.cpp │ └── worker.h ├── face_recognition │ ├── CMakeLists.txt │ ├── face_common.h │ ├── face_detector.cpp │ ├── face_detector.h │ ├── face_extract.cpp │ ├── face_extract.h │ ├── face_landmark.cpp │ ├── face_landmark.h │ ├── face_worker.cpp │ ├── face_worker.h │ └── main.cpp ├── multi │ ├── CMakeLists.txt │ ├── main.cpp │ ├── worker.cpp │ ├── worker.h │ ├── yolov5s.cpp │ └── yolov5s.h ├── openpose │ ├── CMakeLists.txt │ ├── main.cpp │ ├── openpose.cpp │ ├── openpose.h │ ├── pose_postprocess.cpp │ ├── pose_postprocess.h │ ├── worker.cpp │ └── worker.h ├── ppyoloe │ ├── CMakeLists.txt │ ├── main.cpp │ ├── ppyoloe.cpp │ ├── ppyoloe.h │ ├── worker.cpp │ └── worker.h ├── retinaface │ ├── CMakeLists.txt │ ├── macros.h │ ├── main.cpp │ ├── retinaface.cpp │ ├── retinaface.h │ ├── worker.cpp │ └── worker.h ├── video_stitch │ ├── CMakeLists.txt │ ├── encoder.cpp │ ├── encoder.h │ ├── main.cpp │ ├── make_unique.hpp │ ├── rtsp │ │ ├── BTRTSPServer.cpp │ │ ├── BTRTSPServer.h │ │ ├── H264FrameSource.cpp │ │ ├── H264FrameSource.h │ │ ├── H264QueMediaSubsession.cpp │ │ ├── H264QueMediaSubsession.h │ │ ├── Live555RtspServer.cpp │ │ └── Live555RtspServer.h │ ├── stitch.cpp │ ├── stitch.h │ ├── test.cpp │ ├── worker.cpp │ ├── worker.h │ ├── yolov5s.cpp │ └── yolov5s.h ├── yolact │ ├── CMakeLists.txt │ ├── main.cpp │ ├── worker.cpp │ ├── worker.h │ ├── yolact.cpp │ └── yolact.h └── yolov5 │ ├── CMakeLists.txt │ ├── main.cpp │ ├── worker.cpp │ ├── worker.h │ ├── yolov5s.cpp │ └── yolov5s.h ├── modules ├── CMakeLists.txt ├── bmgui-lite │ ├── CMakeLists.txt │ ├── bmgui-lite.h │ ├── window_QT.cpp │ └── window_QT.h ├── bmgui │ ├── CMakeLists.txt │ ├── bmgui.cpp │ ├── bmgui.h │ ├── bmgui_unittest.cpp │ ├── container_widget.cpp │ ├── container_widget.h │ ├── container_widget.ui │ ├── mainwindow.cpp │ ├── mainwindow.h │ ├── mainwindow.ui │ ├── qtgui_utils.h │ ├── video_opengl_widget.cpp │ ├── video_opengl_widget.h │ ├── video_pixmap_widget.cpp │ ├── video_pixmap_widget.h │ ├── video_pixmap_widget.ui │ ├── video_render.h │ ├── video_widget.cpp │ ├── video_widget.h │ ├── video_widget.ui │ ├── videoui.cpp │ ├── videoui.h │ └── videoui.pro ├── bmutility │ ├── CMakeLists.txt │ ├── base64_unittest.cpp │ ├── bm_wrapper.hpp │ ├── bmutility.cpp │ ├── bmutility.h │ ├── bmutility_basemodel.hpp │ ├── bmutility_image.h │ ├── bmutility_list.h │ ├── bmutility_pool.cpp │ ├── bmutility_pool.h │ ├── bmutility_profile.h │ ├── bmutility_string.cpp │ ├── bmutility_string.h │ ├── bmutility_timer.cpp │ ├── bmutility_timer.h │ ├── bmutility_types.h │ ├── ffmpeg_global.h │ ├── stream_cvdecode.cpp │ ├── stream_cvdecode.h │ ├── stream_decode.cpp │ ├── stream_decode.h │ ├── stream_demuxer.cpp │ ├── stream_demuxer.h │ ├── stream_pusher.h │ ├── stream_sei.cpp │ ├── stream_sei.h │ └── stream_unittest.cpp ├── thread_queue.h └── tracker │ ├── CMakeLists.txt │ ├── DeepAppearanceDescriptor │ ├── FeatureTensor.cpp │ ├── FeatureTensor.h │ ├── dataType.h │ ├── model.cpp │ └── model.h │ ├── KalmanFilter │ ├── kalmanfilter.cpp │ ├── kalmanfilter.h │ ├── linear_assignment.cpp │ ├── linear_assignment.h │ ├── nn_matching.cpp │ ├── nn_matching.h │ ├── track.cpp │ ├── track.h │ ├── tracker.cpp │ └── tracker.h │ ├── MunkresAssignment │ ├── hungarianoper.cpp │ ├── hungarianoper.h │ └── munkres │ │ ├── matrix.h │ │ ├── munkres.cpp │ │ └── munkres.h │ ├── bm_tracker.cpp │ └── bm_tracker.h ├── third_party ├── jsoncpp │ ├── CMakeLists.txt │ ├── json │ │ ├── assertions.h │ │ ├── autolink.h │ │ ├── config.h │ │ ├── features.h │ │ ├── forwards.h │ │ ├── json.h │ │ ├── reader.h │ │ ├── value.h │ │ ├── version.h │ │ └── writer.h │ ├── json_reader.cpp │ ├── json_tool.h │ ├── json_value.cpp │ ├── json_valueiterator.inl │ └── json_writer.cpp └── live555 │ ├── #config.macosx# │ ├── BasicUsageEnvironment │ ├── BasicHashTable.cpp │ ├── BasicTaskScheduler.cpp │ ├── BasicTaskScheduler0.cpp │ ├── BasicUsageEnvironment.cpp │ ├── BasicUsageEnvironment0.cpp │ ├── COPYING │ ├── COPYING.LESSER │ ├── DelayQueue.cpp │ ├── Makefile │ ├── Makefile.head │ ├── Makefile.tail │ └── include │ │ ├── BasicHashTable.hh │ │ ├── BasicUsageEnvironment.hh │ │ ├── BasicUsageEnvironment0.hh │ │ ├── BasicUsageEnvironment_version.hh │ │ ├── DelayQueue.hh │ │ └── HandlerSet.hh │ ├── CMakeLists.txt │ ├── COPYING │ ├── COPYING.LESSER │ ├── Makefile │ ├── Makefile.head │ ├── Makefile.tail │ ├── README │ ├── UsageEnvironment │ ├── COPYING │ ├── COPYING.LESSER │ ├── HashTable.cpp │ ├── Makefile │ ├── Makefile.head │ ├── Makefile.tail │ ├── UsageEnvironment.cpp │ ├── include │ │ ├── Boolean.hh │ │ ├── HashTable.hh │ │ ├── UsageEnvironment.hh │ │ ├── UsageEnvironment_version.hh │ │ └── strDup.hh │ └── strDup.cpp │ ├── WindowsAudioInputDevice │ ├── WindowsAudioInputDevice.mak │ ├── WindowsAudioInputDevice_common.cpp │ ├── WindowsAudioInputDevice_common.hh │ ├── WindowsAudioInputDevice_mixer.cpp │ ├── WindowsAudioInputDevice_mixer.hh │ ├── WindowsAudioInputDevice_noMixer.cpp │ ├── WindowsAudioInputDevice_noMixer.hh │ └── showAudioInputPorts.cpp │ ├── config.aix │ ├── config.alpha │ ├── config.armeb-uclibc │ ├── config.armlinux │ ├── config.avr32-linux │ ├── config.bfin-linux-uclibc │ ├── config.bfin-uclinux │ ├── config.bsplinux │ ├── config.cris-axis-linux-gnu │ ├── config.cygwin │ ├── config.cygwin-for-vlc │ ├── config.freebsd │ ├── config.iphone-simulator │ ├── config.iphoneos │ ├── config.irix │ ├── config.linux │ ├── config.linux-64bit │ ├── config.linux-gdb │ ├── config.linux-with-shared-libraries │ ├── config.macosx │ ├── config.macosx-32bit │ ├── config.macosx-before-version-10.4 │ ├── config.mingw │ ├── config.openbsd │ ├── config.qnx4 │ ├── config.solaris-32bit │ ├── config.solaris-64bit │ ├── config.sunos │ ├── config.uClinux │ ├── configure │ ├── fix-makefile │ ├── genMakefiles │ ├── genWindowsMakefiles │ ├── genWindowsMakefiles.cmd │ ├── groupsock │ ├── COPYING │ ├── COPYING.LESSER │ ├── GroupEId.cpp │ ├── Groupsock.cpp │ ├── GroupsockHelper.cpp │ ├── IOHandlers.cpp │ ├── Makefile │ ├── Makefile.head │ ├── Makefile.tail │ ├── NetAddress.cpp │ ├── NetInterface.cpp │ ├── include │ │ ├── GroupEId.hh │ │ ├── Groupsock.hh │ │ ├── GroupsockHelper.hh │ │ ├── IOHandlers.hh │ │ ├── NetAddress.hh │ │ ├── NetCommon.h │ │ ├── NetInterface.hh │ │ ├── TunnelEncaps.hh │ │ └── groupsock_version.hh │ └── inet.c │ ├── liveMedia │ ├── 1 │ ├── AC3AudioFileServerMediaSubsession.cpp │ ├── AC3AudioRTPSink.cpp │ ├── AC3AudioRTPSource.cpp │ ├── AC3AudioStreamFramer.cpp │ ├── ADTSAudioFileServerMediaSubsession.cpp │ ├── ADTSAudioFileSource.cpp │ ├── AMRAudioFileServerMediaSubsession.cpp │ ├── AMRAudioFileSink.cpp │ ├── AMRAudioFileSource.cpp │ ├── AMRAudioRTPSink.cpp │ ├── AMRAudioRTPSource.cpp │ ├── AMRAudioSource.cpp │ ├── AVIFileSink.cpp │ ├── AudioInputDevice.cpp │ ├── AudioRTPSink.cpp │ ├── Base64.cpp │ ├── BasicUDPSink.cpp │ ├── BasicUDPSource.cpp │ ├── BitVector.cpp │ ├── ByteStreamFileSource.cpp │ ├── ByteStreamMemoryBufferSource.cpp │ ├── ByteStreamMultiFileSource.cpp │ ├── COPYING │ ├── COPYING.LESSER │ ├── DVVideoFileServerMediaSubsession.cpp │ ├── DVVideoRTPSink.cpp │ ├── DVVideoRTPSource.cpp │ ├── DVVideoStreamFramer.cpp │ ├── DeviceSource.cpp │ ├── DigestAuthentication.cpp │ ├── EBMLNumber.cpp │ ├── EBMLNumber.hh │ ├── EBMLNumber.hh.orig │ ├── FileServerMediaSubsession.cpp │ ├── FileSink.cpp │ ├── FramedFileSource.cpp │ ├── FramedFilter.cpp │ ├── FramedSource.cpp │ ├── GSMAudioRTPSink.cpp │ ├── GenericMediaServer.cpp │ ├── H261VideoRTPSource.cpp │ ├── H263plusVideoFileServerMediaSubsession.cpp │ ├── H263plusVideoRTPSink.cpp │ ├── H263plusVideoRTPSource.cpp │ ├── H263plusVideoStreamFramer.cpp │ ├── H263plusVideoStreamParser.cpp │ ├── H263plusVideoStreamParser.hh │ ├── H264VideoFileServerMediaSubsession.cpp │ ├── H264VideoFileSink.cpp │ ├── H264VideoRTPSink.cpp │ ├── H264VideoRTPSource.cpp │ ├── H264VideoStreamDiscreteFramer.cpp │ ├── H264VideoStreamFramer.cpp │ ├── H264or5VideoFileSink.cpp │ ├── H264or5VideoRTPSink.cpp │ ├── H264or5VideoStreamDiscreteFramer.cpp │ ├── H264or5VideoStreamFramer.cpp │ ├── H265VideoFileServerMediaSubsession.cpp │ ├── H265VideoFileSink.cpp │ ├── H265VideoRTPSink.cpp │ ├── H265VideoRTPSource.cpp │ ├── H265VideoStreamDiscreteFramer.cpp │ ├── H265VideoStreamFramer.cpp │ ├── InputFile.cpp │ ├── JPEGVideoRTPSink.cpp │ ├── JPEGVideoRTPSource.cpp │ ├── JPEGVideoSource.cpp │ ├── Locale.cpp │ ├── MP3ADU.cpp │ ├── MP3ADURTPSink.cpp │ ├── MP3ADURTPSource.cpp │ ├── MP3ADUTranscoder.cpp │ ├── MP3ADUdescriptor.cpp │ ├── MP3ADUdescriptor.hh │ ├── MP3ADUinterleaving.cpp │ ├── MP3AudioFileServerMediaSubsession.cpp │ ├── MP3AudioMatroskaFileServerMediaSubsession.cpp │ ├── MP3AudioMatroskaFileServerMediaSubsession.hh │ ├── MP3FileSource.cpp │ ├── MP3Internals.cpp │ ├── MP3Internals.hh │ ├── MP3InternalsHuffman.cpp │ ├── MP3InternalsHuffman.hh │ ├── MP3InternalsHuffmanTable.cpp │ ├── MP3StreamState.cpp │ ├── MP3StreamState.hh │ ├── MP3Transcoder.cpp │ ├── MPEG1or2AudioRTPSink.cpp │ ├── MPEG1or2AudioRTPSource.cpp │ ├── MPEG1or2AudioStreamFramer.cpp │ ├── MPEG1or2Demux.cpp │ ├── MPEG1or2DemuxedElementaryStream.cpp │ ├── MPEG1or2DemuxedServerMediaSubsession.cpp │ ├── MPEG1or2FileServerDemux.cpp │ ├── MPEG1or2VideoFileServerMediaSubsession.cpp │ ├── MPEG1or2VideoRTPSink.cpp │ ├── MPEG1or2VideoRTPSource.cpp │ ├── MPEG1or2VideoStreamDiscreteFramer.cpp │ ├── MPEG1or2VideoStreamFramer.cpp │ ├── MPEG2IndexFromTransportStream.cpp │ ├── MPEG2TransportFileServerMediaSubsession.cpp │ ├── MPEG2TransportStreamAccumulator.cpp │ ├── MPEG2TransportStreamFramer.cpp │ ├── MPEG2TransportStreamFromESSource.cpp │ ├── MPEG2TransportStreamFromPESSource.cpp │ ├── MPEG2TransportStreamIndexFile.cpp │ ├── MPEG2TransportStreamMultiplexor.cpp │ ├── MPEG2TransportStreamTrickModeFilter.cpp │ ├── MPEG2TransportUDPServerMediaSubsession.cpp │ ├── MPEG4ESVideoRTPSink.cpp │ ├── MPEG4ESVideoRTPSource.cpp │ ├── MPEG4GenericRTPSink.cpp │ ├── MPEG4GenericRTPSource.cpp │ ├── MPEG4LATMAudioRTPSink.cpp │ ├── MPEG4LATMAudioRTPSource.cpp │ ├── MPEG4VideoFileServerMediaSubsession.cpp │ ├── MPEG4VideoStreamDiscreteFramer.cpp │ ├── MPEG4VideoStreamFramer.cpp │ ├── MPEGVideoStreamFramer.cpp │ ├── MPEGVideoStreamParser.cpp │ ├── MPEGVideoStreamParser.hh │ ├── Makefile │ ├── Makefile.head │ ├── Makefile.tail │ ├── Makefile.tail.orig │ ├── MatroskaDemuxedTrack.cpp │ ├── MatroskaDemuxedTrack.hh │ ├── MatroskaFile.cpp │ ├── MatroskaFile.cpp.orig │ ├── MatroskaFileParser.cpp │ ├── MatroskaFileParser.cpp.orig │ ├── MatroskaFileParser.hh │ ├── MatroskaFileServerDemux.cpp │ ├── MatroskaFileServerMediaSubsession.cpp │ ├── MatroskaFileServerMediaSubsession.hh │ ├── Media.cpp │ ├── MediaSession.cpp │ ├── MediaSink.cpp │ ├── MediaSource.cpp │ ├── MultiFramedRTPSink.cpp │ ├── MultiFramedRTPSource.cpp │ ├── OggDemuxedTrack.cpp │ ├── OggDemuxedTrack.hh │ ├── OggFile.cpp │ ├── OggFileParser.cpp │ ├── OggFileParser.hh │ ├── OggFileServerDemux.cpp │ ├── OggFileServerMediaSubsession.cpp │ ├── OggFileServerMediaSubsession.hh │ ├── OggFileSink.cpp │ ├── OnDemandServerMediaSubsession.cpp │ ├── OutputFile.cpp │ ├── PassiveServerMediaSubsession.cpp │ ├── ProxyServerMediaSession.cpp │ ├── QCELPAudioRTPSource.cpp │ ├── QuickTimeFileSink.cpp │ ├── QuickTimeGenericRTPSource.cpp │ ├── RTCP.cpp │ ├── RTPInterface.cpp │ ├── RTPSink.cpp │ ├── RTPSource.cpp │ ├── RTSPClient.cpp │ ├── RTSPCommon.cpp │ ├── RTSPRegisterSender.cpp │ ├── RTSPServer.cpp │ ├── RTSPServerRegister.cpp │ ├── RTSPServerSupportingHTTPStreaming.cpp │ ├── RawVideoRTPSink.cpp │ ├── RawVideoRTPSink.cpp.orig │ ├── RawVideoRTPSource.cpp │ ├── SIPClient.cpp │ ├── ServerMediaSession.cpp │ ├── SimpleRTPSink.cpp │ ├── SimpleRTPSource.cpp │ ├── StreamParser.cpp │ ├── StreamParser.hh │ ├── StreamReplicator.cpp │ ├── T140TextRTPSink.cpp │ ├── TCPStreamSink.cpp │ ├── TextRTPSink.cpp │ ├── TheoraVideoRTPSink.cpp │ ├── TheoraVideoRTPSource.cpp │ ├── VP8VideoRTPSink.cpp │ ├── VP8VideoRTPSource.cpp │ ├── VP9VideoRTPSink.cpp │ ├── VP9VideoRTPSource.cpp │ ├── VideoRTPSink.cpp │ ├── VorbisAudioRTPSink.cpp │ ├── VorbisAudioRTPSource.cpp │ ├── WAVAudioFileServerMediaSubsession.cpp │ ├── WAVAudioFileSource.cpp │ ├── include │ │ ├── AC3AudioFileServerMediaSubsession.hh │ │ ├── AC3AudioRTPSink.hh │ │ ├── AC3AudioRTPSource.hh │ │ ├── AC3AudioStreamFramer.hh │ │ ├── ADTSAudioFileServerMediaSubsession.hh │ │ ├── ADTSAudioFileSource.hh │ │ ├── AMRAudioFileServerMediaSubsession.hh │ │ ├── AMRAudioFileSink.hh │ │ ├── AMRAudioFileSource.hh │ │ ├── AMRAudioRTPSink.hh │ │ ├── AMRAudioRTPSource.hh │ │ ├── AMRAudioSource.hh │ │ ├── AVIFileSink.hh │ │ ├── AudioInputDevice.hh │ │ ├── AudioRTPSink.hh │ │ ├── Base64.hh │ │ ├── BasicUDPSink.hh │ │ ├── BasicUDPSource.hh │ │ ├── BitVector.hh │ │ ├── ByteStreamFileSource.hh │ │ ├── ByteStreamMemoryBufferSource.hh │ │ ├── ByteStreamMultiFileSource.hh │ │ ├── DVVideoFileServerMediaSubsession.hh │ │ ├── DVVideoRTPSink.hh │ │ ├── DVVideoRTPSource.hh │ │ ├── DVVideoStreamFramer.hh │ │ ├── DeviceSource.hh │ │ ├── DigestAuthentication.hh │ │ ├── FileServerMediaSubsession.hh │ │ ├── FileSink.hh │ │ ├── FramedFileSource.hh │ │ ├── FramedFilter.hh │ │ ├── FramedSource.hh │ │ ├── GSMAudioRTPSink.hh │ │ ├── GenericMediaServer.hh │ │ ├── H261VideoRTPSource.hh │ │ ├── H263plusVideoFileServerMediaSubsession.hh │ │ ├── H263plusVideoRTPSink.hh │ │ ├── H263plusVideoRTPSource.hh │ │ ├── H263plusVideoStreamFramer.hh │ │ ├── H264VideoFileServerMediaSubsession.hh │ │ ├── H264VideoFileSink.hh │ │ ├── H264VideoRTPSink.hh │ │ ├── H264VideoRTPSource.hh │ │ ├── H264VideoStreamDiscreteFramer.hh │ │ ├── H264VideoStreamFramer.hh │ │ ├── H264or5VideoFileSink.hh │ │ ├── H264or5VideoRTPSink.hh │ │ ├── H264or5VideoStreamDiscreteFramer.hh │ │ ├── H264or5VideoStreamFramer.hh │ │ ├── H265VideoFileServerMediaSubsession.hh │ │ ├── H265VideoFileSink.hh │ │ ├── H265VideoRTPSink.hh │ │ ├── H265VideoRTPSource.hh │ │ ├── H265VideoStreamDiscreteFramer.hh │ │ ├── H265VideoStreamFramer.hh │ │ ├── InputFile.hh │ │ ├── JPEGVideoRTPSink.hh │ │ ├── JPEGVideoRTPSource.hh │ │ ├── JPEGVideoSource.hh │ │ ├── Locale.hh │ │ ├── MP3ADU.hh │ │ ├── MP3ADURTPSink.hh │ │ ├── MP3ADURTPSource.hh │ │ ├── MP3ADUTranscoder.hh │ │ ├── MP3ADUinterleaving.hh │ │ ├── MP3AudioFileServerMediaSubsession.hh │ │ ├── MP3FileSource.hh │ │ ├── MP3Transcoder.hh │ │ ├── MPEG1or2AudioRTPSink.hh │ │ ├── MPEG1or2AudioRTPSource.hh │ │ ├── MPEG1or2AudioStreamFramer.hh │ │ ├── MPEG1or2Demux.hh │ │ ├── MPEG1or2DemuxedElementaryStream.hh │ │ ├── MPEG1or2DemuxedServerMediaSubsession.hh │ │ ├── MPEG1or2FileServerDemux.hh │ │ ├── MPEG1or2VideoFileServerMediaSubsession.hh │ │ ├── MPEG1or2VideoRTPSink.hh │ │ ├── MPEG1or2VideoRTPSource.hh │ │ ├── MPEG1or2VideoStreamDiscreteFramer.hh │ │ ├── MPEG1or2VideoStreamFramer.hh │ │ ├── MPEG2IndexFromTransportStream.hh │ │ ├── MPEG2TransportFileServerMediaSubsession.hh │ │ ├── MPEG2TransportStreamAccumulator.hh │ │ ├── MPEG2TransportStreamFramer.hh │ │ ├── MPEG2TransportStreamFromESSource.hh │ │ ├── MPEG2TransportStreamFromPESSource.hh │ │ ├── MPEG2TransportStreamIndexFile.hh │ │ ├── MPEG2TransportStreamMultiplexor.hh │ │ ├── MPEG2TransportStreamTrickModeFilter.hh │ │ ├── MPEG2TransportUDPServerMediaSubsession.hh │ │ ├── MPEG4ESVideoRTPSink.hh │ │ ├── MPEG4ESVideoRTPSource.hh │ │ ├── MPEG4GenericRTPSink.hh │ │ ├── MPEG4GenericRTPSource.hh │ │ ├── MPEG4LATMAudioRTPSink.hh │ │ ├── MPEG4LATMAudioRTPSource.hh │ │ ├── MPEG4VideoFileServerMediaSubsession.hh │ │ ├── MPEG4VideoStreamDiscreteFramer.hh │ │ ├── MPEG4VideoStreamFramer.hh │ │ ├── MPEGVideoStreamFramer.hh │ │ ├── MatroskaFile.hh │ │ ├── MatroskaFile.hh.orig │ │ ├── MatroskaFileServerDemux.hh │ │ ├── Media.hh │ │ ├── MediaSession.hh │ │ ├── MediaSink.hh │ │ ├── MediaSource.hh │ │ ├── MediaTranscodingTable.hh │ │ ├── MultiFramedRTPSink.hh │ │ ├── MultiFramedRTPSource.hh │ │ ├── OggFile.hh │ │ ├── OggFileServerDemux.hh │ │ ├── OggFileSink.hh │ │ ├── OnDemandServerMediaSubsession.hh │ │ ├── OutputFile.hh │ │ ├── PassiveServerMediaSubsession.hh │ │ ├── ProxyServerMediaSession.hh │ │ ├── ProxyServerMediaSession.hh.orig │ │ ├── QCELPAudioRTPSource.hh │ │ ├── QuickTimeFileSink.hh │ │ ├── QuickTimeGenericRTPSource.hh │ │ ├── RTCP.hh │ │ ├── RTPInterface.hh │ │ ├── RTPSink.hh │ │ ├── RTPSource.hh │ │ ├── RTSPClient.hh │ │ ├── RTSPCommon.hh │ │ ├── RTSPRegisterSender.hh │ │ ├── RTSPServer.hh │ │ ├── RTSPServerSupportingHTTPStreaming.hh │ │ ├── RawVideoRTPSink.hh │ │ ├── RawVideoRTPSink.hh.orig │ │ ├── RawVideoRTPSource.hh │ │ ├── SIPClient.hh │ │ ├── ServerMediaSession.hh │ │ ├── SimpleRTPSink.hh │ │ ├── SimpleRTPSource.hh │ │ ├── StreamReplicator.hh │ │ ├── T140TextRTPSink.hh │ │ ├── TCPStreamSink.hh │ │ ├── TextRTPSink.hh │ │ ├── TheoraVideoRTPSink.hh │ │ ├── TheoraVideoRTPSource.hh │ │ ├── VP8VideoRTPSink.hh │ │ ├── VP8VideoRTPSource.hh │ │ ├── VP9VideoRTPSink.hh │ │ ├── VP9VideoRTPSource.hh │ │ ├── VideoRTPSink.hh │ │ ├── VorbisAudioRTPSink.hh │ │ ├── VorbisAudioRTPSource.hh │ │ ├── WAVAudioFileServerMediaSubsession.hh │ │ ├── WAVAudioFileSource.hh │ │ ├── liveMedia.hh │ │ ├── liveMedia.hh.orig │ │ ├── liveMedia_version.hh │ │ ├── ourMD5.hh │ │ └── uLawAudioFilter.hh │ ├── ourMD5.cpp │ ├── rtcp_from_spec.c │ ├── rtcp_from_spec.h │ ├── stGDDpcY │ └── uLawAudioFilter.cpp │ ├── mediaServer │ ├── COPYING │ ├── COPYING.LESSER │ ├── DynamicRTSPServer.cpp │ ├── DynamicRTSPServer.hh │ ├── Makefile │ ├── Makefile.head │ ├── Makefile.tail │ ├── live555MediaServer.cpp │ └── version.hh │ ├── proxyServer │ ├── COPYING │ ├── COPYING.LESSER │ ├── Makefile │ ├── Makefile.head │ ├── Makefile.tail │ └── live555ProxyServer.cpp │ ├── testProgs │ ├── COPYING │ ├── COPYING.LESSER │ ├── MPEG2TransportStreamIndexer.cpp │ ├── Makefile │ ├── Makefile.head │ ├── Makefile.tail │ ├── openRTSP.cpp │ ├── playCommon.cpp │ ├── playCommon.hh │ ├── playSIP.cpp │ ├── registerRTSPStream.cpp │ ├── sapWatch.cpp │ ├── testAMRAudioStreamer.cpp │ ├── testDVVideoStreamer.cpp │ ├── testGSMStreamer.cpp │ ├── testH264VideoStreamer.cpp │ ├── testH264VideoToTransportStream.cpp │ ├── testH265VideoStreamer.cpp │ ├── testH265VideoToTransportStream.cpp │ ├── testMKVStreamer.cpp │ ├── testMP3-using-ADUs.sdp │ ├── testMP3.sdp │ ├── testMP3Receiver.cpp │ ├── testMP3Streamer.cpp │ ├── testMPEG1or2AudioVideo.sdp │ ├── testMPEG1or2AudioVideoStreamer.cpp │ ├── testMPEG1or2ProgramToTransportStream.cpp │ ├── testMPEG1or2Splitter.cpp │ ├── testMPEG1or2Video.sdp │ ├── testMPEG1or2VideoReceiver.cpp │ ├── testMPEG1or2VideoStreamer.cpp │ ├── testMPEG2Transport.sdp │ ├── testMPEG2TransportReceiver.cpp │ ├── testMPEG2TransportStreamTrickPlay.cpp │ ├── testMPEG2TransportStreamer.cpp │ ├── testMPEG4VideoStreamer.cpp │ ├── testOggStreamer.cpp │ ├── testOnDemandRTSPServer.cpp │ ├── testRTSPClient.cpp │ ├── testRelay.cpp │ ├── testReplicator.cpp │ ├── testWAVAudioStreamer.cpp │ └── vobStreamer.cpp │ ├── win32config │ └── win32config.Borland └── tools ├── compile.sh └── release.sh /.gitignore: -------------------------------------------------------------------------------- 1 | _build 2 | cmake-build-debug 3 | release -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | SOPHGO is pleased to support the open source community by making SOPHON-PIPELINE available. 2 | 3 | Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | 5 | SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the third-party components. 6 | 7 | Terms of the 2-Clause BSD License: 8 | -------------------------------------------------------------------- 9 | Copyright 10 | 11 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 14 | 15 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18 | -------------------------------------------------------------------------------- /cmake/Findexiv2.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_library(exiv2_LIBRARY exiv2) 4 | find_path(exiv2_INCLUDE_DIR exiv2/exiv2.hpp) 5 | 6 | find_package_handle_standard_args( 7 | exiv2 8 | FOUND_VAR exiv2_FOUND 9 | REQUIRED_VARS exiv2_INCLUDE_DIR exiv2_LIBRARY) 10 | 11 | if (exiv2_FOUND) 12 | if (NOT TARGET exiv2::exiv2) 13 | add_library(exiv2::exiv2 SHARED IMPORTED) 14 | set_target_properties( 15 | exiv2::exiv2 PROPERTIES 16 | IMPORTED_LOCATION "${exiv2_LIBRARY}" 17 | INTERFACE_INCLUDE_DIRECTORIES "${exiv2_INCLUDE_DIR}") 18 | endif() 19 | endif() 20 | -------------------------------------------------------------------------------- /cmake/Findglog.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | set(required_vars glog_LIBRARY glog_INCLUDE_DIR) 4 | set(include_dirs) 5 | if (DEFINED BM_PREBUILT_TOOLCHAINS) 6 | set(path ${BM_PREBUILT_TOOLCHAINS}/${CMAKE_SYSTEM_PROCESSOR}) 7 | find_library(glog_LIBRARY libglog.a PATHS ${path}/glog/lib) 8 | find_path(gflags_INCLUDE_DIR gflags/gflags.h PATHS ${path}/gflags/include NO_DEFAULT_PATH) 9 | list(APPEND required_vars gflags_INCLUDE_DIR) 10 | find_path(glog_INCLUDE_DIR glog/logging.h PATHS ${path}/glog/include) 11 | list(APPEND include_dirs ${gflags_INCLUDE_DIR} ${glog_INCLUDE_DIR}) 12 | else() 13 | find_library(glog_LIBRARY glog) 14 | find_path(glog_INCLUDE_DIR logging.h PATH_SUFFIXES glog) 15 | list(APPEND include_dirs ${glog_INCLUDE_DIR}) 16 | endif() 17 | 18 | find_package_handle_standard_args( 19 | glog 20 | FOUND_VAR glog_FOUND 21 | REQUIRED_VARS ${required_vars}) 22 | 23 | if (glog_FOUND) 24 | if (NOT TARGET glog::glog) 25 | add_library(glog::glog SHARED IMPORTED) 26 | set_target_properties( 27 | glog::glog PROPERTIES 28 | IMPORTED_LOCATION "${glog_LIBRARY}" 29 | INTERFACE_INCLUDE_DIRECTORIES "${include_dirs}") 30 | 31 | if (DEFINED BM_PREBUILT_TOOLCHAINS) 32 | set_target_properties( 33 | glog::glog PROPERTIES 34 | SKIP_BUILD_RPATH TRUE) 35 | endif() 36 | endif() 37 | endif() 38 | -------------------------------------------------------------------------------- /cmake/toolchain-aarch64-linux.cmake: -------------------------------------------------------------------------------- 1 | # set system name and processor type 2 | set(CMAKE_SYSTEM_NAME Linux) 3 | set(CMAKE_SYSTEM_PROCESSOR aarch64) 4 | 5 | # set cross compiler 6 | set(CROSS_COMPILE aarch64-linux-gnu-) 7 | set(CMAKE_C_COMPILER /usr/bin/${CROSS_COMPILE}gcc) 8 | set(CMAKE_CXX_COMPILER /usr/bin/${CROSS_COMPILE}g++) 9 | 10 | # search for programs in the build host dir 11 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | # search lib and header in the target dir 13 | message(${LIBSOPHON_TOP}/3rdparty) 14 | SET(CMAKE_FIND_ROOT_PATH $ENV{REL_TOP}/3rdparty) 15 | SET(CMAKE_CXX_FLAGS "-Wl,--allow-shlib-undefined" CACHE STRING "" FORCE) 16 | set(CMAKE_FIND_ROOT_PATH_LIBRARY ONLY) 17 | set(CMAKE_FIND_ROOT_PATH_INCLUDE ONLY) 18 | # set(CMAKE_C_COMPILER $ENV{BMWS}/bm_prebuilt_toolchains/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc) 19 | # set(CMAKE_CXX_COMPILER $ENV{BMWS}/bm_prebuilt_toolchains/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++) 20 | -------------------------------------------------------------------------------- /configs/cameras_face_detect.json: -------------------------------------------------------------------------------- 1 | { 2 | "cards": [ 3 | { 4 | "devid": 0, 5 | "cameras": [ 6 | { 7 | "address": "./elevator-1080p-25fps-4000kbps.h264", 8 | "chan_num": 1, 9 | "model_names": ["ex1"] 10 | } 11 | ] 12 | } 13 | ], 14 | "pipeline": { 15 | "preprocess": { 16 | "thread_num": 4, 17 | "queue_size": 16 18 | }, 19 | "inference": { 20 | "thread_num": 1, 21 | "queue_size": 16 22 | }, 23 | "postprocess": { 24 | "thread_num": 4, 25 | "queue_size": 16 26 | } 27 | }, 28 | "models":[ 29 | { 30 | "name": "ex1", 31 | "path": "your_bmodel_path.bmodel", 32 | "skip_frame_num": 0, 33 | "output_path": "output_path", 34 | "obj_threshold": 0.05, 35 | "nms_threshold": 0.5 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /configs/cameras_face_recognition.json: -------------------------------------------------------------------------------- 1 | { 2 | "cards": [ 3 | { 4 | "devid": 0, 5 | "cameras": [ 6 | { 7 | "address": "./elevator-1080p-25fps-4000kbps.h264", 8 | "chan_num": 1, 9 | "model_names": ["ex1"] 10 | } 11 | ] 12 | } 13 | ], 14 | "pipeline": { 15 | "preprocess": { 16 | "thread_num": 4, 17 | "queue_size": 16 18 | }, 19 | "inference": { 20 | "thread_num": 1, 21 | "queue_size": 16 22 | }, 23 | "postprocess": { 24 | "thread_num": 4, 25 | "queue_size": 16 26 | } 27 | }, 28 | "models":[ 29 | { 30 | "name": "ex1", 31 | "path": "your_bmodel_path.bmodel", 32 | "skip_frame_num": 0, 33 | "output_path": "output_path", 34 | "obj_threshold": 0.05, 35 | "nms_threshold": 0.3 36 | } 37 | ] 38 | } 39 | 40 | -------------------------------------------------------------------------------- /configs/cameras_multi.json: -------------------------------------------------------------------------------- 1 | { 2 | "cards": [ 3 | { 4 | "devid": 0, 5 | "cameras": [ 6 | { 7 | "address": "./elevator-1080p-25fps-4000kbps.h264", 8 | "chan_num": 1, 9 | "model_names": ["ex1", "ex2"] 10 | } 11 | ] 12 | } 13 | ], 14 | "pipeline": { 15 | "preprocess": { 16 | "thread_num": 4, 17 | "queue_size": 16 18 | }, 19 | "inference": { 20 | "thread_num": 1, 21 | "queue_size": 16 22 | }, 23 | "postprocess": { 24 | "thread_num": 4, 25 | "queue_size": 16 26 | } 27 | }, 28 | "models":[ 29 | { 30 | "name": "ex1", 31 | "path": "your_bmodel_1_path.bmodel", 32 | "skip_frame_num": 1, 33 | 34 | "obj_threshold": 0.5, 35 | "nms_threshold": 0.5, 36 | "class_threshold": 0.5, 37 | "class_num": 80 38 | 39 | }, 40 | { 41 | "name": "ex2", 42 | "path": "your_bmodel_2_path.bmodel", 43 | "skip_frame_num": 1, 44 | 45 | "obj_threshold": 0.5, 46 | "nms_threshold": 0.5, 47 | "class_threshold": 0.5, 48 | "class_num": 80 49 | 50 | } 51 | ] 52 | } -------------------------------------------------------------------------------- /configs/cameras_openpose.json: -------------------------------------------------------------------------------- 1 | { 2 | "cards": [ 3 | { 4 | "devid": 0, 5 | "cameras": [ 6 | { 7 | "address": "./elevator-1080p-25fps-4000kbps.h264", 8 | "chan_num": 1, 9 | "model_names": ["ex1"] 10 | } 11 | ] 12 | } 13 | ], 14 | "pipeline": { 15 | "preprocess": { 16 | "thread_num": 4, 17 | "queue_size": 16 18 | }, 19 | "inference": { 20 | "thread_num": 1, 21 | "queue_size": 16 22 | }, 23 | "postprocess": { 24 | "thread_num": 4, 25 | "queue_size": 16 26 | } 27 | }, 28 | "models":[ 29 | { 30 | "name": "ex1", 31 | "path": "your_bmodel_path.bmodel", 32 | "skip_frame_num": 0, 33 | "output_path": "output_path", 34 | "nms_threshold": 0.05 35 | 36 | } 37 | ] 38 | } 39 | 40 | -------------------------------------------------------------------------------- /configs/cameras_ppyoloe.json: -------------------------------------------------------------------------------- 1 | { 2 | "cards": [ 3 | { 4 | "devid": 0, 5 | "cameras": [ 6 | { 7 | "address": "./elevator-1080p-25fps-4000kbps.h264", 8 | "chan_num": 1, 9 | "model_names": ["ex1"] 10 | } 11 | ] 12 | } 13 | ], 14 | "pipeline": { 15 | "preprocess": { 16 | "thread_num": 4, 17 | "queue_size": 16 18 | }, 19 | "inference": { 20 | "thread_num": 1, 21 | "queue_size": 16 22 | }, 23 | "postprocess": { 24 | "thread_num": 4, 25 | "queue_size": 16 26 | } 27 | }, 28 | "models":[ 29 | { 30 | "name": "ex1", 31 | "path": "your_bmodel_path.bmodel", 32 | "model_type": "ppyoloe", 33 | "skip_frame_num": 0, 34 | "output_path": "output_path", 35 | 36 | "obj_threshold": 0.5, 37 | "nms_threshold": 0.5 38 | 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /configs/cameras_retinaface.json: -------------------------------------------------------------------------------- 1 | { 2 | "cards": [ 3 | { 4 | "devid": 0, 5 | "cameras": [ 6 | { 7 | "address": "./elevator-1080p-25fps-4000kbps.h264", 8 | "chan_num": 1, 9 | "model_names": ["ex1"] 10 | } 11 | ] 12 | } 13 | ], 14 | "pipeline": { 15 | "preprocess": { 16 | "thread_num": 4, 17 | "queue_size": 16 18 | }, 19 | "inference": { 20 | "thread_num": 1, 21 | "queue_size": 16 22 | }, 23 | "postprocess": { 24 | "thread_num": 4, 25 | "queue_size": 16 26 | } 27 | }, 28 | "models":[ 29 | { 30 | "name": "ex1", 31 | "path": "your_bmodel_path.bmodel", 32 | "skip_frame_num": 0, 33 | "output_path": "output_path", 34 | 35 | "obj_threshold": 0.6, 36 | "nms_threshold": 0.5 37 | } 38 | ] 39 | } -------------------------------------------------------------------------------- /configs/cameras_video_stitch.json: -------------------------------------------------------------------------------- 1 | { 2 | "cards": [ 3 | { 4 | "devid": 0, 5 | "cameras": [ 6 | { 7 | "address": "./elevator-1080p-25fps-4000kbps.h264", 8 | "chan_num": 1, 9 | "model_names": ["ex1"] 10 | } 11 | ] 12 | } 13 | ], 14 | "pipeline": { 15 | "preprocess": { 16 | "thread_num": 4, 17 | "queue_size": 16 18 | }, 19 | "inference": { 20 | "thread_num": 1, 21 | "queue_size": 16 22 | }, 23 | "postprocess": { 24 | "thread_num": 4, 25 | "queue_size": 16 26 | } 27 | }, 28 | "models":[ 29 | { 30 | "name": "ex1", 31 | "path": "your_bmodel_path.bmodel", 32 | "skip_frame_num": 1, 33 | 34 | "obj_threshold": 0.5, 35 | "nms_threshold": 0.5, 36 | "class_threshold": 0.5, 37 | "class_num": 80 38 | 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /configs/cameras_yolact.json: -------------------------------------------------------------------------------- 1 | { 2 | "cards": [ 3 | { 4 | "devid": 0, 5 | "cameras": [ 6 | { 7 | "address": "./elevator-1080p-25fps-4000kbps.h264", 8 | "chan_num": 1, 9 | "model_names": ["ex1"] 10 | } 11 | ] 12 | } 13 | ], 14 | "pipeline": { 15 | "preprocess": { 16 | "thread_num": 4, 17 | "queue_size": 16 18 | }, 19 | "inference": { 20 | "thread_num": 1, 21 | "queue_size": 16 22 | }, 23 | "postprocess": { 24 | "thread_num": 4, 25 | "queue_size": 16 26 | } 27 | }, 28 | "models":[ 29 | { 30 | "name": "ex1", 31 | "path": "your_bmodel_path.bmodel", 32 | "model_type": "yolact_base", 33 | "skip_frame_num": 0, 34 | "output_path": "output_path", 35 | 36 | "obj_threshold": 0.3, 37 | "nms_threshold": 0.5 38 | 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /configs/cameras_yolov5.json: -------------------------------------------------------------------------------- 1 | { 2 | "cards": [ 3 | { 4 | "devid": 0, 5 | "cameras": [ 6 | { 7 | "address": "./elevator-1080p-25fps-4000kbps.h264", 8 | "chan_num": 1, 9 | "model_names": ["ex1"] 10 | } 11 | ] 12 | } 13 | ], 14 | "pipeline": { 15 | "preprocess": { 16 | "thread_num": 4, 17 | "queue_size": 16 18 | }, 19 | "inference": { 20 | "thread_num": 1, 21 | "queue_size": 16 22 | }, 23 | "postprocess": { 24 | "thread_num": 4, 25 | "queue_size": 16 26 | } 27 | }, 28 | "models":[ 29 | { 30 | "name": "ex1", 31 | "path": "your_bmodel_path.bmodel", 32 | "model_type": "yolov5s", 33 | "skip_frame_num": 0, 34 | "output_path": "output_path", 35 | 36 | "obj_threshold": 0.5, 37 | "nms_threshold": 0.5, 38 | "class_threshold": 0.5 39 | 40 | } 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sophgo/sophon-pipeline/caddfaca90e1d3a55baea4e5e511e787058e6d6a/data/.gitkeep -------------------------------------------------------------------------------- /docs/docs_zh/arm_pcie.md: -------------------------------------------------------------------------------- 1 | # arm_pcie平台编译准备 2 | 3 | ## 概述 4 | 5 | 本文档用于指导完成arm64机器的sophon-pipeline依赖环境安装。**通常x86_64机器对应的硬件架构为x86_64,arm64机器对应的硬件架构为aarch64**。 6 | 7 | - libsophon、sophon-mw的安装请参考官方文档《LIBSOPHON使用手册》和《MULTIMEDIA使用手册》 8 | - 其他环境依赖的安装请参考对应系统的安装说明 9 | 10 | ## aarch64 银河麒麟V10 11 | 12 | 以Kylin Linux Advanced Server V10 (Tercel)为例 13 | 14 | **安装Eigen** 15 | 16 | ```bash 17 | wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz 18 | tar -zxvf eigen-3.4.0.tar.gz 19 | cd eigen-3.4.0 20 | mkdir build && cd build 21 | cmake .. 22 | sudo make install 23 | ``` 24 | 25 | **安装gflags** 26 | 27 | ```bash 28 | git clone https://github.com/gflags/gflags.git 29 | cd gflags 30 | mkdir build && cd build 31 | export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1 32 | make 33 | sudo make install 34 | ``` 35 | 36 | **安装glog** 37 | 38 | ```bash 39 | git clone https://github.com/google/glog.git 40 | cd glog/ 41 | git checkout -b main v0.4.0 42 | ./autogen.sh 43 | ./configure 44 | make -j4 45 | sudo make install 46 | # libraries have been installed in: /usr/local/lib 47 | # create a symbolic link 48 | # 以下操作为解决不同环境下找不到glog库的问题,用ls /usr查看是否存在lib64目录,如果存在,则执行以下步骤;如果不存在,则跳过以下步骤 49 | sudo ln -s /usr/local/lib/libglog.so.0 /usr/lib64/libglog.so.0 50 | ``` 51 | 52 | **安装exiv2** 53 | 54 | ```bash 55 | git clone https://github.com/Exiv2/exiv2.git 56 | cd exiv2 57 | git checkout v0.27.6 58 | mkdir build && cd build 59 | cmake .. -DCMAKE_BUILD_TYPE=Release 60 | cmake --build . 61 | sudo cmake --build . --target install 62 | ``` 63 | 64 | > 这里,aarch64 银河麒麟V10的编译环境和相关依赖环境的准备步骤已经准备完成,接下来可以编译需要在arm PCIe平台上运行的程序。 65 | 66 | -------------------------------------------------------------------------------- /docs/pics/faq/pipeline_client_bmffmpeg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sophgo/sophon-pipeline/caddfaca90e1d3a55baea4e5e511e787058e6d6a/docs/pics/faq/pipeline_client_bmffmpeg.jpg -------------------------------------------------------------------------------- /docs/pics/faq/pipeline_client_rtsp_decode_failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sophgo/sophon-pipeline/caddfaca90e1d3a55baea4e5e511e787058e6d6a/docs/pics/faq/pipeline_client_rtsp_decode_failed.png -------------------------------------------------------------------------------- /docs/pics/pipeline_client_ui.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sophgo/sophon-pipeline/caddfaca90e1d3a55baea4e5e511e787058e6d6a/docs/pics/pipeline_client_ui.jpg -------------------------------------------------------------------------------- /docs/pics/sophon-pipeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sophgo/sophon-pipeline/caddfaca90e1d3a55baea4e5e511e787058e6d6a/docs/pics/sophon-pipeline.png -------------------------------------------------------------------------------- /examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | 3 | 4 | add_compile_options(-Wno-deprecated-declarations) 5 | add_definitions(-DUSE_FFMPEG=1) 6 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 7 | 8 | if(USE_QTGUI) 9 | add_definitions(-DUSE_QTGUI=1) 10 | endif() 11 | 12 | include_directories(${common_inc_dirs} ${libsophon_inc_dirs} ${ffmpeg_inc_dirs} ${opencv_inc_dirs}) 13 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 14 | link_directories(${ffmpeg_link_dirs} ${libsophon_link_dirs} ${opencv_link_dirs}) 15 | 16 | include_directories(common) 17 | 18 | if (USE_SOPHON_FFMPEG) 19 | if (HAVE_TRACKER) 20 | add_subdirectory(yolov5) 21 | add_subdirectory(video_stitch) 22 | add_subdirectory(retinaface) 23 | add_subdirectory(multi) 24 | add_subdirectory(face_detect) 25 | add_subdirectory(face_recognition) 26 | add_subdirectory(openpose) 27 | add_subdirectory(ppyoloe) 28 | add_subdirectory(yolact) 29 | endif() 30 | else() 31 | if (HAVE_TRACKER) 32 | add_subdirectory(yolov5) 33 | add_subdirectory(video_stitch) 34 | add_subdirectory(retinaface) 35 | add_subdirectory(multi) 36 | add_subdirectory(face_detect) 37 | add_subdirectory(face_recognition) 38 | add_subdirectory(openpose) 39 | add_subdirectory(ppyoloe) 40 | add_subdirectory(yolact) 41 | endif() 42 | endif() 43 | -------------------------------------------------------------------------------- /examples/face_detect/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | 3 | set(CMAKE_CXX_STANDARD 11) 4 | add_compile_options(-Wno-deprecated-declarations) 5 | 6 | set(src_files main.cpp worker.cpp face_detector.cpp) 7 | 8 | if(USE_DEBUG) 9 | add_definitions(-DUSE_DEBUG=1) 10 | endif() 11 | 12 | add_executable(facedetect_demo ${src_files}) 13 | if (USE_QTGUI) 14 | target_link_libraries(facedetect_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} bmgui jsoncpp) 15 | else() 16 | target_link_libraries(facedetect_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} jsoncpp pthread) 17 | endif() 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/face_recognition/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | 3 | set(CMAKE_CXX_STANDARD 11) 4 | add_compile_options(-Wno-deprecated-declarations) 5 | 6 | set(src_files main.cpp 7 | face_detector.cpp 8 | face_landmark.cpp 9 | face_extract.cpp 10 | face_worker.cpp 11 | ) 12 | 13 | if(USE_DEBUG) 14 | add_definitions(-DUSE_DEBUG=1) 15 | endif() 16 | 17 | add_executable(face_recognition_demo ${src_files}) 18 | if (USE_QTGUI) 19 | target_link_libraries(face_recognition_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} bmgui jsoncpp) 20 | else() 21 | target_link_libraries(face_recognition_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} jsoncpp pthread) 22 | endif() 23 | -------------------------------------------------------------------------------- /examples/face_recognition/face_extract.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | 11 | #ifndef SOPHON_PIPELINE_FACE_EXTRACT_H 12 | #define SOPHON_PIPELINE_FACE_EXTRACT_H 13 | #include "inference_serial.h" 14 | #include "bmcv_api_ext.h" 15 | #include "face_common.h" 16 | 17 | class FaceExtract : public bm::DetectorDelegate { 18 | bm::BMNNContextPtr m_bmctx; 19 | bm::BMNNNetworkPtr m_bmnet; 20 | float m_alpha_fp32; 21 | float m_beta_fp32; 22 | float m_alpha_int8; 23 | float m_beta_int8; 24 | int MAX_BATCH=1; 25 | cv::Size m_inputSize; 26 | 27 | public: 28 | FaceExtract(bm::BMNNContextPtr bmctx); 29 | ~FaceExtract(); 30 | 31 | virtual int preprocess(std::vector &in) override; 32 | virtual int forward(std::vector &frames) override; 33 | virtual int postprocess(std::vector &frames) override; 34 | private: 35 | bm::BMNNTensorPtr get_output_tensor(const std::string &name, bm::NetForward *inferIO, float scale=1.0); 36 | void extract_facefeature_cpu(bm::FrameInfo2& frame); 37 | int get_complex_idx(int idx, std::vector out, int *p_frameIdx, int *prc_idx); 38 | void free_fwds(std::vector &fwds); 39 | }; 40 | 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /examples/face_recognition/face_landmark.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | 11 | #ifndef SOPHON_PIPELINE_FACE_LANDMARK_H 12 | #define SOPHON_PIPELINE_FACE_LANDMARK_H 13 | 14 | #include "inference_serial.h" 15 | #include "bmcv_api_ext.h" 16 | #include "face_common.h" 17 | 18 | class FaceLandmark : public bm::DetectorDelegate { 19 | int MAX_BATCH = 4; 20 | bm::BMNNContextPtr m_bmctx; 21 | bm::BMNNNetworkPtr m_bmnet; 22 | cv::Size m_inputSize; 23 | // const double m_alpha_int8 = 1.003921316; 24 | // const double m_beta_int8 = -127.5 * 1.003921316; 25 | // const double m_alpha_fp32 = 0.0078125; 26 | // const double m_beta_fp32 = -127.5 * 0.0078125; 27 | 28 | const double m_alpha_int8 = 1.f; 29 | const double m_beta_int8 = 0; 30 | const double m_alpha_fp32 = 1.f; 31 | const double m_beta_fp32 = 0; 32 | 33 | public: 34 | FaceLandmark(bm::BMNNContextPtr bmctx); 35 | 36 | ~FaceLandmark(); 37 | 38 | virtual int preprocess(std::vector &frame_info) override; 39 | 40 | virtual int forward(std::vector &frame_info) override; 41 | 42 | virtual int postprocess(std::vector &frame_info) override; 43 | 44 | private: 45 | bm::BMNNTensorPtr get_output_tensor(const std::string &name, bm::NetForward *inferIO, float scale=1.0); 46 | int forward_subnet(std::vector &ios); 47 | void free_fwds(std::vector &ios); 48 | int get_complex_idx(int idx, std::vector out, int *p_frameIdx, int *prc_idx); 49 | 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /examples/multi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | 3 | set(CMAKE_CXX_STANDARD 11) 4 | add_compile_options(-Wno-deprecated-declarations) 5 | 6 | set(src_files main.cpp worker.cpp yolov5s.cpp) 7 | 8 | if(USE_DEBUG) 9 | add_definitions(-DUSE_DEBUG=1) 10 | endif() 11 | 12 | add_executable(multi_demo ${src_files}) 13 | if (USE_QTGUI) 14 | target_link_libraries(multi_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} bmgui jsoncpp) 15 | else() 16 | target_link_libraries(multi_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} jsoncpp pthread) 17 | endif() 18 | -------------------------------------------------------------------------------- /examples/openpose/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | 3 | set(CMAKE_CXX_STANDARD 11) 4 | add_compile_options(-Wno-deprecated-declarations) 5 | 6 | set(src_files main.cpp worker.cpp openpose.cpp pose_postprocess.cpp) 7 | 8 | if(USE_DEBUG) 9 | add_definitions(-DUSE_DEBUG=1) 10 | endif() 11 | 12 | add_executable(openpose_demo ${src_files}) 13 | if (USE_QTGUI) 14 | target_link_libraries(openpose_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} bmgui jsoncpp) 15 | else() 16 | target_link_libraries(openpose_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} jsoncpp pthread) 17 | endif() 18 | -------------------------------------------------------------------------------- /examples/openpose/openpose.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | 11 | #ifndef SOPHON_PIPELINE_OPENPOSE_H 12 | #define SOPHON_PIPELINE_OPENPOSE_H 13 | 14 | #include "bmutility.h" 15 | #include "inference.h" 16 | 17 | 18 | class OpenPose : public bm::DetectorDelegate { 19 | int MAX_BATCH = 1; 20 | bm::BMNNContextPtr m_bmctx; 21 | bm::BMNNNetworkPtr m_bmnet; 22 | int m_net_h, m_net_w; 23 | std::function m_detect_finish_func; 24 | 25 | //configuration 26 | bool m_use_custom_scale {false}; 27 | float m_input_scale; 28 | float m_output_scale; 29 | float m_nms_threshold; 30 | bm::PoseKeyPoints::EModelType m_model_type; 31 | 32 | public: 33 | OpenPose(bm::BMNNContextPtr bmctx, std::string strModelType = "coco", float nms_threshold=0.05); 34 | void setParams(bool useCustomScale, float customInputScale, float customOutputScale); 35 | 36 | ~OpenPose(); 37 | 38 | virtual int preprocess(std::vector &frames, std::vector &frame_info) override; 39 | 40 | virtual int forward(std::vector &frame_info) override; 41 | 42 | virtual int postprocess(std::vector &frame_info) override; 43 | 44 | private: 45 | bm::BMNNTensorPtr get_output_tensor(const std::string &name, bm::FrameInfo& frame_info, float scale=1.0); 46 | void decode_from_output_tensor(bm::FrameInfo& frame_info); 47 | 48 | }; 49 | 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /examples/ppyoloe/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | 3 | set(CMAKE_CXX_STANDARD 11) 4 | add_compile_options(-Wno-deprecated-declarations) 5 | 6 | set(src_files main.cpp worker.cpp ppyoloe.cpp) 7 | 8 | if(USE_DEBUG) 9 | add_definitions(-DUSE_DEBUG=1) 10 | endif() 11 | 12 | add_executable(ppyoloe_demo ${src_files}) 13 | if (USE_QTGUI) 14 | target_link_libraries(ppyoloe_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} bmgui bmtracker jsoncpp) 15 | else() 16 | target_link_libraries(ppyoloe_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} jsoncpp bmtracker pthread) 17 | endif() 18 | -------------------------------------------------------------------------------- /examples/ppyoloe/ppyoloe.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #include "opencv2/opencv.hpp" 11 | #include 12 | #include "bmutility.h" 13 | #include "bmutility_string.h" 14 | #include "inference.h" 15 | #include "bmutility_basemodel.hpp" 16 | 17 | 18 | class PPYoloe : public bm::DetectorDelegate 19 | , public bm::BaseModel 20 | { 21 | int MAX_BATCH; 22 | bm::BMNNContextPtr m_bmctx; 23 | bm::BMNNNetworkPtr m_bmnet; 24 | int m_net_h, m_net_w; 25 | 26 | //configuration 27 | int m_class_num; 28 | std::vector m_outputs_order; 29 | std::vector m_alpha; 30 | std::vector m_beta; 31 | 32 | public: 33 | PPYoloe(bm::BMNNContextPtr bmctx, std::string model_type); 34 | ~PPYoloe(); 35 | 36 | virtual int get_Batch(); 37 | virtual int preprocess(std::vector& frames, std::vector& frame_info) override ; 38 | virtual int forward(std::vector& frame_info) override ; 39 | virtual int postprocess(std::vector &frame_info) override; 40 | private: 41 | int init_yolo(std::string model_type); 42 | void NMS(bm::NetOutputObjects &dets, float nmsConfidence); 43 | 44 | void extract_yolobox_cpu(bm::FrameInfo& frameInfo); 45 | }; -------------------------------------------------------------------------------- /examples/retinaface/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_compile_options(-Wno-deprecated-declarations) 3 | 4 | # find_package(exiv2 REQUIRED) 5 | 6 | if(USE_DEBUG) 7 | add_definitions(-DUSE_DEBUG=1) 8 | endif() 9 | 10 | add_executable(retinaface_demo main.cpp worker.cpp retinaface.cpp) 11 | 12 | if (USE_QTGUI) 13 | target_link_libraries(retinaface_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} bmgui jsoncpp) # add exiv2 if needed 14 | else() 15 | target_link_libraries(retinaface_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} jsoncpp pthread) # add exiv2 if needed 16 | endif() 17 | 18 | #target_compile_definitions(retinaface_demo PUBLIC USE_EXIV2=1) 19 | -------------------------------------------------------------------------------- /examples/retinaface/macros.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #pragma once 11 | #include 12 | 13 | #define call(fn, ...) \ 14 | do { \ 15 | auto ret = fn(__VA_ARGS__); \ 16 | if (ret != BM_SUCCESS) \ 17 | { \ 18 | std::cout << "[ERROR] " << #fn << " failed " << ret << std::endl; \ 19 | throw std::runtime_error("api error"); \ 20 | } \ 21 | } while (false); 22 | 23 | -------------------------------------------------------------------------------- /examples/retinaface/retinaface.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #pragma once 11 | 12 | #include "inference.h" 13 | #include "bmutility_profile.h" 14 | #include "bmutility_pool.h" 15 | 16 | struct RetinafaceImpl; 17 | 18 | class Retinaface : public bm::DetectorDelegate { 19 | protected: 20 | RetinafaceImpl *impl_; 21 | bm::Watch *w_; 22 | std::vector parse_boxes( 23 | size_t input_width, 24 | size_t input_height, 25 | const float *cls_data, 26 | const float *land_data, 27 | const float *loc_data, 28 | const bm::FrameBaseInfo &frame); 29 | void extract_facebox_cpu(bm::FrameInfo &frame_info); 30 | bm::BMNNTensorPtr get_output_tensor(const std::string &name, bm::FrameInfo &frame_info); 31 | 32 | public: 33 | Retinaface( 34 | bm::BMNNContextPtr bmctx, 35 | bool keep_original = false, 36 | float nms_threshold = 0.5, 37 | float conf_threshold = 0.6, 38 | std::string net_name = "", 39 | bm::Watch *watch = nullptr); 40 | ~Retinaface(); 41 | 42 | virtual void decode_process(bm::FrameBaseInfo &) override; 43 | virtual int preprocess( 44 | std::vector &frames, 45 | std::vector &frame_info) override; 46 | virtual int forward(std::vector &frame_info) override; 47 | virtual int postprocess(std::vector &frame_info) override; 48 | bm_image read_image(bm::FrameBaseInfo &frame); 49 | }; 50 | -------------------------------------------------------------------------------- /examples/video_stitch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | 3 | set(CMAKE_CXX_STANDARD 11) 4 | add_compile_options(-Wno-deprecated-declarations) 5 | 6 | 7 | set(rtsp_srcs 8 | rtsp/BTRTSPServer.cpp 9 | rtsp/Live555RtspServer.cpp 10 | rtsp/H264FrameSource.cpp 11 | rtsp/H264QueMediaSubsession.cpp 12 | ) 13 | set(src_files main.cpp worker.cpp yolov5s.cpp stitch.cpp encoder.cpp ${rtsp_srcs}) 14 | 15 | if(USE_DEBUG) 16 | add_definitions(-DUSE_DEBUG=1) 17 | endif() 18 | 19 | include_directories( 20 | ${TOP}/third_party/live555/liveMedia/include/ 21 | ${TOP}/third_party/live555/groupsock/include/ 22 | ${TOP}/third_party/live555/UsageEnvironment/include/ 23 | ${TOP}/third_party/live555/BasicUsageEnvironment/include/ 24 | ${TOP}/third_party/live555/mediaServer/ 25 | ) 26 | include_directories(${common_inc_dirs} ${libsophon_inc_dirs} ${ffmpeg_inc_dirs} ${opencv_inc_dirs} 27 | ) 28 | link_directories(${ffmpeg_link_dirs} ${libsophon_link_dirs} ${opencv_link_dirs}) 29 | 30 | #set(src_files test.cpp) 31 | add_executable(video_stitch_demo ${src_files}) 32 | 33 | 34 | message(STATUS ${PROJECT_SOURCE_DIR}/examples/video_stitch/rtsp/live555/liveMedia/) 35 | target_link_libraries(video_stitch_demo 36 | bmutility 37 | live555 38 | ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} bmtracker jsoncpp pthread 39 | ) 40 | -------------------------------------------------------------------------------- /examples/video_stitch/encoder.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef _VIDEO_STITCH_ENCODER_H_ 11 | #define _VIDEO_STITCH_ENCODER_H_ 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include "rtsp/Live555RtspServer.h" 20 | #include "configuration.h" 21 | 22 | class CVEncoder { 23 | public: 24 | CVEncoder(int fps, int w, int h, int card, BTRTSPServer* p_rtsp, AppStatis* appStatis); 25 | virtual ~CVEncoder(); 26 | bool encode(cv::Mat& mat); 27 | 28 | private: 29 | int m_fps; 30 | int m_width; 31 | int m_height; 32 | int m_card; 33 | std::shared_ptr m_writer; 34 | std::unique_ptr m_buffer; 35 | BTRTSPServer* m_rtsp; 36 | AppStatis* m_appstatis; 37 | }; 38 | 39 | 40 | #endif // _VIDEO_STITCH_ENCODER_H_ -------------------------------------------------------------------------------- /examples/video_stitch/make_unique.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef _MAKE_UNIQUE_HPP_ 11 | #define _MAKE_UNIQUE_HPP_ 12 | #include 13 | #include 14 | 15 | // 单一元素类模板定义 16 | template 17 | using Ele = typename std::enable_if::value, std::unique_ptr >::type; 18 | 19 | // 变长数组类模板定义 20 | template 21 | using Slice = typename std::enable_if::value && std::extent::value == 0, std::unique_ptr>::type; 22 | 23 | // 定长数组类模板定义 24 | template 25 | using Arr = typename std::enable_if::value != 0, void>::type; 26 | 27 | // 支持普通指针 28 | template inline 29 | Ele make_unique(Args && ... args) { 30 | return std::unique_ptr(new T(std::forward(args)...)); 31 | } 32 | 33 | // 支持动态数组 34 | template inline 35 | Slice make_unique(size_t size) { 36 | using U = typename std::remove_extent::type; 37 | return std::unique_ptr(new U[size]); 38 | } 39 | 40 | // 过滤定长数组 41 | template 42 | Arr make_unique(Args &&...) = delete; 43 | 44 | #endif -------------------------------------------------------------------------------- /examples/video_stitch/rtsp/H264FrameSource.h: -------------------------------------------------------------------------------- 1 | #ifndef _BT_H264FrameSource_H 2 | #define _BT_H264FrameSource_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "liveMedia.hh" 10 | #include "BasicUsageEnvironment.hh" 11 | #include "GroupsockHelper.hh" 12 | #include "FramedSource.hh" 13 | #include "thread_queue.h" 14 | 15 | 16 | 17 | struct _tagPktData { 18 | char *buf; 19 | int len; 20 | 21 | _tagPktData() 22 | : buf{nullptr}, len{0} {} 23 | 24 | ~_tagPktData() { 25 | if (buf != nullptr && len != 0) { 26 | delete[] buf; 27 | buf = nullptr; 28 | len = 0; 29 | } 30 | } 31 | }; 32 | using PktData = std::shared_ptr<_tagPktData>; 33 | 34 | #define SIZE 1080*1920 35 | 36 | class H264FrameSourceListener { 37 | public: 38 | bool m_source_state{false}; 39 | public: 40 | virtual void setSourceState(bool state) { 41 | m_source_state = state; 42 | } 43 | }; 44 | 45 | class H264FrameSource : public H264VideoStreamFramer 46 | { 47 | public: 48 | static H264FrameSource* createNew(UsageEnvironment& env, FramedSource* inputSource,const char* fileName, H264FrameSourceListener* listener); 49 | 50 | private: 51 | H264FrameSource(UsageEnvironment& env, FramedSource* inputSource, H264FrameSourceListener* listener); 52 | ~H264FrameSource(void); 53 | 54 | private: 55 | virtual void doGetNextFrame(); 56 | virtual unsigned int maxFrameSize() const; 57 | 58 | 59 | public: 60 | char fileBuf[SIZE]; 61 | //int fsize; 62 | long long m_framenusm; 63 | std::shared_ptr> m_packetQueue; 64 | public: 65 | void dropAllFrames(); 66 | void pushEncodedPacket(PktData &pkt); 67 | 68 | private: 69 | H264FrameSourceListener* m_listener; 70 | }; 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /examples/video_stitch/rtsp/H264QueMediaSubsession.h: -------------------------------------------------------------------------------- 1 | //by yingyemin 2 | #ifndef _BT_H264QueMediaSubsession_H 3 | #define _BT_H264QueMediaSubsession_H 4 | 5 | #include "liveMedia.hh" 6 | #include "BasicUsageEnvironment.hh" 7 | #include "GroupsockHelper.hh" 8 | 9 | #include "OnDemandServerMediaSubsession.hh" 10 | #include "H264FrameSource.h" 11 | 12 | class H264QueMediaSubsession : public OnDemandServerMediaSubsession, 13 | public H264FrameSourceListener 14 | { 15 | public: 16 | static H264QueMediaSubsession * createNew(UsageEnvironment& env, const char* fileName, bool reuseFirstSource = false); 17 | 18 | private: 19 | H264QueMediaSubsession(UsageEnvironment& env, const char* fileName, bool reuseFirstSource = false); 20 | ~H264QueMediaSubsession(void); 21 | 22 | virtual FramedSource * createNewStreamSource(unsigned clientSessionId, unsigned & estBitrate); // "estBitrate" is the stream's estimated bitrate, in kbps 23 | virtual RTPSink * createNewRTPSink(Groupsock * rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource * inputSource); 24 | 25 | public: 26 | void inputH264Packet(PktData& pkt); 27 | void flushH264Packet(); 28 | 29 | private: 30 | char fFileName[100]; 31 | H264FrameSource* _source; 32 | }; 33 | 34 | #endif//_BT_H264QueMediaSubsession_H 35 | -------------------------------------------------------------------------------- /examples/video_stitch/rtsp/Live555RtspServer.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIVE555RTSPSERVER_H_ 2 | #define _LIVE555RTSPSERVER_H_ 3 | 4 | #include 5 | #include 6 | #include "BTRTSPServer.h" 7 | 8 | 9 | 10 | 11 | int CreateRtspServer(); 12 | 13 | BTRTSPServer* GetRTSPInstance(); 14 | 15 | #endif//_LIVE555RTSPSERVER_H_ 16 | -------------------------------------------------------------------------------- /examples/yolact/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | 3 | set(CMAKE_CXX_STANDARD 11) 4 | add_compile_options(-Wno-deprecated-declarations) 5 | 6 | set(src_files main.cpp worker.cpp yolact.cpp) 7 | 8 | if(USE_DEBUG) 9 | add_definitions(-DUSE_DEBUG=1) 10 | endif() 11 | 12 | add_executable(yolact_demo ${src_files}) 13 | if (USE_QTGUI) 14 | target_link_libraries(yolact_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} bmgui bmtracker jsoncpp) 15 | else() 16 | target_link_libraries(yolact_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} jsoncpp bmtracker pthread) 17 | endif() 18 | -------------------------------------------------------------------------------- /examples/yolov5/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | 3 | set(CMAKE_CXX_STANDARD 11) 4 | add_compile_options(-Wno-deprecated-declarations) 5 | 6 | set(src_files main.cpp worker.cpp yolov5s.cpp) 7 | 8 | if(USE_DEBUG) 9 | add_definitions(-DUSE_DEBUG=1) 10 | endif() 11 | 12 | if(USE_TPUKERNEL) 13 | message("-- Using tpukernel postprocess") 14 | add_definitions(-DUSE_TPUKERNEL=1) 15 | endif() 16 | 17 | add_executable(yolov5s_demo ${src_files}) 18 | if (USE_QTGUI) 19 | target_link_libraries(yolov5s_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} bmgui bmtracker jsoncpp) 20 | else() 21 | target_link_libraries(yolov5s_demo bmutility ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs} jsoncpp bmtracker pthread) 22 | endif() 23 | -------------------------------------------------------------------------------- /modules/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | 3 | 4 | add_compile_options(-Wno-deprecated-declarations) 5 | add_definitions(-DUSE_FFMPEG=1) 6 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 7 | 8 | if(USE_QTGUI) 9 | add_definitions(-DUSE_QTGUI=1) 10 | endif() 11 | 12 | include_directories(${common_inc_dirs} ${libsophon_inc_dirs} ${ffmpeg_inc_dirs} ${opencv_inc_dirs}) 13 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 14 | link_directories(${ffmpeg_link_dirs} ${libsophon_link_dirs} ${opencv_link_dirs}) 15 | 16 | if (USE_QTGUI) 17 | add_subdirectory(bmgui) 18 | add_subdirectory(bmgui-lite) 19 | endif() 20 | 21 | add_subdirectory(bmutility) 22 | 23 | if (HAVE_TRACKER) 24 | add_subdirectory(tracker) 25 | endif() 26 | 27 | -------------------------------------------------------------------------------- /modules/bmgui-lite/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | project(bmgui-lite) 3 | set(UTILITY_TOP ${CMAKE_CURRENT_SOURCE_DIR}) 4 | add_compile_options(-Wno-deprecated-declarations) 5 | 6 | set(CMAKE_AUTOGEN_VERBOSE ON) 7 | set(CMAKE_AUTOMOC ON) 8 | set(CMAKE_AUTOUIC ON) 9 | set(CMAKE_AUTORCC ON) 10 | 11 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 12 | #set(QTDIR /opt/Qt5.12.9/5.12.9/gcc_64) 13 | set(Qt5Widgets_DIR ${QTDIR}/lib/cmake/Qt5Widgets) 14 | set(Qt5Core_DIR ${QTDIR}/lib/cmake/Qt5Core) 15 | set(Qt5Concurrent_DIR ${QTDIR}/lib/cmake/Qt5Concurrent) 16 | set(Qt5Test_DIR ${QTDIR}/lib/cmake/Qt5Test) 17 | 18 | find_package(Qt5Widgets REQUIRED) 19 | find_package(Qt5Core REQUIRED) 20 | find_package(Qt5Concurrent REQUIRED) 21 | find_package(Qt5Test REQUIRED) 22 | 23 | 24 | 25 | include_directories(${Qt5Widgets_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS} 26 | ${Qt5Concurrent_INCLUDE_DIRS} 27 | ${Qt5Test_INCLUDE_DIRS} ${COMMON_TOP}/bmgui-lite ${libsophon_inc_dirs} ${ffmpeg_inc_dirs} ${opencv_inc_dirs}) 28 | 29 | link_directories(${ffmpeg_link_dirs} ${libsophon_link_dirs} ${opencv_link_dirs}) 30 | 31 | add_library(bmgui-lite SHARED window_QT.cpp) 32 | target_link_libraries(bmgui-lite Qt5::Widgets Qt5::Test ${opencv_link_libs} ${ffmpeg_link_libs} ${libsophon_link_libs}) 33 | -------------------------------------------------------------------------------- /modules/bmgui-lite/bmgui-lite.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef BMNN_QTWIN_H 11 | #define BMNN_QTWIN_H 12 | 13 | #include "opencv2/opencv.hpp" 14 | namespace bm { 15 | void imshow(const cv::String &winname, cv::InputArray _img); 16 | void waitkey(int delay); 17 | } 18 | 19 | #endif //!BMNN_QTWIN_H 20 | -------------------------------------------------------------------------------- /modules/bmgui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | project(videoui) 3 | #add_compile_options(-std=c++11) 4 | set(CMAKE_AUTOMOC ON) 5 | set(CMAKE_AUTOUIC ON) 6 | set(CMAKE_AUTORCC ON) 7 | 8 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 9 | set(CMAKE_PREFIX_PATH $ENV{QTDIR}) 10 | 11 | set(inc_dirs ${common_inc_dirs} ${libsophon_inc_dirs} ${ffmpeg_inc_dirs} ${opencv_inc_dirs} ${TOP}/third_party/libyuv/include) 12 | set(link_dirs ${ffmpeg_link_dirs} ${opencv_link_dirs}) 13 | set(link_libs ${opencv_link_libs} ${ffmpeg_link_libs} Qt5::Widgets pthread) 14 | 15 | message(STATUS "[bmgui]inc_dirs=${inc_dirs}") 16 | message(STATUS "[bmgui]link_dirs=${link_dirs}") 17 | message(STATUS "[bmgui]link_libs=${link_libs}") 18 | 19 | include_directories(${inc_dirs}) 20 | link_directories(${link_dirs}) 21 | 22 | find_package(Qt5Widgets) 23 | 24 | add_library(bmgui bmgui.cpp mainwindow.cpp 25 | container_widget.cpp 26 | video_pixmap_widget.cpp 27 | video_widget.cpp) 28 | 29 | target_link_libraries(bmgui 30 | ${link_libs} 31 | ) 32 | 33 | add_executable(videoui_demo bmgui_unittest.cpp) 34 | target_link_libraries(videoui_demo bmgui) 35 | -------------------------------------------------------------------------------- /modules/bmgui/bmgui.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef SOPHON_PIPELINE_BMGUI_H 11 | #define SOPHON_PIPELINE_BMGUI_H 12 | 13 | #include 14 | #include "bmutility_types.h" 15 | #include "opencv2/opencv.hpp" 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #include "libavcodec/avcodec.h" 19 | } 20 | #endif 21 | 22 | namespace bm { 23 | struct UIFrame { 24 | int chan_id; 25 | bm::DataPtr jpeg_data; 26 | AVFrame *avframe {nullptr}; 27 | int h, w; 28 | NetOutputDatum datum; 29 | }; 30 | 31 | class VideoUIApp { 32 | public: 33 | static std::shared_ptr create(int argc, char *argv[]); 34 | 35 | ~VideoUIApp() { 36 | std::cout << "VideoUIApp exit!" << std::endl; 37 | } 38 | 39 | virtual int bootUI(int window_num=1) = 0; 40 | virtual int shutdownUI() = 0; 41 | virtual int pushFrame(UIFrame &frame) = 0; 42 | }; 43 | 44 | using VideoUIAppPtr = std::shared_ptr; 45 | } 46 | 47 | 48 | 49 | #endif //SOPHON_PIPELINE_BMGUI_H 50 | -------------------------------------------------------------------------------- /modules/bmgui/bmgui_unittest.cpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #include 11 | #include 12 | #include "mainwindow.h" 13 | #include "bmgui.h" 14 | 15 | int main(int argc, char *argv[]) { 16 | #if 0 17 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) 18 | QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); 19 | #endif 20 | 21 | QApplication a(argc, argv); 22 | mainwindow w; 23 | w.show(); 24 | return a.exec(); 25 | #endif 26 | 27 | bm::VideoUIAppPtr app = bm::VideoUIApp::create(argc, argv); 28 | app->bootUI(4); 29 | 30 | getchar(); 31 | 32 | } -------------------------------------------------------------------------------- /modules/bmgui/container_widget.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | #include "ui_container_widget.h" 15 | #include "video_widget.h" 16 | 17 | class container_widget : public QWidget 18 | { 19 | Q_OBJECT 20 | 21 | public: 22 | container_widget(QWidget *parent = Q_NULLPTR); 23 | ~container_widget(); 24 | 25 | video_widget* addChildWnd(); 26 | void removeChildWindow(video_widget *pWnd); 27 | void UpdateWidgetLayout(); 28 | 29 | video_widget* getSelectedWidget(); 30 | protected: 31 | void resizeEvent(QResizeEvent* size); 32 | protected slots: 33 | void handle_subwindow_clicked(video_widget *pSelectedWnd); 34 | private: 35 | QList mListWidgets; 36 | 37 | private: 38 | video_widget *m_selectedWnd{ 0 }; 39 | Ui::container_widget ui; 40 | }; 41 | -------------------------------------------------------------------------------- /modules/bmgui/container_widget.ui: -------------------------------------------------------------------------------- 1 | 2 | container_widget 3 | 4 | 5 | container_widget 6 | 7 | 8 | 9 | 0 10 | 0 11 | 400 12 | 300 13 | 14 | 15 | 16 | container_widget 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /modules/bmgui/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #include "mainwindow.h" 11 | #include "container_widget.h" 12 | #include "ui_mainwindow.h" 13 | 14 | mainwindow::mainwindow(QWidget *parent) : 15 | QMainWindow(parent),m_pMainWidget(nullptr), 16 | ui(new Ui::mainwindow) 17 | { 18 | ui->setupUi(this); 19 | m_pMainWidget = new container_widget(this); 20 | setCentralWidget(m_pMainWidget); 21 | } 22 | 23 | mainwindow::~mainwindow() 24 | { 25 | delete ui; 26 | } 27 | 28 | int mainwindow::createWidgets(int num) { 29 | for(int i = 0;i < num; i++) { 30 | m_mapWidgets[i] = m_pMainWidget->addChildWnd(); 31 | } 32 | return 0; 33 | } 34 | 35 | video_widget* mainwindow::videoWidget(int id) { 36 | if (m_mapWidgets.find(id) != m_mapWidgets.end()) 37 | return m_mapWidgets[id]; 38 | else{ 39 | return nullptr; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /modules/bmgui/mainwindow.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef VIDEOUI_MAINWINDOW_H 11 | #define VIDEOUI_MAINWINDOW_H 12 | 13 | #include 14 | #include "thread_queue.h" 15 | #include 16 | #include "video_widget.h" 17 | namespace Ui { 18 | class mainwindow; 19 | } 20 | 21 | class container_widget; 22 | class mainwindow : public QMainWindow 23 | { 24 | Q_OBJECT 25 | 26 | container_widget *m_pMainWidget; 27 | std::unordered_map m_mapWidgets; 28 | public: 29 | explicit mainwindow(QWidget *parent = 0); 30 | ~mainwindow(); 31 | 32 | int createWidgets(int num); 33 | video_widget* videoWidget(int id); 34 | 35 | private: 36 | Ui::mainwindow *ui; 37 | }; 38 | 39 | #endif // VIDEOUI_MAINWINDOW_H 40 | -------------------------------------------------------------------------------- /modules/bmgui/mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | mainwindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /modules/bmgui/video_pixmap_widget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | video_pixmap_widget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 277 10 | 208 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /modules/bmgui/video_render.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #pragma once 11 | 12 | #include 13 | 14 | namespace fdrtsp { 15 | 16 | struct video_render_interface { 17 | virtual int image_width() = 0; 18 | virtual int image_height() = 0; 19 | virtual int set_hwnd(void *hwnd) = 0; 20 | virtual int draw_yuv420(const uint8_t *const data[], int const linesize[], int w, int h) = 0; 21 | virtual int draw_rect(int x, int y, int w, int h) = 0; 22 | virtual int resize(int x, int y, int w, int h) = 0; 23 | }; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /modules/bmgui/video_widget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | video_widget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 387 10 | 315 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | false 18 | 19 | 20 | 21 | 22 | 0 23 | 0 24 | 383 25 | 16 26 | 27 | 28 | 29 | 30 | 16777215 31 | 16777215 32 | 33 | 34 | 35 | false 36 | 37 | 38 | NoTitle 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /modules/bmgui/videoui.cpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #include "videoui.h" 11 | -------------------------------------------------------------------------------- /modules/bmgui/videoui.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef VIDEOUI_VIDEOUI_H 11 | #define VIDEOUI_VIDEOUI_H 12 | 13 | #include 14 | 15 | class VideoUI { 16 | public: 17 | std::shared create(int num); 18 | ~VideoUI() { 19 | std::cout << "VideoUI() dtor" << std::endl; 20 | } 21 | 22 | virtual int push_frame(int chan, AVFrame *frame) = 0; 23 | virtual int push_frame(int chan, cv::Mat& img) = 0; 24 | }; 25 | 26 | using std::shared VideoUIPtr; 27 | 28 | 29 | #endif //VIDEOUI_VIDEOUI_H 30 | -------------------------------------------------------------------------------- /modules/bmgui/videoui.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2017-08-16T21:22:49 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | 9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 10 | CONFIG += debug 11 | 12 | QMAKE_CXXFLAGS += -std=c++11 13 | 14 | TARGET = videoui 15 | TEMPLATE = app 16 | 17 | SOURCES += main.cpp 18 | videoui_mainwindow.cpp 19 | 20 | 21 | HEADERS += videoui_mainwindow.h 22 | 23 | 24 | 25 | FORMS += videoui_mainwindow.ui 26 | 27 | 28 | RESOURCES += -------------------------------------------------------------------------------- /modules/bmutility/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | project(bmutility) 3 | set(UTILITY_TOP ${CMAKE_CURRENT_SOURCE_DIR}) 4 | add_compile_options(-Wno-deprecated-declarations) 5 | 6 | include_directories(${common_inc_dirs} ${libsophon_inc_dirs} ${opencv_inc_dirs} ${ffmpeg_inc_dirs}) 7 | link_directories(${ffmpeg_link_dirs} ${opencv_link_dirs} ${libsophon_link_dirs}) 8 | 9 | message(ffmpeg_inc = ${ffmpeg_inc_dirs}) 10 | message(ffmpeg_link_libs = ${ffmpeg_link_libs}) 11 | 12 | add_library(bmutility 13 | bmutility_pool.cpp 14 | stream_sei.cpp 15 | stream_demuxer.cpp 16 | stream_decode.cpp 17 | stream_cvdecode.cpp 18 | bmutility_timer.cpp 19 | bmutility_string.cpp) 20 | 21 | add_executable(stream_unittest stream_unittest.cpp) 22 | target_link_libraries(stream_unittest bmutility ${ffmpeg_link_libs} bmlib pthread) 23 | 24 | add_executable(base64_unittest base64_unittest.cpp) 25 | target_link_libraries(base64_unittest bmutility pthread) 26 | -------------------------------------------------------------------------------- /modules/bmutility/base64_unittest.cpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #include 11 | #include "bmutility_string.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | int pdata[]={0,2,4,6,8,10,0,1,2,3,4,5}; 16 | std::string base64_str = bm::base64_enc(pdata, sizeof(pdata)); 17 | std::cout << base64_str << std::endl; 18 | 19 | int real_size; 20 | int length = base64_str.length(); 21 | int size = base64_str.size(); 22 | assert(length == size); 23 | 24 | std::string out = bm::base64_dec(base64_str.data(), base64_str.length()); 25 | int *out_intp = (int*)out.data(); 26 | assert(0 == memcmp(out.data(), pdata, sizeof(pdata))); 27 | for(int i = 0;i < sizeof(pdata)/sizeof(int); ++i) { 28 | printf("%d ", out_intp[i]); 29 | } 30 | printf("\n"); 31 | 32 | } -------------------------------------------------------------------------------- /modules/bmutility/bmutility.cpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #include "bmutility.h" 11 | 12 | void Watch::mark(const std::string &key) 13 | { 14 | } 15 | 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /modules/bmutility/bmutility_basemodel.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef _SOPHON_PIPELINE_BNUTILITY_BASEMODEL_H_ 11 | #define _SOPHON_PIPELINE_BNUTILITY_BASEMODEL_H_ 12 | #include 13 | #include 14 | 15 | #define DEFINE_BASEMODEL_THRES_SETTER_GETTER(T, t) \ 16 | inline void set_##t(T val) { m_##t##_thres = val; } \ 17 | inline T get_##t(T val) { return m_##t##_thres; } 18 | 19 | 20 | namespace bm { 21 | 22 | class BaseModel : public std::enable_shared_from_this { 23 | public: 24 | DEFINE_BASEMODEL_THRES_SETTER_GETTER(float, cls) 25 | DEFINE_BASEMODEL_THRES_SETTER_GETTER(float, nms) 26 | DEFINE_BASEMODEL_THRES_SETTER_GETTER(float, obj) 27 | inline int getBatch() { return m_max_batch; } 28 | protected: 29 | BaseModel() = default; 30 | virtual ~BaseModel() = default; 31 | 32 | protected: 33 | float m_cls_thres {0.5}; 34 | float m_nms_thres {0.5}; 35 | float m_obj_thres {0.5}; 36 | int m_max_batch {1}; 37 | std::vector m_class_names; 38 | 39 | }; 40 | } // namespace bm 41 | #endif // _SOPHON_PIPELINE_BNUTILITY_BASEMODEL_H_ -------------------------------------------------------------------------------- /modules/bmutility/bmutility_pool.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #pragma once 11 | #include "bmutility.h" 12 | 13 | namespace bm { 14 | class DeviceMemoryPool { 15 | private: 16 | std::mutex mut_; 17 | static const size_t max_ddr = 3; 18 | bm_handle_t handle_; 19 | std::vector registry_[max_ddr]; 20 | std::unordered_map history_; 21 | bool try_alloc_from_registry(bm_device_mem_t &, size_t size, size_t heap); 22 | 23 | public: 24 | DeviceMemoryPool(bm_handle_t); 25 | ~DeviceMemoryPool(); 26 | bm_device_mem_t alloc(size_t size, size_t heap); 27 | void free(bm_device_mem_t mem); 28 | 29 | void alloc( 30 | size_t num, bm_image *images, 31 | size_t height, size_t width, 32 | bm_image_format_ext img_format, 33 | bm_image_data_format_ext data_type, 34 | int align, size_t heap); 35 | void free(size_t num, bm_image *images); 36 | 37 | void alloc(bm_tensor_t &tensor); 38 | void free(bm_tensor_t tensor); 39 | }; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /modules/bmutility/bmutility_string.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef SOPHON_PIPELINE_BMUTILITY_STRING_H 11 | #define SOPHON_PIPELINE_BMUTILITY_STRING_H 12 | #include 13 | #include 14 | #include "bmutility_types.h" 15 | 16 | namespace bm { 17 | std::vector split(std::string str, std::string pattern); 18 | bool start_with(const std::string &str, const std::string &head); 19 | std::string file_name_from_path(const std::string& path, bool hasExt); 20 | std::string file_ext_from_path(const std::string& str); 21 | std::string format(const char *pszFmt, ...); 22 | 23 | std::string base64_enc(const void *data, size_t sz); 24 | std::string base64_dec(const void *data, size_t sz); 25 | 26 | } 27 | #endif //SOPHON_PIPELINE_BMUTILITY_STRING_H 28 | -------------------------------------------------------------------------------- /modules/bmutility/ffmpeg_global.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef BM_UTILITY_FFMPEG_GLOBAL_H 11 | #define BM_UTILITY_FFMPEG_GLOBAL_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #include "libavdevice/avdevice.h" 16 | #include "libavcodec/avcodec.h" 17 | #include "libavutil/avutil.h" 18 | #include "libavformat/avformat.h" 19 | #include "libavutil/time.h" 20 | } 21 | #endif //!cplusplus 22 | 23 | namespace bm { 24 | 25 | class FfmpegGlobal { 26 | public: 27 | FfmpegGlobal() { 28 | av_register_all(); 29 | avformat_network_init(); 30 | avdevice_register_all(); 31 | av_log_set_level(AV_LOG_ERROR); 32 | } 33 | 34 | ~FfmpegGlobal() { 35 | std::cout << "~FfmpegGlobal() dtor.." << std::endl; 36 | avformat_network_deinit(); 37 | } 38 | }; 39 | } 40 | 41 | #endif //FACEDEMOSYSTEM_FFMPEG_GLOBAL_H 42 | -------------------------------------------------------------------------------- /modules/bmutility/stream_sei.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Copyright (C) 2022 Sophgo Technologies Inc. All rights reserved. 4 | // 5 | // SOPHON-PIPELINE is licensed under the 2-Clause BSD License except for the 6 | // third-party components. 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef BMUTILITY_STREAM_SEI_H 11 | #define BMUTILITY_STREAM_SEI_H 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | uint32_t reversebytes(uint32_t value); 18 | 19 | uint32_t h264sei_calc_packet_size(uint32_t size); 20 | int h264sei_packet_write(uint8_t *oPacketBuf, bool isAnnexb, const uint8_t *content, uint32_t size); 21 | int h264sei_packet_read(uint8_t *inPacket, uint32_t size, uint8_t *buffer, int buff_size); 22 | 23 | // H265 24 | int h265sei_packet_write(unsigned char * packet, bool isAnnexb, const uint8_t * content, uint32_t size); 25 | int h265sei_packet_read(unsigned char * packet, uint32_t size, uint8_t * buffer, int buf_size); 26 | 27 | #endif //PROJECT_BM_LOG_H 28 | -------------------------------------------------------------------------------- /modules/tracker/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | project(bmtracker) 3 | 4 | set(TRACKER_TOP ${COMMON_TOP}/tracker) 5 | if (${TARGET_ARCH} STREQUAL "x86") 6 | set(eigen3_inc_dirs /usr/include) 7 | elseif (${TARGET_ARCH} STREQUAL "soc") 8 | if (NOT USE_300_SOC) 9 | set(eigen3_inc_dirs ${libsophon_inc_dirs}) 10 | else() 11 | set(eigen3_inc_dirs /usr/include) 12 | endif() 13 | elseif (${TARGET_ARCH} STREQUAL "arm64") 14 | set(eigen3_inc_dirs /usr/local/include) 15 | else() 16 | message( FATAL_ERROR "${TARGET_ARCH} is not supported yet." ) 17 | endif() 18 | include_directories(${common_inc_dirs} ${libsophon_inc_dirs} ${sophon_ffmpeg_inc_dirs} ${sophon_opencv_inc_dirs} ${eigen3_inc_dirs}/eigen3) 19 | 20 | add_library(bmtracker bm_tracker.cpp 21 | ${TRACKER_TOP}/KalmanFilter/kalmanfilter.cpp 22 | ${TRACKER_TOP}/KalmanFilter/linear_assignment.cpp 23 | ${TRACKER_TOP}/KalmanFilter/nn_matching.cpp 24 | ${TRACKER_TOP}/KalmanFilter/track.cpp 25 | ${TRACKER_TOP}/KalmanFilter/tracker.cpp 26 | ${TRACKER_TOP}/MunkresAssignment/hungarianoper.cpp 27 | ${TRACKER_TOP}/MunkresAssignment/munkres/munkres.cpp 28 | ${TRACKER_TOP}/DeepAppearanceDescriptor/model.cpp 29 | ) 30 | -------------------------------------------------------------------------------- /modules/tracker/DeepAppearanceDescriptor/FeatureTensor.h: -------------------------------------------------------------------------------- 1 | #include "opencv2/opencv.hpp" 2 | #include "opencv2/core/core.hpp" 3 | #include "opencv2/highgui/highgui.hpp" 4 | #include "tensorflow/core/public/session.h" 5 | #include "tensorflow/core/protobuf/meta_graph.pb.h" 6 | 7 | #include "model.h" 8 | #include "dataType.h" 9 | typedef unsigned char uint8; 10 | 11 | class FeatureTensor 12 | { 13 | public: 14 | static FeatureTensor* getInstance(); 15 | bool getRectsFeature(const cv::Mat& img, DETECTIONS& d); 16 | 17 | private: 18 | FeatureTensor(); 19 | FeatureTensor(const FeatureTensor&); 20 | FeatureTensor& operator = (const FeatureTensor&); 21 | static FeatureTensor* instance; 22 | bool init(); 23 | ~FeatureTensor(); 24 | 25 | void tobuffer(const std::vector &imgs, uint8 *buf); 26 | 27 | int feature_dim; 28 | tensorflow::Session* session; 29 | std::vector output_tensors; 30 | std::vector outnames; 31 | tensorflow::string input_layer; 32 | public: 33 | void test(); 34 | }; 35 | -------------------------------------------------------------------------------- /modules/tracker/DeepAppearanceDescriptor/dataType.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef DATATYPE_H 3 | #define DATATYPEH 4 | 5 | #include 6 | #include 7 | 8 | #include 9 | #include 10 | typedef Eigen::Matrix DETECTBOX; 11 | typedef Eigen::Matrix DETECTBOXSS; 12 | typedef Eigen::Matrix FEATURE; 13 | typedef Eigen::Matrix FEATURESS; 14 | //typedef std::vector FEATURESS; 15 | 16 | //Kalmanfilter 17 | //typedef Eigen::Matrix KAL_FILTER; 18 | typedef Eigen::Matrix KAL_MEAN; 19 | typedef Eigen::Matrix KAL_COVA; 20 | typedef Eigen::Matrix KAL_HMEAN; 21 | typedef Eigen::Matrix KAL_HCOVA; 22 | using KAL_DATA = std::pair; 23 | using KAL_HDATA = std::pair; 24 | 25 | //main 26 | using RESULT_DATA = std::pair; 27 | 28 | //tracker: 29 | using TRACKER_DATA = std::pair; 30 | using MATCH_DATA = std::pair; 31 | typedef struct t{ 32 | std::vector matches; 33 | std::vector unmatched_tracks; 34 | std::vector unmatched_detections; 35 | }TRACHER_MATCHD; 36 | 37 | //linear_assignment: 38 | typedef Eigen::Matrix DYNAMICM; 39 | 40 | 41 | #endif // DATATYPE_H 42 | -------------------------------------------------------------------------------- /modules/tracker/DeepAppearanceDescriptor/model.cpp: -------------------------------------------------------------------------------- 1 | #include "model.h" 2 | #include 3 | 4 | const float kRatio=0.5; 5 | enum DETECTBOX_IDX {IDX_X = 0, IDX_Y, IDX_W, IDX_H }; 6 | 7 | DETECTBOX DETECTION_ROW::to_xyah() const 8 | {//(centerx, centery, ration, h) 9 | DETECTBOX ret = tlwh; 10 | ret(0,IDX_X) += (ret(0, IDX_W)*kRatio); 11 | ret(0, IDX_Y) += (ret(0, IDX_H)*kRatio); 12 | ret(0, IDX_W) /= ret(0, IDX_H); 13 | return ret; 14 | } 15 | 16 | DETECTBOX DETECTION_ROW::to_tlbr() const 17 | {//(x,y,xx,yy) 18 | DETECTBOX ret = tlwh; 19 | ret(0, IDX_X) += ret(0, IDX_W); 20 | ret(0, IDX_Y) += ret(0, IDX_H); 21 | return ret; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /modules/tracker/DeepAppearanceDescriptor/model.h: -------------------------------------------------------------------------------- 1 | #ifndef MODEL_H 2 | #define MODEL_H 3 | #include "dataType.h" 4 | 5 | 6 | // * Each rect's data structure. 7 | // * tlwh: topleft point & (w,h) 8 | // * confidence: detection confidence. 9 | // * feature: the rect's 128d feature. 10 | // */ 11 | class DETECTION_ROW 12 | { 13 | public: 14 | DETECTBOX tlwh; 15 | float confidence; 16 | FEATURE feature; 17 | int class_id; 18 | DETECTBOX to_xyah() const; 19 | DETECTBOX to_tlbr() const; 20 | }; 21 | 22 | typedef std::vector DETECTIONS; 23 | 24 | 25 | 26 | #endif // MODEL_H 27 | -------------------------------------------------------------------------------- /modules/tracker/KalmanFilter/kalmanfilter.h: -------------------------------------------------------------------------------- 1 | #ifndef KALMANFILTER_H 2 | #define KALMANFILTER_H 3 | 4 | #include "../DeepAppearanceDescriptor/dataType.h" 5 | 6 | class KalmanFilter 7 | { 8 | public: 9 | static const double chi2inv95[10]; 10 | KalmanFilter(); 11 | KAL_DATA initiate(const DETECTBOX& measurement); 12 | void predict(KAL_MEAN& mean, KAL_COVA& covariance); 13 | KAL_HDATA project(const KAL_MEAN& mean, const KAL_COVA& covariance); 14 | KAL_DATA update(const KAL_MEAN& mean, 15 | const KAL_COVA& covariance, 16 | const DETECTBOX& measurement); 17 | 18 | Eigen::Matrix gating_distance( 19 | const KAL_MEAN& mean, 20 | const KAL_COVA& covariance, 21 | const std::vector& measurements, 22 | bool only_position = false); 23 | 24 | private: 25 | Eigen::Matrix _motion_mat; 26 | Eigen::Matrix _update_mat; 27 | float _std_weight_position; 28 | float _std_weight_velocity; 29 | }; 30 | 31 | #endif // KALMANFILTER_H 32 | -------------------------------------------------------------------------------- /modules/tracker/KalmanFilter/linear_assignment.h: -------------------------------------------------------------------------------- 1 | #ifndef LINEAR_ASSIGNMENT_H 2 | #define LINEAR_ASSIGNMENT_H 3 | #include "../DeepAppearanceDescriptor/dataType.h" 4 | #include "tracker.h" 5 | 6 | #define INFTY_COST 1e5 7 | class tracker; 8 | //for matching; 9 | class linear_assignment 10 | { 11 | linear_assignment(); 12 | linear_assignment(const linear_assignment& ); 13 | linear_assignment& operator=(const linear_assignment&); 14 | static linear_assignment* instance; 15 | 16 | public: 17 | static linear_assignment* getInstance(); 18 | TRACHER_MATCHD matching_cascade(tracker* distance_metric, 19 | tracker::GATED_METRIC_FUNC distance_metric_func, 20 | float max_distance, 21 | int cascade_depth, 22 | std::vector& tracks, 23 | const DETECTIONS& detections, 24 | std::vector &track_indices, 25 | std::vector detection_indices = std::vector()); 26 | TRACHER_MATCHD min_cost_matching( 27 | tracker* distance_metric, 28 | tracker::GATED_METRIC_FUNC distance_metric_func, 29 | float max_distance, 30 | std::vector& tracks, 31 | const DETECTIONS& detections, 32 | std::vector& track_indices, 33 | std::vector& detection_indices); 34 | DYNAMICM gate_cost_matrix( 35 | KalmanFilter* kf, 36 | DYNAMICM& cost_matrix, 37 | std::vector& tracks, 38 | const DETECTIONS& detections, 39 | const std::vector& track_indices, 40 | const std::vector& detection_indices, 41 | float gated_cost = INFTY_COST, 42 | bool only_position = false); 43 | }; 44 | 45 | #endif // LINEAR_ASSIGNMENT_H 46 | -------------------------------------------------------------------------------- /modules/tracker/KalmanFilter/nn_matching.h: -------------------------------------------------------------------------------- 1 | #ifndef NN_MATCHING_H 2 | #define NN_MATCHING_H 3 | 4 | #include "../DeepAppearanceDescriptor/dataType.h" 5 | 6 | #include 7 | 8 | //A tool to calculate distance; 9 | class NearNeighborDisMetric{ 10 | public: 11 | enum METRIC_TYPE{euclidean=1, cosine}; 12 | NearNeighborDisMetric(METRIC_TYPE metric, 13 | float matching_threshold, 14 | int budget); 15 | DYNAMICM distance(const FEATURESS& features, const std::vector &targets); 16 | // void partial_fit(FEATURESS& features, std::vector targets, std::vector active_targets); 17 | void partial_fit(std::vector& tid_feats, std::vector& active_targets); 18 | float mating_threshold; 19 | 20 | private: 21 | typedef Eigen::VectorXf (NearNeighborDisMetric::*PTRFUN)(const FEATURESS&, const FEATURESS&); 22 | Eigen::VectorXf _nncosine_distance(const FEATURESS& x, const FEATURESS& y); 23 | Eigen::VectorXf _nneuclidean_distance(const FEATURESS& x, const FEATURESS& y); 24 | 25 | Eigen::MatrixXf _pdist(const FEATURESS& x, const FEATURESS& y); 26 | Eigen::MatrixXf _cosine_distance(const FEATURESS & a, const FEATURESS& b, bool data_is_normalized = false); 27 | private: 28 | PTRFUN _metric; 29 | int budget; 30 | std::map samples; 31 | }; 32 | 33 | #endif // NN_MATCHING_H 34 | -------------------------------------------------------------------------------- /modules/tracker/KalmanFilter/tracker.h: -------------------------------------------------------------------------------- 1 | #ifndef TRACKER_H 2 | #define TRACKER_H 3 | #include 4 | 5 | 6 | #include "kalmanfilter.h" 7 | #include "track.h" 8 | #include "../DeepAppearanceDescriptor/model.h" 9 | 10 | class NearNeighborDisMetric; 11 | 12 | class tracker 13 | { 14 | public: 15 | NearNeighborDisMetric* metric; 16 | float max_iou_distance; 17 | int max_age; 18 | int n_init; 19 | 20 | KalmanFilter* kf; 21 | 22 | int _next_idx; 23 | public: 24 | std::vector tracks; 25 | tracker(/*NearNeighborDisMetric* metric,*/ 26 | float max_cosine_distance, int nn_budget, 27 | float max_iou_distance = 0.7, 28 | int max_age = 30, int n_init=3); 29 | void predict(); 30 | void update(const DETECTIONS& detections); 31 | typedef DYNAMICM (tracker::* GATED_METRIC_FUNC)( 32 | std::vector& tracks, 33 | const DETECTIONS& dets, 34 | const std::vector& track_indices, 35 | const std::vector& detection_indices); 36 | private: 37 | void _match(const DETECTIONS& detections, TRACHER_MATCHD& res); 38 | void _initiate_track(const DETECTION_ROW& detection); 39 | public: 40 | DYNAMICM gated_matric( 41 | std::vector& tracks, 42 | const DETECTIONS& dets, 43 | const std::vector& track_indices, 44 | const std::vector& detection_indices); 45 | DYNAMICM iou_cost( 46 | std::vector& tracks, 47 | const DETECTIONS& dets, 48 | const std::vector& track_indices, 49 | const std::vector& detection_indices); 50 | Eigen::VectorXf iou(DETECTBOX& bbox, 51 | DETECTBOXSS &candidates); 52 | }; 53 | 54 | #endif // TRACKER_H 55 | -------------------------------------------------------------------------------- /modules/tracker/MunkresAssignment/hungarianoper.cpp: -------------------------------------------------------------------------------- 1 | #include "hungarianoper.h" 2 | 3 | Eigen::Matrix HungarianOper::Solve(const DYNAMICM &cost_matrix) 4 | { 5 | int rows = cost_matrix.rows(); 6 | int cols = cost_matrix.cols(); 7 | Matrix matrix(rows, cols); 8 | for (int row = 0; row < rows; row++) { 9 | for (int col = 0; col < cols; col++) { 10 | matrix(row, col) = cost_matrix(row, col); 11 | } 12 | } 13 | //Munkres get matrix; 14 | Munkres m; 15 | m.solve(matrix); 16 | 17 | // 18 | std::vector> pairs; 19 | for (int row = 0; row < rows; row++) { 20 | for (int col = 0; col < cols; col++) { 21 | int tmp = (int)matrix(row, col); 22 | if (tmp == 0) pairs.push_back(std::make_pair(row, col)); 23 | } 24 | } 25 | // 26 | int count = pairs.size(); 27 | Eigen::Matrix re(count, 2); 28 | for (int i = 0; i < count; i++) { 29 | re(i, 0) = pairs[i].first; 30 | re(i, 1) = pairs[i].second; 31 | } 32 | return re; 33 | }//end Solve; 34 | -------------------------------------------------------------------------------- /modules/tracker/MunkresAssignment/hungarianoper.h: -------------------------------------------------------------------------------- 1 | #ifndef HUNGARIANOPER_H 2 | #define HUNGARIANOPER_H 3 | #include "munkres/munkres.h" 4 | //#include "munkres/adapters/boostmatrixadapter.h" 5 | #include "../DeepAppearanceDescriptor/dataType.h" 6 | 7 | class HungarianOper { 8 | public: 9 | static Eigen::Matrix Solve(const DYNAMICM &cost_matrix); 10 | }; 11 | 12 | #endif // HUNGARIANOPER_H 13 | -------------------------------------------------------------------------------- /modules/tracker/MunkresAssignment/munkres/munkres.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 John Weaver 3 | * Copyright (c) 2015 Miroslav Krajicek 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include "munkres.h" 21 | 22 | template class Munkres; 23 | template class Munkres; 24 | template class Munkres; 25 | 26 | -------------------------------------------------------------------------------- /modules/tracker/bm_tracker.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "bm_tracker.h" 3 | #include "KalmanFilter/tracker.h" 4 | #include 5 | 6 | namespace bm { 7 | class BMTrackerImpl : public BMTracker { 8 | tracker *m_tracker; 9 | std::mutex m_tracker_sync; 10 | public: 11 | BMTrackerImpl(float max_cosine_distance=0.2, int nn_budget=100):m_tracker(nullptr) { 12 | m_tracker = new tracker(max_cosine_distance, nn_budget); 13 | } 14 | 15 | virtual ~BMTrackerImpl() { 16 | delete m_tracker; 17 | } 18 | 19 | 20 | virtual void update(const bm::NetOutputObjects &rects, bm::NetOutputObjects &results) { 21 | std::lock_guard lck(m_tracker_sync); 22 | DETECTIONS detections; 23 | for(auto rc : rects) { 24 | DETECTION_ROW row; 25 | row.tlwh = DETECTBOX(rc.x1, rc.y1, rc.width(), rc.height()); 26 | row.feature.setZero(); 27 | row.class_id = rc.class_id; 28 | detections.push_back(row); 29 | } 30 | 31 | m_tracker->predict(); 32 | m_tracker->update(detections); 33 | for(Track &track : m_tracker->tracks) { 34 | if(!track.is_confirmed() || track.time_since_update > 1) continue; 35 | 36 | auto tmpbox = track.to_tlwh(); 37 | bm::NetOutputObject dst_rc(tmpbox(0), tmpbox(1), tmpbox(2), tmpbox(3)); 38 | dst_rc.track_id = track.track_id; 39 | dst_rc.class_id = track.class_id; 40 | results.push_back(dst_rc); 41 | } 42 | } 43 | 44 | }; 45 | 46 | std::shared_ptr BMTracker::create(float max_cosine_distance, int nn_budget) 47 | { 48 | return std::make_shared(max_cosine_distance, nn_budget); 49 | } 50 | } -------------------------------------------------------------------------------- /modules/tracker/bm_tracker.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef SOPHON_PIPELINE_BM_TRACKER_H 3 | #define SOPHON_PIPELINE_BM_TRACKER_H 4 | 5 | #include "bmutility_types.h" 6 | #include 7 | namespace bm { 8 | class BMTracker { 9 | public: 10 | virtual ~BMTracker() {} 11 | 12 | static std::shared_ptr create(float max_cosine_distance=0.2, int nn_budget=100); 13 | virtual void update(const bm::NetOutputObjects &rects, bm::NetOutputObjects &tracks) = 0; 14 | 15 | }; 16 | 17 | } 18 | 19 | #endif //SOPHON_PIPELINE_BM_TRACKER_H 20 | -------------------------------------------------------------------------------- /third_party/jsoncpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | project(jsoncpp) 3 | add_library(jsoncpp json_reader.cpp 4 | json_value.cpp 5 | json_writer.cpp) 6 | -------------------------------------------------------------------------------- /third_party/jsoncpp/json/autolink.h: -------------------------------------------------------------------------------- 1 | // Copyright 2007-2010 Baptiste Lepilleur 2 | // Distributed under MIT license, or public domain if desired and 3 | // recognized in your jurisdiction. 4 | // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE 5 | 6 | #ifndef JSON_AUTOLINK_H_INCLUDED 7 | #define JSON_AUTOLINK_H_INCLUDED 8 | 9 | #include "config.h" 10 | 11 | #ifdef JSON_IN_CPPTL 12 | #include 13 | #endif 14 | 15 | #if !defined(JSON_NO_AUTOLINK) && !defined(JSON_DLL_BUILD) && \ 16 | !defined(JSON_IN_CPPTL) 17 | #define CPPTL_AUTOLINK_NAME "json" 18 | #undef CPPTL_AUTOLINK_DLL 19 | #ifdef JSON_DLL 20 | #define CPPTL_AUTOLINK_DLL 21 | #endif 22 | #include "autolink.h" 23 | #endif 24 | 25 | #endif // JSON_AUTOLINK_H_INCLUDED 26 | -------------------------------------------------------------------------------- /third_party/jsoncpp/json/features.h: -------------------------------------------------------------------------------- 1 | // Copyright 2007-2010 Baptiste Lepilleur 2 | // Distributed under MIT license, or public domain if desired and 3 | // recognized in your jurisdiction. 4 | // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE 5 | 6 | #ifndef CPPTL_JSON_FEATURES_H_INCLUDED 7 | #define CPPTL_JSON_FEATURES_H_INCLUDED 8 | 9 | #if !defined(JSON_IS_AMALGAMATION) 10 | #include "forwards.h" 11 | #endif // if !defined(JSON_IS_AMALGAMATION) 12 | 13 | namespace Json { 14 | 15 | /** \brief Configuration passed to reader and writer. 16 | * This configuration object can be used to force the Reader or Writer 17 | * to behave in a standard conforming way. 18 | */ 19 | class JSON_API Features { 20 | public: 21 | /** \brief A configuration that allows all features and assumes all strings 22 | * are UTF-8. 23 | * - C & C++ comments are allowed 24 | * - Root object can be any JSON value 25 | * - Assumes Value strings are encoded in UTF-8 26 | */ 27 | static Features all(); 28 | 29 | /** \brief A configuration that is strictly compatible with the JSON 30 | * specification. 31 | * - Comments are forbidden. 32 | * - Root object must be either an array or an object value. 33 | * - Assumes Value strings are encoded in UTF-8 34 | */ 35 | static Features strictMode(); 36 | 37 | /** \brief Initialize the configuration like JsonConfig::allFeatures; 38 | */ 39 | Features(); 40 | 41 | /// \c true if comments are allowed. Default: \c true. 42 | bool allowComments_; 43 | 44 | /// \c true if root must be either an array or an object value. Default: \c 45 | /// false. 46 | bool strictRoot_; 47 | }; 48 | 49 | } // namespace Json 50 | 51 | #endif // CPPTL_JSON_FEATURES_H_INCLUDED 52 | -------------------------------------------------------------------------------- /third_party/jsoncpp/json/forwards.h: -------------------------------------------------------------------------------- 1 | // Copyright 2007-2010 Baptiste Lepilleur 2 | // Distributed under MIT license, or public domain if desired and 3 | // recognized in your jurisdiction. 4 | // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE 5 | 6 | #ifndef JSON_FORWARDS_H_INCLUDED 7 | #define JSON_FORWARDS_H_INCLUDED 8 | 9 | #if !defined(JSON_IS_AMALGAMATION) 10 | #include "config.h" 11 | #endif // if !defined(JSON_IS_AMALGAMATION) 12 | 13 | namespace Json { 14 | 15 | // writer.h 16 | class FastWriter; 17 | class StyledWriter; 18 | 19 | // reader.h 20 | class Reader; 21 | 22 | // features.h 23 | class Features; 24 | 25 | // value.h 26 | typedef unsigned int ArrayIndex; 27 | class StaticString; 28 | class Path; 29 | class PathArgument; 30 | class Value; 31 | class ValueIteratorBase; 32 | class ValueIterator; 33 | class ValueConstIterator; 34 | 35 | } // namespace Json 36 | 37 | #endif // JSON_FORWARDS_H_INCLUDED 38 | -------------------------------------------------------------------------------- /third_party/jsoncpp/json/json.h: -------------------------------------------------------------------------------- 1 | // Copyright 2007-2010 Baptiste Lepilleur 2 | // Distributed under MIT license, or public domain if desired and 3 | // recognized in your jurisdiction. 4 | // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE 5 | 6 | #ifndef JSON_JSON_H_INCLUDED 7 | #define JSON_JSON_H_INCLUDED 8 | 9 | #include "autolink.h" 10 | #include "value.h" 11 | #include "reader.h" 12 | #include "writer.h" 13 | #include "features.h" 14 | 15 | #endif // JSON_JSON_H_INCLUDED 16 | -------------------------------------------------------------------------------- /third_party/jsoncpp/json/version.h: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT. This file (and "version") is generated by CMake. 2 | // Run CMake configure step to update it. 3 | #ifndef JSON_VERSION_H_INCLUDED 4 | # define JSON_VERSION_H_INCLUDED 5 | 6 | # define JSONCPP_VERSION_STRING "0.10.7" 7 | # define JSONCPP_VERSION_MAJOR 0 8 | # define JSONCPP_VERSION_MINOR 10 9 | # define JSONCPP_VERSION_PATCH 7 10 | # define JSONCPP_VERSION_QUALIFIER 11 | # define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8)) 12 | 13 | #endif // JSON_VERSION_H_INCLUDED 14 | -------------------------------------------------------------------------------- /third_party/live555/#config.macosx#: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. $(EXTRA_LDFLAGS) -DBSD=1 -O -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -DTIME_BASE=in 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = libtool -s -o 13 | LIBRARY_LINK_OPTS = 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/BasicUsageEnvironment/Makefile.head: -------------------------------------------------------------------------------- 1 | INCLUDES = -Iinclude -I../UsageEnvironment/include -I../groupsock/include 2 | PREFIX = /usr/local 3 | LIBDIR = $(PREFIX)/lib 4 | ##### Change the following for your environment: 5 | -------------------------------------------------------------------------------- /third_party/live555/BasicUsageEnvironment/Makefile.tail: -------------------------------------------------------------------------------- 1 | ##### End of variables to change 2 | 3 | NAME = libBasicUsageEnvironment 4 | LIB_FILE = $(NAME).$(LIB_SUFFIX) 5 | ALL = $(LIB_FILE) 6 | all: $(ALL) 7 | 8 | OBJS = BasicUsageEnvironment0.$(OBJ) BasicUsageEnvironment.$(OBJ) \ 9 | BasicTaskScheduler0.$(OBJ) BasicTaskScheduler.$(OBJ) \ 10 | DelayQueue.$(OBJ) BasicHashTable.$(OBJ) 11 | 12 | libBasicUsageEnvironment.$(LIB_SUFFIX): $(OBJS) 13 | $(LIBRARY_LINK)$@ $(LIBRARY_LINK_OPTS) \ 14 | $(OBJS) 15 | 16 | .$(C).$(OBJ): 17 | $(C_COMPILER) -c $(C_FLAGS) $< 18 | 19 | .$(CPP).$(OBJ): 20 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $< 21 | 22 | BasicUsageEnvironment0.$(CPP): include/BasicUsageEnvironment0.hh 23 | include/BasicUsageEnvironment0.hh: include/BasicUsageEnvironment_version.hh include/DelayQueue.hh 24 | BasicUsageEnvironment.$(CPP): include/BasicUsageEnvironment.hh 25 | include/BasicUsageEnvironment.hh: include/BasicUsageEnvironment0.hh 26 | BasicTaskScheduler0.$(CPP): include/BasicUsageEnvironment0.hh include/HandlerSet.hh 27 | BasicTaskScheduler.$(CPP): include/BasicUsageEnvironment.hh include/HandlerSet.hh 28 | DelayQueue.$(CPP): include/DelayQueue.hh 29 | BasicHashTable.$(CPP): include/BasicHashTable.hh 30 | 31 | clean: 32 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~ 33 | 34 | install: install1 $(INSTALL2) 35 | install1: libBasicUsageEnvironment.$(LIB_SUFFIX) 36 | install -d $(DESTDIR)$(PREFIX)/include/BasicUsageEnvironment $(DESTDIR)$(LIBDIR) 37 | install -m 644 include/*.hh $(DESTDIR)$(PREFIX)/include/BasicUsageEnvironment 38 | install -m 644 libBasicUsageEnvironment.$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR) 39 | install_shared_libraries: libBasicUsageEnvironment.$(LIB_SUFFIX) 40 | ln -fs $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).$(SHORT_LIB_SUFFIX) 41 | ln -fs $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).so 42 | 43 | ##### Any additional, platform-specific rules come here: 44 | -------------------------------------------------------------------------------- /third_party/live555/BasicUsageEnvironment/include/BasicUsageEnvironment_version.hh: -------------------------------------------------------------------------------- 1 | // Version information for the "BasicUsageEnvironment" library 2 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 3 | 4 | #ifndef _BASICUSAGEENVIRONMENT_VERSION_HH 5 | #define _BASICUSAGEENVIRONMENT_VERSION_HH 6 | 7 | #define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_STRING "2018.09.05" 8 | #define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_INT 1536105600 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /third_party/live555/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | 3 | aux_source_directory(BasicUsageEnvironment BasicUsageEnvironment) 4 | aux_source_directory(groupsock groupsock) 5 | aux_source_directory(liveMedia liveMedia) 6 | aux_source_directory(UsageEnvironment UsageEnvironment) 7 | 8 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/BasicUsageEnvironment/include 9 | ${CMAKE_CURRENT_SOURCE_DIR}/UsageEnvironment/include 10 | ${CMAKE_CURRENT_SOURCE_DIR}/groupsock/include 11 | ${CMAKE_CURRENT_SOURCE_DIR}/liveMedia/include) 12 | 13 | if (${TARGET_ARCH} STREQUAL "x86") 14 | add_compile_options(-m64 -fPIC) 15 | add_definitions(-DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64) 16 | elseif (${TARGET_ARCH} STREQUAL "soc") 17 | add_definitions(-DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64) 18 | elseif (${TARGET_ARCH} STREQUAL "arm64") 19 | add_definitions(-DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64) 20 | endif() 21 | 22 | #add_custom_target(live555_LIB ALL) 23 | #add_custom_command( 24 | # TARGET live555_LIB 25 | # COMMAND cd ${TOP}/third_party/live555 && ./genMakefiles linux-64bit 26 | # COMMAND cd ${TOP}/third_party/live555 && $(MAKE) 27 | # COMMAND echo live 555 compile successfully 28 | #) 29 | #add_custom_target( 30 | # TARGET video_stitch_demo 31 | # DEPENDS LIVE555_LIB 32 | #) 33 | 34 | add_library(live555 ${BasicUsageEnvironment} ${groupsock} ${liveMedia} ${UsageEnvironment}) 35 | -------------------------------------------------------------------------------- /third_party/live555/Makefile.head: -------------------------------------------------------------------------------- 1 | ##### Change the following for your environment: 2 | -------------------------------------------------------------------------------- /third_party/live555/Makefile.tail: -------------------------------------------------------------------------------- 1 | ##### End of variables to change 2 | 3 | LIVEMEDIA_DIR = liveMedia 4 | GROUPSOCK_DIR = groupsock 5 | USAGE_ENVIRONMENT_DIR = UsageEnvironment 6 | BASIC_USAGE_ENVIRONMENT_DIR = BasicUsageEnvironment 7 | 8 | TESTPROGS_DIR = testProgs 9 | 10 | MEDIA_SERVER_DIR = mediaServer 11 | 12 | PROXY_SERVER_DIR = proxyServer 13 | 14 | all: 15 | cd $(LIVEMEDIA_DIR) ; $(MAKE) 16 | cd $(GROUPSOCK_DIR) ; $(MAKE) 17 | cd $(USAGE_ENVIRONMENT_DIR) ; $(MAKE) 18 | cd $(BASIC_USAGE_ENVIRONMENT_DIR) ; $(MAKE) 19 | cd $(TESTPROGS_DIR) ; $(MAKE) 20 | cd $(MEDIA_SERVER_DIR) ; $(MAKE) 21 | cd $(PROXY_SERVER_DIR) ; $(MAKE) 22 | @echo 23 | @echo "For more information about this source code (including your obligations under the LGPL), please see our FAQ at http://live555.com/liveMedia/faq.html" 24 | 25 | install: 26 | cd $(LIVEMEDIA_DIR) ; $(MAKE) install 27 | cd $(GROUPSOCK_DIR) ; $(MAKE) install 28 | cd $(USAGE_ENVIRONMENT_DIR) ; $(MAKE) install 29 | cd $(BASIC_USAGE_ENVIRONMENT_DIR) ; $(MAKE) install 30 | cd $(TESTPROGS_DIR) ; $(MAKE) install 31 | cd $(MEDIA_SERVER_DIR) ; $(MAKE) install 32 | cd $(PROXY_SERVER_DIR) ; $(MAKE) install 33 | 34 | clean: 35 | cd $(LIVEMEDIA_DIR) ; $(MAKE) clean 36 | cd $(GROUPSOCK_DIR) ; $(MAKE) clean 37 | cd $(USAGE_ENVIRONMENT_DIR) ; $(MAKE) clean 38 | cd $(BASIC_USAGE_ENVIRONMENT_DIR) ; $(MAKE) clean 39 | cd $(TESTPROGS_DIR) ; $(MAKE) clean 40 | cd $(MEDIA_SERVER_DIR) ; $(MAKE) clean 41 | cd $(PROXY_SERVER_DIR) ; $(MAKE) clean 42 | 43 | distclean: clean 44 | -rm -f $(LIVEMEDIA_DIR)/Makefile $(GROUPSOCK_DIR)/Makefile \ 45 | $(USAGE_ENVIRONMENT_DIR)/Makefile $(BASIC_USAGE_ENVIRONMENT_DIR)/Makefile \ 46 | $(TESTPROGS_DIR)/Makefile $(MEDIA_SERVER_DIR)/Makefile \ 47 | $(PROXY_SERVER_DIR)/Makefile Makefile 48 | -------------------------------------------------------------------------------- /third_party/live555/README: -------------------------------------------------------------------------------- 1 | For documentation and instructions for building this software, 2 | see 3 | -------------------------------------------------------------------------------- /third_party/live555/UsageEnvironment/HashTable.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 17 | // Generic Hash Table 18 | // Implementation 19 | 20 | #include "HashTable.hh" 21 | 22 | HashTable::HashTable() { 23 | } 24 | 25 | HashTable::~HashTable() { 26 | } 27 | 28 | HashTable::Iterator::Iterator() { 29 | } 30 | 31 | HashTable::Iterator::~Iterator() {} 32 | 33 | void* HashTable::RemoveNext() { 34 | Iterator* iter = Iterator::create(*this); 35 | char const* key; 36 | void* removedValue = iter->next(key); 37 | if (removedValue != 0) Remove(key); 38 | 39 | delete iter; 40 | return removedValue; 41 | } 42 | 43 | void* HashTable::getFirst() { 44 | Iterator* iter = Iterator::create(*this); 45 | char const* key; 46 | void* firstValue = iter->next(key); 47 | 48 | delete iter; 49 | return firstValue; 50 | } 51 | -------------------------------------------------------------------------------- /third_party/live555/UsageEnvironment/Makefile.head: -------------------------------------------------------------------------------- 1 | INCLUDES = -Iinclude -I../groupsock/include 2 | PREFIX = /usr/local 3 | LIBDIR = $(PREFIX)/lib 4 | ##### Change the following for your environment: 5 | -------------------------------------------------------------------------------- /third_party/live555/UsageEnvironment/Makefile.tail: -------------------------------------------------------------------------------- 1 | ##### End of variables to change 2 | 3 | NAME = libUsageEnvironment 4 | USAGE_ENVIRONMENT_LIB = $(NAME).$(LIB_SUFFIX) 5 | ALL = $(USAGE_ENVIRONMENT_LIB) 6 | all: $(ALL) 7 | 8 | OBJS = UsageEnvironment.$(OBJ) HashTable.$(OBJ) strDup.$(OBJ) 9 | 10 | $(USAGE_ENVIRONMENT_LIB): $(OBJS) 11 | $(LIBRARY_LINK)$@ $(LIBRARY_LINK_OPTS) $(OBJS) 12 | 13 | .$(C).$(OBJ): 14 | $(C_COMPILER) -c $(C_FLAGS) $< 15 | 16 | .$(CPP).$(OBJ): 17 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $< 18 | 19 | UsageEnvironment.$(CPP): include/UsageEnvironment.hh 20 | include/UsageEnvironment.hh: include/UsageEnvironment_version.hh include/Boolean.hh include/strDup.hh 21 | HashTable.$(CPP): include/HashTable.hh 22 | include/HashTable.hh: include/Boolean.hh 23 | strDup.$(CPP): include/strDup.hh 24 | 25 | clean: 26 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~ 27 | 28 | install: install1 $(INSTALL2) 29 | install1: $(USAGE_ENVIRONMENT_LIB) 30 | install -d $(DESTDIR)$(PREFIX)/include/UsageEnvironment $(DESTDIR)$(LIBDIR) 31 | install -m 644 include/*.hh $(DESTDIR)$(PREFIX)/include/UsageEnvironment 32 | install -m 644 $(USAGE_ENVIRONMENT_LIB) $(DESTDIR)$(LIBDIR) 33 | install_shared_libraries: $(USAGE_ENVIRONMENT_LIB) 34 | ln -fs $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).$(SHORT_LIB_SUFFIX) 35 | ln -fs $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).so 36 | 37 | ##### Any additional, platform-specific rules come here: 38 | -------------------------------------------------------------------------------- /third_party/live555/UsageEnvironment/include/Boolean.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | #ifndef _BOOLEAN_HH 17 | #define _BOOLEAN_HH 18 | 19 | #if defined(__BORLANDC__) || (!defined(USE_LIVE555_BOOLEAN) && defined(_MSC_VER) && _MSC_VER >= 1400) 20 | // Use the "bool" type defined by the Borland compiler, and MSVC++ 8.0, Visual Studio 2005 and higher 21 | typedef bool Boolean; 22 | #define False false 23 | #define True true 24 | #else 25 | typedef unsigned char Boolean; 26 | #ifndef __MSHTML_LIBRARY_DEFINED__ 27 | #ifndef False 28 | const Boolean False = 0; 29 | #endif 30 | #ifndef True 31 | const Boolean True = 1; 32 | #endif 33 | 34 | #endif 35 | #endif 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /third_party/live555/UsageEnvironment/include/UsageEnvironment_version.hh: -------------------------------------------------------------------------------- 1 | // Version information for the "UsageEnvironment" library 2 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 3 | 4 | #ifndef _USAGEENVIRONMENT_VERSION_HH 5 | #define _USAGEENVIRONMENT_VERSION_HH 6 | 7 | #define USAGEENVIRONMENT_LIBRARY_VERSION_STRING "2018.09.05" 8 | #define USAGEENVIRONMENT_LIBRARY_VERSION_INT 1536105600 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /third_party/live555/UsageEnvironment/include/strDup.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | 17 | #ifndef _STRDUP_HH 18 | #define _STRDUP_HH 19 | 20 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 21 | // A C++ equivalent to the standard C routine "strdup()". 22 | // This generates a char* that can be deleted using "delete[]" 23 | // Header 24 | 25 | #include 26 | 27 | char* strDup(char const* str); 28 | // Note: strDup(NULL) returns NULL 29 | 30 | char* strDupSize(char const* str); 31 | // Like "strDup()", except that it *doesn't* copy the original. 32 | // (Instead, it just allocates a string of the same size as the original.) 33 | 34 | char* strDupSize(char const* str, size_t& resultBufSize); 35 | // An alternative form of "strDupSize()" that also returns the size of the allocated buffer. 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /third_party/live555/UsageEnvironment/strDup.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 17 | // A C++ equivalent to the standard C routine "strdup()". 18 | // This generates a char* that can be deleted using "delete[]" 19 | // Implementation 20 | 21 | #include "strDup.hh" 22 | 23 | char* strDup(char const* str) { 24 | if (str == NULL) return NULL; 25 | size_t len = strlen(str) + 1; 26 | char* copy = new char[len]; 27 | 28 | if (copy != NULL) { 29 | memcpy(copy, str, len); 30 | } 31 | return copy; 32 | } 33 | 34 | char* strDupSize(char const* str) { 35 | size_t dummy; 36 | 37 | return strDupSize(str, dummy); 38 | } 39 | 40 | char* strDupSize(char const* str, size_t& resultBufSize) { 41 | if (str == NULL) { 42 | resultBufSize = 0; 43 | return NULL; 44 | } 45 | 46 | resultBufSize = strlen(str) + 1; 47 | char* copy = new char[resultBufSize]; 48 | 49 | return copy; 50 | } 51 | -------------------------------------------------------------------------------- /third_party/live555/WindowsAudioInputDevice/showAudioInputPorts.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // Copyright (c) 1996-2018, Live Networks, Inc. All rights reserved 17 | // A program that prints out this computer's audio input ports 18 | 19 | #include "AudioInputDevice.hh" 20 | #include 21 | 22 | int main(int argc, char** argv) { 23 | AudioPortNames* portNames = AudioInputDevice::getPortNames(); 24 | if (portNames == NULL) { 25 | fprintf(stderr, "AudioInputDevice::getPortNames() failed!\n"); 26 | exit(1); 27 | } 28 | 29 | printf("%d available audio input ports:\n", portNames->numPorts); 30 | for (unsigned i = 0; i < portNames->numPorts; ++i) { 31 | printf("%d\t%s\n", i, portNames->portName[i]); 32 | } 33 | 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /third_party/live555/config.aix: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -DBSD=1 -O -DTIME_BASE=int -DSOCKLEN_T=socklen_t 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DAIX=1 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.alpha: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DTIME_BASE=int 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) -DALPHA 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 -DALPHA 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -B static 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.armeb-uclibc: -------------------------------------------------------------------------------- 1 | CROSS_COMPILE= armeb-linux-uclibc- 2 | COMPILE_OPTS = $(INCLUDES) -I. -Os -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 -D 3 | LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 4 | C = c 5 | C_COMPILER = $(CROSS_COMPILE)gcc 6 | C_FLAGS = $(COMPILE_OPTS) 7 | CPP = cpp 8 | CPLUSPLUS_COMPILER = $(CROSS_COMPILE)g++ 9 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 10 | OBJ = o 11 | LINK = $(CROSS_COMPILE)gcc -o 12 | LINK_OPTS = -L. 13 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 14 | LIBRARY_LINK = $(CROSS_COMPILE)ar cr 15 | LIBRARY_LINK_OPTS = 16 | LIB_SUFFIX = a 17 | LIBS_FOR_CONSOLE_APPLICATION = 18 | LIBS_FOR_GUI_APPLICATION = 19 | EXE = 20 | -------------------------------------------------------------------------------- /third_party/live555/config.armlinux: -------------------------------------------------------------------------------- 1 | CROSS_COMPILE?= aarch64-linux-gnu- 2 | COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 3 | C = c 4 | C_COMPILER = $(CROSS_COMPILE)gcc 5 | C_FLAGS = $(COMPILE_OPTS) 6 | CPP = cpp 7 | CPLUSPLUS_COMPILER = $(CROSS_COMPILE)g++ 8 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 9 | OBJ = o 10 | LINK = $(CROSS_COMPILE)g++ -o 11 | LINK_OPTS = 12 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 13 | LIBRARY_LINK = $(CROSS_COMPILE)ar cr 14 | LIBRARY_LINK_OPTS = $(LINK_OPTS) 15 | LIB_SUFFIX = a 16 | LIBS_FOR_CONSOLE_APPLICATION = 17 | LIBS_FOR_GUI_APPLICATION = 18 | EXE = 19 | -------------------------------------------------------------------------------- /third_party/live555/config.avr32-linux: -------------------------------------------------------------------------------- 1 | CROSS_COMPILE= avr32-linux-uclibc- 2 | COMPILE_OPTS = -Os $(INCLUDES) -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 C = c 3 | C_COMPILER = $(CROSS_COMPILE)gcc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = $(CROSS_COMPILE)c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -fuse-cxa-atexit -DBSD=1 OBJ = o 8 | LINK = $(CROSS_COMPILE)c++ -o 9 | LINK_OPTS = 10 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 11 | LIBRARY_LINK = $(CROSS_COMPILE)ar cr LIBRARY_LINK_OPTS = 12 | LIB_SUFFIX = a 13 | LIBS_FOR_CONSOLE_APPLICATION = 14 | LIBS_FOR_GUI_APPLICATION = 15 | EXE = 16 | -------------------------------------------------------------------------------- /third_party/live555/config.bfin-linux-uclibc: -------------------------------------------------------------------------------- 1 | CROSS_COMPILER = bfin-linux-uclibc- 2 | COMPILE_OPTS = $(INCLUDES) -I. -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -DUCLINUX -D_FILE_OFFSET_BITS=64 3 | C = c 4 | C_COMPILER = $(CROSS_COMPILER)gcc 5 | C_FLAGS = $(COMPILE_OPTS) -Wall 6 | CPP = cpp 7 | CPLUSPLUS_COMPILER = $(CROSS_COMPILER)g++ 8 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 9 | OBJ = o 10 | LINK = $(CROSS_COMPILER)g++ -o 11 | LINK_OPTS = -L. 12 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 13 | LIBRARY_LINK = $(CROSS_COMPILER)ar cr 14 | LIBRARY_LINK_OPTS = 15 | LIB_SUFFIX = a 16 | LIBS_FOR_CONSOLE_APPLICATION = 17 | LIBS_FOR_GUI_APPLICATION = 18 | EXE = 19 | -------------------------------------------------------------------------------- /third_party/live555/config.bfin-uclinux: -------------------------------------------------------------------------------- 1 | CROSS_COMPILER= bfin-uclinux- 2 | COMPILE_OPTS = $(INCLUDES) -I. -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -DUCLINUX -D_FILE_OFFSET_BITS=64 3 | C = c 4 | C_COMPILER = $(CROSS_COMPILER)gcc 5 | C_FLAGS = $(COMPILE_OPTS) -Wall 6 | CPP = cpp 7 | CPLUSPLUS_COMPILER = $(CROSS_COMPILER)g++ 8 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 9 | OBJ = o 10 | LINK = $(CROSS_COMPILER)g++ -Wl,-elf2flt -o 11 | LINK_OPTS = -L. 12 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 13 | LIBRARY_LINK = $(CROSS_COMPILER)ar cr 14 | LIBRARY_LINK_OPTS = 15 | LIB_SUFFIX = a 16 | LIBS_FOR_CONSOLE_APPLICATION = 17 | LIBS_FOR_GUI_APPLICATION = 18 | EXE = 19 | -------------------------------------------------------------------------------- /third_party/live555/config.bsplinux: -------------------------------------------------------------------------------- 1 | CROSS_COMPILE= 2 | COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 3 | C = c 4 | C_COMPILER = $(CROSS_COMPILE)ecc 5 | C_FLAGS = $(COMPILE_OPTS) 6 | CPP = cpp 7 | CPLUSPLUS_COMPILER = $(CROSS_COMPILE)e++ 8 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 9 | OBJ = o 10 | LINK = $(CROSS_COMPILE)e++ -o 11 | LINK_OPTS = -L. 12 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 13 | LIBRARY_LINK = $(CROSS_COMPILE)eld -o 14 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic 15 | LIB_SUFFIX = a 16 | LIBS_FOR_CONSOLE_APPLICATION = -lm 17 | LIBS_FOR_GUI_APPLICATION = 18 | EXE = 19 | -------------------------------------------------------------------------------- /third_party/live555/config.cris-axis-linux-gnu: -------------------------------------------------------------------------------- 1 | # Note: AXIS_TOP_DIR is assumed to already be set in your environment. 2 | # You can set this using the "init_env" script. 3 | # See http://developer.axis.com/doc/software/apps/apps-howto.html 4 | # for more information. 5 | AXIS_DIR = $(AXIS_TOP_DIR)/target/cris-axis-linux-gnu 6 | COMPILE_OPTS = $(INCLUDES) -I. -mlinux -isystem $(AXIS_DIR)/include -Wall -O2 -DSOCKLEN_T=socklen_t -DCRIS -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 7 | C = c 8 | C_COMPILER = gcc-cris 9 | C_FLAGS = $(COMPILE_OPTS) 10 | CPP = cpp 11 | CPLUSPLUS_COMPILER = c++-cris 12 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wno-ctor-dtor-privacy -ansi -pipe 13 | OBJ = o 14 | LINK = c++-cris -static -o 15 | AXIS_LINK_OPTS = -L$(AXIS_DIR)/lib 16 | LINK_OPTS = -L. 17 | CONSOLE_LINK_OPTS = $(LINK_OPTS) -L$(AXIS_DIR)/lib -mlinux 18 | LIBRARY_LINK = ld-cris -mcrislinux -o 19 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic 20 | LIB_SUFFIX = a 21 | LIBS_FOR_CONSOLE_APPLICATION = 22 | LIBS_FOR_GUI_APPLICATION = 23 | EXE = 24 | -------------------------------------------------------------------------------- /third_party/live555/config.cygwin: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=socklen_t -DNEWLOCALE_NOT_USED=1 2 | C = c 3 | C_COMPILER = gcc 4 | C_FLAGS = $(COMPILE_OPTS) -DUSE_OUR_BZERO=1 -D__CYGWIN__ 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.cygwin-for-vlc: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=socklen_t -DNEWLOCALE_NOT_USED=1 2 | C = c 3 | C_COMPILER = gcc 4 | C_FLAGS = $(COMPILE_OPTS) -DUSE_OUR_BZERO=1 -D_WIN32 -mno-cygwin 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 -D_WIN32 -Wno-deprecated -mno-cygwin 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.freebsd: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DBSD=1 -DNEWLOCALE_NOT_USED=1 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ar cr 13 | LIBRARY_LINK_OPTS = 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.iphone-simulator: -------------------------------------------------------------------------------- 1 | # **Note: You must install the relevant "Command line tools (OSX *.*) for Xcode - Xcode *.*" 2 | # for this configuration file to work. 3 | 4 | # Change the following version number, if necessary, before running "genMakefiles iphone-simulator" 5 | IOS_VERSION = 8.3 6 | MIN_IOS_VERSION = 7.0 7 | 8 | DEVELOPER_PATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer 9 | TOOL_PATH = $(DEVELOPER_PATH)/usr/bin 10 | SDK_PATH = $(DEVELOPER_PATH)/SDKs 11 | SDK = $(SDK_PATH)/iPhoneSimulator$(IOS_VERSION).sdk 12 | COMPILE_OPTS = $(INCLUDES) -I. $(EXTRA_LDFLAGS) -DBSD=1 -O2 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -miphoneos-version-min=$(MIN_IOS_VERSION) -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fPIC -arch i386 --sysroot=$(SDK) -isysroot $(SDK) 13 | C = c 14 | C_COMPILER = /usr/bin/xcrun clang 15 | C_FLAGS = $(COMPILE_OPTS) 16 | CPP = cpp 17 | CPLUSPLUS_COMPILER = /usr/bin/xcrun clang 18 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 19 | OBJ = o 20 | LINK = /usr/bin/xcrun clang -o 21 | LINK_OPTS = -L. -arch i386 -miphoneos-version-min=$(MIN_IOS_VERSION) --sysroot=$(SDK) -isysroot -L$(SDK)/usr/lib/system -I$(SDK)/usr/lib /usr/lib/libc++.dylib 22 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 23 | LIBRARY_LINK = /usr/bin/xcrun libtool -static -o 24 | LIBRARY_LINK_OPTS = 25 | LIB_SUFFIX = a 26 | LIBS_FOR_CONSOLE_APPLICATION = 27 | LIBS_FOR_GUI_APPLICATION = 28 | EXE = 29 | -------------------------------------------------------------------------------- /third_party/live555/config.iphoneos: -------------------------------------------------------------------------------- 1 | # **Note: You must install the relevant "Command line tools (OSX *.*) for Xcode - Xcode *.*" 2 | # for this configuration file to work. 3 | # 4 | # Change the following version number, if necessary, before running "genMakefiles iphoneos" 5 | IOS_VERSION = 8.3 6 | 7 | DEVELOPER_PATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer 8 | TOOL_PATH = $(DEVELOPER_PATH)/usr/bin 9 | SDK_PATH = $(DEVELOPER_PATH)/SDKs 10 | SDK = $(SDK_PATH)/iPhoneOS$(IOS_VERSION).sdk 11 | COMPILE_OPTS = $(INCLUDES) -I. $(EXTRA_LDFLAGS) -DBSD=1 -O2 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fPIC -arch armv7 --sysroot=$(SDK) 12 | C = c 13 | C_COMPILER = /usr/bin/xcrun clang 14 | C_FLAGS = $(COMPILE_OPTS) 15 | CPP = cpp 16 | CPLUSPLUS_COMPILER = /usr/bin/xcrun clang 17 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 18 | OBJ = o 19 | LINK = /usr/bin/xcrun clang -o 20 | LINK_OPTS = -v -L. -arch armv7 --sysroot=$(SDK) -L$(SDK)/usr/lib/system /usr/lib/libc++.dylib 21 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 22 | LIBRARY_LINK = /usr/bin/xcrun libtool -static -o 23 | LIBRARY_LINK_OPTS = 24 | LIB_SUFFIX = a 25 | LIBS_FOR_CONSOLE_APPLICATION = 26 | LIBS_FOR_GUI_APPLICATION = 27 | EXE = 28 | -------------------------------------------------------------------------------- /third_party/live555/config.irix: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) -DIRIX 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DIRIX 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -B static 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.linux: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) $(CPPFLAGS) $(CFLAGS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 $(CPPFLAGS) $(CXXFLAGS) 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. $(LDFLAGS) 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ar cr 13 | LIBRARY_LINK_OPTS = 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.linux-64bit: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -m64 -fPIC -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ar cr 13 | LIBRARY_LINK_OPTS = 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.linux-gdb: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=socklen_t -g -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ar cr 13 | LIBRARY_LINK_OPTS = 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.macosx: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. $(EXTRA_LDFLAGS) -DBSD=1 -O -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -DTIME_BASE=int -DNEED_XLOCALE_H=1 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = libtool -s -o 13 | LIBRARY_LINK_OPTS = 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.macosx-32bit: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = -m32 $(INCLUDES) -I. $(EXTRA_LDFLAGS) -DBSD=1 -O -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -DTIME_BASE=int 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. -m32 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = libtool -s -o 13 | LIBRARY_LINK_OPTS = 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.macosx-before-version-10.4: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -DBSD=1 -O -DSOCKLEN_T=int -DTIME_BASE=int 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.mingw: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=int -DLOCALE_NOT_USED 2 | C = c 3 | C_COMPILER = $(CC) 4 | C_FLAGS = $(COMPILE_OPTS) -DUSE_OUR_BZERO=1 -D__MINGW32__ 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = $(CXX) 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -D__MINGW32__ -Wall -Wno-deprecated 8 | OBJ = o 9 | LINK = $(CXX) -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = $(LD) -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = -lws2_32 16 | LIBS_FOR_GUI_APPLICATION = -lws2_32 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.openbsd: -------------------------------------------------------------------------------- 1 | .SUFFIXES: .cpp 2 | COMPILE_OPTS = $(INCLUDES) -I. -DBSD=1 -O -DSOCKLEN_T=socklen_t 3 | C = c 4 | C_COMPILER = cc 5 | C_FLAGS = $(COMPILE_OPTS) 6 | CPP = cpp 7 | CPLUSPLUS_COMPILER = c++ 8 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DAIX=1 9 | OBJ = o 10 | LINK = c++ -o 11 | LINK_OPTS = -L. 12 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 13 | LIBRARY_LINK = ld -o 14 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r 15 | LIB_SUFFIX = a 16 | LIBS_FOR_CONSOLE_APPLICATION = 17 | LIBS_FOR_GUI_APPLICATION = 18 | EXE = 19 | -------------------------------------------------------------------------------- /third_party/live555/config.qnx4: -------------------------------------------------------------------------------- 1 | # 2 | # Requires: 3 | # QNX 4.25 4 | # Watcom 10.6 5 | # TCP/IP 5.0 6 | # 7 | COMPILE_OPTS = $(INCLUDES) -I. -D_QNX4 -DBSD -DSOCKLEN_T=uint32_t -I/usr/watcom/10.6/usr/include 8 | C = c 9 | C_COMPILER = cc32 10 | C_FLAGS = $(COMPILE_OPTS) 11 | CPP = cpp 12 | CPLUSPLUS_COMPILER = cc32 13 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -WC,-xs 14 | OBJ = o 15 | LINK = cc32 -b -M -N30000 -o 16 | LINK_OPTS = -l. 17 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 18 | LIBRARY_LINK = wlib -n -b -c 19 | LIBRARY_LINK_OPTS = $(LINK_OPTS) 20 | LIB_SUFFIX = lib 21 | LIBS_FOR_CONSOLE_APPLICATION = -lsocket 22 | LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION) 23 | EXE = 24 | -------------------------------------------------------------------------------- /third_party/live555/config.solaris-32bit: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DSOLARIS -DNEWLOCALE_NOT_USED -DSOCKLEN_T=socklen_t 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -dn 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = -lsocket -lnsl 16 | LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION) 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.solaris-64bit: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -m64 -I. -O -DSOLARIS -DNEWLOCALE_NOT_USED -DSOCKLEN_T=socklen_t 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -m64 -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -64 -r -dn 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = -lsocket -lnsl 16 | LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION) 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.sunos: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -DBSD=1 -O 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cc 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /third_party/live555/config.uClinux: -------------------------------------------------------------------------------- 1 | CROSS_COMPILE= arc-linux-uclibc- 2 | COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 3 | C = c 4 | C_COMPILER = $(CROSS_COMPILE)gcc 5 | CFLAGS += $(COMPILE_OPTS) 6 | C_FLAGS = $(CFLAGS) 7 | CPP = cpp 8 | CPLUSPLUS_COMPILER = $(CROSS_COMPILE)g++ 9 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 10 | CPLUSPLUS_FLAGS += $(CPPFLAGS) -fexceptions 11 | OBJ = o 12 | LINK = $(CROSS_COMPILE)g++ -o 13 | LINK_OPTS = -L. $(LDFLAGS) 14 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 15 | LIBRARY_LINK = $(CROSS_COMPILE)ar cr 16 | LIBRARY_LINK_OPTS = 17 | LIB_SUFFIX = a 18 | LIBS_FOR_CONSOLE_APPLICATION = $(CXXLIBS) 19 | LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION) 20 | EXE = 21 | -------------------------------------------------------------------------------- /third_party/live555/configure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Whoa! This software distribution does NOT use the normal Unix \"configure\" mechanism for generating a Makefile. For instructions on how to build this software, see ." 4 | echo "Also, please make sure that you're using the most up-to-date version of the source code - available from ." 5 | -------------------------------------------------------------------------------- /third_party/live555/fix-makefile: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # the next line restarts using tclsh \ 3 | exec tclsh8.4 "$0" "$@" 4 | 5 | set makefileName [lindex $argv 0] 6 | set tmpfileName /tmp/rsftmp 7 | 8 | set inFid [open $makefileName r] 9 | set outFid [open $tmpfileName w] 10 | 11 | while {![eof $inFid]} { 12 | set line [gets $inFid] 13 | if {[string match *\)\$* $line]} { 14 | set pos [string first \)\$ $line] 15 | set prefix [string range $line 0 $pos] 16 | incr pos 17 | set suffix [string range $line $pos end] 18 | set line $prefix\ $suffix 19 | } 20 | 21 | puts $outFid $line 22 | } 23 | 24 | close $inFid 25 | close $outFid 26 | file rename -force $tmpfileName $makefileName 27 | -------------------------------------------------------------------------------- /third_party/live555/genMakefiles: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | usage() { 4 | echo "Usage: $0 " 5 | exit 1 6 | } 7 | 8 | if [ $# -ne 1 ] 9 | then 10 | usage $* 11 | fi 12 | 13 | platform=$1 14 | subdirs="liveMedia groupsock UsageEnvironment BasicUsageEnvironment testProgs mediaServer proxyServer" 15 | 16 | for subdir in $subdirs 17 | do 18 | /bin/rm -f $subdir/Makefile 19 | cat $subdir/Makefile.head config.$platform $subdir/Makefile.tail > $subdir/Makefile 20 | chmod a-w $subdir/Makefile 21 | done 22 | 23 | /bin/rm -f Makefile 24 | cat Makefile.head config.$1 Makefile.tail > Makefile 25 | chmod a-w Makefile 26 | -------------------------------------------------------------------------------- /third_party/live555/genWindowsMakefiles: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd liveMedia 4 | /bin/rm -f liveMedia.mak 5 | /bin/rm -f Makefile 6 | cat Makefile.head ../win32config Makefile.tail > liveMedia.mak 7 | 8 | cd ../groupsock 9 | /bin/rm -f groupsock.mak 10 | /bin/rm -f Makefile 11 | cat Makefile.head ../win32config Makefile.tail > groupsock.mak 12 | 13 | cd ../UsageEnvironment 14 | /bin/rm -f UsageEnvironment.mak 15 | /bin/rm -f Makefile 16 | cat Makefile.head ../win32config Makefile.tail > UsageEnvironment.mak 17 | 18 | cd ../BasicUsageEnvironment 19 | /bin/rm -f BasicUsageEnvironment.mak 20 | /bin/rm -f Makefile 21 | cat Makefile.head ../win32config Makefile.tail > BasicUsageEnvironment.mak 22 | 23 | cd ../testProgs 24 | /bin/rm -f testProgs.mak 25 | /bin/rm -f Makefile 26 | cat Makefile.head ../win32config Makefile.tail > testProgs.mak 27 | 28 | cd ../mediaServer 29 | /bin/rm -f mediaServer.mak 30 | /bin/rm -f Makefile 31 | cat Makefile.head ../win32config Makefile.tail > mediaServer.mak 32 | 33 | cd ../proxyServer 34 | /bin/rm -f proxyServer.mak 35 | /bin/rm -f Makefile 36 | cat Makefile.head ../win32config Makefile.tail > proxyServer.mak 37 | -------------------------------------------------------------------------------- /third_party/live555/genWindowsMakefiles.cmd: -------------------------------------------------------------------------------- 1 | @Echo OFF 2 | SETLOCAL 3 | for %%I in (%0) do %%~dI 4 | for %%I in (%0) do cd "%%~pI" 5 | cd liveMedia 6 | del /Q liveMedia.mak 7 | type Makefile.head ..\win32config Makefile.tail > liveMedia.mak 8 | cd ../groupsock 9 | del /Q groupsock.mak 10 | type Makefile.head ..\win32config Makefile.tail > groupsock.mak 11 | cd ../UsageEnvironment 12 | del /Q UsageEnvironment.mak 13 | type Makefile.head ..\win32config Makefile.tail > UsageEnvironment.mak 14 | cd ../BasicUsageEnvironment 15 | del /Q BasicUsageEnvironment.mak 16 | type Makefile.head ..\win32config Makefile.tail > BasicUsageEnvironment.mak 17 | cd ../testProgs 18 | del /Q testProgs.mak 19 | type Makefile.head ..\win32config Makefile.tail > testProgs.mak 20 | cd ../mediaServer 21 | del /Q mediaServer.mak 22 | type Makefile.head ..\win32config Makefile.tail > mediaServer.mak 23 | cd ../proxyServer 24 | del /Q proxyServer.mak 25 | type Makefile.head ..\win32config Makefile.tail > proxyServer.mak 26 | 27 | ENDLOCAL 28 | -------------------------------------------------------------------------------- /third_party/live555/groupsock/GroupEId.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // Copyright (c) 1996-2018, Live Networks, Inc. All rights reserved 17 | // "Group Endpoint Id" 18 | // Implementation 19 | 20 | #include "GroupEId.hh" 21 | 22 | 23 | GroupEId::GroupEId(struct in_addr const& groupAddr, 24 | portNumBits portNum, u_int8_t ttl) { 25 | struct in_addr sourceFilterAddr; 26 | sourceFilterAddr.s_addr = ~0; // indicates no source filter 27 | 28 | init(groupAddr, sourceFilterAddr, portNum, ttl); 29 | } 30 | 31 | GroupEId::GroupEId(struct in_addr const& groupAddr, 32 | struct in_addr const& sourceFilterAddr, 33 | portNumBits portNum) { 34 | init(groupAddr, sourceFilterAddr, portNum, 255); 35 | } 36 | 37 | Boolean GroupEId::isSSM() const { 38 | return fSourceFilterAddress.s_addr != netAddressBits(~0); 39 | } 40 | 41 | void GroupEId::init(struct in_addr const& groupAddr, 42 | struct in_addr const& sourceFilterAddr, 43 | portNumBits portNum, 44 | u_int8_t ttl) { 45 | fGroupAddress = groupAddr; 46 | fSourceFilterAddress = sourceFilterAddr; 47 | fPortNum = portNum; 48 | fTTL = ttl; 49 | } 50 | -------------------------------------------------------------------------------- /third_party/live555/groupsock/Makefile.head: -------------------------------------------------------------------------------- 1 | INCLUDES = -Iinclude -I../UsageEnvironment/include 2 | PREFIX = /usr/local 3 | LIBDIR = $(PREFIX)/lib 4 | ##### Change the following for your environment: 5 | -------------------------------------------------------------------------------- /third_party/live555/groupsock/include/IOHandlers.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "mTunnel" multicast access service 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // IO event handlers 19 | // C++ header 20 | 21 | #ifndef _IO_HANDLERS_HH 22 | #define _IO_HANDLERS_HH 23 | 24 | #ifndef _NET_INTERFACE_HH 25 | #include "NetInterface.hh" 26 | #endif 27 | 28 | // Handles incoming data on sockets: 29 | void socketReadHandler(Socket* sock, int mask); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /third_party/live555/groupsock/include/groupsock_version.hh: -------------------------------------------------------------------------------- 1 | // Version information for the "groupsock" library 2 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 3 | 4 | #ifndef _GROUPSOCK_VERSION_HH 5 | #define _GROUPSOCK_VERSION_HH 6 | 7 | #define GROUPSOCK_LIBRARY_VERSION_STRING "2018.09.05" 8 | #define GROUPSOCK_LIBRARY_VERSION_INT 1536105600 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/AMRAudioSource.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A source object for AMR audio sources 19 | // Implementation 20 | 21 | #include "AMRAudioSource.hh" 22 | 23 | AMRAudioSource::AMRAudioSource(UsageEnvironment& env, 24 | Boolean isWideband, unsigned numChannels) 25 | : FramedSource(env), 26 | fIsWideband(isWideband), fNumChannels(numChannels), fLastFrameHeader(0) { 27 | } 28 | 29 | AMRAudioSource::~AMRAudioSource() { 30 | } 31 | 32 | char const* AMRAudioSource::MIMEtype() const { 33 | return "audio/AMR"; 34 | } 35 | 36 | Boolean AMRAudioSource::isAMRAudioSource() const { 37 | return True; 38 | } 39 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/AudioInputDevice.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // Copyright (c) 2001-2003 Live Networks, Inc. All rights reserved. 17 | // Generic audio input device (such as a microphone, or an input sound card) 18 | // Implementation 19 | 20 | #include 21 | 22 | AudioInputDevice 23 | ::AudioInputDevice(UsageEnvironment& env, unsigned char bitsPerSample, 24 | unsigned char numChannels, 25 | unsigned samplingFrequency, unsigned granularityInMS) 26 | : FramedSource(env), fBitsPerSample(bitsPerSample), 27 | fNumChannels(numChannels), fSamplingFrequency(samplingFrequency), 28 | fGranularityInMS(granularityInMS) { 29 | } 30 | 31 | AudioInputDevice::~AudioInputDevice() { 32 | } 33 | 34 | char** AudioInputDevice::allowedDeviceNames = NULL; 35 | 36 | ////////// AudioPortNames implementation ////////// 37 | 38 | AudioPortNames::AudioPortNames() 39 | : numPorts(0), portName(NULL) { 40 | } 41 | 42 | AudioPortNames::~AudioPortNames() { 43 | for (unsigned i = 0; i < numPorts; ++i) delete portName[i]; 44 | delete portName; 45 | } 46 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/AudioRTPSink.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A generic RTP sink for audio codecs (abstract base class) 19 | // Implementation 20 | 21 | #include "AudioRTPSink.hh" 22 | 23 | AudioRTPSink::AudioRTPSink(UsageEnvironment& env, 24 | Groupsock* rtpgs, unsigned char rtpPayloadType, 25 | unsigned rtpTimestampFrequency, 26 | char const* rtpPayloadFormatName, 27 | unsigned numChannels) 28 | : MultiFramedRTPSink(env, rtpgs, rtpPayloadType, rtpTimestampFrequency, 29 | rtpPayloadFormatName, numChannels) { 30 | } 31 | 32 | AudioRTPSink::~AudioRTPSink() { 33 | } 34 | 35 | char const* AudioRTPSink::sdpMediaType() const { 36 | return "audio"; 37 | } 38 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/FileServerMediaSubsession.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s 19 | // on demand, from a file. 20 | // Implementation 21 | 22 | #include "FileServerMediaSubsession.hh" 23 | 24 | FileServerMediaSubsession 25 | ::FileServerMediaSubsession(UsageEnvironment& env, char const* fileName, 26 | Boolean reuseFirstSource) 27 | : OnDemandServerMediaSubsession(env, reuseFirstSource), 28 | fFileSize(0) { 29 | fFileName = strDup(fileName); 30 | } 31 | 32 | FileServerMediaSubsession::~FileServerMediaSubsession() { 33 | delete[] (char*)fFileName; 34 | } 35 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/FramedFileSource.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // Framed File Sources 19 | // Implementation 20 | 21 | #include "FramedFileSource.hh" 22 | 23 | ////////// FramedFileSource ////////// 24 | 25 | FramedFileSource::FramedFileSource(UsageEnvironment& env, FILE* fid) 26 | : FramedSource(env), fFid(fid) { 27 | } 28 | 29 | FramedFileSource::~FramedFileSource() { 30 | } 31 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/GSMAudioRTPSink.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // RTP sink for GSM audio 19 | // Implementation 20 | 21 | #include "GSMAudioRTPSink.hh" 22 | 23 | GSMAudioRTPSink::GSMAudioRTPSink(UsageEnvironment& env, Groupsock* RTPgs) 24 | : AudioRTPSink(env, RTPgs, 3, 8000, "GSM") { 25 | } 26 | 27 | GSMAudioRTPSink::~GSMAudioRTPSink() { 28 | } 29 | 30 | GSMAudioRTPSink* 31 | GSMAudioRTPSink::createNew(UsageEnvironment& env, Groupsock* RTPgs) { 32 | return new GSMAudioRTPSink(env, RTPgs); 33 | } 34 | 35 | Boolean GSMAudioRTPSink 36 | ::frameCanAppearAfterPacketStart(unsigned char const* /*frameStart*/, 37 | unsigned /*numBytesInFrame*/) const { 38 | // Allow at most 5 frames in a single packet: 39 | return numFramesUsedSoFar() < 5; 40 | } 41 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/H264VideoStreamDiscreteFramer.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A simplified version of "H264VideoStreamFramer" that takes only complete, 19 | // discrete frames (rather than an arbitrary byte stream) as input. 20 | // This avoids the parsing and data copying overhead of the full 21 | // "H264VideoStreamFramer". 22 | // Implementation 23 | 24 | #include "H264VideoStreamDiscreteFramer.hh" 25 | 26 | H264VideoStreamDiscreteFramer* 27 | H264VideoStreamDiscreteFramer::createNew(UsageEnvironment& env, FramedSource* inputSource) { 28 | return new H264VideoStreamDiscreteFramer(env, inputSource); 29 | } 30 | 31 | H264VideoStreamDiscreteFramer 32 | ::H264VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource) 33 | : H264or5VideoStreamDiscreteFramer(264, env, inputSource) { 34 | } 35 | 36 | H264VideoStreamDiscreteFramer::~H264VideoStreamDiscreteFramer() { 37 | } 38 | 39 | Boolean H264VideoStreamDiscreteFramer::isH264VideoStreamFramer() const { 40 | return True; 41 | } 42 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/H264VideoStreamFramer.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A filter that breaks up a H.264 Video Elementary Stream into NAL units. 19 | // Implementation 20 | 21 | #include "H264VideoStreamFramer.hh" 22 | 23 | H264VideoStreamFramer* H264VideoStreamFramer 24 | ::createNew(UsageEnvironment& env, FramedSource* inputSource, Boolean includeStartCodeInOutput) { 25 | return new H264VideoStreamFramer(env, inputSource, True, includeStartCodeInOutput); 26 | } 27 | 28 | H264VideoStreamFramer 29 | ::H264VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, Boolean createParser, Boolean includeStartCodeInOutput) 30 | : H264or5VideoStreamFramer(264, env, inputSource, createParser, includeStartCodeInOutput) { 31 | } 32 | 33 | H264VideoStreamFramer::~H264VideoStreamFramer() { 34 | } 35 | 36 | Boolean H264VideoStreamFramer::isH264VideoStreamFramer() const { 37 | return True; 38 | } 39 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/H265VideoStreamDiscreteFramer.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A simplified version of "H265VideoStreamFramer" that takes only complete, 19 | // discrete frames (rather than an arbitrary byte stream) as input. 20 | // This avoids the parsing and data copying overhead of the full 21 | // "H265VideoStreamFramer". 22 | // Implementation 23 | 24 | #include "H265VideoStreamDiscreteFramer.hh" 25 | 26 | H265VideoStreamDiscreteFramer* 27 | H265VideoStreamDiscreteFramer::createNew(UsageEnvironment& env, FramedSource* inputSource) { 28 | return new H265VideoStreamDiscreteFramer(env, inputSource); 29 | } 30 | 31 | H265VideoStreamDiscreteFramer 32 | ::H265VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource) 33 | : H264or5VideoStreamDiscreteFramer(265, env, inputSource) { 34 | } 35 | 36 | H265VideoStreamDiscreteFramer::~H265VideoStreamDiscreteFramer() { 37 | } 38 | 39 | Boolean H265VideoStreamDiscreteFramer::isH265VideoStreamFramer() const { 40 | return True; 41 | } 42 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/H265VideoStreamFramer.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A filter that breaks up a H.265 Video Elementary Stream into NAL units. 19 | // Implementation 20 | 21 | #include "H265VideoStreamFramer.hh" 22 | 23 | H265VideoStreamFramer* H265VideoStreamFramer 24 | ::createNew(UsageEnvironment& env, FramedSource* inputSource, Boolean includeStartCodeInOutput) { 25 | return new H265VideoStreamFramer(env, inputSource, True, includeStartCodeInOutput); 26 | } 27 | 28 | H265VideoStreamFramer 29 | ::H265VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, Boolean createParser, Boolean includeStartCodeInOutput) 30 | : H264or5VideoStreamFramer(265, env, inputSource, createParser, includeStartCodeInOutput) { 31 | } 32 | 33 | H265VideoStreamFramer::~H265VideoStreamFramer() { 34 | } 35 | 36 | Boolean H265VideoStreamFramer::isH265VideoStreamFramer() const { 37 | return True; 38 | } 39 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/JPEGVideoSource.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // JPEG video sources 19 | // Implementation 20 | 21 | #include "JPEGVideoSource.hh" 22 | 23 | JPEGVideoSource::JPEGVideoSource(UsageEnvironment& env) 24 | : FramedSource(env) { 25 | } 26 | 27 | JPEGVideoSource::~JPEGVideoSource() { 28 | } 29 | 30 | u_int8_t const* JPEGVideoSource::quantizationTables(u_int8_t& precision, 31 | u_int16_t& length) { 32 | // Default implementation 33 | precision = 0; 34 | length = 0; 35 | return NULL; 36 | } 37 | 38 | u_int16_t JPEGVideoSource::restartInterval() { 39 | // Default implementation 40 | return 0; 41 | } 42 | 43 | Boolean JPEGVideoSource::isJPEGVideoSource() const { 44 | return True; 45 | } 46 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/MPEGVideoStreamParser.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // An abstract parser for MPEG video streams 19 | // Implementation 20 | 21 | #include "MPEGVideoStreamParser.hh" 22 | 23 | MPEGVideoStreamParser 24 | ::MPEGVideoStreamParser(MPEGVideoStreamFramer* usingSource, 25 | FramedSource* inputSource) 26 | : StreamParser(inputSource, FramedSource::handleClosure, usingSource, 27 | &MPEGVideoStreamFramer::continueReadProcessing, usingSource), 28 | fUsingSource(usingSource) { 29 | } 30 | 31 | MPEGVideoStreamParser::~MPEGVideoStreamParser() { 32 | } 33 | 34 | void MPEGVideoStreamParser::restoreSavedParserState() { 35 | StreamParser::restoreSavedParserState(); 36 | fTo = fSavedTo; 37 | fNumTruncatedBytes = fSavedNumTruncatedBytes; 38 | } 39 | 40 | void MPEGVideoStreamParser::registerReadInterest(unsigned char* to, 41 | unsigned maxSize) { 42 | fStartOfFrame = fTo = fSavedTo = to; 43 | fLimit = to + maxSize; 44 | fNumTruncatedBytes = fSavedNumTruncatedBytes = 0; 45 | } 46 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/Makefile.head: -------------------------------------------------------------------------------- 1 | INCLUDES = -Iinclude -I../UsageEnvironment/include -I../groupsock/include 2 | PREFIX = /usr/local 3 | LIBDIR = $(PREFIX)/lib 4 | ##### Change the following for your environment: 5 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/OggDemuxedTrack.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A media track, demultiplexed from an Ogg file 19 | // Implementation 20 | 21 | #include "OggDemuxedTrack.hh" 22 | #include "OggFile.hh" 23 | 24 | OggDemuxedTrack::OggDemuxedTrack(UsageEnvironment& env, unsigned trackNumber, OggDemux& sourceDemux) 25 | : FramedSource(env), 26 | fOurTrackNumber(trackNumber), fOurSourceDemux(sourceDemux), 27 | fCurrentPageIsContinuation(False) { 28 | fNextPresentationTime.tv_sec = 0; fNextPresentationTime.tv_usec = 0; 29 | } 30 | 31 | OggDemuxedTrack::~OggDemuxedTrack() { 32 | fOurSourceDemux.removeTrack(fOurTrackNumber); 33 | } 34 | 35 | void OggDemuxedTrack::doGetNextFrame() { 36 | fOurSourceDemux.continueReading(); 37 | } 38 | 39 | char const* OggDemuxedTrack::MIMEtype() const { 40 | OggTrack* track = fOurSourceDemux.fOurFile.lookup(fOurTrackNumber); 41 | if (track == NULL) return "(unknown)"; // shouldn't happen 42 | return track->mimeType; 43 | } 44 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/RawVideoRTPSink.cpp.orig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sophgo/sophon-pipeline/caddfaca90e1d3a55baea4e5e511e787058e6d6a/third_party/live555/liveMedia/RawVideoRTPSink.cpp.orig -------------------------------------------------------------------------------- /third_party/live555/liveMedia/TextRTPSink.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A generic RTP sink for text codecs (abstract base class) 19 | // Implementation 20 | 21 | #include "TextRTPSink.hh" 22 | 23 | TextRTPSink::TextRTPSink(UsageEnvironment& env, 24 | Groupsock* rtpgs, unsigned char rtpPayloadType, 25 | unsigned rtpTimestampFrequency, 26 | char const* rtpPayloadFormatName) 27 | : MultiFramedRTPSink(env, rtpgs, rtpPayloadType, rtpTimestampFrequency, 28 | rtpPayloadFormatName) { 29 | } 30 | 31 | TextRTPSink::~TextRTPSink() { 32 | } 33 | 34 | char const* TextRTPSink::sdpMediaType() const { 35 | return "text"; 36 | } 37 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/VideoRTPSink.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A generic RTP sink for video codecs (abstract base class) 19 | // Implementation 20 | 21 | #include "VideoRTPSink.hh" 22 | 23 | VideoRTPSink::VideoRTPSink(UsageEnvironment& env, 24 | Groupsock* rtpgs, unsigned char rtpPayloadType, 25 | unsigned rtpTimestampFrequency, 26 | char const* rtpPayloadFormatName) 27 | : MultiFramedRTPSink(env, rtpgs, rtpPayloadType, rtpTimestampFrequency, 28 | rtpPayloadFormatName) { 29 | } 30 | 31 | VideoRTPSink::~VideoRTPSink() { 32 | } 33 | 34 | char const* VideoRTPSink::sdpMediaType() const { 35 | return "video"; 36 | } 37 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/AMRAudioFileSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A source object for AMR audio files (as defined in RFC 4867, section 5) 19 | // C++ header 20 | 21 | #ifndef _AMR_AUDIO_FILE_SOURCE_HH 22 | #define _AMR_AUDIO_FILE_SOURCE_HH 23 | 24 | #ifndef _AMR_AUDIO_SOURCE_HH 25 | #include "AMRAudioSource.hh" 26 | #endif 27 | 28 | class AMRAudioFileSource: public AMRAudioSource { 29 | public: 30 | static AMRAudioFileSource* createNew(UsageEnvironment& env, 31 | char const* fileName); 32 | 33 | private: 34 | AMRAudioFileSource(UsageEnvironment& env, FILE* fid, 35 | Boolean isWideband, unsigned numChannels); 36 | // called only by createNew() 37 | 38 | virtual ~AMRAudioFileSource(); 39 | 40 | private: 41 | // redefined virtual functions: 42 | virtual void doGetNextFrame(); 43 | 44 | private: 45 | FILE* fFid; 46 | }; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/AMRAudioSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A source object for AMR audio sources 19 | // C++ header 20 | 21 | #ifndef _AMR_AUDIO_SOURCE_HH 22 | #define _AMR_AUDIO_SOURCE_HH 23 | 24 | #ifndef _FRAMED_SOURCE_HH 25 | #include "FramedSource.hh" 26 | #endif 27 | 28 | class AMRAudioSource: public FramedSource { 29 | public: 30 | Boolean isWideband() const { return fIsWideband; } 31 | unsigned numChannels() const { return fNumChannels; } 32 | 33 | u_int8_t lastFrameHeader() const { return fLastFrameHeader; } 34 | // The frame header for the most recently read frame (RFC 4867, sec. 5.3) 35 | 36 | protected: 37 | AMRAudioSource(UsageEnvironment& env, Boolean isWideband, unsigned numChannels); 38 | // virtual base class 39 | virtual ~AMRAudioSource(); 40 | 41 | private: 42 | // redefined virtual functions: 43 | virtual char const* MIMEtype() const; 44 | virtual Boolean isAMRAudioSource() const; 45 | 46 | protected: 47 | Boolean fIsWideband; 48 | unsigned fNumChannels; 49 | u_int8_t fLastFrameHeader; 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/AudioRTPSink.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A generic RTP sink for audio codecs (abstract base class) 19 | // C++ header 20 | 21 | #ifndef _AUDIO_RTP_SINK_HH 22 | #define _AUDIO_RTP_SINK_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SINK_HH 25 | #include "MultiFramedRTPSink.hh" 26 | #endif 27 | 28 | class AudioRTPSink: public MultiFramedRTPSink { 29 | protected: 30 | AudioRTPSink(UsageEnvironment& env, 31 | Groupsock* rtpgs, unsigned char rtpPayloadType, 32 | unsigned rtpTimestampFrequency, 33 | char const* rtpPayloadFormatName, 34 | unsigned numChannels = 1); 35 | // (we're an abstract base class) 36 | virtual ~AudioRTPSink(); 37 | 38 | private: // redefined virtual functions: 39 | virtual char const* sdpMediaType() const; 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/Base64.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // Base64 encoding and decoding 19 | // C++ header 20 | 21 | #ifndef _BASE64_HH 22 | #define _BASE64_HH 23 | 24 | #ifndef _BOOLEAN_HH 25 | #include "Boolean.hh" 26 | #endif 27 | 28 | unsigned char* base64Decode(char const* in, unsigned& resultSize, 29 | Boolean trimTrailingZeros = True); 30 | // returns a newly allocated array - of size "resultSize" - that 31 | // the caller is responsible for delete[]ing. 32 | 33 | unsigned char* base64Decode(char const* in, unsigned inSize, 34 | unsigned& resultSize, 35 | Boolean trimTrailingZeros = True); 36 | // As above, but includes the size of the input string (i.e., the number of bytes to decode) as a parameter. 37 | // This saves an extra call to "strlen()" if we already know the length of the input string. 38 | 39 | char* base64Encode(char const* orig, unsigned origLength); 40 | // returns a 0-terminated string that 41 | // the caller is responsible for delete[]ing. 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/DVVideoRTPSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // DV Video RTP Sources 19 | // C++ header 20 | 21 | #ifndef _DV_VIDEO_RTP_SOURCE_HH 22 | #define _DV_VIDEO_RTP_SOURCE_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH 25 | #include "MultiFramedRTPSource.hh" 26 | #endif 27 | 28 | class DVVideoRTPSource: public MultiFramedRTPSource { 29 | public: 30 | static DVVideoRTPSource* 31 | createNew(UsageEnvironment& env, Groupsock* RTPgs, 32 | unsigned char rtpPayloadFormat, 33 | unsigned rtpTimestampFrequency); 34 | 35 | protected: 36 | virtual ~DVVideoRTPSource(); 37 | 38 | private: 39 | DVVideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, 40 | unsigned char rtpPayloadFormat, 41 | unsigned rtpTimestampFrequency); 42 | // called only by createNew() 43 | 44 | private: 45 | // redefined virtual functions: 46 | virtual Boolean processSpecialHeader(BufferedPacket* packet, 47 | unsigned& resultSpecialHeaderSize); 48 | virtual char const* MIMEtype() const; 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/FileServerMediaSubsession.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s 19 | // on demand, from a file. 20 | // C++ header 21 | 22 | #ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH 23 | #define _FILE_SERVER_MEDIA_SUBSESSION_HH 24 | 25 | #ifndef _SERVER_MEDIA_SESSION_HH 26 | #include "ServerMediaSession.hh" 27 | #endif 28 | #ifndef _ON_DEMAND_SERVER_MEDIA_SUBSESSION_HH 29 | #include "OnDemandServerMediaSubsession.hh" 30 | #endif 31 | 32 | class FileServerMediaSubsession: public OnDemandServerMediaSubsession { 33 | protected: // we're a virtual base class 34 | FileServerMediaSubsession(UsageEnvironment& env, char const* fileName, 35 | Boolean reuseFirstSource); 36 | virtual ~FileServerMediaSubsession(); 37 | 38 | protected: 39 | char const* fFileName; 40 | u_int64_t fFileSize; // if known 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/FramedFileSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // Framed File Sources 19 | // C++ header 20 | 21 | #ifndef _FRAMED_FILE_SOURCE_HH 22 | #define _FRAMED_FILE_SOURCE_HH 23 | 24 | #ifndef _FRAMED_SOURCE_HH 25 | #include "FramedSource.hh" 26 | #endif 27 | 28 | class FramedFileSource: public FramedSource { 29 | protected: 30 | FramedFileSource(UsageEnvironment& env, FILE* fid); // abstract base class 31 | virtual ~FramedFileSource(); 32 | 33 | protected: 34 | FILE* fFid; 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/FramedFilter.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // Framed Filters 19 | // C++ header 20 | 21 | #ifndef _FRAMED_FILTER_HH 22 | #define _FRAMED_FILTER_HH 23 | 24 | #ifndef _FRAMED_SOURCE_HH 25 | #include "FramedSource.hh" 26 | #endif 27 | 28 | class FramedFilter: public FramedSource { 29 | public: 30 | FramedSource* inputSource() const { return fInputSource; } 31 | 32 | void reassignInputSource(FramedSource* newInputSource) { fInputSource = newInputSource; } 33 | 34 | // Call before destruction if you want to prevent the destructor from closing the input source 35 | void detachInputSource(); 36 | 37 | protected: 38 | FramedFilter(UsageEnvironment& env, FramedSource* inputSource); 39 | // abstract base class 40 | virtual ~FramedFilter(); 41 | 42 | protected: 43 | // Redefined virtual functions (with default 'null' implementations): 44 | virtual char const* MIMEtype() const; 45 | virtual void getAttributes() const; 46 | virtual void doStopGettingFrames(); 47 | 48 | protected: 49 | FramedSource* fInputSource; 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/GSMAudioRTPSink.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // RTP sink for GSM audio 19 | // C++ header 20 | 21 | #ifndef _GSM_AUDIO_RTP_SINK_HH 22 | #define _GSM_AUDIO_RTP_SINK_HH 23 | 24 | #ifndef _AUDIO_RTP_SINK_HH 25 | #include "AudioRTPSink.hh" 26 | #endif 27 | 28 | class GSMAudioRTPSink: public AudioRTPSink { 29 | public: 30 | static GSMAudioRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs); 31 | 32 | protected: 33 | GSMAudioRTPSink(UsageEnvironment& env, Groupsock* RTPgs); 34 | // called only by createNew() 35 | 36 | virtual ~GSMAudioRTPSink(); 37 | 38 | private: // redefined virtual functions: 39 | virtual 40 | Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, 41 | unsigned numBytesInFrame) const; 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/H264VideoStreamFramer.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A filter that breaks up a H.264 Video Elementary Stream into NAL units. 19 | // C++ header 20 | 21 | #ifndef _H264_VIDEO_STREAM_FRAMER_HH 22 | #define _H264_VIDEO_STREAM_FRAMER_HH 23 | 24 | #ifndef _H264_OR_5_VIDEO_STREAM_FRAMER_HH 25 | #include "H264or5VideoStreamFramer.hh" 26 | #endif 27 | 28 | class H264VideoStreamFramer: public H264or5VideoStreamFramer { 29 | public: 30 | static H264VideoStreamFramer* createNew(UsageEnvironment& env, FramedSource* inputSource, 31 | Boolean includeStartCodeInOutput = False); 32 | 33 | protected: 34 | H264VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, 35 | Boolean createParser, Boolean includeStartCodeInOutput); 36 | // called only by "createNew()" 37 | virtual ~H264VideoStreamFramer(); 38 | 39 | // redefined virtual functions: 40 | virtual Boolean isH264VideoStreamFramer() const; 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/H264or5VideoFileSink.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // H.264 or H.265 Video File Sinks 19 | // C++ header 20 | 21 | #ifndef _H264_OR_5_VIDEO_FILE_SINK_HH 22 | #define _H264_OR_5_VIDEO_FILE_SINK_HH 23 | 24 | #ifndef _FILE_SINK_HH 25 | #include "FileSink.hh" 26 | #endif 27 | 28 | class H264or5VideoFileSink: public FileSink { 29 | protected: 30 | H264or5VideoFileSink(UsageEnvironment& env, FILE* fid, 31 | unsigned bufferSize, char const* perFrameFileNamePrefix, 32 | char const* sPropParameterSetsStr1, 33 | char const* sPropParameterSetsStr2 = NULL, 34 | char const* sPropParameterSetsStr3 = NULL); 35 | // we're an abstract base class 36 | virtual ~H264or5VideoFileSink(); 37 | 38 | protected: // redefined virtual functions: 39 | virtual void afterGettingFrame(unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime); 40 | 41 | private: 42 | char const* fSPropParameterSetsStr[3]; 43 | Boolean fHaveWrittenFirstFrame; 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/H265VideoStreamFramer.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A filter that breaks up a H.265 Video Elementary Stream into NAL units. 19 | // C++ header 20 | 21 | #ifndef _H265_VIDEO_STREAM_FRAMER_HH 22 | #define _H265_VIDEO_STREAM_FRAMER_HH 23 | 24 | #ifndef _H264_OR_5_VIDEO_STREAM_FRAMER_HH 25 | #include "H264or5VideoStreamFramer.hh" 26 | #endif 27 | 28 | class H265VideoStreamFramer: public H264or5VideoStreamFramer { 29 | public: 30 | static H265VideoStreamFramer* createNew(UsageEnvironment& env, FramedSource* inputSource, 31 | Boolean includeStartCodeInOutput = False); 32 | 33 | protected: 34 | H265VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, Boolean createParser, Boolean includeStartCodeInOutput); 35 | // called only by "createNew()" 36 | virtual ~H265VideoStreamFramer(); 37 | 38 | // redefined virtual functions: 39 | virtual Boolean isH265VideoStreamFramer() const; 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/MP3ADURTPSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // RTP source for 'ADUized' MP3 frames ("mpa-robust") 19 | // C++ header 20 | 21 | #ifndef _MP3_ADU_SOURCE_HH 22 | #define _MP3_ADU_SOURCE_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH 25 | #include "MultiFramedRTPSource.hh" 26 | #endif 27 | 28 | class MP3ADURTPSource: public MultiFramedRTPSource { 29 | public: 30 | static MP3ADURTPSource* 31 | createNew(UsageEnvironment& env, Groupsock* RTPgs, 32 | unsigned char rtpPayloadFormat, 33 | unsigned rtpTimestampFrequency = 90000); 34 | 35 | protected: 36 | virtual ~MP3ADURTPSource(); 37 | 38 | private: 39 | MP3ADURTPSource(UsageEnvironment& env, Groupsock* RTPgs, 40 | unsigned char rtpPayloadFormat, 41 | unsigned rtpTimestampFrequency); 42 | // called only by createNew() 43 | 44 | private: 45 | // redefined virtual functions: 46 | virtual char const* MIMEtype() const; 47 | }; 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/MP3Transcoder.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // MP3 Transcoder 19 | // C++ header 20 | 21 | #ifndef _MP3_TRANSCODER_HH 22 | #define _MP3_TRANSCODER_HH 23 | 24 | #ifndef _MP3_ADU_HH 25 | #include "MP3ADU.hh" 26 | #endif 27 | #ifndef _MP3_ADU_TRANSCODER_HH 28 | #include "MP3ADUTranscoder.hh" 29 | #endif 30 | 31 | class MP3Transcoder: public MP3FromADUSource { 32 | public: 33 | static MP3Transcoder* createNew(UsageEnvironment& env, 34 | unsigned outBitrate /* in kbps */, 35 | FramedSource* inputSource); 36 | 37 | protected: 38 | MP3Transcoder(UsageEnvironment& env, 39 | MP3ADUTranscoder* aduTranscoder); 40 | // called only by createNew() 41 | virtual ~MP3Transcoder(); 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/OutputFile.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // Common routines for opening/closing named output files 19 | // C++ header 20 | 21 | #ifndef _OUTPUT_FILE_HH 22 | #define _OUTPUT_FILE_HH 23 | 24 | #include 25 | #include 26 | 27 | FILE* OpenOutputFile(UsageEnvironment& env, char const* fileName); 28 | 29 | void CloseOutputFile(FILE* fid); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/QCELPAudioRTPSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // Qualcomm "PureVoice" (aka. "QCELP") Audio RTP Sources 19 | // C++ header 20 | 21 | #ifndef _QCELP_AUDIO_RTP_SOURCE_HH 22 | #define _QCELP_AUDIO_RTP_SOURCE_HH 23 | 24 | #ifndef _RTP_SOURCE_HH 25 | #include "RTPSource.hh" 26 | #endif 27 | 28 | class QCELPAudioRTPSource { 29 | public: 30 | static FramedSource* createNew(UsageEnvironment& env, 31 | Groupsock* RTPgs, 32 | RTPSource*& resultRTPSource, 33 | unsigned char rtpPayloadFormat = 12, 34 | unsigned rtpTimestampFrequency = 8000); 35 | // This returns a source to read from, but "resultRTPSource" will 36 | // point to RTP-related state. 37 | }; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/RawVideoRTPSink.hh.orig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sophgo/sophon-pipeline/caddfaca90e1d3a55baea4e5e511e787058e6d6a/third_party/live555/liveMedia/include/RawVideoRTPSink.hh.orig -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/TextRTPSink.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A generic RTP sink for text codecs (abstract base class) 19 | // C++ header 20 | 21 | #ifndef _TEXT_RTP_SINK_HH 22 | #define _TEXT_RTP_SINK_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SINK_HH 25 | #include "MultiFramedRTPSink.hh" 26 | #endif 27 | 28 | class TextRTPSink: public MultiFramedRTPSink { 29 | protected: 30 | TextRTPSink(UsageEnvironment& env, 31 | Groupsock* rtpgs, unsigned char rtpPayloadType, 32 | unsigned rtpTimestampFrequency, 33 | char const* rtpPayloadFormatName); 34 | // (we're an abstract base class) 35 | virtual ~TextRTPSink(); 36 | 37 | private: // redefined virtual functions: 38 | virtual char const* sdpMediaType() const; 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/VP8VideoRTPSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // VP8 Video RTP Sources 19 | // C++ header 20 | 21 | #ifndef _VP8_VIDEO_RTP_SOURCE_HH 22 | #define _VP8_VIDEO_RTP_SOURCE_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH 25 | #include "MultiFramedRTPSource.hh" 26 | #endif 27 | 28 | class VP8VideoRTPSource: public MultiFramedRTPSource { 29 | public: 30 | static VP8VideoRTPSource* 31 | createNew(UsageEnvironment& env, Groupsock* RTPgs, 32 | unsigned char rtpPayloadFormat, 33 | unsigned rtpTimestampFrequency = 90000); 34 | 35 | protected: 36 | VP8VideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, 37 | unsigned char rtpPayloadFormat, 38 | unsigned rtpTimestampFrequency); 39 | // called only by createNew() 40 | 41 | virtual ~VP8VideoRTPSource(); 42 | 43 | protected: 44 | // redefined virtual functions: 45 | virtual Boolean processSpecialHeader(BufferedPacket* packet, 46 | unsigned& resultSpecialHeaderSize); 47 | virtual char const* MIMEtype() const; 48 | }; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/VP9VideoRTPSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // VP9 Video RTP Sources 19 | // C++ header 20 | 21 | #ifndef _VP9_VIDEO_RTP_SOURCE_HH 22 | #define _VP9_VIDEO_RTP_SOURCE_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH 25 | #include "MultiFramedRTPSource.hh" 26 | #endif 27 | 28 | class VP9VideoRTPSource: public MultiFramedRTPSource { 29 | public: 30 | static VP9VideoRTPSource* 31 | createNew(UsageEnvironment& env, Groupsock* RTPgs, 32 | unsigned char rtpPayloadFormat, 33 | unsigned rtpTimestampFrequency = 90000); 34 | 35 | protected: 36 | VP9VideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, 37 | unsigned char rtpPayloadFormat, 38 | unsigned rtpTimestampFrequency); 39 | // called only by createNew() 40 | 41 | virtual ~VP9VideoRTPSource(); 42 | 43 | protected: 44 | // redefined virtual functions: 45 | virtual Boolean processSpecialHeader(BufferedPacket* packet, 46 | unsigned& resultSpecialHeaderSize); 47 | virtual char const* MIMEtype() const; 48 | }; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/VideoRTPSink.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 3 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // "liveMedia" 17 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 18 | // A generic RTP sink for video codecs (abstract base class) 19 | // C++ header 20 | 21 | #ifndef _VIDEO_RTP_SINK_HH 22 | #define _VIDEO_RTP_SINK_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SINK_HH 25 | #include "MultiFramedRTPSink.hh" 26 | #endif 27 | 28 | class VideoRTPSink: public MultiFramedRTPSink { 29 | protected: 30 | VideoRTPSink(UsageEnvironment& env, 31 | Groupsock* rtpgs, unsigned char rtpPayloadType, 32 | unsigned rtpTimestampFrequency, 33 | char const* rtpPayloadFormatName); 34 | // (we're an abstract base class) 35 | virtual ~VideoRTPSink(); 36 | 37 | private: // redefined virtual functions: 38 | virtual char const* sdpMediaType() const; 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/include/liveMedia_version.hh: -------------------------------------------------------------------------------- 1 | // Version information for the "liveMedia" library 2 | // Copyright (c) 1996-2018 Live Networks, Inc. All rights reserved. 3 | 4 | #ifndef _LIVEMEDIA_VERSION_HH 5 | #define _LIVEMEDIA_VERSION_HH 6 | 7 | #define LIVEMEDIA_LIBRARY_VERSION_STRING "2018.09.05" 8 | #define LIVEMEDIA_LIBRARY_VERSION_INT 1536105600 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /third_party/live555/liveMedia/stGDDpcY: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sophgo/sophon-pipeline/caddfaca90e1d3a55baea4e5e511e787058e6d6a/third_party/live555/liveMedia/stGDDpcY -------------------------------------------------------------------------------- /third_party/live555/mediaServer/Makefile.head: -------------------------------------------------------------------------------- 1 | INCLUDES = -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include 2 | # Default library filename suffixes for each library that we link with. The "config.*" file might redefine these later. 3 | libliveMedia_LIB_SUFFIX = $(LIB_SUFFIX) 4 | libBasicUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX) 5 | libUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX) 6 | libgroupsock_LIB_SUFFIX = $(LIB_SUFFIX) 7 | ##### Change the following for your environment: 8 | -------------------------------------------------------------------------------- /third_party/live555/mediaServer/Makefile.tail: -------------------------------------------------------------------------------- 1 | ##### End of variables to change 2 | 3 | MEDIA_SERVER = live555MediaServer$(EXE) 4 | 5 | PREFIX = /usr/local 6 | ALL = $(MEDIA_SERVER) 7 | all: $(ALL) 8 | 9 | .$(C).$(OBJ): 10 | $(C_COMPILER) -c $(C_FLAGS) $< 11 | .$(CPP).$(OBJ): 12 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $< 13 | 14 | MEDIA_SERVER_OBJS = live555MediaServer.$(OBJ) DynamicRTSPServer.$(OBJ) 15 | 16 | live555MediaServer.$(CPP): DynamicRTSPServer.hh version.hh 17 | DynamicRTSPServer.$(CPP): DynamicRTSPServer.hh 18 | 19 | USAGE_ENVIRONMENT_DIR = ../UsageEnvironment 20 | USAGE_ENVIRONMENT_LIB = $(USAGE_ENVIRONMENT_DIR)/libUsageEnvironment.$(libUsageEnvironment_LIB_SUFFIX) 21 | BASIC_USAGE_ENVIRONMENT_DIR = ../BasicUsageEnvironment 22 | BASIC_USAGE_ENVIRONMENT_LIB = $(BASIC_USAGE_ENVIRONMENT_DIR)/libBasicUsageEnvironment.$(libBasicUsageEnvironment_LIB_SUFFIX) 23 | LIVEMEDIA_DIR = ../liveMedia 24 | LIVEMEDIA_LIB = $(LIVEMEDIA_DIR)/libliveMedia.$(libliveMedia_LIB_SUFFIX) 25 | GROUPSOCK_DIR = ../groupsock 26 | GROUPSOCK_LIB = $(GROUPSOCK_DIR)/libgroupsock.$(libgroupsock_LIB_SUFFIX) 27 | LOCAL_LIBS = $(LIVEMEDIA_LIB) $(GROUPSOCK_LIB) \ 28 | $(BASIC_USAGE_ENVIRONMENT_LIB) $(USAGE_ENVIRONMENT_LIB) 29 | LIBS = $(LOCAL_LIBS) $(LIBS_FOR_CONSOLE_APPLICATION) 30 | 31 | live555MediaServer$(EXE): $(MEDIA_SERVER_OBJS) $(LOCAL_LIBS) 32 | $(LINK)$@ $(CONSOLE_LINK_OPTS) $(MEDIA_SERVER_OBJS) $(LIBS) 33 | 34 | clean: 35 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~ 36 | 37 | install: $(MEDIA_SERVER) 38 | install -d $(DESTDIR)$(PREFIX)/bin 39 | install -m 755 $(MEDIA_SERVER) $(DESTDIR)$(PREFIX)/bin 40 | 41 | ##### Any additional, platform-specific rules come here: 42 | -------------------------------------------------------------------------------- /third_party/live555/mediaServer/version.hh: -------------------------------------------------------------------------------- 1 | // Copyright (c) 1996-2018, Live Networks, Inc. All rights reserved 2 | // Version information for the LIVE555 Media Server application 3 | // Header file 4 | 5 | #ifndef _MEDIA_SERVER_VERSION_HH 6 | #define _MEDIA_SERVER_VERSION_HH 7 | 8 | #define MEDIA_SERVER_VERSION_STRING "0.92" 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /third_party/live555/proxyServer/Makefile.head: -------------------------------------------------------------------------------- 1 | INCLUDES = -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include 2 | # Default library filename suffixes for each library that we link with. The "config.*" file might redefine these later. 3 | libliveMedia_LIB_SUFFIX = $(LIB_SUFFIX) 4 | libBasicUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX) 5 | libUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX) 6 | libgroupsock_LIB_SUFFIX = $(LIB_SUFFIX) 7 | ##### Change the following for your environment: 8 | -------------------------------------------------------------------------------- /third_party/live555/proxyServer/Makefile.tail: -------------------------------------------------------------------------------- 1 | ##### End of variables to change 2 | 3 | PROXY_SERVER = live555ProxyServer$(EXE) 4 | 5 | PREFIX = /usr/local 6 | ALL = $(PROXY_SERVER) 7 | all: $(ALL) 8 | 9 | .$(C).$(OBJ): 10 | $(C_COMPILER) -c $(C_FLAGS) $< 11 | .$(CPP).$(OBJ): 12 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $< 13 | 14 | PROXY_SERVER_OBJS = live555ProxyServer.$(OBJ) 15 | 16 | USAGE_ENVIRONMENT_DIR = ../UsageEnvironment 17 | USAGE_ENVIRONMENT_LIB = $(USAGE_ENVIRONMENT_DIR)/libUsageEnvironment.$(libUsageEnvironment_LIB_SUFFIX) 18 | BASIC_USAGE_ENVIRONMENT_DIR = ../BasicUsageEnvironment 19 | BASIC_USAGE_ENVIRONMENT_LIB = $(BASIC_USAGE_ENVIRONMENT_DIR)/libBasicUsageEnvironment.$(libBasicUsageEnvironment_LIB_SUFFIX) 20 | LIVEMEDIA_DIR = ../liveMedia 21 | LIVEMEDIA_LIB = $(LIVEMEDIA_DIR)/libliveMedia.$(libliveMedia_LIB_SUFFIX) 22 | GROUPSOCK_DIR = ../groupsock 23 | GROUPSOCK_LIB = $(GROUPSOCK_DIR)/libgroupsock.$(libgroupsock_LIB_SUFFIX) 24 | LOCAL_LIBS = $(LIVEMEDIA_LIB) $(GROUPSOCK_LIB) \ 25 | $(BASIC_USAGE_ENVIRONMENT_LIB) $(USAGE_ENVIRONMENT_LIB) 26 | LIBS = $(LOCAL_LIBS) $(LIBS_FOR_CONSOLE_APPLICATION) 27 | 28 | live555ProxyServer$(EXE): $(PROXY_SERVER_OBJS) $(LOCAL_LIBS) 29 | $(LINK)$@ $(CONSOLE_LINK_OPTS) $(PROXY_SERVER_OBJS) $(LIBS) 30 | 31 | clean: 32 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~ 33 | 34 | install: $(PROXY_SERVER) 35 | install -d $(DESTDIR)$(PREFIX)/bin 36 | install -m 755 $(PROXY_SERVER) $(DESTDIR)$(PREFIX)/bin 37 | 38 | ##### Any additional, platform-specific rules come here: 39 | -------------------------------------------------------------------------------- /third_party/live555/testProgs/Makefile.head: -------------------------------------------------------------------------------- 1 | INCLUDES = -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include 2 | # Default library filename suffixes for each library that we link with. The "config.*" file might redefine these later. 3 | libliveMedia_LIB_SUFFIX = $(LIB_SUFFIX) 4 | libBasicUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX) 5 | libUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX) 6 | libgroupsock_LIB_SUFFIX = $(LIB_SUFFIX) 7 | ##### Change the following for your environment: 8 | -------------------------------------------------------------------------------- /third_party/live555/testProgs/testMP3-using-ADUs.sdp: -------------------------------------------------------------------------------- 1 | v=0 2 | o=- 49452 4 IN IP4 127.0.0.1 3 | s=Test MP3 session 4 | i=Parameters for the session streamed by "testMP3Streamer" 5 | t=0 0 6 | a=tool:testMP3Streamer 7 | a=type:broadcast 8 | m=audio 6666 RTP/AVP 96 9 | c=IN IP4 239.255.42.42/127 10 | a=rtpmap:96 mpa-robust/90000 11 | -------------------------------------------------------------------------------- /third_party/live555/testProgs/testMP3.sdp: -------------------------------------------------------------------------------- 1 | v=0 2 | o=- 49452 4 IN IP4 127.0.0.1 3 | s=Test MP3 session 4 | i=Parameters for the session streamed by "testMP3Streamer" 5 | t=0 0 6 | a=tool:testMP3Streamer 7 | a=type:broadcast 8 | m=audio 6666 RTP/AVP 14 9 | c=IN IP4 239.255.42.42/127 10 | -------------------------------------------------------------------------------- /third_party/live555/testProgs/testMPEG1or2AudioVideo.sdp: -------------------------------------------------------------------------------- 1 | v=0 2 | o=- 49451 3 IN IP4 127.0.0.1 3 | s=Test MPEG Audio+Video session 4 | i=Parameters for the session streamed by "testMPEG1or2AudioVideoStreamer" 5 | t=0 0 6 | a=tool:testMPEG1or2AudioVideoStreamer 7 | a=type:broadcast 8 | m=audio 6666 RTP/AVP 14 9 | c=IN IP4 239.255.42.42/127 10 | m=video 8888 RTP/AVP 32 11 | c=IN IP4 239.255.42.42/127 12 | -------------------------------------------------------------------------------- /third_party/live555/testProgs/testMPEG1or2Video.sdp: -------------------------------------------------------------------------------- 1 | v=0 2 | o=- 49451 3 IN IP4 127.0.0.1 3 | s=Test MPEG Video session 4 | i=Parameters for the session streamed by "testMPEG1or2VideoStreamer" 5 | t=0 0 6 | a=tool:testMPEG1or2VideoStreamer 7 | a=type:broadcast 8 | m=video 8888 RTP/AVP 32 9 | c=IN IP4 239.255.42.42/127 10 | -------------------------------------------------------------------------------- /third_party/live555/testProgs/testMPEG2Transport.sdp: -------------------------------------------------------------------------------- 1 | v=0 2 | o=- 49451 3 IN IP4 127.0.0.1 3 | s=Test MPEG-2 Transport Stream session 4 | i=Parameters for the session streamed by "testMPEG2TransportStreamer" 5 | t=0 0 6 | a=tool:testMPEG2TransportStreamer 7 | a=type:broadcast 8 | m=video 1234 RTP/AVP 33 9 | c=IN IP4 239.255.42.42/127 10 | -------------------------------------------------------------------------------- /third_party/live555/win32config: -------------------------------------------------------------------------------- 1 | # Comment out the following line to produce Makefiles that generate debuggable code: 2 | NODEBUG=1 3 | 4 | # The following definition ensures that we are properly matching 5 | # the WinSock2 library file with the correct header files. 6 | # (will link with "ws2_32.lib" and include "winsock2.h" & "Ws2tcpip.h") 7 | TARGETOS = WINNT 8 | 9 | # If for some reason you wish to use WinSock1 instead, uncomment the 10 | # following two definitions. 11 | # (will link with "wsock32.lib" and include "winsock.h") 12 | #TARGETOS = WIN95 13 | #APPVER = 4.0 14 | 15 | !include 16 | 17 | UI_OPTS = $(guilflags) $(guilibsdll) 18 | # Use the following to get a console (e.g., for debugging): 19 | CONSOLE_UI_OPTS = $(conlflags) $(conlibsdll) 20 | CPU=i386 21 | 22 | TOOLS32 = c:\Program Files\DevStudio\Vc 23 | COMPILE_OPTS = $(INCLUDES) $(cdebug) $(cflags) $(cvarsdll) -I. -I"$(TOOLS32)\include" 24 | C = c 25 | C_COMPILER = "$(TOOLS32)\bin\cl" 26 | C_FLAGS = $(COMPILE_OPTS) 27 | CPP = cpp 28 | CPLUSPLUS_COMPILER = $(C_COMPILER) 29 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) 30 | OBJ = obj 31 | LINK = $(link) -out: 32 | LIBRARY_LINK = lib -out: 33 | LINK_OPTS_0 = $(linkdebug) msvcirt.lib 34 | LIBRARY_LINK_OPTS = 35 | LINK_OPTS = $(LINK_OPTS_0) $(UI_OPTS) 36 | CONSOLE_LINK_OPTS = $(LINK_OPTS_0) $(CONSOLE_UI_OPTS) 37 | SERVICE_LINK_OPTS = kernel32.lib advapi32.lib shell32.lib -subsystem:console,$(APPVER) 38 | LIB_SUFFIX = lib 39 | LIBS_FOR_CONSOLE_APPLICATION = 40 | LIBS_FOR_GUI_APPLICATION = 41 | MULTIMEDIA_LIBS = winmm.lib 42 | EXE = .exe 43 | PLATFORM = Windows 44 | 45 | rc32 = "$(TOOLS32)\bin\rc" 46 | .rc.res: 47 | $(rc32) $< 48 | -------------------------------------------------------------------------------- /third_party/live555/win32config.Borland: -------------------------------------------------------------------------------- 1 | # Comment out the following line to produce Makefiles that generate debuggable code: 2 | NODEBUG=1 3 | 4 | # The following definition ensures that we are properly matching 5 | # the WinSock2 library file with the correct header files. 6 | # (will link with "ws2_32.lib" and include "winsock2.h" & "Ws2tcpip.h") 7 | TARGETOS = WINNT 8 | 9 | # If for some reason you wish to use WinSock1 instead, uncomment the 10 | # following two definitions. 11 | # (will link with "wsock32.lib" and include "winsock.h") 12 | #TARGETOS = WIN95 13 | #APPVER = 4.0 14 | 15 | #!include 16 | 17 | UI_OPTS = $(guilflags) $(guilibsdll) 18 | # Use the following to get a console (e.g., for debugging): 19 | CONSOLE_UI_OPTS = $(conlflags) $(conlibsdll) 20 | CPU=i386 21 | 22 | TOOLS32 = C:\Progra~1\Borland\CBuilder5 23 | COMPILE_OPTS = $(INCLUDES) $(cdebug) $(cflags) $(cvarsdll) -I. -I$(TOOLS32)\include 24 | C = c 25 | C_COMPILER = $(TOOLS32)\bin\bcc32 26 | C_FLAGS = $(COMPILE_OPTS) 27 | CPP = cpp 28 | CPLUSPLUS_COMPILER = $(C_COMPILER) 29 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) 30 | OBJ = obj 31 | LINK = $(TOOLS32)\bin\ilink32 32 | LIBRARY_LINK = $(TOOLS32)\bin\tlib 33 | LINK_OPTS_0 = $(linkdebug) msvcirt.lib 34 | LIBRARY_LINK_OPTS = /u 35 | LINK_OPTS = $(LINK_OPTS_0) $(UI_OPTS) 36 | CONSOLE_LINK_OPTS = c0x32 37 | 38 | SERVICE_LINK_OPTS = kernel32.lib advapi32.lib shell32.lib -subsystem:console,$(APPVER) 39 | LIB_SUFFIX = lib 40 | LIBS_FOR_CONSOLE_APPLICATION = cw32.lib import32.lib 41 | LIBS_FOR_GUI_APPLICATION = ,,cw32 42 | EXE = 43 | 44 | rc32 = $(TOOLS32)\bin\brc32" 45 | .rc.res: 46 | $(rc32) $< 47 | -------------------------------------------------------------------------------- /tools/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | script_dir=$(dirname $(readlink -f "$0")) 4 | project_dir=${script_dir}/.. 5 | project_name=sophon-pipeline 6 | set -e 7 | 8 | pushd ${project_dir} 9 | 10 | commit_id=$(git log -1 | awk 'NR==1 {print substr($2,0,8)}') 11 | times=`date +%Y%m%d` 12 | 13 | SOPHON_PIPELINE_VERSION=`grep "project" CMakeLists.txt | grep "${project_name}" |awk -F '_v' '{print $2}' |awk -F ')' '{print $1}'` 14 | dst_file_name_prefix="${project_name}_v${SOPHON_PIPELINE_VERSION}_${commit_id}_${times}" 15 | dst_file_name="${dst_file_name_prefix}.tar.gz" 16 | 17 | dst_dir=$project_dir/out 18 | sophon_pipeline_dir=${dst_dir}/${dst_file_name_prefix} 19 | 20 | rm -rf ${dst_dir} 21 | mkdir ${dst_dir} 22 | mkdir ${sophon_pipeline_dir} 23 | 24 | cp -r `ls ${project_dir} -A | grep -v "out"` ${sophon_pipeline_dir}/ 25 | rm -rf ${sophon_pipeline_dir}/.git 26 | 27 | pushd ${dst_dir} 28 | tar -cvzf ${dst_file_name} ${dst_file_name_prefix} 29 | rm -rf ${sophon_pipeline_dir} 30 | popd 31 | 32 | popd 33 | 34 | echo "saved: ${dst_dir}/${dst_file_name}" --------------------------------------------------------------------------------