Commit edd2190a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

v4l2: radio: measure time from start (refs #7400)

parent 93d4bf96
......@@ -34,10 +34,13 @@ struct demux_sys_t
{
int fd;
vlc_v4l2_ctrl_t *controls;
mtime_t start;
};
static int RadioControl (demux_t *demux, int query, va_list args)
{
demux_sys_t *sys = demux->p_sys;
switch (query)
{
case DEMUX_CAN_PAUSE:
......@@ -52,7 +55,7 @@ static int RadioControl (demux_t *demux, int query, va_list args)
break;
case DEMUX_GET_TIME:
*va_arg (args, int64_t *) = mdate ();
*va_arg (args, int64_t *) = mdate () - sys->start;
break;
/* TODO implement others */
......@@ -96,6 +99,7 @@ int RadioOpen (vlc_object_t *obj)
sys->fd = fd;
sys->controls = ControlsInit (VLC_OBJECT(demux), fd);
sys->start = mdate ();
demux->p_sys = sys;
demux->pf_demux = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment