mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 13:21:28 +00:00
basic-tutorial-13: Step events need absolute values for the rate
They can't change playback direction but are based on the current playback direction. https://bugzilla.gnome.org/show_bug.cgi?id=796503
This commit is contained in:
parent
7aea060a60
commit
9b5958a221
2 changed files with 3 additions and 3 deletions
|
@ -75,7 +75,7 @@ static gboolean handle_keyboard (GIOChannel *source, GIOCondition cond, CustomDa
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_element_send_event (data->video_sink,
|
gst_element_send_event (data->video_sink,
|
||||||
gst_event_new_step (GST_FORMAT_BUFFERS, 1, data->rate, TRUE, FALSE));
|
gst_event_new_step (GST_FORMAT_BUFFERS, 1, ABS (data->rate), TRUE, FALSE));
|
||||||
g_print ("Stepping one frame\n");
|
g_print ("Stepping one frame\n");
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
|
|
|
@ -141,7 +141,7 @@ static gboolean handle_keyboard (GIOChannel *source, GIOCondition cond, CustomDa
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_element_send_event (data->video_sink,
|
gst_element_send_event (data->video_sink,
|
||||||
gst_event_new_step (GST_FORMAT_BUFFERS, 1, data->rate, TRUE, FALSE));
|
gst_event_new_step (GST_FORMAT_BUFFERS, 1, ABS (data->rate), TRUE, FALSE));
|
||||||
g_print ("Stepping one frame\n");
|
g_print ("Stepping one frame\n");
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
|
@ -345,7 +345,7 @@ case 'n':
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_element_send_event (data->video_sink,
|
gst_element_send_event (data->video_sink,
|
||||||
gst_event_new_step (GST_FORMAT_BUFFERS, 1, data->rate, TRUE, FALSE));
|
gst_event_new_step (GST_FORMAT_BUFFERS, 1, ABS (data->rate), TRUE, FALSE));
|
||||||
g_print ("Stepping one frame\n");
|
g_print ("Stepping one frame\n");
|
||||||
break;
|
break;
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue