mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
examples: vaenc-dynamic: support force key frame setting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6857>
This commit is contained in:
parent
77455b50d3
commit
af88e87eec
1 changed files with 8 additions and 0 deletions
|
@ -208,6 +208,7 @@ print_keyboard_help (void)
|
|||
"p", "Decrease QP-P (only in CQP)"}, {
|
||||
"B", "Increase QP-B (only in CQP)"}, {
|
||||
"b", "Decrease QP-B (only in CQP)"}, {
|
||||
"f", "Force to set a key frame"}, {
|
||||
"k", "show keyboard shortcuts"}
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
|
@ -414,6 +415,13 @@ keyboard_cb (gchar input, gboolean is_ascii, gpointer user_data)
|
|||
g_object_set (data->encoder, "qpb", qpb, NULL);
|
||||
break;
|
||||
}
|
||||
case 'f':{
|
||||
GstEvent *event = gst_video_event_new_upstream_force_key_unit
|
||||
(GST_CLOCK_TIME_NONE, TRUE, 0);
|
||||
gst_println ("Sending force keyunit event");
|
||||
gst_element_send_event (data->encoder, event);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue