mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
examples: vaenc-dynamic: support force key frame setting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6619>
This commit is contained in:
parent
0e3e688bed
commit
c6957d7a36
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* */
|
||||
|
@ -418,6 +419,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