Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
97c45ff4
Commit
97c45ff4
authored
Oct 15, 2007
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backports [22276] : fix live555 compilation
parent
24158b6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
173 deletions
+4
-173
extras/contrib/src/Makefile
extras/contrib/src/Makefile
+4
-2
extras/contrib/src/Patches/live-starttime.patch
extras/contrib/src/Patches/live-starttime.patch
+0
-171
No files found.
extras/contrib/src/Makefile
View file @
97c45ff4
...
...
@@ -1078,8 +1078,10 @@ endif
ifdef
HAVE_DARWIN_OS
patch
-p0
< Patches/live-osx.patch
endif
patch
-p0
< Patches/live-starttime.patch
patch
-p0
< Patches/live-config.patch
(
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
...
...
extras/contrib/src/Patches/live-starttime.patch
deleted
100644 → 0
View file @
24158b6c
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 */
+ return radix_safe_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);
--- live/liveMedia/include/liveMedia_version.hh.orig 2007-05-24 22:44:37.000000000 +0200
+++ live/liveMedia/include/liveMedia_version.hh 2007-05-27 14:16:11.000000000 +0200
@@ -5,6 +5,6 @@
#define _LIVEMEDIA_VERSION_HH
#define LIVEMEDIA_LIBRARY_VERSION_STRING "2007.05.24"
-#define LIVEMEDIA_LIBRARY_VERSION_INT 1179964800
+#define LIVEMEDIA_LIBRARY_VERSION_INT 9999999999
#endif
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