[vlc-devel] Kasenna GET_PARAMETER support

Glen Gray glen at lincor.com
Thu Nov 10 19:35:57 CET 2005

This is a somewhat hacky utilization of a potentially very useful 
feature. But I thought I'd throw it out here for some feedback on how 
best to do it correctly (Derk-jan and I spoke about it briefly but I was 
under too much time pressure to do what he really wanted, so now's the 
chance to get it right!!).

Kasenna has a GET_PARAMETER capability that I've enabled via liveMedia 
(patch accepted on 2005.10.23). If you pass in a string "position" the 
Kaenna will return position: <time> where time is the current time index 
in seconds of the stream.

I've added an rc interface to this "server_position". Passing that in 
will trigger some callbacks and get the request sent and result 
recieved. Originally I'd it doing the return path properly with 
callbacks once the server responded. However, due to the nature of our 
application wrapping the rc interface to control vlc, it was easier to 
have the rc command not return until the value changed or a timeout 
happened. So that's why there's a not very nice while/usleep loop in 
there. Very specific to our usage.

The capability is also put to use in the SET_RATE capability added by my 
previous trickplay patch. After the pause happens, but before the play 
with scale value, I get the current position from the server and use 
that as the npt start time.

Derk-Jan suggested setting the pcr values so that GET_TIME returns an 
accurate value. Currently it always seems to return 0 (as he explained, 
the UDP data has no timestamps, so the pts that liveMedia gives over is 
always 0). GET_TIME however is called in quite a tight loop, so only 
periodically updating the value is advisable. I did have this working 
and updating the pcr's every 10 seconds or so. The values seemed to get 
out sync badly though and I didn't have time to resolve it. I'll try and 
get to this shortly as it wasn't much of a change.

Glen Gray <glen at lincor.com>              Digital Depot, Thomas Street
Senior Software Engineer                            Dublin 8, Ireland
Lincor Solutions Ltd.                          Ph: +353 (0) 1 4893682

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kasenna_get_parameter-20051021.diff
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20051110/d7b764c1/attachment.ksh>

More information about the vlc-devel mailing list