[-]
[+]
|
Changed |
live.spec
|
|
[-]
[+]
|
Changed |
live-CHANGELOG
^
|
@@ -1,3 +1,79 @@
+2009.07.09:
+- Modified the RTSP server implementation to - for streams where there is a known duration - always include a range end time
+ in the RTSP "PLAY" response, even if the client did not specify one in the "PLAY" request. This allows VLC's client
+ 'trick play' to (mostly) work.
+- Updated "MediaSession::initiate()" to eliminate a possible memory leak if we get an error in socket creation.
+ (Thanks to Denis Charmet.)
+- Made a minor change to "MultiFramedRTPSink" to make monitoring/debugging easier. (Thanks to Guy Bonneau.)
+- Begun adding support for DV video. However, this implementation is still incomplete. DO NOT USE IT!
+
+2009.06.02:
+- Updated the MPEG Transport Stream multiplexor implementation to allow for H.264 video. (Thanks to Massimo Zito.)
+- Updated "MultiFramedRTPSink" to allow for subclasses for RTP payload formats (such as DV, coming soon) that impose
+ a granularity on RTP fragment sizes.
+
+2009.04.20:
+- Fixed "BasicUsageEnvironment::getErrno()" to always (under Windows) return
+ "WSAGetLastError()" (and to just ignore the "errno" variable>.
+ Also fixed a few places in the code where we were still using "errno"
+ instead of calling "getErrno()"
+
+2009.04.07:
+- Changed many "char*" variables to "char const*" to eliminate possible compiler warnings.
+ (Thanks to Sebastien Escudier for pointing out this issue.)
+
+2009.04.06:
+- Modified our Windows-only version of "gettimeofday()" so that it now returns times based on the proper epoch.
+ (Thanks to Patrick White for this suggestion.)
+- Created a new config file for 64-bit Solaris, and renamed the old "config.solaris" file to make it
+ clear that it's for 32-bit Solaris only. (Thanks to Michael Skaastrup.)
+- Modified "config.mingw" to add "-DLOCALE_NOT_USED" to the "COMPILE_OPTS =" line. (The VLC folks seem to want
+ this.)
+- Made a minor change to some win32-specific code in "RTSPClient.cpp" that the VLC folks seem to like.
+ (However, "RTSPClient" is about to undergo a major overhaul (for asynchronous I/O) anyway...)
+- Made a small change to "mediaServer/DynamicRTSPServer.cpp" to eliminate compiler warnings on some platforms.
+
+2009.03.22:
+- Updated "MediaSession::initiate()" to make the selection of ephemeral client
+ port numbers (for RTP and RTCP) more robust, and to eliminate the possibility of
+ the same port numbers accidentally getting chosen more than once by different
+ clients running on the same host. (Thanks to Guido Marelli and others for helping
+ track down this issue.)
+
+2009.02.23:
+- Changed the way in which 'trick mode' transport streams are generated, so that each
+ video I-frame is included in the output Transport Stream no more than once.
+ This means that now - for low scale values - the output frame rate, and bit rate,
+ will be les than that of the original file. (Beforehand, we maintained the same
+ frame rate, which meant that - because each output frame is an I-frame - the output
+ stream's bit rate was always significantly larger than the original. This caused
+ problems for some clients.)
+- Changed the 'client liveness' checking code in the "RTSPServer" implementation so that it deletes the
+ "RTSPClientSession" object even for multicast streams.
+- Made a minor fix to an error report in "RTSPClient". (Thanks to Igor Milavec.)
+
+2009.02.13:
+- Changed calls to the "Locale()" constructor to use an explicit variable name (rather than an anonymous
+ declaration), because some compilers weren't handling the anonymous declaration properly.
+ (Thanks to Steven Kramer for noticing this.)
+- Improved the "RTSPServer" definition and implementation to make it easier to subclass the
+ "RTSPServer::RTSPClientSession" class (e.g., to add a custom implementation of the "SET_PARAMETER" command).
+ Also added an iterator class for iterating over the "RTSPClientSession" objects within a "RTSPServer".
+- Make "MediaSubsession::parseSDPAttribute_framerate()" a little more robust.
+ (Thanks to Shawn Van Every for the suggestion.)
+- Improved "BasicUsageEnvironment0::reportBackgroundError()" (thanks to Matt Schuckmann)
+- Fixed a bug in the "AVIFileSink" code (thanks to Pramod Bhadwat for reporting this).
+
+2009.01.26:
+- Updated the header file for "rtcp_from_spec.c" to make the call to "exit()" a noop.
+ (Thanks to Chris Silvers for raising this issue.)
+- Changed the definition of "RTSPClientSession" (in "RTSPServer") to make it protected (and also to make its
+ command handler functions protected and virtual), to allow developers to subclass it (to change the
+ implementation of some commands).
+ (Thanks to Yedidia Amit for suggesting this.)
+- Fixed a minor bug in "scheduleNextQOSMeasurement()" (in the "openRTSP" implementation).
+ (Thanks to Gabriele De Luca for noticing this.)
+
2008.12.20:
- Removed - from "MultiFramedRTPSource.cpp" - the historical sanity check for bizarrely delayed packets.
Accepting such bizarro packets causes problems in the code; it's best not to accept them at all.
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/BasicUsageEnvironment/BasicHashTable.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Basic Hash Table implementation
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/BasicUsageEnvironment/BasicTaskScheduler.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Basic Usage Environment: for a simple, non-scripted, console application
// Implementation
@@ -80,7 +80,7 @@
int dummySocketNum = socket(AF_INET, SOCK_DGRAM, 0);
FD_SET((unsigned)dummySocketNum, &fReadSet);
}
- if (err != 0) {
+ if (err != EINTR) {
#else
if (errno != EINTR && errno != EAGAIN) {
#endif
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/BasicUsageEnvironment/BasicTaskScheduler0.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Basic Usage Environment: for a simple, non-scripted, console application
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/BasicUsageEnvironment/BasicUsageEnvironment.cpp
^
|
@@ -13,11 +13,10 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Basic Usage Environment: for a simple, non-scripted, console application
// Implementation
-#ifndef IMN_PIM
#include "BasicUsageEnvironment.hh"
#include <stdio.h>
@@ -47,14 +46,7 @@
}
int BasicUsageEnvironment::getErrno() const {
-#if defined(__WIN32__) || defined(_WIN32)
-#ifndef _WIN32_WCE
- if (errno == 0) {
- errno = WSAGetLastError();
- }
-#endif
-#endif
-#if defined(_WIN32_WCE)
+#if defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_WCE)
return WSAGetLastError();
#else
return errno;
@@ -85,5 +77,3 @@
fprintf(stderr, "%p", p);
return *this;
}
-#endif
-
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/BasicUsageEnvironment/BasicUsageEnvironment0.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Basic Usage Environment: for a simple, non-scripted, console application
// Implementation
@@ -83,6 +83,6 @@
}
void BasicUsageEnvironment0::reportBackgroundError() {
- fputs(fResultMsgBuffer, stderr);
+ fputs(getResultMsg(), stderr);
}
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/BasicUsageEnvironment/DelayQueue.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// Help by Carlo Bonamico to get working for Windows
// Delay queue
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/BasicUsageEnvironment/include/BasicHashTable.hh
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Basic Hash Table implementation
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/BasicUsageEnvironment/include/BasicUsageEnvironment.hh
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Basic Usage Environment: for a simple, non-scripted, console application
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/BasicUsageEnvironment/include/BasicUsageEnvironment0.hh
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Basic Usage Environment: for a simple, non-scripted, console application
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/BasicUsageEnvironment/include/BasicUsageEnvironment_version.hh
^
|
@@ -1,10 +1,10 @@
// Version information for the "BasicUsageEnvironment" library
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
#ifndef _BASICUSAGEENVIRONMENT_VERSION_HH
#define _BASICUSAGEENVIRONMENT_VERSION_HH
-#define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_STRING "2008.12.19"
-#define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_INT 1229644800
+#define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_STRING "2009.07.09"
+#define BASICUSAGEENVIRONMENT_LIBRARY_VERSION_INT 1247097600
#endif
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/BasicUsageEnvironment/include/DelayQueue.hh
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
- // Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+ // Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// Delay queue
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/BasicUsageEnvironment/include/HandlerSet.hh
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Basic Usage Environment: for a simple, non-scripted, console application
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/UsageEnvironment/HashTable.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Generic Hash Table
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/UsageEnvironment/UsageEnvironment.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Usage Environment
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/UsageEnvironment/include/HashTable.hh
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Generic Hash Table
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/UsageEnvironment/include/UsageEnvironment.hh
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Usage Environment
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/UsageEnvironment/include/UsageEnvironment_version.hh
^
|
@@ -1,10 +1,10 @@
// Version information for the "UsageEnvironment" library
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
#ifndef _USAGEENVIRONMENT_VERSION_HH
#define _USAGEENVIRONMENT_VERSION_HH
-#define USAGEENVIRONMENT_LIBRARY_VERSION_STRING "2008.12.19"
-#define USAGEENVIRONMENT_LIBRARY_VERSION_INT 1229644800
+#define USAGEENVIRONMENT_LIBRARY_VERSION_STRING "2009.07.09"
+#define USAGEENVIRONMENT_LIBRARY_VERSION_INT 1247097600
#endif
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/UsageEnvironment/include/strDup.hh
^
|
@@ -17,7 +17,7 @@
#ifndef _STRDUP_HH
#define _STRDUP_HH
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A C++ equivalent to the standard C routine "strdup()".
// This generates a char* that can be deleted using "delete[]"
// Header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/UsageEnvironment/strDup.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A C++ equivalent to the standard C routine "strdup()".
// This generates a char* that can be deleted using "delete[]"
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/WindowsAudioInputDevice/WindowsAudioInputDevice_common.hh
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Windows implementation of a generic audio input device
// Base class for both library versions:
// One that uses Windows' built-in software mixer; another that doesn't.
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/WindowsAudioInputDevice/WindowsAudioInputDevice_mixer.hh
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Windows implementation of a generic audio input device
// This version uses Windows' built-in software mixer.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/WindowsAudioInputDevice/WindowsAudioInputDevice_noMixer.hh
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Windows implementation of a generic audio input device
// This version does not use Windows' built-in software mixer.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/WindowsAudioInputDevice/showAudioInputPorts.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A program that prints out this computer's audio input ports
#include "AudioInputDevice.hh"
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/config.mingw
^
|
@@ -1,4 +1,4 @@
-COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=int
+COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=int -DLOCALE_NOT_USED
C = c
C_COMPILER = $(CC)
C_FLAGS = $(COMPILE_OPTS) -DUSE_OUR_BZERO=1 -D__MINGW32__
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/config.solaris-32bit
^
|
(renamed from config.solaris)
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/config.solaris-32bit
^
|
(renamed from config.solaris)
|
[-]
[+]
|
Added |
live.2009.07.09.tar.bz2/config.solaris-64bit
^
|
@@ -0,0 +1,17 @@
+COMPILE_OPTS = $(INCLUDES) -m64 -I. -O -DSOLARIS -DSOCKLEN_T=socklen_t
+C = c
+C_COMPILER = cc
+C_FLAGS = $(COMPILE_OPTS)
+CPP = cpp
+CPLUSPLUS_COMPILER = c++
+CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall
+OBJ = o
+LINK = c++ -m64 -o
+LINK_OPTS = -L.
+CONSOLE_LINK_OPTS = $(LINK_OPTS)
+LIBRARY_LINK = ld -o
+LIBRARY_LINK_OPTS = $(LINK_OPTS) -64 -r -dn
+LIB_SUFFIX = a
+LIBS_FOR_CONSOLE_APPLICATION = -lsocket -lnsl
+LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION)
+EXE =
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/GroupEId.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// "Group Endpoint Id"
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/Groupsock.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// 'Group sockets'
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/GroupsockHelper.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "mTunnel" multicast access service
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Helper routines to implement 'group sockets'
// Implementation
@@ -35,7 +35,7 @@
netAddressBits SendingInterfaceAddr = INADDR_ANY;
netAddressBits ReceivingInterfaceAddr = INADDR_ANY;
-static void socketErr(UsageEnvironment& env, char* errorMsg) {
+static void socketErr(UsageEnvironment& env, char const* errorMsg) {
env.setResultErrMsg(errorMsg);
}
@@ -230,10 +230,8 @@
if (timeout != NULL && result == 0) {
break; // this is OK - timeout occurred
} else if (result <= 0) {
-#if defined(__WIN32__) || defined(_WIN32)
-#else
- if (errno == EINTR || errno == EAGAIN) continue;
-#endif
+ int err = env.getErrno();
+ if (err == EINTR || err == EAGAIN || err == EWOULDBLOCK) continue;
socketErr(env, "select() error: ");
break;
}
@@ -744,23 +742,36 @@
tp->tv_sec = (long) ((ularge.QuadPart - epoch) / 10000000L);
tp->tv_usec = (long) (system_time.wMilliseconds * 1000);
#else
-#ifdef USE_OLD_GETTIMEOFDAY_FOR_WINDOWS_CODE
- struct timeb tb;
- ftime(&tb);
- tp->tv_sec = tb.time;
- tp->tv_usec = 1000*tb.millitm;
-#else
+ static LARGE_INTEGER tickFrequency, epochOffset;
+
+ // For our first call, use "ftime()", so that we get a time with a proper epoch.
+ // For subsequent calls, use "QueryPerformanceCount()", because it's more fine-grain.
+ static Boolean isFirstCall = True;
+
LARGE_INTEGER tickNow;
- static LARGE_INTEGER tickFrequency;
- static BOOL tickFrequencySet = FALSE;
- if (tickFrequencySet == FALSE) {
+ QueryPerformanceCounter(&tickNow);
+
+ if (isFirstCall) {
+ struct timeb tb;
+ ftime(&tb);
+ tp->tv_sec = tb.time;
+ tp->tv_usec = 1000*tb.millitm;
+
+ // Also get our counter frequency:
QueryPerformanceFrequency(&tickFrequency);
- tickFrequencySet = TRUE;
+
+ // And compute an offset to add to subsequent counter times, so we get a proper epoch:
+ epochOffset.QuadPart
+ = tb.time*tickFrequency.QuadPart + (tb.millitm*tickFrequency.QuadPart)/1000 - tickNow.QuadPart;
+
+ isFirstCall = False; // for next time
+ } else {
+ // Adjust our counter time so that we get a proper epoch:
+ tickNow.QuadPart += epochOffset.QuadPart;
+
+ tp->tv_sec = (long) (tickNow.QuadPart / tickFrequency.QuadPart);
+ tp->tv_usec = (long) (((tickNow.QuadPart % tickFrequency.QuadPart) * 1000000L) / tickFrequency.QuadPart);
}
- QueryPerformanceCounter(&tickNow);
- tp->tv_sec = (long) (tickNow.QuadPart / tickFrequency.QuadPart);
- tp->tv_usec = (long) (((tickNow.QuadPart % tickFrequency.QuadPart) * 1000000L) / tickFrequency.QuadPart);
-#endif
#endif
return 0;
}
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/IOHandlers.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "mTunnel" multicast access service
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// IO event handlers
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/NetAddress.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "mTunnel" multicast access service
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Network Addresses
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/NetInterface.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "mTunnel" multicast access service
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Network Interfaces
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/include/GroupEId.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "multikit" Multicast Application Shell
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// "Group Endpoint Id"
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/include/Groupsock.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "mTunnel" multicast access service
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// 'Group sockets'
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/include/GroupsockHelper.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "mTunnel" multicast access service
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Helper routines to implement 'group sockets'
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/include/IOHandlers.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "mTunnel" multicast access service
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// IO event handlers
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/include/NetAddress.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "mTunnel" multicast access service
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Network Addresses
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/include/NetCommon.h
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
/* "groupsock" interface
- * Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+ * Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
* Common include files, typically used for networking
*/
@@ -36,6 +36,9 @@
#define closeSocket closesocket
#define EWOULDBLOCK WSAEWOULDBLOCK
+#define EINPROGRESS WSAEWOULDBLOCK
+#define EAGAIN WSAEWOULDBLOCK
+#define EINTR WSAEINTR
#if defined(_WIN32_WCE)
#define NO_STRSTREAM 1
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/include/NetInterface.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "mTunnel" multicast access service
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Network Interfaces
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/include/TunnelEncaps.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "mTunnel" multicast access service
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Encapsulation trailer for tunnels
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/groupsock/include/groupsock_version.hh
^
|
@@ -1,10 +1,10 @@
// Version information for the "groupsock" library
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
#ifndef _GROUPSOCK_VERSION_HH
#define _GROUPSOCK_VERSION_HH
-#define GROUPSOCK_LIBRARY_VERSION_STRING "2008.12.19"
-#define GROUPSOCK_LIBRARY_VERSION_INT 1229644800
+#define GROUPSOCK_LIBRARY_VERSION_STRING "2009.07.09"
+#define GROUPSOCK_LIBRARY_VERSION_INT 1247097600
#endif
|
[-]
[+]
|
Added |
live.2009.07.09.tar.bz2/liveMedia/#H264VideoRTPSink.cpp#
^
|
@@ -0,0 +1,239 @@
+sffmtp/**********
+This library is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the
+Free Software Foundation; either version 2.1 of the License, or (at your
+option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
+
+This library is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+**********/
+// "liveMedia"
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
+// RTP sink for H.264 video (RFC 3984)
+// Implementation
+
+#include "H264VideoRTPSink.hh"
+#include "H264VideoStreamFramer.hh"
+
+////////// H264VideoRTPSink implementation //////////
+
+H264VideoRTPSink
+::H264VideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs,
+ unsigned char rtpPayloadFormat,
+ unsigned profile_level_id,
+ char const* sprop_parameter_sets_str)
+ : VideoRTPSink(env, RTPgs, rtpPayloadFormat, 90000, "H264"),
+ fOurFragmenter(NULL) {
+ // Set up the "a=fmtp:" SDP line for this stream:
+ char const* fmtpFmt =
+ "a=fmtp:%d packetization-mode=1"
+ ";profile-level-id=%06X"
+ ";sprop-parameter-sets=%s\r\n";
+ unsigned fmtpFmtSize = strlen(fmtpFmt)
+ + 3 /* max char len */
+ + 8 /* max unsigned len in hex */
+ + strlen(sprop_parameter_sets_str);
+ char* fmtp = new char[fmtpFmtSize];
+ sprintf(fmtp, fmtpFmt,
+ rtpPayloadFormat,
+ profile_level_id,
+ sprop_parameter_sets_str);
+ fFmtpSDPLine = strDup(fmtp);
+ delete[] fmtp;
+}
+
+H264VideoRTPSink::~H264VideoRTPSink() {
+ delete[] fFmtpSDPLine;
+ Medium::close(fOurFragmenter);
+ fSource = NULL;
+}
+
+H264VideoRTPSink*
+H264VideoRTPSink::createNew(UsageEnvironment& env, Groupsock* RTPgs,
+ unsigned char rtpPayloadFormat,
+ unsigned profile_level_id,
+ char const* sprop_parameter_sets_str) {
+ return new H264VideoRTPSink(env, RTPgs, rtpPayloadFormat,
+ profile_level_id, sprop_parameter_sets_str);
+}
+
+Boolean H264VideoRTPSink::sourceIsCompatibleWithUs(MediaSource& source) {
+ // Our source must be an appropriate framer:
+ return source.isH264VideoStreamFramer();
+}
+
+Boolean H264VideoRTPSink::continuePlaying() {
+ // First, check whether we have a 'fragmenter' class set up yet.
+ // If not, create it now:
+ if (fOurFragmenter == NULL) {
+ fOurFragmenter = new H264FUAFragmenter(envir(), fSource, OutPacketBuffer::maxSize,
+ ourMaxPacketSize() - 12/*RTP hdr size*/);
+ fSource = fOurFragmenter;
+ }
+
+ // Then call the parent class's implementation:
+ return MultiFramedRTPSink::continuePlaying();
+}
+
+void H264VideoRTPSink::stopPlaying() {
+ // First, call the parent class's implementation, to stop our fragmenter object
+ // (and its source):
+ MultiFramedRTPSink::stopPlaying();
+
+ // Then, close our 'fragmenter' object:
+ Medium::close(fOurFragmenter); fOurFragmenter = NULL;
+ fSource = NULL;
+}
+
+void H264VideoRTPSink::doSpecialFrameHandling(unsigned /*fragmentationOffset*/,
+ unsigned char* /*frameStart*/,
+ unsigned /*numBytesInFrame*/,
+ struct timeval frameTimestamp,
+ unsigned /*numRemainingBytes*/) {
+ // Set the RTP 'M' (marker) bit iff
+ // 1/ The most recently delivered fragment was the end of
+ // (or the only fragment of) an NAL unit, and
+ // 2/ This NAL unit was the last NAL unit of an 'access unit' (i.e. video frame).
+ if (fOurFragmenter != NULL) {
+ H264VideoStreamFramer* framerSource
+ = (H264VideoStreamFramer*)(fOurFragmenter->inputSource());
+ // This relies on our fragmenter's source being a "MPEG4VideoStreamFramer".
+ if (fOurFragmenter->lastFragmentCompletedNALUnit()
+ && framerSource != NULL && framerSource->currentNALUnitEndsAccessUnit()) {
+ setMarkerBit();
+ }
+ }
+
+ setTimestamp(frameTimestamp);
+}
+
+Boolean H264VideoRTPSink
+::frameCanAppearAfterPacketStart(unsigned char const* /*frameStart*/,
+ unsigned /*numBytesInFrame*/) const {
+ return False;
+}
+
+char const* H264VideoRTPSink::auxSDPLine() {
+ return fFmtpSDPLine;
+}
+
+
+////////// H264FUAFragmenter implementation //////////
+
+H264FUAFragmenter::H264FUAFragmenter(UsageEnvironment& env,
+ FramedSource* inputSource,
+ unsigned inputBufferMax,
+ unsigned maxOutputPacketSize)
+ : FramedFilter(env, inputSource),
+ fInputBufferSize(inputBufferMax+1), fMaxOutputPacketSize(maxOutputPacketSize),
+ fNumValidDataBytes(1), fCurDataOffset(1), fSaveNumTruncatedBytes(0),
+ fLastFragmentCompletedNALUnit(True) {
+ fInputBuffer = new unsigned char[fInputBufferSize];
+}
+
+H264FUAFragmenter::~H264FUAFragmenter() {
+ delete[] fInputBuffer;
+ fInputSource = NULL; // so that the subsequent ~FramedFilter doesn't delete it
+}
+
+void H264FUAFragmenter::doGetNextFrame() {
+ if (fNumValidDataBytes == 1) {
+ // We have no NAL unit data currently in the buffer. Read a new one:
+ fInputSource->getNextFrame(&fInputBuffer[1], fInputBufferSize - 1,
+ afterGettingFrame, this,
+ FramedSource::handleClosure, this);
+ } else {
+ // We have NAL unit data in the buffer. There are three cases to consider:
+ // 1. There is a new NAL unit in the buffer, and it's small enough to deliver
+ // to the RTP sink (as is).
+ // 2. There is a new NAL unit in the buffer, but it's too large to deliver to
+ // the RTP sink in its entirety. Deliver the first fragment of this data,
+ // as a FU-A packet, with one extra preceding header byte.
+ // 3. There is a NAL unit in the buffer, and we've already delivered some
+ // fragment(s) of this. Deliver the next fragment of this data,
+ // as a FU-A packet, with two extra preceding header bytes.
+
+ if (fMaxSize < fMaxOutputPacketSize) { // shouldn't happen
+ envir() << "H264FUAFragmenter::doGetNextFrame(): fMaxSize ("
+ << fMaxSize << ") is smaller than expected\n";
+ } else {
+ fMaxSize = fMaxOutputPacketSize;
+ }
+
+ fLastFragmentCompletedNALUnit = True; // by default
+ if (fCurDataOffset == 1) { // case 1 or 2
+ if (fNumValidDataBytes - 1 <= fMaxSize) { // case 1
+ memmove(fTo, &fInputBuffer[1], fNumValidDataBytes - 1);
+ fFrameSize = fNumValidDataBytes - 1;
+ fCurDataOffset = fNumValidDataBytes;
+ } else { // case 2
+ // We need to send the NAL unit data as FU-A packets. Deliver the first
+ // packet now. Note that we add FU indicator and FU header bytes to the front
+ // of the packet (reusing the existing NAL header byte for the FU header).
+ fInputBuffer[0] = (fInputBuffer[1] & 0xE0) | 28; // FU indicator
+ fInputBuffer[1] = 0x80 | (fInputBuffer[1] & 0x1F); // FU header (with S bit)
+ memmove(fTo, fInputBuffer, fMaxSize);
+ fFrameSize = fMaxSize;
+ fCurDataOffset += fMaxSize - 1;
+ fLastFragmentCompletedNALUnit = False;
+ }
+ } else { // case 3
+ // We are sending this NAL unit data as FU-A packets. We've already sent the
+ // first packet (fragment). Now, send the next fragment. Note that we add
+ // FU indicator and FU header bytes to the front. (We reuse these bytes that
+ // we already sent for the first fragment, but clear the S bit, and add the E
+ // bit if this is the last fragment.)
+ fInputBuffer[fCurDataOffset-2] = fInputBuffer[0]; // FU indicator
+ fInputBuffer[fCurDataOffset-1] = fInputBuffer[1]&~0x80; // FU header (no S bit)
+ unsigned numBytesToSend = 2 + fNumValidDataBytes - fCurDataOffset;
+ if (numBytesToSend > fMaxSize) {
+ // We can't send all of the remaining data this time:
+ numBytesToSend = fMaxSize;
+ fLastFragmentCompletedNALUnit = False;
+ } else {
+ // This is the last fragment:
+ fInputBuffer[fCurDataOffset-1] |= 0x40; // set the E bit in the FU header
+ fNumTruncatedBytes = fSaveNumTruncatedBytes;
+ }
+ memmove(fTo, &fInputBuffer[fCurDataOffset-2], numBytesToSend);
+ fFrameSize = numBytesToSend;
+ fCurDataOffset += numBytesToSend - 2;
+ }
+
+ if (fCurDataOffset >= fNumValidDataBytes) {
+ // We're done with this data. Reset the pointers for receiving new data:
+ fNumValidDataBytes = fCurDataOffset = 1;
+ }
+
+ // Complete delivery to the client:
+ FramedSource::afterGetting(this);
+ }
+}
+
+void H264FUAFragmenter::afterGettingFrame(void* clientData, unsigned frameSize,
+ unsigned numTruncatedBytes,
+ struct timeval presentationTime,
+ unsigned durationInMicroseconds) {
+ H264FUAFragmenter* fragmenter = (H264FUAFragmenter*)clientData;
+ fragmenter->afterGettingFrame1(frameSize, numTruncatedBytes, presentationTime,
+ durationInMicroseconds);
+}
+
+void H264FUAFragmenter::afterGettingFrame1(unsigned frameSize,
+ unsigned numTruncatedBytes,
+ struct timeval presentationTime,
+ unsigned durationInMicroseconds) {
+ fNumValidDataBytes += frameSize;
+ fSaveNumTruncatedBytes = numTruncatedBytes;
+ fPresentationTime = presentationTime;
+ fDurationInMicroseconds = durationInMicroseconds;
+
+ // Deliver data to the client:
+ doGetNextFrame();
+}
|
[-]
[+]
|
Added |
live.2009.07.09.tar.bz2/liveMedia/#MultiFramedRTPSink.cpp#
^
|
@@ -0,0 +1,419 @@
+frame**********
+This library is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the
+Free Software Foundation; either version 2.1 of the License, or (at your
+option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
+
+This library is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+**********/
+// "liveMedia"
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
+// RTP sink for a common kind of payload format: Those which pack multiple,
+// complete codec frames (as many as possible) into each RTP packet.
+// Implementation
+
+#include "MultiFramedRTPSink.hh"
+#include "GroupsockHelper.hh"
+
+////////// MultiFramedRTPSink //////////
+
+void MultiFramedRTPSink::setPacketSizes(unsigned preferredPacketSize,
+ unsigned maxPacketSize) {
+ if (preferredPacketSize > maxPacketSize || preferredPacketSize == 0) return;
+ // sanity check
+
+ delete fOutBuf;
+ fOutBuf = new OutPacketBuffer(preferredPacketSize, maxPacketSize);
+ fOurMaxPacketSize = maxPacketSize; // save value, in case subclasses need it
+}
+
+MultiFramedRTPSink::MultiFramedRTPSink(UsageEnvironment& env,
+ Groupsock* rtpGS,
+ unsigned char rtpPayloadType,
+ unsigned rtpTimestampFrequency,
+ char const* rtpPayloadFormatName,
+ unsigned numChannels)
+ : RTPSink(env, rtpGS, rtpPayloadType, rtpTimestampFrequency,
+ rtpPayloadFormatName, numChannels),
+ fOutBuf(NULL), fCurFragmentationOffset(0), fPreviousFrameEndedFragmentation(False) {
+ setPacketSizes(1000, 1448);
+ // Default max packet size (1500, minus allowance for IP, UDP, UMTP headers)
+ // (Also, make it a multiple of 4 bytes, just in case that matters.)
+}
+
+MultiFramedRTPSink::~MultiFramedRTPSink() {
+ delete fOutBuf;
+}
+
+void MultiFramedRTPSink
+::doSpecialFrameHandling(unsigned /*fragmentationOffset*/,
+ unsigned char* /*frameStart*/,
+ unsigned /*numBytesInFrame*/,
+ struct timeval frameTimestamp,
+ unsigned /*numRemainingBytes*/) {
+ // default implementation: If this is the first frame in the packet,
+ // use its timestamp for the RTP timestamp:
+ if (isFirstFrameInPacket()) {
+ setTimestamp(frameTimestamp);
+ }
+}
+
+Boolean MultiFramedRTPSink::allowFragmentationAfterStart() const {
+ return False; // by default
+}
+
+Boolean MultiFramedRTPSink::allowOtherFramesAfterLastFragment() const {
+ return False; // by default
+}
+
+Boolean MultiFramedRTPSink
+::frameCanAppearAfterPacketStart(unsigned char const* /*frameStart*/,
+ unsigned /*numBytesInFrame*/) const {
+ return True; // by default
+}
+
+unsigned MultiFramedRTPSink::specialHeaderSize() const {
+ // default implementation: Assume no special header:
+ return 0;
+}
+
+unsigned MultiFramedRTPSink::frameSpecificHeaderSize() const {
+ // default implementation: Assume no frame-specific header:
+ return 0;
+}
+
+unsigned MultiFramedRTPSink::computeOverflowForNewFrame(unsigned newFrameSize) const {
+ // default implementation: Just call numOverflowBytes()
+ return fOutBuf->numOverflowBytes(newFrameSize);
+}
+
+void MultiFramedRTPSink::setMarkerBit() {
+ unsigned rtpHdr = fOutBuf->extractWord(0);
+ rtpHdr |= 0x00800000;
+ fOutBuf->insertWord(rtpHdr, 0);
+}
+
+void MultiFramedRTPSink::setTimestamp(struct timeval timestamp) {
+ // First, convert the timestamp to a 32-bit RTP timestamp:
+ fCurrentTimestamp = convertToRTPTimestamp(timestamp);
+
+ // Then, insert it into the RTP packet:
+ fOutBuf->insertWord(fCurrentTimestamp, fTimestampPosition);
+}
+
+void MultiFramedRTPSink::setSpecialHeaderWord(unsigned word,
+ unsigned wordPosition) {
+ fOutBuf->insertWord(word, fSpecialHeaderPosition + 4*wordPosition);
+}
+
+void MultiFramedRTPSink::setSpecialHeaderBytes(unsigned char const* bytes,
+ unsigned numBytes,
+ unsigned bytePosition) {
+ fOutBuf->insert(bytes, numBytes, fSpecialHeaderPosition + bytePosition);
+}
+
+void MultiFramedRTPSink::setFrameSpecificHeaderWord(unsigned word,
+ unsigned wordPosition) {
+ fOutBuf->insertWord(word, fCurFrameSpecificHeaderPosition + 4*wordPosition);
+}
+
+void MultiFramedRTPSink::setFrameSpecificHeaderBytes(unsigned char const* bytes,
+ unsigned numBytes,
+ unsigned bytePosition) {
+ fOutBuf->insert(bytes, numBytes, fCurFrameSpecificHeaderPosition + bytePosition);
+}
+
+void MultiFramedRTPSink::setFramePadding(unsigned numPaddingBytes) {
+ if (numPaddingBytes > 0) {
+ // Add the padding bytes (with the last one being the padding size):
+ unsigned char paddingBuffer[255]; //max padding
+ memset(paddingBuffer, 0, numPaddingBytes);
+ paddingBuffer[numPaddingBytes-1] = numPaddingBytes;
+ fOutBuf->enqueue(paddingBuffer, numPaddingBytes);
+
+ // Set the RTP padding bit:
+ unsigned rtpHdr = fOutBuf->extractWord(0);
+ rtpHdr |= 0x20000000;
+ fOutBuf->insertWord(rtpHdr, 0);
+ }
+}
+
+Boolean MultiFramedRTPSink::continuePlaying() {
+ // Send the first packet.
+ // (This will also schedule any future sends.)
+ buildAndSendPacket(True);
+ return True;
+}
+
+void MultiFramedRTPSink::stopPlaying() {
+ fOutBuf->resetPacketStart();
+ fOutBuf->resetOffset();
+ fOutBuf->resetOverflowData();
+
+ // Then call the default "stopPlaying()" function:
+ MediaSink::stopPlaying();
+}
+
+void MultiFramedRTPSink::buildAndSendPacket(Boolean isFirstPacket) {
+ fIsFirstPacket = isFirstPacket;
+
+ // Set up the RTP header:
+ unsigned rtpHdr = 0x80000000; // RTP version 2
+ rtpHdr |= (fRTPPayloadType<<16);
+ rtpHdr |= fSeqNo; // sequence number
+ fOutBuf->enqueueWord(rtpHdr);
+
+ // Note where the RTP timestamp will go.
+ // (We can't fill this in until we start packing payload frames.)
+ fTimestampPosition = fOutBuf->curPacketSize();
+ fOutBuf->skipBytes(4); // leave a hole for the timestamp
+
+ fOutBuf->enqueueWord(SSRC());
+
+ // Allow for a special, payload-format-specific header following the
+ // RTP header:
+ fSpecialHeaderPosition = fOutBuf->curPacketSize();
+ fSpecialHeaderSize = specialHeaderSize();
+ fOutBuf->skipBytes(fSpecialHeaderSize);
+
+ // Begin packing as many (complete) frames into the packet as we can:
+ fTotalFrameSpecificHeaderSizes = 0;
+ fNoFramesLeft = False;
+ fNumFramesUsedSoFar = 0;
+ packFrame();
+}
+
+void MultiFramedRTPSink::packFrame() {
+ // Get the next frame.
+
+ // First, see if we have an overflow frame that was too big for the last pkt
+ if (fOutBuf->haveOverflowData()) {
+ // Use this frame before reading a new one from the source
+ unsigned frameSize = fOutBuf->overflowDataSize();
+ struct timeval presentationTime = fOutBuf->overflowPresentationTime();
+ unsigned durationInMicroseconds = fOutBuf->overflowDurationInMicroseconds();
+ fOutBuf->useOverflowData();
+
+ afterGettingFrame1(frameSize, 0, presentationTime, durationInMicroseconds);
+ } else {
+ // Normal case: we need to read a new frame from the source
+ if (fSource == NULL) return;
+
+ fCurFrameSpecificHeaderPosition = fOutBuf->curPacketSize();
+ fCurFrameSpecificHeaderSize = frameSpecificHeaderSize();
+ fOutBuf->skipBytes(fCurFrameSpecificHeaderSize);
+ fTotalFrameSpecificHeaderSizes += fCurFrameSpecificHeaderSize;
+
+ fSource->getNextFrame(fOutBuf->curPtr(), fOutBuf->totalBytesAvailable(),
+ afterGettingFrame, this, ourHandleClosure, this);
+ }
+}
+
+void MultiFramedRTPSink
+::afterGettingFrame(void* clientData, unsigned numBytesRead,
+ unsigned numTruncatedBytes,
+ struct timeval presentationTime,
+ unsigned durationInMicroseconds) {
+ MultiFramedRTPSink* sink = (MultiFramedRTPSink*)clientData;
+ sink->afterGettingFrame1(numBytesRead, numTruncatedBytes,
+ presentationTime, durationInMicroseconds);
+}
+
+void MultiFramedRTPSink
+::afterGettingFrame1(unsigned frameSize, unsigned numTruncatedBytes,
+ struct timeval presentationTime,
+ unsigned durationInMicroseconds) {
+ if (fIsFirstPacket) {
+ // Record the fact that we're starting to play now:
+ gettimeofday(&fNextSendTime, NULL);
+ }
+
+ if (numTruncatedBytes > 0) {
+ unsigned const bufferSize = fOutBuf->totalBytesAvailable();
+ unsigned newMaxSize = frameSize + numTruncatedBytes;
+ envir() << "MultiFramedRTPSink::afterGettingFrame1(): The input frame data was too large for our buffer size ("
+ << bufferSize << "). "
+ << numTruncatedBytes << " bytes of trailing data was dropped! Correct this by increasing \"OutPacketBuffer::maxSize\" to at least "
+ << newMaxSize << ", *before* creating this 'RTPSink'. (Current value is "
+ << OutPacketBuffer::maxSize << ".)\n";
+ }
+ unsigned curFragmentationOffset = fCurFragmentationOffset;
+ unsigned numFrameBytesToUse = frameSize;
+ unsigned overflowBytes = 0;
+
+ // If we have already packed one or more frames into this packet,
+ // check whether this new frame is eligible to be packed after them.
+ // (This is independent of whether the packet has enough room for this
+ // new frame; that check comes later.)
+ if (fNumFramesUsedSoFar > 0) {
+ if ((fPreviousFrameEndedFragmentation
+ && !allowOtherFramesAfterLastFragment())
+ || !frameCanAppearAfterPacketStart(fOutBuf->curPtr(), frameSize)) {
+ // Save away this frame for next time:
+ numFrameBytesToUse = 0;
+ fOutBuf->setOverflowData(fOutBuf->curPacketSize(), frameSize,
+ presentationTime, durationInMicroseconds);
+ }
+ }
+ fPreviousFrameEndedFragmentation = False;
+
+ if (numFrameBytesToUse > 0) {
+ // Check whether this frame overflows the packet
+ if (fOutBuf->wouldOverflow(frameSize)) {
+ // Don't use this frame now; instead, save it as overflow data, and
+ // send it in the next packet instead. However, if the frame is too
+ // big to fit in a packet by itself, then we need to fragment it (and
+ // use some of it in this packet, if the payload format permits this.)
+ if (isTooBigForAPacket(frameSize)
+ && (fNumFramesUsedSoFar == 0 || allowFragmentationAfterStart())) {
+ // We need to fragment this frame, and use some of it now:
+ overflowBytes = computeOverflowForNewFrame(frameSize);
+ numFrameBytesToUse -= overflowBytes;
+ fCurFragmentationOffset += numFrameBytesToUse;
+ } else {
+ // We don't use any of this frame now:
+ overflowBytes = frameSize;
+ numFrameBytesToUse = 0;
+ }
+ fOutBuf->setOverflowData(fOutBuf->curPacketSize() + numFrameBytesToUse,
+ overflowBytes, presentationTime,
+ durationInMicroseconds);
+ } else if (fCurFragmentationOffset > 0) {
+ // This is the last fragment of a frame that was fragmented over
+ // more than one packet. Do any special handling for this case:
+ fCurFragmentationOffset = 0;
+ fPreviousFrameEndedFragmentation = True;
+ }
+ }
+
+ if (numFrameBytesToUse == 0) {
+ // Send our packet now, because we have filled it up:
+ sendPacketIfNecessary();
+ } else {
+ // Use this frame in our outgoing packet:
+ unsigned char* frameStart = fOutBuf->curPtr();
+ fOutBuf->increment(numFrameBytesToUse);
+ // do this now, in case "doSpecialFrameHandling()" calls "setFramePadding()" to append padding bytes
+
+ // Here's where any payload format specific processing gets done:
+ doSpecialFrameHandling(curFragmentationOffset, frameStart,
+ numFrameBytesToUse, presentationTime,
+ overflowBytes);
+
+ ++fNumFramesUsedSoFar;
+
+ // Update the time at which the next packet should be sent, based
+ // on the duration of the frame that we just packed into it.
+ // However, if this frame has overflow data remaining, then don't
+ // count its duration yet.
+ if (overflowBytes == 0) {
+ fNextSendTime.tv_usec += durationInMicroseconds;
+ fNextSendTime.tv_sec += fNextSendTime.tv_usec/1000000;
+ fNextSendTime.tv_usec %= 1000000;
+ }
+
+ // Send our packet now if (i) it's already at our preferred size, or
+ // (ii) (heuristic) another frame of the same size as the one we just
+ // read would overflow the packet, or
+ // (iii) it contains the last fragment of a fragmented frame, and we
+ // don't allow anything else to follow this or
+ // (iv) one frame per packet is allowed:
+ if (fOutBuf->isPreferredSize()
+ || fOutBuf->wouldOverflow(numFrameBytesToUse)
+ || (fPreviousFrameEndedFragmentation &&
+ !allowOtherFramesAfterLastFragment())
+ || !frameCanAppearAfterPacketStart(fOutBuf->curPtr() - frameSize,
+ frameSize) ) {
+ // The packet is ready to be sent now
+ sendPacketIfNecessary();
+ } else {
+ // There's room for more frames; try getting another:
+ packFrame();
+ }
+ }
+}
+
+static unsigned const rtpHeaderSize = 12;
+
+Boolean MultiFramedRTPSink::isTooBigForAPacket(unsigned numBytes) const {
+ // Check whether a 'numBytes'-byte frame - together with a RTP header and
+ // (possible) special headers - would be too big for an output packet:
+ // (Later allow for RTP extension header!) #####
+ numBytes += rtpHeaderSize + specialHeaderSize() + frameSpecificHeaderSize();
+ return fOutBuf->isTooBigForAPacket(numBytes);
+}
+
+void MultiFramedRTPSink::sendPacketIfNecessary() {
+ if (fNumFramesUsedSoFar > 0) {
+ // Send the packet:
+#ifdef TEST_LOSS
+ if ((our_random()%10) != 0) // simulate 10% packet loss #####
+#endif
+ fRTPInterface.sendPacket(fOutBuf->packet(), fOutBuf->curPacketSize());
+ ++fPacketCount;
+ fTotalOctetCount += fOutBuf->curPacketSize();
+ fOctetCount += fOutBuf->curPacketSize()
+ - rtpHeaderSize - fSpecialHeaderSize - fTotalFrameSpecificHeaderSizes;
+
+ ++fSeqNo; // for next time
+ }
+
+ if (fOutBuf->haveOverflowData()
+ && fOutBuf->totalBytesAvailable() > fOutBuf->totalBufferSize()/2) {
+ // Efficiency hack: Reset the packet start pointer to just in front of
+ // the overflow data (allowing for the RTP header and special headers),
+ // so that we probably don't have to "memmove()" the overflow data
+ // into place when building the next packet:
+ unsigned newPacketStart = fOutBuf->curPacketSize()
+ - (rtpHeaderSize + fSpecialHeaderSize + frameSpecificHeaderSize());
+ fOutBuf->adjustPacketStart(newPacketStart);
+ } else {
+ // Normal case: Reset the packet start pointer back to the start:
+ fOutBuf->resetPacketStart();
+ }
+ fOutBuf->resetOffset();
+ fNumFramesUsedSoFar = 0;
+
+ if (fNoFramesLeft) {
+ // We're done:
+ onSourceClosure(this);
+ } else {
+ // We have more frames left to send. Figure out when the next frame
+ // is due to start playing, then make sure that we wait this long before
+ // sending the next packet.
+ struct timeval timeNow;
+ gettimeofday(&timeNow, NULL);
+ int uSecondsToGo;
+ if (fNextSendTime.tv_sec < timeNow.tv_sec
+ || (fNextSendTime.tv_sec == timeNow.tv_sec && fNextSendTime.tv_usec < timeNow.tv_usec)) {
+ uSecondsToGo = 0; // prevents integer underflow if too far behind
+ } else {
+ uSecondsToGo = (fNextSendTime.tv_sec - timeNow.tv_sec)*1000000 + (fNextSendTime.tv_usec - timeNow.tv_usec);
+ }
+
+ // Delay this amount of time:
+ nextTask() = envir().taskScheduler().scheduleDelayedTask(uSecondsToGo,
+ (TaskFunc*)sendNext, this);
+ }
+}
+
+// The following is called after each delay between packet sends:
+void MultiFramedRTPSink::sendNext(void* firstArg) {
+ MultiFramedRTPSink* sink = (MultiFramedRTPSink*)firstArg;
+ sink->buildAndSendPacket(False);
+}
+
+void MultiFramedRTPSink::ourHandleClosure(void* clientData) {
+ MultiFramedRTPSink* sink = (MultiFramedRTPSink*)clientData;
+ // There are no frames left, but we may have a partially built packet
+ // to send
+ sink->fNoFramesLeft = True;
+ sink->sendPacketIfNecessary();
+}
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/AC3AudioRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for AC3 audio
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/AC3AudioRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// AC3 Audio RTP Sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/AC3AudioStreamFramer.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that breaks up an AC3 audio elementary stream into frames
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/ADTSAudioFileServerMediaSubsession.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from an AAC audio file in ADTS format
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/ADTSAudioFileSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A source object for AAC audio files in ADTS format
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/AMRAudioFileServerMediaSubsession.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from an AMR audio file.
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/AMRAudioFileSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// AMR Audio File sinks
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/AMRAudioFileSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A source object for AMR audio files (as defined in RFC 3267, section 5)
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/AMRAudioRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for AMR audio (RFC 3267)
// Implementation
@@ -41,11 +41,11 @@
sourceIsWideband ? 16000 : 8000,
sourceIsWideband ? "AMR-WB": "AMR",
numChannelsInSource),
- fSourceIsWideband(sourceIsWideband), fAuxSDPLine(NULL) {
+ fSourceIsWideband(sourceIsWideband), fFmtpSDPLine(NULL) {
}
AMRAudioRTPSink::~AMRAudioRTPSink() {
- delete[] fAuxSDPLine;
+ delete[] fFmtpSDPLine;
}
Boolean AMRAudioRTPSink::sourceIsCompatibleWithUs(MediaSource& source) {
@@ -123,12 +123,12 @@
}
char const* AMRAudioRTPSink::auxSDPLine() {
- if (fAuxSDPLine == NULL) {
+ if (fFmtpSDPLine == NULL) {
// Generate a "a=fmtp:" line with "octet-aligned=1"
// (That is the only non-default parameter.)
char buf[100];
sprintf(buf, "a=fmtp:%d octet-align=1\r\n", rtpPayloadType());
- delete[] fAuxSDPLine; fAuxSDPLine = strDup(buf);
+ delete[] fFmtpSDPLine; fFmtpSDPLine = strDup(buf);
}
- return fAuxSDPLine;
+ return fFmtpSDPLine;
}
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/AMRAudioRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// AMR Audio RTP Sources (RFC 3267)
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/AMRAudioSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A source object for AMR audio sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/AVIFileSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A sink that generates an AVI file from a composite media session
// Implementation
@@ -326,7 +326,7 @@
AVISubsessionIOState::AVISubsessionIOState(AVIFileSink& sink,
MediaSubsession& subsession)
: fOurSink(sink), fOurSubsession(subsession),
- fMaxBytesPerSecond(0), fNumFrames(0) {
+ fMaxBytesPerSecond(0), fIsVideo(False), fIsAudio(False), fIsByteSwappedAudio(False), fNumFrames(0) {
fBuffer = new SubsessionBuffer(fOurSink.fBufferSize);
fPrevBuffer = sink.fPacketLossCompensate
? new SubsessionBuffer(fOurSink.fBufferSize) : NULL;
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/AudioRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A generic RTP sink for audio codecs (abstract base class)
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/Base64.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Base64 encoding and decoding
// implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/BasicUDPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A simple UDP sink (i.e., without RTP or other headers added); one frame per packet
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/BasicUDPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A simple UDP source, where every UDP payload is a complete frame
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/BitVector.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Bit Vector data structure
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/BitVector.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Bit Vector data structure
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/ByteStreamFileSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A file source that is a plain byte stream (rather than frames)
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/ByteStreamMultiFileSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A source that consists of multiple byte-stream files, read sequentially
// Implementation
|
[-]
[+]
|
Added |
live.2009.07.09.tar.bz2/liveMedia/DVVideoRTPSink.cpp
^
|
@@ -0,0 +1,99 @@
+/**********
+This library is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the
+Free Software Foundation; either version 2.1 of the License, or (at your
+option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
+
+This library is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+**********/
+// "liveMedia"
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
+// RTP sink for DV video (RFC 3189)
+// (Thanks to Ben Hutchings for prototyping this.)
+// Implementation
+
+#include "DVVideoRTPSink.hh"
+#include "DVVideoStreamFramer.hh"
+
+////////// DVVideoRTPSink implementation //////////
+
+DVVideoRTPSink
+::DVVideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat)
+ : VideoRTPSink(env, RTPgs, rtpPayloadFormat, 90000, "DV"),
+ fFmtpSDPLine(NULL) {
+}
+
+DVVideoRTPSink::~DVVideoRTPSink() {
+ delete[] fFmtpSDPLine;
+}
+
+DVVideoRTPSink*
+DVVideoRTPSink::createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat) {
+ return new DVVideoRTPSink(env, RTPgs, rtpPayloadFormat);
+}
+
+Boolean DVVideoRTPSink::sourceIsCompatibleWithUs(MediaSource& source) {
+ // Our source must be an appropriate framer:
+ return source.isDVVideoStreamFramer();
+}
+
+void DVVideoRTPSink::doSpecialFrameHandling(unsigned fragmentationOffset,
+ unsigned char* /*frameStart*/,
+ unsigned /*numBytesInFrame*/,
+ struct timeval frameTimestamp,
+ unsigned numRemainingBytes) {
+ if (fragmentationOffset == 0) {
+ // This packet contains the first (or only) fragment of the frame. Read its header to figure out our profile:
+
+
+ }
+
+ if (numRemainingBytes == 0) {
+ // This packet contains the last (or only) fragment of the frame.
+ // Set the RTP 'M' ('marker') bit:
+ setMarkerBit();
+ }
+
+ // Also set the RTP timestamp:
+ setTimestamp(frameTimestamp);
+}
+
+#define DV_DIF_BLOCK_SIZE 80
+
+unsigned DVVideoRTPSink::computeOverflowForNewFrame(unsigned newFrameSize) const {
+ unsigned initialOverflow = MultiFramedRTPSink::computeOverflowForNewFrame(newFrameSize);
+
+ // Adjust (increase) this overflow, if necessary, so that the amount of frame data that we use is an integral number
+ // of DIF blocks:
+ unsigned numFrameBytesUsed = newFrameSize - initialOverflow;
+ initialOverflow += numFrameBytesUsed%DV_DIF_BLOCK_SIZE;
+
+ return initialOverflow;
+}
+
+char const* DVVideoRTPSink::auxSDPLine() {
+ // Generate a new "a=fmtp:" line each time, using parameters from
+ // our framer source (in case they've changed since the last time that
+ // we were called):
+ DVVideoStreamFramer* framerSource = (DVVideoStreamFramer*)fSource;
+ if (framerSource == NULL) return NULL; // we don't yet have a source
+
+ char const* const profileName = framerSource->profileName();
+
+ char const* const fmtpSDPFmt = "a=fmtp:%d encode=%s;audio=bundled\r\n";
+ unsigned fmtpSDPFmtSize = strlen(fmtpSDPFmt)
+ + 3 // max payload format code length
+ + strlen(profileName);
+ delete[] fFmtpSDPLine; // if it already exists
+ fFmtpSDPLine = new char[fmtpSDPFmtSize];
+ sprintf(fFmtpSDPLine, fmtpSDPFmt, rtpPayloadType(), profileName);
+
+ return fFmtpSDPLine;
+}
|
[-]
[+]
|
Added |
live.2009.07.09.tar.bz2/liveMedia/DVVideoStreamFramer.cpp
^
|
@@ -0,0 +1,57 @@
+/**********
+This library is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the
+Free Software Foundation; either version 2.1 of the License, or (at your
+option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
+
+This library is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+**********/
+// "liveMedia"
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
+// A filter that parses a DV input stream into DV frames to deliver to the downstream object
+// Implementation
+
+#include "DVVideoStreamFramer.hh"
+
+////////// DVVideoStreamFramer implementation //////////
+
+DVVideoStreamFramer::DVVideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource)
+ : FramedFilter(env, inputSource),
+ fProfileName(NULL) {
+}
+
+DVVideoStreamFramer::~DVVideoStreamFramer() {
+}
+
+DVVideoStreamFramer*
+DVVideoStreamFramer::createNew(UsageEnvironment& env, FramedSource* inputSource) {
+ return new DVVideoStreamFramer(env, inputSource);
+}
+
+char const* DVVideoStreamFramer::profileName() const {
+#if 0
+ if (fProfileName == NULL) {
+ unsigned char* fSavedFrame;
+ unsigned fSavedFrameSize;
+ char fSavedFrameFlag;
+ }
+#endif
+
+ // We haven't yet read any data that will let us determine the profile, so read an initial block of data so we can do so:
+ return "";//#####@@@@@
+}
+
+Boolean DVVideoStreamFramer::isDVVideoStreamFramer() const {
+ return True;
+}
+
+void DVVideoStreamFramer::doGetNextFrame() {
+ // COMPLETE THIS #####@@@@@
+}
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/DarwinInjector.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// An object that redirects one or more RTP/RTCP streams - forming a single
// multimedia session - into a 'Darwin Streaming Server' (for subsequent
// reflection to potentially arbitrarily many remote RTSP clients).
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/DeviceSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A template for a MediaSource encapsulating an audio/video input device
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/DigestAuthentication.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A class used for digest authentication.
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/FileServerMediaSubsession.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from a file.
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/FileSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// File sinks
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/FramedFileSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Framed File Sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/FramedFilter.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Framed Filters
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/FramedSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Framed Sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/GSMAudioRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for GSM audio
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/H261VideoRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// H.261 Video RTP Sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/H263plusVideoFileServerMediaSubsession.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from a H263 video file.
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/H263plusVideoRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for H.263+ video (RFC 4629)
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/H263plusVideoRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// H.263+ Video RTP Sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/H263plusVideoStreamFramer.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Author Bernhard Feiten
// A filter that breaks up an H.263plus video stream into frames.
//
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/H263plusVideoStreamParser.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Author Bernhard Feiten
// A filter that breaks up an H.263plus video stream into frames.
// Based on MPEG4IP/mp4creator/h263.c
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/H263plusVideoStreamParser.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that breaks up an H263 video stream into frames.
// derived from MPEG4IP h263.c
// Author Benhard Feiten
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/H264VideoFileSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// H.264 Video File sinks
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/H264VideoRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for H.264 video (RFC 3984)
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/H264VideoRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// H.264 Video RTP Sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/H264VideoStreamFramer.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Any source that feeds into a "H264VideoRTPSink" must be of this class.
// This is a virtual base class; subclasses must implement the
// "currentNALUnitEndsAccessUnit()" virtual function.
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/HTTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// HTTP sinks
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/InputFile.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Common routines for opening/closing named input files
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/JPEGVideoRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for JPEG video (RFC 2435)
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/JPEGVideoRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// JPEG Video (RFC 2435) RTP Sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/JPEGVideoSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// JPEG video sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/Locale.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Support for temporarily setting the locale (e.g., to POSIX) for (e.g.) parsing or printing
// floating-point numbers in protocol headers, or calling toupper()/tolower() on human-input strings.
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3ADU.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// 'ADU' MP3 streams (for improved loss-tolerance)
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3ADURTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for 'ADUized' MP3 frames ("mpa-robust")
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3ADURTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP source for 'ADUized' MP3 frames ("mpa-robust")
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3ADUTranscoder.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Transcoder for ADUized MP3 frames
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3ADUdescriptor.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Descriptor preceding frames of 'ADU' MP3 streams (for improved loss-tolerance)
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3ADUdescriptor.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Descriptor preceding frames of 'ADU' MP3 streams (for improved loss-tolerance)
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3ADUinterleaving.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Interleaving of MP3 ADUs
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3AudioFileServerMediaSubsession.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from a MP3 audio file.
// (Actually, any MPEG-1 or MPEG-2 audio file should work.)
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3FileSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MP3 File Sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3HTTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MP3 HTTP Sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3Internals.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MP3 internal implementation details
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3Internals.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MP3 internal implementation details
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3InternalsHuffman.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MP3 internal implementation details (Huffman encoding)
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3InternalsHuffman.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MP3 internal implementation details (Huffman encoding)
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3InternalsHuffmanTable.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MP3 internal implementation details (Huffman encoding)
// Table
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3StreamState.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A class encapsulating the state of a MP3 stream
// Implementation
@@ -198,7 +198,7 @@
void MP3StreamState::writeGetCmd(char const* hostName,
unsigned short portNum,
char const* fileName) {
- char* getCmdFmt = "GET %s HTTP/1.1\r\nHost: %s:%d\r\n\r\n";
+ char const* const getCmdFmt = "GET %s HTTP/1.1\r\nHost: %s:%d\r\n\r\n";
if (fFidIsReallyASocket) {
long fid_long = (long)fFid;
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3StreamState.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A class encapsulating the state of a MP3 stream
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MP3Transcoder.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MP3 Transcoder
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG1or2AudioRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for MPEG audio (RFC 2250)
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG1or2AudioRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MPEG-1 or MPEG-2 Audio RTP Sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG1or2AudioStreamFramer.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that breaks up an MPEG (1,2) audio elementary stream into frames
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG1or2Demux.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Demultiplexer for a MPEG 1 or 2 Program Stream
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG1or2DemuxedElementaryStream.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A MPEG 1 or 2 Elementary Stream, demultiplexed from a Program Stream
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG1or2DemuxedServerMediaSubsession.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from a MPEG-1 or 2 demuxer.
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG1or2FileServerDemux.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A server demultiplexer for a MPEG 1 or 2 Program Stream
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG1or2VideoFileServerMediaSubsession.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from a MPEG-1 or 2 Elementary Stream video file.
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG1or2VideoHTTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A HTTP Sink specifically for MPEG Video
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG1or2VideoRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for MPEG video (RFC 2250)
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG1or2VideoRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MPEG-1 or MPEG-2 Video RTP Sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG1or2VideoStreamDiscreteFramer.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A simplified version of "MPEG1or2VideoStreamFramer" that takes only
// complete, discrete frames (rather than an arbitrary byte stream) as input.
// This avoids the parsing and data copying overhead of the full
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG1or2VideoStreamFramer.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that breaks up an MPEG 1 or 2 video elementary stream into
// frames for: Video_Sequence_Header, GOP_Header, Picture_Header
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG2IndexFromTransportStream.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that produces a sequence of I-frame indices from a MPEG-2 Transport Stream
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG2TransportFileServerMediaSubsession.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from a MPEG-2 Transport Stream file.
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG2TransportStreamFramer.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that passes through (unchanged) chunks that contain an integral number
// of MPEG-2 Transport Stream packets, but returning (in "fDurationInMicroseconds")
// an updated estimate of the time gap between chunks.
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG2TransportStreamFromESSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter for converting one or more MPEG Elementary Streams
// to a MPEG-2 Transport Stream
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG2TransportStreamFromPESSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter for converting a stream of MPEG PES packets to a MPEG-2 Transport Stream
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG2TransportStreamIndexFile.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A class that encapsulates MPEG-2 Transport Stream 'index files'/
// These index files are used to implement 'trick play' operations
// (seek-by-time, fast forward, reverse play) on Transport Stream files.
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG2TransportStreamMultiplexor.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A class for generating MPEG-2 Transport Stream from one or more input
// Elementary Stream data sources
// Implementation
@@ -109,7 +109,7 @@
// Instead, set the stream's type to default values, based on whether
// the stream is audio or video, and whether it's MPEG-1 or MPEG-2:
if ((stream_id&0xF0) == 0xE0) { // video
- streamType = mpegVersion == 1 ? 1 : mpegVersion == 2 ? 2 : 0x10;
+ streamType = mpegVersion == 1 ? 1 : mpegVersion == 2 ? 2 : mpegVersion == 4 ? 0x10 : 0x1B;
} else if ((stream_id&0xE0) == 0xC0) { // audio
streamType = mpegVersion == 1 ? 3 : mpegVersion == 2 ? 4 : 0xF;
} else if (stream_id == 0xBD) { // private_stream1 (usually AC-3)
@@ -121,7 +121,7 @@
if (fPCR_PID == 0) { // set it to this stream, if it's appropriate:
if ((!fHaveVideoStreams && (streamType == 3 || streamType == 4 || streamType == 0xF))/* audio stream */ ||
- (streamType == 1 || streamType == 2 || streamType == 0x10)/* video stream */) {
+ (streamType == 1 || streamType == 2 || streamType == 0x10 || streamType == 0x1B)/* video stream */) {
fPCR_PID = fCurrentPID; // use this stream's SCR for PCR
}
}
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG2TransportStreamTrickModeFilter.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that converts a MPEG Transport Stream file - with corresponding index file
// - to a corresponding Video Elementary Stream. It also uses a "scale" parameter
// to implement 'trick mode' (fast forward or reverse play, using I-frames) on
@@ -24,6 +24,14 @@
#include "MPEG2TransportStreamTrickModeFilter.hh"
#include <ByteStreamFileSource.hh>
+// Define the following to be True if we want the output file to have the same frame rate as the original file.
+// (Because the output file contains I-frames only, this means that each I-frame will appear in the output file
+// several times, and therefore the output file's bitrate will be significantly higher than that of the original.)
+// Define the following to be False if we want the output file to include each I-frame no more than once.
+// (This means that - except for high 'scale' values - both the output frame rate and the output bit rate
+// will be less than that of the original.)
+#define KEEP_ORIGINAL_FRAME_RATE False
+
MPEG2TransportStreamTrickModeFilter* MPEG2TransportStreamTrickModeFilter
::createNew(UsageEnvironment& env, FramedSource* inputSource,
MPEG2TransportStreamIndexFile* indexFile, int scale) {
@@ -37,7 +45,7 @@
fHaveStarted(False), fIndexFile(indexFile), fScale(scale), fDirection(1),
fState(SKIPPING_FRAME), fFrameCount(0),
fNextIndexRecordNum(0), fNextTSPacketNum(0),
- fCurrentTSPacketNum((unsigned long)(-1)) {
+ fCurrentTSPacketNum((unsigned long)(-1)), fUseSavedFrameNextTime(False) {
if (fScale < 0) { // reverse play
fScale = -fScale;
fDirection = -1;
@@ -105,8 +113,9 @@
if (isIFrameStart(recordType)) {
// Save a record of this frame:
fSavedFrameIndexRecordStart = fNextIndexRecordNum - fDirection;
+ fUseSavedFrameNextTime = True;
// fprintf(stderr, "\trecording\n");//#####
- if ((fFrameCount++)%fScale == 0) {
+ if ((fFrameCount++)%fScale == 0 && fUseSavedFrameNextTime) {
// A frame is due now.
fFrameCount = 1; // reset to avoid overflow
if (fDirection > 0) {
@@ -131,7 +140,7 @@
fState = SKIPPING_FRAME;
}
} else if (isNonIFrameStart(recordType)) {
- if ((fFrameCount++)%fScale == 0) {
+ if ((fFrameCount++)%fScale == 0 && fUseSavedFrameNextTime) {
// A frame is due now, so begin delivering the one that we had saved:
// (This relies on the index records having begun with an I-frame.)
fFrameCount = 1; // reset to avoid overflow
@@ -166,6 +175,7 @@
// We've reached the end of the saved frame, so revert to the
// original sequence of index records:
fNextIndexRecordNum = fSavedSequentialIndexRecordNum;
+ fUseSavedFrameNextTime = KEEP_ORIGINAL_FRAME_RATE;
fState = SKIPPING_FRAME;
} else {
// Continue delivering:
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG4ESVideoRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for MPEG-4 Elementary Stream video (RFC 3016)
// Implementation
@@ -26,11 +26,11 @@
unsigned char rtpPayloadFormat,
u_int32_t rtpTimestampFrequency)
: VideoRTPSink(env, RTPgs, rtpPayloadFormat, rtpTimestampFrequency, "MP4V-ES"),
- fVOPIsPresent(False), fAuxSDPLine(NULL) {
+ fVOPIsPresent(False), fFmtpSDPLine(NULL) {
}
MPEG4ESVideoRTPSink::~MPEG4ESVideoRTPSink() {
- delete[] fAuxSDPLine;
+ delete[] fFmtpSDPLine;
}
MPEG4ESVideoRTPSink*
@@ -123,8 +123,8 @@
}
sprintf(endPtr, "\r\n");
- delete[] fAuxSDPLine;
- fAuxSDPLine = strDup(fmtp);
+ delete[] fFmtpSDPLine;
+ fFmtpSDPLine = strDup(fmtp);
delete[] fmtp;
- return fAuxSDPLine;
+ return fFmtpSDPLine;
}
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG4ESVideoRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MP4V-ES video RTP stream sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG4GenericRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MPEG4-GENERIC ("audio", "video", or "application") RTP stream sinks
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG4GenericRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MPEG4-GENERIC ("audio", "video", or "application") RTP stream sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG4LATMAudioRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for MPEG-4 audio, using LATM multiplexing (RFC 3016)
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG4LATMAudioRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MPEG-4 audio, using LATM multiplexing
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG4VideoFileServerMediaSubsession.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from a MPEG-4 video file.
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG4VideoStreamDiscreteFramer.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A simplified version of "MPEG4VideoStreamFramer" that takes only complete,
// discrete frames (rather than an arbitrary byte stream) as input.
// This avoids the parsing and data copying overhead of the full
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEG4VideoStreamFramer.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that breaks up an MPEG-4 video elementary stream into
// frames for:
// - Visual Object Sequence (VS) Header + Visual Object (VO) Header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEGVideoStreamFramer.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that breaks up an MPEG video elementary stream into
// headers and frames
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEGVideoStreamParser.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// An abstract parser for MPEG video streams
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MPEGVideoStreamParser.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// An abstract parser for MPEG video streams
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/Makefile.tail
^
|
@@ -14,14 +14,16 @@
MPEG_SOURCE_OBJS = MPEG1or2Demux.$(OBJ) MPEG1or2DemuxedElementaryStream.$(OBJ) MPEGVideoStreamFramer.$(OBJ) MPEG1or2VideoStreamFramer.$(OBJ) MPEG1or2VideoStreamDiscreteFramer.$(OBJ) MPEG4VideoStreamFramer.$(OBJ) MPEG4VideoStreamDiscreteFramer.$(OBJ) H264VideoStreamFramer.$(OBJ) MPEGVideoStreamParser.$(OBJ) MPEG1or2AudioStreamFramer.$(OBJ) MPEG1or2AudioRTPSource.$(OBJ) MPEG4LATMAudioRTPSource.$(OBJ) MPEG4ESVideoRTPSource.$(OBJ) MPEG4GenericRTPSource.$(OBJ) $(MP3_SOURCE_OBJS) MPEG1or2VideoRTPSource.$(OBJ) MPEG2TransportStreamMultiplexor.$(OBJ) MPEG2TransportStreamFromPESSource.$(OBJ) MPEG2TransportStreamFromESSource.$(OBJ) MPEG2TransportStreamFramer.$(OBJ) ADTSAudioFileSource.$(OBJ)
H263_SOURCE_OBJS = H263plusVideoRTPSource.$(OBJ) H263plusVideoStreamFramer.$(OBJ) H263plusVideoStreamParser.$(OBJ)
AC3_SOURCE_OBJS = AC3AudioStreamFramer.$(OBJ) AC3AudioRTPSource.$(OBJ)
+DV_SOURCE_OBJS = DVVideoStreamFramer.$(OBJ)
MP3_SINK_OBJS = MP3ADURTPSink.$(OBJ)
MPEG_SINK_OBJS = MPEG1or2AudioRTPSink.$(OBJ) $(MP3_SINK_OBJS) MPEG1or2VideoRTPSink.$(OBJ) MPEG1or2VideoHTTPSink.$(OBJ) MPEG4LATMAudioRTPSink.$(OBJ) MPEG4GenericRTPSink.$(OBJ) MPEG4ESVideoRTPSink.$(OBJ)
H263_SINK_OBJS = H263plusVideoRTPSink.$(OBJ)
H264_SINK_OBJS = H264VideoRTPSink.$(OBJ)
+DV_SINK_OBJS = DVVideoRTPSink.$(OBJ)
AC3_SINK_OBJS = AC3AudioRTPSink.$(OBJ)
-MISC_SOURCE_OBJS = MediaSource.$(OBJ) FramedSource.$(OBJ) FramedFileSource.$(OBJ) FramedFilter.$(OBJ) ByteStreamFileSource.$(OBJ) ByteStreamMultiFileSource.$(OBJ) BasicUDPSource.$(OBJ) DeviceSource.$(OBJ) AudioInputDevice.$(OBJ) WAVAudioFileSource.$(OBJ) $(MPEG_SOURCE_OBJS) $(H263_SOURCE_OBJS) $(AC3_SOURCE_OBJS) JPEGVideoSource.$(OBJ) AMRAudioSource.$(OBJ) AMRAudioFileSource.$(OBJ) InputFile.$(OBJ)
-MISC_SINK_OBJS = MediaSink.$(OBJ) FileSink.$(OBJ) BasicUDPSink.$(OBJ) AMRAudioFileSink.$(OBJ) H264VideoFileSink.$(OBJ) HTTPSink.$(OBJ) $(MPEG_SINK_OBJS) $(H263_SINK_OBJS) $(H264_SINK_OBJS) $(AC3_SINK_OBJS) GSMAudioRTPSink.$(OBJ) JPEGVideoRTPSink.$(OBJ) SimpleRTPSink.$(OBJ) AMRAudioRTPSink.$(OBJ) OutputFile.$(OBJ)
+MISC_SOURCE_OBJS = MediaSource.$(OBJ) FramedSource.$(OBJ) FramedFileSource.$(OBJ) FramedFilter.$(OBJ) ByteStreamFileSource.$(OBJ) ByteStreamMultiFileSource.$(OBJ) BasicUDPSource.$(OBJ) DeviceSource.$(OBJ) AudioInputDevice.$(OBJ) WAVAudioFileSource.$(OBJ) $(MPEG_SOURCE_OBJS) $(H263_SOURCE_OBJS) $(AC3_SOURCE_OBJS) $(DV_SOURCE_OBJS) JPEGVideoSource.$(OBJ) AMRAudioSource.$(OBJ) AMRAudioFileSource.$(OBJ) InputFile.$(OBJ)
+MISC_SINK_OBJS = MediaSink.$(OBJ) FileSink.$(OBJ) BasicUDPSink.$(OBJ) AMRAudioFileSink.$(OBJ) H264VideoFileSink.$(OBJ) HTTPSink.$(OBJ) $(MPEG_SINK_OBJS) $(H263_SINK_OBJS) $(H264_SINK_OBJS) $(DV_SINK_OBJS) $(AC3_SINK_OBJS) GSMAudioRTPSink.$(OBJ) JPEGVideoRTPSink.$(OBJ) SimpleRTPSink.$(OBJ) AMRAudioRTPSink.$(OBJ) OutputFile.$(OBJ)
MISC_FILTER_OBJS = uLawAudioFilter.$(OBJ)
TRANSPORT_STREAM_TRICK_PLAY_OBJS = MPEG2IndexFromTransportStream.$(OBJ) MPEG2TransportStreamIndexFile.$(OBJ) MPEG2TransportStreamTrickModeFilter.$(OBJ)
@@ -206,6 +208,9 @@
include/H263plusVideoRTPSink.hh: include/VideoRTPSink.hh
H264VideoRTPSink.$(CPP): include/H264VideoRTPSink.hh include/H264VideoStreamFramer.hh
include/H264VideoRTPSink.hh: include/VideoRTPSink.hh include/FramedFilter.hh
+DVVideoRTPSink.$(CPP): include/DVVideoRTPSink.hh include/DVVideoStreamFramer.hh
+include/DVVideoRTPSink.hh: include/VideoRTPSink.hh
+include/DVVideoStreamFramer.hh: include/FramedFilter.hh
AC3AudioRTPSink.$(CPP): include/AC3AudioRTPSink.hh
include/AC3AudioRTPSink.hh: include/AudioRTPSink.hh
GSMAudioRTPSink.$(CPP): include/GSMAudioRTPSink.hh
@@ -282,7 +287,7 @@
Base64.$(CPP): include/Base64.hh
Locale.$(CPP): include/Locale.hh
-include/liveMedia.hh:: include/MPEG1or2AudioRTPSink.hh include/MP3ADURTPSink.hh include/MPEG1or2VideoRTPSink.hh include/MPEG4ESVideoRTPSink.hh include/BasicUDPSink.hh include/AMRAudioFileSink.hh include/H264VideoFileSink.hh include/MPEG1or2VideoHTTPSink.hh include/GSMAudioRTPSink.hh include/H263plusVideoRTPSink.hh include/H264VideoRTPSink.hh include/H264VideoStreamFramer.hh include/JPEGVideoRTPSink.hh include/SimpleRTPSink.hh include/uLawAudioFilter.hh include/MPEG2IndexFromTransportStream.hh include/MPEG2TransportStreamTrickModeFilter.hh include/ByteStreamFileSource.hh include/BasicUDPSource.hh include/SimpleRTPSource.hh include/MPEG1or2AudioRTPSource.hh include/MPEG4LATMAudioRTPSource.hh include/MPEG4LATMAudioRTPSink.hh include/MPEG4ESVideoRTPSource.hh include/MPEG4GenericRTPSource.hh include/MP3ADURTPSource.hh include/QCELPAudioRTPSource.hh include/AMRAudioRTPSource.hh include/JPEGVideoRTPSource.hh include/MPEG1or2VideoRTPSource.hh include/MPEG2TransportStreamFromPESSource.hh include/MPEG2TransportStreamFromESSource.hh include/MPEG2TransportStreamFramer.hh include/ADTSAudioFileSource.hh
+include/liveMedia.hh:: include/MPEG1or2AudioRTPSink.hh include/MP3ADURTPSink.hh include/MPEG1or2VideoRTPSink.hh include/MPEG4ESVideoRTPSink.hh include/BasicUDPSink.hh include/AMRAudioFileSink.hh include/H264VideoFileSink.hh include/MPEG1or2VideoHTTPSink.hh include/GSMAudioRTPSink.hh include/H263plusVideoRTPSink.hh include/H264VideoRTPSink.hh include/DVVideoRTPSink.hh include/DVVideoStreamFramer.hh include/H264VideoStreamFramer.hh include/JPEGVideoRTPSink.hh include/SimpleRTPSink.hh include/uLawAudioFilter.hh include/MPEG2IndexFromTransportStream.hh include/MPEG2TransportStreamTrickModeFilter.hh include/ByteStreamFileSource.hh include/BasicUDPSource.hh include/SimpleRTPSource.hh include/MPEG1or2AudioRTPSource.hh include/MPEG4LATMAudioRTPSource.hh include/MPEG4LATMAudioRTPSink.hh include/MPEG4ESVideoRTPSource.hh include/MPEG4GenericRTPSource.hh include/MP3ADURTPSource.hh include/QCELPAudioRTPSource.hh include/AMRAudioRTPSource.hh include/JPEGVideoRTPSource.hh include/MPEG1or2VideoRTPSource.hh include/MPEG2TransportStreamFromPESSource.hh include/MPEG2TransportStreamFromESSource.hh include/MPEG2TransportStreamFramer.hh include/ADTSAudioFileSource.hh
include/liveMedia.hh:: include/H261VideoRTPSource.hh include/H263plusVideoRTPSource.hh include/H264VideoRTPSource.hh include/MP3HTTPSource.hh include/MP3ADU.hh include/MP3ADUinterleaving.hh include/MP3Transcoder.hh include/MPEG1or2DemuxedElementaryStream.hh include/MPEG1or2AudioStreamFramer.hh include/MPEG1or2VideoStreamDiscreteFramer.hh include/MPEG4VideoStreamDiscreteFramer.hh include/H263plusVideoStreamFramer.hh include/AC3AudioStreamFramer.hh include/AC3AudioRTPSource.hh include/AC3AudioRTPSink.hh include/MPEG4GenericRTPSink.hh include/DeviceSource.hh include/AudioInputDevice.hh include/WAVAudioFileSource.hh
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/Media.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Media
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MediaSession.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A data structure that represents a session that consists of
// potentially multiple (audio and/or video) sub-sessions
// Implementation
@@ -140,7 +140,7 @@
// or "m=<medium_name> <client_portNum>/<num_ports> RTP/AVP <fmt>"
// (Should we be checking for >1 payload format number here?)#####
char* mediumName = strDupSize(sdpLine); // ensures we have enough space
- char* protocolName = NULL;
+ char const* protocolName = NULL;
unsigned payloadFormat;
if ((sscanf(sdpLine, "m=%s %hu RTP/AVP %u",
mediumName, &subsession->fClientPortNum, &payloadFormat) == 3 ||
@@ -427,7 +427,7 @@
unsigned& freq, unsigned& nCh) {
// Look up the codec name and timestamp frequency for known (static)
// RTP payload formats.
- char* temp = NULL;
+ char const* temp = NULL;
switch (rtpPayloadType) {
case 0: {temp = "PCMU"; freq = 8000; nCh = 1; break;}
case 2: {temp = "G726-32"; freq = 8000; nCh = 1; break;}
@@ -594,64 +594,106 @@
// Create RTP and RTCP 'Groupsocks' on which to receive incoming data.
// (Groupsocks will work even for unicast addresses)
- Groupsock* oldGroupsock = NULL;
- Boolean success = False;
struct in_addr tempAddr;
tempAddr.s_addr = connectionEndpointAddress();
// This could get changed later, as a result of a RTSP "SETUP"
- unsigned short firstRTPPortNum = fClientPortNum&~1;
- while (1) {
- unsigned short rtpPortNum = fClientPortNum&~1;
+
+ if (fClientPortNum != 0) {
+ // The sockets' port numbers were specified for us. Use these:
+ fClientPortNum = fClientPortNum&~1; // even
if (isSSM()) {
- fRTPSocket = new Groupsock(env(), tempAddr, fSourceFilterAddr,
- rtpPortNum);
+ fRTPSocket = new Groupsock(env(), tempAddr, fSourceFilterAddr, fClientPortNum);
} else {
- fRTPSocket = new Groupsock(env(), tempAddr, rtpPortNum, 255);
+ fRTPSocket = new Groupsock(env(), tempAddr, fClientPortNum, 255);
}
if (fRTPSocket == NULL) {
env().setResultMsg("Failed to create RTP socket");
break;
}
-
- // Get the client port number, to make sure that it's even (for RTP):
- Port clientPort(0);
- if (!getSourcePort(env(), fRTPSocket->socketNum(), clientPort)) {
+
+ // Set our RTCP port to be the RTP port +1
+ portNumBits const rtcpPortNum = fClientPortNum|1;
+ if (isSSM()) {
+ fRTCPSocket = new Groupsock(env(), tempAddr, fSourceFilterAddr, rtcpPortNum);
+ } else {
+ fRTCPSocket = new Groupsock(env(), tempAddr, rtcpPortNum, 255);
+ }
+ if (fRTCPSocket == NULL) {
+ char tmpBuf[100];
+ sprintf(tmpBuf, "Failed to create RTCP socket (port %d)", rtcpPortNum);
+ env().setResultMsg(tmpBuf);
break;
}
- fClientPortNum = ntohs(clientPort.num());
+ } else {
+ // Port numbers were not specified in advance, so we use ephemeral port numbers.
+ // Create sockets until we get a port-number pair (even: RTP; even+1: RTCP).
+ // We need to make sure that we don't keep trying to use the same bad port numbers over and over again.
+ // so we store bad sockets in a table, and delete them all when we're done.
+ HashTable* socketHashTable = HashTable::create(ONE_WORD_HASH_KEYS);
+ if (socketHashTable == NULL) break;
+ Boolean success = False;
- // If the port number's not even, try again:
- if ((fClientPortNum&1) == 0) {
- success = True;
- break;
+ while (1) {
+ // Create a new socket:
+ if (isSSM()) {
+ fRTPSocket = new Groupsock(env(), tempAddr, fSourceFilterAddr, 0);
+ } else {
+ fRTPSocket = new Groupsock(env(), tempAddr, 0, 255);
+ }
+ if (fRTPSocket == NULL) {
+ env().setResultMsg("MediaSession::initiate(): unable to create RTP and RTCP sockets");
+ break;
+ }
+
+ // Get the client port number, and check whether it's even (for RTP):
+ Port clientPort(0);
+ if (!getSourcePort(env(), fRTPSocket->socketNum(), clientPort)) {
+ break;
+ }
+ fClientPortNum = ntohs(clientPort.num());
+ if ((fClientPortNum&1) != 0) { // it's odd
+ // Record this socket in our table, and keep trying:
+ unsigned key = (unsigned)fClientPortNum;
+ Groupsock* existing = (Groupsock*)socketHashTable->Add((char const*)key, fRTPSocket);
+ delete existing; // in case it wasn't NULL
+ continue;
+ }
+
+ // Make sure we can use the next (i.e., odd) port number, for RTCP:
+ portNumBits rtcpPortNum = fClientPortNum|1;
+ if (isSSM()) {
+ fRTCPSocket = new Groupsock(env(), tempAddr, fSourceFilterAddr, rtcpPortNum);
+ } else {
+ fRTCPSocket = new Groupsock(env(), tempAddr, rtcpPortNum, 255);
+ }
+ if (fRTCPSocket != NULL) {
+ // Success! Use these two sockets.
+ success = True;
+ break;
+ } else {
+ // We couldn't create the RTCP socket (perhaps that port number's already in use elsewhere?).
+ // Record the first socket in our table, and keep trying:
+ unsigned key = (unsigned)fClientPortNum;
+ Groupsock* existing = (Groupsock*)socketHashTable->Add((char const*)key, fRTPSocket);
+ delete existing; // in case it wasn't NULL
+ continue;
+ }
}
- // Try again:
- delete oldGroupsock;
- oldGroupsock = fRTPSocket;
- if (firstRTPPortNum > 0) break; // Because we were told what port number to use, we can't choose another ourself
- fClientPortNum += 2; // so that the OS doesn't choose the same port number again
- }
- delete oldGroupsock;
- if (!success) break;
- // Set our RTCP port to be the RTP port +1
- unsigned short const rtcpPortNum = fClientPortNum|1;
- if (isSSM()) {
- fRTCPSocket = new Groupsock(env(), tempAddr, fSourceFilterAddr,
- rtcpPortNum);
- // Also, send RTCP packets back to the source via unicast:
- if (fRTCPSocket != NULL) {
- fRTCPSocket->changeDestinationParameters(fSourceFilterAddr,0,~0);
+ // Clean up the socket hash table (and contents):
+ Groupsock* oldGS;
+ while ((oldGS = (Groupsock*)socketHashTable->RemoveNext()) != NULL) {
+ delete oldGS;
}
- } else {
- fRTCPSocket = new Groupsock(env(), tempAddr, rtcpPortNum, 255);
+ delete socketHashTable;
+
+ if (!success) break; // a fatal error occurred trying to create the RTP and RTCP sockets; we can't continue
}
- if (fRTCPSocket == NULL) {
- char tmpBuf[100];
- sprintf(tmpBuf, "Failed to create RTCP socket (port %d)",
- rtcpPortNum);
- env().setResultMsg(tmpBuf);
- break;
+
+ // ASSERT: fRTPSocket != NULL && fRTCPSocket != NULL
+ if (isSSM()) {
+ // Special case for RTCP SSM: Send RTCP packets back to the source via unicast:
+ fRTCPSocket->changeDestinationParameters(fSourceFilterAddr,0,~0);
}
// Check "fProtocolName"
@@ -1004,7 +1046,7 @@
// codec name and timestamp frequency:
// (First, make sure the codec name is upper case)
{
- Locale("POSIX");
+ Locale l("POSIX");
for (char* p = codecName; *p != '\0'; ++p) *p = toupper(*p);
}
delete[] fCodecName; fCodecName = strDup(codecName);
@@ -1072,7 +1114,7 @@
// First, convert the line to lower-case, to ease comparison:
char* const lineCopy = strDup(sdpLine); char* line = lineCopy;
{
- Locale("POSIX");
+ Locale l("POSIX");
for (char* c = line; *c != '\0'; ++c) *c = tolower(*c);
}
while (*line != '\0' && *line != '\r' && *line != '\n') {
@@ -1187,7 +1229,7 @@
float frate;
int rate;
- if (sscanf(sdpLine, "a=framerate: %f", &frate) == 1) {
+ if (sscanf(sdpLine, "a=framerate: %f", &frate) == 1 || sscanf(sdpLine, "a=framerate:%f", &frate) == 1) {
parseSuccess = True;
fVideoFPS = (unsigned)frate;
} else if (sscanf(sdpLine, "a=x-framerate: %d", &rate) == 1) {
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MediaSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Media Sinks
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MediaSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Media Sources
// Implementation
@@ -52,6 +52,9 @@
Boolean MediaSource::isH264VideoStreamFramer() const {
return False; // default implementation
}
+Boolean MediaSource::isDVVideoStreamFramer() const {
+ return False; // default implementation
+}
Boolean MediaSource::isJPEGVideoSource() const {
return False; // default implementation
}
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MultiFramedRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for a common kind of payload format: Those which pack multiple,
// complete codec frames (as many as possible) into each RTP packet.
// Implementation
@@ -89,6 +89,11 @@
return 0;
}
+unsigned MultiFramedRTPSink::computeOverflowForNewFrame(unsigned newFrameSize) const {
+ // default implementation: Just call numOverflowBytes()
+ return fOutBuf->numOverflowBytes(newFrameSize);
+}
+
void MultiFramedRTPSink::setMarkerBit() {
unsigned rtpHdr = fOutBuf->extractWord(0);
rtpHdr |= 0x00800000;
@@ -269,7 +274,7 @@
if (isTooBigForAPacket(frameSize)
&& (fNumFramesUsedSoFar == 0 || allowFragmentationAfterStart())) {
// We need to fragment this frame, and use some of it now:
- overflowBytes = fOutBuf->numOverflowBytes(frameSize);
+ overflowBytes = computeOverflowForNewFrame(frameSize);
numFrameBytesToUse -= overflowBytes;
fCurFragmentationOffset += numFrameBytesToUse;
} else {
@@ -293,7 +298,7 @@
sendPacketIfNecessary();
} else {
// Use this frame in our outgoing packet:
- unsigned char * frameStart = fOutBuf->curPtr();
+ unsigned char* frameStart = fOutBuf->curPtr();
fOutBuf->increment(numFrameBytesToUse);
// do this now, in case "doSpecialFrameHandling()" calls "setFramePadding()" to append padding bytes
@@ -386,11 +391,11 @@
struct timeval timeNow;
gettimeofday(&timeNow, NULL);
int uSecondsToGo;
- if (fNextSendTime.tv_sec < timeNow.tv_sec) {
+ if (fNextSendTime.tv_sec < timeNow.tv_sec
+ || (fNextSendTime.tv_sec == timeNow.tv_sec && fNextSendTime.tv_usec < timeNow.tv_usec)) {
uSecondsToGo = 0; // prevents integer underflow if too far behind
} else {
- uSecondsToGo = (fNextSendTime.tv_sec - timeNow.tv_sec)*1000000
- + (fNextSendTime.tv_usec - timeNow.tv_usec);
+ uSecondsToGo = (fNextSendTime.tv_sec - timeNow.tv_sec)*1000000 + (fNextSendTime.tv_usec - timeNow.tv_usec);
}
// Delay this amount of time:
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/MultiFramedRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP source for a common kind of payload format: Those that pack multiple,
// complete codec frames (as many as possible) into each RTP packet.
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/OnDemandServerMediaSubsession.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand.
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/OutputFile.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Common routines for opening/closing named output files
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/PassiveServerMediaSubsession.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that represents an existing
// 'RTPSink', rather than one that creates new 'RTPSink's on demand.
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/QCELPAudioRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Qualcomm "PureVoice" (aka. "QCELP") Audio RTP Sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/QuickTimeFileSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A sink that generates a QuickTime file from a composite media session
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/QuickTimeGenericRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP Sources containing generic QuickTime stream data, as defined in
// <http://developer.apple.com/quicktime/icefloe/dispatch026.html>
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/RTCP.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTCP
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/RTPInterface.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// An abstraction of a network interface used for RTP (or RTCP).
// (This allows the RTP-over-TCP hack (RFC 2326, section 10.12) to
// be implemented transparently.)
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/RTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP Sinks
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/RTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP Sources
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/RTSPClient.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A generic RTSP client
// Implementation
@@ -190,7 +190,7 @@
: "Accept: application/sdp\r\n";
// (Later implement more, as specified in the RTSP spec, sec D.1 #####)
- char* const cmdFmt =
+ char const* const cmdFmt =
"DESCRIBE %s RTSP/1.0\r\n"
"CSeq: %d\r\n"
"%s"
@@ -336,7 +336,7 @@
char* ptr = &firstLine[bytesRead];
int bytesRead2 = readSocket(envir(), fInputSocketNum, (unsigned char*)ptr,
numExtraBytesNeeded, fromAddress);
- if (bytesRead2 < 0) break;
+ if (bytesRead2 <= 0) break;
ptr[bytesRead2] = '\0';
if (fVerbosityLevel >= 1) {
envir() << "Read " << bytesRead2 << " extra bytes: "
@@ -540,7 +540,7 @@
char* authenticatorStr
= createAuthenticatorString(authenticator, "OPTIONS", url);
- char* const cmdFmt =
+ char const* const cmdFmt =
"OPTIONS %s RTSP/1.0\r\n"
"CSeq: %d\r\n"
"%s"
@@ -660,7 +660,7 @@
char* authenticatorStr
= createAuthenticatorString(authenticator, "ANNOUNCE", url);
- char* const cmdFmt =
+ char const* const cmdFmt =
"ANNOUNCE %s RTSP/1.0\r\n"
"CSeq: %d\r\n"
"Content-Type: application/sdp\r\n"
@@ -839,7 +839,7 @@
char const *prefix, *separator, *suffix;
constructSubsessionURL(subsession, prefix, separator, suffix);
- char* transportFmt;
+ char const* transportFmt;
if (strcmp(subsession.protocolName(), "UDP") == 0) {
char const* setupFmt = "SETUP %s%s RTSP/1.0\r\n";
@@ -894,7 +894,7 @@
}
// (Later implement more, as specified in the RTSP spec, sec D.1 #####)
- char* const cmdFmt =
+ char const* const cmdFmt =
"%s"
"CSeq: %d\r\n"
"%s"
@@ -1019,7 +1019,7 @@
// This is the default value; we don't need a "Scale:" header:
buf[0] = '\0';
} else {
- Locale("C", LC_NUMERIC);
+ Locale l("C", LC_NUMERIC);
sprintf(buf, "Scale: %f\r\n", scale);
}
@@ -1033,11 +1033,11 @@
buf[0] = '\0';
} else if (end < 0) {
// There's no end time:
- Locale("C", LC_NUMERIC);
+ Locale l("C", LC_NUMERIC);
sprintf(buf, "Range: npt=%.3f-\r\n", start);
} else {
// There's both a start and an end time; include them both in the "Range:" hdr
- Locale("C", LC_NUMERIC);
+ Locale l("C", LC_NUMERIC);
sprintf(buf, "Range: npt=%.3f-%.3f\r\n", start, end);
}
@@ -1074,7 +1074,7 @@
// And then a "Range:" string:
char* rangeStr = createRangeString(start, end);
- char* const cmdFmt =
+ char const* const cmdFmt =
"PLAY %s RTSP/1.0\r\n"
"CSeq: %d\r\n"
"Session: %s\r\n"
@@ -1175,7 +1175,7 @@
// And then a "Range:" string:
char* rangeStr = createRangeString(start, end);
- char* const cmdFmt =
+ char const* const cmdFmt =
"PLAY %s%s%s RTSP/1.0\r\n"
"CSeq: %d\r\n"
"Session: %s\r\n"
@@ -1267,7 +1267,7 @@
= createAuthenticatorString(&fCurrentAuthenticator, "PAUSE", fBaseURL);
char const* sessURL = sessionURL(session);
- char* const cmdFmt =
+ char const* const cmdFmt =
"PAUSE %s RTSP/1.0\r\n"
"CSeq: %d\r\n"
"Session: %s\r\n"
@@ -1322,7 +1322,7 @@
char* authenticatorStr
= createAuthenticatorString(&fCurrentAuthenticator, "PAUSE", fBaseURL);
- char* const cmdFmt =
+ char const* const cmdFmt =
"PAUSE %s%s%s RTSP/1.0\r\n"
"CSeq: %d\r\n"
"Session: %s\r\n"
@@ -1382,7 +1382,7 @@
= createAuthenticatorString(&fCurrentAuthenticator,
"RECORD", fBaseURL);
- char* const cmdFmt =
+ char const* const cmdFmt =
"RECORD %s%s%s RTSP/1.0\r\n"
"CSeq: %d\r\n"
"Session: %s\r\n"
@@ -1442,7 +1442,7 @@
= createAuthenticatorString(&fCurrentAuthenticator,
"SET_PARAMETER", fBaseURL);
- char* const cmdFmt =
+ char const* const cmdFmt =
"SET_PARAMETER %s RTSP/1.0\r\n"
"CSeq: %d\r\n"
"Session: %s\r\n"
@@ -1506,7 +1506,7 @@
"GET_PARAMETER", fBaseURL);
if (haveParameterName) {
- char* const cmdFmt =
+ char const* const cmdFmt =
"GET_PARAMETER %s RTSP/1.0\r\n"
"CSeq: %d\r\n"
"Session: %s\r\n"
@@ -1534,7 +1534,7 @@
parameterNameLen + 2, // the "+ 2" is for the \r\n after the parameter name
parameterName);
} else {
- char* const cmdFmt =
+ char const* const cmdFmt =
"GET_PARAMETER %s RTSP/1.0\r\n"
"CSeq: %d\r\n"
"Session: %s\r\n"
@@ -1636,7 +1636,7 @@
char* ptr = &firstLine[bytesRead];
int bytesRead2 = readSocket(envir(), fInputSocketNum, (unsigned char*)ptr,
numExtraBytesNeeded, fromAddress);
- if (bytesRead2 < 0) break;
+ if (bytesRead2 <= 0) break;
ptr[bytesRead2] = '\0';
if (fVerbosityLevel >= 1) {
envir() << "Read " << bytesRead2 << " extra bytes: "
@@ -1678,7 +1678,7 @@
"TEARDOWN", fBaseURL);
char const* sessURL = sessionURL(session);
- char* const cmdFmt =
+ char const* const cmdFmt =
"TEARDOWN %s RTSP/1.0\r\n"
"CSeq: %d\r\n"
"Session: %s\r\n"
@@ -1745,7 +1745,7 @@
= createAuthenticatorString(&fCurrentAuthenticator,
"TEARDOWN", fBaseURL);
- char* const cmdFmt =
+ char const* const cmdFmt =
"TEARDOWN %s%s%s RTSP/1.0\r\n"
"CSeq: %d\r\n"
"Session: %s\r\n"
@@ -1834,11 +1834,7 @@
makeSocketNonBlocking(fInputSocketNum);
}
if (connect(fInputSocketNum, (struct sockaddr*) &remoteName, sizeof remoteName) != 0) {
-#if defined(__WIN32__) || defined(_WIN32)
- if (errno != WSAEINPROGRESS) {
-#else
- if (errno != EINPROGRESS) {
-#endif
+ if (envir().getErrno() != EINPROGRESS && envir().getErrno() != EWOULDBLOCK) {
envir().setResultErrMsg("connect() failed: ");
break;
}
@@ -1995,7 +1991,7 @@
// We've been provided a filled-in authenticator, so use it:
char* authenticatorStr;
if (authenticator->nonce() != NULL) { // Digest authentication
- char* const authFmt =
+ char const* const authFmt =
"Authorization: Digest username=\"%s\", realm=\"%s\", "
"nonce=\"%s\", uri=\"%s\", response=\"%s\"\r\n";
char const* response = authenticator->computeDigestResponse(cmd, url);
@@ -2008,7 +2004,7 @@
authenticator->nonce(), url, response);
authenticator->reclaimDigestResponse(response);
} else { // Basic authentication
- char* const authFmt = "Authorization: Basic %s\r\n";
+ char const* const authFmt = "Authorization: Basic %s\r\n";
unsigned usernamePasswordLength = strlen(authenticator->username()) + 1 + strlen(authenticator->password());
char* usernamePassword = new char[usernamePasswordLength+1];
@@ -2342,7 +2338,7 @@
if (_strncasecmp(line, "Scale: ", 7) != 0) return False;
line += 7;
- Locale("C", LC_NUMERIC);
+ Locale l("C", LC_NUMERIC);
return sscanf(line, "%f", &scale) == 1;
}
@@ -2414,7 +2410,7 @@
= createAuthenticatorString(authenticator, "GET", urlSuffix);
// Begin by sending a HTTP "GET", to set up the server->client link:
- char* const getCmdFmt =
+ char const* const getCmdFmt =
"GET %s HTTP/1.0\r\n"
"%s"
"%s"
@@ -2464,7 +2460,7 @@
// Then, send a HTTP "POST", to set up the client->server link:
authenticatorStr = createAuthenticatorString(authenticator, "POST", urlSuffix);
- char* const postCmdFmt =
+ char const* const postCmdFmt =
"POST %s HTTP/1.0\r\n"
"%s"
"%s"
@@ -2510,7 +2506,7 @@
char* readBuf = fResponseBuffer;
bytesRead = getResponse1(readBuf, fResponseBufferSize);
if (bytesRead == 0) {
- envir().setResultErrMsg("Failed to read response: ");
+ envir().setResultMsg("Failed to read response: Connection was closed by the remote host.");
envir().taskScheduler().turnOffBackgroundReadHandling(fInputSocketNum); // because the connection died
return;
}
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/RTSPCommon.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Common routines used by both RTSP clients and servers
// Implementation
@@ -146,7 +146,7 @@
char const* fields = buf + 7;
while (*fields == ' ') ++fields;
double start, end;
- Locale("C", LC_NUMERIC);
+ Locale l("C", LC_NUMERIC);
if (sscanf(fields, "npt = %lf - %lf", &start, &end) == 2) {
rangeStart = start;
rangeEnd = end;
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/RTSPOverHTTPServer.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A simple HTTP server that acts solely to implement RTSP-over-HTTP tunneling
// (to a separate RTSP server), as described in
// http://developer.apple.com/documentation/QuickTime/QTSS/Concepts/chapter_2_section_14.html
@@ -232,7 +232,8 @@
} else if (strcmp(cmdName, "TEARDOWN") == 0
|| strcmp(cmdName, "PLAY") == 0
|| strcmp(cmdName, "PAUSE") == 0
- || strcmp(cmdName, "GET_PARAMETER") == 0) {
+ || strcmp(cmdName, "GET_PARAMETER") == 0
+ || strcmp(cmdName, "SET_PARAMETER") == 0) {
handleCmd_withinSession(cmdName, urlPreSuffix, urlSuffix, cseq,
(char const*)fRequestBuffer);
} else {
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/RTSPServer.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A RTSP server
// Implementation
@@ -29,9 +29,7 @@
#endif
#include <time.h> // for "strftime()" and "gmtime()"
-#define RTPINFO_INCLUDE_RTPTIME 1
-
-////////// RTSPServer //////////
+////////// RTSPServer implementation //////////
RTSPServer*
RTSPServer::createNew(UsageEnvironment& env, Port ourPort,
@@ -236,16 +234,15 @@
increaseSendBufferTo(envir(), clientSocket, 50*1024);
#if defined(DEBUG) || defined(DEBUG_CONNECTIONS)
- fprintf(stderr, "accept()ed connection from %s\n", our_inet_ntoa(clientAddr.sin_addr));
+ envir() << "accept()ed connection from " << our_inet_ntoa(clientAddr.sin_addr) << '\n';
#endif
// Create a new object for this RTSP session:
- new RTSPClientSession(*this, ++fSessionIdCounter,
- clientSocket, clientAddr);
+ (void)createNewClientSession(++fSessionIdCounter, clientSocket, clientAddr);
}
-////////// RTSPServer::RTSPClientSession //////////
+////////// RTSPServer::RTSPClientSession implementation //////////
RTSPServer::RTSPClientSession
::RTSPClientSession(RTSPServer& ourServer, unsigned sessionId,
@@ -378,7 +375,8 @@
} else if (strcmp(cmdName, "TEARDOWN") == 0
|| strcmp(cmdName, "PLAY") == 0
|| strcmp(cmdName, "PAUSE") == 0
- || strcmp(cmdName, "GET_PARAMETER") == 0) {
+ || strcmp(cmdName, "GET_PARAMETER") == 0
+ || strcmp(cmdName, "SET_PARAMETER") == 0) {
handleCmd_withinSession(cmdName, urlPreSuffix, urlSuffix, cseq,
(char const*)fRequestBuffer);
} else {
@@ -433,7 +431,7 @@
}
static char const* allowedCommandNames
- = "OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE";
+ = "OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER";
void RTSPServer::RTSPClientSession::handleCmd_bad(char const* /*cseq*/) {
// Don't do anything with "cseq", because it might be nonsense
@@ -858,6 +856,8 @@
handleCmd_PAUSE(subsession, cseq);
} else if (strcmp(cmdName, "GET_PARAMETER") == 0) {
handleCmd_GET_PARAMETER(subsession, cseq, fullRequestStr);
+ } else if (strcmp(cmdName, "SET_PARAMETER") == 0) {
+ handleCmd_SET_PARAMETER(subsession, cseq, fullRequestStr);
}
}
@@ -899,7 +899,7 @@
char* rtspURL = fOurServer.rtspURL(fOurServerMediaSession, fClientSocket);
unsigned rtspURLSize = strlen(rtspURL);
- //// Parse the client's "Scale:" header, if any:
+ // Parse the client's "Scale:" header, if any:
float scale;
Boolean sawScaleHeader = parseScaleHeader(fullRequestStr, scale);
@@ -919,7 +919,7 @@
}
scaleHeader = strDup(buf);
- //// Parse the client's "Range:" header, if any:
+ // Parse the client's "Range:" header, if any:
double rangeStart = 0.0, rangeEnd = 0.0;
Boolean sawRangeHeader = parseRangeHeader(fullRequestStr, rangeStart, rangeEnd);
@@ -933,7 +933,7 @@
duration = -duration;
}
- if (rangeEnd < 0.0 || rangeEnd > duration) rangeEnd = duration;
+ if (rangeEnd <= 0.0 || rangeEnd > duration) rangeEnd = duration;
if (rangeStart < 0.0) {
rangeStart = 0.0;
} else if (rangeEnd > 0.0 && scale > 0.0 && rangeStart > rangeEnd) {
@@ -956,9 +956,7 @@
"%s" // comma separator, if needed
"url=%s/%s"
";seq=%d"
-#ifdef RTPINFO_INCLUDE_RTPTIME
";rtptime=%u"
-#endif
;
unsigned rtpInfoFmtSize = strlen(rtpInfoFmt);
char* rtpInfo = strDup("RTP-Info: ");
@@ -1000,19 +998,15 @@
+ 1
+ rtspURLSize + strlen(urlSuffix)
+ 5 /*max unsigned short len*/
-#ifdef RTPINFO_INCLUDE_RTPTIME
+ 10 /*max unsigned (32-bit) len*/
-#endif
+ 2 /*allows for trailing \r\n at final end of string*/;
rtpInfo = new char[rtpInfoSize];
sprintf(rtpInfo, rtpInfoFmt,
prevRTPInfo,
numRTPInfoItems++ == 0 ? "" : ",",
rtspURL, urlSuffix,
- rtpSeqNum
-#ifdef RTPINFO_INCLUDE_RTPTIME
- ,rtpTimestamp
-#endif
+ rtpSeqNum,
+ rtpTimestamp
);
delete[] prevRTPInfo;
}
@@ -1069,6 +1063,13 @@
cseq, dateHeader(), fOurSessionId);
}
+void RTSPServer::RTSPClientSession
+::handleCmd_SET_PARAMETER(ServerMediaSubsession* /*subsession*/, char const* cseq,
+ char const* /*fullRequestStr*/) {
+ // By default, we don't implement "SET_PARAMETER":
+ handleCmd_notSupported(cseq);
+}
+
static Boolean parseAuthorizationHeader(char const* buf,
char const*& username,
char const*& realm,
@@ -1208,18 +1209,37 @@
::livenessTimeoutTask(RTSPClientSession* clientSession) {
// If this gets called, the client session is assumed to have timed out,
// so delete it:
-
- // However, we don't timeout multicast sessions, because to do so would require
- // closing all client sessions that have requested the stream - not just this one.
- // Also, the multicast stream itself would usually not be halted, in any case.
- if (clientSession->isMulticast()) return;
-
#ifdef DEBUG
fprintf(stderr, "RTSP client session from %s has timed out (due to inactivity)\n", our_inet_ntoa(clientSession->fClientAddr.sin_addr));
#endif
delete clientSession;
}
+RTSPServer::RTSPClientSession*
+RTSPServer::createNewClientSession(unsigned sessionId, int clientSocket, struct sockaddr_in clientAddr) {
+ return new RTSPClientSession(*this, sessionId, clientSocket, clientAddr);
+}
+
+
+////////// ServerMediaSessionIterator implementation //////////
+
+RTSPServer::ServerMediaSessionIterator
+::ServerMediaSessionIterator(RTSPServer& server)
+ : fOurIterator((server.fServerMediaSessions == NULL)
+ ? NULL : HashTable::Iterator::create(*server.fServerMediaSessions)) {
+}
+
+RTSPServer::ServerMediaSessionIterator::~ServerMediaSessionIterator() {
+ delete fOurIterator;
+}
+
+ServerMediaSession* RTSPServer::ServerMediaSessionIterator::next() {
+ if (fOurIterator == NULL) return NULL;
+
+ char const* key; // dummy
+ return (ServerMediaSession*)(fOurIterator->next(key));
+}
+
////////// UserAuthenticationDatabase implementation //////////
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/SIPClient.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A generic SIP client
// Implementation
@@ -202,7 +202,7 @@
char* rtpmapLine;
unsigned rtpmapLineSize;
if (fMIMESubtypeSize > 0) {
- char* const rtpmapFmt =
+ char const* const rtpmapFmt =
"a=rtpmap:%u %s/8000\r\n";
unsigned rtpmapFmtSize = strlen(rtpmapFmt)
+ 3 /* max char len */ + fMIMESubtypeSize;
@@ -215,7 +215,7 @@
rtpmapLine = strDup("");
rtpmapLineSize = 0;
}
- char* const inviteSDPFmt =
+ char const* const inviteSDPFmt =
"v=0\r\n"
"o=- %u %u IN IP4 %s\r\n"
"s=%s session\r\n"
@@ -240,7 +240,7 @@
unsigned inviteSDPSize = strlen(fInviteSDPDescription);
delete[] rtpmapLine;
- char* const cmdFmt =
+ char const* const cmdFmt =
"INVITE %s SIP/2.0\r\n"
"From: %s <sip:%s@%s>;tag=%u\r\n"
"Via: SIP/2.0/UDP %s:%u\r\n"
@@ -635,7 +635,7 @@
Boolean SIPClient::sendACK() {
char* cmd = NULL;
do {
- char* const cmdFmt =
+ char const* const cmdFmt =
"ACK %s SIP/2.0\r\n"
"From: %s <sip:%s@%s>;tag=%u\r\n"
"Via: SIP/2.0/UDP %s:%u\r\n"
@@ -676,7 +676,7 @@
// NOTE: This should really be retransmitted, for reliability #####
char* cmd = NULL;
do {
- char* const cmdFmt =
+ char const* const cmdFmt =
"BYE %s SIP/2.0\r\n"
"From: %s <sip:%s@%s>;tag=%u\r\n"
"Via: SIP/2.0/UDP %s:%u\r\n"
@@ -857,7 +857,8 @@
&& authenticator->nonce() != NULL && authenticator->username() != NULL
&& authenticator->password() != NULL) {
// We've been provided a filled-in authenticator, so use it:
- char* const authFmt = "Proxy-Authorization: Digest username=\"%s\", realm=\"%s\", nonce=\"%s\", response=\"%s\", uri=\"%s\"\r\n";
+ char const* const authFmt
+ = "Proxy-Authorization: Digest username=\"%s\", realm=\"%s\", nonce=\"%s\", response=\"%s\", uri=\"%s\"\r\n";
char const* response = authenticator->computeDigestResponse(cmd, url);
unsigned authBufSize = strlen(authFmt)
+ strlen(authenticator->username()) + strlen(authenticator->realm())
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/ServerMediaSession.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A data structure that represents a session that consists of
// potentially multiple (audio and/or video) sub-sessions
// (This data structure is used for media *streamers* - i.e., servers.
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/SimpleRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A simple RTP sink that packs frames into each outgoing
// packet, without any fragmentation or special headers.
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/SimpleRTPSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A RTP source for a simple RTP payload format that
// - doesn't have any special headers following the RTP header
// - doesn't have any special framing apart from the packet data itself
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/StreamParser.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Abstract class for parsing a byte stream
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/StreamParser.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Abstract class for parsing a byte stream
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/VideoRTPSink.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A generic RTP sink for video codecs (abstract base class)
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/WAVAudioFileServerMediaSubsession.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from an WAV audio file.
// Implementation
@@ -131,7 +131,7 @@
unsigned char rtpPayloadTypeIfDynamic,
FramedSource* /*inputSource*/) {
do {
- char* mimeType;
+ char const* mimeType;
unsigned char payloadFormatCode;
if (fAudioFormat == WA_PCM) {
if (fBitsPerSample == 16) {
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/WAVAudioFileSource.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A WAV audio file source
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/AC3AudioRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for AC3 audio
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/AC3AudioRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// AC3 Audio RTP Sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/AC3AudioStreamFramer.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that breaks up an AC3 audio elementary stream into frames
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/ADTSAudioFileServerMediaSubsession.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from an AAC audio file in ADTS format
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/ADTSAudioFileSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A source object for AAC audio files in ADTS format
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/AMRAudioFileServerMediaSubsession.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from an AMR audio file.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/AMRAudioFileSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// AMR Audio File Sinks
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/AMRAudioFileSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A source object for AMR audio files (as defined in RFC 3267, section 5)
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/AMRAudioRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for AMR audio (RFC 3267)
// C++ header
@@ -59,7 +59,7 @@
private:
Boolean fSourceIsWideband;
- char* fAuxSDPLine;
+ char* fFmtpSDPLine;
};
#endif
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/AMRAudioRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// AMR Audio RTP Sources (RFC 3267)
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/AMRAudioSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A source object for AMR audio sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/AVIFileSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A sink that generates an AVI file from a composite media session
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/AudioInputDevice.hh
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Generic audio input device (such as a microphone, or an input sound card)
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/AudioRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A generic RTP sink for audio codecs (abstract base class)
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/Base64.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Base64 encoding and decoding
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/BasicUDPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A simple UDP sink (i.e., without RTP or other headers added); one frame per packet
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/BasicUDPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A simple UDP source, where every UDP payload is a complete frame
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/ByteStreamFileSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A file source that is a plain byte stream (rather than frames)
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/ByteStreamMultiFileSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A source that consists of multiple byte-stream files, read sequentially
// C++ header
|
[-]
[+]
|
Added |
live.2009.07.09.tar.bz2/liveMedia/include/DVVideoRTPSink.hh
^
|
@@ -0,0 +1,53 @@
+/**********
+This library is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the
+Free Software Foundation; either version 2.1 of the License, or (at your
+option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
+
+This library is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+**********/
+// "liveMedia"
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
+// RTP sink for DV video (RFC 3189)
+// (Thanks to Ben Hutchings for prototyping this.)
+// C++ header
+
+#ifndef _DV_VIDEO_RTP_SINK_HH
+#define _DV_VIDEO_RTP_SINK_HH
+
+#ifndef _VIDEO_RTP_SINK_HH
+#include "VideoRTPSink.hh"
+#endif
+
+class DVVideoRTPSink: public VideoRTPSink {
+public:
+ static DVVideoRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat);
+
+protected:
+ DVVideoRTPSink(UsageEnvironment& env, Groupsock* RTPgs, unsigned char rtpPayloadFormat);
+ // called only by createNew()
+
+ virtual ~DVVideoRTPSink();
+
+private: // redefined virtual functions:
+ virtual Boolean sourceIsCompatibleWithUs(MediaSource& source);
+ virtual void doSpecialFrameHandling(unsigned fragmentationOffset,
+ unsigned char* frameStart,
+ unsigned numBytesInFrame,
+ struct timeval frameTimestamp,
+ unsigned numRemainingBytes);
+ virtual unsigned computeOverflowForNewFrame(unsigned newFrameSize) const;
+ virtual char const* auxSDPLine();
+
+private:
+ char* fFmtpSDPLine;
+};
+
+#endif
|
[-]
[+]
|
Added |
live.2009.07.09.tar.bz2/liveMedia/include/DVVideoStreamFramer.hh
^
|
@@ -0,0 +1,50 @@
+/**********
+This library is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the
+Free Software Foundation; either version 2.1 of the License, or (at your
+option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
+
+This library is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+**********/
+// "liveMedia"
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
+// A filter that parses a DV input stream into DV frames to deliver to the downstream object
+// C++ header
+
+#ifndef _DV_VIDEO_STREAM_FRAMER_HH
+#define _DV_VIDEO_STREAM_FRAMER_HH
+
+#ifndef _FRAMED_FILTER_HH
+#include "FramedFilter.hh"
+#endif
+
+class DVVideoStreamFramer: public FramedFilter {
+public:
+ static DVVideoStreamFramer*
+ createNew(UsageEnvironment& env, FramedSource* inputSource);
+
+ char const* profileName() const;
+
+protected:
+ DVVideoStreamFramer(UsageEnvironment& env,
+ FramedSource* inputSource);
+ // called only by createNew(), or by subclass constructors
+ virtual ~DVVideoStreamFramer();
+
+private:
+ // redefined virtual functions:
+ virtual Boolean isDVVideoStreamFramer() const;
+ virtual void doGetNextFrame();
+
+private:
+ char const* fProfileName;
+};
+
+#endif
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/DarwinInjector.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// An object that redirects one or more RTP/RTCP streams - forming a single
// multimedia session - into a 'Darwin Streaming Server' (for subsequent
// reflection to potentially arbitrarily many remote RTSP clients).
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/DeviceSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A template for a MediaSource encapsulating an audio/video input device
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/DigestAuthentication.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A class used for digest authentication.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/FileServerMediaSubsession.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from a file.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/FileSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// File Sinks
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/FramedFileSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Framed File Sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/FramedFilter.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Framed Filters
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/FramedSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Framed Sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/GSMAudioRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for GSM audio
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/H261VideoRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// H.261 Video RTP Sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/H263plusVideoFileServerMediaSubsession.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from a MPEG-4 video file.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/H263plusVideoRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for H.263+ video (RFC 4629)
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/H263plusVideoRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// H.263+ Video RTP Sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/H263plusVideoStreamFramer.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that breaks up an H263 video elementary stream into frames.
// Author Benhard Feiten
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/H264VideoFileSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// H.264 Video File Sinks
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/H264VideoRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for H.264 video (RFC 3984)
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/H264VideoRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// H.264 Video RTP Sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/H264VideoStreamFramer.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Any source that feeds into a "H264VideoRTPSink" must be of this class.
// This is a virtual base class; subclasses must implement the
// "currentNALUnitEndsAccessUnit()" virtual function.
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/HTTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// HTTP Sinks
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/InputFile.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Common routines for opening/closing named input files
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/JPEGVideoRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for JPEG video (RFC 2435)
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/JPEGVideoRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// JPEG Video (RFC 2435) RTP Sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/JPEGVideoSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// JPEG video sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/Locale.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Support for temporarily setting the locale (e.g., to POSIX) for (e.g.) parsing or printing
// floating-point numbers in protocol headers, or calling toupper()/tolower() on human-input strings.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MP3ADU.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// 'ADU' MP3 streams (for improved loss-tolerance)
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MP3ADURTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for 'ADUized' MP3 frames ("mpa-robust")
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MP3ADURTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP source for 'ADUized' MP3 frames ("mpa-robust")
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MP3ADUTranscoder.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Transcoder for ADUized MP3 frames
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MP3ADUinterleaving.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Interleaving of MP3 ADUs
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MP3AudioFileServerMediaSubsession.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from an MP3 audio file.
// (Actually, any MPEG-1 or MPEG-2 audio file should work.)
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MP3FileSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MP3 File Sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MP3HTTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MP3 HTTP Sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MP3Transcoder.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MP3 Transcoder
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG1or2AudioRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for MPEG audio (RFC 2250)
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG1or2AudioRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MPEG-1 or MPEG-2 Audio RTP Sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG1or2AudioStreamFramer.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that breaks up an MPEG (1,2) audio elementary stream into frames
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG1or2Demux.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Demultiplexer for a MPEG 1 or 2 Program Stream
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG1or2DemuxedElementaryStream.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A MPEG 1 or 2 Elementary Stream, demultiplexed from a Program Stream
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG1or2DemuxedServerMediaSubsession.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from a MPEG-1 or 2 demuxer.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG1or2FileServerDemux.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A server demultiplexer for a MPEG 1 or 2 Program Stream
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG1or2VideoFileServerMediaSubsession.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from a MPEG-1 or 2 Elementary Stream video file.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG1or2VideoHTTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A HTTP Sink specifically for MPEG Video
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG1or2VideoRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for MPEG video (RFC 2250)
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG1or2VideoRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MPEG-1 or MPEG-2 Video RTP Sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG1or2VideoStreamDiscreteFramer.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A simplified version of "MPEG1or2VideoStreamFramer" that takes only
// complete, discrete frames (rather than an arbitrary byte stream) as input.
// This avoids the parsing and data copying overhead of the full
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG1or2VideoStreamFramer.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that breaks up an MPEG 1 or 2 video elementary stream into
// frames for: Video_Sequence_Header, GOP_Header, Picture_Header
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG2IndexFromTransportStream.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that produces a sequence of I-frame indices from a MPEG-2 Transport Stream
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG2TransportFileServerMediaSubsession.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from a MPEG-2 Transport Stream file.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG2TransportStreamFramer.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that passes through (unchanged) chunks that contain an integral number
// of MPEG-2 Transport Stream packets, but returning (in "fDurationInMicroseconds")
// an updated estimate of the time gap between chunks.
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG2TransportStreamFromESSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter for converting one or more MPEG Elementary Streams
// to a MPEG-2 Transport Stream
// C++ header
@@ -31,6 +31,7 @@
static MPEG2TransportStreamFromESSource* createNew(UsageEnvironment& env);
void addNewVideoSource(FramedSource* inputSource, int mpegVersion);
+ // Note: For MPEG-4 video, set "mpegVersion" to 4; for H.264 video, set "mpegVersion"to 5.
void addNewAudioSource(FramedSource* inputSource, int mpegVersion);
protected:
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG2TransportStreamFromPESSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter for converting a stream of MPEG PES packets to a MPEG-2 Transport Stream
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG2TransportStreamIndexFile.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A class that encapsulates MPEG-2 Transport Stream 'index files'/
// These index files are used to implement 'trick play' operations
// (seek-by-time, fast forward, reverse play) on Transport Stream files.
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG2TransportStreamMultiplexor.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A class for generating MPEG-2 Transport Stream from one or more input
// Elementary Stream data sources
// C++ header
@@ -42,6 +42,7 @@
void handleNewBuffer(unsigned char* buffer, unsigned bufferSize,
int mpegVersion, MPEG1or2Demux::SCR scr);
// called by "awaitNewBuffer()"
+ // Note: For MPEG-4 video, set "mpegVersion" to 4; for H.264 video, set "mpegVersion" to 5.
private:
// Redefined virtual functions:
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG2TransportStreamTrickModeFilter.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.// A filter that converts a MPEG Transport Stream file - with corresponding index file
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.// A filter that converts a MPEG Transport Stream file - with corresponding index file
// - to a corresponding Video Elementary Stream. It also uses a "scale" parameter
// to implement 'trick mode' (fast forward or reverse play, using I-frames) on
// the video stream.
@@ -93,6 +93,7 @@
float fDesiredDataPCR, fFirstPCR;
unsigned long fSavedFrameIndexRecordStart;
unsigned long fSavedSequentialIndexRecordNum;
+ Boolean fUseSavedFrameNextTime;
};
#endif
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG4ESVideoRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for MPEG-4 Elementary Stream video (RFC 3016)
// C++ header
@@ -59,7 +59,7 @@
Boolean fVOPIsPresent;
private:
- char* fAuxSDPLine;
+ char* fFmtpSDPLine;
};
#endif
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG4ESVideoRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MP4V-ES video RTP stream sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG4GenericRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MPEG4-GENERIC ("audio", "video", or "application") RTP stream sinks
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG4GenericRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MPEG4-GENERIC ("audio", "video", or "application") RTP stream sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG4LATMAudioRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for MPEG-4 audio, using LATM multiplexing (RFC 3016)
// (Note that the initial 'size' field is assumed to be present at the start of
// each frame.)
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG4LATMAudioRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// MPEG-4 audio, using LATM multiplexing
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG4VideoFileServerMediaSubsession.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from a MPEG-4 video file.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG4VideoStreamDiscreteFramer.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A simplified version of "MPEG4VideoStreamFramer" that takes only complete,
// discrete frames (rather than an arbitrary byte stream) as input.
// This avoids the parsing and data copying overhead of the full
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEG4VideoStreamFramer.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that breaks up an MPEG-4 video elementary stream into
// frames for:
// - Visual Object Sequence (VS) Header + Visual Object (VO) Header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MPEGVideoStreamFramer.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A filter that breaks up an MPEG video elementary stream into
// headers and frames
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/Media.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Medium
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MediaSession.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A data structure that represents a session that consists of
// potentially multiple (audio and/or video) sub-sessions
// (This data structure is used for media *receivers* - i.e., clients.
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MediaSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Media Sinks
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MediaSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Media Sources
// C++ header
@@ -41,6 +41,7 @@
virtual Boolean isMPEG1or2VideoStreamFramer() const;
virtual Boolean isMPEG4VideoStreamFramer() const;
virtual Boolean isH264VideoStreamFramer() const;
+ virtual Boolean isDVVideoStreamFramer() const;
virtual Boolean isJPEGVideoSource() const;
virtual Boolean isAMRAudioSource() const;
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MultiFramedRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP sink for a common kind of payload format: Those which pack multiple,
// complete codec frames (as many as possible) into each RTP packet.
// C++ header
@@ -56,12 +56,17 @@
unsigned numBytesInFrame) const;
// whether this frame can appear in position >1 in a pkt (default: True)
virtual unsigned specialHeaderSize() const;
- // returns the size of any special header used (following the RTP header)
+ // returns the size of any special header used (following the RTP header) (default: 0)
virtual unsigned frameSpecificHeaderSize() const;
// returns the size of any frame-specific header used (before each frame
- // within the packet)
+ // within the packet) (default: 0)
+ virtual unsigned computeOverflowForNewFrame(unsigned newFrameSize) const;
+ // returns the number of overflow bytes that would be produced by adding a new
+ // frame of size "newFrameSize" to the current RTP packet.
+ // (By default, this just calls "numOverflowBytes()", but subclasses can redefine
+ // this to (e.g.) impose a granularity upon RTP payload fragments.)
- // Functions that might be called by doSpecialFrameHandling():
+ // Functions that might be called by doSpecialFrameHandling(), or other subclass virtual functions:
Boolean isFirstPacket() const { return fIsFirstPacket; }
Boolean isFirstFrameInPacket() const { return fNumFramesUsedSoFar == 0; }
Boolean curFragmentationOffset() const { return fCurFragmentationOffset; }
@@ -77,7 +82,6 @@
unsigned bytePosition = 0);
void setFramePadding(unsigned numPaddingBytes);
unsigned numFramesUsedSoFar() const { return fNumFramesUsedSoFar; }
-
unsigned ourMaxPacketSize() const { return fOurMaxPacketSize; }
public: // redefined virtual functions:
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/MultiFramedRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP source for a common kind of payload format: Those which pack multiple,
// complete codec frames (as many as possible) into each RTP packet.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/OnDemandServerMediaSubsession.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/OutputFile.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Common routines for opening/closing named output files
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/PassiveServerMediaSubsession.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that represents an existing
// 'RTPSink', rather than one that creates new 'RTPSink's on demand.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/QCELPAudioRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Qualcomm "PureVoice" (aka. "QCELP") Audio RTP Sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/QuickTimeFileSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A sink that generates a QuickTime file from a composite media session
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/QuickTimeGenericRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP Sources containing generic QuickTime stream data, as defined in
// <http://developer.apple.com/quicktime/icefloe/dispatch026.html>
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/RTCP.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTCP
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/RTPInterface.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// An abstraction of a network interface used for RTP (or RTCP).
// (This allows the RTP-over-TCP hack (RFC 2326, section 10.12) to
// be implemented transparently.)
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/RTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP Sinks
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/RTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// RTP Sources
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/RTSPClient.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A generic RTSP client
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/RTSPCommon.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Common routines used by both RTSP clients and servers
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/RTSPOverHTTPServer.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A simple HTTP server that acts solely to implement RTSP-over-HTTP tunneling
// (to a separate RTSP server), as described in
// http://developer.apple.com/documentation/QuickTime/QTSS/Concepts/chapter_2_section_14.html
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/RTSPServer.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A RTSP server
// C++ header
@@ -109,52 +109,52 @@
private: // redefined virtual functions
virtual Boolean isRTSPServer() const;
-private:
- static void incomingConnectionHandler(void*, int /*mask*/);
- void incomingConnectionHandler1();
-
+protected:
// The state of each individual session handled by a RTSP server:
class RTSPClientSession {
public:
RTSPClientSession(RTSPServer& ourServer, unsigned sessionId,
int clientSocket, struct sockaddr_in clientAddr);
virtual ~RTSPClientSession();
- private:
+ protected:
+ // Make the handler functions for each command virtual, to allow subclasses to redefine them:
+ virtual void handleCmd_bad(char const* cseq);
+ virtual void handleCmd_notSupported(char const* cseq);
+ virtual void handleCmd_notFound(char const* cseq);
+ virtual void handleCmd_unsupportedTransport(char const* cseq);
+ virtual void handleCmd_OPTIONS(char const* cseq);
+ virtual void handleCmd_DESCRIBE(char const* cseq, char const* urlSuffix,
+ char const* fullRequestStr);
+ virtual void handleCmd_SETUP(char const* cseq,
+ char const* urlPreSuffix, char const* urlSuffix,
+ char const* fullRequestStr);
+ virtual void handleCmd_withinSession(char const* cmdName,
+ char const* urlPreSuffix, char const* urlSuffix,
+ char const* cseq, char const* fullRequestStr);
+ virtual void handleCmd_TEARDOWN(ServerMediaSubsession* subsession,
+ char const* cseq);
+ virtual void handleCmd_PLAY(ServerMediaSubsession* subsession,
+ char const* cseq, char const* fullRequestStr);
+ virtual void handleCmd_PAUSE(ServerMediaSubsession* subsession,
+ char const* cseq);
+ virtual void handleCmd_GET_PARAMETER(ServerMediaSubsession* subsession,
+ char const* cseq, char const* fullRequestStr);
+ virtual void handleCmd_SET_PARAMETER(ServerMediaSubsession* subsession,
+ char const* cseq, char const* fullRequestStr);
+ protected:
UsageEnvironment& envir() { return fOurServer.envir(); }
void reclaimStreamStates();
void resetRequestBuffer();
- static void incomingRequestHandler(void*, int /*mask*/);
- void incomingRequestHandler1();
- void handleCmd_bad(char const* cseq);
- void handleCmd_notSupported(char const* cseq);
- void handleCmd_notFound(char const* cseq);
- void handleCmd_unsupportedTransport(char const* cseq);
- void handleCmd_OPTIONS(char const* cseq);
- void handleCmd_DESCRIBE(char const* cseq, char const* urlSuffix,
- char const* fullRequestStr);
- void handleCmd_SETUP(char const* cseq,
- char const* urlPreSuffix, char const* urlSuffix,
- char const* fullRequestStr);
- void handleCmd_withinSession(char const* cmdName,
- char const* urlPreSuffix, char const* urlSuffix,
- char const* cseq, char const* fullRequestStr);
- void handleCmd_TEARDOWN(ServerMediaSubsession* subsession,
- char const* cseq);
- void handleCmd_PLAY(ServerMediaSubsession* subsession,
- char const* cseq, char const* fullRequestStr);
- void handleCmd_PAUSE(ServerMediaSubsession* subsession,
- char const* cseq);
- void handleCmd_GET_PARAMETER(ServerMediaSubsession* subsession,
- char const* cseq, char const* fullRequestStr);
Boolean authenticationOK(char const* cmdName, char const* cseq,
char const* urlSuffix,
char const* fullRequestStr);
- void noteLiveness();
Boolean isMulticast() const { return fIsMulticast; }
+ static void incomingRequestHandler(void*, int /*mask*/);
+ void incomingRequestHandler1();
+ void noteLiveness();
static void noteClientLiveness(RTSPClientSession* clientSession);
static void livenessTimeoutTask(RTSPClientSession* clientSession);
-
- private:
+ protected:
RTSPServer& fOurServer;
unsigned fOurSessionId;
ServerMediaSession* fOurServerMediaSession;
@@ -175,8 +175,29 @@
} * fStreamStates;
};
+ // If you subclass "RTSPClientSession", then you should also redefine this virtual function in order
+ // to create new objects of your subclass:
+ virtual RTSPClientSession*
+ createNewClientSession(unsigned sessionId, int clientSocket, struct sockaddr_in clientAddr);
+
+ // An iterator over our "ServerMediaSession" objects:
+ class ServerMediaSessionIterator {
+ public:
+ ServerMediaSessionIterator(RTSPServer& server);
+ virtual ~ServerMediaSessionIterator();
+ ServerMediaSession* next();
+ private:
+ HashTable::Iterator *fOurIterator;
+ ServerMediaSession* fNextPtr;
+ };
+
+private:
+ static void incomingConnectionHandler(void*, int /*mask*/);
+ void incomingConnectionHandler1();
+
private:
friend class RTSPClientSession;
+ friend class ServerMediaSessionIterator;
int fServerSocket;
Port fServerPort;
UserAuthenticationDatabase* fAuthDB;
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/SIPClient.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A generic SIP client
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/ServerMediaSession.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A data structure that represents a session that consists of
// potentially multiple (audio and/or video) sub-sessions
// (This data structure is used for media *streamers* - i.e., servers.
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/SimpleRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A simple RTP sink that packs frames into each outgoing
// packet, without any fragmentation or special headers.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/SimpleRTPSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A RTP source for a simple RTP payload format that
// - doesn't have any special headers following the RTP header
// (if necessary, the "offset" parameter can be used to specify a
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/VideoRTPSink.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A generic RTP sink for video codecs (abstract base class)
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/WAVAudioFileServerMediaSubsession.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
// on demand, from an WAV audio file.
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/WAVAudioFileSource.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// A WAV audio file source
// NOTE: Samples are returned in little-endian order (the same order in which
// they were stored in the file).
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/liveMedia.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Inclusion of header files representing the interface
// for the entire library
//
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/liveMedia_version.hh
^
|
@@ -1,10 +1,10 @@
// Version information for the "liveMedia" library
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
#ifndef _LIVEMEDIA_VERSION_HH
#define _LIVEMEDIA_VERSION_HH
-#define LIVEMEDIA_LIBRARY_VERSION_STRING "2008.12.19"
-#define LIVEMEDIA_LIBRARY_VERSION_INT 1229644800
+#define LIVEMEDIA_LIBRARY_VERSION_STRING "2009.07.09"
+#define LIVEMEDIA_LIBRARY_VERSION_INT 1247097600
#endif
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/include/uLawAudioFilter.hh
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Filters for converting between raw PCM audio and uLaw
// C++ header
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/rtcp_from_spec.h
^
|
@@ -44,6 +44,9 @@
/* The code from the spec calls drand48(), but we have drand30() instead */
#define drand48 drand30
+/* The code calls "exit()", but we don't want to exit, so make it a noop: */
+#define exit(n) do {} while (0)
+
#ifndef FALSE
#define FALSE 0
#endif
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/liveMedia/uLawAudioFilter.cpp
^
|
@@ -14,7 +14,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
-// Copyright (c) 1996-2008 Live Networks, Inc. All rights reserved.
+// Copyright (c) 1996-2009 Live Networks, Inc. All rights reserved.
// Filters for converting between raw PCM audio and uLaw
// Implementation
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/mediaServer/DynamicRTSPServer.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A subclass of "RTSPServer" that creates "ServerMediaSession"s on demand,
// based on whether or not the specified stream name exists as a file
// Implementation
@@ -80,7 +80,7 @@
}
#define NEW_SMS(description) do {\
-char* descStr = description\
+char const* descStr = description\
", streamed by the LIVE555 Media Server";\
sms = ServerMediaSession::createNew(env, fileName, fileName, descStr);\
} while(0)
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/mediaServer/DynamicRTSPServer.hh
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A subclass of "RTSPServer" that creates "ServerMediaSession"s on demand,
// based on whether or not the specified stream name exists as a file
// Header file
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/mediaServer/live555MediaServer.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// LIVE555 Media Server
// main program
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/mediaServer/version.hh
^
|
@@ -1,10 +1,10 @@
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// Version information for the LIVE555 Media Server application
// Header file
#ifndef _MEDIA_SERVER_VERSION_HH
#define _MEDIA_SERVER_VERSION_HH
-#define MEDIA_SERVER_VERSION_STRING "0.20"
+#define MEDIA_SERVER_VERSION_STRING "0.3"
#endif
|
[-]
[+]
|
Added |
live.2009.07.09.tar.bz2/testProgs/#playCommon.cpp#
^
|
@@ -0,0 +1,1306 @@
+/**********
+This library is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the
+Free Software Foundation; either version 2.1 of the License, or (at your
+option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
+
+This library is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+**********/
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
+// A common framework, used for the "openRTSP" and "playSIP" applications
+// Implementation
+
+#include "playCommon.hh"
+#include "BasicUsageEnvironment.hh"
+#include "GroupsockHelper.hh"
+#ifdef SUPPORT_REAL_RTSP
+#include "../RealRTSP/include/RealRTSP.hh"
+#endif
+
+#if defined(__WIN32__) || defined(_WIN32)
+#define snprintf _snprintf
+#else
+#include <signal.h>
+#define USE_SIGNALS 1
+#endif
+
+// Forward function definitions:
+void setupStreams();
+void startPlayingStreams();
+void tearDownStreams();
+void closeMediaSinks();
+void subsessionAfterPlaying(void* clientData);
+void subsessionByeHandler(void* clientData);
+void sessionAfterPlaying(void* clientData = NULL);
+void sessionTimerHandler(void* clientData);
+void shutdown(int exitCode = 1);
+void signalHandlerShutdown(int sig);
+void checkForPacketArrival(void* clientData);
+void checkInterPacketGaps(void* clientData);
+void beginQOSMeasurement();
+
+char const* progName;
+UsageEnvironment* env;
+Medium* ourClient = NULL;
+MediaSession* session = NULL;
+TaskToken sessionTimerTask = NULL;
+TaskToken arrivalCheckTimerTask = NULL;
+TaskToken interPacketGapCheckTimerTask = NULL;
+TaskToken qosMeasurementTimerTask = NULL;
+Boolean createReceivers = True;
+Boolean outputQuickTimeFile = False;
+Boolean generateMP4Format = False;
+QuickTimeFileSink* qtOut = NULL;
+Boolean outputAVIFile = False;
+AVIFileSink* aviOut = NULL;
+Boolean audioOnly = False;
+Boolean videoOnly = False;
+char const* singleMedium = NULL;
+int verbosityLevel = 1; // by default, print verbose output
+double duration = 0;
+double durationSlop = -1.0; // extra seconds to play at the end
+double initialSeekTime = 0.0f;
+double scale = 1.0f;
+unsigned interPacketGapMaxTime = 0;
+unsigned totNumPacketsReceived = ~0; // used if checking inter-packet gaps
+Boolean playContinuously = False;
+int simpleRTPoffsetArg = -1;
+Boolean sendOptionsRequest = True;
+Boolean sendOptionsRequestOnly = False;
+Boolean oneFilePerFrame = False;
+Boolean notifyOnPacketArrival = False;
+Boolean streamUsingTCP = False;
+portNumBits tunnelOverHTTPPortNum = 0;
+char* username = NULL;
+char* password = NULL;
+char* proxyServerName = NULL;
+unsigned short proxyServerPortNum = 0;
+unsigned char desiredAudioRTPPayloadFormat = 0;
+char* mimeSubtype = NULL;
+unsigned short movieWidth = 240; // default
+Boolean movieWidthOptionSet = False;
+unsigned short movieHeight = 180; // default
+Boolean movieHeightOptionSet = False;
+unsigned movieFPS = 15; // default
+Boolean movieFPSOptionSet = False;
+char const* fileNamePrefix = "";
+unsigned fileSinkBufferSize = 20000;
+unsigned socketInputBufferSize = 0;
+Boolean packetLossCompensate = False;
+Boolean syncStreams = False;
+Boolean generateHintTracks = False;
+unsigned qosMeasurementIntervalMS = 0; // 0 means: Don't output QOS data
+unsigned statusCode = 0;
+
+struct timeval startTime;
+
+void usage() {
+ *env << "Usage: " << progName
+ << " [-p <startPortNum>] [-r|-q|-4|-i] [-a|-v] [-V] [-d <duration>] [-D <max-inter-packet-gap-time> [-c] [-S <offset>] [-n] [-O]"
+ << (controlConnectionUsesTCP ? " [-t|-T <http-port>]" : "")
+ << " [-u <username> <password>"
+ << (allowProxyServers ? " [<proxy-server> [<proxy-server-port>]]" : "")
+ << "]" << (supportCodecSelection ? " [-A <audio-codec-rtp-payload-format-code>|-M <mime-subtype-name>]" : "")
+ << " [-s <initial-seek-time>] [-z <scale>]"
+ << " [-w <width> -h <height>] [-f <frames-per-second>] [-y] [-H] [-Q [<measurement-interval>]] [-F <filename-prefix>] [-b <file-sink-buffer-size>] [-B <input-socket-buffer-size>] [-I <input-interface-ip-address>] [-m] <url> (or " << progName << " -o [-V] <url>)\n";
+ //##### Add "-R <dest-rtsp-url>" #####
+ shutdown();
+}
+
+int main(int argc, char** argv) {
+ // Begin by setting up our usage environment:
+ TaskScheduler* scheduler = BasicTaskScheduler::createNew();
+ env = BasicUsageEnvironment::createNew(*scheduler);
+
+ progName = argv[0];
+
+ gettimeofday(&startTime, NULL);
+
+#ifdef USE_SIGNALS
+ // Allow ourselves to be shut down gracefully by a SIGHUP or a SIGUSR1:
+ signal(SIGHUP, signalHandlerShutdown);
+ signal(SIGUSR1, signalHandlerShutdown);
+#endif
+
+ unsigned short desiredPortNum = 0;
+
+ // unfortunately we can't use getopt() here, as Windoze doesn't have it
+ while (argc > 2) {
+ char* const opt = argv[1];
+ if (opt[0] != '-') usage();
+ switch (opt[1]) {
+
+ case 'p': { // specify start port number
+ int portArg;
+ if (sscanf(argv[2], "%d", &portArg) != 1) {
+ usage();
+ }
+ if (portArg <= 0 || portArg >= 65536 || portArg&1) {
+ *env << "bad port number: " << portArg
+ << " (must be even, and in the range (0,65536))\n";
+ usage();
+ }
+ desiredPortNum = (unsigned short)portArg;
+ ++argv; --argc;
+ break;
+ }
+
+ case 'r': { // do not receive data (instead, just 'play' the stream(s))
+ createReceivers = False;
+ break;
+ }
+
+ case 'q': { // output a QuickTime file (to stdout)
+ outputQuickTimeFile = True;
+ break;
+ }
+
+ case '4': { // output a 'mp4'-format file (to stdout)
+ outputQuickTimeFile = True;
+ generateMP4Format = True;
+ break;
+ }
+
+ case 'i': { // output an AVI file (to stdout)
+ outputAVIFile = True;
+ break;
+ }
+
+ case 'I': { // specify input interface...
+ NetAddressList addresses(argv[2]);
+ if (addresses.numAddresses() == 0) {
+ *env << "Failed to find network address for \"" << argv[2] << "\"";
+ break;
+ }
+ ReceivingInterfaceAddr = *(unsigned*)(addresses.firstAddress()->data());
+ ++argv; --argc;
+ break;
+ }
+
+ case 'a': { // receive/record an audio stream only
+ audioOnly = True;
+ singleMedium = "audio";
+ break;
+ }
+
+ case 'v': { // receive/record a video stream only
+ videoOnly = True;
+ singleMedium = "video";
+ break;
+ }
+
+ case 'V': { // disable verbose output
+ verbosityLevel = 0;
+ break;
+ }
+
+ case 'd': { // specify duration, or how much to delay after end time
+ float arg;
+ if (sscanf(argv[2], "%g", &arg) != 1) {
+ usage();
+ }
+ if (argv[2][0] == '-') { // not "arg<0", in case argv[2] was "-0"
+ // a 'negative' argument was specified; use this for "durationSlop":
+ duration = 0; // use whatever's in the SDP
+ durationSlop = -arg;
+ } else {
+ duration = arg;
+ durationSlop = 0;
+ }
+ ++argv; --argc;
+ break;
+ }
+
+ case 'D': { // specify maximum number of seconds to wait for packets:
+ if (sscanf(argv[2], "%u", &interPacketGapMaxTime) != 1) {
+ usage();
+ }
+ ++argv; --argc;
+ break;
+ }
+
+ case 'c': { // play continuously
+ playContinuously = True;
+ break;
+ }
+
+ case 'S': { // specify an offset to use with "SimpleRTPSource"s
+ if (sscanf(argv[2], "%d", &simpleRTPoffsetArg) != 1) {
+ usage();
+ }
+ if (simpleRTPoffsetArg < 0) {
+ *env << "offset argument to \"-S\" must be >= 0\n";
+ usage();
+ }
+ ++argv; --argc;
+ break;
+ }
+
+ case 'O': { // Don't send an "OPTIONS" request before "DESCRIBE"
+ sendOptionsRequest = False;
+ break;
+ }
+
+ case 'o': { // Send only the "OPTIONS" request to the server
+ sendOptionsRequestOnly = True;
+ break;
+ }
+
+ case 'm': { // output multiple files - one for each frame
+ oneFilePerFrame = True;
+ break;
+ }
+
+ case 'n': { // notify the user when the first data packet arrives
+ notifyOnPacketArrival = True;
+ break;
+ }
+
+ case 't': {
+ // stream RTP and RTCP over the TCP 'control' connection
+ if (controlConnectionUsesTCP) {
+ streamUsingTCP = True;
+ } else {
+ usage();
+ }
+ break;
+ }
+
+ case 'T': {
+ // stream RTP and RTCP over a HTTP connection
+ if (controlConnectionUsesTCP) {
+ if (argc > 3 && argv[2][0] != '-') {
+ // The next argument is the HTTP server port number:
+ if (sscanf(argv[2], "%hu", &tunnelOverHTTPPortNum) == 1
+ && tunnelOverHTTPPortNum > 0) {
+ ++argv; --argc;
+ break;
+ }
+ }
+ }
+
+ // If we get here, the option was specified incorrectly:
+ usage();
+ break;
+ }
+
+ case 'u': { // specify a username and password
+ username = argv[2];
+ password = argv[3];
+ argv+=2; argc-=2;
+ if (allowProxyServers && argc > 3 && argv[2][0] != '-') {
+ // The next argument is the name of a proxy server:
+ proxyServerName = argv[2];
+ ++argv; --argc;
+
+ if (argc > 3 && argv[2][0] != '-') {
+ // The next argument is the proxy server port number:
+ if (sscanf(argv[2], "%hu", &proxyServerPortNum) != 1) {
+ usage();
+ }
+ ++argv; --argc;
+ }
+ }
+ break;
+ }
+
+ case 'A': { // specify a desired audio RTP payload format
+ unsigned formatArg;
+ if (sscanf(argv[2], "%u", &formatArg) != 1
+ || formatArg >= 96) {
+ usage();
+ }
+ desiredAudioRTPPayloadFormat = (unsigned char)formatArg;
+ ++argv; --argc;
+ break;
+ }
+
+ case 'M': { // specify a MIME subtype for a dynamic RTP payload type
+ mimeSubtype = argv[2];
+ if (desiredAudioRTPPayloadFormat==0) desiredAudioRTPPayloadFormat =96;
+ ++argv; --argc;
+ break;
+ }
+
+ case 'w': { // specify a width (pixels) for an output QuickTime or AVI movie
+ if (sscanf(argv[2], "%hu", &movieWidth) != 1) {
+ usage();
+ }
+ movieWidthOptionSet = True;
+ ++argv; --argc;
+ break;
+ }
+
+ case 'h': { // specify a height (pixels) for an output QuickTime or AVI movie
+ if (sscanf(argv[2], "%hu", &movieHeight) != 1) {
+ usage();
+ }
+ movieHeightOptionSet = True;
+ ++argv; --argc;
+ break;
+ }
+
+ case 'f': { // specify a frame rate (per second) for an output QT or AVI movie
+ if (sscanf(argv[2], "%u", &movieFPS) != 1) {
+ usage();
+ }
+ movieFPSOptionSet = True;
+ ++argv; --argc;
+ break;
+ }
+
+ case 'F': { // specify a prefix for the audio and video output files
+ fileNamePrefix = argv[2];
+ ++argv; --argc;
+ break;
+ }
+
+ case 'b': { // specify the size of buffers for "FileSink"s
+ if (sscanf(argv[2], "%u", &fileSinkBufferSize) != 1) {
+ usage();
+ }
+ ++argv; --argc;
+ break;
+ }
+
+ case 'B': { // specify the size of input socket buffers
+ if (sscanf(argv[2], "%u", &socketInputBufferSize) != 1) {
+ usage();
+ }
+ ++argv; --argc;
+ break;
+ }
+
+ // Note: The following option is deprecated, and may someday be removed:
+ case 'l': { // try to compensate for packet loss by repeating frames
+ packetLossCompensate = True;
+ break;
+ }
+
+grep syncstre case 'y': { // synchronize audio and video streams
+ syncStreams = True;
+ break;
+ }
+
+ case 'H': { // generate hint tracks (as well as the regular data tracks)
+ generateHintTracks = True;
+ break;
+ }
+
+ case 'Q': { // output QOS measurements
+ qosMeasurementIntervalMS = 1000; // default: 1 second
+
+ if (argc > 3 && argv[2][0] != '-') {
+ // The next argument is the measurement interval,
+ // in multiples of 100 ms
+ if (sscanf(argv[2], "%u", &qosMeasurementIntervalMS) != 1) {
+ usage();
+ }
+ qosMeasurementIntervalMS *= 100;
+ ++argv; --argc;
+ }
+ break;
+ }
+
+ case 's': { // specify initial seek time (trick play)
+ double arg;
+ if (sscanf(argv[2], "%lg", &arg) != 1 || arg < 0) {
+ usage();
+ }
+ initialSeekTime = arg;
+ ++argv; --argc;
+ break;
+ }
+
+ case 'z': { // scale (trick play)
+ float arg;
+ if (sscanf(argv[2], "%g", &arg) != 1 || arg == 0.0f) {
+ usage();
+ }
+ scale = arg;
+ ++argv; --argc;
+ break;
+ }
+
+ default: {
+ usage();
+ break;
+ }
+ }
+
+ ++argv; --argc;
+ }
+ if (argc != 2) usage();
+ if (outputQuickTimeFile && outputAVIFile) {
+ *env << "The -i and -q (or -4) flags cannot both be used!\n";
+ usage();
+ }
+ Boolean outputCompositeFile = outputQuickTimeFile || outputAVIFile;
+ if (!createReceivers && outputCompositeFile) {
+ *env << "The -r and -q (or -4 or -i) flags cannot both be used!\n";
+ usage();
+ }
+ if (outputCompositeFile && !movieWidthOptionSet) {
+ *env << "Warning: The -q, -4 or -i option was used, but not -w. Assuming a video width of "
+ << movieWidth << " pixels\n";
+ }
+ if (outputCompositeFile && !movieHeightOptionSet) {
+ *env << "Warning: The -q, -4 or -i option was used, but not -h. Assuming a video height of "
+ << movieHeight << " pixels\n";
+ }
+ if (outputCompositeFile && !movieFPSOptionSet) {
+ *env << "Warning: The -q, -4 or -i option was used, but not -f. Assuming a video frame rate of "
+ << movieFPS << " frames-per-second\n";
+ }
+ if (audioOnly && videoOnly) {
+ *env << "The -a and -v flags cannot both be used!\n";
+ usage();
+ }
+ if (sendOptionsRequestOnly && !sendOptionsRequest) {
+ *env << "The -o and -O flags cannot both be used!\n";
+ usage();
+ }
+ if (tunnelOverHTTPPortNum > 0) {
+ if (streamUsingTCP) {
+ *env << "The -t and -T flags cannot both be used!\n";
+ usage();
+ } else {
+ streamUsingTCP = True;
+ }
+ }
+ if (!createReceivers && notifyOnPacketArrival) {
+ *env << "Warning: Because we're not receiving stream data, the -n flag has no effect\n";
+ }
+ if (durationSlop < 0) {
+ // This parameter wasn't set, so use a default value.
+ // If we're measuring QOS stats, then don't add any slop, to avoid
+ // having 'empty' measurement intervals at the end.
+ durationSlop = qosMeasurementIntervalMS > 0 ? 0.0 : 5.0;
+ }
+
+ char* url = argv[1];
+
+ // Create our client object:
+ ourClient = createClient(*env, verbosityLevel, progName);
+ if (ourClient == NULL) {
+ *env << "Failed to create " << clientProtocolName
+ << " client: " << env->getResultMsg() << "\n";
+ shutdown();
+ }
+
+ if (sendOptionsRequest) {
+ // Begin by sending an "OPTIONS" command:
+ char* optionsResponse
+ = getOptionsResponse(ourClient, url, username, password);
+ if (sendOptionsRequestOnly) {
+ if (optionsResponse == NULL) {
+ *env << clientProtocolName << " \"OPTIONS\" request failed: "
+ << env->getResultMsg() << "\n";
+ } else {
+ *env << clientProtocolName << " \"OPTIONS\" request returned: "
+ << optionsResponse << "\n";
+ }
+ shutdown();
+ }
+ delete[] optionsResponse;
+ }
+
+ // Open the URL, to get a SDP description:
+ char* sdpDescription
+ = getSDPDescriptionFromURL(ourClient, url, username, password,
+ proxyServerName, proxyServerPortNum,
+ desiredPortNum);
+ if (sdpDescription == NULL) {
+ *env << "Failed to get a SDP description from URL \"" << url
+ << "\": " << env->getResultMsg() << "\n";
+ shutdown();
+ }
+
+ *env << "Opened URL \"" << url
+ << "\", returning a SDP description:\n" << sdpDescription << "\n";
+
+ // Create a media session object from this SDP description:
+ session = MediaSession::createNew(*env, sdpDescription);
+ delete[] sdpDescription;
+ if (session == NULL) {
+ *env << "Failed to create a MediaSession object from the SDP description: " << env->getResultMsg() << "\n";
+ shutdown();
+ } else if (!session->hasSubsessions()) {
+ *env << "This session has no media subsessions (i.e., \"m=\" lines)\n";
+ shutdown();
+ }
+
+ // Then, setup the "RTPSource"s for the session:
+ MediaSubsessionIterator iter(*session);
+ MediaSubsession *subsession;
+ Boolean madeProgress = False;
+ char const* singleMediumToTest = singleMedium;
+ while ((subsession = iter.next()) != NULL) {
+ // If we've asked to receive only a single medium, then check this now:
+ if (singleMediumToTest != NULL) {
+ if (strcmp(subsession->mediumName(), singleMediumToTest) != 0) {
+ *env << "Ignoring \"" << subsession->mediumName()
+ << "/" << subsession->codecName()
+ << "\" subsession, because we've asked to receive a single " << singleMedium
+ << " session only\n";
+ continue;
+ } else {
+ // Receive this subsession only
+ singleMediumToTest = "xxxxx";
+ // this hack ensures that we get only 1 subsession of this type
+ }
+ }
+
+ if (desiredPortNum != 0) {
+ subsession->setClientPortNum(desiredPortNum);
+ desiredPortNum += 2;
+ }
+
+ if (createReceivers) {
+ if (!subsession->initiate(simpleRTPoffsetArg)) {
+ *env << "Unable to create receiver for \"" << subsession->mediumName()
+ << "/" << subsession->codecName()
+ << "\" subsession: " << env->getResultMsg() << "\n";
+ } else {
+ *env << "Created receiver for \"" << subsession->mediumName()
+ << "/" << subsession->codecName()
+ << "\" subsession (client ports " << subsession->clientPortNum()
+ << "-" << subsession->clientPortNum()+1 << ")\n";
+ madeProgress = True;
+
+ if (subsession->rtpSource() != NULL) {
+ // Because we're saving the incoming data, rather than playing
+ // it in real time, allow an especially large time threshold
+ // (1 second) for reordering misordered incoming packets:
+ unsigned const thresh = 1000000; // 1 second
+ subsession->rtpSource()->setPacketReorderingThresholdTime(thresh);
+
+ if (socketInputBufferSize > 0) {
+ // Set the RTP source's input buffer size as specified:
+ int socketNum
+ = subsession->rtpSource()->RTPgs()->socketNum();
+ unsigned curBufferSize
+ = getReceiveBufferSize(*env, socketNum);
+ unsigned newBufferSize
+ = setReceiveBufferTo(*env, socketNum, socketInputBufferSize);
+ *env << "Changed socket receive buffer size for the \""
+ << subsession->mediumName()
+ << "/" << subsession->codecName()
+ << "\" subsession from "
+ << curBufferSize << " to "
+ << newBufferSize << " bytes\n";
+ }
+ }
+ }
+ } else {
+ if (subsession->clientPortNum() == 0) {
+ *env << "No client port was specified for the \""
+ << subsession->mediumName()
+ << "/" << subsession->codecName()
+ << "\" subsession. (Try adding the \"-p <portNum>\" option.)\n";
+ } else {
+ madeProgress = True;
+ }
+ }
+ }
+ if (!madeProgress) shutdown();
+
+ // Perform additional 'setup' on each subsession, before playing them:
+ setupStreams();
+
+ // Create output files:
+ if (createReceivers) {
+ if (outputQuickTimeFile) {
+ // Create a "QuickTimeFileSink", to write to 'stdout':
+ qtOut = QuickTimeFileSink::createNew(*env, *session, "stdout",
+ fileSinkBufferSize,
+ movieWidth, movieHeight,
+ movieFPS,
+ packetLossCompensate,
+ syncStreams,
+ generateHintTracks,
+ generateMP4Format);
+ if (qtOut == NULL) {
+ *env << "Failed to create QuickTime file sink for stdout: " << env->getResultMsg();
+ shutdown();
+ }
+
+ qtOut->startPlaying(sessionAfterPlaying, NULL);
+ } else if (outputAVIFile) {
+ // Create an "AVIFileSink", to write to 'stdout':
+ aviOut = AVIFileSink::createNew(*env, *session, "stdout",
+ fileSinkBufferSize,
+ movieWidth, movieHeight,
+ movieFPS,
+ packetLossCompensate);
+ if (aviOut == NULL) {
+ *env << "Failed to create AVI file sink for stdout: " << env->getResultMsg();
+ shutdown();
+ }
+
+ aviOut->startPlaying(sessionAfterPlaying, NULL);
+#ifdef SUPPORT_REAL_RTSP
+ } else if (session->isRealNetworksRDT) {
+ // For RealNetworks' sessions, we create a single output file,
+ // named "output.rm".
+ char outFileName[1000];
+ if (singleMedium == NULL) {
+ snprintf(outFileName, sizeof outFileName, "%soutput.rm", fileNamePrefix);
+ } else {
+ // output to 'stdout' as normal, even though we actually output all media
+ sprintf(outFileName, "stdout");
+ }
+ FileSink* fileSink = FileSink::createNew(*env, outFileName,
+ fileSinkBufferSize, oneFilePerFrame);
+
+ // The output file needs to begin with a special 'RMFF' header,
+ // in order for it to be usable. Write this header first:
+ unsigned headerSize;
+ unsigned char* headerData = RealGenerateRMFFHeader(session, headerSize);
+ struct timeval timeNow;
+ gettimeofday(&timeNow, NULL);
+ fileSink->addData(headerData, headerSize, timeNow);
+ delete[] headerData;
+
+ // Start playing the output file from the first subsession.
+ // (Hack: Because all subsessions' data is actually multiplexed on the
+ // single RTSP TCP connection, playing from one subsession is sufficient.)
+ iter.reset();
+ madeProgress = False;
+ while ((subsession = iter.next()) != NULL) {
+ if (subsession->readSource() == NULL) continue; // was not initiated
+
+ fileSink->startPlaying(*(subsession->readSource()),
+ subsessionAfterPlaying, subsession);
+ madeProgress = True;
+ break; // play from one subsession only
+ }
+ if (!madeProgress) shutdown();
+#endif
+ } else {
+ // Create and start "FileSink"s for each subsession:
+ madeProgress = False;
+ iter.reset();
+ while ((subsession = iter.next()) != NULL) {
+ if (subsession->readSource() == NULL) continue; // was not initiated
+
+ // Create an output file for each desired stream:
+ char outFileName[1000];
+ if (singleMedium == NULL) {
+ // Output file name is
+ // "<filename-prefix><medium_name>-<codec_name>-<counter>"
+ static unsigned streamCounter = 0;
+ snprintf(outFileName, sizeof outFileName, "%s%s-%s-%d",
+ fileNamePrefix, subsession->mediumName(),
+ subsession->codecName(), ++streamCounter);
+ } else {
+ sprintf(outFileName, "stdout");
+ }
+ FileSink* fileSink;
+ if (strcmp(subsession->mediumName(), "audio") == 0 &&
+ (strcmp(subsession->codecName(), "AMR") == 0 ||
+ strcmp(subsession->codecName(), "AMR-WB") == 0)) {
+ // For AMR audio streams, we use a special sink that inserts AMR frame hdrs:
+ fileSink = AMRAudioFileSink::createNew(*env, outFileName,
+ fileSinkBufferSize, oneFilePerFrame);
+ } else if (strcmp(subsession->mediumName(), "video") == 0 &&
+ (strcmp(subsession->codecName(), "H264") == 0)) {
+ // For H.264 video stream, we use a special sink that insert start_codes:
+ fileSink = H264VideoFileSink::createNew(*env, outFileName,
+ fileSinkBufferSize, oneFilePerFrame);
+ } else {
+ // Normal case:
+ fileSink = FileSink::createNew(*env, outFileName,
+ fileSinkBufferSize, oneFilePerFrame);
+ }
+ subsession->sink = fileSink;
+ if (subsession->sink == NULL) {
+ *env << "Failed to create FileSink for \"" << outFileName
+ << "\": " << env->getResultMsg() << "\n";
+ } else {
+ if (singleMedium == NULL) {
+ *env << "Created output file: \"" << outFileName << "\"\n";
+ } else {
+ *env << "Outputting data from the \"" << subsession->mediumName()
+ << "/" << subsession->codecName()
+ << "\" subsession to 'stdout'\n";
+ }
+
+ if (strcmp(subsession->mediumName(), "video") == 0 &&
+ strcmp(subsession->codecName(), "MP4V-ES") == 0 &&
+ subsession->fmtp_config() != NULL) {
+ // For MPEG-4 video RTP streams, the 'config' information
+ // from the SDP description contains useful VOL etc. headers.
+ // Insert this data at the front of the output file:
+ unsigned configLen;
+ unsigned char* configData
+ = parseGeneralConfigStr(subsession->fmtp_config(), configLen);
+ struct timeval timeNow;
+ gettimeofday(&timeNow, NULL);
+ fileSink->addData(configData, configLen, timeNow);
+ delete[] configData;
+ }
+
+ subsession->sink->startPlaying(*(subsession->readSource()),
+ subsessionAfterPlaying,
+ subsession);
+
+ // Also set a handler to be called if a RTCP "BYE" arrives
+ // for this subsession:
+ if (subsession->rtcpInstance() != NULL) {
+ subsession->rtcpInstance()->setByeHandler(subsessionByeHandler,
+ subsession);
+ }
+
+ madeProgress = True;
+ }
+ }
+ if (!madeProgress) shutdown();
+ }
+ }
+
+ // Finally, start playing each subsession, to start the data flow:
+
+ startPlayingStreams();
+
+ env->taskScheduler().doEventLoop(); // does not return
+
+ return 0; // only to prevent compiler warning
+}
+
+
+void setupStreams() {
+ MediaSubsessionIterator iter(*session);
+ MediaSubsession *subsession;
+ Boolean madeProgress = False;
+
+ while ((subsession = iter.next()) != NULL) {
+ if (subsession->clientPortNum() == 0) continue; // port # was not set
+
+ if (!clientSetupSubsession(ourClient, subsession, streamUsingTCP)) {
+ *env << "Failed to setup \"" << subsession->mediumName()
+ << "/" << subsession->codecName()
+ << "\" subsession: " << env->getResultMsg() << "\n";
+ } else {
+ *env << "Setup \"" << subsession->mediumName()
+ << "/" << subsession->codecName()
+ << "\" subsession (client ports " << subsession->clientPortNum()
+ << "-" << subsession->clientPortNum()+1 << ")\n";
+ madeProgress = True;
+ }
+ }
+ if (!madeProgress) shutdown();
+}
+
+void startPlayingStreams() {
+ if (duration == 0) {
+ if (scale > 0) duration = session->playEndTime() - initialSeekTime; // use SDP end time
+ else if (scale < 0) duration = initialSeekTime;
+ }
+ if (duration < 0) duration = 0.0;
+
+ if (!clientStartPlayingSession(ourClient, session)) {
+ *env << "Failed to start playing session: " << env->getResultMsg() << "\n";
+ shutdown();
+ } else {
+ *env << "Started playing session\n";
+ }
+
+ if (qosMeasurementIntervalMS > 0) {
+ // Begin periodic QOS measurements:
+ beginQOSMeasurement();
+ }
+
+ // Figure out how long to delay (if at all) before shutting down, or
+ // repeating the playing
+ Boolean timerIsBeingUsed = False;
+ double secondsToDelay = duration;
+ if (duration > 0) {
+ double const maxDelayTime
+ = (double)( ((unsigned)0x7FFFFFFF)/1000000.0 );
+ if (duration > maxDelayTime) {
+ *env << "Warning: specified end time " << duration
+ << " exceeds maximum " << maxDelayTime
+ << "; will not do a delayed shutdown\n";
+ } else {
+ timerIsBeingUsed = True;
+ double absScale = scale > 0 ? scale : -scale; // ASSERT: scale != 0
+ secondsToDelay = duration/absScale + durationSlop;
+
+ int uSecsToDelay = (int)(secondsToDelay*1000000.0);
+ sessionTimerTask = env->taskScheduler().scheduleDelayedTask(
+ uSecsToDelay, (TaskFunc*)sessionTimerHandler, (void*)NULL);
+ }
+ }
+
+ char const* actionString
+ = createReceivers? "Receiving streamed data":"Data is being streamed";
+ if (timerIsBeingUsed) {
+ *env << actionString
+ << " (for up to " << secondsToDelay
+ << " seconds)...\n";
+ } else {
+#ifdef USE_SIGNALS
+ pid_t ourPid = getpid();
+ *env << actionString
+ << " (signal with \"kill -HUP " << (int)ourPid
+ << "\" or \"kill -USR1 " << (int)ourPid
+ << "\" to terminate)...\n";
+#else
+ *env << actionString << "...\n";
+#endif
+ }
+
+ // Watch for incoming packets (if desired):
+ checkForPacketArrival(NULL);
+ checkInterPacketGaps(NULL);
+}
+
+void tearDownStreams() {
+ if (session == NULL) return;
+
+ clientTearDownSession(ourClient, session);
+}
+
+void closeMediaSinks() {
+ Medium::close(qtOut);
+ Medium::close(aviOut);
+
+ if (session == NULL) return;
+ MediaSubsessionIterator iter(*session);
+ MediaSubsession* subsession;
+ while ((subsession = iter.next()) != NULL) {
+ Medium::close(subsession->sink);
+ subsession->sink = NULL;
+ }
+}
+
+void subsessionAfterPlaying(void* clientData) {
+ // Begin by closing this media subsession's stream:
+ MediaSubsession* subsession = (MediaSubsession*)clientData;
+ Medium::close(subsession->sink);
+ subsession->sink = NULL;
+
+ // Next, check whether *all* subsessions' streams have now been closed:
+ MediaSession& session = subsession->parentSession();
+ MediaSubsessionIterator iter(session);
+ while ((subsession = iter.next()) != NULL) {
+ if (subsession->sink != NULL) return; // this subsession is still active
+ }
+
+ // All subsessions' streams have now been closed
+ sessionAfterPlaying();
+}
+
+void subsessionByeHandler(void* clientData) {
+ struct timeval timeNow;
+ gettimeofday(&timeNow, NULL);
+ unsigned secsDiff = timeNow.tv_sec - startTime.tv_sec;
+
+ MediaSubsession* subsession = (MediaSubsession*)clientData;
+ *env << "Received RTCP \"BYE\" on \"" << subsession->mediumName()
+ << "/" << subsession->codecName()
+ << "\" subsession (after " << secsDiff
+ << " seconds)\n";
+
+ // Act now as if the subsession had closed:
+ subsessionAfterPlaying(subsession);
+}
+
+void sessionAfterPlaying(void* /*clientData*/) {
+ if (!playContinuously) {
+ shutdown(0);
+ } else {
+ // We've been asked to play the stream(s) over again:
+ startPlayingStreams();
+ }
+}
+
+void sessionTimerHandler(void* /*clientData*/) {
+ sessionTimerTask = NULL;
+
+ sessionAfterPlaying();
+}
+
+class qosMeasurementRecord {
+public:
+ qosMeasurementRecord(struct timeval const& startTime, RTPSource* src)
+ : fSource(src), fNext(NULL),
+ kbits_per_second_min(1e20), kbits_per_second_max(0),
+ kBytesTotal(0.0),
+ packet_loss_fraction_min(1.0), packet_loss_fraction_max(0.0),
+ totNumPacketsReceived(0), totNumPacketsExpected(0) {
+ measurementEndTime = measurementStartTime = startTime;
+
+#ifdef SUPPORT_REAL_RTSP
+ if (session->isRealNetworksRDT) { // hack for RealMedia sessions (RDT, not RTP)
+ RealRDTSource* rdt = (RealRDTSource*)src;
+ kBytesTotal = rdt->totNumKBytesReceived();
+ totNumPacketsReceived = rdt->totNumPacketsReceived();
+ totNumPacketsExpected = totNumPacketsReceived; // because we use TCP
+ return;
+ }
+#endif
+ RTPReceptionStatsDB::Iterator statsIter(src->receptionStatsDB());
+ // Assume that there's only one SSRC source (usually the case):
+ RTPReceptionStats* stats = statsIter.next(True);
+ if (stats != NULL) {
+ kBytesTotal = stats->totNumKBytesReceived();
+ totNumPacketsReceived = stats->totNumPacketsReceived();
+ totNumPacketsExpected = stats->totNumPacketsExpected();
+ }
+ }
+ virtual ~qosMeasurementRecord() { delete fNext; }
+
+ void periodicQOSMeasurement(struct timeval const& timeNow);
+
+public:
+ RTPSource* fSource;
+ qosMeasurementRecord* fNext;
+
+public:
+ struct timeval measurementStartTime, measurementEndTime;
+ double kbits_per_second_min, kbits_per_second_max;
+ double kBytesTotal;
+ double packet_loss_fraction_min, packet_loss_fraction_max;
+ unsigned totNumPacketsReceived, totNumPacketsExpected;
+};
+
+static qosMeasurementRecord* qosRecordHead = NULL;
+
+static void periodicQOSMeasurement(void* clientData); // forward
+
+static unsigned nextQOSMeasurementUSecs;
+
+static void scheduleNextQOSMeasurement() {
+ nextQOSMeasurementUSecs += qosMeasurementIntervalMS*1000;
+ struct timeval timeNow;
+ gettimeofday(&timeNow, NULL);
+ unsigned timeNowUSecs = timeNow.tv_sec*1000000 + timeNow.tv_usec;
+ unsigned usecsToDelay = nextQOSMeasurementUSecs - timeNowUSecs;
+ // Note: This works even when nextQOSMeasurementUSecs wraps around
+
+ qosMeasurementTimerTask = env->taskScheduler().scheduleDelayedTask(
+ usecsToDelay, (TaskFunc*)periodicQOSMeasurement, (void*)NULL);
+}
+
+static void periodicQOSMeasurement(void* /*clientData*/) {
+ struct timeval timeNow;
+ gettimeofday(&timeNow, NULL);
+
+ for (qosMeasurementRecord* qosRecord = qosRecordHead;
+ qosRecord != NULL; qosRecord = qosRecord->fNext) {
+ qosRecord->periodicQOSMeasurement(timeNow);
+ }
+
+ // Do this again later:
+ scheduleNextQOSMeasurement();
+}
+
+void qosMeasurementRecord
+::periodicQOSMeasurement(struct timeval const& timeNow) {
+ unsigned secsDiff = timeNow.tv_sec - measurementEndTime.tv_sec;
+ int usecsDiff = timeNow.tv_usec - measurementEndTime.tv_usec;
+ double timeDiff = secsDiff + usecsDiff/1000000.0;
+ measurementEndTime = timeNow;
+
+#ifdef SUPPORT_REAL_RTSP
+ if (session->isRealNetworksRDT) { // hack for RealMedia sessions (RDT, not RTP)
+ RealRDTSource* rdt = (RealRDTSource*)fSource;
+ double kBytesTotalNow = rdt->totNumKBytesReceived();
+ double kBytesDeltaNow = kBytesTotalNow - kBytesTotal;
+ kBytesTotal = kBytesTotalNow;
+
+ double kbpsNow = timeDiff == 0.0 ? 0.0 : 8*kBytesDeltaNow/timeDiff;
+ if (kbpsNow < 0.0) kbpsNow = 0.0; // in case of roundoff error
+ if (kbpsNow < kbits_per_second_min) kbits_per_second_min = kbpsNow;
+ if (kbpsNow > kbits_per_second_max) kbits_per_second_max = kbpsNow;
+
+ totNumPacketsReceived = rdt->totNumPacketsReceived();
+ totNumPacketsExpected = totNumPacketsReceived; // because we use TCP
+ packet_loss_fraction_min = packet_loss_fraction_max = 0.0; // ditto
+ return;
+ }
+#endif
+ RTPReceptionStatsDB::Iterator statsIter(fSource->receptionStatsDB());
+ // Assume that there's only one SSRC source (usually the case):
+ RTPReceptionStats* stats = statsIter.next(True);
+ if (stats != NULL) {
+ double kBytesTotalNow = stats->totNumKBytesReceived();
+ double kBytesDeltaNow = kBytesTotalNow - kBytesTotal;
+ kBytesTotal = kBytesTotalNow;
+
+ double kbpsNow = timeDiff == 0.0 ? 0.0 : 8*kBytesDeltaNow/timeDiff;
+ if (kbpsNow < 0.0) kbpsNow = 0.0; // in case of roundoff error
+ if (kbpsNow < kbits_per_second_min) kbits_per_second_min = kbpsNow;
+ if (kbpsNow > kbits_per_second_max) kbits_per_second_max = kbpsNow;
+
+ unsigned totReceivedNow = stats->totNumPacketsReceived();
+ unsigned totExpectedNow = stats->totNumPacketsExpected();
+ unsigned deltaReceivedNow = totReceivedNow - totNumPacketsReceived;
+ unsigned deltaExpectedNow = totExpectedNow - totNumPacketsExpected;
+ totNumPacketsReceived = totReceivedNow;
+ totNumPacketsExpected = totExpectedNow;
+
+ double lossFractionNow = deltaExpectedNow == 0 ? 0.0
+ : 1.0 - deltaReceivedNow/(double)deltaExpectedNow;
+ //if (lossFractionNow < 0.0) lossFractionNow = 0.0; //reordering can cause
+ if (lossFractionNow < packet_loss_fraction_min) {
+ packet_loss_fraction_min = lossFractionNow;
+ }
+ if (lossFractionNow > packet_loss_fraction_max) {
+ packet_loss_fraction_max = lossFractionNow;
+ }
+ }
+}
+
+void beginQOSMeasurement() {
+ // Set up a measurement record for each active subsession:
+ struct timeval startTime;
+ gettimeofday(&startTime, NULL);
+ nextQOSMeasurementUSecs = startTime.tv_sec*1000000 + startTime.tv_usec;
+ qosMeasurementRecord* qosRecordTail = NULL;
+ MediaSubsessionIterator iter(*session);
+ MediaSubsession* subsession;
+ while ((subsession = iter.next()) != NULL) {
+ RTPSource* src = subsession->rtpSource();
+#ifdef SUPPORT_REAL_RTSP
+ if (session->isRealNetworksRDT) src = (RTPSource*)(subsession->readSource()); // hack
+#endif
+ if (src == NULL) continue;
+
+ qosMeasurementRecord* qosRecord
+ = new qosMeasurementRecord(startTime, src);
+ if (qosRecordHead == NULL) qosRecordHead = qosRecord;
+ if (qosRecordTail != NULL) qosRecordTail->fNext = qosRecord;
+ qosRecordTail = qosRecord;
+ }
+
+ // Then schedule the first of the periodic measurements:
+ scheduleNextQOSMeasurement();
+}
+
+void printQOSData(int exitCode) {
+ if (exitCode != 0 && statusCode == 0) statusCode = 2;
+ *env << "begin_QOS_statistics\n";
+ *env << "server_availability\t" << (statusCode == 1 ? 0 : 100) << "\n";
+ *env << "stream_availability\t" << (statusCode == 0 ? 100 : 0) << "\n";
+
+ // Print out stats for each active subsession:
+ qosMeasurementRecord* curQOSRecord = qosRecordHead;
+ if (session != NULL) {
+ MediaSubsessionIterator iter(*session);
+ MediaSubsession* subsession;
+ while ((subsession = iter.next()) != NULL) {
+ RTPSource* src = subsession->rtpSource();
+#ifdef SUPPORT_REAL_RTSP
+ if (session->isRealNetworksRDT) src = (RTPSource*)(subsession->readSource()); // hack
+#endif
+ if (src == NULL) continue;
+
+ *env << "subsession\t" << subsession->mediumName()
+ << "/" << subsession->codecName() << "\n";
+
+ unsigned numPacketsReceived = 0, numPacketsExpected = 0;
+
+ if (curQOSRecord != NULL) {
+ numPacketsReceived = curQOSRecord->totNumPacketsReceived;
+ numPacketsExpected = curQOSRecord->totNumPacketsExpected;
+ }
+ *env << "num_packets_received\t" << numPacketsReceived << "\n";
+ *env << "num_packets_lost\t" << numPacketsExpected - numPacketsReceived << "\n";
+
+ if (curQOSRecord != NULL) {
+ unsigned secsDiff = curQOSRecord->measurementEndTime.tv_sec
+ - curQOSRecord->measurementStartTime.tv_sec;
+ int usecsDiff = curQOSRecord->measurementEndTime.tv_usec
+ - curQOSRecord->measurementStartTime.tv_usec;
+ double measurementTime = secsDiff + usecsDiff/1000000.0;
+ *env << "elapsed_measurement_time\t" << measurementTime << "\n";
+
+ *env << "kBytes_received_total\t" << curQOSRecord->kBytesTotal << "\n";
+
+ *env << "measurement_sampling_interval_ms\t" << qosMeasurementIntervalMS << "\n";
+
+ if (curQOSRecord->kbits_per_second_max == 0) {
+ // special case: we didn't receive any data:
+ *env <<
+ "kbits_per_second_min\tunavailable\n"
+ "kbits_per_second_ave\tunavailable\n"
+ "kbits_per_second_max\tunavailable\n";
+ } else {
+ *env << "kbits_per_second_min\t" << curQOSRecord->kbits_per_second_min << "\n";
+ *env << "kbits_per_second_ave\t"
+ << (measurementTime == 0.0 ? 0.0 : 8*curQOSRecord->kBytesTotal/measurementTime) << "\n";
+ *env << "kbits_per_second_max\t" << curQOSRecord->kbits_per_second_max << "\n";
+ }
+
+ *env << "packet_loss_percentage_min\t" << 100*curQOSRecord->packet_loss_fraction_min << "\n";
+ double packetLossFraction = numPacketsExpected == 0 ? 1.0
+ : 1.0 - numPacketsReceived/(double)numPacketsExpected;
+ if (packetLossFraction < 0.0) packetLossFraction = 0.0;
+ *env << "packet_loss_percentage_ave\t" << 100*packetLossFraction << "\n";
+ *env << "packet_loss_percentage_max\t"
+ << (packetLossFraction == 1.0 ? 100.0 : 100*curQOSRecord->packet_loss_fraction_max) << "\n";
+
+#ifdef SUPPORT_REAL_RTSP
+ if (session->isRealNetworksRDT) {
+ RealRDTSource* rdt = (RealRDTSource*)src;
+ *env << "inter_packet_gap_ms_min\t" << rdt->minInterPacketGapUS()/1000.0 << "\n";
+ struct timeval totalGaps = rdt->totalInterPacketGaps();
+ double totalGapsMS = totalGaps.tv_sec*1000.0 + totalGaps.tv_usec/1000.0;
+ unsigned totNumPacketsReceived = rdt->totNumPacketsReceived();
+ *env << "inter_packet_gap_ms_ave\t"
+ << (totNumPacketsReceived == 0 ? 0.0 : totalGapsMS/totNumPacketsReceived) << "\n";
+ *env << "inter_packet_gap_ms_max\t" << rdt->maxInterPacketGapUS()/1000.0 << "\n";
+ } else {
+#endif
+ RTPReceptionStatsDB::Iterator statsIter(src->receptionStatsDB());
+ // Assume that there's only one SSRC source (usually the case):
+ RTPReceptionStats* stats = statsIter.next(True);
+ if (stats != NULL) {
+ *env << "inter_packet_gap_ms_min\t" << stats->minInterPacketGapUS()/1000.0 << "\n";
+ struct timeval totalGaps = stats->totalInterPacketGaps();
+ double totalGapsMS = totalGaps.tv_sec*1000.0 + totalGaps.tv_usec/1000.0;
+ unsigned totNumPacketsReceived = stats->totNumPacketsReceived();
+ *env << "inter_packet_gap_ms_ave\t"
+ << (totNumPacketsReceived == 0 ? 0.0 : totalGapsMS/totNumPacketsReceived) << "\n";
+ *env << "inter_packet_gap_ms_max\t" << stats->maxInterPacketGapUS()/1000.0 << "\n";
+ }
+#ifdef SUPPORT_REAL_RTSP
+ }
+#endif
+
+ curQOSRecord = curQOSRecord->fNext;
+ }
+ }
+ }
+
+ *env << "end_QOS_statistics\n";
+ delete qosRecordHead;
+}
+
+void shutdown(int exitCode) {
+ if (env != NULL) {
+ env->taskScheduler().unscheduleDelayedTask(sessionTimerTask);
+ env->taskScheduler().unscheduleDelayedTask(arrivalCheckTimerTask);
+ env->taskScheduler().unscheduleDelayedTask(interPacketGapCheckTimerTask);
+ env->taskScheduler().unscheduleDelayedTask(qosMeasurementTimerTask);
+ }
+
+ if (qosMeasurementIntervalMS > 0) {
+ printQOSData(exitCode);
+ }
+
+ // Close our output files:
+ closeMediaSinks();
+
+ // Teardown, then shutdown, any outstanding RTP/RTCP subsessions
+ tearDownStreams();
+ Medium::close(session);
+
+ // Finally, shut down our client:
+ Medium::close(ourClient);
+
+ // Adios...
+ exit(exitCode);
+}
+
+void signalHandlerShutdown(int /*sig*/) {
+ *env << "Got shutdown signal\n";
+ shutdown(0);
+}
+
+void checkForPacketArrival(void* /*clientData*/) {
+ if (!notifyOnPacketArrival) return; // we're not checking
+
+ // Check each subsession, to see whether it has received data packets:
+ unsigned numSubsessionsChecked = 0;
+ unsigned numSubsessionsWithReceivedData = 0;
+ unsigned numSubsessionsThatHaveBeenSynced = 0;
+
+ MediaSubsessionIterator iter(*session);
+ MediaSubsession* subsession;
+ while ((subsession = iter.next()) != NULL) {
+ RTPSource* src = subsession->rtpSource();
+ if (src == NULL) continue;
+ ++numSubsessionsChecked;
+
+ if (src->receptionStatsDB().numActiveSourcesSinceLastReset() > 0) {
+ // At least one data packet has arrived
+ ++numSubsessionsWithReceivedData;
+ }
+ if (src->hasBeenSynchronizedUsingRTCP()) {
+ ++numSubsessionsThatHaveBeenSynced;
+ }
+ }
+
+ unsigned numSubsessionsToCheck = numSubsessionsChecked;
+ // Special case for "QuickTimeFileSink"s and "AVIFileSink"s:
+ // They might not use all of the input sources:
+ if (qtOut != NULL) {
+ numSubsessionsToCheck = qtOut->numActiveSubsessions();
+ } else if (aviOut != NULL) {
+ numSubsessionsToCheck = aviOut->numActiveSubsessions();
+ }
+
+ Boolean notifyTheUser;
+ if (!syncStreams) {
+ notifyTheUser = numSubsessionsWithReceivedData > 0; // easy case
+ } else {
+ notifyTheUser = numSubsessionsWithReceivedData >= numSubsessionsToCheck
+ && numSubsessionsThatHaveBeenSynced == numSubsessionsChecked;
+ // Note: A subsession with no active sources is considered to be synced
+ }
+ if (notifyTheUser) {
+ struct timeval timeNow;
+ gettimeofday(&timeNow, NULL);
+ char timestampStr[100];
+ sprintf(timestampStr, "%ld%03ld", timeNow.tv_sec, (long)(timeNow.tv_usec/1000));
+ *env << (syncStreams ? "Synchronized d" : "D")
+ << "ata packets have begun arriving [" << timestampStr << "]\007\n";
+ return;
+ }
+
+ // No luck, so reschedule this check again, after a delay:
+ int uSecsToDelay = 100000; // 100 ms
+ arrivalCheckTimerTask
+ = env->taskScheduler().scheduleDelayedTask(uSecsToDelay,
+ (TaskFunc*)checkForPacketArrival, NULL);
+}
+
+void checkInterPacketGaps(void* /*clientData*/) {
+ if (interPacketGapMaxTime == 0) return; // we're not checking
+
+ // Check each subsession, counting up how many packets have been received:
+ unsigned newTotNumPacketsReceived = 0;
+
+ MediaSubsessionIterator iter(*session);
+ MediaSubsession* subsession;
+ while ((subsession = iter.next()) != NULL) {
+ RTPSource* src = subsession->rtpSource();
+ if (src == NULL) continue;
+ newTotNumPacketsReceived += src->receptionStatsDB().totNumPacketsReceived();
+ }
+
+ if (newTotNumPacketsReceived == totNumPacketsReceived) {
+ // No additional packets have been received since the last time we
+ // checked, so end this stream:
+ *env << "Closing session, because we stopped receiving packets.\n";
+ interPacketGapCheckTimerTask = NULL;
+ sessionAfterPlaying();
+ } else {
+ totNumPacketsReceived = newTotNumPacketsReceived;
+ // Check again, after the specified delay:
+ interPacketGapCheckTimerTask
+ = env->taskScheduler().scheduleDelayedTask(interPacketGapMaxTime*1000000,
+ (TaskFunc*)checkInterPacketGaps, NULL);
+ }
+}
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/MPEG2TransportStreamIndexer.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A program that reads an existing MPEG-2 Transport Stream file,
// and generates a separate index file that can be used - by our RTSP server
// implementation - to support 'trick play' operations when streaming the
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/openRTSP.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A RTSP client test program that opens a RTSP URL argument,
// and extracts the data from each incoming RTP stream.
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/playCommon.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A common framework, used for the "openRTSP" and "playSIP" applications
// Implementation
@@ -90,7 +90,7 @@
Boolean movieHeightOptionSet = False;
unsigned movieFPS = 15; // default
Boolean movieFPSOptionSet = False;
-char* fileNamePrefix = "";
+char const* fileNamePrefix = "";
unsigned fileSinkBufferSize = 20000;
unsigned socketInputBufferSize = 0;
Boolean packetLossCompensate = False;
@@ -984,8 +984,8 @@
struct timeval timeNow;
gettimeofday(&timeNow, NULL);
unsigned timeNowUSecs = timeNow.tv_sec*1000000 + timeNow.tv_usec;
- unsigned usecsToDelay = nextQOSMeasurementUSecs < timeNowUSecs ? 0
- : nextQOSMeasurementUSecs - timeNowUSecs;
+ unsigned usecsToDelay = nextQOSMeasurementUSecs - timeNowUSecs;
+ // Note: This works even when nextQOSMeasurementUSecs wraps around
qosMeasurementTimerTask = env->taskScheduler().scheduleDelayedTask(
usecsToDelay, (TaskFunc*)periodicQOSMeasurement, (void*)NULL);
@@ -1263,7 +1263,7 @@
struct timeval timeNow;
gettimeofday(&timeNow, NULL);
char timestampStr[100];
- sprintf(timestampStr, "%ld%03ld", timeNow.tv_sec, timeNow.tv_usec/1000);
+ sprintf(timestampStr, "%ld%03ld", timeNow.tv_sec, (long)(timeNow.tv_usec/1000));
*env << (syncStreams ? "Synchronized d" : "D")
<< "ata packets have begun arriving [" << timestampStr << "]\007\n";
return;
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/playCommon.hh
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A common framework, used for the "openRTSP" and "playSIP" applications
// Interfaces
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/playSIP.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A SIP client test program that opens a SIP URL argument,
// and extracts the data from each incoming RTP stream.
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/sapWatch.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A program that receives and prints SDP/SAP announcements
// (on the default SDP/SAP directory: 224.2.127.254/9875)
@@ -32,7 +32,7 @@
// Create a 'groupsock' for the input multicast group,port:
- char* sessionAddressStr = "224.2.127.254";
+ char const* sessionAddressStr = "224.2.127.254";
struct in_addr sessionAddress;
sessionAddress.s_addr = our_inet_addr(sessionAddressStr);
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testAMRAudioStreamer.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that reads an AMR audio file (as defined in RFC 3267)
// and streams it using RTP
// main program
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testGSMStreamer.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that streams GSM audio via RTP/RTCP
// main program
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testMP3Receiver.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that receives a RTP/RTCP multicast MP3 stream,
// and outputs the resulting MP3 file stream to 'stdout'
// main program
@@ -54,7 +54,7 @@
// A real file name could have been used instead.
// Create 'groupsocks' for RTP and RTCP:
- char* sessionAddressStr
+ char const* sessionAddressStr
#ifdef USE_SSM
= "232.255.42.42";
#else
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testMP3Streamer.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that streams a MP3 file via RTP/RTCP
// main program
@@ -67,7 +67,7 @@
env = BasicUsageEnvironment::createNew(*scheduler);
// Create 'groupsocks' for RTP and RTCP:
- char* destinationAddressStr
+ char const* destinationAddressStr
#ifdef USE_SSM
= "232.255.42.42";
#else
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testMPEG1or2AudioVideoStreamer.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that reads a MPEG-1 or 2 Program Stream file,
// splits it into Audio and Video Elementary Streams,
// and streams both using RTP
@@ -55,7 +55,7 @@
env = BasicUsageEnvironment::createNew(*scheduler);
// Create 'groupsocks' for RTP and RTCP:
- char* destinationAddressStr
+ char const* destinationAddressStr
#ifdef USE_SSM
= "232.255.42.42";
#else
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testMPEG1or2AudioVideoToDarwin.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that reads a MPEG-1 or 2 Program Stream file,
// splits it into Audio and Video Elementary Streams,
// and streams both using RTP, through a remote Darwin Streaming Server.
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testMPEG1or2ProgramToTransportStream.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A program that converts a MPEG-1 or 2 Program Stream file into
// a Transport Stream file.
// main program
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testMPEG1or2Splitter.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that splits a MPEG-1 or 2 Program Stream file into
// video and audio output files.
// main program
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testMPEG1or2VideoReceiver.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that receives a RTP/RTCP multicast MPEG video stream,
// and outputs the resulting MPEG file stream to 'stdout'
// main program
@@ -49,7 +49,7 @@
// A real file name could have been used instead.
// Create 'groupsocks' for RTP and RTCP:
- char* sessionAddressStr
+ char const* sessionAddressStr
#ifdef USE_SSM
= "232.255.42.42";
#else
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testMPEG1or2VideoStreamer.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that reads a MPEG-1 or 2 Video Elementary Stream file,
// and streams it using RTP
// main program
@@ -58,7 +58,7 @@
env = BasicUsageEnvironment::createNew(*scheduler);
// Create 'groupsocks' for RTP and RTCP:
- char* destinationAddressStr
+ char const* destinationAddressStr
#ifdef USE_SSM
= "232.255.42.42";
#else
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testMPEG2TransportStreamTrickPlay.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A program that tests 'trick mode' operations on a MPEG-2 Transport Stream file,
// by generating a new Transport Stream file that represents the result of the
// 'trick mode' operation (seeking and/or fast forward/reverse play).
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testMPEG2TransportStreamer.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that reads a MPEG-2 Transport Stream file,
// and streams it using RTP
// main program
@@ -51,7 +51,7 @@
env = BasicUsageEnvironment::createNew(*scheduler);
// Create 'groupsocks' for RTP and RTCP:
- char* destinationAddressStr
+ char const* destinationAddressStr
#ifdef USE_SSM
= "232.255.42.42";
#else
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testMPEG4VideoStreamer.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that reads a MPEG-4 Video Elementary Stream file,
// and streams it using RTP
// main program
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testMPEG4VideoToDarwin.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that reads a MPEG-4 Video Elementary Stream file,
// and streams both using RTP, through a remote Darwin Streaming Server.
// main program
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testOnDemandRTSPServer.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that demonstrates how to stream - via unicast RTP
// - various kinds of file on demand, using a built-in RTSP server.
// main program
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testRelay.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that receives a UDP multicast stream
// and retransmits it to another (multicast or unicast) address & port
// main program
@@ -33,7 +33,7 @@
env = BasicUsageEnvironment::createNew(*scheduler);
// Create a 'groupsock' for the input multicast group,port:
- char* inputAddressStr
+ char const* inputAddressStr
#ifdef USE_SSM
= "232.255.42.42";
#else
@@ -61,7 +61,7 @@
// Create a 'groupsock' for the destination address and port:
- char* outputAddressStr = "239.255.43.43"; // this could also be unicast
+ char const* outputAddressStr = "239.255.43.43"; // this could also be unicast
// Note: You may change "outputAddressStr" to use a different multicast
// (or unicast address), but do *not* change it to use the same multicast
// address as "inputAddressStr".
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/testWAVAudioStreamer.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that streams a WAV audio file via RTP/RTCP
// main program
@@ -86,7 +86,7 @@
// Add in any filter necessary to transform the data prior to streaming.
// (This is where any audio compression would get added.)
- char* mimeType;
+ char const* mimeType;
unsigned char payloadFormatCode;
if (bitsPerSample == 16) {
#ifdef CONVERT_TO_ULAW
|
[-]
[+]
|
Changed |
live.2009.07.09.tar.bz2/testProgs/vobStreamer.cpp
^
|
@@ -13,7 +13,7 @@
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
-// Copyright (c) 1996-2008, Live Networks, Inc. All rights reserved
+// Copyright (c) 1996-2009, Live Networks, Inc. All rights reserved
// A test program that reads a VOB file
// splits it into Audio (AC3) and Video (MPEG) Elementary Streams,
// and streams both using RTP.
|