[vlc-devel] [PATCH 1/1] Supporting ONVIF PRofile-G recording playback

David R. Robison david.robison at openroadsconsulting.com
Wed Aug 6 15:45:38 CEST 2014


OK, so what if I create a new media_player function called 
libvlc_media_player_set_time_base and create an input variable called 
"time-base". This value would normally be zero, which would cause all 
the existing code to work as is. In the case of live555 this will cause 
the "Range: ntp" header to be sent. However, if the value is non-zero, 
it will be interpreted as the absolute date/time (in Unix seconds) of 
the start of the presentation. Then the set_time and set_length will 
work the same but the "time" will be an offset from the "time-base". For 
the live555, this will cause the "Range: clock" header to be sent. It 
also means that the get_time calls will continue to work, returning the 
time offset from the "time-base". This will mean a new input variable 
called "time-base" and new DEMUX_SET_TIME_BASE and 
INPUT_CONTROL_SET_TIME_BASE control cases. Does this sound reasonable 
and better then my previous approach?
David

David R Robison
Open Roads Consulting, Inc.
103 Watson Road, Chesapeake, VA 23320
phone: (757) 546-3401
e-mail: david.robison at openroadsconsulting.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526

On 8/5/2014 8:11 AM, Rémi Denis-Courmont wrote:
> Le 2014-08-05 14:20, David R. Robison a écrit :
>> Thanks for the clarification, however, I still need to be able to
>> determine which sendPlayCommand signature to use. ONVIF requires the
>> "range: clock" header element rather than the "range: ntp" element.
>> One approach would be to determine if the "time" is being sent is in
>> absolute date/time (unix seconds). I could test the "time" variable
>> and if it is greater than 24*60*60 seconds then assume absolute time
>> is being sent and use the sendPlayCommand with the ISO 8601 formatted
>> times otherwise use the sendPlayCommand with doubles. This is a bit of
>> a kluge but may mean minimal changes to VLC. Any thoughts.
>
> If DEMUX_GET_TIME returns time with the same base, then there is no 
> need to define a new way to set time. You only need a way to select 
> the time base.
>



This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.
If you are not the intended recipient, please delete this email immediately.




More information about the vlc-devel mailing list