Re: [vdr 2.3.9] Setting a mark is sluggish

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01.04.2018 19:01, Oliver Endriss wrote:
...
>> >> Does it make a difference whether the progress display is active or not
>> >> when you set the mark?
> > If the progress bar is off, and you set a mark, progress bar and
> mark show up immediately. -> No problem.

...
> Could it be that this action is triggered _before_ the mark has been
> written to the OSD buffer? In this case, the OSD would be displayed
> without the mark, and the mark would be displayed during the next
> cycle, i.e. one second later.

I doubt that.

Well, meanwhile I think you were right here.
In cReplayControl::MarkToggle() there is

  lastCurrent = -1; // triggers redisplay

which it used to do until the switch to GetFrameNumber() ;-).

Now this has no immediate effect any more, and that may explain
the sluggishness you observe.

Please try this:

--- menu.c      2018/03/24 11:43:40     4.70
+++ menu.c      2018/04/02 10:07:05
@@ -5728,7 +5728,7 @@
 bool cReplayControl::ShowProgress(bool Initial)
 {
   int Current, Total;
-  if (Initial || lastSpeed != -1 || time(NULL) - lastProgressUpdate >= 1) {
+  if (Initial || lastCurrent < 0 || lastSpeed != -1 || time(NULL) - lastProgressUpdate >= 1) {
      if (GetFrameNumber(Current, Total) && Total > 0) {
         if (!visible) {
            displayReplay = Skins.Current()->DisplayReplay(modeOnly);

I am pretty sure that something is wrong.
With the following (ugly) patch, the problem is gone:

--- vdr-2.3.9.org/menu.c	2018-03-18 13:01:09.000000000 +0100
+++ vdr-2.3.9/menu.c	2018-04-01 18:13:14.701413905 +0200
@@ -5726,7 +5726,19 @@ void cReplayControl::ShowMode(void)
  bool cReplayControl::ShowProgress(bool Initial)
  {
    int Current, Total;
+
+#if 1 // OE
+  static int count = 0;
+
+  if (lastProgressUpdate == 0)
+     count = 2; // 0/1: problem, 2: fixed
+  else if (count > 0)
+     count--;
+
+  if (Initial || lastSpeed != -1 || time(NULL) - lastProgressUpdate >= 1 || count > 0) {
+#else
    if (Initial || lastSpeed != -1 || time(NULL) - lastProgressUpdate >= 1) {
+#endif
       if (GetFrameNumber(Current, Total) && Total > 0) {
          if (!visible) {
             displayReplay = Skins.Current()->DisplayReplay(modeOnly);


All it does is executing the code in 'if (Initial...)' one more time,
after lastProgressUpdate has been set to 0.

Thanks for pointing this out. This triggered my idea with lastCurrent above.

Of course, it does not affect the 'jumping' progress bar. See below.
...
> Btw, with a short recording, you can see that the progress bar is
> jumping in one second steps...

That's pretty much the distance between the I-frames, and thus the steps in
which VDR updates the progress bar.

I don't care about I-frames. I use the cutter to produce small audio
or video clips. The current behavior of the progress bar is annoying,
when I play these clips. Anyway, I can easily revert the code to get
the old behavior.

Is the jumping mainly with radio recordings?
If so, that could be explained by the lastProgressUpdate timeout, because
in radio recordings every frame is considered to be an "I-frame", while
in video recordings I-frames are typically spaced 0.5 to 1 second.

Let's first see whether the above patch fixes your sluggish marks display,
and then continue with the jumping progress bar.

Klaus

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr




[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux