├── live
├── liveMedia
│ ├── grep
│ ├── COPYING
│ ├── COPYING.LESSER
│ ├── Makefile.head
│ ├── FramedFileSource.cpp
│ ├── include
│ │ ├── HMAC_SHA1.hh
│ │ ├── OutputFile.hh
│ │ ├── liveMedia_version.hh
│ │ ├── FramedFileSource.hh
│ │ ├── HMAC_hash.hh
│ │ ├── QCELPAudioRTPSource.hh
│ │ ├── MP3Transcoder.hh
│ │ ├── RawVideoFrameParameters.hh
│ │ ├── TextRTPSink.hh
│ │ ├── VideoRTPSink.hh
│ │ ├── GSMAudioRTPSink.hh
│ │ ├── AudioRTPSink.hh
│ │ ├── AMRAudioFileSource.hh
│ │ ├── FileServerMediaSubsession.hh
│ │ ├── MP3ADURTPSource.hh
│ │ ├── Base64.hh
│ │ ├── H264or5VideoFileSink.hh
│ │ ├── JPEG2000VideoRTPSink.hh
│ │ ├── H264VideoStreamFramer.hh
│ │ ├── H265VideoStreamFramer.hh
│ │ ├── AMRAudioSource.hh
│ │ ├── DVVideoRTPSource.hh
│ │ ├── FramedFilter.hh
│ │ ├── VP8VideoRTPSource.hh
│ │ ├── VP9VideoRTPSource.hh
│ │ ├── AC3AudioRTPSource.hh
│ │ ├── MPEG4ESVideoRTPSource.hh
│ │ ├── MPEG1or2AudioRTPSink.hh
│ │ ├── MPEG2TransportStreamDemux.hh
│ │ ├── AMRAudioFileSink.hh
│ │ ├── BasicUDPSource.hh
│ │ ├── MPEG1or2AudioRTPSource.hh
│ │ ├── H264VideoFileSink.hh
│ │ ├── JPEG2000VideoRTPSource.hh
│ │ ├── ourMD5.hh
│ │ ├── AMRAudioRTPSource.hh
│ │ ├── H261VideoRTPSource.hh
│ │ ├── TheoraVideoRTPSource.hh
│ │ ├── MPEG1or2VideoRTPSource.hh
│ │ ├── VP8VideoRTPSink.hh
│ │ ├── VP9VideoRTPSink.hh
│ │ ├── MP3ADURTPSink.hh
│ │ ├── AC3AudioFileServerMediaSubsession.hh
│ │ ├── ADTSAudioFileSource.hh
│ │ ├── AMRAudioFileServerMediaSubsession.hh
│ │ ├── JPEGVideoRTPSink.hh
│ │ ├── H264VideoStreamDiscreteFramer.hh
│ │ ├── H265VideoStreamDiscreteFramer.hh
│ │ └── ADTSAudioFileServerMediaSubsession.hh
│ ├── AMRAudioSource.cpp
│ ├── TextRTPSink.cpp
│ ├── FileServerMediaSubsession.cpp
│ ├── MPEG2TransportStreamDemuxedTrack.cpp
│ ├── VideoRTPSink.cpp
│ ├── AudioRTPSink.cpp
│ ├── JPEGVideoSource.cpp
│ ├── GSMAudioRTPSink.cpp
│ ├── OggDemuxedTrack.cpp
│ ├── AudioInputDevice.cpp
│ ├── MPEGVideoStreamParser.cpp
│ ├── H264VideoStreamFramer.cpp
│ ├── H265VideoStreamFramer.cpp
│ ├── MP3ADUdescriptor.hh
│ ├── MP3Transcoder.cpp
│ ├── MPEG2TransportStreamDemuxedTrack.hh
│ ├── FramedFilter.cpp
│ ├── H264VideoStreamDiscreteFramer.cpp
│ └── H265VideoStreamDiscreteFramer.cpp
├── groupsock
│ ├── COPYING
│ ├── COPYING.LESSER
│ ├── Makefile.head
│ ├── include
│ │ ├── IOHandlers.hh
│ │ └── groupsock_version.hh
│ ├── Makefile.tail
│ ├── GroupEId.cpp
│ └── IOHandlers.cpp
├── hlsProxy
│ ├── COPYING
│ ├── COPYING.LESSER
│ ├── Makefile.head
│ └── Makefile.tail
├── testProgs
│ ├── COPYING
│ ├── COPYING.LESSER
│ ├── testMP3.sdp
│ ├── testMPEG1or2Video.sdp
│ ├── testMP3-using-ADUs.sdp
│ ├── testMPEG2Transport.sdp
│ ├── testMPEG1or2AudioVideo.sdp
│ ├── Makefile.head
│ ├── announceURL.hh
│ └── announceURL.cpp
├── mediaServer
│ ├── COPYING
│ ├── COPYING.LESSER
│ ├── Makefile.head
│ ├── version.hh
│ ├── Makefile.tail
│ └── DynamicRTSPServer.hh
├── proxyServer
│ ├── COPYING
│ ├── COPYING.LESSER
│ ├── Makefile.head
│ └── Makefile.tail
├── UsageEnvironment
│ ├── COPYING
│ ├── COPYING.LESSER
│ ├── Makefile.head
│ ├── include
│ │ ├── UsageEnvironment_version.hh
│ │ ├── Boolean.hh
│ │ └── strDup.hh
│ ├── Makefile.tail
│ ├── HashTable.cpp
│ ├── strDup.cpp
│ └── Makefile
├── BasicUsageEnvironment
│ ├── COPYING
│ ├── COPYING.LESSER
│ ├── Makefile.head
│ ├── include
│ │ └── BasicUsageEnvironment_version.hh
│ └── Makefile.tail
├── Makefile.head
├── README
├── configure
├── config.freebsd-no-openssl
├── config.freebsd
├── config.openbsd
├── config.linux-gdb
├── config.linux-64bit
├── config.cygwin
├── config.linux-no-openssl
├── config.macosx-no-openssl
├── config.solaris-32bit
├── config.linux
├── config.raspberrypi
├── config.linux-gdb-sanitize
├── config.macosx-bigsur
├── genMakefiles
├── config.linux-no-std-lib
├── config.cygwin-for-vlc
├── config.macosx-catalina
├── config.linux-gdb-no-std-lib
├── fix-makefile
├── config.armlinux
├── config.qnx4
├── config.mingw
├── config.solaris-64bit
├── config.bfin-uclinux
├── config.bfin-linux-uclibc
├── config.avr32-linux
├── config.armeb-uclibc
├── config.bsplinux
├── config.uClinux
├── config.cris-axis-linux-gnu
├── genWindowsMakefiles.cmd
├── genWindowsMakefiles
├── config.iphoneos
├── WindowsAudioInputDevice
│ └── showAudioInputPorts.cpp
├── config.iphone-simulator
├── win32config.Borland
├── win32config
└── Makefile.tail
├── compile.sh
├── FfmpegEncoder.h
├── UsbCameraOnDemandRTSPServer.h
├── FfmpegFrameSource.h
├── FfmpegH264LiveServerMediaSubsession.h
├── main.cpp
├── UsbCameraServer.sln
├── FfmpegH264LiveServerMediaSubsession.cpp
└── CameraDevice.hpp
/live/liveMedia/grep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/live/groupsock/COPYING:
--------------------------------------------------------------------------------
1 | ../COPYING
--------------------------------------------------------------------------------
/live/hlsProxy/COPYING:
--------------------------------------------------------------------------------
1 | ../COPYING
--------------------------------------------------------------------------------
/live/liveMedia/COPYING:
--------------------------------------------------------------------------------
1 | ../COPYING
--------------------------------------------------------------------------------
/live/testProgs/COPYING:
--------------------------------------------------------------------------------
1 | ../COPYING
--------------------------------------------------------------------------------
/live/mediaServer/COPYING:
--------------------------------------------------------------------------------
1 | ../COPYING
--------------------------------------------------------------------------------
/live/proxyServer/COPYING:
--------------------------------------------------------------------------------
1 | ../COPYING
--------------------------------------------------------------------------------
/live/UsageEnvironment/COPYING:
--------------------------------------------------------------------------------
1 | ../COPYING
--------------------------------------------------------------------------------
/live/BasicUsageEnvironment/COPYING:
--------------------------------------------------------------------------------
1 | ../COPYING
--------------------------------------------------------------------------------
/live/groupsock/COPYING.LESSER:
--------------------------------------------------------------------------------
1 | ../COPYING.LESSER
--------------------------------------------------------------------------------
/live/hlsProxy/COPYING.LESSER:
--------------------------------------------------------------------------------
1 | ../COPYING.LESSER
--------------------------------------------------------------------------------
/live/liveMedia/COPYING.LESSER:
--------------------------------------------------------------------------------
1 | ../COPYING.LESSER
--------------------------------------------------------------------------------
/live/mediaServer/COPYING.LESSER:
--------------------------------------------------------------------------------
1 | ../COPYING.LESSER
--------------------------------------------------------------------------------
/live/proxyServer/COPYING.LESSER:
--------------------------------------------------------------------------------
1 | ../COPYING.LESSER
--------------------------------------------------------------------------------
/live/testProgs/COPYING.LESSER:
--------------------------------------------------------------------------------
1 | ../COPYING.LESSER
--------------------------------------------------------------------------------
/live/UsageEnvironment/COPYING.LESSER:
--------------------------------------------------------------------------------
1 | ../COPYING.LESSER
--------------------------------------------------------------------------------
/live/BasicUsageEnvironment/COPYING.LESSER:
--------------------------------------------------------------------------------
1 | ../COPYING.LESSER
--------------------------------------------------------------------------------
/live/Makefile.head:
--------------------------------------------------------------------------------
1 | ##### Change the following for your environment:
2 |
--------------------------------------------------------------------------------
/compile.sh:
--------------------------------------------------------------------------------
1 | rm -rf build
2 | mkdir build
3 | cd build
4 | cmake .. && make -j
5 | cd ..
6 |
7 |
--------------------------------------------------------------------------------
/live/README:
--------------------------------------------------------------------------------
1 | For documentation and instructions for building this software,
2 | see
3 |
--------------------------------------------------------------------------------
/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/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/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/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/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/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/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/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/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/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/hlsProxy/Makefile.head:
--------------------------------------------------------------------------------
1 | PREFIX = /usr/local
2 | INCLUDES = -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include
3 | # Default library filename suffixes for each library that we link with. The "config.*" file might redefine these later.
4 | libliveMedia_LIB_SUFFIX = $(LIB_SUFFIX)
5 | libBasicUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX)
6 | libUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX)
7 | libgroupsock_LIB_SUFFIX = $(LIB_SUFFIX)
8 | ##### Change the following for your environment:
9 |
--------------------------------------------------------------------------------
/live/mediaServer/Makefile.head:
--------------------------------------------------------------------------------
1 | PREFIX = /usr/local
2 | INCLUDES = -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include
3 | # Default library filename suffixes for each library that we link with. The "config.*" file might redefine these later.
4 | libliveMedia_LIB_SUFFIX = $(LIB_SUFFIX)
5 | libBasicUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX)
6 | libUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX)
7 | libgroupsock_LIB_SUFFIX = $(LIB_SUFFIX)
8 | ##### Change the following for your environment:
9 |
--------------------------------------------------------------------------------
/live/proxyServer/Makefile.head:
--------------------------------------------------------------------------------
1 | PREFIX = /usr/local
2 | INCLUDES = -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include
3 | # Default library filename suffixes for each library that we link with. The "config.*" file might redefine these later.
4 | libliveMedia_LIB_SUFFIX = $(LIB_SUFFIX)
5 | libBasicUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX)
6 | libUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX)
7 | libgroupsock_LIB_SUFFIX = $(LIB_SUFFIX)
8 | ##### Change the following for your environment:
9 |
--------------------------------------------------------------------------------
/live/testProgs/Makefile.head:
--------------------------------------------------------------------------------
1 | PREFIX = /usr/local
2 | INCLUDES = -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include
3 | # Default library filename suffixes for each library that we link with. The "config.*" file might redefine these later.
4 | libliveMedia_LIB_SUFFIX = $(LIB_SUFFIX)
5 | libBasicUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX)
6 | libUsageEnvironment_LIB_SUFFIX = $(LIB_SUFFIX)
7 | libgroupsock_LIB_SUFFIX = $(LIB_SUFFIX)
8 | ##### Change the following for your environment:
9 |
--------------------------------------------------------------------------------
/live/config.freebsd-no-openssl:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I. -O -DBSD=1 -DNEWLOCALE_NOT_USED=1 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -DNO_OPENSSL=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.freebsd:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -I. -O -DBSD=1 -DNEWLOCALE_NOT_USED=1 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1
2 | C = c
3 | C_COMPILER = cc
4 | C_FLAGS = $(COMPILE_OPTS)
5 | CPP = cpp
6 | CPLUSPLUS_COMPILER = c++
7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall
8 | OBJ = o
9 | LINK = c++ -o
10 | LINK_OPTS = -L.
11 | CONSOLE_LINK_OPTS = $(LINK_OPTS)
12 | LIBRARY_LINK = ar cr
13 | LIBRARY_LINK_OPTS =
14 | LIB_SUFFIX = a
15 | LIBS_FOR_CONSOLE_APPLICATION = -lssl -lcrypto
16 | LIBS_FOR_GUI_APPLICATION =
17 | EXE =
18 |
--------------------------------------------------------------------------------
/live/config.openbsd:
--------------------------------------------------------------------------------
1 | .SUFFIXES: .cpp
2 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -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 = -lssl -lcrypto
17 | LIBS_FOR_GUI_APPLICATION =
18 | EXE =
19 |
--------------------------------------------------------------------------------
/live/config.linux-gdb:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -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 = -lssl -lcrypto
16 | LIBS_FOR_GUI_APPLICATION =
17 | EXE =
18 |
--------------------------------------------------------------------------------
/live/config.linux-64bit:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -m64 -fPIC -I/usr/local/include -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 = -lssl -lcrypto
16 | LIBS_FOR_GUI_APPLICATION =
17 | EXE =
18 |
--------------------------------------------------------------------------------
/live/config.cygwin:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -I. -O -DSOCKLEN_T=socklen_t -DNEWLOCALE_NOT_USED=1
2 | C = c
3 | C_COMPILER = gcc
4 | C_FLAGS = $(COMPILE_OPTS) -DUSE_OUR_BZERO=1 -D__CYGWIN__
5 | CPP = cpp
6 | CPLUSPLUS_COMPILER = c++
7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1
8 | OBJ = o
9 | LINK = c++ -o
10 | LINK_OPTS = -L.
11 | CONSOLE_LINK_OPTS = $(LINK_OPTS)
12 | LIBRARY_LINK = ld -o
13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic
14 | LIB_SUFFIX = a
15 | LIBS_FOR_CONSOLE_APPLICATION = -lssl -lcrypto
16 | LIBS_FOR_GUI_APPLICATION =
17 | EXE =
18 |
--------------------------------------------------------------------------------
/live/config.linux-no-openssl:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DNO_OPENSSL=1
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.macosx-no-openssl:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I. -I/usr/local/include $(EXTRA_LDFLAGS) -DBSD=1 -O -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -DTIME_BASE=int -DNEED_XLOCALE_H=1 -DNO_OPENSSL=1
2 | C = c
3 | C_COMPILER = cc
4 | C_FLAGS = $(COMPILE_OPTS)
5 | CPP = cpp
6 | CPLUSPLUS_COMPILER = c++
7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall
8 | OBJ = o
9 | LINK = c++ -o
10 | LINK_OPTS = -L.
11 | CONSOLE_LINK_OPTS = $(LINK_OPTS)
12 | LIBRARY_LINK = libtool -s -o
13 | LIBRARY_LINK_OPTS =
14 | LIB_SUFFIX = a
15 | LIBS_FOR_CONSOLE_APPLICATION =
16 | LIBS_FOR_GUI_APPLICATION =
17 | EXE =
18 |
--------------------------------------------------------------------------------
/live/config.solaris-32bit:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -I. -O -DSOLARIS -DNEWLOCALE_NOT_USED -DSOCKLEN_T=socklen_t
2 | C = c
3 | C_COMPILER = cc
4 | C_FLAGS = $(COMPILE_OPTS)
5 | CPP = cpp
6 | CPLUSPLUS_COMPILER = c++
7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall
8 | OBJ = o
9 | LINK = c++ -o
10 | LINK_OPTS = -L.
11 | CONSOLE_LINK_OPTS = $(LINK_OPTS)
12 | LIBRARY_LINK = ld -o
13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -dn
14 | LIB_SUFFIX = a
15 | LIBS_FOR_CONSOLE_APPLICATION = -lsocket -lnsl -lssl -lcrypto
16 | LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION)
17 | EXE =
18 |
--------------------------------------------------------------------------------
/live/config.linux:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -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 = -lssl -lcrypto
16 | LIBS_FOR_GUI_APPLICATION =
17 | EXE =
18 |
--------------------------------------------------------------------------------
/live/config.raspberrypi:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DNO_OPENSSL=1 -DNO_STD_LIB=1
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-gdb-sanitize:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -I. -O -DSOCKLEN_T=socklen_t -g -fsanitize=address,undefined -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. -lasan -lubsan
11 | CONSOLE_LINK_OPTS = $(LINK_OPTS)
12 | LIBRARY_LINK = ar cr
13 | LIBRARY_LINK_OPTS =
14 | LIB_SUFFIX = a
15 | LIBS_FOR_CONSOLE_APPLICATION = -lssl -lcrypto
16 | LIBS_FOR_GUI_APPLICATION =
17 | EXE =
18 |
--------------------------------------------------------------------------------
/live/config.macosx-bigsur:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I. -I/usr/local/include $(EXTRA_LDFLAGS) -DBSD=1 -O -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -DTIME_BASE=int -DNEED_XLOCALE_H=1
2 | C = c
3 | C_COMPILER = cc
4 | C_FLAGS = $(COMPILE_OPTS)
5 | CPP = cpp
6 | CPLUSPLUS_COMPILER = c++
7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall
8 | OBJ = o
9 | LINK = c++ -o
10 | LINK_OPTS = -L. -L/usr/local/ssl/lib
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 = -lssl -lcrypto
16 | LIBS_FOR_GUI_APPLICATION =
17 | EXE =
18 |
--------------------------------------------------------------------------------
/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 | platform=$1
14 | subdirs="liveMedia groupsock UsageEnvironment BasicUsageEnvironment testProgs mediaServer proxyServer hlsProxy"
15 |
16 | for subdir in $subdirs
17 | do
18 | /bin/rm -f $subdir/Makefile
19 | cat $subdir/Makefile.head config.$platform $subdir/Makefile.tail > $subdir/Makefile
20 | chmod a-w $subdir/Makefile
21 | done
22 |
23 | /bin/rm -f Makefile
24 | cat Makefile.head config.$1 Makefile.tail > Makefile
25 | chmod a-w Makefile
26 |
--------------------------------------------------------------------------------
/live/config.linux-no-std-lib:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DNO_STD_LIB=1
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 = -lssl -lcrypto
16 | LIBS_FOR_GUI_APPLICATION =
17 | EXE =
18 |
--------------------------------------------------------------------------------
/live/config.cygwin-for-vlc:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -I. -O -DSOCKLEN_T=socklen_t -DNEWLOCALE_NOT_USED=1
2 | C = c
3 | C_COMPILER = gcc
4 | C_FLAGS = $(COMPILE_OPTS) -DUSE_OUR_BZERO=1 -D_WIN32 -mno-cygwin
5 | CPP = cpp
6 | CPLUSPLUS_COMPILER = c++
7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 -D_WIN32 -Wno-deprecated -mno-cygwin
8 | OBJ = o
9 | LINK = c++ -o
10 | LINK_OPTS = -L.
11 | CONSOLE_LINK_OPTS = $(LINK_OPTS)
12 | LIBRARY_LINK = ld -o
13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic
14 | LIB_SUFFIX = a
15 | LIBS_FOR_CONSOLE_APPLICATION = -lssl -lcrypto
16 | LIBS_FOR_GUI_APPLICATION =
17 | EXE =
18 |
--------------------------------------------------------------------------------
/live/config.macosx-catalina:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I. -I/usr/local/include $(EXTRA_LDFLAGS) -DBSD=1 -O -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -DTIME_BASE=int -DNEED_XLOCALE_H=1
2 | C = c
3 | C_COMPILER = cc
4 | C_FLAGS = $(COMPILE_OPTS)
5 | CPP = cpp
6 | CPLUSPLUS_COMPILER = c++
7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall
8 | OBJ = o
9 | LINK = c++ -o
10 | LINK_OPTS = -L.
11 | CONSOLE_LINK_OPTS = $(LINK_OPTS)
12 | LIBRARY_LINK = libtool -s -o
13 | LIBRARY_LINK_OPTS =
14 | LIB_SUFFIX = a
15 | LIBS_FOR_CONSOLE_APPLICATION = /usr/lib/libssl.46.dylib /usr/lib/libcrypto.44.dylib
16 | LIBS_FOR_GUI_APPLICATION =
17 | EXE =
18 |
--------------------------------------------------------------------------------
/FfmpegEncoder.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 |
4 | #pragma once
5 |
6 | #ifdef __cplusplus
7 | extern "C" {
8 | #include "libavformat/avformat.h"
9 | #include "libswscale/swscale.h"
10 | #include
11 | #include
12 | #include
13 |
14 | }
15 |
16 | #endif
17 |
18 |
19 | class FfmpegEncoder
20 | {
21 | AVCodec *m_h264Codec;
22 | AVCodecContext *m_h264Enc;
23 | SwsContext *m_swsContex = nullptr;
24 |
25 | public:
26 | FfmpegEncoder();
27 | int CreateEncoder(int width, int height);
28 | int Encode(AVFrame *src, AVPacket *pkt);
29 | ~FfmpegEncoder();
30 | };
31 |
32 |
--------------------------------------------------------------------------------
/live/config.linux-gdb-no-std-lib:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -I. -O -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DNO_STD_LIB=1 -g
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 = -lssl -lcrypto
16 | LIBS_FOR_GUI_APPLICATION =
17 | EXE =
18 |
--------------------------------------------------------------------------------
/live/fix-makefile:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # the next line restarts using tclsh \
3 | exec tclsh "$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/config.armlinux:
--------------------------------------------------------------------------------
1 | CROSS_COMPILE?= arm-elf-
2 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -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 = -lssl -lcrypto
17 | LIBS_FOR_GUI_APPLICATION =
18 | EXE =
19 |
--------------------------------------------------------------------------------
/UsbCameraOnDemandRTSPServer.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "liveMedia.hh"
3 | #include
4 |
5 | class UsbCameraOnDemandRTSPServer
6 | {
7 | RTSPServer* m_rtspServer;
8 | UsageEnvironment* m_env;
9 | std::string m_h264file;
10 |
11 | UsageEnvironment &env() {
12 | return *m_env;
13 | }
14 |
15 | void announceStream(RTSPServer* rtspServer, ServerMediaSession* sms,
16 | char const* streamName, char const* inputFileName); // fwd
17 |
18 | public:
19 | UsbCameraOnDemandRTSPServer();
20 | virtual ~UsbCameraOnDemandRTSPServer();
21 | void SetH264File(const std::string &filename);
22 |
23 | int StartServer();
24 | int StopServer();
25 |
26 |
27 |
28 | };
--------------------------------------------------------------------------------
/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/usr/local/include -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 -lssl -lcrypto
22 | LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION)
23 | EXE =
24 |
--------------------------------------------------------------------------------
/FfmpegFrameSource.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "liveMedia.hh"
3 | #include "CameraDevice.hpp"
4 | #include "FfmpegEncoder.h"
5 | #include
6 |
7 | class FFmpegH264Source : public FramedSource {
8 |
9 | CameraDevice m_capture;
10 | FfmpegEncoder m_encoder;
11 | std::thread *m_thread;
12 |
13 | public:
14 | static FFmpegH264Source* createNew(UsageEnvironment& env);
15 | FFmpegH264Source(UsageEnvironment& env);
16 | ~FFmpegH264Source();
17 |
18 | protected:
19 | unsigned maxFrameSize() const override;
20 | private:
21 |
22 | virtual void doGetNextFrame();
23 | virtual void doStopGettingFrames();
24 |
25 | void FfmpegGetNextFrame();
26 |
27 | private:
28 | EventTriggerId m_eventTriggerId;
29 |
30 | };
31 |
32 |
--------------------------------------------------------------------------------
/live/config.mingw:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -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 -lssl -lcrypto
16 | LIBS_FOR_GUI_APPLICATION = -lws2_32
17 | EXE = .exe
18 |
--------------------------------------------------------------------------------
/live/config.solaris-64bit:
--------------------------------------------------------------------------------
1 | COMPILE_OPTS = $(INCLUDES) -m64 -I/usr/local/include -I. -O -DSOLARIS -DNEWLOCALE_NOT_USED -DSOCKLEN_T=socklen_t
2 | C = c
3 | C_COMPILER = cc
4 | C_FLAGS = $(COMPILE_OPTS)
5 | CPP = cpp
6 | CPLUSPLUS_COMPILER = c++
7 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall
8 | OBJ = o
9 | LINK = c++ -m64 -o
10 | LINK_OPTS = -L.
11 | CONSOLE_LINK_OPTS = $(LINK_OPTS)
12 | LIBRARY_LINK = ld -o
13 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -64 -r -dn
14 | LIB_SUFFIX = a
15 | LIBS_FOR_CONSOLE_APPLICATION = -lsocket -lnsl -lssl -lcrypto
16 | LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION)
17 | EXE =
18 |
--------------------------------------------------------------------------------
/live/config.bfin-uclinux:
--------------------------------------------------------------------------------
1 | CROSS_COMPILER= bfin-uclinux-
2 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -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 = -lssl -lcrypto
17 | LIBS_FOR_GUI_APPLICATION =
18 | EXE =
19 |
--------------------------------------------------------------------------------
/live/config.bfin-linux-uclibc:
--------------------------------------------------------------------------------
1 | CROSS_COMPILER = bfin-linux-uclibc-
2 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -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 = -lssl -lcrypto
17 | LIBS_FOR_GUI_APPLICATION =
18 | EXE =
19 |
--------------------------------------------------------------------------------
/live/config.avr32-linux:
--------------------------------------------------------------------------------
1 | CROSS_COMPILE= avr32-linux-uclibc-
2 | COMPILE_OPTS = -I/usr/local/include -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 = -lssl -lcrypto
14 | LIBS_FOR_GUI_APPLICATION =
15 | EXE =
16 |
--------------------------------------------------------------------------------
/live/config.armeb-uclibc:
--------------------------------------------------------------------------------
1 | CROSS_COMPILE= armeb-linux-uclibc-
2 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -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 = -lssl -lcrypto
18 | LIBS_FOR_GUI_APPLICATION =
19 | EXE =
20 |
--------------------------------------------------------------------------------
/live/config.bsplinux:
--------------------------------------------------------------------------------
1 | CROSS_COMPILE=
2 | COMPILE_OPTS = $(INCLUDES) -I. -I/usr/local/include -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 -lssl -lcrypto
17 | LIBS_FOR_GUI_APPLICATION =
18 | EXE =
19 |
--------------------------------------------------------------------------------
/live/config.uClinux:
--------------------------------------------------------------------------------
1 | CROSS_COMPILE= arc-linux-uclibc-
2 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -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) -lssl -lcrypto
19 | LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION)
20 | EXE =
21 |
--------------------------------------------------------------------------------
/FfmpegH264LiveServerMediaSubsession.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "liveMedia.hh"
3 |
4 | class FfmpegH264LiveServerMediaSubsession:OnDemandServerMediaSubsession
5 | {
6 | public:
7 | static ServerMediaSubsession* createNew(UsageEnvironment &env, const char *inputType, const char *inputDevice);
8 | protected:
9 | FfmpegH264LiveServerMediaSubsession(const char *inputType, const char *inputDevice, UsageEnvironment &env,
10 | portNumBits initialPortNum = 6970,
11 | Boolean multiplexRTCPWithRTP = False);
12 | ~FfmpegH264LiveServerMediaSubsession();
13 |
14 |
15 | protected:
16 | // Override
17 | virtual FramedSource* createNewStreamSource(unsigned clientSessionId,
18 | unsigned& estBitrate) override;
19 |
20 | // "estBitrate" is the stream's estimated bitrate, in kbps
21 | virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock,
22 | unsigned char rtpPayloadTypeIfDynamic,
23 | FramedSource* inputSource) override;
24 |
25 | };
26 |
27 |
--------------------------------------------------------------------------------
/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 -I/usr/local/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 = -lssl -lcrypto
22 | LIBS_FOR_GUI_APPLICATION =
23 | EXE =
24 |
--------------------------------------------------------------------------------
/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 | cd ../hlsProxy
27 | del /Q hlsProxy.mak
28 | type Makefile.head ..\win32config Makefile.tail > hlsProxy.mak
29 |
30 | ENDLOCAL
31 |
--------------------------------------------------------------------------------
/live/mediaServer/version.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Copyright (c) 1996-2025, Live Networks, Inc. All rights reserved
17 | // Version information for the LIVE555 Media Server application
18 | // Header file
19 |
20 | #ifndef _MEDIA_SERVER_VERSION_HH
21 | #define _MEDIA_SERVER_VERSION_HH
22 |
23 | #define MEDIA_SERVER_VERSION_STRING "1.13"
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/main.cpp:
--------------------------------------------------------------------------------
1 | #include "CameraDevice.hpp"
2 | #include "UsbCameraOnDemandRTSPServer.h"
3 | #include "getopt.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | std::string h264file;
8 | int ch = 0, option_index;
9 | struct option long_options[] =
10 | {
11 |
12 | {"h264file", optional_argument, NULL, 0},
13 | {0, 0, 0, 0},
14 |
15 | };
16 |
17 | while ((ch = getopt_long(argc, argv, "i:", long_options, &option_index)) != -1)
18 | {
19 |
20 | switch (ch)
21 | {
22 | case 0:
23 | if (optarg) {
24 | if (option_index == 0) {
25 | h264file = optarg;
26 | }
27 | }
28 |
29 | break;
30 | case 'i':
31 | h264file = optarg;
32 | break;
33 | }
34 | }
35 |
36 | if (h264file.empty()) {
37 | printf("Usage: -i [filepath] or --h264file=[filepath]\n");
38 | return -1;
39 | }
40 |
41 | UsbCameraOnDemandRTSPServer server;
42 | server.SetH264File(h264file);
43 | server.StartServer();
44 |
45 | return 0;
46 | }
47 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "groupsock"
17 | // Copyright (c) 1996-2025 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/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 |
38 | cd ../hlsProxy
39 | /bin/rm -f hlsProxy.mak
40 | /bin/rm -f Makefile
41 | cat Makefile.head ../win32config Makefile.tail > hlsProxy.mak
42 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/include/HMAC_SHA1.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025, Live Networks, Inc. All rights reserved
18 | //
19 | // A function for computing the HMAC_SHA1 digest
20 | // Definition
21 |
22 | #ifndef _HMAC_SHA1_HH
23 | #define _HMAC_SHA1_HH
24 |
25 | #ifndef NO_OPENSSL
26 | #ifndef _HMAC_HASH_HH
27 | #include "HMAC_hash.hh"
28 | #endif
29 |
30 | #define SHA1_DIGEST_LEN 20
31 |
32 | HMAC_hash HMAC_SHA1;
33 | #endif
34 | #endif
35 |
--------------------------------------------------------------------------------
/live/testProgs/announceURL.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Copyright (c) 1996-2025, Live Networks, Inc. All rights reserved
17 | // A common function that outputs the URL(s) that can be used to access a stream
18 | // served by a RTSP server.
19 | // C++ header
20 |
21 | #ifndef _ANNOUNCE_URL_HH
22 | #define _ANNOUNCE_URL_HH
23 |
24 | #ifndef _LIVEMEDIA_HH
25 | #include "liveMedia.hh"
26 | #endif
27 |
28 | void announceURL(RTSPServer* rtspServer, ServerMediaSession* sms);
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/groupsock/include/groupsock_version.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Version information for the "groupsock" library
17 | // Copyright (c) 1996-2025 Live Networks, Inc. All rights reserved.
18 |
19 | #ifndef _GROUPSOCK_VERSION_HH
20 | #define _GROUPSOCK_VERSION_HH
21 |
22 | #define GROUPSOCK_LIBRARY_VERSION_STRING "2025.09.17"
23 | #define GROUPSOCK_LIBRARY_VERSION_INT 1758067200
24 |
25 | extern char const* const groupsockLibraryVersionStr;
26 | extern int const groupsockLibraryVersionInt;
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/live/liveMedia/include/liveMedia_version.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Version information for the "liveMedia" library
17 | // Copyright (c) 1996-2025 Live Networks, Inc. All rights reserved.
18 |
19 | #ifndef _LIVEMEDIA_VERSION_HH
20 | #define _LIVEMEDIA_VERSION_HH
21 |
22 | #define LIVEMEDIA_LIBRARY_VERSION_STRING "2025.09.17"
23 | #define LIVEMEDIA_LIBRARY_VERSION_INT 1758067200
24 |
25 | extern char const* const liveMediaLibraryVersionStr;
26 | extern int const liveMediaLibraryVersionInt;
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/live/UsageEnvironment/include/UsageEnvironment_version.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Version information for the "UsageEnvironment" library
17 | // Copyright (c) 1996-2025 Live Networks, Inc. All rights reserved.
18 |
19 | #ifndef _USAGEENVIRONMENT_VERSION_HH
20 | #define _USAGEENVIRONMENT_VERSION_HH
21 |
22 | #define USAGEENVIRONMENT_LIBRARY_VERSION_STRING "2025.09.17"
23 | #define USAGEENVIRONMENT_LIBRARY_VERSION_INT 1758067200
24 |
25 | extern char const* const UsageEnvironmentLibraryVersionStr;
26 | extern int const UsageEnvironmentLibraryVersionInt;
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/BasicUsageEnvironment/include/BasicUsageEnvironment_version.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Version information for the "BasicUsageEnvironment" library
17 | // Copyright (c) 1996-2025 Live Networks, Inc. All rights reserved.
18 |
19 | #ifndef _BASICUSAGEENVIRONMENT_VERSION_HH
20 | #define _BASICUSAGEENVIRONMENT_VERSION_HH
21 |
22 | #define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_STRING "2025.09.17"
23 | #define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_INT 1758067200
24 |
25 | extern char const* const BasicUsageEnvironmentLibraryVersionStr;
26 | extern int const BasicUsageEnvironmentLibraryVersionInt;
27 |
28 | #endif
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.3
6 |
7 | DEVELOPER_PATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
8 | TOOL_PATH = $(DEVELOPER_PATH)/usr/bin
9 | SDK_PATH = $(DEVELOPER_PATH)/SDKs
10 | SDK = $(SDK_PATH)/iPhoneOS$(IOS_VERSION).sdk
11 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -I. $(EXTRA_LDFLAGS) -DBSD=1 -O2 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fPIC -arch armv7 --sysroot=$(SDK)
12 | C = c
13 | C_COMPILER = /usr/bin/xcrun clang
14 | C_FLAGS = $(COMPILE_OPTS)
15 | CPP = cpp
16 | CPLUSPLUS_COMPILER = /usr/bin/xcrun clang
17 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall
18 | OBJ = o
19 | LINK = /usr/bin/xcrun clang -o
20 | LINK_OPTS = -v -L. -arch armv7 --sysroot=$(SDK) -L$(SDK)/usr/lib/system /usr/lib/libc++.dylib
21 | CONSOLE_LINK_OPTS = $(LINK_OPTS)
22 | LIBRARY_LINK = /usr/bin/xcrun libtool -static -o
23 | LIBRARY_LINK_OPTS =
24 | LIB_SUFFIX = a
25 | LIBS_FOR_CONSOLE_APPLICATION = -lssl -lcrypto
26 | LIBS_FOR_GUI_APPLICATION =
27 | EXE =
28 |
--------------------------------------------------------------------------------
/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: install1
34 | ln -fs $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).$(SHORT_LIB_SUFFIX)
35 | ln -fs $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).so
36 |
37 | ##### Any additional, platform-specific rules come here:
38 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | #ifndef _BOOLEAN_HH
17 | #define _BOOLEAN_HH
18 |
19 | #if defined(__BORLANDC__) || (!defined(USE_LIVE555_BOOLEAN) && defined(_MSC_VER) && _MSC_VER >= 1400)
20 | // Use the "bool" type defined by the Borland compiler, and MSVC++ 8.0, Visual Studio 2005 and higher
21 | typedef bool Boolean;
22 | #define False false
23 | #define True true
24 | #else
25 | typedef unsigned char Boolean;
26 | #ifndef __MSHTML_LIBRARY_DEFINED__
27 | #ifndef False
28 | const Boolean False = 0;
29 | #endif
30 | #ifndef True
31 | const Boolean True = 1;
32 | #endif
33 |
34 | #endif
35 | #endif
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/live/hlsProxy/Makefile.tail:
--------------------------------------------------------------------------------
1 | ##### End of variables to change
2 |
3 | HLS_PROXY = live555HLSProxy$(EXE)
4 |
5 | ALL = $(HLS_PROXY)
6 | all: $(ALL)
7 |
8 | .$(C).$(OBJ):
9 | $(C_COMPILER) -c $(C_FLAGS) $<
10 | .$(CPP).$(OBJ):
11 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $<
12 |
13 | HLS_PROXY_OBJS = live555HLSProxy.$(OBJ)
14 |
15 | USAGE_ENVIRONMENT_DIR = ../UsageEnvironment
16 | USAGE_ENVIRONMENT_LIB = $(USAGE_ENVIRONMENT_DIR)/libUsageEnvironment.$(libUsageEnvironment_LIB_SUFFIX)
17 | BASIC_USAGE_ENVIRONMENT_DIR = ../BasicUsageEnvironment
18 | BASIC_USAGE_ENVIRONMENT_LIB = $(BASIC_USAGE_ENVIRONMENT_DIR)/libBasicUsageEnvironment.$(libBasicUsageEnvironment_LIB_SUFFIX)
19 | LIVEMEDIA_DIR = ../liveMedia
20 | LIVEMEDIA_LIB = $(LIVEMEDIA_DIR)/libliveMedia.$(libliveMedia_LIB_SUFFIX)
21 | GROUPSOCK_DIR = ../groupsock
22 | GROUPSOCK_LIB = $(GROUPSOCK_DIR)/libgroupsock.$(libgroupsock_LIB_SUFFIX)
23 | LOCAL_LIBS = $(LIVEMEDIA_LIB) $(GROUPSOCK_LIB) \
24 | $(BASIC_USAGE_ENVIRONMENT_LIB) $(USAGE_ENVIRONMENT_LIB)
25 | LIBS = $(LOCAL_LIBS) $(LIBS_FOR_CONSOLE_APPLICATION)
26 |
27 | live555HLSProxy$(EXE): $(HLS_PROXY_OBJS) $(LOCAL_LIBS)
28 | $(LINK)$@ $(CONSOLE_LINK_OPTS) $(HLS_PROXY_OBJS) $(LIBS)
29 |
30 | clean:
31 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~
32 |
33 | install: $(HLS_PROXY)
34 | install -d $(DESTDIR)$(PREFIX)/bin
35 | install -m 755 $(HLS_PROXY) $(DESTDIR)$(PREFIX)/bin
36 |
37 | ##### Any additional, platform-specific rules come here:
38 |
--------------------------------------------------------------------------------
/live/proxyServer/Makefile.tail:
--------------------------------------------------------------------------------
1 | ##### End of variables to change
2 |
3 | PROXY_SERVER = live555ProxyServer$(EXE)
4 |
5 | ALL = $(PROXY_SERVER)
6 | all: $(ALL)
7 |
8 | .$(C).$(OBJ):
9 | $(C_COMPILER) -c $(C_FLAGS) $<
10 | .$(CPP).$(OBJ):
11 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $<
12 |
13 | PROXY_SERVER_OBJS = live555ProxyServer.$(OBJ)
14 |
15 | USAGE_ENVIRONMENT_DIR = ../UsageEnvironment
16 | USAGE_ENVIRONMENT_LIB = $(USAGE_ENVIRONMENT_DIR)/libUsageEnvironment.$(libUsageEnvironment_LIB_SUFFIX)
17 | BASIC_USAGE_ENVIRONMENT_DIR = ../BasicUsageEnvironment
18 | BASIC_USAGE_ENVIRONMENT_LIB = $(BASIC_USAGE_ENVIRONMENT_DIR)/libBasicUsageEnvironment.$(libBasicUsageEnvironment_LIB_SUFFIX)
19 | LIVEMEDIA_DIR = ../liveMedia
20 | LIVEMEDIA_LIB = $(LIVEMEDIA_DIR)/libliveMedia.$(libliveMedia_LIB_SUFFIX)
21 | GROUPSOCK_DIR = ../groupsock
22 | GROUPSOCK_LIB = $(GROUPSOCK_DIR)/libgroupsock.$(libgroupsock_LIB_SUFFIX)
23 | LOCAL_LIBS = $(LIVEMEDIA_LIB) $(GROUPSOCK_LIB) \
24 | $(BASIC_USAGE_ENVIRONMENT_LIB) $(USAGE_ENVIRONMENT_LIB)
25 | LIBS = $(LOCAL_LIBS) $(LIBS_FOR_CONSOLE_APPLICATION)
26 |
27 | live555ProxyServer$(EXE): $(PROXY_SERVER_OBJS) $(LOCAL_LIBS)
28 | $(LINK)$@ $(CONSOLE_LINK_OPTS) $(PROXY_SERVER_OBJS) $(LIBS)
29 |
30 | clean:
31 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~
32 |
33 | install: $(PROXY_SERVER)
34 | install -d $(DESTDIR)$(PREFIX)/bin
35 | install -m 755 $(PROXY_SERVER) $(DESTDIR)$(PREFIX)/bin
36 |
37 | ##### Any additional, platform-specific rules come here:
38 |
--------------------------------------------------------------------------------
/live/liveMedia/include/HMAC_hash.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025, Live Networks, Inc. All rights reserved
18 | //
19 | // Generic HMA_HASH functions
20 | // Definition
21 |
22 | #ifndef _HMAC_HASH_HH
23 | #define _HMAC_HASH_HH
24 |
25 | #ifndef _NET_COMMON_H
26 | #include "NetCommon.h"
27 | #endif
28 |
29 | // All HMAC hash functions have the following signature:
30 | typedef void HMAC_hash(u_int8_t const* key, unsigned keyLength,
31 | u_int8_t const* text, unsigned textLength,
32 | u_int8_t* resultDigest);
33 | // "resultDigest" must point to an array of sufficient size to hold the digest
34 |
35 | #define HMAC_BLOCK_SIZE 64
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/TextRTPSink.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/FileServerMediaSubsession.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/WindowsAudioInputDevice/showAudioInputPorts.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Copyright (c) 1996-2025, 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/liveMedia/MPEG2TransportStreamDemuxedTrack.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 Live Networks, Inc. All rights reserved.
18 | // A media track, demultiplexed from a MPEG Transport Stream file
19 | // Implementation
20 |
21 | #include "MPEG2TransportStreamParser.hh"
22 |
23 | MPEG2TransportStreamDemuxedTrack
24 | ::MPEG2TransportStreamDemuxedTrack(MPEG2TransportStreamParser& ourParser, u_int16_t pid)
25 | : FramedSource(ourParser.envir()),
26 | fOurParser(ourParser), fPID(pid) {
27 | }
28 |
29 | MPEG2TransportStreamDemuxedTrack::~MPEG2TransportStreamDemuxedTrack() {
30 | }
31 |
32 | void MPEG2TransportStreamDemuxedTrack::doGetNextFrame() {
33 | fOurParser.continueParsing();
34 | }
35 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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 |
--------------------------------------------------------------------------------
/UsbCameraServer.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28010.2019
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UsbCameraServer", "UsbCameraServer.vcxproj", "{1DD6A4D4-ECB4-4BDD-A694-19253BB091F1}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {1DD6A4D4-ECB4-4BDD-A694-19253BB091F1}.Debug|x64.ActiveCfg = Debug|x64
17 | {1DD6A4D4-ECB4-4BDD-A694-19253BB091F1}.Debug|x64.Build.0 = Debug|x64
18 | {1DD6A4D4-ECB4-4BDD-A694-19253BB091F1}.Debug|x86.ActiveCfg = Debug|Win32
19 | {1DD6A4D4-ECB4-4BDD-A694-19253BB091F1}.Debug|x86.Build.0 = Debug|Win32
20 | {1DD6A4D4-ECB4-4BDD-A694-19253BB091F1}.Release|x64.ActiveCfg = Release|x64
21 | {1DD6A4D4-ECB4-4BDD-A694-19253BB091F1}.Release|x64.Build.0 = Release|x64
22 | {1DD6A4D4-ECB4-4BDD-A694-19253BB091F1}.Release|x86.ActiveCfg = Release|Win32
23 | {1DD6A4D4-ECB4-4BDD-A694-19253BB091F1}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {C21D2787-CD01-42C1-A854-F9C124C2F5E3}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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 |
--------------------------------------------------------------------------------
/FfmpegH264LiveServerMediaSubsession.cpp:
--------------------------------------------------------------------------------
1 | #include "FfmpegH264LiveServerMediaSubsession.h"
2 | #include "FfmpegFrameSource.h"
3 |
4 |
5 | ServerMediaSubsession* FfmpegH264LiveServerMediaSubsession::createNew(UsageEnvironment &env, const char *inputType, const char *inputDevice)
6 | {
7 | return new FfmpegH264LiveServerMediaSubsession(inputType, inputDevice, env);
8 | }
9 |
10 | FfmpegH264LiveServerMediaSubsession::FfmpegH264LiveServerMediaSubsession(const char *inputType,
11 | const char *inputDevice,
12 | UsageEnvironment &env,
13 | portNumBits initialPortNum,
14 | Boolean multiplexRTCPWithRTP):
15 | OnDemandServerMediaSubsession(env, true, initialPortNum, multiplexRTCPWithRTP)
16 | {
17 | }
18 |
19 |
20 | FfmpegH264LiveServerMediaSubsession::~FfmpegH264LiveServerMediaSubsession()
21 | {
22 | }
23 |
24 |
25 | // Override
26 | FramedSource* FfmpegH264LiveServerMediaSubsession::createNewStreamSource(unsigned clientSessionId, unsigned& estBitrate)
27 | {
28 | estBitrate = 500; // kbps, estimate
29 | FFmpegH264Source *ffmpegSource = FFmpegH264Source::createNew(envir());
30 |
31 | // Create a framer for the Video Elementary Stream:
32 | return H264VideoStreamFramer::createNew(envir(), ffmpegSource);
33 | }
34 |
35 | // "estBitrate" is the stream's estimated bitrate, in kbps
36 | RTPSink* FfmpegH264LiveServerMediaSubsession::createNewRTPSink(Groupsock* rtpGroupsock,
37 | unsigned char rtpPayloadTypeIfDynamic,
38 | FramedSource* inputSource)
39 | {
40 | return H264VideoRTPSink::createNew(envir(), rtpGroupsock, rtpPayloadTypeIfDynamic);
41 | }
--------------------------------------------------------------------------------
/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.3
6 | MIN_IOS_VERSION = 7.0
7 |
8 | DEVELOPER_PATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
9 | TOOL_PATH = $(DEVELOPER_PATH)/usr/bin
10 | SDK_PATH = $(DEVELOPER_PATH)/SDKs
11 | SDK = $(SDK_PATH)/iPhoneSimulator$(IOS_VERSION).sdk
12 | COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -I. $(EXTRA_LDFLAGS) -DBSD=1 -O2 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -miphoneos-version-min=$(MIN_IOS_VERSION) -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fPIC -arch i386 --sysroot=$(SDK) -isysroot $(SDK)
13 | C = c
14 | C_COMPILER = /usr/bin/xcrun clang
15 | C_FLAGS = $(COMPILE_OPTS)
16 | CPP = cpp
17 | CPLUSPLUS_COMPILER = /usr/bin/xcrun clang
18 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall
19 | OBJ = o
20 | LINK = /usr/bin/xcrun clang -o
21 | LINK_OPTS = -L. -arch i386 -miphoneos-version-min=$(MIN_IOS_VERSION) --sysroot=$(SDK) -isysroot -L$(SDK)/usr/lib/system -I$(SDK)/usr/lib /usr/lib/libc++.dylib
22 | CONSOLE_LINK_OPTS = $(LINK_OPTS)
23 | LIBRARY_LINK = /usr/bin/xcrun libtool -static -o
24 | LIBRARY_LINK_OPTS =
25 | LIB_SUFFIX = a
26 | LIBS_FOR_CONSOLE_APPLICATION = -lssl -lcrypto
27 | LIBS_FOR_GUI_APPLICATION =
28 | EXE =
29 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/JPEGVideoSource.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/UsageEnvironment/include/strDup.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 |
17 | #ifndef _STRDUP_HH
18 | #define _STRDUP_HH
19 |
20 | // Copyright (c) 1996-2025 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/liveMedia/include/MP3Transcoder.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/GSMAudioRTPSink.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/mediaServer/Makefile.tail:
--------------------------------------------------------------------------------
1 | ##### End of variables to change
2 |
3 | MEDIA_SERVER = live555MediaServer$(EXE)
4 |
5 | ALL = $(MEDIA_SERVER)
6 | all: $(ALL)
7 |
8 | .$(C).$(OBJ):
9 | $(C_COMPILER) -c $(C_FLAGS) $<
10 | .$(CPP).$(OBJ):
11 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $<
12 |
13 | MEDIA_SERVER_OBJS = live555MediaServer.$(OBJ) DynamicRTSPServer.$(OBJ)
14 |
15 | live555MediaServer.$(CPP): DynamicRTSPServer.hh version.hh
16 | DynamicRTSPServer.$(CPP): DynamicRTSPServer.hh
17 |
18 | USAGE_ENVIRONMENT_DIR = ../UsageEnvironment
19 | USAGE_ENVIRONMENT_LIB = $(USAGE_ENVIRONMENT_DIR)/libUsageEnvironment.$(libUsageEnvironment_LIB_SUFFIX)
20 | BASIC_USAGE_ENVIRONMENT_DIR = ../BasicUsageEnvironment
21 | BASIC_USAGE_ENVIRONMENT_LIB = $(BASIC_USAGE_ENVIRONMENT_DIR)/libBasicUsageEnvironment.$(libBasicUsageEnvironment_LIB_SUFFIX)
22 | LIVEMEDIA_DIR = ../liveMedia
23 | LIVEMEDIA_LIB = $(LIVEMEDIA_DIR)/libliveMedia.$(libliveMedia_LIB_SUFFIX)
24 | GROUPSOCK_DIR = ../groupsock
25 | GROUPSOCK_LIB = $(GROUPSOCK_DIR)/libgroupsock.$(libgroupsock_LIB_SUFFIX)
26 | LOCAL_LIBS = $(LIVEMEDIA_LIB) $(GROUPSOCK_LIB) \
27 | $(BASIC_USAGE_ENVIRONMENT_LIB) $(USAGE_ENVIRONMENT_LIB)
28 | LIBS = $(LOCAL_LIBS) $(LIBS_FOR_CONSOLE_APPLICATION)
29 |
30 | live555MediaServer$(EXE): $(MEDIA_SERVER_OBJS) $(LOCAL_LIBS)
31 | $(LINK)$@ $(CONSOLE_LINK_OPTS) $(MEDIA_SERVER_OBJS) $(LIBS)
32 |
33 | clean:
34 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~
35 |
36 | install: $(MEDIA_SERVER)
37 | install -d $(DESTDIR)$(PREFIX)/bin
38 | install -m 755 $(MEDIA_SERVER) $(DESTDIR)$(PREFIX)/bin
39 |
40 | ##### Any additional, platform-specific rules come here:
41 |
--------------------------------------------------------------------------------
/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 -DNO_OPENSSL=1
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 |
--------------------------------------------------------------------------------
/live/liveMedia/include/RawVideoFrameParameters.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 Live Networks, Inc. All rights reserved.
18 | // Parameters used for streaming (transmitting and receiving) raw video frames over RTP
19 | // C++ header
20 |
21 | #ifndef _RAW_VIDEO_FRAME_PARAMETERS_HH
22 | #define _RAW_VIDEO_FRAME_PARAMETERS_HH
23 |
24 | class RawVideoFrameParameters {
25 | public:
26 | RawVideoFrameParameters(unsigned width, unsigned height, unsigned depth, char const* sampling);
27 | virtual ~RawVideoFrameParameters();
28 |
29 | public:
30 | u_int16_t pgroupSize; // in octets
31 | u_int16_t numPixelsInPgroup;
32 | u_int32_t scanLineSize; // in octets
33 | u_int32_t frameSize; // in octets
34 | u_int16_t scanLineIterationStep; // usually 1, but 2 for sampling=="YCbCr-4:2:0"
35 | };
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/VideoRTPSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/UsageEnvironment/HashTable.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Copyright (c) 1996-2025 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/liveMedia/include/GSMAudioRTPSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/AudioRTPSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/UsageEnvironment/strDup.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Copyright (c) 1996-2025 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/liveMedia/include/AMRAudioFileSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/FileServerMediaSubsession.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 Live Networks, Inc. All rights reserved.
18 | // A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
19 | // on demand, from a file.
20 | // C++ header
21 |
22 | #ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH
23 | #define _FILE_SERVER_MEDIA_SUBSESSION_HH
24 |
25 | #ifndef _SERVER_MEDIA_SESSION_HH
26 | #include "ServerMediaSession.hh"
27 | #endif
28 | #ifndef _ON_DEMAND_SERVER_MEDIA_SUBSESSION_HH
29 | #include "OnDemandServerMediaSubsession.hh"
30 | #endif
31 |
32 | class FileServerMediaSubsession: public OnDemandServerMediaSubsession {
33 | protected: // we're a virtual base class
34 | FileServerMediaSubsession(UsageEnvironment& env, char const* fileName,
35 | Boolean reuseFirstSource);
36 | virtual ~FileServerMediaSubsession();
37 |
38 | protected:
39 | char const* fFileName;
40 | u_int64_t fFileSize; // if known
41 | };
42 |
43 | #endif
44 |
--------------------------------------------------------------------------------
/live/testProgs/announceURL.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Copyright (c) 1996-2025, Live Networks, Inc. All rights reserved
17 | // A common function that outputs the URL(s) that can be used to access a stream
18 | // served by a RTSP server.
19 | // Implementation
20 |
21 | #include "announceURL.hh"
22 | #include // for "weHaveAnIPv*Address()"
23 |
24 | void announceURL(RTSPServer* rtspServer, ServerMediaSession* sms) {
25 | if (rtspServer == NULL || sms == NULL) return; // sanity check
26 |
27 | UsageEnvironment& env = rtspServer->envir();
28 |
29 | env << "Play this stream using the URL ";
30 | if (weHaveAnIPv4Address(env)) {
31 | char* url = rtspServer->ipv4rtspURL(sms);
32 | env << "\"" << url << "\"";
33 | delete[] url;
34 | if (weHaveAnIPv6Address(env)) env << " or ";
35 | }
36 | if (weHaveAnIPv6Address(env)) {
37 | char* url = rtspServer->ipv6rtspURL(sms);
38 | env << "\"" << url << "\"";
39 | delete[] url;
40 | }
41 | env << "\n";
42 | }
43 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/OggDemuxedTrack.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/AudioInputDevice.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Copyright (c) 2001-2003 Live Networks, Inc. All rights reserved.
17 | // Generic audio input device (such as a microphone, or an input sound card)
18 | // Implementation
19 |
20 | #include
21 |
22 | AudioInputDevice
23 | ::AudioInputDevice(UsageEnvironment& env, unsigned char bitsPerSample,
24 | unsigned char numChannels,
25 | unsigned samplingFrequency, unsigned granularityInMS)
26 | : FramedSource(env), fBitsPerSample(bitsPerSample),
27 | fNumChannels(numChannels), fSamplingFrequency(samplingFrequency),
28 | fGranularityInMS(granularityInMS) {
29 | }
30 |
31 | AudioInputDevice::~AudioInputDevice() {
32 | }
33 |
34 | char** AudioInputDevice::allowedDeviceNames = NULL;
35 |
36 | ////////// AudioPortNames implementation //////////
37 |
38 | AudioPortNames::AudioPortNames()
39 | : numPorts(0), portName(NULL) {
40 | }
41 |
42 | AudioPortNames::~AudioPortNames() {
43 | for (unsigned i = 0; i < numPorts; ++i) delete portName[i];
44 | delete portName;
45 | }
46 |
--------------------------------------------------------------------------------
/live/BasicUsageEnvironment/Makefile.tail:
--------------------------------------------------------------------------------
1 | ##### End of variables to change
2 |
3 | NAME = libBasicUsageEnvironment
4 | LIB_FILE = $(NAME).$(LIB_SUFFIX)
5 | ALL = $(LIB_FILE)
6 | all: $(ALL)
7 |
8 | OBJS = BasicUsageEnvironment0.$(OBJ) BasicUsageEnvironment.$(OBJ) \
9 | BasicTaskScheduler0.$(OBJ) BasicTaskScheduler.$(OBJ) \
10 | DelayQueue.$(OBJ) BasicHashTable.$(OBJ)
11 |
12 | libBasicUsageEnvironment.$(LIB_SUFFIX): $(OBJS)
13 | $(LIBRARY_LINK)$@ $(LIBRARY_LINK_OPTS) \
14 | $(OBJS)
15 |
16 | .$(C).$(OBJ):
17 | $(C_COMPILER) -c $(C_FLAGS) $<
18 |
19 | .$(CPP).$(OBJ):
20 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $<
21 |
22 | BasicUsageEnvironment0.$(CPP): include/BasicUsageEnvironment0.hh
23 | include/BasicUsageEnvironment0.hh: include/BasicUsageEnvironment_version.hh include/DelayQueue.hh
24 | BasicUsageEnvironment.$(CPP): include/BasicUsageEnvironment.hh
25 | include/BasicUsageEnvironment.hh: include/BasicUsageEnvironment0.hh
26 | BasicTaskScheduler0.$(CPP): include/BasicUsageEnvironment0.hh include/HandlerSet.hh
27 | BasicTaskScheduler.$(CPP): include/BasicUsageEnvironment.hh include/HandlerSet.hh
28 | DelayQueue.$(CPP): include/DelayQueue.hh
29 | BasicHashTable.$(CPP): include/BasicHashTable.hh
30 |
31 | clean:
32 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~
33 |
34 | install: install1 $(INSTALL2)
35 | install1: libBasicUsageEnvironment.$(LIB_SUFFIX)
36 | install -d $(DESTDIR)$(PREFIX)/include/BasicUsageEnvironment $(DESTDIR)$(LIBDIR)
37 | install -m 644 include/*.hh $(DESTDIR)$(PREFIX)/include/BasicUsageEnvironment
38 | install -m 644 libBasicUsageEnvironment.$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)
39 | install_shared_libraries: install1
40 | ln -fs $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).$(SHORT_LIB_SUFFIX)
41 | ln -fs $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).so
42 |
43 | ##### Any additional, platform-specific rules come here:
44 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/win32config:
--------------------------------------------------------------------------------
1 | # Comment out the following line to produce Makefiles that generate debuggable code:
2 | NODEBUG=1
3 |
4 | # If for some reason you wish to use the deprecated "gethostbyname()" function instead of
5 | # "getaddrinfo()", uncomment the following line:
6 | #USE_DEPRECATED_GETHOSTBYNAME = -DUSE_GETHOSTBYNAME=1
7 |
8 | # The following definition ensures that we are properly matching
9 | # the WinSock2 library file with the correct header files.
10 | # (will link with "ws2_32.lib" and include "winsock2.h" & "Ws2tcpip.h")
11 | TARGETOS = WINNT
12 |
13 | # If for some reason you wish to use WinSock1 instead, uncomment the
14 | # following two definitions.
15 | # (will link with "wsock32.lib" and include "winsock.h")
16 | #TARGETOS = WIN95
17 | #APPVER = 4.0
18 |
19 | !include
20 |
21 | UI_OPTS = $(guilflags) $(guilibsdll)
22 | # Use the following to get a console (e.g., for debugging):
23 | CONSOLE_UI_OPTS = $(conlflags) $(conlibsdll)
24 | CPU=i386
25 |
26 | TOOLS32 = c:\Program Files\DevStudio\Vc
27 | COMPILE_OPTS = $(INCLUDES) $(cdebug) $(cflags) $(cvarsdll) -I. -I"$(TOOLS32)\include" -DNO_OPENSSL=1 $(USE_DEPRECATED_GETHOSTBYNAME)
28 | C = c
29 | C_COMPILER = "$(TOOLS32)\bin\cl"
30 | C_FLAGS = $(COMPILE_OPTS)
31 | CPP = cpp
32 | CPLUSPLUS_COMPILER = $(C_COMPILER)
33 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS)
34 | OBJ = obj
35 | LINK = $(link) -out:
36 | LIBRARY_LINK = lib -out:
37 | LINK_OPTS_0 = $(linkdebug) msvcirt.lib
38 | LIBRARY_LINK_OPTS =
39 | LINK_OPTS = $(LINK_OPTS_0) $(UI_OPTS)
40 | CONSOLE_LINK_OPTS = $(LINK_OPTS_0) $(CONSOLE_UI_OPTS)
41 | SERVICE_LINK_OPTS = kernel32.lib advapi32.lib shell32.lib -subsystem:console,$(APPVER)
42 | LIB_SUFFIX = lib
43 | LIBS_FOR_CONSOLE_APPLICATION =
44 | LIBS_FOR_GUI_APPLICATION =
45 | MULTIMEDIA_LIBS = winmm.lib
46 | EXE = .exe
47 | PLATFORM = Windows
48 |
49 | rc32 = "$(TOOLS32)\bin\rc"
50 | .rc.res:
51 | $(rc32) $<
52 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/H264or5VideoFileSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/JPEG2000VideoRTPSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 Live Networks, Inc. All rights reserved.
18 |
19 |
20 | #ifndef _JPEG2000_VIDEO_RTP_SINK_HH
21 | #define _JPEG2000_VIDEO_RTP_SINK_HH
22 |
23 | #ifndef _VIDEO_RTP_SINK_HH
24 | #include "VideoRTPSink.hh"
25 | #endif
26 |
27 | class JPEG2000VideoRTPSink: public VideoRTPSink {
28 | public:
29 | static JPEG2000VideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs);
30 |
31 | protected:
32 | JPEG2000VideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs);
33 | // called only by createNew()
34 |
35 | virtual ~JPEG2000VideoRTPSink();
36 |
37 | private: // redefined virtual functions:
38 | virtual void doSpecialFrameHandling(unsigned fragmentationOffset,
39 | unsigned char* frameStart,
40 | unsigned numBytesInFrame,
41 | struct timeval framePresentationTime,
42 | unsigned numRemainingBytes);
43 | virtual unsigned specialHeaderSize() const;
44 | };
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/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
21 | include/Groupsock.hh: include/groupsock_version.hh include/NetInterface.hh include/GroupEId.hh
22 | include/NetInterface.hh: include/NetAddress.hh
23 | NetInterface.$(CPP): include/NetInterface.hh include/GroupsockHelper.hh
24 | NetAddress.$(CPP): include/NetAddress.hh include/GroupsockHelper.hh
25 | IOHandlers.$(CPP): include/IOHandlers.hh
26 |
27 | libgroupsock.$(LIB_SUFFIX): $(GROUPSOCK_LIB_OBJS) \
28 | $(PLATFORM_SPECIFIC_LIB_OBJS)
29 | $(LIBRARY_LINK)$@ $(LIBRARY_LINK_OPTS) \
30 | $(GROUPSOCK_LIB_OBJS)
31 |
32 | clean:
33 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~
34 |
35 | install: install1 $(INSTALL2)
36 | install1: libgroupsock.$(LIB_SUFFIX)
37 | install -d $(DESTDIR)$(PREFIX)/include/groupsock $(DESTDIR)$(LIBDIR)
38 | install -m 644 include/*.hh include/*.h $(DESTDIR)$(PREFIX)/include/groupsock
39 | install -m 644 libgroupsock.$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)
40 | install_shared_libraries: install1
41 | ln -fs libgroupsock.$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/libgroupsock.$(SHORT_LIB_SUFFIX)
42 | ln -fs libgroupsock.$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/libgroupsock.so
43 |
44 | ##### Any additional, platform-specific rules come here:
45 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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,
25 | Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters) {
26 | return new H264VideoStreamFramer(env, inputSource, True,
27 | includeStartCodeInOutput, insertAccessUnitDelimiters);
28 | }
29 |
30 | H264VideoStreamFramer
31 | ::H264VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, Boolean createParser,
32 | Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters)
33 | : H264or5VideoStreamFramer(264, env, inputSource, createParser,
34 | includeStartCodeInOutput, insertAccessUnitDelimiters) {
35 | }
36 |
37 | H264VideoStreamFramer::~H264VideoStreamFramer() {
38 | }
39 |
40 | Boolean H264VideoStreamFramer::isH264VideoStreamFramer() const {
41 | return True;
42 | }
43 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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,
25 | Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters) {
26 | return new H265VideoStreamFramer(env, inputSource, True,
27 | includeStartCodeInOutput, insertAccessUnitDelimiters);
28 | }
29 |
30 | H265VideoStreamFramer
31 | ::H265VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, Boolean createParser,
32 | Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters)
33 | : H264or5VideoStreamFramer(265, env, inputSource, createParser,
34 | includeStartCodeInOutput, insertAccessUnitDelimiters) {
35 | }
36 |
37 | H265VideoStreamFramer::~H265VideoStreamFramer() {
38 | }
39 |
40 | Boolean H265VideoStreamFramer::isH265VideoStreamFramer() const {
41 | return True;
42 | }
43 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 Live Networks, Inc. All rights reserved.
18 | // A filter that breaks up a H.264 Video Elementary Stream into NAL units.
19 | // C++ header
20 |
21 | #ifndef _H264_VIDEO_STREAM_FRAMER_HH
22 | #define _H264_VIDEO_STREAM_FRAMER_HH
23 |
24 | #ifndef _H264_OR_5_VIDEO_STREAM_FRAMER_HH
25 | #include "H264or5VideoStreamFramer.hh"
26 | #endif
27 |
28 | class H264VideoStreamFramer: public H264or5VideoStreamFramer {
29 | public:
30 | static H264VideoStreamFramer* createNew(UsageEnvironment& env, FramedSource* inputSource,
31 | Boolean includeStartCodeInOutput = False,
32 | Boolean insertAccessUnitDelimiters = False);
33 |
34 | protected:
35 | H264VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource,
36 | Boolean createParser,
37 | Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters);
38 | // called only by "createNew()"
39 | virtual ~H264VideoStreamFramer();
40 |
41 | // redefined virtual functions:
42 | virtual Boolean isH264VideoStreamFramer() const;
43 | };
44 |
45 | #endif
46 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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 | Boolean insertAccessUnitDelimiters = False);
33 |
34 | protected:
35 | H265VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource,
36 | Boolean createParser,
37 | Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters);
38 | // called only by "createNew()"
39 | virtual ~H265VideoStreamFramer();
40 |
41 | // redefined virtual functions:
42 | virtual Boolean isH265VideoStreamFramer() const;
43 | };
44 |
45 | #endif
46 |
--------------------------------------------------------------------------------
/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 | HLS_PROXY_DIR = hlsProxy
15 |
16 | all:
17 | cd $(LIVEMEDIA_DIR) ; $(MAKE)
18 | cd $(GROUPSOCK_DIR) ; $(MAKE)
19 | cd $(USAGE_ENVIRONMENT_DIR) ; $(MAKE)
20 | cd $(BASIC_USAGE_ENVIRONMENT_DIR) ; $(MAKE)
21 | cd $(TESTPROGS_DIR) ; $(MAKE)
22 | cd $(MEDIA_SERVER_DIR) ; $(MAKE)
23 | cd $(PROXY_SERVER_DIR) ; $(MAKE)
24 | cd $(HLS_PROXY_DIR) ; $(MAKE)
25 | @echo
26 | @echo "For more information about this source code (including your obligations under the LGPL), please see our FAQ at http://live555.com/liveMedia/faq.html"
27 |
28 | install:
29 | cd $(LIVEMEDIA_DIR) ; $(MAKE) install
30 | cd $(GROUPSOCK_DIR) ; $(MAKE) install
31 | cd $(USAGE_ENVIRONMENT_DIR) ; $(MAKE) install
32 | cd $(BASIC_USAGE_ENVIRONMENT_DIR) ; $(MAKE) install
33 | cd $(TESTPROGS_DIR) ; $(MAKE) install
34 | cd $(MEDIA_SERVER_DIR) ; $(MAKE) install
35 | cd $(PROXY_SERVER_DIR) ; $(MAKE) install
36 | cd $(HLS_PROXY_DIR) ; $(MAKE) install
37 |
38 | clean:
39 | cd $(LIVEMEDIA_DIR) ; $(MAKE) clean
40 | cd $(GROUPSOCK_DIR) ; $(MAKE) clean
41 | cd $(USAGE_ENVIRONMENT_DIR) ; $(MAKE) clean
42 | cd $(BASIC_USAGE_ENVIRONMENT_DIR) ; $(MAKE) clean
43 | cd $(TESTPROGS_DIR) ; $(MAKE) clean
44 | cd $(MEDIA_SERVER_DIR) ; $(MAKE) clean
45 | cd $(PROXY_SERVER_DIR) ; $(MAKE) clean
46 | cd $(HLS_PROXY_DIR) ; $(MAKE) clean
47 |
48 | distclean: clean
49 | -rm -f $(LIVEMEDIA_DIR)/Makefile $(GROUPSOCK_DIR)/Makefile \
50 | $(USAGE_ENVIRONMENT_DIR)/Makefile $(BASIC_USAGE_ENVIRONMENT_DIR)/Makefile \
51 | $(TESTPROGS_DIR)/Makefile $(MEDIA_SERVER_DIR)/Makefile \
52 | $(PROXY_SERVER_DIR)/Makefile \
53 | $(HLS_PROXY_DIR)/Makefile \
54 | Makefile
55 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/DVVideoRTPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/FramedFilter.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/VP8VideoRTPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/VP9VideoRTPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/AC3AudioRTPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/MPEG4ESVideoRTPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/MPEG1or2AudioRTPSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/MPEG2TransportStreamDemux.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 Live Networks, Inc. All rights reserved.
18 | // Demultiplexer for a MPEG Transport Stream
19 | // C++ header
20 |
21 | #ifndef _MPEG2_TRANSPORT_STREAM_DEMUX_HH
22 | #define _MPEG2_TRANSPORT_STREAM_DEMUX_HH
23 |
24 | #ifndef _FRAMED_SOURCE_HH
25 | #include "FramedSource.hh"
26 | #endif
27 |
28 | class MPEG2TransportStreamDemux: public Medium {
29 | public:
30 | static MPEG2TransportStreamDemux* createNew(UsageEnvironment& env,
31 | FramedSource* inputSource,
32 | FramedSource::onCloseFunc* onCloseFunc,
33 | void* onCloseClientData);
34 |
35 | private:
36 | MPEG2TransportStreamDemux(UsageEnvironment& env, FramedSource* inputSource,
37 | FramedSource::onCloseFunc* onCloseFunc, void* onCloseClientData);
38 | // called only by createNew()
39 | virtual ~MPEG2TransportStreamDemux();
40 |
41 | static void handleEndOfFile(void* clientData);
42 | void handleEndOfFile();
43 |
44 | private:
45 | class MPEG2TransportStreamParser* fParser;
46 | FramedSource::onCloseFunc* fOnCloseFunc;
47 | void* fOnCloseClientData;
48 | };
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/BasicUDPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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 unsigned maxFrameSize() const;
48 | virtual void doGetNextFrame();
49 | virtual void doStopGettingFrames();
50 |
51 | private:
52 | Groupsock* fInputGS;
53 | Boolean fHaveStartedReading;
54 | };
55 |
56 | #endif
57 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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 |
--------------------------------------------------------------------------------
/CameraDevice.hpp:
--------------------------------------------------------------------------------
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 __CAMERA_DEVICE_HPP__
18 | #define __CAMERA_DEVICE_HPP__
19 |
20 | #ifdef __cplusplus
21 | extern "C" {
22 | #endif
23 |
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include
31 |
32 | #ifdef __cplusplus
33 | }
34 | #endif
35 |
36 | class CameraDevice {
37 | public:
38 | CameraDevice();
39 |
40 | virtual ~CameraDevice();
41 |
42 | bool Open(const char *format, const char *device, int width, int height, int fps);
43 |
44 | void Close();
45 |
46 | AVFrame* Capture();
47 |
48 | bool IsReady() { return isReady_; }
49 |
50 | private:
51 | AVFormatContext *formatContext_;
52 | AVPacket *packetRaw_;
53 | AVCodecContext *codecContextRaw_;
54 | AVFrame *frameYuyv422_;
55 | #ifdef USE_FFMPEG_DRAWTEXT
56 | AVFrame *frameYuyv422Watermark_;
57 | AVFilterGraph *filterGraph_;
58 | AVFilterContext *filterContextSrc_;
59 | AVFilterContext *filterContextSink_;
60 | #endif
61 | bool isReady_;
62 | };
63 |
64 |
65 | #endif // __CAMERA_DEVICE_HPP__
66 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/JPEG2000VideoRTPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 Live Networks, Inc. All rights reserved.
18 |
19 | #ifndef _JPEG2000_VIDEO_RTP_SOURCE_HH
20 | #define _JPEG2000_VIDEO_RTP_SOURCE_HH
21 |
22 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH
23 | #include "MultiFramedRTPSource.hh"
24 | #endif
25 |
26 | class JPEG2000VideoRTPSource: public MultiFramedRTPSource {
27 | public:
28 | static JPEG2000VideoRTPSource* createNew(UsageEnvironment& env, Groupsock* RTPgs,
29 | unsigned char rtpPayloadFormat,
30 | unsigned rtpTimestampFrequency,
31 | char const* sampling);
32 |
33 | protected:
34 | virtual ~JPEG2000VideoRTPSource();
35 |
36 | protected:
37 | JPEG2000VideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs,
38 | unsigned char rtpPayloadFormat,
39 | unsigned rtpTimestampFrequency,
40 | char const* sampling);
41 | // called only by createNew()
42 |
43 | private:
44 | // redefined virtual functions:
45 | virtual Boolean processSpecialHeader(BufferedPacket* packet,
46 | unsigned& resultSpecialHeaderSize);
47 | virtual char const* MIMEtype() const;
48 |
49 | private:
50 | char* fSampling;
51 | };
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Copyright (c) 1996-2025, 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_HH
25 | #include "RTSPServer.hh"
26 | #endif
27 |
28 | class DynamicRTSPServer: public RTSPServer {
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 ourSocketIPv4, int ourSocketIPv6, Port ourPort,
36 | UserAuthenticationDatabase* authDatabase, unsigned reclamationTestSeconds);
37 | // called only by createNew();
38 | virtual ~DynamicRTSPServer();
39 |
40 | protected: // redefined virtual functions
41 | virtual void lookupServerMediaSession(char const* streamName,
42 | lookupServerMediaSessionCompletionFunc* completionFunc,
43 | void* completionClientData,
44 | Boolean isFirstLookupInSession);
45 | };
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/live/groupsock/GroupEId.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Copyright (c) 1996-2025, Live Networks, Inc. All rights reserved
17 | // "Group Endpoint Id"
18 | // Implementation
19 |
20 | #include "GroupEId.hh"
21 |
22 |
23 | GroupEId::GroupEId(struct sockaddr_storage const& groupAddr,
24 | portNumBits portNum, u_int8_t ttl) {
25 | init(groupAddr, nullAddress(), portNum, ttl);
26 | }
27 |
28 | GroupEId::GroupEId(struct sockaddr_storage const& groupAddr,
29 | struct sockaddr_storage const& sourceFilterAddr,
30 | portNumBits portNum) {
31 | init(groupAddr, sourceFilterAddr, portNum, 255);
32 | }
33 |
34 | GroupEId::GroupEId() {
35 | init(nullAddress(), nullAddress(), 0, 255);
36 | }
37 |
38 | Boolean GroupEId::isSSM() const {
39 | // We're a SSM group if "fSourceFilterAddress" is not a 'null' address:
40 | return !addressIsNull(fSourceFilterAddress);
41 | }
42 |
43 | portNumBits GroupEId::portNum() const { return ::portNum(fGroupAddress); }
44 |
45 | void GroupEId::init(struct sockaddr_storage const& groupAddr,
46 | struct sockaddr_storage const& sourceFilterAddr,
47 | portNumBits portNum,
48 | u_int8_t ttl) {
49 | fGroupAddress = groupAddr;
50 | setPortNum(fGroupAddress, portNum);
51 | fSourceFilterAddress = sourceFilterAddr;
52 |
53 | fTTL = ttl;
54 | }
55 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "groupsock"
17 | // Copyright (c) 1996-2025 Live Networks, Inc. All rights reserved.
18 | // IO event handlers
19 | // Implementation
20 |
21 | #include "IOHandlers.hh"
22 |
23 | //##### TEMP: Use a single buffer.
24 | //##### This assumes that the I/O handlers are non-reentrant
25 | static unsigned const maxPacketLength = 0x10000; // bytes
26 | // This is usually overkill, because UDP packets are usually no larger
27 | // than the typical Ethernet MTU (1500 bytes). However, I've seen
28 | // reports of Windows Media Servers sending UDP packets as large as
29 | // 27 kBytes. These will probably undergo lots of IP-level
30 | // fragmentation, but that occurs below us. We just have to hope that
31 | // fragments don't get lost.
32 | static unsigned const ioBufferSize = maxPacketLength;
33 | static unsigned char ioBuffer[ioBufferSize];
34 |
35 |
36 | void socketReadHandler(Socket* sock, int /*mask*/) {
37 | unsigned bytesRead;
38 | struct sockaddr_storage dummy; // not used
39 | UsageEnvironment& saveEnv = sock->env();
40 | // because handleRead(), if it fails, may delete "sock"
41 |
42 | if (!sock->handleRead(ioBuffer, ioBufferSize, bytesRead, dummy)) {
43 | saveEnv.reportBackgroundError();
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/H261VideoRTPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/MPEG2TransportStreamDemuxedTrack.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 Live Networks, Inc. All rights reserved.
18 | // A media track, demultiplexed from a MPEG Transport Stream file
19 | // C++ header
20 |
21 | #ifndef _MPEG2_TRANSPORT_STREAM_DEMUXED_TRACK_HH
22 | #define _MPEG2_TRANSPORT_STREAM_DEMUXED_TRACK_HH
23 |
24 | #ifndef _MPEG2_TRANSPORT_STREAM_DEMUX_HH
25 | #include "MPEG2TransportStreamDemux.hh"
26 | #endif
27 |
28 | class MPEG2TransportStreamDemuxedTrack: public FramedSource {
29 | public:
30 | MPEG2TransportStreamDemuxedTrack(class MPEG2TransportStreamParser& ourParser, u_int16_t pid);
31 | virtual ~MPEG2TransportStreamDemuxedTrack();
32 |
33 | private:
34 | // redefined virtual functions:
35 | virtual void doGetNextFrame();
36 |
37 | private: // We are accessed only by "MPEG2TransportStreamParser" (a friend)
38 | friend class MPEG2TransportStreamParser;
39 | unsigned char* to() { return fTo; }
40 | unsigned maxSize() { return fMaxSize; }
41 | unsigned& frameSize() { return fFrameSize; }
42 | unsigned& numTruncatedBytes() { return fNumTruncatedBytes; }
43 | struct timeval& presentationTime() { return fPresentationTime; }
44 |
45 | private:
46 | class MPEG2TransportStreamParser& fOurParser;
47 | u_int16_t fPID;
48 | };
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/MPEG1or2VideoRTPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/VP8VideoRTPSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/VP9VideoRTPSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/UsageEnvironment/Makefile:
--------------------------------------------------------------------------------
1 | INCLUDES = -Iinclude -I../groupsock/include
2 | PREFIX = /usr/local
3 | LIBDIR = $(PREFIX)/lib
4 | ##### Change the following for your environment:
5 | COMPILE_OPTS = $(INCLUDES) -m64 -fPIC -I/usr/local/include -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
6 | C = c
7 | C_COMPILER = cc
8 | C_FLAGS = $(COMPILE_OPTS)
9 | CPP = cpp
10 | CPLUSPLUS_COMPILER = c++
11 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1
12 | OBJ = o
13 | LINK = c++ -o
14 | LINK_OPTS = -L.
15 | CONSOLE_LINK_OPTS = $(LINK_OPTS)
16 | LIBRARY_LINK = ar cr
17 | LIBRARY_LINK_OPTS =
18 | LIB_SUFFIX = a
19 | LIBS_FOR_CONSOLE_APPLICATION = -lssl -lcrypto
20 | LIBS_FOR_GUI_APPLICATION =
21 | EXE =
22 | ##### End of variables to change
23 |
24 | NAME = libUsageEnvironment
25 | USAGE_ENVIRONMENT_LIB = $(NAME).$(LIB_SUFFIX)
26 | ALL = $(USAGE_ENVIRONMENT_LIB)
27 | all: $(ALL)
28 |
29 | OBJS = UsageEnvironment.$(OBJ) HashTable.$(OBJ) strDup.$(OBJ)
30 |
31 | $(USAGE_ENVIRONMENT_LIB): $(OBJS)
32 | $(LIBRARY_LINK)$@ $(LIBRARY_LINK_OPTS) $(OBJS)
33 |
34 | .$(C).$(OBJ):
35 | $(C_COMPILER) -c $(C_FLAGS) $<
36 |
37 | .$(CPP).$(OBJ):
38 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $<
39 |
40 | UsageEnvironment.$(CPP): include/UsageEnvironment.hh
41 | include/UsageEnvironment.hh: include/UsageEnvironment_version.hh include/Boolean.hh include/strDup.hh
42 | HashTable.$(CPP): include/HashTable.hh
43 | include/HashTable.hh: include/Boolean.hh
44 | strDup.$(CPP): include/strDup.hh
45 |
46 | clean:
47 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~
48 |
49 | install: install1 $(INSTALL2)
50 | install1: $(USAGE_ENVIRONMENT_LIB)
51 | install -d $(DESTDIR)$(PREFIX)/include/UsageEnvironment $(DESTDIR)$(LIBDIR)
52 | install -m 644 include/*.hh $(DESTDIR)$(PREFIX)/include/UsageEnvironment
53 | install -m 644 $(USAGE_ENVIRONMENT_LIB) $(DESTDIR)$(LIBDIR)
54 | install_shared_libraries: install1
55 | ln -fs $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).$(SHORT_LIB_SUFFIX)
56 | ln -fs $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).so
57 |
58 | ##### Any additional, platform-specific rules come here:
59 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/AC3AudioFileServerMediaSubsession.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/ADTSAudioFileSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/JPEGVideoRTPSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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/H264VideoStreamDiscreteFramer.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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
28 | ::createNew(UsageEnvironment& env, FramedSource* inputSource,
29 | Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters) {
30 | return new H264VideoStreamDiscreteFramer(env, inputSource,
31 | includeStartCodeInOutput, insertAccessUnitDelimiters);
32 | }
33 |
34 | H264VideoStreamDiscreteFramer
35 | ::H264VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource,
36 | Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters)
37 | : H264or5VideoStreamDiscreteFramer(264, env, inputSource,
38 | includeStartCodeInOutput, insertAccessUnitDelimiters) {
39 | }
40 |
41 | H264VideoStreamDiscreteFramer::~H264VideoStreamDiscreteFramer() {
42 | }
43 |
44 | Boolean H264VideoStreamDiscreteFramer::isH264VideoStreamFramer() const {
45 | return True;
46 | }
47 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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
28 | ::createNew(UsageEnvironment& env, FramedSource* inputSource,
29 | Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters) {
30 | return new H265VideoStreamDiscreteFramer(env, inputSource,
31 | includeStartCodeInOutput, insertAccessUnitDelimiters);
32 | }
33 |
34 | H265VideoStreamDiscreteFramer
35 | ::H265VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource,
36 | Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters)
37 | : H264or5VideoStreamDiscreteFramer(265, env, inputSource,
38 | includeStartCodeInOutput, insertAccessUnitDelimiters) {
39 | }
40 |
41 | H265VideoStreamDiscreteFramer::~H265VideoStreamDiscreteFramer() {
42 | }
43 |
44 | Boolean H265VideoStreamDiscreteFramer::isH265VideoStreamFramer() const {
45 | return True;
46 | }
47 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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 | Boolean includeStartCodeInOutput = False, Boolean insertAccessUnitDelimiters = False);
36 |
37 | protected:
38 | H264VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource,
39 | Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters);
40 | // called only by createNew()
41 | virtual ~H264VideoStreamDiscreteFramer();
42 |
43 | private:
44 | // redefined virtual functions:
45 | virtual Boolean isH264VideoStreamFramer() const;
46 | };
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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 | Boolean includeStartCodeInOutput = False, Boolean insertAccessUnitDelimiters = False);
36 |
37 | protected:
38 | H265VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource,
39 | Boolean includeStartCodeInOutput, Boolean insertAccessUnitDelimiters);
40 | // called only by createNew()
41 | virtual ~H265VideoStreamDiscreteFramer();
42 |
43 | private:
44 | // redefined virtual functions:
45 | virtual Boolean isH265VideoStreamFramer() const;
46 | };
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------
/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 3 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2025 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 |
--------------------------------------------------------------------------------