#18055 new Bugs

SetSpeed and SetDemuxSpeed function api not call

Reported by: vmjuidiaz Owned by: FernetMenta
Priority: 4 - Normal
Component: Video playback (inc. audio in video and codecs) Version: 18.0 "Leia" Beta3
Severity: Normal Keywords:
Cc: Blocked By:
Blocking: Platform: All

Description (last modified by vmjuidiaz)

The SetSpeed and DemuxSetSpeed functions of the api inputstream and pvr api are not being called when there is a variation of speed and demux is used. Only functions seek and postime functions are called.

Change History (16)

comment:1 Changed at 2018-09-24T13:33:01+01:00 by vmjuidiaz

  • Description modified (diff)

comment:2 Changed at 2018-09-24T13:35:39+01:00 by ksooo

  • Cc FernetMenta added
  • Component changed from PVR (Personal Video Recoder) - core components to Video playback (inc. audio in video and codecs)
  • Owner changed from ksooo to FernetMenta

comment:3 Changed at 2018-09-24T13:36:06+01:00 by ksooo

  • Cc FernetMenta removed

comment:4 Changed at 2018-09-24T15:35:20+01:00 by FernetMenta

Works as designed. Demuxer is only set to pause, if player does not need more data.

comment:5 Changed at 2018-09-24T16:25:10+01:00 by vmjuidiaz

It means that the PVR and inputstream functions:

xbmc_pvr_dll.h

void SetSpeed(int speed);

kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h

virtual void DemuxSetSpeed(int speed) { }

They will not be called again from the leia version?

My PVR provider uses the RTSP protocol and the speed must be sent to the video server to forward.

When a recording is being displayed if the speed is changed the function in the the PVR addon or the inputstream is not call.
In the Krypton version or early this functions was call.

comment:6 Changed at 2018-09-24T17:01:58+01:00 by FernetMenta

Krypton was wrong in this regard. The design goal of this method was to pause the demuxer when demuxer queue is full. When player is paused and queue is not full, demuxer continues to read data. Some PVR addons abused this method.

Why don't you request the stream always with maximum available speed and pause it when player calls SetSpeed(0)?

comment:7 Changed at 2018-09-24T17:14:50+01:00 by vmjuidiaz

the problem isn´t with the pause, this case is ok.

But if the speed set to x2 or x4 ... the function SetSpeed(2000) or SetSpeed(4000) isn´t call.

This occours for DemuxSetSpeed function too

comment:8 Changed at 2018-09-24T17:22:26+01:00 by FernetMenta

Why don't you request the stream always with maximum available speed and pause it when player calls SetSpeed(0)?

No need to set speed on demuxer. You always read as fast as possible.

comment:9 Changed at 2018-09-24T17:32:20+01:00 by vmjuidiaz

This is only valid by the file streams.

In my case the stream is a RTSP, the speed is set in the server (movistarTV).

The data flow is always the same.

This has always worked like this (jarvis, Krypton), why change it now?

Why not call the function when the speed is changed, with the new speed?

comment:10 Changed at 2018-09-24T17:36:42+01:00 by FernetMenta

I already told the the reason. If you implement your demuxer correctly, you only need to act on SetSpeed(0), SetSpeed(1000)

comment:11 Changed at 2018-09-24T17:42:54+01:00 by vmjuidiaz

When the data flow is established by the provider's server, reading a udp multicast sequence faster does not make the video advance faster.

The only way to vary the speed is to communicate to the server of the supplier that change of speed and continue with the same flow (speed kb / s) but adapting the frames to the requested speed (skipping frames).

The problem is not the demuxer, but to establish the speed of the data source.

comment:12 Changed at 2018-09-24T17:49:40+01:00 by FernetMenta

In you current code you request the service to deliver the stream faster on SetSpeed(4000), right?

Now try setting the speed to the maximum. Kodi will read and buffer the stream until its queue is full. Then it calls SetSpeed(0). Now tell the server to pause the stream (you do this already). When player wants data again, it calls SetSpeed(1000). Request server to deliver in maximum speed. This way player can go any speed between 0 and max. demuxer works like an on/off controller.

comment:13 Changed at 2018-09-24T17:56:53+01:00 by vmjuidiaz

when I set the speed x4 the RTSP server is not to increase the flow but to maintain the same speed (10 Mb / s) as when its speed is x1.

What the server does is, to maintain the flow (10 Mb / s) is to suppress frames of the video.

What would happen is that I would see the image jumping 4 in 4 seconds.

comment:14 Changed at 2018-09-24T17:59:59+01:00 by FernetMenta

Now I got it. I'll see what I can do for this case.

comment:15 Changed at 2018-09-24T18:08:59+01:00 by vmjuidiaz

Thank you.

Note: See TracTickets for help on using tickets.