Hello,

I noticed the openRTSP testprog had support for absolute seek start time (-U option, "Range" header) but not for the absolute seek end time, but support for the end time was present in the rest of the code. I needed this for a small project I'm working on so I created this very minor patch against playCommon.cpp version 2014.01.13 which adds support for the absolute seek end time as well.
Thought I'd share it as it may be useful for someone.

Remarks:
- I got the source from the debian package currently available in jessie, not sure if this is the most recent? - I used command line argument -E since it seemed to still be free, not sure if this is ok? - I'm no c++ expert so code is provided without warranty, but changes are minor so I guess it should be ok.


Regards,
Hans


PATCH BELOW

$ diff liblivemedia-2014.01.13-orig/testProgs/playCommon.cpp liblivemedia-2014.01.13/testProgs/playCommon.cpp
83a84
> char* initialAbsoluteSeekEndTime = NULL;
137c138
< << " [-s <initial-seek-time>]|[-U <absolute-seek-time>] [-z <scale>] [-g user-agent]"
---
> << " [-s <initial-seek-time>]|[-U <absolute-seek-time>] [-E <absolute-seek-end-time>] [-z <scale>] [-g user-agent]"
485a487,492
>     case 'E': {
> // specify initial absolute seek END time (trick play), using a string of the form "YYYYMMDDTHHMMSSZ" or "YYYYMMDDTHHMMSS.<frac>Z"
>       initialAbsoluteSeekEndTime = argv[2];
>       ++argv; --argc;
>       break;
>     }
563a571,574
> if (initialAbsoluteSeekTime == NULL && initialAbsoluteSeekEndTime != NULL) {
>     *env << "The -E option requires the -U option!\n";
>     usage();
>   }
962a974
> char const* absEndTime = initialAbsoluteSeekEndTime != NULL ? initialAbsoluteSeekEndTime : session->absEndTime();
965c977
< startPlayingSession(session, absStartTime, session->absEndTime(), scale, continueAfterPLAY);
---
> startPlayingSession(session, absStartTime, absEndTime, scale, continueAfterPLAY);


_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to