Merge lp:~darkcs2/audience/fix-1163909 into lp:~audience-members/audience/trunk

Proposed by Dark_Cs
Status: Merged
Merged at revision: 382
Proposed branch: lp:~darkcs2/audience/fix-1163909
Merge into: lp:~audience-members/audience/trunk
Diff against target: 63 lines (+36/-4)
2 files modified
Audience/Audience.vala (+15/-4)
Audience/Widgets/VideoPlayer.vala (+21/-0)
To merge this branch: bzr merge lp:~darkcs2/audience/fix-1163909
Reviewer Review Type Date Requested Status
Cody Garver Approve
Review via email: mp+158975@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Cody Garver (codygarver) wrote :

Split up the fixes 1 branch per fix.

I disapprove the window title changes because we intentionally replace dots and underscores and the like with spaces.

review: Needs Fixing
Revision history for this message
Cody Garver (codygarver) wrote :

And the typo has already been fixed in trunk it's just stuck updating for some reason.

Revision history for this message
Volodymyr Shatsky (shockone89) wrote :

I would also like to discuss the distance of jumps. Usually I want to rewind when I missed something, so 60 seconds are too long and 3 are too short. I suggest to make asymmetric jumps — 10 and 30 seconds for back and forth accordingly.

The solution I always dreamed about is to rewind to the beginning of the current scene, how hard is it to implement?

lp:~darkcs2/audience/fix-1163909 updated
262. By Dark_Cs

fix: time jumps with arrows (3 seconds / 60 with Ctrl)

Revision history for this message
Cody Garver (codygarver) wrote :

I don't think scene detection is feasible because it's CPU intensive and would add loading time before a video can start playing. We should see what the other video players out there are using for skip time.

Revision history for this message
Dark_Cs (darkcs2) wrote :

For example, PotPlayer uses 5 seconds for a short jump and 30 with Ctrl. The KMPlayer uses the same settings. I think that this property should be configurable by user.

p.s. What IDE do you use to development and debug? It is difficult to test the program without debugging.

Revision history for this message
Cody Garver (codygarver) wrote :

Merged a slightly modified version of this at revision 382

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Audience/Audience.vala'
--- Audience/Audience.vala 2013-04-13 20:13:03 +0000
+++ Audience/Audience.vala 2013-04-15 17:37:26 +0000
@@ -242,13 +242,24 @@
242 mainwindow.destroy ();242 mainwindow.destroy ();
243 break;243 break;
244 case Gdk.Key.Left:244 case Gdk.Key.Left:
245 if ((video_player.progress - 0.05) < 0)245 if ((e.state & Gdk.ModifierType.CONTROL_MASK) != Gdk.ModifierType.CONTROL_MASK)
246 video_player.progress = 0.0;246 {
247 video_player.rewind_seconds (-3);
248 }
247 else249 else
248 video_player.progress -= 0.05;250 {
251 video_player.rewind_seconds (-60);
252 }
249 break;253 break;
250 case Gdk.Key.Right:254 case Gdk.Key.Right:
251 video_player.progress += 0.05;255 if ((e.state & Gdk.ModifierType.CONTROL_MASK) != Gdk.ModifierType.CONTROL_MASK)
256 {
257 video_player.rewind_seconds (3);
258 }
259 else
260 {
261 video_player.rewind_seconds (60);
262 }
252 break;263 break;
253 case Gdk.Key.a:264 case Gdk.Key.a:
254 next_audio ();265 next_audio ();
255266
=== modified file 'Audience/Widgets/VideoPlayer.vala'
--- Audience/Widgets/VideoPlayer.vala 2013-04-07 18:53:17 +0000
+++ Audience/Widgets/VideoPlayer.vala 2013-04-15 17:37:26 +0000
@@ -624,5 +624,26 @@
624 dpy.get_screensaver (out timeout, out interval, out prefer_blanking, out allow_exposures);624 dpy.get_screensaver (out timeout, out interval, out prefer_blanking, out allow_exposures);
625 dpy.set_screensaver (enable ? timeout : 0, interval, prefer_blanking, allow_exposures);625 dpy.set_screensaver (enable ? timeout : 0, interval, prefer_blanking, allow_exposures);
626 }626 }
627
628 public void rewind_seconds (int seconds)
629 {
630 int64 gstSecond = 1000000000;
631 int64 position, length;
632 var time = Gst.Format.TIME;
633#if HAS_CLUTTER_GST_1
634 playbin.query_duration (Gst.Format.TIME, out length);
635 playbin.query_position (Gst.Format.TIME, out position);
636#else
637 playbin.query_duration (ref time, out length);
638 playbin.query_position (ref time, out position);
639#endif
640 if ((position + seconds * gstSecond) < 0)
641 {
642 playbin.seek_simple (Gst.Format.TIME, Gst.SeekFlags.FLUSH | Gst.SeekFlags.ACCURATE, 1);
643 return;
644 }
645
646 playbin.seek_simple (Gst.Format.TIME, Gst.SeekFlags.FLUSH | Gst.SeekFlags.ACCURATE, (int64)(position + seconds * gstSecond));
647 }
627 }648 }
628}649}

Subscribers

People subscribed via source and target branches

to all changes: