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
4cf30b64
Commit
4cf30b64
authored
Feb 20, 2007
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
live-starttime.patch the patch needs latest live555 source code.
parent
5c65448e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
162 additions
and
0 deletions
+162
-0
extras/contrib/src/Makefile
extras/contrib/src/Makefile
+2
-0
extras/contrib/src/Patches/live-starttime.patch
extras/contrib/src/Patches/live-starttime.patch
+160
-0
No files found.
extras/contrib/src/Makefile
View file @
4cf30b64
...
...
@@ -1080,6 +1080,7 @@ endif
ifdef
HAVE_DARWIN_OS
patch
-p0
< Patches/live-osx.patch
endif
patch
-p0
< Patches/live-starttime.patch
.live
:
live
ifdef
HAVE_WIN32
...
...
@@ -1565,6 +1566,7 @@ libraw1394: libraw1394-$(LIBRAW1394_VERSION).tar.gz
.libraw1394
:
libraw1394
(
cd
$<
;
./configure
--prefix
=
$(PREFIX)
&&
make
&&
make
DESTDIR
=
$(PRFIX)
install
)
# sed 's/^typedef u_int8_t byte_t;/\/* typedef u_int8_t byte_t;\*\//'
touch
$@
CLEAN_file
+=
.libraw1394
...
...
extras/contrib/src/Patches/live-starttime.patch
0 → 100644
View file @
4cf30b64
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);
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