Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
a238f869
Commit
a238f869
authored
Jan 04, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Contribs - live, less patches...
parent
891719b5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
360 deletions
+1
-360
extras/contrib/src/Makefile
extras/contrib/src/Makefile
+1
-7
extras/contrib/src/Patches/live-config.patch
extras/contrib/src/Patches/live-config.patch
+0
-54
extras/contrib/src/Patches/live-starttime.patch
extras/contrib/src/Patches/live-starttime.patch
+0
-160
extras/contrib/src/Patches/live.patch
extras/contrib/src/Patches/live.patch
+0
-139
No files found.
extras/contrib/src/Makefile
View file @
a238f869
...
...
@@ -1226,18 +1226,12 @@ live555-$(LIVEDOTCOM_VERSION).tar.gz:
live
:
live555-$(LIVEDOTCOM_VERSION).tar.gz
$(EXTRACT_GZ)
# patch -p0 < Patches/live.patch
ifdef
HAVE_DARWIN_OS
patch
-p0
<
Patches/live-osx.patch
endif
patch
-p0
<
Patches/live-starttime.patch
#Still needed
(cd
live/liveMedia/include;
\
mv
liveMedia_version.hh
liveMedia_version.hh.bak;
\
sed
-e
's/.*LIVEMEDIA_LIBRARY_VERSION_INT.*/#define LIVEMEDIA_LIBRARY_VERSION_INT 9999999999/'
liveMedia_version.hh.bak
>
liveMedia_version.hh
)
patch
-Np0
<
Patches/live-config.patch
ifdef
HAVE_UCLIBC
patch
-p0
<
Patches/live-noapps.patch
endif
.live
:
live
ifdef
HAVE_WIN32
...
...
extras/contrib/src/Patches/live-config.patch
View file @
a238f869
diff -Nur live.orig/config.armeb-uclibc live/config.armeb-uclibc
--- live.orig/config.armeb-uclibc 1970-01-01 01:00:00.000000000 +0100
+++ live/config.armeb-uclibc 2007-09-17 01:49:49.000000000 +0200
@@ -0,0 +1,18 @@
+CROSS_COMPILE= armeb-linux-uclibc-
+COMPILE_OPTS = $(INCLUDES) -I. -Os -DSOCKLEN_T=socklen_t -DNO_STRSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DUSE_SYSTEM_RANDOM=1
+C = c
+C_COMPILER = $(CROSS_COMPILE)gcc
+C_FLAGS = $(COMPILE_OPTS)
+CPP = cpp
+CPLUSPLUS_COMPILER = $(CROSS_COMPILE)g++
+CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1
+OBJ = o
+LINK = $(CROSS_COMPILE)gcc -o
+LINK_OPTS = -L.
+CONSOLE_LINK_OPTS = $(LINK_OPTS)
+LIBRARY_LINK = $(CROSS_COMPILE)ld -o
+LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic
+LIB_SUFFIX = a
+LIBS_FOR_CONSOLE_APPLICATION =
+LIBS_FOR_GUI_APPLICATION =
+EXE =
diff -Nur live.orig/config.armlinux live/config.armlinux
--- live.orig/config.armlinux 2007-08-03 18:38:58.000000000 +0200
+++ live/config.armlinux 2007-09-17 01:50:22.000000000 +0200
@@ -1,5 +1,5 @@
CROSS_COMPILE= arm-elf-
-COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_STRSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
+COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_STRSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DUSE_SYSTEM_RANDOM=1
C = c
C_COMPILER = $(CROSS_COMPILE)gcc
C_FLAGS = $(COMPILE_OPTS)
diff -Nur live.orig/config.armlinux.orig live/config.armlinux.orig
--- live.orig/config.armlinux.orig 1970-01-01 01:00:00.000000000 +0100
+++ live/config.armlinux.orig 2007-08-03 18:38:58.000000000 +0200
@@ -0,0 +1,18 @@
+CROSS_COMPILE= arm-elf-
+COMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_STRSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64
+C = c
+C_COMPILER = $(CROSS_COMPILE)gcc
+C_FLAGS = $(COMPILE_OPTS)
+CPP = cpp
+CPLUSPLUS_COMPILER = $(CROSS_COMPILE)gcc
+CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1
+OBJ = o
+LINK = $(CROSS_COMPILE)gcc -o
+LINK_OPTS = -L.
+CONSOLE_LINK_OPTS = $(LINK_OPTS)
+LIBRARY_LINK = $(CROSS_COMPILE)ld -o
+LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic
+LIB_SUFFIX = a
+LIBS_FOR_CONSOLE_APPLICATION =
+LIBS_FOR_GUI_APPLICATION =
+EXE =
diff -Nur live.orig/config.armlinux.rej live/config.armlinux.rej
--- live.orig/config.armlinux.rej 1970-01-01 01:00:00.000000000 +0100
+++ live/config.armlinux.rej 2007-09-17 01:49:49.000000000 +0200
...
...
extras/contrib/src/Patches/live-starttime.patch
deleted
100644 → 0
View file @
891719b5
diff -ruN live.orig/liveMedia/MediaSession.cpp live/liveMedia/MediaSession.cpp
--- live.orig/liveMedia/MediaSession.cpp 2007-01-17 21:44:26.000000000 +0100
+++ live/liveMedia/MediaSession.cpp 2007-01-22 22:17:54.000000000 +0100
@@ -61,7 +61,7 @@
MediaSession::MediaSession(UsageEnvironment& env)
: Medium(env),
fSubsessionsHead(NULL), fSubsessionsTail(NULL),
- fConnectionEndpointName(NULL), fMaxPlayEndTime(0.0f),
+ fConnectionEndpointName(NULL), fMaxPlayStartTime(0.0f), fMaxPlayEndTime(0.0f),
fScale(1.0f), fMediaSessionType(NULL), fSessionName(NULL), fSessionDescription(NULL) {
#ifdef SUPPORT_REAL_RTSP
RealInitSDPAttributes(this);
@@ -348,8 +348,8 @@
return parseSuccess;
}
-static Boolean parseRangeAttribute(char const* sdpLine, float& endTime) {
- return sscanf(sdpLine, "a=range: npt = %*g - %g", &endTime) == 1;
+static Boolean parseRangeAttribute(char const* sdpLine, float& startTime, float& endTime) {
+ return sscanf(sdpLine, "a=range: npt = %g - %g", &startTime, &endTime) == 2;
}
Boolean MediaSession::parseSDPAttribute_range(char const* sdpLine) {
@@ -357,9 +357,13 @@
// (Later handle other kinds of "a=range" attributes also???#####)
Boolean parseSuccess = False;
+ float playStartTime;
float playEndTime;
- if (parseRangeAttribute(sdpLine, playEndTime)) {
+ if (parseRangeAttribute(sdpLine, playStartTime, playEndTime)) {
parseSuccess = True;
+ if (playStartTime != fMaxPlayStartTime && playStartTime >= 0.0f) {
+ fMaxPlayStartTime = playStartTime;
+ }
if (playEndTime > fMaxPlayEndTime) {
fMaxPlayEndTime = playEndTime;
}
@@ -526,7 +530,7 @@
fSizelength(0), fStreamstateindication(0), fStreamtype(0),
fCpresent(False), fRandomaccessindication(False),
fConfig(NULL), fMode(NULL), fSpropParameterSets(NULL),
- fPlayEndTime(0.0),
+ fPlayStartTime(0.0), fPlayEndTime(0.0),
fVideoWidth(0), fVideoHeight(0), fVideoFPS(0), fNumChannels(1), fScale(1.0f),
fRTPSocket(NULL), fRTCPSocket(NULL),
fRTPSource(NULL), fRTCPInstance(NULL), fReadSource(NULL) {
@@ -548,6 +552,12 @@
#endif
}
+float MediaSubsession::playStartTime() const {
+ if (fPlayStartTime > 0) return fPlayStartTime;
+
+ return fParent.playStartTime();
+}
+
float MediaSubsession::playEndTime() const {
if (fPlayEndTime > 0) return fPlayEndTime;
@@ -967,9 +977,16 @@
// (Later handle other kinds of "a=range" attributes also???#####)
Boolean parseSuccess = False;
+ float playStartTime;
float playEndTime;
- if (parseRangeAttribute(sdpLine, playEndTime)) {
+ if (parseRangeAttribute(sdpLine, playStartTime, playEndTime)) {
parseSuccess = True;
+ if (playStartTime != fPlayStartTime && playStartTime >= 0.0f ) {
+ fPlayStartTime = playStartTime;
+ if (playStartTime != fParent.playStartTime()) {
+ fParent.playStartTime() = playStartTime;
+ }
+ }
if (playEndTime > fPlayEndTime) {
fPlayEndTime = playEndTime;
if (playEndTime > fParent.playEndTime()) {
diff -ruN live.orig/liveMedia/RTSPClient.cpp live/liveMedia/RTSPClient.cpp
--- live.orig/liveMedia/RTSPClient.cpp 2007-01-22 22:17:46.000000000 +0100
+++ live/liveMedia/RTSPClient.cpp 2007-01-22 22:21:12.000000000 +0100
@@ -1128,7 +1128,8 @@
nextLineStart = getLine(lineStart);
- if (parseScaleHeader(lineStart, session.scale())) break;
+ if( parseScaleHeader(lineStart, session.scale())) continue;
+ if( parseRangeHeader(lineStart, session.playStartTime(), session.playEndTime()) ) continue;
}
if (fTCPStreamIdCount == 0) { // we're not receiving RTP-over-TCP
@@ -1229,6 +1230,7 @@
continue;
}
if (parseScaleHeader(lineStart, subsession.scale())) continue;
+ //if (parseRangeHeader(lineStart, subsession.playStartTime(), subsession.playEndTime())) continue;
}
delete[] cmd;
@@ -2287,6 +2289,14 @@
return radix_safe_sscanf(line, "%f", &scale) == 1;
}
+Boolean RTSPClient::parseRangeHeader(char const* line, float& start, float& end) {
+ if (_strncasecmp(line, "Range: ", 7) != 0) return False;
+ line += 7;
+ /* "npt=start-" is also valid */
+ Locale("C", LC_NUMERIC);
+ return (sscanf(line, "npt = %f - %f", &start, &end) >= 1);
+}
+
Boolean RTSPClient::parseGetParameterHeader(char const* line,
const char* param,
char*& value) {
diff -ruN live.orig/liveMedia/include/MediaSession.hh live/liveMedia/include/MediaSession.hh
--- live.orig/liveMedia/include/MediaSession.hh 2007-01-17 21:44:26.000000000 +0100
+++ live/liveMedia/include/MediaSession.hh 2007-01-22 22:20:30.000000000 +0100
@@ -39,6 +39,7 @@
MediaSession*& resultSession);
Boolean hasSubsessions() const { return fSubsessionsHead != NULL; }
+ float& playStartTime() { return fMaxPlayStartTime; }
float& playEndTime() { return fMaxPlayEndTime; }
char* connectionEndpointName() const { return fConnectionEndpointName; }
char const* CNAME() const { return fCNAME; }
@@ -97,6 +98,7 @@
// Fields set from a SDP description:
char* fConnectionEndpointName;
+ float fMaxPlayStartTime;
float fMaxPlayEndTime;
struct in_addr fSourceFilterAddr; // used for SSM
float fScale; // set from a RTSP "Scale:" header
@@ -147,6 +149,7 @@
// This is the source that client sinks read from. It is usually
// (but not necessarily) the same as "rtpSource()"
+ float playStartTime() const;
float playEndTime() const;
Boolean initiate(int useSpecialRTPoffset = -1);
@@ -268,6 +271,7 @@
Boolean fCpresent, fRandomaccessindication;
char *fConfig, *fMode, *fSpropParameterSets;
+ float fPlayStartTime;
float fPlayEndTime;
unsigned short fVideoWidth, fVideoHeight;
// screen dimensions (set by an optional a=x-dimensions: <w>,<h> line)
diff -ruN live.orig/liveMedia/include/RTSPClient.hh live/liveMedia/include/RTSPClient.hh
--- live.orig/liveMedia/include/RTSPClient.hh 2007-01-17 21:44:26.000000000 +0100
+++ live/liveMedia/include/RTSPClient.hh 2007-01-22 22:17:54.000000000 +0100
@@ -185,6 +185,7 @@
Boolean parseRTPInfoHeader(char const* line, unsigned& trackId,
u_int16_t& seqNum, u_int32_t& timestamp);
Boolean parseScaleHeader(char const* line, float& scale);
+ Boolean parseRangeHeader(char const* line, float& start, float& end);
Boolean parseGetParameterHeader(char const* line,
const char* param,
char*& value);
extras/contrib/src/Patches/live.patch
deleted
100644 → 0
View file @
891719b5
diff -ru live/groupsock/Groupsock.cpp live-patched/groupsock/Groupsock.cpp
--- live/groupsock/Groupsock.cpp Thu Nov 6 03:53:15 2003
+++ live-patched/groupsock/Groupsock.cpp Sun Dec 7 21:30:15 2003
@@ -26,7 +26,7 @@
#if defined(__WIN32__) || defined(_WIN32)
#include <strstrea.h>
#else
-#include <strstream.h>
+#include <strstream>
#endif
#include <stdio.h>
diff -ru live/groupsock/NetInterface.cpp live-patched/groupsock/NetInterface.cpp
--- live/groupsock/NetInterface.cpp Thu Nov 6 03:53:15 2003
+++ live-patched/groupsock/NetInterface.cpp Sun Dec 7 21:30:30 2003
@@ -24,7 +24,7 @@
#if defined(__WIN32__) || defined(_WIN32)
#include <strstrea.h>
#else
-#include <strstream.h>
+#include <strstream>
#endif
////////// NetInterface //////////
--- live/liveMedia/RTSPClient.cpp 2007-04-24 11:38:22.000000000 +0200
+++ live-patched/liveMedia/RTSPClient.cpp 2007-04-26 15:19:54.000000000 +0200
@@ -21,13 +21,53 @@
#include "RTSPClient.hh"
#include "RTSPCommon.hh"
#include "Base64.hh"
-#include "Locale.hh"
#include <GroupsockHelper.hh>
#include "our_md5.h"
#ifdef SUPPORT_REAL_RTSP
#include "../RealRTSP/include/RealRTSP.hh"
#endif
+#include <locale.h>
+#include <stdarg.h>
+/* Radix safe (always uses .) printf and friends */
+int radix_safe_sprintf( char *str, const char *format, ...)
+{
+ va_list args;
+ int result = 0;
+ char *locale = NULL;
+
+ locale = strDup( setlocale( LC_NUMERIC, NULL ) );
+ setlocale( LC_NUMERIC, "C" );
+
+ va_start( args, format );
+ result = vsprintf(str, format, args );
+ va_end( args );
+
+ setlocale( LC_NUMERIC, locale );
+ delete[] locale;
+
+ return result;
+}
+
+int radix_safe_sscanf( const char *str, const char *format, ...)
+{
+ va_list args;
+ int result = 0;
+ char *locale = NULL;
+
+ locale = strDup( setlocale( LC_NUMERIC, NULL ) );
+ setlocale( LC_NUMERIC, "C" );
+
+ va_start( args, format );
+ result = vsscanf(str, format, args );
+ va_end( args );
+
+ setlocale( LC_NUMERIC, locale );
+ delete[] locale;
+
+ return result;
+}
+
////////// RTSPClient //////////
RTSPClient* RTSPClient::createNew(UsageEnvironment& env,
@@ -989,8 +1029,7 @@
// This is the default value; we don't need a "Scale:" header:
buf[0] = '\0';
} else {
- Locale("POSIX", LC_NUMERIC);
- sprintf(buf, "Scale: %f\r\n", scale);
+ radix_safe_sprintf(buf, "Scale: %f\r\n", scale);
}
return strDup(buf);
@@ -1003,12 +1042,10 @@
buf[0] = '\0';
} else if (end < 0) {
// There's no end time:
- Locale("POSIX", LC_NUMERIC);
- sprintf(buf, "Range: npt=%.3f-\r\n", start);
+ radix_safe_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("POSIX", LC_NUMERIC);
- sprintf(buf, "Range: npt=%.3f-%.3f\r\n", start, end);
+ radix_safe_sprintf(buf, "Range: npt=%.3f-%.3f\r\n", start, end);
}
return strDup(buf);
@@ -2246,8 +2283,7 @@
if (_strncasecmp(line, "Scale: ", 7) != 0) return False;
line += 7;
- Locale("POSIX", LC_NUMERIC);
- return sscanf(line, "%f", &scale) == 1;
+ return radix_safe_sscanf(line, "%f", &scale) == 1;
}
Boolean RTSPClient::parseGetParameterHeader(char const* line,
--- live/liveMedia/RTSPClient.cpp 2007-04-28 16:02:39.000000000 +0200
+++ live-patched/liveMedia/RTSPClient.cpp 2007-12-10 10:42:00.000000000 +0100
@@ -2074,7 +2076,8 @@
Boolean RTSPClient::getResponse(char con
unsigned RTSPClient::getResponse1(char*& responseBuffer,
unsigned responseBufferSize) {
struct sockaddr_in fromAddress;
-
+ struct timeval timeout;
+
if (responseBufferSize == 0) return 0; // just in case...
responseBuffer[0] = '\0'; // ditto
@@ -2084,7 +2087,9 @@
unsigned RTSPClient::getResponse1(char*&
Boolean success = False;
while (1) {
unsigned char firstByte;
- if (readSocket(envir(), fInputSocketNum, &firstByte, 1, fromAddress)
+ timeout.tv_sec = 30;
+ timeout.tv_usec = 0;
+ if (readSocket(envir(), fInputSocketNum, &firstByte, 1, fromAddress, &timeout)
!= 1) break;
if (firstByte != '$') {
// Normal case: This is the start of a regular response; use it:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment