├── README.md ├── rtmp ├── libRTMP_live_v4l2 │ ├── Makefile │ ├── README.md │ ├── include │ │ ├── .goutputstream-NZSZZY │ │ ├── .goutputstream-VJ59ZY │ │ ├── .goutputstream-Y83D0Y │ │ ├── librtmp │ │ │ ├── amf.h │ │ │ ├── bytes.h │ │ │ ├── dh.h │ │ │ ├── dhgroups.h │ │ │ ├── handshake.h │ │ │ ├── http.h │ │ │ ├── log.h │ │ │ ├── rtmp.h │ │ │ └── rtmp_sys.h │ │ ├── librtmp_send264.h │ │ ├── sps_decode.h │ │ ├── v4l2_device.h │ │ ├── x264.h │ │ ├── x264_config.h │ │ └── x264_encoder.h │ ├── lib │ │ ├── librtmp.a │ │ └── libx264.a │ ├── librtmp_send264.cpp │ ├── main.cpp │ ├── v4l2_device.cpp │ └── x264_encoder.cpp ├── rtmp_push_aac │ ├── Makefile │ ├── README.md │ ├── cuc_ieschool.aac │ ├── include │ │ ├── librtmp │ │ │ ├── amf.h │ │ │ ├── bytes.h │ │ │ ├── dh.h │ │ │ ├── dhgroups.h │ │ │ ├── handshake.h │ │ │ ├── http.h │ │ │ ├── log.h │ │ │ ├── rtmp.h │ │ │ └── rtmp_sys.h │ │ ├── librtmp_sendAAC.h │ │ └── rtmp_net.h │ ├── lib │ │ ├── librtmp.a │ │ ├── librtmp.so │ │ └── librtmp.so.0 │ ├── librtmp_sendAAC.cpp │ ├── rtmp_net.cpp │ └── simplest_librtmp_aac.cpp ├── rtmp_push_flv │ ├── Makefile │ ├── README.md │ ├── RTMPPushFlv.cpp │ ├── ThreadBase.cpp │ ├── include │ │ ├── RTMPPushFlv.h │ │ ├── ThreadBase.h │ │ ├── librtmp │ │ │ ├── amf.h │ │ │ ├── bytes.h │ │ │ ├── dh.h │ │ │ ├── dhgroups.h │ │ │ ├── handshake.h │ │ │ ├── http.h │ │ │ ├── log.h │ │ │ ├── rtmp.h │ │ │ └── rtmp_sys.h │ │ ├── printlog.h │ │ └── sockInit.h │ ├── lib │ │ ├── librtmp.a │ │ ├── librtmp.so │ │ └── librtmp.so.0 │ ├── main.cpp │ ├── sockInit.cpp │ └── test.flv └── rtmp_push_h264 │ ├── Makefile │ ├── README.md │ ├── cuc_ieschool.h264 │ ├── include │ ├── librtmp │ │ ├── amf.h │ │ ├── bytes.h │ │ ├── dh.h │ │ ├── dhgroups.h │ │ ├── handshake.h │ │ ├── http.h │ │ ├── log.h │ │ ├── rtmp.h │ │ └── rtmp_sys.h │ ├── librtmp_send264.h │ └── sps_decode.h │ ├── lib │ ├── librtmp.a │ ├── librtmp.so │ └── librtmp.so.0 │ ├── librtmp_send264.cpp │ └── simplest_librtmp_send264.cpp ├── rtp ├── jrtplib_send_recv_h264 │ ├── Makefile │ ├── README.md │ ├── include │ │ ├── rtcpapppacket.h │ │ ├── rtcpbyepacket.h │ │ ├── rtcpcompoundpacket.h │ │ ├── rtcpcompoundpacketbuilder.h │ │ ├── rtcppacket.h │ │ ├── rtcppacketbuilder.h │ │ ├── rtcprrpacket.h │ │ ├── rtcpscheduler.h │ │ ├── rtcpsdesinfo.h │ │ ├── rtcpsdespacket.h │ │ ├── rtcpsrpacket.h │ │ ├── rtcpunknownpacket.h │ │ ├── rtpabortdescriptors.h │ │ ├── rtpaddress.h │ │ ├── rtpbyteaddress.h │ │ ├── rtpcollisionlist.h │ │ ├── rtpconfig.h │ │ ├── rtpdebug.h │ │ ├── rtpdefines.h │ │ ├── rtperrors.h │ │ ├── rtpexternaltransmitter.h │ │ ├── rtphashtable.h │ │ ├── rtpinternalsourcedata.h │ │ ├── rtpinternalutils.h │ │ ├── rtpipv4address.h │ │ ├── rtpipv4destination.h │ │ ├── rtpipv6address.h │ │ ├── rtpipv6destination.h │ │ ├── rtpkeyhashtable.h │ │ ├── rtplibraryversion.h │ │ ├── rtplibraryversioninternal.h │ │ ├── rtpmemorymanager.h │ │ ├── rtpmemoryobject.h │ │ ├── rtppacket.h │ │ ├── rtppacketbuilder.h │ │ ├── rtppollthread.h │ │ ├── rtprandom.h │ │ ├── rtprandomrand48.h │ │ ├── rtprandomrands.h │ │ ├── rtprandomurandom.h │ │ ├── rtprawpacket.h │ │ ├── rtpsecuresession.h │ │ ├── rtpselect.h │ │ ├── rtpsession.h │ │ ├── rtpsessionparams.h │ │ ├── rtpsessionsources.h │ │ ├── rtpsocketutil.h │ │ ├── rtpsocketutilinternal.h │ │ ├── rtpsourcedata.h │ │ ├── rtpsources.h │ │ ├── rtpstructs.h │ │ ├── rtptcpaddress.h │ │ ├── rtptcptransmitter.h │ │ ├── rtptimeutilities.h │ │ ├── rtptransmitter.h │ │ ├── rtptypes.h │ │ ├── rtptypes_win.h │ │ ├── rtpudpv4transmitter.h │ │ └── rtpudpv6transmitter.h │ ├── lib │ │ ├── libjrtp.a │ │ ├── libjrtp.so │ │ └── libjrtp.so.3.11.1 │ ├── receive.cpp │ ├── sender.cpp │ └── test.h264 └── rtp_push_h264 │ ├── Makefile │ ├── README.md │ ├── h264 │ └── test.h264 │ ├── rtp.c │ ├── rtp.h │ ├── rtp.o │ ├── sdp │ ├── mplayer.sdp │ └── vlc.sdp │ └── test ├── rtsp └── RaspPiFromUsb_Yuyv_H264 │ ├── H264FramedLiveSource.cpp │ ├── H264VideoStreamer │ ├── H264VideoStreamer.cpp │ ├── Makefile │ ├── README.md │ ├── include │ ├── encoder │ │ ├── H264FramedLiveSource.hh │ │ ├── encoder_define.hh │ │ └── stdint.h │ ├── live555 │ │ ├── basicUsageEnvironment │ │ │ ├── BasicHashTable.hh │ │ │ ├── BasicUsageEnvironment.hh │ │ │ ├── BasicUsageEnvironment0.hh │ │ │ ├── BasicUsageEnvironment_version.hh │ │ │ ├── DelayQueue.hh │ │ │ └── HandlerSet.hh │ │ ├── groupsock │ │ │ ├── GroupEId.hh │ │ │ ├── Groupsock.hh │ │ │ ├── GroupsockHelper.hh │ │ │ ├── IOHandlers.hh │ │ │ ├── NetAddress.hh │ │ │ ├── NetCommon.h │ │ │ ├── NetInterface.hh │ │ │ ├── TunnelEncaps.hh │ │ │ └── groupsock_version.hh │ │ ├── liveMedia │ │ │ ├── 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 │ │ │ ├── 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 │ │ │ ├── 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_version.hh │ │ │ ├── ourMD5.hh │ │ │ └── uLawAudioFilter.hh │ │ └── usageEnvironment │ │ │ ├── Boolean.hh │ │ │ ├── HashTable.hh │ │ │ ├── UsageEnvironment.hh │ │ │ ├── UsageEnvironment_version.hh │ │ │ └── strDup.hh │ └── x264 │ │ ├── x264.h │ │ └── x264_config.h │ ├── lib │ ├── artosyn_usb_lib │ │ ├── libar8020.c │ │ ├── libar8020.h │ │ └── libar8020.o │ ├── livelib │ │ ├── libBasicUsageEnvironment.a │ │ ├── libUsageEnvironment.a │ │ ├── libgroupsock.a │ │ └── libliveMedia.a │ └── x264lib │ │ ├── libx264.a │ │ ├── libx264.so.148 │ │ └── libx264_bk.so │ ├── my_fifo │ ├── test.264 │ └── testOnDemandRTSPServer.cpp └── v4l2 ├── v4l2_yuv_h264 ├── Makefile ├── README.md ├── h264encoder.c ├── include │ ├── h264encoder.h │ ├── stdint.h │ ├── x264.h │ └── x264_config.h ├── lib │ ├── libx264.a │ └── libx264.so.148 └── main.c └── v4l2_yuyv_h264 ├── Makefile ├── README.md ├── h264encoder.c ├── include ├── h264encoder.h ├── stdint.h ├── x264.h └── x264_config.h ├── lib ├── libx264.a └── libx264.so.148 ├── main.c └── test.h264 /README.md: -------------------------------------------------------------------------------- 1 | /* 2 | 本注释by xuyuanwen 3 | 1.本代码将live55中的测试实例文件:testOnDemandRTSPServer.cpp做了适配,可以将usb接收到的h264实时流 4 | 通过live555实现远程的视频直播。也就是在远程可以通过vlc上实现直播。 5 | 2.本代码还要做一些优化,视频的延时较大,视频比较模糊。USB接收到的视频的分辨率1024*576 30pf 6 | 7 | 3.由于这份代码的主要框架是基于一个csdn博客上一位老铁的资源,以下是博客的地址和说明。特此感谢 8 | 9 | */ 10 | 11 | 12 | 13 | 14 | 15 | # video_audio_encode_live 16 | 17 | 与音视频采集,编码,传输,直播等相关的应用和开发 18 | 19 | ---------------------------------------------------------------------------- 20 | 21 | 22 | rtmp/libRTMP_live_v4l2 23 | ---------------------- 24 | 25 | [《使用RTMPdump(libRTMP)直播来自v4l2的摄像头数据》](https://blog.csdn.net/li_wen01/article/details/71548079) 26 | 27 | 通过RTMPdump库将v4l2采集到的摄像头数据推送到流媒体服务器实现直播的功能 28 | 29 | 30 | rtmp/rtmp_push_aac 31 | -------------- 32 | 33 | 通过rtmp将aac音频文件推送到流媒体服务器 34 | 35 | 36 | rtmp/rtmp_push_h264 37 | -------------------- 38 | 39 | 通过rtmp将h264数据推送到流媒体服务器 40 | 41 | 42 | rtmp/rtmp_push_flv 43 | ------------------ 44 | 45 | 通过rtmp将flv视频格式文件推送到流媒体服务器 46 | 47 | ---------------------------------------------------------------------- 48 | 49 | 50 | rtp/rtp_push_h264 51 | ------------------- 52 | [《Linux下实现RTP实时打包发送H.264视频文件》](https://blog.csdn.net/li_wen01/article/details/69499466) 53 | 54 | 通过rtp协议推送h264数据流 55 | 56 | 57 | 58 | rtp/jrtplib_send_recv_h264 59 | ----------------------- 60 | 61 | 通过jrtplib库来推送h264数据流 62 | 63 | ---------------------------------------------------------------------- 64 | 65 | rtsp/live555_rtsp_live_v4l2 66 | --------------------------- 67 | 68 | [《使用live555 直播来自v4l2的摄像头数据》](https://blog.csdn.net/li_wen01/article/details/59523963) 69 | 70 | 使用x246软编码将v4l2采集到的摄像头数据编码成h264数据流,然后借助live555库将h264流推送到流媒体服务器 71 | 72 | 73 | ----------------------------------------------------------------------- 74 | 75 | v4l2/v4l2_yuv_h264 76 | ----------------- 77 | [《V4L2视频采集与H264编码2—v4l2采集YUV数据》](https://blog.csdn.net/li_wen01/article/details/53557949) 78 | 79 | 通过x264库将v4l2采集到的yuv数据编码成h264数据流 80 | 81 | 82 | 83 | v4l2/v4l2_yuyv_h264 84 | ----------------- 85 | [《V4L2视频采集与视频编码学习目录及总结》](https://blog.csdn.net/li_wen01/article/details/70454366) 86 | 87 | 介绍从v4l2视频采集到编码输出的整个过程 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /rtmp/libRTMP_live_v4l2/Makefile: -------------------------------------------------------------------------------- 1 | INCLUDES = -I./include/ 2 | X264_LIBS = ./lib/libx264.a 3 | RTMP_LIBS = ./lib/librtmp.a 4 | #AAC_LIBS = ./lib/libfaac.a 5 | #AVUTIL_LIBS = ./lib/libavutil.a 6 | #AVCODE_LIBS = ./lib/libavcodec.a 7 | #AVDEVICE_LIBS= ./lib/libavdevice.a 8 | #AVFILTER_LIBS= ./lib/libavfilter.a 9 | #AVFORMAT_LIBS= ./lib/libavformat.a 10 | #POSTPROC_LIBS= ./lib/libpostproc.a 11 | #SWSCALE_LIBS = ./lib/libswscale.a 12 | 13 | LIBS = $(AAC_LIBS) $(X264_LIBS) $(RTMP_LIBS) $(AVUTIL_LIBS) $(AVCODE_LIBS) $(AVDEVICE_LIBS)\ 14 | $(AVFILTER_LIBS) $(AVFORMAT_LIBS) $(POSTPROC_LIBS) $(SWSCALE_LIBS) $(SWRESAMPLE_LIBS) 15 | COMPILE_OPTS = $(INCLUDES) -O2 -g 16 | C = c 17 | C_COMPILER = cc 18 | C_FLAGS = $(COMPILE_OPTS) $(CPPFLAGS) $(CFLAGS) 19 | CPP = cpp 20 | CPLUSPLUS_COMPILER = c++ 21 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall $(CPPFLAGS) $(CXXFLAGS) 22 | OBJ = o 23 | LINK = c++ -o 24 | LINK_OPTS = -lpthread -lssl -lrt -g 25 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 26 | LINK_OBJ = main.o librtmp_send264.o x264_encoder.o v4l2_device.o 27 | 28 | APP = test 29 | 30 | .$(C).$(OBJ): 31 | $(C_COMPILER) -c $(C_FLAGS) $< 32 | .$(CPP).$(OBJ): 33 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $< 34 | 35 | $(APP): $(LINK_OBJ) 36 | $(LINK) $@ $(LINK_OBJ) $(LIBS) $(CONSOLE_LINK_OPTS) 37 | 38 | clean: 39 | -rm -rf *.$(OBJ) $(APP) core *.core *~ *.h264 40 | 41 | -------------------------------------------------------------------------------- /rtmp/libRTMP_live_v4l2/README.md: -------------------------------------------------------------------------------- 1 | # libRTMP_live_v4l2 2 | Use the RTMPdump library to live video from V4l2 via the RTMP protocol 3 | -------------------------------------------------------------------------------- /rtmp/libRTMP_live_v4l2/include/.goutputstream-NZSZZY: -------------------------------------------------------------------------------- 1 | #ifndef RTMPH264_H_ 2 | #define RTMPH264_H_ 3 | 4 | extern "C" { 5 | #include "faac.h" 6 | #include "librtmp_send264.h" 7 | #include "sps_decode.h" 8 | #include "x264.h" 9 | #include "x264_config.h" 10 | #include "v4l2_device.h" 11 | //#include "libswscale/swscale.h" 12 | //#include "libavutil/imgutils.h" 13 | } 14 | 15 | 16 | typedef struct 17 | { 18 | // rtmp object 19 | char* szUrl; 20 | RTMP* rtmp; 21 | RTMPPacket packet; 22 | // faac encoder 23 | faacEncHandle hEncoder; 24 | unsigned long nSampleRate; 25 | unsigned long nChannels; 26 | unsigned long nTimeStamp; 27 | unsigned long nTimeDelta; 28 | char* szPcmAudio; 29 | unsigned long nPcmAudioSize; 30 | unsigned long nPcmAudioLen; 31 | char* szAacAudio; 32 | unsigned long nAacAudioSize; 33 | }RTMPMOD_SPublishObj; 34 | 35 | typedef unsigned long long QWORD, ULONG64, UINT64, ULONGLONG; 36 | 37 | class RtmpH264 38 | { 39 | 40 | public: 41 | RtmpH264(void); 42 | 43 | 44 | ~RtmpH264() 45 | { 46 | } 47 | 48 | int CreatePublish(char* url, int outChunkSize, int isOpenPrintLog, int logType); 49 | void DeletePublish(); 50 | 51 | int InitVideoParams(unsigned long width, unsigned long height, unsigned long fps, unsigned long bitrate,int pixelformat,bool bConstantsBitrate); 52 | int SendScreenCapture(BYTE * frame, unsigned long Height, unsigned long timespan, int pixelformat); 53 | 54 | //int WriteVideoParams(unsigned long width, unsigned long height, unsigned long fps, unsigned long bitrate); 55 | //int WriteScreenCapture(BYTE * frame, unsigned long Stride, unsigned long Height, unsigned long timespan); 56 | 57 | void FreeEncodeParams(); // -------------------------------------------------------------------------------- /rtmp/libRTMP_live_v4l2/include/.goutputstream-VJ59ZY: -------------------------------------------------------------------------------- 1 | /** 2 | * Simplest Librtmp Send 264 3 | * 4 | * -------------------------------------------------------------------------------- /rtmp/libRTMP_live_v4l2/include/.goutputstream-Y83D0Y: -------------------------------------------------------------------------------- 1 | #ifndef LIB_RTMP_SEND_H264_H 2 | #define LIB_RTMP_SEND_H264_H 3 | extern "C" { 4 | 5 | #include "librtmp/rtmp.h" 6 | #include "librtmp/rtmp_sys.h" 7 | #include "librtmp/amf.h" 8 | 9 | 10 | /** 11 | * Simplest Librtmp Send 264 12 | * 13 | * -------------------------------------------------------------------------------- /rtmp/libRTMP_live_v4l2/include/librtmp/http.h: -------------------------------------------------------------------------------- 1 | #ifndef __RTMP_HTTP_H__ 2 | #define __RTMP_HTTP_H__ 3 | /* 4 | * Copyright (C) 2010 Howard Chu 5 | * Copyright (C) 2010 Antti Ajanki 6 | * 7 | * This file is part of librtmp. 8 | * 9 | * librtmp is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public License as 11 | * published by the Free Software Foundation; either version 2.1, 12 | * or (at your option) any later version. 13 | * 14 | * librtmp is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with librtmp see the file COPYING. If not, write to 21 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | * Boston, MA 02110-1301, USA. 23 | * http://www.gnu.org/copyleft/lgpl.html 24 | */ 25 | 26 | typedef enum { 27 | HTTPRES_OK, /* result OK */ 28 | HTTPRES_OK_NOT_MODIFIED, /* not modified since last request */ 29 | HTTPRES_NOT_FOUND, /* not found */ 30 | HTTPRES_BAD_REQUEST, /* client error */ 31 | HTTPRES_SERVER_ERROR, /* server reported an error */ 32 | HTTPRES_REDIRECTED, /* resource has been moved */ 33 | HTTPRES_LOST_CONNECTION /* connection lost while waiting for data */ 34 | } HTTPResult; 35 | 36 | struct HTTP_ctx { 37 | char *date; 38 | int size; 39 | int status; 40 | void *data; 41 | }; 42 | 43 | typedef size_t (HTTP_read_callback)(void *ptr, size_t size, size_t nmemb, void *stream); 44 | 45 | HTTPResult HTTP_get(struct HTTP_ctx *http, const char *url, HTTP_read_callback *cb); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /rtmp/libRTMP_live_v4l2/include/librtmp/log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008-2009 Andrej Stepanchuk 3 | * Copyright (C) 2009-2010 Howard Chu 4 | * 5 | * This file is part of librtmp. 6 | * 7 | * librtmp is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1, 10 | * or (at your option) any later version. 11 | * 12 | * librtmp is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with librtmp see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | * http://www.gnu.org/copyleft/lgpl.html 22 | */ 23 | 24 | #ifndef __RTMP_LOG_H__ 25 | #define __RTMP_LOG_H__ 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | /* Enable this to get full debugging output */ 35 | /* #define _DEBUG */ 36 | 37 | #ifdef _DEBUG 38 | #undef NODEBUG 39 | #endif 40 | 41 | typedef enum 42 | { RTMP_LOGCRIT=0, RTMP_LOGERROR, RTMP_LOGWARNING, RTMP_LOGINFO, 43 | RTMP_LOGDEBUG, RTMP_LOGDEBUG2, RTMP_LOGALL 44 | } RTMP_LogLevel; 45 | 46 | extern RTMP_LogLevel RTMP_debuglevel; 47 | 48 | typedef void (RTMP_LogCallback)(int level, const char *fmt, va_list); 49 | void RTMP_LogSetCallback(RTMP_LogCallback *cb); 50 | void RTMP_LogSetOutput(FILE *file); 51 | #ifdef __GNUC__ 52 | void RTMP_LogPrintf(const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); 53 | void RTMP_LogStatus(const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); 54 | void RTMP_Log(int level, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); 55 | #else 56 | void RTMP_LogPrintf(const char *format, ...); 57 | void RTMP_LogStatus(const char *format, ...); 58 | void RTMP_Log(int level, const char *format, ...); 59 | #endif 60 | void RTMP_LogHex(int level, const uint8_t *data, unsigned long len); 61 | void RTMP_LogHexString(int level, const uint8_t *data, unsigned long len); 62 | void RTMP_LogSetLevel(RTMP_LogLevel lvl); 63 | RTMP_LogLevel RTMP_LogGetLevel(void); 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /rtmp/libRTMP_live_v4l2/include/librtmp_send264.h: -------------------------------------------------------------------------------- 1 | #ifndef LIB_RTMP_SEND_H264_H 2 | #define LIB_RTMP_SEND_H264_H 3 | extern "C" { 4 | 5 | #include "librtmp/rtmp.h" 6 | #include "librtmp/rtmp_sys.h" 7 | #include "librtmp/amf.h" 8 | 9 | 10 | /** 11 | * _NaluUnit 12 | * 内部结构体。该结构体主要用于存储和传递Nal单元的类型、大小和数据 13 | */ 14 | typedef struct _NaluUnit 15 | { 16 | int type; 17 | int size; 18 | unsigned char *data; 19 | }NaluUnit; 20 | 21 | /** 22 | * _RTMPMetadata 23 | * 内部结构体。该结构体主要用于存储和传递元数据信息 24 | */ 25 | typedef struct _RTMPMetadata 26 | { 27 | // video, must be h264 type 28 | unsigned int nWidth; 29 | unsigned int nHeight; 30 | unsigned int nFrameRate; 31 | unsigned int nSpsLen; 32 | unsigned char *Sps; 33 | unsigned int nPpsLen; 34 | unsigned char *Pps; 35 | } RTMPMetadata, *LPRTMPMetadata; 36 | 37 | enum 38 | { 39 | VIDEO_CODECID_H264 = 7, 40 | }; 41 | 42 | 43 | 44 | /** 45 | * 初始化并连接到服务器 46 | * 47 | * @param url 服务器上对应webapp的地址 48 | * @isOpenPrintLog 是否打印日志 49 | * @logType 日志类型 50 | * @成功则返回1 , 失败则返回0 51 | */ 52 | int RTMP264_Connect(const char* url, RTMP** ppRtmp, int isOpenPrintLog, int logType); 53 | 54 | 55 | /** 56 | * 断开连接,释放相关的资源。 57 | * 58 | */ 59 | void RTMP264_Close(); 60 | 61 | void InitSpsPps(unsigned char *pps, int pps_len, unsigned char * sps, int sps_len, int width, int height, int fps); 62 | 63 | 64 | /** 65 | * 发送H264数据帧 66 | * 67 | * @param data 存储数据帧内容 68 | * @param size 数据帧的大小 69 | * @param bIsKeyFrame 记录该帧是否为关键帧 70 | * @param nTimeStamp 当前帧的时间戳 71 | * 72 | * @成功则返回 1 , 失败则返回0 73 | */ 74 | int SendH264Packet(unsigned char *data, unsigned int size, int bIsKeyFrame, unsigned int nTimeStamp); 75 | } 76 | #endif 77 | 78 | 79 | -------------------------------------------------------------------------------- /rtmp/libRTMP_live_v4l2/include/v4l2_device.h: -------------------------------------------------------------------------------- 1 | #ifndef V4L2_DEVICE_H 2 | #define V4L2_DEVICE_H 3 | extern "C"{ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #define FILE_VIDEO "/dev/video0" 22 | 23 | int open_camera(void); 24 | int init_camera(int fd, int width, int height); 25 | int start_capture(int fd); 26 | int read_frame(int fd, unsigned char *outbuf, int *len); 27 | void stop_capture(int fd); 28 | void close_camera_device(int fd); 29 | 30 | } 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /rtmp/libRTMP_live_v4l2/include/x264_config.h: -------------------------------------------------------------------------------- 1 | #define X264_BIT_DEPTH 8 2 | #define X264_GPL 1 3 | #define X264_INTERLACED 1 4 | #define X264_CHROMA_FORMAT 0 5 | #define X264_VERSION "" 6 | #define X264_POINTVER "0.148.x" 7 | -------------------------------------------------------------------------------- /rtmp/libRTMP_live_v4l2/lib/librtmp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/libRTMP_live_v4l2/lib/librtmp.a -------------------------------------------------------------------------------- /rtmp/libRTMP_live_v4l2/lib/libx264.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/libRTMP_live_v4l2/lib/libx264.a -------------------------------------------------------------------------------- /rtmp/libRTMP_live_v4l2/main.cpp: -------------------------------------------------------------------------------- 1 | /*============================================================================= 2 | * FileName: main.cpp 3 | * Desc: 4 | * Author: licaibiao 5 | * LastChange: 2017-05-8 6 | * =============================================================================*/ 7 | #include "x264_encoder.h" 8 | #include "v4l2_device.h" 9 | #include "librtmp/log.h" 10 | #include 11 | #include 12 | 13 | int runflag=0; 14 | static void sig_user(int signo){ 15 | if(signo==SIGINT){ 16 | runflag=0; 17 | printf("received SIGINT\n"); 18 | } 19 | } 20 | 21 | void rtmp_push_v4l2(){ 22 | char url[]="rtmp://192.168.0.5:1935/live"; 23 | int fps = 30; 24 | int rate = 333; 25 | int width = 640; 26 | int height = 480; 27 | int outSize = 1024; 28 | 29 | int index=0; 30 | unsigned int tick = 0; 31 | unsigned int tick_gap = 1000/fps; 32 | uint32_t now=0; 33 | uint32_t last_update=0; 34 | 35 | int fd; 36 | int len = 0; 37 | uint8_t *cam_buf; 38 | uint32_t pixelformat; 39 | 40 | cam_buf = (uint8_t*)malloc(1024*1024*3); 41 | memset(cam_buf, 0, 1024*1024*3); 42 | 43 | pixelformat = V4L2_PIX_FMT_YUYV; 44 | 45 | if(signal(SIGINT,sig_user)==SIG_ERR){ 46 | perror("catch SIGINT err"); 47 | } 48 | 49 | fd =open_camera(); 50 | init_camera(fd, width, height); 51 | start_capture(fd); 52 | 53 | //RTMP_CreatePublish(url,outSize,1,RTMP_LOGINFO); 54 | RTMP_CreatePublish(url,outSize,1,RTMP_LOGERROR); 55 | printf("connected \n"); 56 | RTMP_InitVideoParams(width,height,fps, rate, pixelformat,false); 57 | printf("inited \n"); 58 | runflag=1; 59 | //runflag=3; 60 | 61 | while(runflag){ 62 | if(index!=0){ 63 | RTMP_SendScreenCapture(cam_buf,height,tick, pixelformat, width, height); 64 | // printf("send frame index -- %d\n",index); 65 | } 66 | last_update=RTMP_GetTime(); 67 | 68 | read_frame(fd, cam_buf,&len); 69 | 70 | tick +=tick_gap; 71 | now=RTMP_GetTime(); 72 | 73 | //usleep((tick_gap-now+last_update)*1000); 74 | usleep(1000); 75 | index++; 76 | } 77 | 78 | free(cam_buf); 79 | stop_capture(fd); 80 | close_camera_device(fd); 81 | RTMP_DeletePublish(); 82 | } 83 | 84 | int main(){ 85 | rtmp_push_v4l2(); 86 | return 0; 87 | } 88 | 89 | 90 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_aac/Makefile: -------------------------------------------------------------------------------- 1 | INCLUDES = -I./include/ 2 | RTMP_LIBS = ./lib/librtmp.a 3 | LIBS = $(RTMP_LIBS) 4 | 5 | COMPILE_OPTS = $(INCLUDES) -O2 -g 6 | C = c 7 | C_COMPILER = cc 8 | C_FLAGS = $(COMPILE_OPTS) $(CPPFLAGS) $(CFLAGS) 9 | CPP = cpp 10 | CPLUSPLUS_COMPILER = c++ 11 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -Wno-unused-but-set-variable $(CPPFLAGS) $(CXXFLAGS) 12 | OBJ = o 13 | LINK = c++ -o 14 | LINK_OPTS = 15 | CONSOLE_LINK_OPTS = $(LINK_OPTS) -lpthread -lssl 16 | LINK_OBJ = simplest_librtmp_aac.o librtmp_sendAAC.o rtmp_net.o 17 | 18 | APP = test 19 | 20 | .$(C).$(OBJ): 21 | $(C_COMPILER) -c $(C_FLAGS) $< 22 | .$(CPP).$(OBJ): 23 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $< 24 | 25 | $(APP): $(LINK_OBJ) 26 | $(LINK)$@ $(LINK_OBJ) $(LIBS) $(CONSOLE_LINK_OPTS) 27 | 28 | clean: 29 | -rm -rf *.$(OBJ) $(APP) core *.core *~ include/*~ 30 | 31 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_aac/README.md: -------------------------------------------------------------------------------- 1 | # rtmp_push_aac 2 | use RTMPdump(libRTMP) send local AAC stream to net server as rtmp live stream,it work in linux OS 3 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_aac/cuc_ieschool.aac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_aac/cuc_ieschool.aac -------------------------------------------------------------------------------- /rtmp/rtmp_push_aac/include/librtmp/http.h: -------------------------------------------------------------------------------- 1 | #ifndef __RTMP_HTTP_H__ 2 | #define __RTMP_HTTP_H__ 3 | /* 4 | * Copyright (C) 2010 Howard Chu 5 | * Copyright (C) 2010 Antti Ajanki 6 | * 7 | * This file is part of librtmp. 8 | * 9 | * librtmp is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public License as 11 | * published by the Free Software Foundation; either version 2.1, 12 | * or (at your option) any later version. 13 | * 14 | * librtmp is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with librtmp see the file COPYING. If not, write to 21 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | * Boston, MA 02110-1301, USA. 23 | * http://www.gnu.org/copyleft/lgpl.html 24 | */ 25 | 26 | typedef enum { 27 | HTTPRES_OK, /* result OK */ 28 | HTTPRES_OK_NOT_MODIFIED, /* not modified since last request */ 29 | HTTPRES_NOT_FOUND, /* not found */ 30 | HTTPRES_BAD_REQUEST, /* client error */ 31 | HTTPRES_SERVER_ERROR, /* server reported an error */ 32 | HTTPRES_REDIRECTED, /* resource has been moved */ 33 | HTTPRES_LOST_CONNECTION /* connection lost while waiting for data */ 34 | } HTTPResult; 35 | 36 | struct HTTP_ctx { 37 | char *date; 38 | int size; 39 | int status; 40 | void *data; 41 | }; 42 | 43 | typedef size_t (HTTP_read_callback)(void *ptr, size_t size, size_t nmemb, void *stream); 44 | 45 | HTTPResult HTTP_get(struct HTTP_ctx *http, const char *url, HTTP_read_callback *cb); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_aac/include/librtmp/log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008-2009 Andrej Stepanchuk 3 | * Copyright (C) 2009-2010 Howard Chu 4 | * 5 | * This file is part of librtmp. 6 | * 7 | * librtmp is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1, 10 | * or (at your option) any later version. 11 | * 12 | * librtmp is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with librtmp see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | * http://www.gnu.org/copyleft/lgpl.html 22 | */ 23 | 24 | #ifndef __RTMP_LOG_H__ 25 | #define __RTMP_LOG_H__ 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | /* Enable this to get full debugging output */ 35 | /* #define _DEBUG */ 36 | 37 | #ifdef _DEBUG 38 | #undef NODEBUG 39 | #endif 40 | 41 | typedef enum 42 | { RTMP_LOGCRIT=0, RTMP_LOGERROR, RTMP_LOGWARNING, RTMP_LOGINFO, 43 | RTMP_LOGDEBUG, RTMP_LOGDEBUG2, RTMP_LOGALL 44 | } RTMP_LogLevel; 45 | 46 | extern RTMP_LogLevel RTMP_debuglevel; 47 | 48 | typedef void (RTMP_LogCallback)(int level, const char *fmt, va_list); 49 | void RTMP_LogSetCallback(RTMP_LogCallback *cb); 50 | void RTMP_LogSetOutput(FILE *file); 51 | void RTMP_LogPrintf(const char *format, ...); 52 | void RTMP_LogStatus(const char *format, ...); 53 | void RTMP_Log(int level, const char *format, ...); 54 | void RTMP_LogHex(int level, const uint8_t *data, unsigned long len); 55 | void RTMP_LogHexString(int level, const uint8_t *data, unsigned long len); 56 | void RTMP_LogSetLevel(RTMP_LogLevel lvl); 57 | RTMP_LogLevel RTMP_LogGetLevel(void); 58 | 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_aac/include/librtmp_sendAAC.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBRTMP_SENDAAC_H 2 | #define LIBRTMP_SENDAAC_H 3 | 4 | void RTMPAAC_Send(); 5 | 6 | #endif -------------------------------------------------------------------------------- /rtmp/rtmp_push_aac/include/rtmp_net.h: -------------------------------------------------------------------------------- 1 | #ifndef __RTMP_NET_H 2 | #define __RTMP_NET_H 3 | 4 | int Net_Init(const char* url); 5 | int SendPacket(unsigned int nPacketType,unsigned char *data,unsigned int size,unsigned int nTimestamp); 6 | void Net_Close(); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_aac/lib/librtmp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_aac/lib/librtmp.a -------------------------------------------------------------------------------- /rtmp/rtmp_push_aac/lib/librtmp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_aac/lib/librtmp.so -------------------------------------------------------------------------------- /rtmp/rtmp_push_aac/lib/librtmp.so.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_aac/lib/librtmp.so.0 -------------------------------------------------------------------------------- /rtmp/rtmp_push_aac/simplest_librtmp_aac.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "librtmp_sendAAC.h" 3 | #include "rtmp_net.h" 4 | 5 | 6 | FILE *fp_send1; 7 | 8 | //读文件的回调函数 9 | //we use this callback function to read data from buffer 10 | int read_buffer1(unsigned char *buf, int buf_size ){ 11 | if(!feof(fp_send1)){ 12 | int true_size=fread(buf,1,buf_size,fp_send1); 13 | return true_size; 14 | }else{ 15 | return -1; 16 | } 17 | } 18 | 19 | //#include 20 | 21 | int main(int argc, char* argv[]) 22 | { 23 | //初始化并连接到服务器 24 | Net_Init("rtmp://192.168.0.5:1935/live"); 25 | //发送 26 | RTMPAAC_Send(); 27 | //断开连接并释放相关资源 28 | Net_Close(); 29 | 30 | return 0; 31 | } 32 | 33 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_flv/Makefile: -------------------------------------------------------------------------------- 1 | INCLUDES = -I./include/ 2 | RTMP_LIBS = ./lib/librtmp.a 3 | LIBS = $(RTMP_LIBS) 4 | 5 | COMPILE_OPTS = $(INCLUDES) -O2 -g 6 | C = c 7 | C_COMPILER = cc 8 | C_FLAGS = $(COMPILE_OPTS) $(CPPFLAGS) $(CFLAGS) 9 | CPP = cpp 10 | CPLUSPLUS_COMPILER = c++ 11 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall $(CPPFLAGS) $(CXXFLAGS) 12 | OBJ = o 13 | LINK = c++ -o 14 | LINK_OPTS = 15 | CONSOLE_LINK_OPTS = $(LINK_OPTS) -lpthread -lssl 16 | LINK_OBJ = main.o RTMPPushFlv.o sockInit.o ThreadBase.o 17 | 18 | APP = test 19 | 20 | .$(C).$(OBJ): 21 | $(C_COMPILER) -c $(C_FLAGS) $< 22 | .$(CPP).$(OBJ): 23 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $< 24 | 25 | $(APP): $(LINK_OBJ) 26 | $(LINK)$@ $(LINK_OBJ) $(LIBS) $(CONSOLE_LINK_OPTS) 27 | 28 | clean: 29 | -rm -rf *.$(OBJ) $(APP) core *.core *~ include/*~ 30 | 31 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_flv/README.md: -------------------------------------------------------------------------------- 1 | # rtmp_push_flv 2 | use RTMPdump(libRTMP) send local flv file to net server as rtmp live stream , It works in the linux operating system. 3 | the blog url :http://blog.csdn.net/li_wen01/article/details/71132782 4 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_flv/ThreadBase.cpp: -------------------------------------------------------------------------------- 1 | /*============================================================================= 2 | * FileName: ThreadBase.cpp 3 | * Desc: 4 | * Author: licaibiao 5 | * LastChange: 2017-05-3 6 | * =============================================================================*/ 7 | 8 | #include "ThreadBase.h" 9 | 10 | ThreadBase::ThreadBase() { 11 | // TODO Auto-generated constructor stub 12 | tid=-1; 13 | stopFlag=0; 14 | startFlag=0; 15 | } 16 | 17 | ThreadBase::~ThreadBase() { 18 | // TODO Auto-generated destructor stub 19 | 20 | } 21 | 22 | int ThreadBase::start(){ 23 | int ret=pthread_create(&tid,NULL,thread_proxy_func,this); 24 | if(ret==0){ 25 | startFlag=1; 26 | // printf("startFlag= %d\n",startFlag); 27 | } 28 | return ret; 29 | } 30 | int ThreadBase::stop(){ 31 | stopFlag=1; 32 | return pthread_join(tid,NULL); 33 | } 34 | int ThreadBase::join(){ 35 | return pthread_join(tid,NULL); 36 | } 37 | int ThreadBase::isStop(){ 38 | return stopFlag; 39 | } 40 | int ThreadBase::isStart(){ 41 | return startFlag; 42 | } 43 | void *ThreadBase::thread_proxy_func(void *args){ 44 | ThreadBase *pThread=static_cast(args); 45 | // printf("thread run\n"); 46 | pThread->run(); 47 | if(pThread->stopFlag==1) 48 | delete pThread; 49 | return NULL; 50 | } 51 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_flv/include/ThreadBase.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_flv/include/ThreadBase.h -------------------------------------------------------------------------------- /rtmp/rtmp_push_flv/include/librtmp/http.h: -------------------------------------------------------------------------------- 1 | #ifndef __RTMP_HTTP_H__ 2 | #define __RTMP_HTTP_H__ 3 | /* 4 | * Copyright (C) 2010 Howard Chu 5 | * Copyright (C) 2010 Antti Ajanki 6 | * 7 | * This file is part of librtmp. 8 | * 9 | * librtmp is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public License as 11 | * published by the Free Software Foundation; either version 2.1, 12 | * or (at your option) any later version. 13 | * 14 | * librtmp is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with librtmp see the file COPYING. If not, write to 21 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | * Boston, MA 02110-1301, USA. 23 | * http://www.gnu.org/copyleft/lgpl.html 24 | */ 25 | 26 | typedef enum { 27 | HTTPRES_OK, /* result OK */ 28 | HTTPRES_OK_NOT_MODIFIED, /* not modified since last request */ 29 | HTTPRES_NOT_FOUND, /* not found */ 30 | HTTPRES_BAD_REQUEST, /* client error */ 31 | HTTPRES_SERVER_ERROR, /* server reported an error */ 32 | HTTPRES_REDIRECTED, /* resource has been moved */ 33 | HTTPRES_LOST_CONNECTION /* connection lost while waiting for data */ 34 | } HTTPResult; 35 | 36 | struct HTTP_ctx { 37 | char *date; 38 | int size; 39 | int status; 40 | void *data; 41 | }; 42 | 43 | typedef size_t (HTTP_read_callback)(void *ptr, size_t size, size_t nmemb, void *stream); 44 | 45 | HTTPResult HTTP_get(struct HTTP_ctx *http, const char *url, HTTP_read_callback *cb); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_flv/include/librtmp/log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008-2009 Andrej Stepanchuk 3 | * Copyright (C) 2009-2010 Howard Chu 4 | * 5 | * This file is part of librtmp. 6 | * 7 | * librtmp is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1, 10 | * or (at your option) any later version. 11 | * 12 | * librtmp is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with librtmp see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | * http://www.gnu.org/copyleft/lgpl.html 22 | */ 23 | 24 | #ifndef __RTMP_LOG_H__ 25 | #define __RTMP_LOG_H__ 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | /* Enable this to get full debugging output */ 35 | /* #define _DEBUG */ 36 | 37 | #ifdef _DEBUG 38 | #undef NODEBUG 39 | #endif 40 | 41 | typedef enum 42 | { RTMP_LOGCRIT=0, RTMP_LOGERROR, RTMP_LOGWARNING, RTMP_LOGINFO, 43 | RTMP_LOGDEBUG, RTMP_LOGDEBUG2, RTMP_LOGALL 44 | } RTMP_LogLevel; 45 | 46 | extern RTMP_LogLevel RTMP_debuglevel; 47 | 48 | typedef void (RTMP_LogCallback)(int level, const char *fmt, va_list); 49 | void RTMP_LogSetCallback(RTMP_LogCallback *cb); 50 | void RTMP_LogSetOutput(FILE *file); 51 | void RTMP_LogPrintf(const char *format, ...); 52 | void RTMP_LogStatus(const char *format, ...); 53 | void RTMP_Log(int level, const char *format, ...); 54 | void RTMP_LogHex(int level, const uint8_t *data, unsigned long len); 55 | void RTMP_LogHexString(int level, const uint8_t *data, unsigned long len); 56 | void RTMP_LogSetLevel(RTMP_LogLevel lvl); 57 | RTMP_LogLevel RTMP_LogGetLevel(void); 58 | 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_flv/include/sockInit.h: -------------------------------------------------------------------------------- 1 | /*============================================================================= 2 | * FileName: sockInit.h 3 | * Desc: 4 | * Author: licaibiao 5 | * LastChange: 2017-05-3 6 | * =============================================================================*/ 7 | 8 | #ifndef SOCKINIT_H_ 9 | #define SOCKINIT_H_ 10 | 11 | int InitSockets(); 12 | void CleanupSockets(); 13 | 14 | 15 | #endif /* SOCKINIT_H_ */ 16 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_flv/lib/librtmp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_flv/lib/librtmp.a -------------------------------------------------------------------------------- /rtmp/rtmp_push_flv/lib/librtmp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_flv/lib/librtmp.so -------------------------------------------------------------------------------- /rtmp/rtmp_push_flv/lib/librtmp.so.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_flv/lib/librtmp.so.0 -------------------------------------------------------------------------------- /rtmp/rtmp_push_flv/main.cpp: -------------------------------------------------------------------------------- 1 | /*============================================================================= 2 | * FileName: main.cpp 3 | * Desc: 4 | * Author: licaibiao 5 | * LastChange: 2017-05-3 6 | * =============================================================================*/ 7 | #include "RTMPPushFlv.h" 8 | 9 | int main(){ 10 | 11 | RTMPPushFlv::test(); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_flv/sockInit.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_flv/sockInit.cpp -------------------------------------------------------------------------------- /rtmp/rtmp_push_flv/test.flv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_flv/test.flv -------------------------------------------------------------------------------- /rtmp/rtmp_push_h264/Makefile: -------------------------------------------------------------------------------- 1 | INCLUDES = -I./include/ 2 | RTMP_LIBS = ./lib/librtmp.a 3 | LIBS = $(RTMP_LIBS) 4 | 5 | COMPILE_OPTS = $(INCLUDES) -O2 -g 6 | C = c 7 | C_COMPILER = cc 8 | C_FLAGS = $(COMPILE_OPTS) $(CPPFLAGS) $(CFLAGS) 9 | CPP = cpp 10 | CPLUSPLUS_COMPILER = c++ 11 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -Wno-unused-but-set-variable $(CPPFLAGS) $(CXXFLAGS) 12 | OBJ = o 13 | LINK = c++ -o 14 | LINK_OPTS = 15 | CONSOLE_LINK_OPTS = $(LINK_OPTS) -lpthread -lssl 16 | LINK_OBJ = simplest_librtmp_send264.o librtmp_send264.o 17 | 18 | APP = test 19 | 20 | .$(C).$(OBJ): 21 | $(C_COMPILER) -c $(C_FLAGS) $< 22 | .$(CPP).$(OBJ): 23 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $< 24 | 25 | $(APP): $(LINK_OBJ) 26 | $(LINK)$@ $(LINK_OBJ) $(LIBS) $(CONSOLE_LINK_OPTS) 27 | 28 | clean: 29 | -rm -rf *.$(OBJ) $(APP) core *.core *~ include/*~ 30 | 31 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_h264/README.md: -------------------------------------------------------------------------------- 1 | # rtmp_push_h264 2 | use RTMPdump(libRTMP) send local h.264 file to net server as rtmp live stream , It works in the linux operating system. 3 | 4 | Please check the blog for details http://blog.csdn.net/li_wen01/article/details/71192209 5 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_h264/cuc_ieschool.h264: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_h264/cuc_ieschool.h264 -------------------------------------------------------------------------------- /rtmp/rtmp_push_h264/include/librtmp/http.h: -------------------------------------------------------------------------------- 1 | #ifndef __RTMP_HTTP_H__ 2 | #define __RTMP_HTTP_H__ 3 | /* 4 | * Copyright (C) 2010 Howard Chu 5 | * Copyright (C) 2010 Antti Ajanki 6 | * 7 | * This file is part of librtmp. 8 | * 9 | * librtmp is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public License as 11 | * published by the Free Software Foundation; either version 2.1, 12 | * or (at your option) any later version. 13 | * 14 | * librtmp is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with librtmp see the file COPYING. If not, write to 21 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | * Boston, MA 02110-1301, USA. 23 | * http://www.gnu.org/copyleft/lgpl.html 24 | */ 25 | 26 | typedef enum { 27 | HTTPRES_OK, /* result OK */ 28 | HTTPRES_OK_NOT_MODIFIED, /* not modified since last request */ 29 | HTTPRES_NOT_FOUND, /* not found */ 30 | HTTPRES_BAD_REQUEST, /* client error */ 31 | HTTPRES_SERVER_ERROR, /* server reported an error */ 32 | HTTPRES_REDIRECTED, /* resource has been moved */ 33 | HTTPRES_LOST_CONNECTION /* connection lost while waiting for data */ 34 | } HTTPResult; 35 | 36 | struct HTTP_ctx { 37 | char *date; 38 | int size; 39 | int status; 40 | void *data; 41 | }; 42 | 43 | typedef size_t (HTTP_read_callback)(void *ptr, size_t size, size_t nmemb, void *stream); 44 | 45 | HTTPResult HTTP_get(struct HTTP_ctx *http, const char *url, HTTP_read_callback *cb); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_h264/include/librtmp/log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008-2009 Andrej Stepanchuk 3 | * Copyright (C) 2009-2010 Howard Chu 4 | * 5 | * This file is part of librtmp. 6 | * 7 | * librtmp is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1, 10 | * or (at your option) any later version. 11 | * 12 | * librtmp is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with librtmp see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | * http://www.gnu.org/copyleft/lgpl.html 22 | */ 23 | 24 | #ifndef __RTMP_LOG_H__ 25 | #define __RTMP_LOG_H__ 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | /* Enable this to get full debugging output */ 35 | /* #define _DEBUG */ 36 | 37 | #ifdef _DEBUG 38 | #undef NODEBUG 39 | #endif 40 | 41 | typedef enum 42 | { RTMP_LOGCRIT=0, RTMP_LOGERROR, RTMP_LOGWARNING, RTMP_LOGINFO, 43 | RTMP_LOGDEBUG, RTMP_LOGDEBUG2, RTMP_LOGALL 44 | } RTMP_LogLevel; 45 | 46 | extern RTMP_LogLevel RTMP_debuglevel; 47 | 48 | typedef void (RTMP_LogCallback)(int level, const char *fmt, va_list); 49 | void RTMP_LogSetCallback(RTMP_LogCallback *cb); 50 | void RTMP_LogSetOutput(FILE *file); 51 | void RTMP_LogPrintf(const char *format, ...); 52 | void RTMP_LogStatus(const char *format, ...); 53 | void RTMP_Log(int level, const char *format, ...); 54 | void RTMP_LogHex(int level, const uint8_t *data, unsigned long len); 55 | void RTMP_LogHexString(int level, const uint8_t *data, unsigned long len); 56 | void RTMP_LogSetLevel(RTMP_LogLevel lvl); 57 | RTMP_LogLevel RTMP_LogGetLevel(void); 58 | 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /rtmp/rtmp_push_h264/include/librtmp_send264.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_h264/include/librtmp_send264.h -------------------------------------------------------------------------------- /rtmp/rtmp_push_h264/include/sps_decode.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_h264/include/sps_decode.h -------------------------------------------------------------------------------- /rtmp/rtmp_push_h264/lib/librtmp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_h264/lib/librtmp.a -------------------------------------------------------------------------------- /rtmp/rtmp_push_h264/lib/librtmp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_h264/lib/librtmp.so -------------------------------------------------------------------------------- /rtmp/rtmp_push_h264/lib/librtmp.so.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_h264/lib/librtmp.so.0 -------------------------------------------------------------------------------- /rtmp/rtmp_push_h264/librtmp_send264.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_h264/librtmp_send264.cpp -------------------------------------------------------------------------------- /rtmp/rtmp_push_h264/simplest_librtmp_send264.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtmp/rtmp_push_h264/simplest_librtmp_send264.cpp -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/Makefile: -------------------------------------------------------------------------------- 1 | APP = test 2 | INCLUDE = -I ./include/ 3 | LIB = ./lib/libjrtp.a ./lib/libjrtp.so ./lib/libjrtp.so.3.11.1 4 | #LINK_OPTS = -ljrtp 5 | LINK_OPTS = 6 | OBJ = sender.cpp 7 | 8 | out: 9 | g++ -g $(OBJ) -o $(APP) $(LINK_OPTS) $(LIB) $(INCLUDE) 10 | 11 | clean: 12 | rm -rf *o $(APP) 13 | 14 | -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/README.md: -------------------------------------------------------------------------------- 1 | # jrtplib_send_recv_h264 2 | use jrtplib send or receive h.264 file 3 | -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/include/rtpdebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is a part of JRTPLIB 4 | Copyright (c) 1999-2017 Jori Liesenborgs 5 | 6 | Contact: jori.liesenborgs@gmail.com 7 | 8 | This library was developed at the Expertise Centre for Digital Media 9 | (http://www.edm.uhasselt.be), a research center of the Hasselt University 10 | (http://www.uhasselt.be). The library is based upon work done for 11 | my thesis at the School for Knowledge Technology (Belgium/The Netherlands). 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a 14 | copy of this software and associated documentation files (the "Software"), 15 | to deal in the Software without restriction, including without limitation 16 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 | and/or sell copies of the Software, and to permit persons to whom the 18 | Software is furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included 21 | in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 24 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 29 | IN THE SOFTWARE. 30 | 31 | */ 32 | 33 | #ifndef RTPDEBUG_H 34 | 35 | #define RTPDEBUG_H 36 | 37 | #include "rtpconfig.h" 38 | 39 | #ifdef RTPDEBUG 40 | #include "rtptypes.h" 41 | 42 | void *operator new(size_t s,char filename[],int line); 43 | #ifdef RTP_HAVE_ARRAYALLOC 44 | void *operator new[](size_t s,char filename[],int line); 45 | #define new new ((char*)__FILE__,__LINE__) 46 | #else 47 | #define new new ((char*)__FILE__,__LINE__) 48 | #endif // RTP_HAVE_ARRAYALLOC 49 | #endif // RTPDEBUG 50 | 51 | #endif // RTPDEBUG_H 52 | 53 | -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/include/rtpinternalutils.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is a part of JRTPLIB 4 | Copyright (c) 1999-2011 Jori Liesenborgs 5 | 6 | Contact: jori.liesenborgs@gmail.com 7 | 8 | This library was developed at the Expertise Centre for Digital Media 9 | (http://www.edm.uhasselt.be), a research center of the Hasselt University 10 | (http://www.uhasselt.be). The library is based upon work done for 11 | my thesis at the School for Knowledge Technology (Belgium/The Netherlands). 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a 14 | copy of this software and associated documentation files (the "Software"), 15 | to deal in the Software without restriction, including without limitation 16 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 | and/or sell copies of the Software, and to permit persons to whom the 18 | Software is furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included 21 | in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 24 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 29 | IN THE SOFTWARE. 30 | 31 | */ 32 | 33 | #ifndef RTPINTERNALUTILS_H 34 | 35 | #define RTPINTERNALUTILS_H 36 | 37 | #include "rtpconfig.h" 38 | 39 | #if defined(RTP_HAVE_SNPRINTF_S) 40 | #include 41 | #include 42 | #define RTP_SNPRINTF _snprintf_s 43 | #elif defined(RTP_HAVE_SNPRINTF) 44 | #include 45 | #include 46 | #define RTP_SNPRINTF _snprintf 47 | #else 48 | #include 49 | #define RTP_SNPRINTF snprintf 50 | #endif 51 | 52 | #ifdef RTP_HAVE_STRNCPY_S 53 | #define RTP_STRNCPY(dest, src, len) strncpy_s((dest), (len), (src), _TRUNCATE) 54 | #else 55 | #define RTP_STRNCPY(dest, src, len) strncpy((dest), (src), (len)) 56 | #endif // RTP_HAVE_STRNCPY_S 57 | 58 | #endif // RTPINTERNALUTILS_H 59 | 60 | -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/include/rtplibraryversioninternal.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is a part of JRTPLIB 4 | Copyright (c) 1999-2017 Jori Liesenborgs 5 | 6 | Contact: jori.liesenborgs@gmail.com 7 | 8 | This library was developed at the Expertise Centre for Digital Media 9 | (http://www.edm.uhasselt.be), a research center of the Hasselt University 10 | (http://www.uhasselt.be). The library is based upon work done for 11 | my thesis at the School for Knowledge Technology (Belgium/The Netherlands). 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a 14 | copy of this software and associated documentation files (the "Software"), 15 | to deal in the Software without restriction, including without limitation 16 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 | and/or sell copies of the Software, and to permit persons to whom the 18 | Software is furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included 21 | in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 24 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 29 | IN THE SOFTWARE. 30 | 31 | */ 32 | 33 | /** 34 | * \file rtplibraryversioninternal.h 35 | */ 36 | 37 | #ifndef RTPLIBRARYVERSIONINTERNAL_H 38 | 39 | #define RTPLIBRARYVERSIONINTERNAL_H 40 | 41 | #define JRTPLIB_VERSION_MAJOR 3 42 | #define JRTPLIB_VERSION_MINOR 11 43 | #define JRTPLIB_VERSION_DEBUG 1 44 | 45 | #endif // RTPLIBRARYVERSIONINTERNAL_H 46 | 47 | -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/include/rtppollthread.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is a part of JRTPLIB 4 | Copyright (c) 1999-2017 Jori Liesenborgs 5 | 6 | Contact: jori.liesenborgs@gmail.com 7 | 8 | This library was developed at the Expertise Centre for Digital Media 9 | (http://www.edm.uhasselt.be), a research center of the Hasselt University 10 | (http://www.uhasselt.be). The library is based upon work done for 11 | my thesis at the School for Knowledge Technology (Belgium/The Netherlands). 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a 14 | copy of this software and associated documentation files (the "Software"), 15 | to deal in the Software without restriction, including without limitation 16 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 | and/or sell copies of the Software, and to permit persons to whom the 18 | Software is furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included 21 | in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 24 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 29 | IN THE SOFTWARE. 30 | 31 | */ 32 | 33 | /** 34 | * \file rtppollthread.h 35 | */ 36 | 37 | #ifndef RTPPOLLTHREAD_H 38 | 39 | #define RTPPOLLTHREAD_H 40 | 41 | #include "rtpconfig.h" 42 | 43 | #ifdef RTP_SUPPORT_THREAD 44 | 45 | #include "rtptransmitter.h" 46 | 47 | #include 48 | #include 49 | #include 50 | 51 | namespace jrtplib 52 | { 53 | 54 | class RTPSession; 55 | class RTCPScheduler; 56 | 57 | class JRTPLIB_IMPORTEXPORT RTPPollThread : private jthread::JThread 58 | { 59 | public: 60 | RTPPollThread(RTPSession &session,RTCPScheduler &rtcpsched); 61 | ~RTPPollThread(); 62 | int Start(RTPTransmitter *trans); 63 | void Stop(); 64 | private: 65 | void *Thread(); 66 | 67 | bool stop; 68 | jthread::JMutex stopmutex; 69 | RTPTransmitter *transmitter; 70 | 71 | RTPSession &rtpsession; 72 | RTCPScheduler &rtcpsched; 73 | }; 74 | 75 | } // end namespace 76 | 77 | #endif // RTP_SUPPORT_THREAD 78 | 79 | #endif // RTPPOLLTHREAD_H 80 | -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/include/rtprandomrands.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is a part of JRTPLIB 4 | Copyright (c) 1999-2017 Jori Liesenborgs 5 | 6 | Contact: jori.liesenborgs@gmail.com 7 | 8 | This library was developed at the Expertise Centre for Digital Media 9 | (http://www.edm.uhasselt.be), a research center of the Hasselt University 10 | (http://www.uhasselt.be). The library is based upon work done for 11 | my thesis at the School for Knowledge Technology (Belgium/The Netherlands). 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a 14 | copy of this software and associated documentation files (the "Software"), 15 | to deal in the Software without restriction, including without limitation 16 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 | and/or sell copies of the Software, and to permit persons to whom the 18 | Software is furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included 21 | in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 24 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 29 | IN THE SOFTWARE. 30 | 31 | */ 32 | 33 | /** 34 | * \file rtprandomrands.h 35 | */ 36 | 37 | #ifndef RTPRANDOMRANDS_H 38 | 39 | #define RTPRANDOMRANDS_H 40 | 41 | #include "rtpconfig.h" 42 | #include "rtprandom.h" 43 | 44 | namespace jrtplib 45 | { 46 | 47 | /** A random number generator which tries to use the \c rand_s function on the 48 | * Win32 platform. 49 | */ 50 | class JRTPLIB_IMPORTEXPORT RTPRandomRandS : public RTPRandom 51 | { 52 | public: 53 | RTPRandomRandS(); 54 | ~RTPRandomRandS(); 55 | 56 | /** Initialize the random number generator. */ 57 | int Init(); 58 | 59 | uint8_t GetRandom8(); 60 | uint16_t GetRandom16(); 61 | uint32_t GetRandom32(); 62 | double GetRandomDouble(); 63 | private: 64 | bool initialized; 65 | }; 66 | 67 | } // end namespace 68 | 69 | #endif // RTPRANDOMRANDS_H 70 | 71 | -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/include/rtprandomurandom.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is a part of JRTPLIB 4 | Copyright (c) 1999-2017 Jori Liesenborgs 5 | 6 | Contact: jori.liesenborgs@gmail.com 7 | 8 | This library was developed at the Expertise Centre for Digital Media 9 | (http://www.edm.uhasselt.be), a research center of the Hasselt University 10 | (http://www.uhasselt.be). The library is based upon work done for 11 | my thesis at the School for Knowledge Technology (Belgium/The Netherlands). 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a 14 | copy of this software and associated documentation files (the "Software"), 15 | to deal in the Software without restriction, including without limitation 16 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 | and/or sell copies of the Software, and to permit persons to whom the 18 | Software is furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included 21 | in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 24 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 29 | IN THE SOFTWARE. 30 | 31 | */ 32 | 33 | /** 34 | * \file rtprandomurandom.h 35 | */ 36 | 37 | #ifndef RTPRANDOMURANDOM_H 38 | 39 | #define RTPRANDOMURANDOM_H 40 | 41 | #include "rtpconfig.h" 42 | #include "rtprandom.h" 43 | #include 44 | 45 | namespace jrtplib 46 | { 47 | 48 | /** A random number generator which uses bytes delivered by the /dev/urandom device. */ 49 | class JRTPLIB_IMPORTEXPORT RTPRandomURandom : public RTPRandom 50 | { 51 | public: 52 | RTPRandomURandom(); 53 | ~RTPRandomURandom(); 54 | 55 | /** Initialize the random number generator. */ 56 | int Init(); 57 | 58 | uint8_t GetRandom8(); 59 | uint16_t GetRandom16(); 60 | uint32_t GetRandom32(); 61 | double GetRandomDouble(); 62 | private: 63 | FILE *device; 64 | }; 65 | 66 | } // end namespace 67 | 68 | #endif // RTPRANDOMURANDOM_H 69 | -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/include/rtpsocketutil.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is a part of JRTPLIB 4 | Copyright (c) 1999-2017 Jori Liesenborgs 5 | 6 | Contact: jori.liesenborgs@gmail.com 7 | 8 | This library was developed at the Expertise Centre for Digital Media 9 | (http://www.edm.uhasselt.be), a research center of the Hasselt University 10 | (http://www.uhasselt.be). The library is based upon work done for 11 | my thesis at the School for Knowledge Technology (Belgium/The Netherlands). 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a 14 | copy of this software and associated documentation files (the "Software"), 15 | to deal in the Software without restriction, including without limitation 16 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 | and/or sell copies of the Software, and to permit persons to whom the 18 | Software is furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included 21 | in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 24 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 29 | IN THE SOFTWARE. 30 | 31 | */ 32 | 33 | /** 34 | * \file rtpsocketutil.h 35 | */ 36 | 37 | #ifndef RTPSOCKETUTIL_H 38 | 39 | #define RTPSOCKETUTIL_H 40 | 41 | #include "rtpconfig.h" 42 | #ifdef RTP_SOCKETTYPE_WINSOCK 43 | #include "rtptypes.h" 44 | #endif // RTP_SOCKETTYPE_WINSOCK 45 | 46 | namespace jrtplib 47 | { 48 | 49 | #ifndef RTP_SOCKETTYPE_WINSOCK 50 | 51 | typedef int SocketType; 52 | 53 | #else 54 | 55 | typedef SOCKET SocketType; 56 | 57 | #endif // RTP_SOCKETTYPE_WINSOCK 58 | 59 | } // end namespace 60 | 61 | #endif // RTPSOCKETUTIL_H 62 | -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/include/rtptypes.h: -------------------------------------------------------------------------------- 1 | #include "rtpconfig.h" 2 | 3 | 4 | #include 5 | #include 6 | -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/include/rtptypes_win.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is a part of JRTPLIB 4 | Copyright (c) 1999-2017 Jori Liesenborgs 5 | 6 | Contact: jori.liesenborgs@gmail.com 7 | 8 | This library was developed at the Expertise Centre for Digital Media 9 | (http://www.edm.uhasselt.be), a research center of the Hasselt University 10 | (http://www.uhasselt.be). The library is based upon work done for 11 | my thesis at the School for Knowledge Technology (Belgium/The Netherlands). 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a 14 | copy of this software and associated documentation files (the "Software"), 15 | to deal in the Software without restriction, including without limitation 16 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 | and/or sell copies of the Software, and to permit persons to whom the 18 | Software is furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included 21 | in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 24 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 29 | IN THE SOFTWARE. 30 | 31 | */ 32 | 33 | #ifndef RTPTYPES_WIN_H 34 | 35 | #define RTPTYPES_WIN_H 36 | 37 | #ifndef INTTYPES_DEFINED 38 | 39 | #define INTTYPES_DEFINED 40 | 41 | typedef char int8_t; 42 | typedef unsigned char uint8_t; 43 | typedef short int16_t; 44 | typedef unsigned short uint16_t; 45 | typedef int int32_t; 46 | typedef unsigned int uint32_t; 47 | typedef __int64 int64_t; 48 | typedef unsigned __int64 uint64_t; 49 | 50 | #endif // INTTYPES_DEFINED 51 | 52 | #endif // RTPTYPES_WIN_H 53 | 54 | -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/lib/libjrtp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtp/jrtplib_send_recv_h264/lib/libjrtp.a -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/lib/libjrtp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtp/jrtplib_send_recv_h264/lib/libjrtp.so -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/lib/libjrtp.so.3.11.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtp/jrtplib_send_recv_h264/lib/libjrtp.so.3.11.1 -------------------------------------------------------------------------------- /rtp/jrtplib_send_recv_h264/test.h264: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtp/jrtplib_send_recv_h264/test.h264 -------------------------------------------------------------------------------- /rtp/rtp_push_h264/Makefile: -------------------------------------------------------------------------------- 1 | APP = test 2 | LINK_OPTS = 3 | LINK_OBJ = rtp.o 4 | 5 | $(APP): $(LINK_OBJ) 6 | gcc -o $@ $(LINK_OBJ) $(LINK_OPTS) 7 | 8 | clean: 9 | rm -rf *o $(APP) 10 | -------------------------------------------------------------------------------- /rtp/rtp_push_h264/README.md: -------------------------------------------------------------------------------- 1 | # rtp_push_h264 2 | Push the h.264 data through the rtp protocol, It can be played in the VLC player/Mplayer 3 | -------------------------------------------------------------------------------- /rtp/rtp_push_h264/h264/test.h264: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtp/rtp_push_h264/h264/test.h264 -------------------------------------------------------------------------------- /rtp/rtp_push_h264/rtp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtp/rtp_push_h264/rtp.o -------------------------------------------------------------------------------- /rtp/rtp_push_h264/sdp/mplayer.sdp: -------------------------------------------------------------------------------- 1 | m=video 6666 RTP/AVP 96 2 | a=rtpmap:96 H264/90000 3 | c=IN IP4 192.168.0.108 4 | -------------------------------------------------------------------------------- /rtp/rtp_push_h264/sdp/vlc.sdp: -------------------------------------------------------------------------------- 1 | m=video 6666 RTP/AVP 96 2 | a=rtpmap:96 H264/90000 3 | a=framerate:25 4 | a=packetization-mode=1 5 | c=IN IP4 192.168.0.108 6 | -------------------------------------------------------------------------------- /rtp/rtp_push_h264/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtp/rtp_push_h264/test -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/H264VideoStreamer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtsp/RaspPiFromUsb_Yuyv_H264/H264VideoStreamer -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/Makefile: -------------------------------------------------------------------------------- 1 | INCLUDES = -I./include/live555/usageEnvironment/ -I./include/live555/groupsock/ \ 2 | -I./include/live555/liveMedia/ -I./include/live555/basicUsageEnvironment \ 3 | -I./include/x264 -I./include/encoder -I./lib/artosyn_usb_lib/ 4 | LIVE555_LIBS = ./lib/livelib/libliveMedia.a ./lib/livelib/libgroupsock.a \ 5 | ./lib/livelib/libBasicUsageEnvironment.a ./lib/livelib/libUsageEnvironment.a 6 | X264_LIBS = ./lib/x264lib/libx264.a ./lib/x264lib/libx264.so.148 7 | #X264_LIBS = ./lib/x264lib/libx264.a 8 | 9 | LIBS = $(LIVE555_LIBS) $(X264_LIBS) 10 | 11 | COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -g 12 | C = c 13 | C_COMPILER = cc 14 | C_FLAGS = $(COMPILE_OPTS) $(CPPFLAGS) $(CFLAGS) 15 | CPP = cpp 16 | CPLUSPLUS_COMPILER = c++ 17 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 $(CPPFLAGS) $(CXXFLAGS) 18 | OBJ = o 19 | LINK = c++ -o 20 | LINK_OPTS = -ldl -lm -lpthread -ldl -g 21 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 22 | #LINK_OBJ = H264FramedLiveSource.o H264VideoStreamer.o lib/artosyn_usb_lib/libar8020.o 23 | LINK_OBJ = testOnDemandRTSPServer.o lib/artosyn_usb_lib/libar8020.o 24 | 25 | APP = live555_h264_app 26 | 27 | .$(C).$(OBJ): 28 | $(C_COMPILER) -c $(C_FLAGS) $< 29 | .$(CPP).$(OBJ): 30 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $< 31 | 32 | $(APP): $(LINK_OBJ) 33 | $(LINK)$@ $(LINK_OBJ) $(LIBS) $(CONSOLE_LINK_OPTS) 34 | 35 | clean: 36 | -rm -rf *.$(OBJ) $(APP) core *.core *~ include/*~ 37 | 38 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/README.md: -------------------------------------------------------------------------------- 1 | # live555_rtsp_live_v4l2 2 | V4l2 capture camera data, x264 encoded into h264, and then through PIPE to achieve live555 RTSP live 3 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/encoder/H264FramedLiveSource.hh: -------------------------------------------------------------------------------- 1 | /*============================================================================= 2 | * # FileName: H264FramedLiveSource.hh 3 | * # Desc: 4 | * # 5 | * # Author: licaibiao 6 | * # Version: 7 | * # LastChange: 2017-02-24 8 | * =============================================================================*/ 9 | #ifndef _H264FRAMEDLIVESOURCE_HH 10 | #define _H264FRAMEDLIVESOURCE_HH 11 | #include 12 | #include 13 | #include "encoder_define.hh" 14 | 15 | class Device 16 | { 17 | public: 18 | void init_mmap(void); 19 | void init_camera(void); 20 | void init_encoder(void); 21 | void open_camera(void); 22 | 23 | void close_camera(void); 24 | void read_one_frame(void); 25 | void getnextframe(void); 26 | void start_capture(void); 27 | void stop_capture(void); 28 | void close_encoder(); 29 | int camera_able_read(void); 30 | void compress_begin(Encoder *en, int width, int height); 31 | int compress_frame(Encoder *en, int type, char *in, int len, char *out); 32 | void compress_end(Encoder *en); 33 | void Init(); 34 | void intoloop(); 35 | void GetNextFrame(); 36 | void Destory(); 37 | public: 38 | int fd; 39 | FILE *save_fd; 40 | int n_nal; 41 | int frame_len; 42 | char *h264_buf; 43 | unsigned int n_buffer; 44 | Encoder en; 45 | FILE *h264_fp; 46 | BUFTYPE *usr_buf; 47 | FILE *pipe_fd; 48 | }; 49 | #endif 50 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/encoder/encoder_define.hh: -------------------------------------------------------------------------------- 1 | /*============================================================================= 2 | * # FileName: 3 | * # Desc: 4 | * # Author: licaibiao 5 | * # Version: 6 | * # LastChange: 2017-02-24 7 | * =============================================================================*/ 8 | #ifndef _ENCODER_DEFINE_HH 9 | #define _ENCODER_DEFINE_HH 10 | 11 | 12 | extern "C" { 13 | #include 14 | //#include 15 | #include 16 | 17 | typedef struct 18 | { 19 | x264_param_t *param; 20 | x264_t *handle; 21 | x264_picture_t *picture; 22 | x264_nal_t *nal; 23 | } Encoder; 24 | 25 | typedef struct 26 | { 27 | char *start; 28 | int length; 29 | }BUFTYPE; 30 | 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/basicUsageEnvironment/BasicUsageEnvironment_version.hh: -------------------------------------------------------------------------------- 1 | // Version information for the "BasicUsageEnvironment" library 2 | // Copyright (c) 1996-2017 Live Networks, Inc. All rights reserved. 3 | 4 | #ifndef _BASICUSAGEENVIRONMENT_VERSION_HH 5 | #define _BASICUSAGEENVIRONMENT_VERSION_HH 6 | 7 | #define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_STRING "2017.01.26" 8 | #define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_INT 1485388800 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/basicUsageEnvironment/HandlerSet.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 | // Copyright (c) 1996-2017 Live Networks, Inc. All rights reserved. 17 | // Basic Usage Environment: for a simple, non-scripted, console application 18 | // C++ header 19 | 20 | #ifndef _HANDLER_SET_HH 21 | #define _HANDLER_SET_HH 22 | 23 | #ifndef _BOOLEAN_HH 24 | #include "Boolean.hh" 25 | #endif 26 | 27 | ////////// HandlerSet (etc.) definition ////////// 28 | 29 | class HandlerDescriptor { 30 | HandlerDescriptor(HandlerDescriptor* nextHandler); 31 | virtual ~HandlerDescriptor(); 32 | 33 | public: 34 | int socketNum; 35 | int conditionSet; 36 | TaskScheduler::BackgroundHandlerProc* handlerProc; 37 | void* clientData; 38 | 39 | private: 40 | // Descriptors are linked together in a doubly-linked list: 41 | friend class HandlerSet; 42 | friend class HandlerIterator; 43 | HandlerDescriptor* fNextHandler; 44 | HandlerDescriptor* fPrevHandler; 45 | }; 46 | 47 | class HandlerSet { 48 | public: 49 | HandlerSet(); 50 | virtual ~HandlerSet(); 51 | 52 | void assignHandler(int socketNum, int conditionSet, TaskScheduler::BackgroundHandlerProc* handlerProc, void* clientData); 53 | void clearHandler(int socketNum); 54 | void moveHandler(int oldSocketNum, int newSocketNum); 55 | 56 | private: 57 | HandlerDescriptor* lookupHandler(int socketNum); 58 | 59 | private: 60 | friend class HandlerIterator; 61 | HandlerDescriptor fHandlers; 62 | }; 63 | 64 | class HandlerIterator { 65 | public: 66 | HandlerIterator(HandlerSet& handlerSet); 67 | virtual ~HandlerIterator(); 68 | 69 | HandlerDescriptor* next(); // returns NULL if none 70 | void reset(); 71 | 72 | private: 73 | HandlerSet& fOurSet; 74 | HandlerDescriptor* fNextPtr; 75 | }; 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/groupsock/GroupEId.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 | // "multikit" Multicast Application Shell 17 | // Copyright (c) 1996-2017, Live Networks, Inc. All rights reserved 18 | // "Group Endpoint Id" 19 | // C++ header 20 | 21 | #ifndef _GROUPEID_HH 22 | #define _GROUPEID_HH 23 | 24 | #ifndef _BOOLEAN_HH 25 | #include "Boolean.hh" 26 | #endif 27 | 28 | #ifndef _NET_ADDRESS_HH 29 | #include "NetAddress.hh" 30 | #endif 31 | 32 | class GroupEId { 33 | public: 34 | GroupEId(struct in_addr const& groupAddr, 35 | portNumBits portNum, u_int8_t ttl); 36 | // used for a 'source-independent multicast' group 37 | GroupEId(struct in_addr const& groupAddr, 38 | struct in_addr const& sourceFilterAddr, 39 | portNumBits portNum); 40 | // used for a 'source-specific multicast' group 41 | 42 | struct in_addr const& groupAddress() const { return fGroupAddress; } 43 | struct in_addr const& sourceFilterAddress() const { return fSourceFilterAddress; } 44 | 45 | Boolean isSSM() const; 46 | 47 | portNumBits portNum() const { return fPortNum; } 48 | 49 | u_int8_t ttl() const { return fTTL; } 50 | 51 | private: 52 | void init(struct in_addr const& groupAddr, 53 | struct in_addr const& sourceFilterAddr, 54 | portNumBits portNum, 55 | u_int8_t ttl); 56 | 57 | private: 58 | struct in_addr fGroupAddress; 59 | struct in_addr fSourceFilterAddress; 60 | portNumBits fPortNum; // in network byte order 61 | u_int8_t fTTL; 62 | }; 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/groupsock/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/groupsock/groupsock_version.hh: -------------------------------------------------------------------------------- 1 | // Version information for the "groupsock" library 2 | // Copyright (c) 1996-2017 Live Networks, Inc. All rights reserved. 3 | 4 | #ifndef _GROUPSOCK_VERSION_HH 5 | #define _GROUPSOCK_VERSION_HH 6 | 7 | #define GROUPSOCK_LIBRARY_VERSION_STRING "2017.01.26" 8 | #define GROUPSOCK_LIBRARY_VERSION_INT 1485388800 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/AC3AudioFileServerMediaSubsession.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-2017 Live Networks, Inc. All rights reserved. 18 | // A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s 19 | // on demand, from an AC3 audio file. 20 | // C++ header 21 | 22 | #ifndef _AC3_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH 23 | #define _AC3_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH 24 | 25 | #ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH 26 | #include "FileServerMediaSubsession.hh" 27 | #endif 28 | 29 | class AC3AudioFileServerMediaSubsession: public FileServerMediaSubsession{ 30 | public: 31 | static AC3AudioFileServerMediaSubsession* 32 | createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); 33 | 34 | private: 35 | AC3AudioFileServerMediaSubsession(UsageEnvironment& env, 36 | char const* fileName, Boolean reuseFirstSource); 37 | // called only by createNew(); 38 | virtual ~AC3AudioFileServerMediaSubsession(); 39 | 40 | private: // redefined virtual functions 41 | virtual FramedSource* createNewStreamSource(unsigned clientSessionId, 42 | unsigned& estBitrate); 43 | virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, 44 | unsigned char rtpPayloadTypeIfDynamic, 45 | FramedSource* inputSource); 46 | }; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/AC3AudioRTPSink.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-2017 Live Networks, Inc. All rights reserved. 18 | // RTP sink for AC3 audio 19 | // C++ header 20 | 21 | #ifndef _AC3_AUDIO_RTP_SINK_HH 22 | #define _AC3_AUDIO_RTP_SINK_HH 23 | 24 | #ifndef _AUDIO_RTP_SINK_HH 25 | #include "AudioRTPSink.hh" 26 | #endif 27 | 28 | class AC3AudioRTPSink: public AudioRTPSink { 29 | public: 30 | static AC3AudioRTPSink* createNew(UsageEnvironment& env, 31 | Groupsock* RTPgs, 32 | u_int8_t rtpPayloadFormat, 33 | u_int32_t rtpTimestampFrequency); 34 | 35 | protected: 36 | AC3AudioRTPSink(UsageEnvironment& env, Groupsock* RTPgs, 37 | u_int8_t rtpPayloadFormat, 38 | u_int32_t rtpTimestampFrequency); 39 | // called only by createNew() 40 | 41 | virtual ~AC3AudioRTPSink(); 42 | 43 | private: // redefined virtual functions: 44 | virtual Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, 45 | unsigned numBytesInFrame) const; 46 | virtual void doSpecialFrameHandling(unsigned fragmentationOffset, 47 | unsigned char* frameStart, 48 | unsigned numBytesInFrame, 49 | struct timeval framePresentationTime, 50 | unsigned numRemainingBytes); 51 | virtual unsigned specialHeaderSize() const; 52 | 53 | private: 54 | unsigned char fTotNumFragmentsUsed; // used only if a frame gets fragmented across multiple packets 55 | }; 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/AC3AudioRTPSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // AC3 Audio RTP Sources 19 | // C++ header 20 | 21 | #ifndef _AC3_AUDIO_RTP_SOURCE_HH 22 | #define _AC3_AUDIO_RTP_SOURCE_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH 25 | #include "MultiFramedRTPSource.hh" 26 | #endif 27 | 28 | class AC3AudioRTPSource: public MultiFramedRTPSource { 29 | public: 30 | static AC3AudioRTPSource* 31 | createNew(UsageEnvironment& env, Groupsock* RTPgs, 32 | unsigned char rtpPayloadFormat, 33 | unsigned rtpTimestampFrequency); 34 | 35 | protected: 36 | virtual ~AC3AudioRTPSource(); 37 | 38 | private: 39 | AC3AudioRTPSource(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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/ADTSAudioFileServerMediaSubsession.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-2017 Live Networks, Inc. All rights reserved. 18 | // A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s 19 | // on demand, from an AAC audio file in ADTS format 20 | // C++ header 21 | 22 | #ifndef _ADTS_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH 23 | #define _ADTS_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH 24 | 25 | #ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH 26 | #include "FileServerMediaSubsession.hh" 27 | #endif 28 | 29 | class ADTSAudioFileServerMediaSubsession: public FileServerMediaSubsession{ 30 | public: 31 | static ADTSAudioFileServerMediaSubsession* 32 | createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); 33 | 34 | protected: 35 | ADTSAudioFileServerMediaSubsession(UsageEnvironment& env, 36 | char const* fileName, Boolean reuseFirstSource); 37 | // called only by createNew(); 38 | virtual ~ADTSAudioFileServerMediaSubsession(); 39 | 40 | protected: // redefined virtual functions 41 | virtual FramedSource* createNewStreamSource(unsigned clientSessionId, 42 | unsigned& estBitrate); 43 | virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, 44 | unsigned char rtpPayloadTypeIfDynamic, 45 | FramedSource* inputSource); 46 | }; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/ADTSAudioFileSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // A source object for AAC audio files in ADTS format 19 | // C++ header 20 | 21 | #ifndef _ADTS_AUDIO_FILE_SOURCE_HH 22 | #define _ADTS_AUDIO_FILE_SOURCE_HH 23 | 24 | #ifndef _FRAMED_FILE_SOURCE_HH 25 | #include "FramedFileSource.hh" 26 | #endif 27 | 28 | class ADTSAudioFileSource: public FramedFileSource { 29 | public: 30 | static ADTSAudioFileSource* createNew(UsageEnvironment& env, 31 | char const* fileName); 32 | 33 | unsigned samplingFrequency() const { return fSamplingFrequency; } 34 | unsigned numChannels() const { return fNumChannels; } 35 | char const* configStr() const { return fConfigStr; } 36 | // returns the 'AudioSpecificConfig' for this stream (in ASCII form) 37 | 38 | private: 39 | ADTSAudioFileSource(UsageEnvironment& env, FILE* fid, u_int8_t profile, 40 | u_int8_t samplingFrequencyIndex, u_int8_t channelConfiguration); 41 | // called only by createNew() 42 | 43 | virtual ~ADTSAudioFileSource(); 44 | 45 | private: 46 | // redefined virtual functions: 47 | virtual void doGetNextFrame(); 48 | 49 | private: 50 | unsigned fSamplingFrequency; 51 | unsigned fNumChannels; 52 | unsigned fuSecsPerFrame; 53 | char fConfigStr[5]; 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/AMRAudioFileServerMediaSubsession.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-2017 Live Networks, Inc. All rights reserved. 18 | // A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s 19 | // on demand, from an AMR audio file. 20 | // C++ header 21 | 22 | #ifndef _AMR_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH 23 | #define _AMR_AUDIO_FILE_SERVER_MEDIA_SUBSESSION_HH 24 | 25 | #ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH 26 | #include "FileServerMediaSubsession.hh" 27 | #endif 28 | 29 | class AMRAudioFileServerMediaSubsession: public FileServerMediaSubsession{ 30 | public: 31 | static AMRAudioFileServerMediaSubsession* 32 | createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); 33 | 34 | private: 35 | AMRAudioFileServerMediaSubsession(UsageEnvironment& env, 36 | char const* fileName, Boolean reuseFirstSource); 37 | // called only by createNew(); 38 | virtual ~AMRAudioFileServerMediaSubsession(); 39 | 40 | private: // redefined virtual functions 41 | virtual FramedSource* createNewStreamSource(unsigned clientSessionId, 42 | unsigned& estBitrate); 43 | virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, 44 | unsigned char rtpPayloadTypeIfDynamic, 45 | FramedSource* inputSource); 46 | }; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/AMRAudioFileSink.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-2017 Live Networks, Inc. All rights reserved. 18 | // AMR Audio File Sinks 19 | // C++ header 20 | 21 | #ifndef _AMR_AUDIO_FILE_SINK_HH 22 | #define _AMR_AUDIO_FILE_SINK_HH 23 | 24 | #ifndef _FILE_SINK_HH 25 | #include "FileSink.hh" 26 | #endif 27 | 28 | class AMRAudioFileSink: public FileSink { 29 | public: 30 | static AMRAudioFileSink* createNew(UsageEnvironment& env, char const* fileName, 31 | unsigned bufferSize = 10000, 32 | Boolean oneFilePerFrame = False); 33 | // (See "FileSink.hh" for a description of these parameters.) 34 | 35 | protected: 36 | AMRAudioFileSink(UsageEnvironment& env, FILE* fid, unsigned bufferSize, 37 | char const* perFrameFileNamePrefix); 38 | // called only by createNew() 39 | virtual ~AMRAudioFileSink(); 40 | 41 | protected: // redefined virtual functions: 42 | virtual Boolean sourceIsCompatibleWithUs(MediaSource& source); 43 | virtual void afterGettingFrame(unsigned frameSize, 44 | unsigned numTruncatedBytes, 45 | struct timeval presentationTime); 46 | 47 | protected: 48 | Boolean fHaveWrittenHeader; 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/AMRAudioRTPSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // AMR Audio RTP Sources (RFC 4867) 19 | // C++ header 20 | 21 | #ifndef _AMR_AUDIO_RTP_SOURCE_HH 22 | #define _AMR_AUDIO_RTP_SOURCE_HH 23 | 24 | #ifndef _RTP_SOURCE_HH 25 | #include "RTPSource.hh" 26 | #endif 27 | #ifndef _AMR_AUDIO_SOURCE_HH 28 | #include "AMRAudioSource.hh" 29 | #endif 30 | 31 | class AMRAudioRTPSource { 32 | public: 33 | static AMRAudioSource* createNew(UsageEnvironment& env, 34 | Groupsock* RTPgs, 35 | RTPSource*& resultRTPSource, 36 | unsigned char rtpPayloadFormat, 37 | Boolean isWideband = False, 38 | unsigned numChannels = 1, 39 | Boolean isOctetAligned = True, 40 | unsigned interleaving = 0, 41 | // relevant only if "isOctetAligned" 42 | // The maximum # of frame-blocks in a group 43 | // 0 means: no interleaving 44 | Boolean robustSortingOrder = False, 45 | // relevant only if "isOctetAligned" 46 | Boolean CRCsArePresent = False 47 | // relevant only if "isOctetAligned" 48 | ); 49 | // This returns a source to read from, but "resultRTPSource" will 50 | // point to RTP-related state. 51 | }; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/BasicUDPSink.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-2017 Live Networks, Inc. All rights reserved. 18 | // A simple UDP sink (i.e., without RTP or other headers added); one frame per packet 19 | // C++ header 20 | 21 | #ifndef _BASIC_UDP_SINK_HH 22 | #define _BASIC_UDP_SINK_HH 23 | 24 | #ifndef _MEDIA_SINK_HH 25 | #include "MediaSink.hh" 26 | #endif 27 | #ifndef _GROUPSOCK_HH 28 | #include 29 | #endif 30 | 31 | class BasicUDPSink: public MediaSink { 32 | public: 33 | static BasicUDPSink* createNew(UsageEnvironment& env, Groupsock* gs, 34 | unsigned maxPayloadSize = 1450); 35 | protected: 36 | BasicUDPSink(UsageEnvironment& env, Groupsock* gs, unsigned maxPayloadSize); 37 | // called only by createNew() 38 | virtual ~BasicUDPSink(); 39 | 40 | private: // redefined virtual functions: 41 | virtual Boolean continuePlaying(); 42 | 43 | private: 44 | void continuePlaying1(); 45 | 46 | static void afterGettingFrame(void* clientData, unsigned frameSize, 47 | unsigned numTruncatedBytes, 48 | struct timeval presentationTime, 49 | unsigned durationInMicroseconds); 50 | void afterGettingFrame1(unsigned frameSize, unsigned numTruncatedBytes, 51 | unsigned durationInMicroseconds); 52 | 53 | static void sendNext(void* firstArg); 54 | 55 | private: 56 | Groupsock* fGS; 57 | unsigned fMaxPayloadSize; 58 | unsigned char* fOutputBuffer; 59 | struct timeval fNextSendTime; 60 | }; 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/BasicUDPSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // A simple UDP source, where every UDP payload is a complete frame 19 | // C++ header 20 | 21 | #ifndef _BASIC_UDP_SOURCE_HH 22 | #define _BASIC_UDP_SOURCE_HH 23 | 24 | #ifndef _FRAMED_SOURCE_HH 25 | #include "FramedSource.hh" 26 | #endif 27 | #ifndef _GROUPSOCK_HH 28 | #include "Groupsock.hh" 29 | #endif 30 | 31 | class BasicUDPSource: public FramedSource { 32 | public: 33 | static BasicUDPSource* createNew(UsageEnvironment& env, Groupsock* inputGS); 34 | 35 | virtual ~BasicUDPSource(); 36 | 37 | Groupsock* gs() const { return fInputGS; } 38 | 39 | private: 40 | BasicUDPSource(UsageEnvironment& env, Groupsock* inputGS); 41 | // called only by createNew() 42 | 43 | static void incomingPacketHandler(BasicUDPSource* source, int mask); 44 | void incomingPacketHandler1(); 45 | 46 | private: // redefined virtual functions: 47 | virtual void doGetNextFrame(); 48 | virtual void doStopGettingFrames(); 49 | 50 | private: 51 | Groupsock* fInputGS; 52 | Boolean fHaveStartedReading; 53 | }; 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/BitVector.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-2017 Live Networks, Inc. All rights reserved. 18 | // Bit Vector data structure 19 | // C++ header 20 | 21 | #ifndef _BIT_VECTOR_HH 22 | #define _BIT_VECTOR_HH 23 | 24 | #ifndef _BOOLEAN_HH 25 | #include "Boolean.hh" 26 | #endif 27 | 28 | class BitVector { 29 | public: 30 | BitVector(unsigned char* baseBytePtr, 31 | unsigned baseBitOffset, 32 | unsigned totNumBits); 33 | 34 | void setup(unsigned char* baseBytePtr, 35 | unsigned baseBitOffset, 36 | unsigned totNumBits); 37 | 38 | void putBits(unsigned from, unsigned numBits); // "numBits" <= 32 39 | void put1Bit(unsigned bit); 40 | 41 | unsigned getBits(unsigned numBits); // "numBits" <= 32 42 | unsigned get1Bit(); 43 | Boolean get1BitBoolean() { return get1Bit() != 0; } 44 | 45 | void skipBits(unsigned numBits); 46 | 47 | unsigned curBitIndex() const { return fCurBitIndex; } 48 | unsigned totNumBits() const { return fTotNumBits; } 49 | unsigned numBitsRemaining() const { return fTotNumBits - fCurBitIndex; } 50 | 51 | unsigned get_expGolomb(); 52 | // Returns the value of the next bits, assuming that they were encoded using an exponential-Golomb code of order 0 53 | 54 | private: 55 | unsigned char* fBaseBytePtr; 56 | unsigned fBaseBitOffset; 57 | unsigned fTotNumBits; 58 | unsigned fCurBitIndex; 59 | }; 60 | 61 | // A general bit copy operation: 62 | void shiftBits(unsigned char* toBasePtr, unsigned toBitOffset, 63 | unsigned char const* fromBasePtr, unsigned fromBitOffset, 64 | unsigned numBits); 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/DVVideoFileServerMediaSubsession.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-2017 Live Networks, Inc. All rights reserved. 18 | // A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s 19 | // on demand, from a DV video file. 20 | // C++ header 21 | 22 | #ifndef _DV_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH 23 | #define _DV_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH 24 | 25 | #ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH 26 | #include "FileServerMediaSubsession.hh" 27 | #endif 28 | 29 | class DVVideoFileServerMediaSubsession: public FileServerMediaSubsession{ 30 | public: 31 | static DVVideoFileServerMediaSubsession* 32 | createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); 33 | 34 | private: 35 | DVVideoFileServerMediaSubsession(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); 36 | // called only by createNew(); 37 | virtual ~DVVideoFileServerMediaSubsession(); 38 | 39 | private: // redefined virtual functions 40 | virtual char const* getAuxSDPLine(RTPSink* rtpSink, FramedSource* inputSource); 41 | virtual void seekStreamSource(FramedSource* inputSource, double& seekNPT, double streamDuration, u_int64_t& numBytes); 42 | virtual void setStreamSourceDuration(FramedSource* inputSource, double streamDuration, u_int64_t& numBytes); 43 | virtual FramedSource* createNewStreamSource(unsigned clientSessionId, unsigned& estBitrate); 44 | virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource* inputSource); 45 | virtual float duration() const; 46 | 47 | private: 48 | float fFileDuration; // in seconds 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/DVVideoRTPSink.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-2017 Live Networks, Inc. All rights reserved. 18 | // RTP sink for DV video (RFC 3189) 19 | // (Thanks to Ben Hutchings for prototyping this.) 20 | // C++ header 21 | 22 | #ifndef _DV_VIDEO_RTP_SINK_HH 23 | #define _DV_VIDEO_RTP_SINK_HH 24 | 25 | #ifndef _VIDEO_RTP_SINK_HH 26 | #include "VideoRTPSink.hh" 27 | #endif 28 | #ifndef _DV_VIDEO_STREAM_FRAMER_HH 29 | #include "DVVideoStreamFramer.hh" 30 | #endif 31 | 32 | class DVVideoRTPSink: public VideoRTPSink { 33 | public: 34 | static DVVideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); 35 | char const* auxSDPLineFromFramer(DVVideoStreamFramer* framerSource); 36 | 37 | protected: 38 | DVVideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); 39 | // called only by createNew() 40 | 41 | virtual ~DVVideoRTPSink(); 42 | 43 | private: // redefined virtual functions: 44 | virtual Boolean sourceIsCompatibleWithUs(MediaSource& source); 45 | virtual void doSpecialFrameHandling(unsigned fragmentationOffset, 46 | unsigned char* frameStart, 47 | unsigned numBytesInFrame, 48 | struct timeval framePresentationTime, 49 | unsigned numRemainingBytes); 50 | virtual unsigned computeOverflowForNewFrame(unsigned newFrameSize) const; 51 | virtual char const* auxSDPLine(); 52 | 53 | private: 54 | char* fFmtpSDPLine; 55 | }; 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/H261VideoRTPSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // H.261 Video RTP Sources 19 | // C++ header 20 | 21 | #ifndef _H261_VIDEO_RTP_SOURCE_HH 22 | #define _H261_VIDEO_RTP_SOURCE_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH 25 | #include "MultiFramedRTPSource.hh" 26 | #endif 27 | 28 | class H261VideoRTPSource: public MultiFramedRTPSource { 29 | public: 30 | static H261VideoRTPSource* 31 | createNew(UsageEnvironment& env, Groupsock* RTPgs, 32 | unsigned char rtpPayloadFormat = 31, 33 | unsigned rtpTimestampFrequency = 90000); 34 | 35 | u_int32_t lastSpecialHeader() const {return fLastSpecialHeader;} 36 | 37 | protected: 38 | virtual ~H261VideoRTPSource(); 39 | 40 | private: 41 | H261VideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, 42 | unsigned char rtpPayloadFormat, 43 | unsigned rtpTimestampFrequency); 44 | // called only by createNew() 45 | 46 | private: 47 | // redefined virtual functions: 48 | virtual Boolean processSpecialHeader(BufferedPacket* packet, 49 | unsigned& resultSpecialHeaderSize); 50 | virtual char const* MIMEtype() const; 51 | 52 | private: 53 | u_int32_t fLastSpecialHeader; 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/H263plusVideoFileServerMediaSubsession.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-2017 Live Networks, Inc. All rights reserved. 18 | // A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s 19 | // on demand, from a H.263 video file. 20 | // C++ header 21 | 22 | #ifndef _H263PLUS_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH 23 | #define _H263PLUS_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH 24 | 25 | #ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH 26 | #include "FileServerMediaSubsession.hh" 27 | #endif 28 | 29 | class H263plusVideoFileServerMediaSubsession: public FileServerMediaSubsession{ 30 | public: 31 | static H263plusVideoFileServerMediaSubsession* 32 | createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource); 33 | 34 | private: 35 | H263plusVideoFileServerMediaSubsession(UsageEnvironment& env, 36 | char const* fileName, Boolean reuseFirstSource); 37 | // called only by createNew(); 38 | virtual ~H263plusVideoFileServerMediaSubsession(); 39 | 40 | private: // redefined virtual functions 41 | virtual FramedSource* createNewStreamSource(unsigned clientSessionId, 42 | unsigned& estBitrate); 43 | virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, 44 | unsigned char rtpPayloadTypeIfDynamic, 45 | FramedSource* inputSource); 46 | }; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/H263plusVideoRTPSink.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-2017 Live Networks, Inc. All rights reserved. 18 | // RTP sink for H.263+ video (RFC 4629) 19 | // C++ header 20 | 21 | #ifndef _H263_PLUS_VIDEO_RTP_SINK_HH 22 | #define _H263_PLUS_VIDEO_RTP_SINK_HH 23 | 24 | #ifndef _VIDEO_RTP_SINK_HH 25 | #include "VideoRTPSink.hh" 26 | #endif 27 | 28 | class H263plusVideoRTPSink: public VideoRTPSink { 29 | public: 30 | static H263plusVideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs, 31 | unsigned char rtpPayloadFormat, 32 | u_int32_t rtpTimestampFrequency = 90000); 33 | 34 | protected: 35 | H263plusVideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, 36 | unsigned char rtpPayloadFormat, 37 | u_int32_t rtpTimestampFrequency); 38 | // called only by createNew() 39 | 40 | virtual ~H263plusVideoRTPSink(); 41 | 42 | private: // redefined virtual functions: 43 | virtual void doSpecialFrameHandling(unsigned fragmentationOffset, 44 | unsigned char* frameStart, 45 | unsigned numBytesInFrame, 46 | struct timeval framePresentationTime, 47 | unsigned numRemainingBytes); 48 | virtual 49 | Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, 50 | unsigned numBytesInFrame) const; 51 | virtual unsigned specialHeaderSize() const; 52 | }; 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/H263plusVideoRTPSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // H.263+ Video RTP Sources 19 | // C++ header 20 | 21 | #ifndef _H263_PLUS_VIDEO_RTP_SOURCE_HH 22 | #define _H263_PLUS_VIDEO_RTP_SOURCE_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH 25 | #include "MultiFramedRTPSource.hh" 26 | #endif 27 | 28 | #define SPECIAL_HEADER_BUFFER_SIZE 1000 29 | 30 | class H263plusVideoRTPSource: public MultiFramedRTPSource { 31 | public: 32 | static H263plusVideoRTPSource* 33 | createNew(UsageEnvironment& env, Groupsock* RTPgs, 34 | unsigned char rtpPayloadFormat, 35 | unsigned rtpTimestampFrequency = 90000); 36 | 37 | // A data structure that stores copies of the special header bytes 38 | // from the most recent frame's RTP packets: 39 | unsigned char fNumSpecialHeaders; 40 | unsigned fSpecialHeaderBytesLength; 41 | unsigned char fSpecialHeaderBytes[SPECIAL_HEADER_BUFFER_SIZE]; 42 | unsigned fPacketSizes[256]; 43 | 44 | protected: 45 | virtual ~H263plusVideoRTPSource(); 46 | 47 | private: 48 | H263plusVideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, 49 | unsigned char rtpPayloadFormat, 50 | unsigned rtpTimestampFrequency); 51 | // called only by createNew() 52 | 53 | private: 54 | // redefined virtual functions: 55 | virtual Boolean processSpecialHeader(BufferedPacket* packet, 56 | unsigned& resultSpecialHeaderSize); 57 | virtual char const* MIMEtype() const; 58 | }; 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/H263plusVideoStreamFramer.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-2017 Live Networks, Inc. All rights reserved. 18 | // A filter that breaks up an H263 video elementary stream into frames. 19 | // Author Benhard Feiten 20 | 21 | #ifndef _H263PLUS_VIDEO_STREAM_FRAMER_HH 22 | #define _H263PLUS_VIDEO_STREAM_FRAMER_HH 23 | 24 | #ifndef _FRAMED_FILTER_HH 25 | #include "FramedFilter.hh" 26 | #endif 27 | 28 | 29 | class H263plusVideoStreamFramer: public FramedFilter { 30 | public: 31 | 32 | static H263plusVideoStreamFramer* createNew(UsageEnvironment& env, FramedSource* inputSource); 33 | 34 | Boolean& pictureEndMarker() { return fPictureEndMarker; } // a hack for implementing the RTP 'M' bit 35 | 36 | protected: 37 | // Constructor called only by createNew(), or by subclass constructors 38 | H263plusVideoStreamFramer(UsageEnvironment& env, 39 | FramedSource* inputSource, 40 | Boolean createParser = True); 41 | virtual ~H263plusVideoStreamFramer(); 42 | 43 | 44 | public: 45 | static void continueReadProcessing(void* clientData, 46 | unsigned char* ptr, unsigned size, 47 | struct timeval presentationTime); 48 | void continueReadProcessing(); 49 | 50 | private: 51 | virtual void doGetNextFrame(); 52 | virtual Boolean isH263plusVideoStreamFramer() const; 53 | 54 | protected: 55 | double fFrameRate; 56 | unsigned fPictureCount; // hack used to implement doGetNextFrame() ?? 57 | Boolean fPictureEndMarker; 58 | 59 | private: 60 | class H263plusVideoStreamParser* fParser; 61 | struct timeval fPresentationTimeBase; 62 | }; 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/H264VideoFileSink.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-2017 Live Networks, Inc. All rights reserved. 18 | // H.264 Video File Sinks 19 | // C++ header 20 | 21 | #ifndef _H264_VIDEO_FILE_SINK_HH 22 | #define _H264_VIDEO_FILE_SINK_HH 23 | 24 | #ifndef _H264_OR_5_VIDEO_FILE_SINK_HH 25 | #include "H264or5VideoFileSink.hh" 26 | #endif 27 | 28 | class H264VideoFileSink: public H264or5VideoFileSink { 29 | public: 30 | static H264VideoFileSink* createNew(UsageEnvironment& env, char const* fileName, 31 | char const* sPropParameterSetsStr = NULL, 32 | // "sPropParameterSetsStr" is an optional 'SDP format' string 33 | // (comma-separated Base64-encoded) representing SPS and/or PPS NAL-units 34 | // to prepend to the output 35 | unsigned bufferSize = 100000, 36 | Boolean oneFilePerFrame = False); 37 | // See "FileSink.hh" for a description of these parameters. 38 | 39 | protected: 40 | H264VideoFileSink(UsageEnvironment& env, FILE* fid, 41 | char const* sPropParameterSetsStr, 42 | unsigned bufferSize, char const* perFrameFileNamePrefix); 43 | // called only by createNew() 44 | virtual ~H264VideoFileSink(); 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/H264VideoStreamDiscreteFramer.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-2017 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 | // C++ header 23 | 24 | #ifndef _H264_VIDEO_STREAM_DISCRETE_FRAMER_HH 25 | #define _H264_VIDEO_STREAM_DISCRETE_FRAMER_HH 26 | 27 | #ifndef _H264_OR_5_VIDEO_STREAM_DISCRETE_FRAMER_HH 28 | #include "H264or5VideoStreamDiscreteFramer.hh" 29 | #endif 30 | 31 | class H264VideoStreamDiscreteFramer: public H264or5VideoStreamDiscreteFramer { 32 | public: 33 | static H264VideoStreamDiscreteFramer* 34 | createNew(UsageEnvironment& env, FramedSource* inputSource); 35 | 36 | protected: 37 | H264VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource); 38 | // called only by createNew() 39 | virtual ~H264VideoStreamDiscreteFramer(); 40 | 41 | private: 42 | // redefined virtual functions: 43 | virtual Boolean isH264VideoStreamFramer() const; 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | Boolean insertAccessUnitDelimiters = False); 33 | 34 | protected: 35 | H264VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, 36 | Boolean createParser, 37 | Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters); 38 | // called only by "createNew()" 39 | virtual ~H264VideoStreamFramer(); 40 | 41 | // redefined virtual functions: 42 | virtual Boolean isH264VideoStreamFramer() const; 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/H264or5VideoRTPSink.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-2017 Live Networks, Inc. All rights reserved. 18 | // RTP sink for H.264 or H.265 video 19 | // C++ header 20 | 21 | #ifndef _H264_OR_5_VIDEO_RTP_SINK_HH 22 | #define _H264_OR_5_VIDEO_RTP_SINK_HH 23 | 24 | #ifndef _VIDEO_RTP_SINK_HH 25 | #include "VideoRTPSink.hh" 26 | #endif 27 | #ifndef _FRAMED_FILTER_HH 28 | #include "FramedFilter.hh" 29 | #endif 30 | 31 | class H264or5VideoRTPSink: public VideoRTPSink { 32 | protected: 33 | H264or5VideoRTPSink(int hNumber, // 264 or 265 34 | UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat, 35 | u_int8_t const* vps = NULL, unsigned vpsSize = 0, 36 | u_int8_t const* sps = NULL, unsigned spsSize = 0, 37 | u_int8_t const* pps = NULL, unsigned ppsSize = 0); 38 | // we're an abstrace base class 39 | virtual ~H264or5VideoRTPSink(); 40 | 41 | private: // redefined virtual functions: 42 | virtual Boolean continuePlaying(); 43 | virtual void doSpecialFrameHandling(unsigned fragmentationOffset, 44 | unsigned char* frameStart, 45 | unsigned numBytesInFrame, 46 | struct timeval framePresentationTime, 47 | unsigned numRemainingBytes); 48 | virtual Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, 49 | unsigned numBytesInFrame) const; 50 | 51 | protected: 52 | int fHNumber; 53 | FramedFilter* fOurFragmenter; 54 | char* fFmtpSDPLine; 55 | u_int8_t* fVPS; unsigned fVPSSize; 56 | u_int8_t* fSPS; unsigned fSPSSize; 57 | u_int8_t* fPPS; unsigned fPPSSize; 58 | }; 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/H264or5VideoStreamDiscreteFramer.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-2017 Live Networks, Inc. All rights reserved. 18 | // A simplified version of "H264or5VideoStreamFramer" 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 | // "H264or5VideoStreamFramer". 22 | // C++ header 23 | 24 | #ifndef _H264_OR_5_VIDEO_STREAM_DISCRETE_FRAMER_HH 25 | #define _H264_OR_5_VIDEO_STREAM_DISCRETE_FRAMER_HH 26 | 27 | #ifndef _H264_OR_5_VIDEO_STREAM_FRAMER_HH 28 | #include "H264or5VideoStreamFramer.hh" 29 | #endif 30 | 31 | class H264or5VideoStreamDiscreteFramer: public H264or5VideoStreamFramer { 32 | protected: 33 | H264or5VideoStreamDiscreteFramer(int hNumber, UsageEnvironment& env, FramedSource* inputSource); 34 | // we're an abstract base class 35 | virtual ~H264or5VideoStreamDiscreteFramer(); 36 | 37 | protected: 38 | // redefined virtual functions: 39 | virtual void doGetNextFrame(); 40 | 41 | protected: 42 | static void afterGettingFrame(void* clientData, unsigned frameSize, 43 | unsigned numTruncatedBytes, 44 | struct timeval presentationTime, 45 | unsigned durationInMicroseconds); 46 | void afterGettingFrame1(unsigned frameSize, 47 | unsigned numTruncatedBytes, 48 | struct timeval presentationTime, 49 | unsigned durationInMicroseconds); 50 | 51 | virtual Boolean nalUnitEndsAccessUnit(u_int8_t nal_unit_type); 52 | }; 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/H265VideoFileSink.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-2017 Live Networks, Inc. All rights reserved. 18 | // H.265 Video File Sinks 19 | // C++ header 20 | 21 | #ifndef _H265_VIDEO_FILE_SINK_HH 22 | #define _H265_VIDEO_FILE_SINK_HH 23 | 24 | #ifndef _H264_OR_5_VIDEO_FILE_SINK_HH 25 | #include "H264or5VideoFileSink.hh" 26 | #endif 27 | 28 | class H265VideoFileSink: public H264or5VideoFileSink { 29 | public: 30 | static H265VideoFileSink* createNew(UsageEnvironment& env, char const* fileName, 31 | char const* sPropVPSStr = NULL, 32 | char const* sPropSPSStr = NULL, 33 | char const* sPropPPSStr = NULL, 34 | // The "sProp*Str" parameters are optional 'SDP format' strings 35 | // (comma-separated Base64-encoded) representing VPS, SPS, and/or PPS NAL-units 36 | // to prepend to the output 37 | unsigned bufferSize = 100000, 38 | Boolean oneFilePerFrame = False); 39 | // See "FileSink.hh" for a description of these parameters. 40 | 41 | protected: 42 | H265VideoFileSink(UsageEnvironment& env, FILE* fid, 43 | char const* sPropVPSStr, 44 | char const* sPropSPSStr, 45 | char const* sPropPPSStr, 46 | unsigned bufferSize, char const* perFrameFileNamePrefix); 47 | // called only by createNew() 48 | virtual ~H265VideoFileSink(); 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/H265VideoStreamDiscreteFramer.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-2017 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 | // C++ header 23 | 24 | #ifndef _H265_VIDEO_STREAM_DISCRETE_FRAMER_HH 25 | #define _H265_VIDEO_STREAM_DISCRETE_FRAMER_HH 26 | 27 | #ifndef _H264_OR_5_VIDEO_STREAM_DISCRETE_FRAMER_HH 28 | #include "H264or5VideoStreamDiscreteFramer.hh" 29 | #endif 30 | 31 | class H265VideoStreamDiscreteFramer: public H264or5VideoStreamDiscreteFramer { 32 | public: 33 | static H265VideoStreamDiscreteFramer* 34 | createNew(UsageEnvironment& env, FramedSource* inputSource); 35 | 36 | protected: 37 | H265VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource); 38 | // called only by createNew() 39 | virtual ~H265VideoStreamDiscreteFramer(); 40 | 41 | private: 42 | // redefined virtual functions: 43 | virtual Boolean isH265VideoStreamFramer() const; 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/JPEGVideoRTPSink.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-2017 Live Networks, Inc. All rights reserved. 18 | // RTP sink for JPEG video (RFC 2435) 19 | // C++ header 20 | 21 | #ifndef _JPEG_VIDEO_RTP_SINK_HH 22 | #define _JPEG_VIDEO_RTP_SINK_HH 23 | 24 | #ifndef _VIDEO_RTP_SINK_HH 25 | #include "VideoRTPSink.hh" 26 | #endif 27 | 28 | class JPEGVideoRTPSink: public VideoRTPSink { 29 | public: 30 | static JPEGVideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs); 31 | 32 | protected: 33 | JPEGVideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs); 34 | // called only by createNew() 35 | 36 | virtual ~JPEGVideoRTPSink(); 37 | 38 | private: // redefined virtual functions: 39 | virtual Boolean sourceIsCompatibleWithUs(MediaSource& source); 40 | 41 | virtual void doSpecialFrameHandling(unsigned fragmentationOffset, 42 | unsigned char* frameStart, 43 | unsigned numBytesInFrame, 44 | struct timeval framePresentationTime, 45 | unsigned numRemainingBytes); 46 | virtual 47 | Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, 48 | unsigned numBytesInFrame) const; 49 | virtual unsigned specialHeaderSize() const; 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/JPEGVideoRTPSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // JPEG Video (RFC 2435) RTP Sources 19 | // C++ header 20 | 21 | #ifndef _JPEG_VIDEO_RTP_SOURCE_HH 22 | #define _JPEG_VIDEO_RTP_SOURCE_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH 25 | #include "MultiFramedRTPSource.hh" 26 | #endif 27 | 28 | #define MAX_JPEG_HEADER_SIZE 1024 29 | 30 | class JPEGVideoRTPSource: public MultiFramedRTPSource { 31 | public: 32 | static JPEGVideoRTPSource* 33 | createNew(UsageEnvironment& env, Groupsock* RTPgs, 34 | unsigned char rtpPayloadFormat = 26, 35 | unsigned rtpPayloadFrequency = 90000, 36 | unsigned defaultWidth = 0, unsigned defaultHeight = 0); 37 | 38 | protected: 39 | virtual ~JPEGVideoRTPSource(); 40 | 41 | private: 42 | JPEGVideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, 43 | unsigned char rtpPayloadFormat, 44 | unsigned rtpTimestampFrequency, 45 | unsigned defaultWidth, unsigned defaultHeight); 46 | // called only by createNew() 47 | 48 | // Image dimensions from the SDP description, if any 49 | unsigned fDefaultWidth, fDefaultHeight; 50 | 51 | private: 52 | // redefined virtual functions: 53 | virtual Boolean processSpecialHeader(BufferedPacket* packet, 54 | unsigned& resultSpecialHeaderSize); 55 | 56 | virtual char const* MIMEtype() const; 57 | }; 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/JPEGVideoSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // JPEG video sources 19 | // C++ header 20 | 21 | #ifndef _JPEG_VIDEO_SOURCE_HH 22 | #define _JPEG_VIDEO_SOURCE_HH 23 | 24 | #ifndef _FRAMED_SOURCE_HH 25 | #include "FramedSource.hh" 26 | #endif 27 | 28 | class JPEGVideoSource: public FramedSource { 29 | public: 30 | virtual u_int8_t type() = 0; 31 | virtual u_int8_t qFactor() = 0; 32 | virtual u_int8_t width() = 0; // # pixels/8 (or 0 for 2048 pixels) 33 | virtual u_int8_t height() = 0; // # pixels/8 (or 0 for 2048 pixels) 34 | 35 | virtual u_int8_t const* quantizationTables(u_int8_t& precision, 36 | u_int16_t& length); 37 | // If "qFactor()" returns a value >= 128, then this function is called 38 | // to tell us the quantization tables that are being used. 39 | // (The default implementation of this function just returns NULL.) 40 | // "precision" and "length" are as defined in RFC 2435, section 3.1.8. 41 | 42 | virtual u_int16_t restartInterval(); 43 | // If restart intervals are being used (i.e., 64 <= type() <= 127), then this function must be 44 | // redefined - by a subclass - to return a non-zero value. 45 | 46 | protected: 47 | JPEGVideoSource(UsageEnvironment& env); // abstract base class 48 | virtual ~JPEGVideoSource(); 49 | 50 | private: 51 | // redefined virtual functions: 52 | virtual Boolean isJPEGVideoSource() const; 53 | }; 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/MP3ADURTPSink.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-2017 Live Networks, Inc. All rights reserved. 18 | // RTP sink for 'ADUized' MP3 frames ("mpa-robust") 19 | // C++ header 20 | 21 | #ifndef _MP3_ADU_RTP_SINK_HH 22 | #define _MP3_ADU_RTP_SINK_HH 23 | 24 | #ifndef _AUDIO_RTP_SINK_HH 25 | #include "AudioRTPSink.hh" 26 | #endif 27 | 28 | class MP3ADURTPSink: public AudioRTPSink { 29 | public: 30 | static MP3ADURTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs, 31 | unsigned char RTPPayloadType); 32 | 33 | protected: 34 | virtual ~MP3ADURTPSink(); 35 | 36 | private: 37 | MP3ADURTPSink(UsageEnvironment& env, Groupsock* RTPgs, 38 | unsigned char RTPPayloadType); 39 | // called only by createNew() 40 | 41 | 42 | private: 43 | // Redefined virtual functions: 44 | virtual void doSpecialFrameHandling(unsigned fragmentationOffset, 45 | unsigned char* frameStart, 46 | unsigned numBytesInFrame, 47 | struct timeval framePresentationTime, 48 | unsigned numRemainingBytes); 49 | virtual unsigned specialHeaderSize() const; 50 | 51 | private: 52 | unsigned fCurADUSize; // used when fragmenting over multiple RTP packets 53 | }; 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/MP3ADUTranscoder.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-2017 Live Networks, Inc. All rights reserved. 18 | // Transcoder for ADUized MP3 frames 19 | // C++ header 20 | 21 | #ifndef _MP3_ADU_TRANSCODER_HH 22 | #define _MP3_ADU_TRANSCODER_HH 23 | 24 | #ifndef _FRAMED_FILTER_HH 25 | #include "FramedFilter.hh" 26 | #endif 27 | 28 | class MP3ADUTranscoder: public FramedFilter { 29 | public: 30 | static MP3ADUTranscoder* createNew(UsageEnvironment& env, 31 | unsigned outBitrate /* in kbps */, 32 | FramedSource* inputSource); 33 | 34 | unsigned outBitrate() const { return fOutBitrate; } 35 | protected: 36 | MP3ADUTranscoder(UsageEnvironment& env, 37 | unsigned outBitrate /* in kbps */, 38 | FramedSource* inputSource); 39 | // called only by createNew() 40 | virtual ~MP3ADUTranscoder(); 41 | 42 | private: 43 | // redefined virtual functions: 44 | virtual void doGetNextFrame(); 45 | virtual void getAttributes() const; 46 | 47 | private: 48 | static void afterGettingFrame(void* clientData, 49 | unsigned numBytesRead, unsigned numTruncatedBytes, 50 | struct timeval presentationTime, 51 | unsigned durationInMicroseconds); 52 | void afterGettingFrame1(unsigned numBytesRead, unsigned numTruncatedBytes, 53 | struct timeval presentationTime, 54 | unsigned durationInMicroseconds); 55 | 56 | private: 57 | unsigned fOutBitrate; // in kbps 58 | unsigned fAvailableBytesForBackpointer; 59 | 60 | unsigned char* fOrigADU; 61 | // used to store incoming ADU prior to transcoding 62 | }; 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/MP3FileSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // MP3 File Sources 19 | // C++ header 20 | 21 | #ifndef _MP3_FILE_SOURCE_HH 22 | #define _MP3_FILE_SOURCE_HH 23 | 24 | #ifndef _FRAMED_FILE_SOURCE_HH 25 | #include "FramedFileSource.hh" 26 | #endif 27 | 28 | class MP3StreamState; // forward 29 | 30 | class MP3FileSource: public FramedFileSource { 31 | public: 32 | static MP3FileSource* createNew(UsageEnvironment& env, char const* fileName); 33 | 34 | float filePlayTime() const; 35 | unsigned fileSize() const; 36 | void setPresentationTimeScale(unsigned scale); 37 | void seekWithinFile(double seekNPT, double streamDuration); 38 | // if "streamDuration" is >0.0, then we limit the stream to that duration, before treating it as EOF 39 | 40 | protected: 41 | MP3FileSource(UsageEnvironment& env, FILE* fid); 42 | // called only by createNew() 43 | 44 | virtual ~MP3FileSource(); 45 | 46 | protected: 47 | void assignStream(FILE* fid, unsigned filesize); 48 | Boolean initializeStream(); 49 | 50 | MP3StreamState* streamState() {return fStreamState;} 51 | 52 | private: 53 | // redefined virtual functions: 54 | virtual void doGetNextFrame(); 55 | virtual char const* MIMEtype() const; 56 | virtual void getAttributes() const; 57 | 58 | private: 59 | virtual Boolean doGetNextFrame1(); 60 | 61 | private: 62 | MP3StreamState* fStreamState; 63 | Boolean fHaveJustInitialized; 64 | struct timeval fFirstFramePresentationTime; // set on stream init 65 | Boolean fLimitNumBytesToStream; 66 | unsigned fNumBytesToStream; // used iff "fLimitNumBytesToStream" is True 67 | }; 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/MPEG1or2AudioRTPSink.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-2017 Live Networks, Inc. All rights reserved. 18 | // RTP sink for MPEG audio (RFC 2250) 19 | // C++ header 20 | 21 | #ifndef _MPEG_1OR2_AUDIO_RTP_SINK_HH 22 | #define _MPEG_1OR2_AUDIO_RTP_SINK_HH 23 | 24 | #ifndef _AUDIO_RTP_SINK_HH 25 | #include "AudioRTPSink.hh" 26 | #endif 27 | 28 | class MPEG1or2AudioRTPSink: public AudioRTPSink { 29 | public: 30 | static MPEG1or2AudioRTPSink* createNew(UsageEnvironment& env, 31 | Groupsock* RTPgs); 32 | 33 | protected: 34 | MPEG1or2AudioRTPSink(UsageEnvironment& env, Groupsock* RTPgs); 35 | // called only by createNew() 36 | 37 | virtual ~MPEG1or2AudioRTPSink(); 38 | 39 | private: // redefined virtual functions: 40 | virtual void doSpecialFrameHandling(unsigned fragmentationOffset, 41 | unsigned char* frameStart, 42 | unsigned numBytesInFrame, 43 | struct timeval framePresentationTime, 44 | unsigned numRemainingBytes); 45 | virtual unsigned specialHeaderSize() const; 46 | }; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/MPEG1or2AudioRTPSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // MPEG-1 or MPEG-2 Audio RTP Sources 19 | // C++ header 20 | 21 | #ifndef _MPEG_1OR2_AUDIO_RTP_SOURCE_HH 22 | #define _MPEG_1OR2_AUDIO_RTP_SOURCE_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH 25 | #include "MultiFramedRTPSource.hh" 26 | #endif 27 | 28 | class MPEG1or2AudioRTPSource: public MultiFramedRTPSource { 29 | public: 30 | static MPEG1or2AudioRTPSource* 31 | createNew(UsageEnvironment& env, Groupsock* RTPgs, 32 | unsigned char rtpPayloadFormat = 14, 33 | unsigned rtpTimestampFrequency = 90000); 34 | 35 | protected: 36 | virtual ~MPEG1or2AudioRTPSource(); 37 | 38 | private: 39 | MPEG1or2AudioRTPSource(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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/MPEG1or2VideoFileServerMediaSubsession.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-2017 Live Networks, Inc. All rights reserved. 18 | // A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s 19 | // on demand, from a MPEG-1 or 2 Elementary Stream video file. 20 | // C++ header 21 | 22 | #ifndef _MPEG_1OR2_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH 23 | #define _MPEG_1OR2_VIDEO_FILE_SERVER_MEDIA_SUBSESSION_HH 24 | 25 | #ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH 26 | #include "FileServerMediaSubsession.hh" 27 | #endif 28 | 29 | class MPEG1or2VideoFileServerMediaSubsession: public FileServerMediaSubsession{ 30 | public: 31 | static MPEG1or2VideoFileServerMediaSubsession* 32 | createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource, 33 | Boolean iFramesOnly = False, 34 | double vshPeriod = 5.0 35 | /* how often (in seconds) to inject a Video_Sequence_Header, 36 | if one doesn't already appear in the stream */); 37 | 38 | private: 39 | MPEG1or2VideoFileServerMediaSubsession(UsageEnvironment& env, 40 | char const* fileName, 41 | Boolean reuseFirstSource, 42 | Boolean iFramesOnly, 43 | double vshPeriod); 44 | // called only by createNew(); 45 | virtual ~MPEG1or2VideoFileServerMediaSubsession(); 46 | 47 | private: // redefined virtual functions 48 | virtual FramedSource* createNewStreamSource(unsigned clientSessionId, 49 | unsigned& estBitrate); 50 | virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, 51 | unsigned char rtpPayloadTypeIfDynamic, 52 | FramedSource* inputSource); 53 | 54 | private: 55 | Boolean fIFramesOnly; 56 | double fVSHPeriod; 57 | }; 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/MPEG1or2VideoRTPSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // MPEG-1 or MPEG-2 Video RTP Sources 19 | // C++ header 20 | 21 | #ifndef _MPEG_1OR2_VIDEO_RTP_SOURCE_HH 22 | #define _MPEG_1OR2_VIDEO_RTP_SOURCE_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH 25 | #include "MultiFramedRTPSource.hh" 26 | #endif 27 | 28 | class MPEG1or2VideoRTPSource: public MultiFramedRTPSource { 29 | public: 30 | static MPEG1or2VideoRTPSource* 31 | createNew(UsageEnvironment& env, Groupsock* RTPgs, 32 | unsigned char rtpPayloadFormat = 32, 33 | unsigned rtpPayloadFrequency = 90000); 34 | 35 | protected: 36 | virtual ~MPEG1or2VideoRTPSource(); 37 | 38 | private: 39 | MPEG1or2VideoRTPSource(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 Boolean packetIsUsableInJitterCalculation(unsigned char* packet, 49 | unsigned packetSize); 50 | virtual char const* MIMEtype() const; 51 | }; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/MPEG1or2VideoStreamFramer.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-2017 Live Networks, Inc. All rights reserved. 18 | // A filter that breaks up an MPEG 1 or 2 video elementary stream into 19 | // frames for: Video_Sequence_Header, GOP_Header, Picture_Header 20 | // C++ header 21 | 22 | #ifndef _MPEG_1OR2_VIDEO_STREAM_FRAMER_HH 23 | #define _MPEG_1OR2_VIDEO_STREAM_FRAMER_HH 24 | 25 | #ifndef _MPEG_VIDEO_STREAM_FRAMER_HH 26 | #include "MPEGVideoStreamFramer.hh" 27 | #endif 28 | 29 | class MPEG1or2VideoStreamFramer: public MPEGVideoStreamFramer { 30 | public: 31 | static MPEG1or2VideoStreamFramer* 32 | createNew(UsageEnvironment& env, FramedSource* inputSource, 33 | Boolean iFramesOnly = False, 34 | double vshPeriod = 5.0 35 | /* how often (in seconds) to inject a Video_Sequence_Header, 36 | if one doesn't already appear in the stream */); 37 | 38 | protected: 39 | MPEG1or2VideoStreamFramer(UsageEnvironment& env, 40 | FramedSource* inputSource, 41 | Boolean iFramesOnly, double vshPeriod, 42 | Boolean createParser = True); 43 | // called only by createNew(), or by subclass constructors 44 | virtual ~MPEG1or2VideoStreamFramer(); 45 | 46 | private: 47 | // redefined virtual functions: 48 | virtual Boolean isMPEG1or2VideoStreamFramer() const; 49 | 50 | private: 51 | double getCurrentPTS() const; 52 | 53 | friend class MPEG1or2VideoStreamParser; // hack 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/MPEG2TransportStreamFromPESSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // A filter for converting a stream of MPEG PES packets to a MPEG-2 Transport Stream 19 | // C++ header 20 | 21 | #ifndef _MPEG2_TRANSPORT_STREAM_FROM_PES_SOURCE_HH 22 | #define _MPEG2_TRANSPORT_STREAM_FROM_PES_SOURCE_HH 23 | 24 | #ifndef _MPEG2_TRANSPORT_STREAM_MULTIPLEXOR_HH 25 | #include "MPEG2TransportStreamMultiplexor.hh" 26 | #endif 27 | #ifndef _MPEG_1OR2_DEMUXED_ELEMENTARY_STREAM_HH 28 | #include "MPEG1or2DemuxedElementaryStream.hh" 29 | #endif 30 | 31 | class MPEG2TransportStreamFromPESSource: public MPEG2TransportStreamMultiplexor { 32 | public: 33 | static MPEG2TransportStreamFromPESSource* 34 | createNew(UsageEnvironment& env, MPEG1or2DemuxedElementaryStream* inputSource); 35 | 36 | protected: 37 | MPEG2TransportStreamFromPESSource(UsageEnvironment& env, 38 | MPEG1or2DemuxedElementaryStream* inputSource); 39 | // called only by createNew() 40 | virtual ~MPEG2TransportStreamFromPESSource(); 41 | 42 | private: 43 | // Redefined virtual functions: 44 | virtual void doStopGettingFrames(); 45 | virtual void awaitNewBuffer(unsigned char* oldBuffer); 46 | 47 | private: 48 | static void afterGettingFrame(void* clientData, unsigned frameSize, 49 | unsigned numTruncatedBytes, 50 | struct timeval presentationTime, 51 | unsigned durationInMicroseconds); 52 | void afterGettingFrame1(unsigned frameSize, 53 | unsigned numTruncatedBytes, 54 | struct timeval presentationTime, 55 | unsigned durationInMicroseconds); 56 | 57 | private: 58 | MPEG1or2DemuxedElementaryStream* fInputSource; 59 | unsigned char* fInputBuffer; 60 | }; 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/MPEG4ESVideoRTPSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // MP4V-ES video RTP stream sources 19 | // C++ header 20 | 21 | #ifndef _MPEG4_ES_VIDEO_RTP_SOURCE_HH 22 | #define _MPEG4_ES_VIDEO_RTP_SOURCE_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH 25 | #include "MultiFramedRTPSource.hh" 26 | #endif 27 | 28 | class MPEG4ESVideoRTPSource: public MultiFramedRTPSource { 29 | public: 30 | static MPEG4ESVideoRTPSource* 31 | createNew(UsageEnvironment& env, Groupsock* RTPgs, 32 | unsigned char rtpPayloadFormat, 33 | unsigned rtpTimestampFrequency); 34 | 35 | protected: 36 | virtual ~MPEG4ESVideoRTPSource(); 37 | 38 | private: 39 | MPEG4ESVideoRTPSource(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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/MediaSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // Media Sources 19 | // C++ header 20 | 21 | #ifndef _MEDIA_SOURCE_HH 22 | #define _MEDIA_SOURCE_HH 23 | 24 | #ifndef _MEDIA_HH 25 | #include "Media.hh" 26 | #endif 27 | 28 | class MediaSource: public Medium { 29 | public: 30 | static Boolean lookupByName(UsageEnvironment& env, char const* sourceName, 31 | MediaSource*& resultSource); 32 | virtual void getAttributes() const; 33 | // attributes are returned in "env's" 'result message' 34 | 35 | // The MIME type of this source: 36 | virtual char const* MIMEtype() const; 37 | 38 | // Test for specific types of source: 39 | virtual Boolean isFramedSource() const; 40 | virtual Boolean isRTPSource() const; 41 | virtual Boolean isMPEG1or2VideoStreamFramer() const; 42 | virtual Boolean isMPEG4VideoStreamFramer() const; 43 | virtual Boolean isH264VideoStreamFramer() const; 44 | virtual Boolean isH265VideoStreamFramer() const; 45 | virtual Boolean isDVVideoStreamFramer() const; 46 | virtual Boolean isJPEGVideoSource() const; 47 | virtual Boolean isAMRAudioSource() const; 48 | 49 | protected: 50 | MediaSource(UsageEnvironment& env); // abstract base class 51 | virtual ~MediaSource(); 52 | 53 | private: 54 | // redefined virtual functions: 55 | virtual Boolean isSource() const; 56 | }; 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/TheoraVideoRTPSource.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-2017 Live Networks, Inc. All rights reserved. 18 | // Theora Video Audio RTP Sources 19 | // C++ header 20 | 21 | #ifndef _THEORA_VIDEO_RTP_SOURCE_HH 22 | #define _THEORA_VIDEO_RTP_SOURCE_HH 23 | 24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH 25 | #include "MultiFramedRTPSource.hh" 26 | #endif 27 | 28 | class TheoraVideoRTPSource: public MultiFramedRTPSource { 29 | public: 30 | static TheoraVideoRTPSource* 31 | createNew(UsageEnvironment& env, Groupsock* RTPgs, 32 | unsigned char rtpPayloadFormat); 33 | 34 | u_int32_t curPacketIdent() const { return fCurPacketIdent; } // The current "Ident" field; only the low-order 24 bits are used 35 | 36 | protected: 37 | TheoraVideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs, 38 | unsigned char rtpPayloadFormat); 39 | // called only by createNew() 40 | 41 | virtual ~TheoraVideoRTPSource(); 42 | 43 | protected: 44 | // redefined virtual functions: 45 | virtual Boolean processSpecialHeader(BufferedPacket* packet, 46 | unsigned& resultSpecialHeaderSize); 47 | virtual char const* MIMEtype() const; 48 | 49 | private: 50 | u_int32_t fCurPacketIdent; // only the low-order 24 bits are used 51 | }; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/VP8VideoRTPSink.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-2017 Live Networks, Inc. All rights reserved. 18 | // RTP sink for VP8 video 19 | // C++ header 20 | 21 | #ifndef _VP8_VIDEO_RTP_SINK_HH 22 | #define _VP8_VIDEO_RTP_SINK_HH 23 | 24 | #ifndef _VIDEO_RTP_SINK_HH 25 | #include "VideoRTPSink.hh" 26 | #endif 27 | 28 | class VP8VideoRTPSink: public VideoRTPSink { 29 | public: 30 | static VP8VideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); 31 | 32 | protected: 33 | VP8VideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); 34 | // called only by createNew() 35 | 36 | virtual ~VP8VideoRTPSink(); 37 | 38 | private: // redefined virtual functions: 39 | virtual void doSpecialFrameHandling(unsigned fragmentationOffset, 40 | unsigned char* frameStart, 41 | unsigned numBytesInFrame, 42 | struct timeval framePresentationTime, 43 | unsigned numRemainingBytes); 44 | virtual 45 | Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, 46 | unsigned numBytesInFrame) const; 47 | virtual unsigned specialHeaderSize() const; 48 | }; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/VP9VideoRTPSink.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-2017 Live Networks, Inc. All rights reserved. 18 | // RTP sink for VP9 video 19 | // C++ header 20 | 21 | #ifndef _VP9_VIDEO_RTP_SINK_HH 22 | #define _VP9_VIDEO_RTP_SINK_HH 23 | 24 | #ifndef _VIDEO_RTP_SINK_HH 25 | #include "VideoRTPSink.hh" 26 | #endif 27 | 28 | class VP9VideoRTPSink: public VideoRTPSink { 29 | public: 30 | static VP9VideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); 31 | 32 | protected: 33 | VP9VideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat); 34 | // called only by createNew() 35 | 36 | virtual ~VP9VideoRTPSink(); 37 | 38 | private: // redefined virtual functions: 39 | virtual void doSpecialFrameHandling(unsigned fragmentationOffset, 40 | unsigned char* frameStart, 41 | unsigned numBytesInFrame, 42 | struct timeval framePresentationTime, 43 | unsigned numRemainingBytes); 44 | virtual 45 | Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart, 46 | unsigned numBytesInFrame) const; 47 | virtual unsigned specialHeaderSize() const; 48 | }; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/liveMedia_version.hh: -------------------------------------------------------------------------------- 1 | // Version information for the "liveMedia" library 2 | // Copyright (c) 1996-2017 Live Networks, Inc. All rights reserved. 3 | 4 | #ifndef _LIVEMEDIA_VERSION_HH 5 | #define _LIVEMEDIA_VERSION_HH 6 | 7 | #define LIVEMEDIA_LIBRARY_VERSION_STRING "2017.01.26" 8 | #define LIVEMEDIA_LIBRARY_VERSION_INT 1485388800 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/liveMedia/ourMD5.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-2017 Live Networks, Inc. All rights reserved. 18 | // Because MD5 may not be implemented (at least, with the same interface) on all systems, 19 | // we have our own implementation. 20 | // C++ header 21 | 22 | #ifndef _OUR_MD5_HH 23 | #define _OUR_MD5_HH 24 | 25 | extern char* our_MD5Data(unsigned char const* data, unsigned dataSize, char* outputDigest); 26 | // "outputDigest" must be either NULL (in which case this function returns a heap-allocated 27 | // buffer, which should be later delete[]d by the caller), or else it must point to 28 | // a (>=)33-byte buffer (which this function will also return). 29 | 30 | extern unsigned char* our_MD5DataRaw(unsigned char const* data, unsigned dataSize, 31 | unsigned char* outputDigest); 32 | // Like "ourMD5Data()", except that it returns the digest in 'raw' binary form, rather than 33 | // as an ASCII hex string. 34 | // "outputDigest" must be either NULL (in which case this function returns a heap-allocated 35 | // buffer, which should be later delete[]d by the caller), or else it must point to 36 | // a (>=)16-byte buffer (which this function will also return). 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/usageEnvironment/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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/usageEnvironment/UsageEnvironment_version.hh: -------------------------------------------------------------------------------- 1 | // Version information for the "UsageEnvironment" library 2 | // Copyright (c) 1996-2017 Live Networks, Inc. All rights reserved. 3 | 4 | #ifndef _USAGEENVIRONMENT_VERSION_HH 5 | #define _USAGEENVIRONMENT_VERSION_HH 6 | 7 | #define USAGEENVIRONMENT_LIBRARY_VERSION_STRING "2017.01.26" 8 | #define USAGEENVIRONMENT_LIBRARY_VERSION_INT 1485388800 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/live555/usageEnvironment/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-2017 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 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/include/x264/x264_config.h: -------------------------------------------------------------------------------- 1 | #define X264_BIT_DEPTH 8 2 | #define X264_GPL 1 3 | #define X264_INTERLACED 1 4 | #define X264_CHROMA_FORMAT 0 5 | #define X264_REV 2721 6 | #define X264_REV_DIFF 0 7 | #define X264_VERSION " r2721 72d53ab" 8 | #define X264_POINTVER "0.148.2721 72d53ab" 9 | -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/lib/artosyn_usb_lib/libar8020.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtsp/RaspPiFromUsb_Yuyv_H264/lib/artosyn_usb_lib/libar8020.c -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/lib/artosyn_usb_lib/libar8020.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtsp/RaspPiFromUsb_Yuyv_H264/lib/artosyn_usb_lib/libar8020.o -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/lib/livelib/libBasicUsageEnvironment.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtsp/RaspPiFromUsb_Yuyv_H264/lib/livelib/libBasicUsageEnvironment.a -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/lib/livelib/libUsageEnvironment.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtsp/RaspPiFromUsb_Yuyv_H264/lib/livelib/libUsageEnvironment.a -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/lib/livelib/libgroupsock.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtsp/RaspPiFromUsb_Yuyv_H264/lib/livelib/libgroupsock.a -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/lib/livelib/libliveMedia.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtsp/RaspPiFromUsb_Yuyv_H264/lib/livelib/libliveMedia.a -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/lib/x264lib/libx264.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtsp/RaspPiFromUsb_Yuyv_H264/lib/x264lib/libx264.a -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/lib/x264lib/libx264.so.148: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtsp/RaspPiFromUsb_Yuyv_H264/lib/x264lib/libx264.so.148 -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/lib/x264lib/libx264_bk.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtsp/RaspPiFromUsb_Yuyv_H264/lib/x264lib/libx264_bk.so -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/my_fifo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtsp/RaspPiFromUsb_Yuyv_H264/my_fifo -------------------------------------------------------------------------------- /rtsp/RaspPiFromUsb_Yuyv_H264/test.264: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/rtsp/RaspPiFromUsb_Yuyv_H264/test.264 -------------------------------------------------------------------------------- /v4l2/v4l2_yuv_h264/Makefile: -------------------------------------------------------------------------------- 1 | TOP_DIR := $(shell pwd) 2 | APP = $(TOP_DIR)/out/v4l2_yuv_h264 3 | 4 | #CC = arm-none-linux-gnueabi-gcc 5 | CC = gcc 6 | #CFLAGS = -g 7 | LIBS = -lpthread -lx264 -lm 8 | #LIBS = -lpthread 9 | DEP_LIBS = -L$(TOP_DIR)/lib 10 | HEADER = 11 | OBJS = main.o h264encoder.o 12 | 13 | all: $(OBJS) 14 | $(CC) -o $(APP) $(OBJS) $(LIBS) 15 | 16 | clean: 17 | rm -f *.o a.out $(APP) core *~ 18 | 19 | 20 | -------------------------------------------------------------------------------- /v4l2/v4l2_yuv_h264/README.md: -------------------------------------------------------------------------------- 1 | # v4l2_yuv_h264 2 | V4l2 capture the YUV image and then use x264 encoding into h264 3 | -------------------------------------------------------------------------------- /v4l2/v4l2_yuv_h264/include/h264encoder.h: -------------------------------------------------------------------------------- 1 | #ifndef _H264ENCODER_H 2 | #define _H264ENCODER_H 3 | 4 | #include 5 | #include 6 | #include "x264.h" 7 | 8 | typedef unsigned char uint8_t; 9 | 10 | typedef struct { 11 | x264_param_t *param; 12 | x264_t *handle; 13 | x264_picture_t *picture; 14 | x264_nal_t *nal; 15 | } Encoder; 16 | 17 | 18 | void compress_begin(Encoder *en, int width, int height); 19 | 20 | int compress_frame(Encoder *en, int type, uint8_t *in, uint8_t *out); 21 | 22 | void compress_end(Encoder *en); 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /v4l2/v4l2_yuv_h264/include/x264_config.h: -------------------------------------------------------------------------------- 1 | #define X264_BIT_DEPTH 8 2 | #define X264_GPL 1 3 | #define X264_INTERLACED 1 4 | #define X264_CHROMA_FORMAT 0 5 | #define X264_REV 2721 6 | #define X264_REV_DIFF 0 7 | #define X264_VERSION " r2721 72d53ab" 8 | #define X264_POINTVER "0.148.2721 72d53ab" 9 | -------------------------------------------------------------------------------- /v4l2/v4l2_yuv_h264/lib/libx264.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/v4l2/v4l2_yuv_h264/lib/libx264.a -------------------------------------------------------------------------------- /v4l2/v4l2_yuv_h264/lib/libx264.so.148: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/v4l2/v4l2_yuv_h264/lib/libx264.so.148 -------------------------------------------------------------------------------- /v4l2/v4l2_yuyv_h264/Makefile: -------------------------------------------------------------------------------- 1 | TOP_DIR := $(shell pwd) 2 | #APP = $(TOP_DIR)x264_test 3 | APP = x264_test 4 | 5 | #CC = arm-none-linux-gnueabi-gcc 6 | CC = gcc 7 | CFLAGS = -g 8 | LIBS = -lpthread -lx264 -lm 9 | #LIBS = -lpthread 10 | #DEP_LIBS = -L$(TOP_DIR)/lib 11 | HEADER = 12 | OBJS = main.o h264encoder.o 13 | 14 | all: $(OBJS) 15 | $(CC) -g -o $(APP) $(OBJS) $(LIBS) 16 | 17 | clean: 18 | rm -f *.o a.out $(APP) core *~ ./out/* 19 | 20 | 21 | -------------------------------------------------------------------------------- /v4l2/v4l2_yuyv_h264/README.md: -------------------------------------------------------------------------------- 1 | # v4l2_yuyv_h264 2 | V4l2 capture the YUYV image and then use x264 encoding into h264 3 | -------------------------------------------------------------------------------- /v4l2/v4l2_yuyv_h264/include/h264encoder.h: -------------------------------------------------------------------------------- 1 | #ifndef _H264ENCODER_H 2 | #define _H264ENCODER_H 3 | 4 | #include 5 | #include 6 | #include "x264.h" 7 | 8 | typedef unsigned char uint8_t; 9 | 10 | typedef struct { 11 | x264_param_t *param; 12 | x264_t *handle; 13 | x264_picture_t *picture; 14 | x264_nal_t *nal; 15 | } Encoder; 16 | 17 | 18 | void compress_begin(Encoder *en, int width, int height); 19 | 20 | int compress_frame(Encoder *en, int type, uint8_t *in, uint8_t *out); 21 | 22 | void compress_end(Encoder *en); 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /v4l2/v4l2_yuyv_h264/include/x264_config.h: -------------------------------------------------------------------------------- 1 | #define X264_BIT_DEPTH 8 2 | #define X264_GPL 1 3 | #define X264_INTERLACED 1 4 | #define X264_CHROMA_FORMAT 0 5 | #define X264_REV 2721 6 | #define X264_REV_DIFF 0 7 | #define X264_VERSION " r2721 72d53ab" 8 | #define X264_POINTVER "0.148.2721 72d53ab" 9 | -------------------------------------------------------------------------------- /v4l2/v4l2_yuyv_h264/lib/libx264.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/v4l2/v4l2_yuyv_h264/lib/libx264.a -------------------------------------------------------------------------------- /v4l2/v4l2_yuyv_h264/lib/libx264.so.148: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/v4l2/v4l2_yuyv_h264/lib/libx264.so.148 -------------------------------------------------------------------------------- /v4l2/v4l2_yuyv_h264/test.h264: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyDreamcode/live555H264-V4l2LiveStreaming/bdc2876b073254276051d29d5ad97097ec76f8bf/v4l2/v4l2_yuyv_h264/test.h264 --------------------------------------------------------------------------------