├── README.md ├── live ├── BasicUsageEnvironment │ ├── BasicHashTable.cpp │ ├── BasicTaskScheduler.cpp │ ├── BasicTaskScheduler0.cpp │ ├── BasicUsageEnvironment.cpp │ ├── BasicUsageEnvironment0.cpp │ ├── COPYING │ ├── DelayQueue.cpp │ ├── Makefile.head │ ├── Makefile.tail │ └── include │ │ ├── BasicHashTable.hh │ │ ├── BasicUsageEnvironment.hh │ │ ├── BasicUsageEnvironment0.hh │ │ ├── BasicUsageEnvironment_version.hh │ │ ├── DelayQueue.hh │ │ └── HandlerSet.hh ├── COPYING ├── Makefile.head ├── Makefile.tail ├── README ├── UsageEnvironment │ ├── COPYING │ ├── HashTable.cpp │ ├── Makefile.head │ ├── Makefile.tail │ ├── UsageEnvironment.cpp │ ├── include │ │ ├── Boolean.hh │ │ ├── HashTable.hh │ │ ├── UsageEnvironment.hh │ │ ├── UsageEnvironment_version.hh │ │ └── strDup.hh │ └── strDup.cpp ├── WindowsAudioInputDevice │ ├── WindowsAudioInputDevice.mak │ ├── WindowsAudioInputDevice_common.cpp │ ├── WindowsAudioInputDevice_common.hh │ ├── WindowsAudioInputDevice_mixer.cpp │ ├── WindowsAudioInputDevice_mixer.hh │ ├── WindowsAudioInputDevice_noMixer.cpp │ ├── WindowsAudioInputDevice_noMixer.hh │ └── showAudioInputPorts.cpp ├── config.aix ├── config.alpha ├── config.armeb-uclibc ├── config.armlinux ├── config.avr32-linux ├── config.bfin-linux-uclibc ├── config.bfin-uclinux ├── config.bsplinux ├── config.cris-axis-linux-gnu ├── config.cygwin ├── config.cygwin-for-vlc ├── config.freebsd ├── config.iphone-simulator ├── config.iphoneos ├── config.irix ├── config.linux ├── config.linux-64bit ├── config.linux-gdb ├── config.linux-with-shared-libraries ├── config.macosx ├── config.macosx-32bit ├── config.macosx-before-version-10.4 ├── config.mingw ├── config.openbsd ├── config.qnx4 ├── config.solaris-32bit ├── config.solaris-64bit ├── config.sunos ├── config.uClinux ├── configure ├── fix-makefile ├── genMakefiles ├── genWindowsMakefiles ├── genWindowsMakefiles.cmd ├── groupsock │ ├── COPYING │ ├── GroupEId.cpp │ ├── Groupsock.cpp │ ├── GroupsockHelper.cpp │ ├── IOHandlers.cpp │ ├── Makefile.head │ ├── Makefile.tail │ ├── NetAddress.cpp │ ├── NetInterface.cpp │ ├── include │ │ ├── GroupEId.hh │ │ ├── Groupsock.hh │ │ ├── GroupsockHelper.hh │ │ ├── IOHandlers.hh │ │ ├── NetAddress.hh │ │ ├── NetCommon.h │ │ ├── NetInterface.hh │ │ ├── TunnelEncaps.hh │ │ └── groupsock_version.hh │ └── inet.c ├── liveMedia │ ├── AC3AudioFileServerMediaSubsession.cpp │ ├── AC3AudioRTPSink.cpp │ ├── AC3AudioRTPSource.cpp │ ├── AC3AudioStreamFramer.cpp │ ├── ADTSAudioFileServerMediaSubsession.cpp │ ├── ADTSAudioFileSource.cpp │ ├── AMRAudioFileServerMediaSubsession.cpp │ ├── AMRAudioFileSink.cpp │ ├── AMRAudioFileSource.cpp │ ├── AMRAudioRTPSink.cpp │ ├── AMRAudioRTPSource.cpp │ ├── AMRAudioSource.cpp │ ├── AVIFileSink.cpp │ ├── AudioInputDevice.cpp │ ├── AudioRTPSink.cpp │ ├── Base64.cpp │ ├── BasicUDPSink.cpp │ ├── BasicUDPSource.cpp │ ├── BitVector.cpp │ ├── ByteStreamFileSource.cpp │ ├── ByteStreamMemoryBufferSource.cpp │ ├── ByteStreamMultiFileSource.cpp │ ├── COPYING │ ├── DVVideoFileServerMediaSubsession.cpp │ ├── DVVideoRTPSink.cpp │ ├── DVVideoRTPSource.cpp │ ├── DVVideoStreamFramer.cpp │ ├── DarwinInjector.cpp │ ├── DeviceSource.cpp │ ├── DigestAuthentication.cpp │ ├── EBMLNumber.cpp │ ├── EBMLNumber.hh │ ├── FileServerMediaSubsession.cpp │ ├── FileSink.cpp │ ├── FramedFileSource.cpp │ ├── FramedFilter.cpp │ ├── FramedSource.cpp │ ├── GSMAudioRTPSink.cpp │ ├── H261VideoRTPSource.cpp │ ├── H263plusVideoFileServerMediaSubsession.cpp │ ├── H263plusVideoRTPSink.cpp │ ├── H263plusVideoRTPSource.cpp │ ├── H263plusVideoStreamFramer.cpp │ ├── H263plusVideoStreamParser.cpp │ ├── H263plusVideoStreamParser.hh │ ├── H264VideoFileServerMediaSubsession.cpp │ ├── H264VideoFileSink.cpp │ ├── H264VideoRTPSink.cpp │ ├── H264VideoRTPSource.cpp │ ├── H264VideoStreamDiscreteFramer.cpp │ ├── H264VideoStreamFramer.cpp │ ├── H264or5VideoFileSink.cpp │ ├── H264or5VideoRTPSink.cpp │ ├── H264or5VideoStreamDiscreteFramer.cpp │ ├── H264or5VideoStreamFramer.cpp │ ├── H265VideoFileServerMediaSubsession.cpp │ ├── H265VideoFileSink.cpp │ ├── H265VideoRTPSink.cpp │ ├── H265VideoRTPSource.cpp │ ├── H265VideoStreamDiscreteFramer.cpp │ ├── H265VideoStreamFramer.cpp │ ├── InputFile.cpp │ ├── JPEGVideoRTPSink.cpp │ ├── JPEGVideoRTPSource.cpp │ ├── JPEGVideoSource.cpp │ ├── Locale.cpp │ ├── MP3ADU.cpp │ ├── MP3ADURTPSink.cpp │ ├── MP3ADURTPSource.cpp │ ├── MP3ADUTranscoder.cpp │ ├── MP3ADUdescriptor.cpp │ ├── MP3ADUdescriptor.hh │ ├── MP3ADUinterleaving.cpp │ ├── MP3AudioFileServerMediaSubsession.cpp │ ├── MP3AudioMatroskaFileServerMediaSubsession.cpp │ ├── MP3AudioMatroskaFileServerMediaSubsession.hh │ ├── MP3FileSource.cpp │ ├── MP3Internals.cpp │ ├── MP3Internals.hh │ ├── MP3InternalsHuffman.cpp │ ├── MP3InternalsHuffman.hh │ ├── MP3InternalsHuffmanTable.cpp │ ├── MP3StreamState.cpp │ ├── MP3StreamState.hh │ ├── MP3Transcoder.cpp │ ├── MPEG1or2AudioRTPSink.cpp │ ├── MPEG1or2AudioRTPSource.cpp │ ├── MPEG1or2AudioStreamFramer.cpp │ ├── MPEG1or2Demux.cpp │ ├── MPEG1or2DemuxedElementaryStream.cpp │ ├── MPEG1or2DemuxedServerMediaSubsession.cpp │ ├── MPEG1or2FileServerDemux.cpp │ ├── MPEG1or2VideoFileServerMediaSubsession.cpp │ ├── MPEG1or2VideoRTPSink.cpp │ ├── MPEG1or2VideoRTPSource.cpp │ ├── MPEG1or2VideoStreamDiscreteFramer.cpp │ ├── MPEG1or2VideoStreamFramer.cpp │ ├── MPEG2IndexFromTransportStream.cpp │ ├── MPEG2TransportFileServerMediaSubsession.cpp │ ├── MPEG2TransportStreamFramer.cpp │ ├── MPEG2TransportStreamFromESSource.cpp │ ├── MPEG2TransportStreamFromPESSource.cpp │ ├── MPEG2TransportStreamIndexFile.cpp │ ├── MPEG2TransportStreamMultiplexor.cpp │ ├── MPEG2TransportStreamTrickModeFilter.cpp │ ├── MPEG2TransportUDPServerMediaSubsession.cpp │ ├── MPEG4ESVideoRTPSink.cpp │ ├── MPEG4ESVideoRTPSource.cpp │ ├── MPEG4GenericRTPSink.cpp │ ├── MPEG4GenericRTPSource.cpp │ ├── MPEG4LATMAudioRTPSink.cpp │ ├── MPEG4LATMAudioRTPSource.cpp │ ├── MPEG4VideoFileServerMediaSubsession.cpp │ ├── MPEG4VideoStreamDiscreteFramer.cpp │ ├── MPEG4VideoStreamFramer.cpp │ ├── MPEGVideoStreamFramer.cpp │ ├── MPEGVideoStreamParser.cpp │ ├── MPEGVideoStreamParser.hh │ ├── Makefile.head │ ├── Makefile.tail │ ├── MatroskaDemuxedTrack.cpp │ ├── MatroskaDemuxedTrack.hh │ ├── MatroskaFile.cpp │ ├── MatroskaFileParser.cpp │ ├── MatroskaFileParser.hh │ ├── MatroskaFileServerDemux.cpp │ ├── MatroskaFileServerMediaSubsession.cpp │ ├── MatroskaFileServerMediaSubsession.hh │ ├── Media.cpp │ ├── MediaSession.cpp │ ├── MediaSink.cpp │ ├── MediaSource.cpp │ ├── MultiFramedRTPSink.cpp │ ├── MultiFramedRTPSource.cpp │ ├── OggDemuxedTrack.cpp │ ├── OggDemuxedTrack.hh │ ├── OggFile.cpp │ ├── OggFileParser.cpp │ ├── OggFileParser.hh │ ├── OggFileServerDemux.cpp │ ├── OggFileServerMediaSubsession.cpp │ ├── OggFileServerMediaSubsession.hh │ ├── OggFileSink.cpp │ ├── OnDemandServerMediaSubsession.cpp │ ├── OutputFile.cpp │ ├── PassiveServerMediaSubsession.cpp │ ├── ProxyServerMediaSession.cpp │ ├── QCELPAudioRTPSource.cpp │ ├── QuickTimeFileSink.cpp │ ├── QuickTimeGenericRTPSource.cpp │ ├── RTCP.cpp │ ├── RTPInterface.cpp │ ├── RTPSink.cpp │ ├── RTPSource.cpp │ ├── RTSPClient.cpp │ ├── RTSPCommon.cpp │ ├── RTSPRegisterSender.cpp │ ├── RTSPServer.cpp │ ├── RTSPServerSupportingHTTPStreaming.cpp │ ├── SIPClient.cpp │ ├── ServerMediaSession.cpp │ ├── SimpleRTPSink.cpp │ ├── SimpleRTPSource.cpp │ ├── StreamParser.cpp │ ├── StreamParser.hh │ ├── StreamReplicator.cpp │ ├── T140TextRTPSink.cpp │ ├── TCPStreamSink.cpp │ ├── TextRTPSink.cpp │ ├── TheoraVideoRTPSink.cpp │ ├── TheoraVideoRTPSource.cpp │ ├── VP8VideoRTPSink.cpp │ ├── VP8VideoRTPSource.cpp │ ├── VP9VideoRTPSink.cpp │ ├── VP9VideoRTPSource.cpp │ ├── VideoRTPSink.cpp │ ├── VorbisAudioRTPSink.cpp │ ├── VorbisAudioRTPSource.cpp │ ├── WAVAudioFileServerMediaSubsession.cpp │ ├── WAVAudioFileSource.cpp │ ├── include │ │ ├── AC3AudioFileServerMediaSubsession.hh │ │ ├── AC3AudioRTPSink.hh │ │ ├── AC3AudioRTPSource.hh │ │ ├── AC3AudioStreamFramer.hh │ │ ├── ADTSAudioFileServerMediaSubsession.hh │ │ ├── ADTSAudioFileSource.hh │ │ ├── AMRAudioFileServerMediaSubsession.hh │ │ ├── AMRAudioFileSink.hh │ │ ├── AMRAudioFileSource.hh │ │ ├── AMRAudioRTPSink.hh │ │ ├── AMRAudioRTPSource.hh │ │ ├── AMRAudioSource.hh │ │ ├── AVIFileSink.hh │ │ ├── AudioInputDevice.hh │ │ ├── AudioRTPSink.hh │ │ ├── Base64.hh │ │ ├── BasicUDPSink.hh │ │ ├── BasicUDPSource.hh │ │ ├── BitVector.hh │ │ ├── ByteStreamFileSource.hh │ │ ├── ByteStreamMemoryBufferSource.hh │ │ ├── ByteStreamMultiFileSource.hh │ │ ├── DVVideoFileServerMediaSubsession.hh │ │ ├── DVVideoRTPSink.hh │ │ ├── DVVideoRTPSource.hh │ │ ├── DVVideoStreamFramer.hh │ │ ├── DarwinInjector.hh │ │ ├── DeviceSource.hh │ │ ├── DigestAuthentication.hh │ │ ├── FileServerMediaSubsession.hh │ │ ├── FileSink.hh │ │ ├── FramedFileSource.hh │ │ ├── FramedFilter.hh │ │ ├── FramedSource.hh │ │ ├── GSMAudioRTPSink.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 │ │ ├── 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 │ │ ├── MultiFramedRTPSink.hh │ │ ├── MultiFramedRTPSource.hh │ │ ├── OggFile.hh │ │ ├── OggFileServerDemux.hh │ │ ├── OggFileSink.hh │ │ ├── OnDemandServerMediaSubsession.hh │ │ ├── OutputFile.hh │ │ ├── PassiveServerMediaSubsession.hh │ │ ├── ProxyServerMediaSession.hh │ │ ├── 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 │ │ ├── StreamParser.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 │ ├── ourMD5.cpp │ ├── rtcp_from_spec.c │ ├── rtcp_from_spec.h │ └── uLawAudioFilter.cpp ├── mediaServer │ ├── COPYING │ ├── DynamicRTSPServer.cpp │ ├── DynamicRTSPServer.hh │ ├── Makefile.head │ ├── Makefile.tail │ ├── live555MediaServer.cpp │ └── version.hh ├── proxyServer │ ├── COPYING │ ├── Makefile.head │ ├── Makefile.tail │ └── live555ProxyServer.cpp ├── testProgs │ ├── COPYING │ ├── MPEG2TransportStreamIndexer.cpp │ ├── Makefile.head │ ├── Makefile.tail │ ├── openRTSP.cpp │ ├── playCommon.cpp │ ├── playCommon.hh │ ├── playSIP.cpp │ ├── registerRTSPStream.cpp │ ├── sapWatch.cpp │ ├── testAMRAudioStreamer.cpp │ ├── testDVVideoStreamer.cpp │ ├── testGSMStreamer.cpp │ ├── testH264VideoStreamer.cpp │ ├── testH264VideoToTransportStream.cpp │ ├── testH265VideoStreamer.cpp │ ├── testH265VideoToTransportStream.cpp │ ├── testMKVStreamer.cpp │ ├── testMP3-using-ADUs.sdp │ ├── testMP3.sdp │ ├── testMP3Receiver.cpp │ ├── testMP3Streamer.cpp │ ├── testMPEG1or2AudioVideo.sdp │ ├── testMPEG1or2AudioVideoStreamer.cpp │ ├── testMPEG1or2ProgramToTransportStream.cpp │ ├── testMPEG1or2Splitter.cpp │ ├── testMPEG1or2Video.sdp │ ├── testMPEG1or2VideoReceiver.cpp │ ├── testMPEG1or2VideoStreamer.cpp │ ├── testMPEG2Transport.sdp │ ├── testMPEG2TransportReceiver.cpp │ ├── testMPEG2TransportStreamTrickPlay.cpp │ ├── testMPEG2TransportStreamer.cpp │ ├── testMPEG4VideoStreamer.cpp │ ├── testOggStreamer.cpp │ ├── testOnDemandRTSPServer.cpp │ ├── testRTSPClient.cpp │ ├── testRelay.cpp │ ├── testReplicator.cpp │ ├── testWAVAudioStreamer.cpp │ └── vobStreamer.cpp ├── win32config └── win32config.Borland ├── src ├── CameraJPEGDeviceSource.cpp ├── CameraJPEGDeviceSource.hh ├── CameraThread.cpp ├── CameraThread.hh ├── JPEGMediaSubsession.cpp ├── JPEGMediaSubsession.hh ├── JPEGVideoFileServerMediaSubsession.cpp ├── JPEGVideoFileServerMediaSubsession.hh ├── JPEGVideoStreamFramer.cpp ├── JPEGVideoStreamFramer.hh ├── JPEGVideoStreamParser.cpp ├── JPEGVideoStreamParser.hh ├── JpegFrameParser.cpp ├── JpegFrameParser.hh ├── MJPEGVideoSource.cpp ├── MJPEGVideoSource.hh └── main.cpp ├── vs2013 └── JpegRtspCamera │ ├── JpegRtspCamera.sln │ └── JpegRtspCamera │ ├── JpegRtspCamera.vcxproj │ └── JpegRtspCamera.vcxproj.filters └── vs2015 └── JpegRtspCamera ├── JpegRtspCamera.sln └── JpegRtspCamera ├── JpegRtspCamera.vcxproj └── JpegRtspCamera.vcxproj.filters /live/BasicUsageEnvironment/Makefile.head: -------------------------------------------------------------------------------- 1 | INCLUDES = -Iinclude -I../UsageEnvironment/include -I../groupsock/include 2 | PREFIX = /usr/local 3 | LIBDIR = $(PREFIX)/lib 4 | ##### Change the following for your environment: 5 | -------------------------------------------------------------------------------- /live/BasicUsageEnvironment/Makefile.tail: -------------------------------------------------------------------------------- 1 | ##### End of variables to change 2 | 3 | NAME = libBasicUsageEnvironment 4 | LIB = $(NAME).$(LIB_SUFFIX) 5 | ALL = $(LIB) 6 | all: $(ALL) 7 | 8 | OBJS = BasicUsageEnvironment0.$(OBJ) BasicUsageEnvironment.$(OBJ) \ 9 | BasicTaskScheduler0.$(OBJ) BasicTaskScheduler.$(OBJ) \ 10 | DelayQueue.$(OBJ) BasicHashTable.$(OBJ) 11 | 12 | libBasicUsageEnvironment.$(LIB_SUFFIX): $(OBJS) 13 | $(LIBRARY_LINK)$@ $(LIBRARY_LINK_OPTS) \ 14 | $(OBJS) 15 | 16 | .$(C).$(OBJ): 17 | $(C_COMPILER) -c $(C_FLAGS) $< 18 | 19 | .$(CPP).$(OBJ): 20 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $< 21 | 22 | BasicUsageEnvironment0.$(CPP): include/BasicUsageEnvironment0.hh 23 | include/BasicUsageEnvironment0.hh: include/BasicUsageEnvironment_version.hh include/DelayQueue.hh 24 | BasicUsageEnvironment.$(CPP): include/BasicUsageEnvironment.hh 25 | include/BasicUsageEnvironment.hh: include/BasicUsageEnvironment0.hh 26 | BasicTaskScheduler0.$(CPP): include/BasicUsageEnvironment0.hh include/HandlerSet.hh 27 | BasicTaskScheduler.$(CPP): include/BasicUsageEnvironment.hh include/HandlerSet.hh 28 | DelayQueue.$(CPP): include/DelayQueue.hh 29 | BasicHashTable.$(CPP): include/BasicHashTable.hh 30 | 31 | clean: 32 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~ 33 | 34 | install: install1 $(INSTALL2) 35 | install1: libBasicUsageEnvironment.$(LIB_SUFFIX) 36 | install -d $(DESTDIR)$(PREFIX)/include/BasicUsageEnvironment $(DESTDIR)$(LIBDIR) 37 | install -m 644 include/*.hh $(DESTDIR)$(PREFIX)/include/BasicUsageEnvironment 38 | install -m 644 libBasicUsageEnvironment.$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR) 39 | install_shared_libraries: libBasicUsageEnvironment.$(LIB_SUFFIX) 40 | ln -s $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).$(SHORT_LIB_SUFFIX) 41 | ln -s $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).so 42 | 43 | ##### Any additional, platform-specific rules come here: 44 | -------------------------------------------------------------------------------- /live/BasicUsageEnvironment/include/BasicUsageEnvironment_version.hh: -------------------------------------------------------------------------------- 1 | // Version information for the "BasicUsageEnvironment" library 2 | // Copyright (c) 1996-2015 Live Networks, Inc. All rights reserved. 3 | 4 | #ifndef _BASICUSAGEENVIRONMENT_VERSION_HH 5 | #define _BASICUSAGEENVIRONMENT_VERSION_HH 6 | 7 | #define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_STRING "2015.03.06" 8 | #define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_INT 1425600000 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /live/Makefile.head: -------------------------------------------------------------------------------- 1 | ##### Change the following for your environment: 2 | -------------------------------------------------------------------------------- /live/Makefile.tail: -------------------------------------------------------------------------------- 1 | ##### End of variables to change 2 | 3 | LIVEMEDIA_DIR = liveMedia 4 | GROUPSOCK_DIR = groupsock 5 | USAGE_ENVIRONMENT_DIR = UsageEnvironment 6 | BASIC_USAGE_ENVIRONMENT_DIR = BasicUsageEnvironment 7 | 8 | TESTPROGS_DIR = testProgs 9 | 10 | MEDIA_SERVER_DIR = mediaServer 11 | 12 | PROXY_SERVER_DIR = proxyServer 13 | 14 | all: 15 | cd $(LIVEMEDIA_DIR) ; $(MAKE) 16 | cd $(GROUPSOCK_DIR) ; $(MAKE) 17 | cd $(USAGE_ENVIRONMENT_DIR) ; $(MAKE) 18 | cd $(BASIC_USAGE_ENVIRONMENT_DIR) ; $(MAKE) 19 | cd $(TESTPROGS_DIR) ; $(MAKE) 20 | cd $(MEDIA_SERVER_DIR) ; $(MAKE) 21 | cd $(PROXY_SERVER_DIR) ; $(MAKE) 22 | 23 | install: 24 | cd $(LIVEMEDIA_DIR) ; $(MAKE) install 25 | cd $(GROUPSOCK_DIR) ; $(MAKE) install 26 | cd $(USAGE_ENVIRONMENT_DIR) ; $(MAKE) install 27 | cd $(BASIC_USAGE_ENVIRONMENT_DIR) ; $(MAKE) install 28 | cd $(TESTPROGS_DIR) ; $(MAKE) install 29 | cd $(MEDIA_SERVER_DIR) ; $(MAKE) install 30 | cd $(PROXY_SERVER_DIR) ; $(MAKE) install 31 | 32 | clean: 33 | cd $(LIVEMEDIA_DIR) ; $(MAKE) clean 34 | cd $(GROUPSOCK_DIR) ; $(MAKE) clean 35 | cd $(USAGE_ENVIRONMENT_DIR) ; $(MAKE) clean 36 | cd $(BASIC_USAGE_ENVIRONMENT_DIR) ; $(MAKE) clean 37 | cd $(TESTPROGS_DIR) ; $(MAKE) clean 38 | cd $(MEDIA_SERVER_DIR) ; $(MAKE) clean 39 | cd $(PROXY_SERVER_DIR) ; $(MAKE) clean 40 | 41 | distclean: clean 42 | -rm -f $(LIVEMEDIA_DIR)/Makefile $(GROUPSOCK_DIR)/Makefile \ 43 | $(USAGE_ENVIRONMENT_DIR)/Makefile $(BASIC_USAGE_ENVIRONMENT_DIR)/Makefile \ 44 | $(TESTPROGS_DIR)/Makefile $(MEDIA_SERVER_DIR)/Makefile \ 45 | $(PROXY_SERVER_DIR)/Makefile Makefile 46 | -------------------------------------------------------------------------------- /live/README: -------------------------------------------------------------------------------- 1 | For documentation and instructions for building this software, 2 | see 3 | -------------------------------------------------------------------------------- /live/UsageEnvironment/HashTable.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 17 | // Generic Hash Table 18 | // Implementation 19 | 20 | #include "HashTable.hh" 21 | 22 | HashTable::HashTable() { 23 | } 24 | 25 | HashTable::~HashTable() { 26 | } 27 | 28 | HashTable::Iterator::Iterator() { 29 | } 30 | 31 | HashTable::Iterator::~Iterator() {} 32 | 33 | void* HashTable::RemoveNext() { 34 | Iterator* iter = Iterator::create(*this); 35 | char const* key; 36 | void* removedValue = iter->next(key); 37 | if (removedValue != 0) Remove(key); 38 | 39 | delete iter; 40 | return removedValue; 41 | } 42 | 43 | void* HashTable::getFirst() { 44 | Iterator* iter = Iterator::create(*this); 45 | char const* key; 46 | void* firstValue = iter->next(key); 47 | 48 | delete iter; 49 | return firstValue; 50 | } 51 | -------------------------------------------------------------------------------- /live/UsageEnvironment/Makefile.head: -------------------------------------------------------------------------------- 1 | INCLUDES = -Iinclude -I../groupsock/include 2 | PREFIX = /usr/local 3 | LIBDIR = $(PREFIX)/lib 4 | ##### Change the following for your environment: 5 | -------------------------------------------------------------------------------- /live/UsageEnvironment/Makefile.tail: -------------------------------------------------------------------------------- 1 | ##### End of variables to change 2 | 3 | NAME = libUsageEnvironment 4 | USAGE_ENVIRONMENT_LIB = $(NAME).$(LIB_SUFFIX) 5 | ALL = $(USAGE_ENVIRONMENT_LIB) 6 | all: $(ALL) 7 | 8 | OBJS = UsageEnvironment.$(OBJ) HashTable.$(OBJ) strDup.$(OBJ) 9 | 10 | $(USAGE_ENVIRONMENT_LIB): $(OBJS) 11 | $(LIBRARY_LINK)$@ $(LIBRARY_LINK_OPTS) $(OBJS) 12 | 13 | .$(C).$(OBJ): 14 | $(C_COMPILER) -c $(C_FLAGS) $< 15 | 16 | .$(CPP).$(OBJ): 17 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $< 18 | 19 | UsageEnvironment.$(CPP): include/UsageEnvironment.hh 20 | include/UsageEnvironment.hh: include/UsageEnvironment_version.hh include/Boolean.hh include/strDup.hh 21 | HashTable.$(CPP): include/HashTable.hh 22 | include/HashTable.hh: include/Boolean.hh 23 | strDup.$(CPP): include/strDup.hh 24 | 25 | clean: 26 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~ 27 | 28 | install: install1 $(INSTALL2) 29 | install1: $(USAGE_ENVIRONMENT_LIB) 30 | install -d $(DESTDIR)$(PREFIX)/include/UsageEnvironment $(DESTDIR)$(LIBDIR) 31 | install -m 644 include/*.hh $(DESTDIR)$(PREFIX)/include/UsageEnvironment 32 | install -m 644 $(USAGE_ENVIRONMENT_LIB) $(DESTDIR)$(LIBDIR) 33 | install_shared_libraries: $(USAGE_ENVIRONMENT_LIB) 34 | ln -s $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).$(SHORT_LIB_SUFFIX) 35 | ln -s $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).so 36 | 37 | ##### Any additional, platform-specific rules come here: 38 | -------------------------------------------------------------------------------- /live/UsageEnvironment/UsageEnvironment.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 17 | // Usage Environment 18 | // Implementation 19 | 20 | #include "UsageEnvironment.hh" 21 | 22 | Boolean UsageEnvironment::reclaim() { 23 | // We delete ourselves only if we have no remainining state: 24 | if (liveMediaPriv == NULL && groupsockPriv == NULL) { 25 | delete this; 26 | return True; 27 | } 28 | 29 | return False; 30 | } 31 | 32 | UsageEnvironment::UsageEnvironment(TaskScheduler& scheduler) 33 | : liveMediaPriv(NULL), groupsockPriv(NULL), fScheduler(scheduler) { 34 | } 35 | 36 | UsageEnvironment::~UsageEnvironment() { 37 | } 38 | 39 | // By default, we handle 'should not occur'-type library errors by calling abort(). Subclasses can redefine this, if desired. 40 | // (If your runtime library doesn't define the "abort()" function, then define your own (e.g., that does nothing).) 41 | void UsageEnvironment::internalError() { 42 | abort(); 43 | } 44 | 45 | 46 | TaskScheduler::TaskScheduler() { 47 | } 48 | 49 | TaskScheduler::~TaskScheduler() { 50 | } 51 | 52 | void TaskScheduler::rescheduleDelayedTask(TaskToken& task, 53 | int64_t microseconds, TaskFunc* proc, 54 | void* clientData) { 55 | unscheduleDelayedTask(task); 56 | task = scheduleDelayedTask(microseconds, proc, clientData); 57 | } 58 | 59 | // By default, we handle 'should not occur'-type library errors by calling abort(). Subclasses can redefine this, if desired. 60 | void TaskScheduler::internalError() { 61 | abort(); 62 | } 63 | -------------------------------------------------------------------------------- /live/UsageEnvironment/include/Boolean.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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 | -------------------------------------------------------------------------------- /live/UsageEnvironment/include/UsageEnvironment_version.hh: -------------------------------------------------------------------------------- 1 | // Version information for the "UsageEnvironment" library 2 | // Copyright (c) 1996-2015 Live Networks, Inc. All rights reserved. 3 | 4 | #ifndef _USAGEENVIRONMENT_VERSION_HH 5 | #define _USAGEENVIRONMENT_VERSION_HH 6 | 7 | #define USAGEENVIRONMENT_LIBRARY_VERSION_STRING "2015.03.06" 8 | #define USAGEENVIRONMENT_LIBRARY_VERSION_INT 1425600000 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /live/UsageEnvironment/include/strDup.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/UsageEnvironment/strDup.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 17 | // A C++ equivalent to the standard C routine "strdup()". 18 | // This generates a char* that can be deleted using "delete[]" 19 | // Implementation 20 | 21 | #include "strDup.hh" 22 | 23 | char* strDup(char const* str) { 24 | if (str == NULL) return NULL; 25 | size_t len = strlen(str) + 1; 26 | char* copy = new char[len]; 27 | 28 | if (copy != NULL) { 29 | memcpy(copy, str, len); 30 | } 31 | return copy; 32 | } 33 | 34 | char* strDupSize(char const* str) { 35 | size_t dummy; 36 | 37 | return strDupSize(str, dummy); 38 | } 39 | 40 | char* strDupSize(char const* str, size_t& resultBufSize) { 41 | if (str == NULL) { 42 | resultBufSize = 0; 43 | return NULL; 44 | } 45 | 46 | resultBufSize = strlen(str) + 1; 47 | char* copy = new char[resultBufSize]; 48 | 49 | return copy; 50 | } 51 | -------------------------------------------------------------------------------- /live/WindowsAudioInputDevice/WindowsAudioInputDevice_mixer.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 2.1 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-2015 Live Networks, Inc. All rights reserved. 17 | // Windows implementation of a generic audio input device 18 | // This version uses Windows' built-in software mixer. 19 | // C++ header 20 | // 21 | // To use this, call "AudioInputDevice::createNew()". 22 | // You can also call "AudioInputDevice::getPortNames()" to get a list 23 | // of port names. 24 | 25 | #ifndef _WINDOWS_AUDIO_INPUT_DEVICE_MIXER_HH 26 | #define _WINDOWS_AUDIO_INPUT_DEVICE_MIXER_HH 27 | 28 | #ifndef _WINDOWS_AUDIO_INPUT_DEVICE_COMMON_HH 29 | #include "WindowsAudioInputDevice_common.hh" 30 | #endif 31 | 32 | class WindowsAudioInputDevice: public WindowsAudioInputDevice_common { 33 | private: 34 | friend class AudioInputDevice; 35 | WindowsAudioInputDevice(UsageEnvironment& env, int inputPortNumber, 36 | unsigned char bitsPerSample, unsigned char numChannels, 37 | unsigned samplingFrequency, unsigned granularityInMS, 38 | Boolean& success); 39 | // called only by createNew() 40 | 41 | virtual ~WindowsAudioInputDevice(); 42 | 43 | static void initializeIfNecessary(); 44 | 45 | private: 46 | // redefined virtual functions: 47 | virtual Boolean setInputPort(int portIndex); 48 | 49 | private: 50 | static unsigned numMixers; 51 | static class Mixer* ourMixers; 52 | static unsigned numInputPortsTotal; 53 | 54 | int fCurMixerId; 55 | }; 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /live/WindowsAudioInputDevice/WindowsAudioInputDevice_noMixer.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 2.1 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-2015 Live Networks, Inc. All rights reserved. 17 | // Windows implementation of a generic audio input device 18 | // This version does not use Windows' built-in software mixer. 19 | // C++ header 20 | // 21 | // To use this, call "AudioInputDevice::createNew()". 22 | // You can also call "AudioInputDevice::getPortNames()" to get a list 23 | // of port names. 24 | 25 | #ifndef _WINDOWS_AUDIO_INPUT_DEVICE_NOMIXER_HH 26 | #define _WINDOWS_AUDIO_INPUT_DEVICE_NOMIXER_HH 27 | 28 | #ifndef _WINDOWS_AUDIO_INPUT_DEVICE_COMMON_HH 29 | #include "WindowsAudioInputDevice_common.hh" 30 | #endif 31 | 32 | class WindowsAudioInputDevice: public WindowsAudioInputDevice_common { 33 | private: 34 | friend class AudioInputDevice; 35 | WindowsAudioInputDevice(UsageEnvironment& env, int inputPortNumber, 36 | unsigned char bitsPerSample, unsigned char numChannels, 37 | unsigned samplingFrequency, unsigned granularityInMS, 38 | Boolean& success); 39 | // called only by createNew() 40 | 41 | virtual ~WindowsAudioInputDevice(); 42 | 43 | static void initializeIfNecessary(); 44 | 45 | private: 46 | // redefined virtual functions: 47 | virtual Boolean setInputPort(int portIndex); 48 | 49 | private: 50 | static unsigned numAudioInputPorts; 51 | static class AudioInputPort* ourAudioInputPorts; 52 | }; 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /live/WindowsAudioInputDevice/showAudioInputPorts.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015, Live Networks, Inc. All rights reserved 17 | // A program that prints out this computer's audio input ports 18 | 19 | #include "AudioInputDevice.hh" 20 | #include 21 | 22 | int main(int argc, char** argv) { 23 | AudioPortNames* portNames = AudioInputDevice::getPortNames(); 24 | if (portNames == NULL) { 25 | fprintf(stderr, "AudioInputDevice::getPortNames() failed!\n"); 26 | exit(1); 27 | } 28 | 29 | printf("%d available audio input ports:\n", portNames->numPorts); 30 | for (unsigned i = 0; i < portNames->numPorts; ++i) { 31 | printf("%d\t%s\n", i, portNames->portName[i]); 32 | } 33 | 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /live/config.aix: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -DBSD=1 -O -DTIME_BASE=int -DSOCKLEN_T=socklen_t 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DAIX=1 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.alpha: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DTIME_BASE=int 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) -DALPHA 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 -DALPHA 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -B static 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.armeb-uclibc: -------------------------------------------------------------------------------- 1 | CROSS_COMPILE= armeb-linux-uclibc- 2 | COMPILE_OPTS = $(INCLUDES) -I. -Os -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 -D 3 | LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 4 | C = c 5 | C_COMPILER = $(CROSS_COMPILE)gcc 6 | C_FLAGS = $(COMPILE_OPTS) 7 | CPP = cpp 8 | CPLUSPLUS_COMPILER = $(CROSS_COMPILE)g++ 9 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 10 | OBJ = o 11 | LINK = $(CROSS_COMPILE)gcc -o 12 | LINK_OPTS = -L. 13 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 14 | LIBRARY_LINK = $(CROSS_COMPILE)ar cr 15 | LIBRARY_LINK_OPTS = 16 | LIB_SUFFIX = a 17 | LIBS_FOR_CONSOLE_APPLICATION = 18 | LIBS_FOR_GUI_APPLICATION = 19 | EXE = 20 | -------------------------------------------------------------------------------- /live/config.armlinux: -------------------------------------------------------------------------------- 1 | CROSS_COMPILE?= arm-elf- 2 | COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 3 | C = c 4 | C_COMPILER = $(CROSS_COMPILE)gcc 5 | C_FLAGS = $(COMPILE_OPTS) 6 | CPP = cpp 7 | CPLUSPLUS_COMPILER = $(CROSS_COMPILE)g++ 8 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 9 | OBJ = o 10 | LINK = $(CROSS_COMPILE)g++ -o 11 | LINK_OPTS = 12 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 13 | LIBRARY_LINK = $(CROSS_COMPILE)ar cr 14 | LIBRARY_LINK_OPTS = $(LINK_OPTS) 15 | LIB_SUFFIX = a 16 | LIBS_FOR_CONSOLE_APPLICATION = 17 | LIBS_FOR_GUI_APPLICATION = 18 | EXE = 19 | -------------------------------------------------------------------------------- /live/config.avr32-linux: -------------------------------------------------------------------------------- 1 | CROSS_COMPILE= avr32-linux-uclibc- 2 | COMPILE_OPTS = -Os $(INCLUDES) -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 C = c 3 | C_COMPILER = $(CROSS_COMPILE)gcc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = $(CROSS_COMPILE)c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -fuse-cxa-atexit -DBSD=1 OBJ = o 8 | LINK = $(CROSS_COMPILE)c++ -o 9 | LINK_OPTS = 10 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 11 | LIBRARY_LINK = $(CROSS_COMPILE)ar cr LIBRARY_LINK_OPTS = 12 | LIB_SUFFIX = a 13 | LIBS_FOR_CONSOLE_APPLICATION = 14 | LIBS_FOR_GUI_APPLICATION = 15 | EXE = 16 | -------------------------------------------------------------------------------- /live/config.bfin-linux-uclibc: -------------------------------------------------------------------------------- 1 | CROSS_COMPILER = bfin-linux-uclibc- 2 | COMPILE_OPTS = $(INCLUDES) -I. -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -DUCLINUX -D_FILE_OFFSET_BITS=64 3 | C = c 4 | C_COMPILER = $(CROSS_COMPILER)gcc 5 | C_FLAGS = $(COMPILE_OPTS) -Wall 6 | CPP = cpp 7 | CPLUSPLUS_COMPILER = $(CROSS_COMPILER)g++ 8 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 9 | OBJ = o 10 | LINK = $(CROSS_COMPILER)g++ -o 11 | LINK_OPTS = -L. 12 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 13 | LIBRARY_LINK = $(CROSS_COMPILER)ar cr 14 | LIBRARY_LINK_OPTS = 15 | LIB_SUFFIX = a 16 | LIBS_FOR_CONSOLE_APPLICATION = 17 | LIBS_FOR_GUI_APPLICATION = 18 | EXE = 19 | -------------------------------------------------------------------------------- /live/config.bfin-uclinux: -------------------------------------------------------------------------------- 1 | CROSS_COMPILER= bfin-uclinux- 2 | COMPILE_OPTS = $(INCLUDES) -I. -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -DUCLINUX -D_FILE_OFFSET_BITS=64 3 | C = c 4 | C_COMPILER = $(CROSS_COMPILER)gcc 5 | C_FLAGS = $(COMPILE_OPTS) -Wall 6 | CPP = cpp 7 | CPLUSPLUS_COMPILER = $(CROSS_COMPILER)g++ 8 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 9 | OBJ = o 10 | LINK = $(CROSS_COMPILER)g++ -Wl,-elf2flt -o 11 | LINK_OPTS = -L. 12 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 13 | LIBRARY_LINK = $(CROSS_COMPILER)ar cr 14 | LIBRARY_LINK_OPTS = 15 | LIB_SUFFIX = a 16 | LIBS_FOR_CONSOLE_APPLICATION = 17 | LIBS_FOR_GUI_APPLICATION = 18 | EXE = 19 | -------------------------------------------------------------------------------- /live/config.bsplinux: -------------------------------------------------------------------------------- 1 | CROSS_COMPILE= 2 | COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 3 | C = c 4 | C_COMPILER = $(CROSS_COMPILE)ecc 5 | C_FLAGS = $(COMPILE_OPTS) 6 | CPP = cpp 7 | CPLUSPLUS_COMPILER = $(CROSS_COMPILE)e++ 8 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 9 | OBJ = o 10 | LINK = $(CROSS_COMPILE)e++ -o 11 | LINK_OPTS = -L. 12 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 13 | LIBRARY_LINK = $(CROSS_COMPILE)eld -o 14 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic 15 | LIB_SUFFIX = a 16 | LIBS_FOR_CONSOLE_APPLICATION = -lm 17 | LIBS_FOR_GUI_APPLICATION = 18 | EXE = 19 | -------------------------------------------------------------------------------- /live/config.cris-axis-linux-gnu: -------------------------------------------------------------------------------- 1 | # Note: AXIS_TOP_DIR is assumed to already be set in your environment. 2 | # You can set this using the "init_env" script. 3 | # See http://developer.axis.com/doc/software/apps/apps-howto.html 4 | # for more information. 5 | AXIS_DIR = $(AXIS_TOP_DIR)/target/cris-axis-linux-gnu 6 | COMPILE_OPTS = $(INCLUDES) -I. -mlinux -isystem $(AXIS_DIR)/include -Wall -O2 -DSOCKLEN_T=socklen_t -DCRIS -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 7 | C = c 8 | C_COMPILER = gcc-cris 9 | C_FLAGS = $(COMPILE_OPTS) 10 | CPP = cpp 11 | CPLUSPLUS_COMPILER = c++-cris 12 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wno-ctor-dtor-privacy -ansi -pipe 13 | OBJ = o 14 | LINK = c++-cris -static -o 15 | AXIS_LINK_OPTS = -L$(AXIS_DIR)/lib 16 | LINK_OPTS = -L. 17 | CONSOLE_LINK_OPTS = $(LINK_OPTS) -L$(AXIS_DIR)/lib -mlinux 18 | LIBRARY_LINK = ld-cris -mcrislinux -o 19 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic 20 | LIB_SUFFIX = a 21 | LIBS_FOR_CONSOLE_APPLICATION = 22 | LIBS_FOR_GUI_APPLICATION = 23 | EXE = 24 | -------------------------------------------------------------------------------- /live/config.cygwin: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=socklen_t -DXLOCALE_NOT_USED=1 2 | C = c 3 | C_COMPILER = gcc 4 | C_FLAGS = $(COMPILE_OPTS) -DUSE_OUR_BZERO=1 -D__CYGWIN__ 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.cygwin-for-vlc: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=socklen_t -DXLOCALE_NOT_USED=1 2 | C = c 3 | C_COMPILER = gcc 4 | C_FLAGS = $(COMPILE_OPTS) -DUSE_OUR_BZERO=1 -D_WIN32 -mno-cygwin 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 -D_WIN32 -Wno-deprecated -mno-cygwin 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.freebsd: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DBSD=1 -DXLOCALE_NOT_USED=1 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ar cr 13 | LIBRARY_LINK_OPTS = 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.iphone-simulator: -------------------------------------------------------------------------------- 1 | # **Note: You must install the relevant "Command line tools (OSX *.*) for Xcode - Xcode *.*" 2 | # for this configuration file to work. 3 | 4 | # Change the following version number, if necessary, before running "genMakefiles iphone-simulator" 5 | IOS_VERSION = 8.1 6 | MIN_IOS_VERSION = 7.0 7 | 8 | DEVELOPER_PATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer 9 | TOOL_PATH = $(DEVELOPER_PATH)/usr/bin 10 | SDK_PATH = $(DEVELOPER_PATH)/SDKs 11 | SDK = $(SDK_PATH)/iPhoneSimulator$(IOS_VERSION).sdk 12 | COMPILE_OPTS = $(INCLUDES) -I. $(EXTRA_LDFLAGS) -DBSD=1 -O2 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -miphoneos-version-min=$(MIN_IOS_VERSION) -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fPIC -arch i386 --sysroot=$(SDK) -isysroot $(SDK) 13 | C = c 14 | C_COMPILER = /usr/bin/xcrun clang 15 | C_FLAGS = $(COMPILE_OPTS) 16 | CPP = cpp 17 | CPLUSPLUS_COMPILER = /usr/bin/xcrun clang 18 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 19 | OBJ = o 20 | LINK = /usr/bin/xcrun clang -o 21 | LINK_OPTS = -L. -arch i386 -miphoneos-version-min=$(MIN_IOS_VERSION) --sysroot=$(SDK) -isysroot -L$(SDK)/usr/lib/system -I$(SDK)/usr/lib /usr/lib/libc++.dylib 22 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 23 | LIBRARY_LINK = libtool -s -o 24 | LIBRARY_LINK_OPTS = 25 | LIB_SUFFIX = a 26 | LIBS_FOR_CONSOLE_APPLICATION = 27 | LIBS_FOR_GUI_APPLICATION = 28 | EXE = 29 | -------------------------------------------------------------------------------- /live/config.iphoneos: -------------------------------------------------------------------------------- 1 | # **Note: You must install the relevant "Command line tools (OSX *.*) for Xcode - Xcode *.*" 2 | # for this configuration file to work. 3 | # 4 | # Change the following version number, if necessary, before running "genMakefiles iphoneos" 5 | IOS_VERSION = 8.1 6 | 7 | DEVELOPER_PATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer 8 | TOOL_PATH = $(DEVELOPER_PATH)/usr/bin 9 | SDK_PATH = $(DEVELOPER_PATH)/SDKs 10 | SDK = $(SDK_PATH)/iPhoneOS$(IOS_VERSION).sdk 11 | COMPILE_OPTS = $(INCLUDES) -I. $(EXTRA_LDFLAGS) -DBSD=1 -O2 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fPIC -arch armv7 --sysroot=$(SDK) 12 | C = c 13 | C_COMPILER = /usr/bin/xcrun clang 14 | C_FLAGS = $(COMPILE_OPTS) 15 | CPP = cpp 16 | CPLUSPLUS_COMPILER = /usr/bin/xcrun clang 17 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 18 | OBJ = o 19 | LINK = /usr/bin/xcrun clang -o 20 | LINK_OPTS = -v -L. -arch armv7 --sysroot=$(SDK) -L$(SDK)/usr/lib/system /usr/lib/libc++.dylib 21 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 22 | LIBRARY_LINK = libtool -s -o 23 | LIBRARY_LINK_OPTS = 24 | LIB_SUFFIX = a 25 | LIBS_FOR_CONSOLE_APPLICATION = 26 | LIBS_FOR_GUI_APPLICATION = 27 | EXE = 28 | -------------------------------------------------------------------------------- /live/config.irix: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) -DIRIX 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DIRIX 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -B static 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.linux: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) $(CPPFLAGS) $(CFLAGS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 $(CPPFLAGS) $(CXXFLAGS) 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. $(LDFLAGS) 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ar cr 13 | LIBRARY_LINK_OPTS = 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.linux-64bit: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -m64 -fPIC -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ar cr 13 | LIBRARY_LINK_OPTS = 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.linux-gdb: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=socklen_t -g -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ar cr 13 | LIBRARY_LINK_OPTS = 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.macosx: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. $(EXTRA_LDFLAGS) -DBSD=1 -O -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -DTIME_BASE=int 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = libtool -s -o 13 | LIBRARY_LINK_OPTS = 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.macosx-32bit: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = -m32 $(INCLUDES) -I. $(EXTRA_LDFLAGS) -DBSD=1 -O -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -DTIME_BASE=int 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. -m32 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = libtool -s -o 13 | LIBRARY_LINK_OPTS = 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.macosx-before-version-10.4: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -DBSD=1 -O -DSOCKLEN_T=int -DTIME_BASE=int 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.mingw: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=int -DLOCALE_NOT_USED 2 | C = c 3 | C_COMPILER = $(CC) 4 | C_FLAGS = $(COMPILE_OPTS) -DUSE_OUR_BZERO=1 -D__MINGW32__ 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = $(CXX) 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -D__MINGW32__ -Wall -Wno-deprecated 8 | OBJ = o 9 | LINK = $(CXX) -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = $(LD) -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = -lws2_32 16 | LIBS_FOR_GUI_APPLICATION = -lws2_32 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.openbsd: -------------------------------------------------------------------------------- 1 | .SUFFIXES: .cpp 2 | COMPILE_OPTS = $(INCLUDES) -I. -DBSD=1 -O -DSOCKLEN_T=socklen_t 3 | C = c 4 | C_COMPILER = cc 5 | C_FLAGS = $(COMPILE_OPTS) 6 | CPP = cpp 7 | CPLUSPLUS_COMPILER = c++ 8 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DAIX=1 9 | OBJ = o 10 | LINK = c++ -o 11 | LINK_OPTS = -L. 12 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 13 | LIBRARY_LINK = ld -o 14 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r 15 | LIB_SUFFIX = a 16 | LIBS_FOR_CONSOLE_APPLICATION = 17 | LIBS_FOR_GUI_APPLICATION = 18 | EXE = 19 | -------------------------------------------------------------------------------- /live/config.qnx4: -------------------------------------------------------------------------------- 1 | # 2 | # Requires: 3 | # QNX 4.25 4 | # Watcom 10.6 5 | # TCP/IP 5.0 6 | # 7 | COMPILE_OPTS = $(INCLUDES) -I. -D_QNX4 -DBSD -DSOCKLEN_T=uint32_t -I/usr/watcom/10.6/usr/include 8 | C = c 9 | C_COMPILER = cc32 10 | C_FLAGS = $(COMPILE_OPTS) 11 | CPP = cpp 12 | CPLUSPLUS_COMPILER = cc32 13 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -WC,-xs 14 | OBJ = o 15 | LINK = cc32 -b -M -N30000 -o 16 | LINK_OPTS = -l. 17 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 18 | LIBRARY_LINK = wlib -n -b -c 19 | LIBRARY_LINK_OPTS = $(LINK_OPTS) 20 | LIB_SUFFIX = lib 21 | LIBS_FOR_CONSOLE_APPLICATION = -lsocket 22 | LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION) 23 | EXE = 24 | -------------------------------------------------------------------------------- /live/config.solaris-32bit: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DSOLARIS -DXLOCALE_NOT_USED -DSOCKLEN_T=socklen_t 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -dn 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = -lsocket -lnsl 16 | LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION) 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.solaris-64bit: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -m64 -I. -O -DSOLARIS -DXLOCALE_NOT_USED -DSOCKLEN_T=socklen_t 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cpp 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -m64 -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -64 -r -dn 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = -lsocket -lnsl 16 | LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION) 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.sunos: -------------------------------------------------------------------------------- 1 | COMPILE_OPTS = $(INCLUDES) -I. -DBSD=1 -O 2 | C = c 3 | C_COMPILER = cc 4 | C_FLAGS = $(COMPILE_OPTS) 5 | CPP = cc 6 | CPLUSPLUS_COMPILER = c++ 7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall 8 | OBJ = o 9 | LINK = c++ -o 10 | LINK_OPTS = -L. 11 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 12 | LIBRARY_LINK = ld -o 13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic 14 | LIB_SUFFIX = a 15 | LIBS_FOR_CONSOLE_APPLICATION = 16 | LIBS_FOR_GUI_APPLICATION = 17 | EXE = 18 | -------------------------------------------------------------------------------- /live/config.uClinux: -------------------------------------------------------------------------------- 1 | CROSS_COMPILE= arc-linux-uclibc- 2 | COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 3 | C = c 4 | C_COMPILER = $(CROSS_COMPILE)gcc 5 | CFLAGS += $(COMPILE_OPTS) 6 | C_FLAGS = $(CFLAGS) 7 | CPP = cpp 8 | CPLUSPLUS_COMPILER = $(CROSS_COMPILE)g++ 9 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 10 | CPLUSPLUS_FLAGS += $(CPPFLAGS) -fexceptions 11 | OBJ = o 12 | LINK = $(CROSS_COMPILE)g++ -o 13 | LINK_OPTS = -L. $(LDFLAGS) 14 | CONSOLE_LINK_OPTS = $(LINK_OPTS) 15 | LIBRARY_LINK = $(CROSS_COMPILE)ar cr 16 | LIBRARY_LINK_OPTS = 17 | LIB_SUFFIX = a 18 | LIBS_FOR_CONSOLE_APPLICATION = $(CXXLIBS) 19 | LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION) 20 | EXE = 21 | -------------------------------------------------------------------------------- /live/configure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Whoa! This software distribution does NOT use the normal Unix \"configure\" mechanism for generating a Makefile. For instructions on how to build this software, see ." 4 | echo "Also, please make sure that you're using the most up-to-date version of the source code - available from ." 5 | -------------------------------------------------------------------------------- /live/fix-makefile: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # the next line restarts using tclsh \ 3 | exec tclsh8.4 "$0" "$@" 4 | 5 | set makefileName [lindex $argv 0] 6 | set tmpfileName /tmp/rsftmp 7 | 8 | set inFid [open $makefileName r] 9 | set outFid [open $tmpfileName w] 10 | 11 | while {![eof $inFid]} { 12 | set line [gets $inFid] 13 | if {[string match *\)\$* $line]} { 14 | set pos [string first \)\$ $line] 15 | set prefix [string range $line 0 $pos] 16 | incr pos 17 | set suffix [string range $line $pos end] 18 | set line $prefix\ $suffix 19 | } 20 | 21 | puts $outFid $line 22 | } 23 | 24 | close $inFid 25 | close $outFid 26 | file rename -force $tmpfileName $makefileName 27 | -------------------------------------------------------------------------------- /live/genMakefiles: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | usage() { 4 | echo "Usage: $0 " 5 | exit 1 6 | } 7 | 8 | if [ $# -ne 1 ] 9 | then 10 | usage $* 11 | fi 12 | 13 | cd liveMedia 14 | /bin/rm -f Makefile 15 | cat Makefile.head ../config.$1 Makefile.tail > Makefile 16 | chmod a-w Makefile 17 | 18 | cd ../groupsock 19 | /bin/rm -f Makefile 20 | cat Makefile.head ../config.$1 Makefile.tail > Makefile 21 | chmod a-w Makefile 22 | 23 | cd ../UsageEnvironment 24 | /bin/rm -f Makefile 25 | cat Makefile.head ../config.$1 Makefile.tail > Makefile 26 | chmod a-w Makefile 27 | 28 | cd ../BasicUsageEnvironment 29 | /bin/rm -f Makefile 30 | cat Makefile.head ../config.$1 Makefile.tail > Makefile 31 | chmod a-w Makefile 32 | 33 | cd ../testProgs 34 | /bin/rm -f Makefile 35 | cat Makefile.head ../config.$1 Makefile.tail > Makefile 36 | chmod a-w Makefile 37 | 38 | cd ../mediaServer 39 | /bin/rm -f Makefile 40 | cat Makefile.head ../config.$1 Makefile.tail > Makefile 41 | chmod a-w Makefile 42 | 43 | cd ../proxyServer 44 | /bin/rm -f Makefile 45 | cat Makefile.head ../config.$1 Makefile.tail > Makefile 46 | chmod a-w Makefile 47 | 48 | cd .. 49 | /bin/rm -f Makefile 50 | cat Makefile.head config.$1 Makefile.tail > Makefile 51 | chmod a-w Makefile 52 | -------------------------------------------------------------------------------- /live/genWindowsMakefiles: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd liveMedia 4 | /bin/rm -f liveMedia.mak 5 | /bin/rm -f Makefile 6 | cat Makefile.head ../win32config Makefile.tail > liveMedia.mak 7 | 8 | cd ../groupsock 9 | /bin/rm -f groupsock.mak 10 | /bin/rm -f Makefile 11 | cat Makefile.head ../win32config Makefile.tail > groupsock.mak 12 | 13 | cd ../UsageEnvironment 14 | /bin/rm -f UsageEnvironment.mak 15 | /bin/rm -f Makefile 16 | cat Makefile.head ../win32config Makefile.tail > UsageEnvironment.mak 17 | 18 | cd ../BasicUsageEnvironment 19 | /bin/rm -f BasicUsageEnvironment.mak 20 | /bin/rm -f Makefile 21 | cat Makefile.head ../win32config Makefile.tail > BasicUsageEnvironment.mak 22 | 23 | cd ../testProgs 24 | /bin/rm -f testProgs.mak 25 | /bin/rm -f Makefile 26 | cat Makefile.head ../win32config Makefile.tail > testProgs.mak 27 | 28 | cd ../mediaServer 29 | /bin/rm -f mediaServer.mak 30 | /bin/rm -f Makefile 31 | cat Makefile.head ../win32config Makefile.tail > mediaServer.mak 32 | 33 | cd ../proxyServer 34 | /bin/rm -f proxyServer.mak 35 | /bin/rm -f Makefile 36 | cat Makefile.head ../win32config Makefile.tail > proxyServer.mak 37 | -------------------------------------------------------------------------------- /live/genWindowsMakefiles.cmd: -------------------------------------------------------------------------------- 1 | @Echo OFF 2 | SETLOCAL 3 | for %%I in (%0) do %%~dI 4 | for %%I in (%0) do cd "%%~pI" 5 | cd liveMedia 6 | del /Q liveMedia.mak 7 | type Makefile.head ..\win32config Makefile.tail > liveMedia.mak 8 | cd ../groupsock 9 | del /Q groupsock.mak 10 | type Makefile.head ..\win32config Makefile.tail > groupsock.mak 11 | cd ../UsageEnvironment 12 | del /Q UsageEnvironment.mak 13 | type Makefile.head ..\win32config Makefile.tail > UsageEnvironment.mak 14 | cd ../BasicUsageEnvironment 15 | del /Q BasicUsageEnvironment.mak 16 | type Makefile.head ..\win32config Makefile.tail > BasicUsageEnvironment.mak 17 | cd ../testProgs 18 | del /Q testProgs.mak 19 | type Makefile.head ..\win32config Makefile.tail > testProgs.mak 20 | cd ../mediaServer 21 | del /Q mediaServer.mak 22 | type Makefile.head ..\win32config Makefile.tail > mediaServer.mak 23 | cd ../proxyServer 24 | del /Q proxyServer.mak 25 | type Makefile.head ..\win32config Makefile.tail > proxyServer.mak 26 | 27 | ENDLOCAL 28 | -------------------------------------------------------------------------------- /live/groupsock/IOHandlers.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // IO event handlers 19 | // Implementation 20 | 21 | #include "IOHandlers.hh" 22 | #include "TunnelEncaps.hh" 23 | 24 | //##### TEMP: Use a single buffer, sized for UDP tunnels: 25 | //##### This assumes that the I/O handlers are non-reentrant 26 | static unsigned const maxPacketLength = 50*1024; // bytes 27 | // This is usually overkill, because UDP packets are usually no larger 28 | // than the typical Ethernet MTU (1500 bytes). However, I've seen 29 | // reports of Windows Media Servers sending UDP packets as large as 30 | // 27 kBytes. These will probably undego lots of IP-level 31 | // fragmentation, but that occurs below us. We just have to hope that 32 | // fragments don't get lost. 33 | static unsigned const ioBufferSize 34 | = maxPacketLength + TunnelEncapsulationTrailerMaxSize; 35 | static unsigned char ioBuffer[ioBufferSize]; 36 | 37 | 38 | void socketReadHandler(Socket* sock, int /*mask*/) { 39 | unsigned bytesRead; 40 | struct sockaddr_in fromAddress; 41 | UsageEnvironment& saveEnv = sock->env(); 42 | // because handleRead(), if it fails, may delete "sock" 43 | if (!sock->handleRead(ioBuffer, ioBufferSize, bytesRead, fromAddress)) { 44 | saveEnv.reportBackgroundError(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /live/groupsock/Makefile.head: -------------------------------------------------------------------------------- 1 | INCLUDES = -Iinclude -I../UsageEnvironment/include 2 | PREFIX = /usr/local 3 | LIBDIR = $(PREFIX)/lib 4 | ##### Change the following for your environment: 5 | -------------------------------------------------------------------------------- /live/groupsock/Makefile.tail: -------------------------------------------------------------------------------- 1 | ##### End of variables to change 2 | 3 | NAME = libgroupsock 4 | ALL = $(NAME).$(LIB_SUFFIX) 5 | all: $(ALL) 6 | 7 | .$(C).$(OBJ): 8 | $(C_COMPILER) -c $(C_FLAGS) $< 9 | .$(CPP).$(OBJ): 10 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $< 11 | 12 | GROUPSOCK_LIB_OBJS = GroupsockHelper.$(OBJ) GroupEId.$(OBJ) inet.$(OBJ) Groupsock.$(OBJ) NetInterface.$(OBJ) NetAddress.$(OBJ) IOHandlers.$(OBJ) 13 | 14 | GroupsockHelper.$(CPP): include/GroupsockHelper.hh 15 | include/GroupsockHelper.hh: include/NetAddress.hh 16 | include/NetAddress.hh: include/NetCommon.h 17 | GroupEId.$(CPP): include/GroupEId.hh 18 | include/GroupEId.hh: include/NetAddress.hh 19 | inet.$(C): include/NetCommon.h 20 | Groupsock.$(CPP): include/Groupsock.hh include/GroupsockHelper.hh include/TunnelEncaps.hh 21 | include/Groupsock.hh: include/groupsock_version.hh include/NetInterface.hh include/GroupEId.hh 22 | include/NetInterface.hh: include/NetAddress.hh 23 | include/TunnelEncaps.hh: include/NetAddress.hh 24 | NetInterface.$(CPP): include/NetInterface.hh include/GroupsockHelper.hh 25 | NetAddress.$(CPP): include/NetAddress.hh include/GroupsockHelper.hh 26 | IOHandlers.$(CPP): include/IOHandlers.hh include/TunnelEncaps.hh 27 | 28 | libgroupsock.$(LIB_SUFFIX): $(GROUPSOCK_LIB_OBJS) \ 29 | $(PLATFORM_SPECIFIC_LIB_OBJS) 30 | $(LIBRARY_LINK)$@ $(LIBRARY_LINK_OPTS) \ 31 | $(GROUPSOCK_LIB_OBJS) 32 | 33 | clean: 34 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~ 35 | 36 | install: install1 $(INSTALL2) 37 | install1: libgroupsock.$(LIB_SUFFIX) 38 | install -d $(DESTDIR)$(PREFIX)/include/groupsock $(DESTDIR)$(LIBDIR) 39 | install -m 644 include/*.hh include/*.h $(DESTDIR)$(PREFIX)/include/groupsock 40 | install -m 644 libgroupsock.$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR) 41 | install_shared_libraries: libgroupsock.$(LIB_SUFFIX) 42 | ln -s libgroupsock.$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/libgroupsock.$(SHORT_LIB_SUFFIX) 43 | ln -s libgroupsock.$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/libgroupsock.so 44 | 45 | ##### Any additional, platform-specific rules come here: 46 | -------------------------------------------------------------------------------- /live/groupsock/include/IOHandlers.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/groupsock/include/groupsock_version.hh: -------------------------------------------------------------------------------- 1 | // Version information for the "groupsock" library 2 | // Copyright (c) 1996-2015 Live Networks, Inc. All rights reserved. 3 | 4 | #ifndef _GROUPSOCK_VERSION_HH 5 | #define _GROUPSOCK_VERSION_HH 6 | 7 | #define GROUPSOCK_LIBRARY_VERSION_STRING "2015.03.06" 8 | #define GROUPSOCK_LIBRARY_VERSION_INT 1425600000 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /live/liveMedia/AMRAudioSource.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // A source object for AMR audio sources 19 | // Implementation 20 | 21 | #include "AMRAudioSource.hh" 22 | 23 | AMRAudioSource::AMRAudioSource(UsageEnvironment& env, 24 | Boolean isWideband, unsigned numChannels) 25 | : FramedSource(env), 26 | fIsWideband(isWideband), fNumChannels(numChannels), fLastFrameHeader(0) { 27 | } 28 | 29 | AMRAudioSource::~AMRAudioSource() { 30 | } 31 | 32 | char const* AMRAudioSource::MIMEtype() const { 33 | return "audio/AMR"; 34 | } 35 | 36 | Boolean AMRAudioSource::isAMRAudioSource() const { 37 | return True; 38 | } 39 | -------------------------------------------------------------------------------- /live/liveMedia/AudioInputDevice.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 of the License, or (at your 5 | option) any later version. (See .) 6 | 7 | This library is distributed in the hope that it will be useful, but WITHOUT 8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 10 | more details. 11 | 12 | You should have received a copy of the GNU Lesser General Public License 13 | along with this library; if not, write to the Free Software Foundation, Inc., 14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 15 | **********/ 16 | // Copyright (c) 2001-2003 Live Networks, Inc. All rights reserved. 17 | // Generic audio input device (such as a microphone, or an input sound card) 18 | // Implementation 19 | 20 | #include 21 | 22 | AudioInputDevice 23 | ::AudioInputDevice(UsageEnvironment& env, unsigned char bitsPerSample, 24 | unsigned char numChannels, 25 | unsigned samplingFrequency, unsigned granularityInMS) 26 | : FramedSource(env), fBitsPerSample(bitsPerSample), 27 | fNumChannels(numChannels), fSamplingFrequency(samplingFrequency), 28 | fGranularityInMS(granularityInMS) { 29 | } 30 | 31 | AudioInputDevice::~AudioInputDevice() { 32 | } 33 | 34 | char** AudioInputDevice::allowedDeviceNames = NULL; 35 | 36 | ////////// AudioPortNames implementation ////////// 37 | 38 | AudioPortNames::AudioPortNames() 39 | : numPorts(0), portName(NULL) { 40 | } 41 | 42 | AudioPortNames::~AudioPortNames() { 43 | for (unsigned i = 0; i < numPorts; ++i) delete portName[i]; 44 | delete portName; 45 | } 46 | -------------------------------------------------------------------------------- /live/liveMedia/AudioRTPSink.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // A generic RTP sink for audio codecs (abstract base class) 19 | // Implementation 20 | 21 | #include "AudioRTPSink.hh" 22 | 23 | AudioRTPSink::AudioRTPSink(UsageEnvironment& env, 24 | Groupsock* rtpgs, unsigned char rtpPayloadType, 25 | unsigned rtpTimestampFrequency, 26 | char const* rtpPayloadFormatName, 27 | unsigned numChannels) 28 | : MultiFramedRTPSink(env, rtpgs, rtpPayloadType, rtpTimestampFrequency, 29 | rtpPayloadFormatName, numChannels) { 30 | } 31 | 32 | AudioRTPSink::~AudioRTPSink() { 33 | } 34 | 35 | char const* AudioRTPSink::sdpMediaType() const { 36 | return "audio"; 37 | } 38 | -------------------------------------------------------------------------------- /live/liveMedia/FileServerMediaSubsession.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s 19 | // on demand, from a file. 20 | // Implementation 21 | 22 | #include "FileServerMediaSubsession.hh" 23 | 24 | FileServerMediaSubsession 25 | ::FileServerMediaSubsession(UsageEnvironment& env, char const* fileName, 26 | Boolean reuseFirstSource) 27 | : OnDemandServerMediaSubsession(env, reuseFirstSource), 28 | fFileSize(0) { 29 | fFileName = strDup(fileName); 30 | } 31 | 32 | FileServerMediaSubsession::~FileServerMediaSubsession() { 33 | delete[] (char*)fFileName; 34 | } 35 | -------------------------------------------------------------------------------- /live/liveMedia/FramedFileSource.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // Framed File Sources 19 | // Implementation 20 | 21 | #include "FramedFileSource.hh" 22 | 23 | ////////// FramedFileSource ////////// 24 | 25 | FramedFileSource::FramedFileSource(UsageEnvironment& env, FILE* fid) 26 | : FramedSource(env), fFid(fid) { 27 | } 28 | 29 | FramedFileSource::~FramedFileSource() { 30 | } 31 | -------------------------------------------------------------------------------- /live/liveMedia/FramedFilter.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // Framed Filters 19 | // Implementation 20 | 21 | #include "FramedFilter.hh" 22 | 23 | ////////// FramedFilter ////////// 24 | #include 25 | 26 | void FramedFilter::detachInputSource() { 27 | if (fInputSource != NULL) { 28 | fInputSource->stopGettingFrames(); 29 | reassignInputSource(NULL); 30 | } 31 | } 32 | 33 | FramedFilter::FramedFilter(UsageEnvironment& env, 34 | FramedSource* inputSource) 35 | : FramedSource(env), 36 | fInputSource(inputSource) { 37 | } 38 | 39 | FramedFilter::~FramedFilter() { 40 | Medium::close(fInputSource); 41 | } 42 | 43 | // Default implementations of needed virtual functions. These merely 44 | // call the same function in the input source - i.e., act like a 'null filter 45 | 46 | char const* FramedFilter::MIMEtype() const { 47 | if (fInputSource == NULL) return ""; 48 | 49 | return fInputSource->MIMEtype(); 50 | } 51 | 52 | void FramedFilter::getAttributes() const { 53 | if (fInputSource != NULL) fInputSource->getAttributes(); 54 | } 55 | 56 | void FramedFilter::doStopGettingFrames() { 57 | FramedSource::doStopGettingFrames(); 58 | if (fInputSource != NULL) fInputSource->stopGettingFrames(); 59 | } 60 | -------------------------------------------------------------------------------- /live/liveMedia/GSMAudioRTPSink.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // RTP sink for GSM audio 19 | // Implementation 20 | 21 | #include "GSMAudioRTPSink.hh" 22 | 23 | GSMAudioRTPSink::GSMAudioRTPSink(UsageEnvironment& env, Groupsock* RTPgs) 24 | : AudioRTPSink(env, RTPgs, 3, 8000, "GSM") { 25 | } 26 | 27 | GSMAudioRTPSink::~GSMAudioRTPSink() { 28 | } 29 | 30 | GSMAudioRTPSink* 31 | GSMAudioRTPSink::createNew(UsageEnvironment& env, Groupsock* RTPgs) { 32 | return new GSMAudioRTPSink(env, RTPgs); 33 | } 34 | 35 | Boolean GSMAudioRTPSink 36 | ::frameCanAppearAfterPacketStart(unsigned char const* /*frameStart*/, 37 | unsigned /*numBytesInFrame*/) const { 38 | // Allow at most 5 frames in a single packet: 39 | return numFramesUsedSoFar() < 5; 40 | } 41 | -------------------------------------------------------------------------------- /live/liveMedia/H264VideoFileSink.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // H.264 Video File sinks 19 | // Implementation 20 | 21 | #include "H264VideoFileSink.hh" 22 | #include "OutputFile.hh" 23 | 24 | ////////// H264VideoFileSink ////////// 25 | 26 | H264VideoFileSink 27 | ::H264VideoFileSink(UsageEnvironment& env, FILE* fid, 28 | char const* sPropParameterSetsStr, 29 | unsigned bufferSize, char const* perFrameFileNamePrefix) 30 | : H264or5VideoFileSink(env, fid, bufferSize, perFrameFileNamePrefix, 31 | sPropParameterSetsStr, NULL, NULL) { 32 | } 33 | 34 | H264VideoFileSink::~H264VideoFileSink() { 35 | } 36 | 37 | H264VideoFileSink* 38 | H264VideoFileSink::createNew(UsageEnvironment& env, char const* fileName, 39 | char const* sPropParameterSetsStr, 40 | unsigned bufferSize, Boolean oneFilePerFrame) { 41 | do { 42 | FILE* fid; 43 | char const* perFrameFileNamePrefix; 44 | if (oneFilePerFrame) { 45 | // Create the fid for each frame 46 | fid = NULL; 47 | perFrameFileNamePrefix = fileName; 48 | } else { 49 | // Normal case: create the fid once 50 | fid = OpenOutputFile(env, fileName); 51 | if (fid == NULL) break; 52 | perFrameFileNamePrefix = NULL; 53 | } 54 | 55 | return new H264VideoFileSink(env, fid, sPropParameterSetsStr, bufferSize, perFrameFileNamePrefix); 56 | } while (0); 57 | 58 | return NULL; 59 | } 60 | -------------------------------------------------------------------------------- /live/liveMedia/H264VideoStreamDiscreteFramer.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // A simplified version of "H264VideoStreamFramer" that takes only complete, 19 | // discrete frames (rather than an arbitrary byte stream) as input. 20 | // This avoids the parsing and data copying overhead of the full 21 | // "H264VideoStreamFramer". 22 | // Implementation 23 | 24 | #include "H264VideoStreamDiscreteFramer.hh" 25 | 26 | H264VideoStreamDiscreteFramer* 27 | H264VideoStreamDiscreteFramer::createNew(UsageEnvironment& env, FramedSource* inputSource) { 28 | return new H264VideoStreamDiscreteFramer(env, inputSource); 29 | } 30 | 31 | H264VideoStreamDiscreteFramer 32 | ::H264VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource) 33 | : H264or5VideoStreamDiscreteFramer(264, env, inputSource) { 34 | } 35 | 36 | H264VideoStreamDiscreteFramer::~H264VideoStreamDiscreteFramer() { 37 | } 38 | 39 | Boolean H264VideoStreamDiscreteFramer::isH264VideoStreamFramer() const { 40 | return True; 41 | } 42 | -------------------------------------------------------------------------------- /live/liveMedia/H264VideoStreamFramer.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // A filter that breaks up a H.264 Video Elementary Stream into NAL units. 19 | // Implementation 20 | 21 | #include "H264VideoStreamFramer.hh" 22 | 23 | H264VideoStreamFramer* H264VideoStreamFramer 24 | ::createNew(UsageEnvironment& env, FramedSource* inputSource, Boolean includeStartCodeInOutput) { 25 | return new H264VideoStreamFramer(env, inputSource, True, includeStartCodeInOutput); 26 | } 27 | 28 | H264VideoStreamFramer 29 | ::H264VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, Boolean createParser, Boolean includeStartCodeInOutput) 30 | : H264or5VideoStreamFramer(264, env, inputSource, createParser, includeStartCodeInOutput) { 31 | } 32 | 33 | H264VideoStreamFramer::~H264VideoStreamFramer() { 34 | } 35 | 36 | Boolean H264VideoStreamFramer::isH264VideoStreamFramer() const { 37 | return True; 38 | } 39 | -------------------------------------------------------------------------------- /live/liveMedia/H265VideoStreamDiscreteFramer.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // A simplified version of "H265VideoStreamFramer" that takes only complete, 19 | // discrete frames (rather than an arbitrary byte stream) as input. 20 | // This avoids the parsing and data copying overhead of the full 21 | // "H265VideoStreamFramer". 22 | // Implementation 23 | 24 | #include "H265VideoStreamDiscreteFramer.hh" 25 | 26 | H265VideoStreamDiscreteFramer* 27 | H265VideoStreamDiscreteFramer::createNew(UsageEnvironment& env, FramedSource* inputSource) { 28 | return new H265VideoStreamDiscreteFramer(env, inputSource); 29 | } 30 | 31 | H265VideoStreamDiscreteFramer 32 | ::H265VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource) 33 | : H264or5VideoStreamDiscreteFramer(265, env, inputSource) { 34 | } 35 | 36 | H265VideoStreamDiscreteFramer::~H265VideoStreamDiscreteFramer() { 37 | } 38 | 39 | Boolean H265VideoStreamDiscreteFramer::isH265VideoStreamFramer() const { 40 | return True; 41 | } 42 | -------------------------------------------------------------------------------- /live/liveMedia/H265VideoStreamFramer.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // A filter that breaks up a H.265 Video Elementary Stream into NAL units. 19 | // Implementation 20 | 21 | #include "H265VideoStreamFramer.hh" 22 | 23 | H265VideoStreamFramer* H265VideoStreamFramer 24 | ::createNew(UsageEnvironment& env, FramedSource* inputSource, Boolean includeStartCodeInOutput) { 25 | return new H265VideoStreamFramer(env, inputSource, True, includeStartCodeInOutput); 26 | } 27 | 28 | H265VideoStreamFramer 29 | ::H265VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, Boolean createParser, Boolean includeStartCodeInOutput) 30 | : H264or5VideoStreamFramer(265, env, inputSource, createParser, includeStartCodeInOutput) { 31 | } 32 | 33 | H265VideoStreamFramer::~H265VideoStreamFramer() { 34 | } 35 | 36 | Boolean H265VideoStreamFramer::isH265VideoStreamFramer() const { 37 | return True; 38 | } 39 | -------------------------------------------------------------------------------- /live/liveMedia/JPEGVideoSource.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // JPEG video sources 19 | // Implementation 20 | 21 | #include "JPEGVideoSource.hh" 22 | 23 | JPEGVideoSource::JPEGVideoSource(UsageEnvironment& env) 24 | : FramedSource(env) { 25 | } 26 | 27 | JPEGVideoSource::~JPEGVideoSource() { 28 | } 29 | 30 | u_int8_t const* JPEGVideoSource::quantizationTables(u_int8_t& precision, 31 | u_int16_t& length) { 32 | // Default implementation 33 | precision = 0; 34 | length = 0; 35 | return NULL; 36 | } 37 | 38 | u_int16_t JPEGVideoSource::restartInterval() { 39 | // Default implementation 40 | return 0; 41 | } 42 | 43 | Boolean JPEGVideoSource::isJPEGVideoSource() const { 44 | return True; 45 | } 46 | -------------------------------------------------------------------------------- /live/liveMedia/Locale.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // Support for temporarily setting the locale (e.g., to "C" or "POSIX") for (e.g.) parsing or printing 19 | // floating-point numbers in protocol headers, or calling toupper()/tolower() on human-input strings. 20 | // Implementation 21 | 22 | #include "Locale.hh" 23 | #include 24 | 25 | Locale::Locale(char const* newLocale, LocaleCategory category) { 26 | #ifndef LOCALE_NOT_USED 27 | #ifndef XLOCALE_NOT_USED 28 | int categoryMask; 29 | switch (category) { 30 | case All: { categoryMask = LC_ALL_MASK; break; } 31 | case Numeric: { categoryMask = LC_NUMERIC_MASK; break; } 32 | } 33 | fLocale = newlocale(categoryMask, newLocale, NULL); 34 | fPrevLocale = uselocale(fLocale); 35 | #else 36 | switch (category) { 37 | case All: { fCategoryNum = LC_ALL; break; } 38 | case Numeric: { fCategoryNum = LC_NUMERIC; break; } 39 | } 40 | fPrevLocale = strDup(setlocale(fCategoryNum, NULL)); 41 | setlocale(fCategoryNum, newLocale); 42 | #endif 43 | #endif 44 | } 45 | 46 | Locale::~Locale() { 47 | #ifndef LOCALE_NOT_USED 48 | #ifndef XLOCALE_NOT_USED 49 | if (fLocale != (locale_t)0) { 50 | uselocale(fPrevLocale); 51 | freelocale(fLocale); 52 | } 53 | #else 54 | if (fPrevLocale != NULL) { 55 | setlocale(fCategoryNum, fPrevLocale); 56 | delete[] fPrevLocale; 57 | } 58 | #endif 59 | #endif 60 | } 61 | -------------------------------------------------------------------------------- /live/liveMedia/MP3ADUdescriptor.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 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // Descriptor preceding frames of 'ADU' MP3 streams (for improved loss-tolerance) 19 | // C++ header 20 | 21 | #ifndef _MP3_ADU_DESCRIPTOR_HH 22 | #define _MP3_ADU_DESCRIPTOR_HH 23 | 24 | // A class for handling the descriptor that begins each ADU frame: 25 | // (Note: We don't yet implement fragmentation) 26 | class ADUdescriptor { 27 | public: 28 | // Operations for generating a new descriptor 29 | static unsigned computeSize(unsigned remainingFrameSize) { 30 | return remainingFrameSize >= 64 ? 2 : 1; 31 | } 32 | static unsigned generateDescriptor(unsigned char*& toPtr, unsigned remainingFrameSize); 33 | // returns descriptor size; increments "toPtr" afterwards 34 | static void generateTwoByteDescriptor(unsigned char*& toPtr, unsigned remainingFrameSize); 35 | // always generates a 2-byte descriptor, even if "remainingFrameSize" is 36 | // small enough for a 1-byte descriptor 37 | 38 | // Operations for reading a descriptor 39 | static unsigned getRemainingFrameSize(unsigned char*& fromPtr); 40 | // increments "fromPtr" afterwards 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /live/liveMedia/MP3Transcoder.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // MP3 Transcoder 19 | // Implementation 20 | 21 | #include "MP3Transcoder.hh" 22 | 23 | MP3Transcoder::MP3Transcoder(UsageEnvironment& env, 24 | MP3ADUTranscoder* aduTranscoder) 25 | : MP3FromADUSource(env, aduTranscoder, False) { 26 | } 27 | 28 | MP3Transcoder::~MP3Transcoder() { 29 | } 30 | 31 | MP3Transcoder* MP3Transcoder::createNew(UsageEnvironment& env, 32 | unsigned outBitrate /* in kbps */, 33 | FramedSource* inputSource) { 34 | MP3Transcoder* newSource = NULL; 35 | 36 | do { 37 | // Create the intermediate filters that help implement the transcoder: 38 | ADUFromMP3Source* aduFromMP3 39 | = ADUFromMP3Source::createNew(env, inputSource, False); 40 | // Note: This also checks that "inputSource" is an MP3 source 41 | if (aduFromMP3 == NULL) break; 42 | 43 | MP3ADUTranscoder* aduTranscoder 44 | = MP3ADUTranscoder::createNew(env, outBitrate, aduFromMP3); 45 | if (aduTranscoder == NULL) break; 46 | 47 | // Then create the transcoder itself: 48 | newSource = new MP3Transcoder(env, aduTranscoder); 49 | } while (0); 50 | 51 | return newSource; 52 | } 53 | -------------------------------------------------------------------------------- /live/liveMedia/MPEGVideoStreamParser.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // An abstract parser for MPEG video streams 19 | // Implementation 20 | 21 | #include "MPEGVideoStreamParser.hh" 22 | 23 | MPEGVideoStreamParser 24 | ::MPEGVideoStreamParser(MPEGVideoStreamFramer* usingSource, 25 | FramedSource* inputSource) 26 | : StreamParser(inputSource, FramedSource::handleClosure, usingSource, 27 | &MPEGVideoStreamFramer::continueReadProcessing, usingSource), 28 | fUsingSource(usingSource) { 29 | } 30 | 31 | MPEGVideoStreamParser::~MPEGVideoStreamParser() { 32 | } 33 | 34 | void MPEGVideoStreamParser::restoreSavedParserState() { 35 | StreamParser::restoreSavedParserState(); 36 | fTo = fSavedTo; 37 | fNumTruncatedBytes = fSavedNumTruncatedBytes; 38 | } 39 | 40 | void MPEGVideoStreamParser::registerReadInterest(unsigned char* to, 41 | unsigned maxSize) { 42 | fStartOfFrame = fTo = fSavedTo = to; 43 | fLimit = to + maxSize; 44 | fNumTruncatedBytes = fSavedNumTruncatedBytes = 0; 45 | } 46 | -------------------------------------------------------------------------------- /live/liveMedia/Makefile.head: -------------------------------------------------------------------------------- 1 | INCLUDES = -Iinclude -I../UsageEnvironment/include -I../groupsock/include 2 | PREFIX = /usr/local 3 | LIBDIR = $(PREFIX)/lib 4 | ##### Change the following for your environment: 5 | -------------------------------------------------------------------------------- /live/liveMedia/MatroskaDemuxedTrack.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // A media track, demultiplexed from a Matroska file 19 | // Implementation 20 | 21 | #include "MatroskaDemuxedTrack.hh" 22 | #include "MatroskaFile.hh" 23 | 24 | void MatroskaDemuxedTrack::seekToTime(double& seekNPT) { 25 | fOurSourceDemux.seekToTime(seekNPT); 26 | } 27 | 28 | MatroskaDemuxedTrack::MatroskaDemuxedTrack(UsageEnvironment& env, unsigned trackNumber, MatroskaDemux& sourceDemux) 29 | : FramedSource(env), 30 | fOurTrackNumber(trackNumber), fOurSourceDemux(sourceDemux), fDurationImbalance(0), 31 | fOpusTrackNumber(0) { 32 | fPrevPresentationTime.tv_sec = 0; fPrevPresentationTime.tv_usec = 0; 33 | } 34 | 35 | MatroskaDemuxedTrack::~MatroskaDemuxedTrack() { 36 | fOurSourceDemux.removeTrack(fOurTrackNumber); 37 | } 38 | 39 | void MatroskaDemuxedTrack::doGetNextFrame() { 40 | fOurSourceDemux.continueReading(); 41 | } 42 | 43 | char const* MatroskaDemuxedTrack::MIMEtype() const { 44 | MatroskaTrack* track = fOurSourceDemux.fOurFile.lookup(fOurTrackNumber); 45 | if (track == NULL) return "(unknown)"; // shouldn't happen 46 | return track->mimeType; 47 | } 48 | -------------------------------------------------------------------------------- /live/liveMedia/OggDemuxedTrack.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // A media track, demultiplexed from an Ogg file 19 | // Implementation 20 | 21 | #include "OggDemuxedTrack.hh" 22 | #include "OggFile.hh" 23 | 24 | OggDemuxedTrack::OggDemuxedTrack(UsageEnvironment& env, unsigned trackNumber, OggDemux& sourceDemux) 25 | : FramedSource(env), 26 | fOurTrackNumber(trackNumber), fOurSourceDemux(sourceDemux), 27 | fCurrentPageIsContinuation(False) { 28 | fNextPresentationTime.tv_sec = 0; fNextPresentationTime.tv_usec = 0; 29 | } 30 | 31 | OggDemuxedTrack::~OggDemuxedTrack() { 32 | fOurSourceDemux.removeTrack(fOurTrackNumber); 33 | } 34 | 35 | void OggDemuxedTrack::doGetNextFrame() { 36 | fOurSourceDemux.continueReading(); 37 | } 38 | 39 | char const* OggDemuxedTrack::MIMEtype() const { 40 | OggTrack* track = fOurSourceDemux.fOurFile.lookup(fOurTrackNumber); 41 | if (track == NULL) return "(unknown)"; // shouldn't happen 42 | return track->mimeType; 43 | } 44 | -------------------------------------------------------------------------------- /live/liveMedia/OggDemuxedTrack.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 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // A media track, demultiplexed from an Ogg file 19 | // C++ header 20 | 21 | #ifndef _OGG_DEMUXED_TRACK_HH 22 | #define _OGG_DEMUXED_TRACK_HH 23 | 24 | #ifndef _FRAMED_SOURCE_HH 25 | #include "FramedSource.hh" 26 | #endif 27 | 28 | class OggDemux; // forward 29 | 30 | class OggDemuxedTrack: public FramedSource { 31 | private: // We are created only by a OggDemux (a friend) 32 | friend class OggDemux; 33 | OggDemuxedTrack(UsageEnvironment& env, unsigned trackNumber, OggDemux& sourceDemux); 34 | virtual ~OggDemuxedTrack(); 35 | 36 | private: 37 | // redefined virtual functions: 38 | virtual void doGetNextFrame(); 39 | virtual char const* MIMEtype() const; 40 | 41 | private: // We are accessed only by OggDemux and by OggFileParser (a friend) 42 | friend class OggFileParser; 43 | unsigned char*& to() { return fTo; } 44 | unsigned& maxSize() { return fMaxSize; } 45 | unsigned& frameSize() { return fFrameSize; } 46 | unsigned& numTruncatedBytes() { return fNumTruncatedBytes; } 47 | struct timeval& presentationTime() { return fPresentationTime; } 48 | unsigned& durationInMicroseconds() { return fDurationInMicroseconds; } 49 | struct timeval& nextPresentationTime() { return fNextPresentationTime; } 50 | 51 | private: 52 | unsigned fOurTrackNumber; 53 | OggDemux& fOurSourceDemux; 54 | Boolean fCurrentPageIsContinuation; 55 | struct timeval fNextPresentationTime; 56 | }; 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /live/liveMedia/OggFileServerMediaSubsession.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 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s 19 | // on demand, from a track within an Ogg file. 20 | // C++ header 21 | 22 | #ifndef _OGG_FILE_SERVER_MEDIA_SUBSESSION_HH 23 | #define _OGG_FILE_SERVER_MEDIA_SUBSESSION_HH 24 | 25 | #ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH 26 | #include "FileServerMediaSubsession.hh" 27 | #endif 28 | #ifndef _OGG_FILE_SERVER_DEMUX_HH 29 | #include "OggFileServerDemux.hh" 30 | #endif 31 | 32 | class OggFileServerMediaSubsession: public FileServerMediaSubsession { 33 | public: 34 | static OggFileServerMediaSubsession* 35 | createNew(OggFileServerDemux& demux, OggTrack* track); 36 | 37 | protected: 38 | OggFileServerMediaSubsession(OggFileServerDemux& demux, OggTrack* track); 39 | // called only by createNew(), or by subclass constructors 40 | virtual ~OggFileServerMediaSubsession(); 41 | 42 | protected: // redefined virtual functions 43 | virtual FramedSource* createNewStreamSource(unsigned clientSessionId, 44 | unsigned& estBitrate); 45 | virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource* inputSource); 46 | 47 | protected: 48 | OggFileServerDemux& fOurDemux; 49 | OggTrack* fTrack; 50 | unsigned fNumFiltersInFrontOfTrack; 51 | }; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /live/liveMedia/OutputFile.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // Common routines for opening/closing named output files 19 | // Implementation 20 | 21 | #if (defined(__WIN32__) || defined(_WIN32)) && !defined(_WIN32_WCE) 22 | #include 23 | #include 24 | #endif 25 | #ifndef _WIN32_WCE 26 | #include 27 | #endif 28 | #include 29 | 30 | #include "OutputFile.hh" 31 | 32 | FILE* OpenOutputFile(UsageEnvironment& env, char const* fileName) { 33 | FILE* fid; 34 | 35 | // Check for special case 'file names': "stdout" and "stderr" 36 | if (strcmp(fileName, "stdout") == 0) { 37 | fid = stdout; 38 | #if (defined(__WIN32__) || defined(_WIN32)) && !defined(_WIN32_WCE) 39 | _setmode(_fileno(stdout), _O_BINARY); // convert to binary mode 40 | #endif 41 | } else if (strcmp(fileName, "stderr") == 0) { 42 | fid = stderr; 43 | #if (defined(__WIN32__) || defined(_WIN32)) && !defined(_WIN32_WCE) 44 | _setmode(_fileno(stderr), _O_BINARY); // convert to binary mode 45 | #endif 46 | } else { 47 | fid = fopen(fileName, "wb"); 48 | } 49 | 50 | if (fid == NULL) { 51 | env.setResultMsg("unable to open file \"", fileName, "\""); 52 | } 53 | 54 | return fid; 55 | } 56 | 57 | void CloseOutputFile(FILE* fid) { 58 | // Don't close 'stdout' or 'stderr', in case we want to use it again later. 59 | if (fid != NULL && fid != stdout && fid != stderr) fclose(fid); 60 | } 61 | -------------------------------------------------------------------------------- /live/liveMedia/TextRTPSink.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // A generic RTP sink for text codecs (abstract base class) 19 | // Implementation 20 | 21 | #include "TextRTPSink.hh" 22 | 23 | TextRTPSink::TextRTPSink(UsageEnvironment& env, 24 | Groupsock* rtpgs, unsigned char rtpPayloadType, 25 | unsigned rtpTimestampFrequency, 26 | char const* rtpPayloadFormatName) 27 | : MultiFramedRTPSink(env, rtpgs, rtpPayloadType, rtpTimestampFrequency, 28 | rtpPayloadFormatName) { 29 | } 30 | 31 | TextRTPSink::~TextRTPSink() { 32 | } 33 | 34 | char const* TextRTPSink::sdpMediaType() const { 35 | return "text"; 36 | } 37 | -------------------------------------------------------------------------------- /live/liveMedia/VideoRTPSink.cpp: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // A generic RTP sink for video codecs (abstract base class) 19 | // Implementation 20 | 21 | #include "VideoRTPSink.hh" 22 | 23 | VideoRTPSink::VideoRTPSink(UsageEnvironment& env, 24 | Groupsock* rtpgs, unsigned char rtpPayloadType, 25 | unsigned rtpTimestampFrequency, 26 | char const* rtpPayloadFormatName) 27 | : MultiFramedRTPSink(env, rtpgs, rtpPayloadType, rtpTimestampFrequency, 28 | rtpPayloadFormatName) { 29 | } 30 | 31 | VideoRTPSink::~VideoRTPSink() { 32 | } 33 | 34 | char const* VideoRTPSink::sdpMediaType() const { 35 | return "video"; 36 | } 37 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/AMRAudioFileSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/AMRAudioSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/AudioRTPSink.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/Base64.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/DVVideoRTPSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/FileServerMediaSubsession.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 _ON_DEMAND_SERVER_MEDIA_SUBSESSION_HH 26 | #include "OnDemandServerMediaSubsession.hh" 27 | #endif 28 | 29 | class FileServerMediaSubsession: public OnDemandServerMediaSubsession { 30 | protected: // we're a virtual base class 31 | FileServerMediaSubsession(UsageEnvironment& env, char const* fileName, 32 | Boolean reuseFirstSource); 33 | virtual ~FileServerMediaSubsession(); 34 | 35 | protected: 36 | char const* fFileName; 37 | u_int64_t fFileSize; // if known 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /live/liveMedia/include/FramedFileSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/FramedFilter.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/GSMAudioRTPSink.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/H264VideoStreamFramer.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 Live Networks, Inc. All rights reserved. 18 | // A filter that breaks up a H.264 Video Elementary Stream into NAL units. 19 | // C++ header 20 | 21 | #ifndef _H264_VIDEO_STREAM_FRAMER_HH 22 | #define _H264_VIDEO_STREAM_FRAMER_HH 23 | 24 | #ifndef _H264_OR_5_VIDEO_STREAM_FRAMER_HH 25 | #include "H264or5VideoStreamFramer.hh" 26 | #endif 27 | 28 | class H264VideoStreamFramer: public H264or5VideoStreamFramer { 29 | public: 30 | static H264VideoStreamFramer* createNew(UsageEnvironment& env, FramedSource* inputSource, 31 | Boolean includeStartCodeInOutput = False); 32 | 33 | protected: 34 | H264VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, 35 | Boolean createParser, Boolean includeStartCodeInOutput); 36 | // called only by "createNew()" 37 | virtual ~H264VideoStreamFramer(); 38 | 39 | // redefined virtual functions: 40 | virtual Boolean isH264VideoStreamFramer() const; 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /live/liveMedia/include/H264or5VideoFileSink.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/H265VideoStreamFramer.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/MP3ADURTPSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/MP3Transcoder.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/OutputFile.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/QCELPAudioRTPSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/TextRTPSink.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/VP8VideoRTPSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/VP9VideoRTPSource.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/VideoRTPSink.hh: -------------------------------------------------------------------------------- 1 | /********** 2 | This library is free software; you can redistribute it and/or modify it under 3 | the terms of the GNU Lesser General Public License as published by the 4 | Free Software Foundation; either version 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/liveMedia/include/liveMedia_version.hh: -------------------------------------------------------------------------------- 1 | // Version information for the "liveMedia" library 2 | // Copyright (c) 1996-2015 Live Networks, Inc. All rights reserved. 3 | 4 | #ifndef _LIVEMEDIA_VERSION_HH 5 | #define _LIVEMEDIA_VERSION_HH 6 | 7 | #define LIVEMEDIA_LIBRARY_VERSION_STRING "2015.03.06" 8 | #define LIVEMEDIA_LIBRARY_VERSION_INT 1425600000 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /live/liveMedia/include/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 2.1 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-2015 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 | -------------------------------------------------------------------------------- /live/mediaServer/DynamicRTSPServer.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 2.1 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-2015, Live Networks, Inc. All rights reserved 17 | // A subclass of "RTSPServer" that creates "ServerMediaSession"s on demand, 18 | // based on whether or not the specified stream name exists as a file 19 | // Header file 20 | 21 | #ifndef _DYNAMIC_RTSP_SERVER_HH 22 | #define _DYNAMIC_RTSP_SERVER_HH 23 | 24 | #ifndef _RTSP_SERVER_SUPPORTING_HTTP_STREAMING_HH 25 | #include "RTSPServerSupportingHTTPStreaming.hh" 26 | #endif 27 | 28 | class DynamicRTSPServer: public RTSPServerSupportingHTTPStreaming { 29 | public: 30 | static DynamicRTSPServer* createNew(UsageEnvironment& env, Port ourPort, 31 | UserAuthenticationDatabase* authDatabase, 32 | unsigned reclamationTestSeconds = 65); 33 | 34 | protected: 35 | DynamicRTSPServer(UsageEnvironment& env, int ourSocket, Port ourPort, 36 | UserAuthenticationDatabase* authDatabase, unsigned reclamationTestSeconds); 37 | // called only by createNew(); 38 | virtual ~DynamicRTSPServer(); 39 | 40 | protected: // redefined virtual functions 41 | virtual ServerMediaSession* 42 | lookupServerMediaSession(char const* streamName, Boolean isFirstLookupInSession); 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /live/mediaServer/Makefile.head: -------------------------------------------------------------------------------- 1 | INCLUDES = -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include 2 | # Default library filename suffixes for each library that we link with. The "config.*" file might redefine these later. 3 | libliveMedia_LIB_SUFFIX = $(LIB_SUFFIX) 4 | libBasicUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX) 5 | libUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX) 6 | libgroupsock_LIB_SUFFIX = $(LIB_SUFFIX) 7 | ##### Change the following for your environment: 8 | -------------------------------------------------------------------------------- /live/mediaServer/Makefile.tail: -------------------------------------------------------------------------------- 1 | ##### End of variables to change 2 | 3 | MEDIA_SERVER = live555MediaServer$(EXE) 4 | 5 | PREFIX = /usr/local 6 | ALL = $(MEDIA_SERVER) 7 | all: $(ALL) 8 | 9 | .$(C).$(OBJ): 10 | $(C_COMPILER) -c $(C_FLAGS) $< 11 | .$(CPP).$(OBJ): 12 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $< 13 | 14 | MEDIA_SERVER_OBJS = live555MediaServer.$(OBJ) DynamicRTSPServer.$(OBJ) 15 | 16 | live555MediaServer.$(CPP): DynamicRTSPServer.hh version.hh 17 | DynamicRTSPServer.$(CPP): DynamicRTSPServer.hh 18 | 19 | USAGE_ENVIRONMENT_DIR = ../UsageEnvironment 20 | USAGE_ENVIRONMENT_LIB = $(USAGE_ENVIRONMENT_DIR)/libUsageEnvironment.$(libUsageEnvironment_LIB_SUFFIX) 21 | BASIC_USAGE_ENVIRONMENT_DIR = ../BasicUsageEnvironment 22 | BASIC_USAGE_ENVIRONMENT_LIB = $(BASIC_USAGE_ENVIRONMENT_DIR)/libBasicUsageEnvironment.$(libBasicUsageEnvironment_LIB_SUFFIX) 23 | LIVEMEDIA_DIR = ../liveMedia 24 | LIVEMEDIA_LIB = $(LIVEMEDIA_DIR)/libliveMedia.$(libliveMedia_LIB_SUFFIX) 25 | GROUPSOCK_DIR = ../groupsock 26 | GROUPSOCK_LIB = $(GROUPSOCK_DIR)/libgroupsock.$(libgroupsock_LIB_SUFFIX) 27 | LOCAL_LIBS = $(LIVEMEDIA_LIB) $(GROUPSOCK_LIB) \ 28 | $(BASIC_USAGE_ENVIRONMENT_LIB) $(USAGE_ENVIRONMENT_LIB) 29 | LIBS = $(LOCAL_LIBS) $(LIBS_FOR_CONSOLE_APPLICATION) 30 | 31 | live555MediaServer$(EXE): $(MEDIA_SERVER_OBJS) $(LOCAL_LIBS) 32 | $(LINK)$@ $(CONSOLE_LINK_OPTS) $(MEDIA_SERVER_OBJS) $(LIBS) 33 | 34 | clean: 35 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~ 36 | 37 | install: $(MEDIA_SERVER) 38 | install -d $(DESTDIR)$(PREFIX)/bin 39 | install -m 755 $(MEDIA_SERVER) $(DESTDIR)$(PREFIX)/bin 40 | 41 | ##### Any additional, platform-specific rules come here: 42 | -------------------------------------------------------------------------------- /live/mediaServer/version.hh: -------------------------------------------------------------------------------- 1 | // Copyright (c) 1996-2015, Live Networks, Inc. All rights reserved 2 | // Version information for the LIVE555 Media Server application 3 | // Header file 4 | 5 | #ifndef _MEDIA_SERVER_VERSION_HH 6 | #define _MEDIA_SERVER_VERSION_HH 7 | 8 | #define MEDIA_SERVER_VERSION_STRING "0.86" 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /live/proxyServer/Makefile.head: -------------------------------------------------------------------------------- 1 | INCLUDES = -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include 2 | # Default library filename suffixes for each library that we link with. The "config.*" file might redefine these later. 3 | libliveMedia_LIB_SUFFIX = $(LIB_SUFFIX) 4 | libBasicUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX) 5 | libUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX) 6 | libgroupsock_LIB_SUFFIX = $(LIB_SUFFIX) 7 | ##### Change the following for your environment: 8 | -------------------------------------------------------------------------------- /live/proxyServer/Makefile.tail: -------------------------------------------------------------------------------- 1 | ##### End of variables to change 2 | 3 | PROXY_SERVER = live555ProxyServer$(EXE) 4 | 5 | PREFIX = /usr/local 6 | ALL = $(PROXY_SERVER) 7 | all: $(ALL) 8 | 9 | .$(C).$(OBJ): 10 | $(C_COMPILER) -c $(C_FLAGS) $< 11 | .$(CPP).$(OBJ): 12 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $< 13 | 14 | PROXY_SERVER_OBJS = live555ProxyServer.$(OBJ) 15 | 16 | USAGE_ENVIRONMENT_DIR = ../UsageEnvironment 17 | USAGE_ENVIRONMENT_LIB = $(USAGE_ENVIRONMENT_DIR)/libUsageEnvironment.$(libUsageEnvironment_LIB_SUFFIX) 18 | BASIC_USAGE_ENVIRONMENT_DIR = ../BasicUsageEnvironment 19 | BASIC_USAGE_ENVIRONMENT_LIB = $(BASIC_USAGE_ENVIRONMENT_DIR)/libBasicUsageEnvironment.$(libBasicUsageEnvironment_LIB_SUFFIX) 20 | LIVEMEDIA_DIR = ../liveMedia 21 | LIVEMEDIA_LIB = $(LIVEMEDIA_DIR)/libliveMedia.$(libliveMedia_LIB_SUFFIX) 22 | GROUPSOCK_DIR = ../groupsock 23 | GROUPSOCK_LIB = $(GROUPSOCK_DIR)/libgroupsock.$(libgroupsock_LIB_SUFFIX) 24 | LOCAL_LIBS = $(LIVEMEDIA_LIB) $(GROUPSOCK_LIB) \ 25 | $(BASIC_USAGE_ENVIRONMENT_LIB) $(USAGE_ENVIRONMENT_LIB) 26 | LIBS = $(LOCAL_LIBS) $(LIBS_FOR_CONSOLE_APPLICATION) 27 | 28 | live555ProxyServer$(EXE): $(PROXY_SERVER_OBJS) $(LOCAL_LIBS) 29 | $(LINK)$@ $(CONSOLE_LINK_OPTS) $(PROXY_SERVER_OBJS) $(LIBS) 30 | 31 | clean: 32 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~ 33 | 34 | install: $(PROXY_SERVER) 35 | install -d $(DESTDIR)$(PREFIX)/bin 36 | install -m 755 $(PROXY_SERVER) $(DESTDIR)$(PREFIX)/bin 37 | 38 | ##### Any additional, platform-specific rules come here: 39 | -------------------------------------------------------------------------------- /live/testProgs/Makefile.head: -------------------------------------------------------------------------------- 1 | INCLUDES = -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include 2 | # Default library filename suffixes for each library that we link with. The "config.*" file might redefine these later. 3 | libliveMedia_LIB_SUFFIX = $(LIB_SUFFIX) 4 | libBasicUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX) 5 | libUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX) 6 | libgroupsock_LIB_SUFFIX = $(LIB_SUFFIX) 7 | ##### Change the following for your environment: 8 | -------------------------------------------------------------------------------- /live/testProgs/testMP3-using-ADUs.sdp: -------------------------------------------------------------------------------- 1 | v=0 2 | o=- 49452 4 IN IP4 127.0.0.1 3 | s=Test MP3 session 4 | i=Parameters for the session streamed by "testMP3Streamer" 5 | t=0 0 6 | a=tool:testMP3Streamer 7 | a=type:broadcast 8 | m=audio 6666 RTP/AVP 96 9 | c=IN IP4 239.255.42.42/127 10 | a=rtpmap:96 mpa-robust/90000 11 | -------------------------------------------------------------------------------- /live/testProgs/testMP3.sdp: -------------------------------------------------------------------------------- 1 | v=0 2 | o=- 49452 4 IN IP4 127.0.0.1 3 | s=Test MP3 session 4 | i=Parameters for the session streamed by "testMP3Streamer" 5 | t=0 0 6 | a=tool:testMP3Streamer 7 | a=type:broadcast 8 | m=audio 6666 RTP/AVP 14 9 | c=IN IP4 239.255.42.42/127 10 | -------------------------------------------------------------------------------- /live/testProgs/testMPEG1or2AudioVideo.sdp: -------------------------------------------------------------------------------- 1 | v=0 2 | o=- 49451 3 IN IP4 127.0.0.1 3 | s=Test MPEG Audio+Video session 4 | i=Parameters for the session streamed by "testMPEG1or2AudioVideoStreamer" 5 | t=0 0 6 | a=tool:testMPEG1or2AudioVideoStreamer 7 | a=type:broadcast 8 | m=audio 6666 RTP/AVP 14 9 | c=IN IP4 239.255.42.42/127 10 | m=video 8888 RTP/AVP 32 11 | c=IN IP4 239.255.42.42/127 12 | -------------------------------------------------------------------------------- /live/testProgs/testMPEG1or2Video.sdp: -------------------------------------------------------------------------------- 1 | v=0 2 | o=- 49451 3 IN IP4 127.0.0.1 3 | s=Test MPEG Video session 4 | i=Parameters for the session streamed by "testMPEG1or2VideoStreamer" 5 | t=0 0 6 | a=tool:testMPEG1or2VideoStreamer 7 | a=type:broadcast 8 | m=video 8888 RTP/AVP 32 9 | c=IN IP4 239.255.42.42/127 10 | -------------------------------------------------------------------------------- /live/testProgs/testMPEG2Transport.sdp: -------------------------------------------------------------------------------- 1 | v=0 2 | o=- 49451 3 IN IP4 127.0.0.1 3 | s=Test MPEG-2 Transport Stream session 4 | i=Parameters for the session streamed by "testMPEG2TransportStreamer" 5 | t=0 0 6 | a=tool:testMPEG2TransportStreamer 7 | a=type:broadcast 8 | m=video 1234 RTP/AVP 33 9 | c=IN IP4 239.255.42.42/127 10 | -------------------------------------------------------------------------------- /live/win32config: -------------------------------------------------------------------------------- 1 | # Comment out the following line to produce Makefiles that generate debuggable code: 2 | NODEBUG=1 3 | 4 | # The following definition ensures that we are properly matching 5 | # the WinSock2 library file with the correct header files. 6 | # (will link with "ws2_32.lib" and include "winsock2.h" & "Ws2tcpip.h") 7 | TARGETOS = WINNT 8 | 9 | # If for some reason you wish to use WinSock1 instead, uncomment the 10 | # following two definitions. 11 | # (will link with "wsock32.lib" and include "winsock.h") 12 | #TARGETOS = WIN95 13 | #APPVER = 4.0 14 | 15 | !include 16 | 17 | UI_OPTS = $(guilflags) $(guilibsdll) 18 | # Use the following to get a console (e.g., for debugging): 19 | CONSOLE_UI_OPTS = $(conlflags) $(conlibsdll) 20 | CPU=i386 21 | 22 | TOOLS32 = c:\Program Files\DevStudio\Vc 23 | COMPILE_OPTS = $(INCLUDES) $(cdebug) $(cflags) $(cvarsdll) -I. -I"$(TOOLS32)\include" 24 | C = c 25 | C_COMPILER = "$(TOOLS32)\bin\cl" 26 | C_FLAGS = $(COMPILE_OPTS) 27 | CPP = cpp 28 | CPLUSPLUS_COMPILER = $(C_COMPILER) 29 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) 30 | OBJ = obj 31 | LINK = $(link) -out: 32 | LIBRARY_LINK = lib -out: 33 | LINK_OPTS_0 = $(linkdebug) msvcirt.lib 34 | LIBRARY_LINK_OPTS = 35 | LINK_OPTS = $(LINK_OPTS_0) $(UI_OPTS) 36 | CONSOLE_LINK_OPTS = $(LINK_OPTS_0) $(CONSOLE_UI_OPTS) 37 | SERVICE_LINK_OPTS = kernel32.lib advapi32.lib shell32.lib -subsystem:console,$(APPVER) 38 | LIB_SUFFIX = lib 39 | LIBS_FOR_CONSOLE_APPLICATION = 40 | LIBS_FOR_GUI_APPLICATION = 41 | MULTIMEDIA_LIBS = winmm.lib 42 | EXE = .exe 43 | PLATFORM = Windows 44 | 45 | rc32 = "$(TOOLS32)\bin\rc" 46 | .rc.res: 47 | $(rc32) $< 48 | -------------------------------------------------------------------------------- /live/win32config.Borland: -------------------------------------------------------------------------------- 1 | # Comment out the following line to produce Makefiles that generate debuggable code: 2 | NODEBUG=1 3 | 4 | # The following definition ensures that we are properly matching 5 | # the WinSock2 library file with the correct header files. 6 | # (will link with "ws2_32.lib" and include "winsock2.h" & "Ws2tcpip.h") 7 | TARGETOS = WINNT 8 | 9 | # If for some reason you wish to use WinSock1 instead, uncomment the 10 | # following two definitions. 11 | # (will link with "wsock32.lib" and include "winsock.h") 12 | #TARGETOS = WIN95 13 | #APPVER = 4.0 14 | 15 | #!include 16 | 17 | UI_OPTS = $(guilflags) $(guilibsdll) 18 | # Use the following to get a console (e.g., for debugging): 19 | CONSOLE_UI_OPTS = $(conlflags) $(conlibsdll) 20 | CPU=i386 21 | 22 | TOOLS32 = C:\Progra~1\Borland\CBuilder5 23 | COMPILE_OPTS = $(INCLUDES) $(cdebug) $(cflags) $(cvarsdll) -I. -I$(TOOLS32)\include 24 | C = c 25 | C_COMPILER = $(TOOLS32)\bin\bcc32 26 | C_FLAGS = $(COMPILE_OPTS) 27 | CPP = cpp 28 | CPLUSPLUS_COMPILER = $(C_COMPILER) 29 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) 30 | OBJ = obj 31 | LINK = $(TOOLS32)\bin\ilink32 32 | LIBRARY_LINK = $(TOOLS32)\bin\tlib 33 | LINK_OPTS_0 = $(linkdebug) msvcirt.lib 34 | LIBRARY_LINK_OPTS = /u 35 | LINK_OPTS = $(LINK_OPTS_0) $(UI_OPTS) 36 | CONSOLE_LINK_OPTS = c0x32 37 | 38 | SERVICE_LINK_OPTS = kernel32.lib advapi32.lib shell32.lib -subsystem:console,$(APPVER) 39 | LIB_SUFFIX = lib 40 | LIBS_FOR_CONSOLE_APPLICATION = cw32.lib import32.lib 41 | LIBS_FOR_GUI_APPLICATION = ,,cw32 42 | EXE = 43 | 44 | rc32 = $(TOOLS32)\bin\brc32" 45 | .rc.res: 46 | $(rc32) $< 47 | -------------------------------------------------------------------------------- /src/CameraThread.hh: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Peter Gaal 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | // Camera Thread 20 | 21 | #ifndef _CAMERA_THREAD_HH_INCLUDED 22 | #define _CAMERA_THREAD_HH_INCLUDED 23 | 24 | #include "BasicUsageEnvironment.hh" 25 | #include 26 | 27 | extern std::mutex lock_jpegbuffer; 28 | extern char CamThreadFrameBuffer[256 * 1024]; 29 | extern int CamThreadFrameBufferSize; 30 | void cam_thread_main(TaskScheduler* env, int fps); 31 | 32 | 33 | #endif /* _CAMERA_THREAD_HH_INCLUDED */ 34 | -------------------------------------------------------------------------------- /src/JPEGMediaSubsession.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Peter Gaal 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | // JPEG Media subsession 20 | 21 | #include "JPEGMediaSubsession.hh" 22 | #include "FramedSource.hh" 23 | #include "CameraJPEGDeviceSource.hh" 24 | #include "JPEGVideoRTPSink.hh" 25 | 26 | JPEGMediaSubsession::JPEGMediaSubsession(UsageEnvironment& env, char const* fileName, 27 | Boolean reuseFirstSource) 28 | : OnDemandServerMediaSubsession(env, reuseFirstSource), 29 | fFileSize(0) { 30 | fFileName = strDup(fileName); 31 | } 32 | 33 | JPEGMediaSubsession::~JPEGMediaSubsession() { 34 | delete[] (char*)fFileName; 35 | } 36 | 37 | 38 | FramedSource* JPEGMediaSubsession::createNewStreamSource(unsigned clientSessionId, unsigned& estBitrate) 39 | { 40 | FramedSource* framedSource = CameraJPEGDeviceSource::createNew(envir(), clientSessionId); 41 | return framedSource; 42 | } 43 | 44 | RTPSink* JPEGMediaSubsession::createNewRTPSink(Groupsock* rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource* inputSource){ 45 | 46 | return JPEGVideoRTPSink::createNew(envir(), rtpGroupsock); 47 | } 48 | -------------------------------------------------------------------------------- /src/JPEGMediaSubsession.hh: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Peter Gaal 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | // JPEG Media subsession 20 | // C++ header 21 | 22 | 23 | #include "OnDemandServerMediaSubsession.hh" 24 | #include "FramedSource.hh" 25 | #include "RTPSink.hh" 26 | 27 | class JPEGMediaSubsession: public OnDemandServerMediaSubsession { 28 | public: 29 | JPEGMediaSubsession(UsageEnvironment& env, char const* fileName, 30 | Boolean reuseFirstSource); 31 | ~JPEGMediaSubsession(); 32 | protected: 33 | virtual FramedSource* JPEGMediaSubsession::createNewStreamSource(unsigned clientSessionId, unsigned& estBitrate); 34 | virtual RTPSink* JPEGMediaSubsession::createNewRTPSink(Groupsock* rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource* inputSource); 35 | private: 36 | char const* fFileName; 37 | u_int64_t fFileSize; // if known 38 | }; 39 | -------------------------------------------------------------------------------- /vs2013/JpegRtspCamera/JpegRtspCamera.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Express 2013 for Windows Desktop 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JpegRtspCamera", "JpegRtspCamera\JpegRtspCamera.vcxproj", "{79E55550-69F2-4AC8-91EB-CAF13D598B5E}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Release|Win32 = Release|Win32 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {79E55550-69F2-4AC8-91EB-CAF13D598B5E}.Debug|Win32.ActiveCfg = Debug|Win32 15 | {79E55550-69F2-4AC8-91EB-CAF13D598B5E}.Debug|Win32.Build.0 = Debug|Win32 16 | {79E55550-69F2-4AC8-91EB-CAF13D598B5E}.Release|Win32.ActiveCfg = Release|Win32 17 | {79E55550-69F2-4AC8-91EB-CAF13D598B5E}.Release|Win32.Build.0 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /vs2015/JpegRtspCamera/JpegRtspCamera.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Express 2013 for Windows Desktop 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JpegRtspCamera", "JpegRtspCamera\JpegRtspCamera.vcxproj", "{79E55550-69F2-4AC8-91EB-CAF13D598B5E}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Release|Win32 = Release|Win32 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {79E55550-69F2-4AC8-91EB-CAF13D598B5E}.Debug|Win32.ActiveCfg = Debug|Win32 15 | {79E55550-69F2-4AC8-91EB-CAF13D598B5E}.Debug|Win32.Build.0 = Debug|Win32 16 | {79E55550-69F2-4AC8-91EB-CAF13D598B5E}.Release|Win32.ActiveCfg = Release|Win32 17 | {79E55550-69F2-4AC8-91EB-CAF13D598B5E}.Release|Win32.Build.0 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | --------------------------------------------------------------------------------