Keyboard-controlled fast seeking broken

Started by zylantha, July 22, 2012, 06:38:05 AM

Previous topic - Next topic

zylantha

The code for fast keyboard navigation through the media file is not currently working, i.e. in QT4 Q_gui2.cpp there is code for:
                                        case Qt::Key_Left:
                                                if (keyEvent->modifiers() == Qt::ShiftModifier)
                                                        HandleAction(ACT_Back25Frames);
                                                else if (keyEvent->modifiers() == Qt::ControlModifier)
                                                        HandleAction(ACT_Back50Frames);
                                                else
                                                        HandleAction(ACT_PreviousFrame);

                                                return true;

and similarly for forward, however these do not currently work.  Is there an easy answer 'why' and how to fix it?  I am trying to get it working again as this functionality is essential for my workflow and migration to 2.6.

From what I can tell, it seems as though this code is never executed, and that keyboard events are now handled somewhere else that I am yet to find.

mean

2.5 was thinking in  # of frames
2.6 is thinking in time

So that part has to be adapted and 50frame forward replaced by 0.5 sec etc..

zylantha

Thanks mean

After an afternoon of tinkering, I've made a bunch of changes that have this seeking functionality adapted to equivalent time-based notion, and it looks to be working properly now.

Modified files are attached.

Nb: I have also removed some warning messages that shouldn't be there (PrevFrame failures - which are typically because you're at the beginning of the file) and hacked the 'End' seek because it was also failing ... there is undoubtedly a better way of doing this..

mean


zylantha

Thanks mean

Further update with additional keyboard shortcuts for jumping to beginning and end markers ...

Jan Gruuthuse

#5
Quote from: zylanthaI've made a bunch of changes that have this seeking functionality adapted to equivalent time-based notion, and it looks to be working properly now.
Quote from: meanCommited, thanks a lot



goto end and beginning works now without the errors, trying to pass beyond these, in mpeg-ts streams.

thank you both

zylantha

The fix for 'go to end' was a bit of a hack.  Hell it was a lot of a hack ... it doesn't actually go quite all the way to the end.  I just subtracted enough time off the video duration to stop the error message appearing - once you do go to the end, you can still keep framing forward a little - not much, in my case it seems to only be 10 frames or so. 

There is to bound to be a better way to do this, but at least it works now.

Jan Gruuthuse

Is it some how possible this hack is no longer working/enabled/... in the 2.6?