mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
vtenc: Prepare encoder after setup
This will allow encoding to happen faster on the first frame.
This commit is contained in:
parent
c6f17d6013
commit
ddea2e4498
1 changed files with 11 additions and 1 deletions
|
@ -458,8 +458,11 @@ gst_vtenc_create_session (GstVTEnc * self)
|
|||
self, &session);
|
||||
GST_INFO_OBJECT (self, "VTCompressionSessionCreate for %d x %d => %d",
|
||||
self->negotiated_width, self->negotiated_height, (int) status);
|
||||
if (status != noErr)
|
||||
if (status != noErr) {
|
||||
GST_ERROR_OBJECT (self, "VTCompressionSessionCreate() returned: %d",
|
||||
(int) status);
|
||||
goto beach;
|
||||
}
|
||||
|
||||
if (self->dump_properties) {
|
||||
gst_vtenc_session_dump_properties (self, session);
|
||||
|
@ -490,6 +493,13 @@ gst_vtenc_create_session (GstVTEnc * self)
|
|||
gst_vtenc_session_configure_bitrate (self, session,
|
||||
gst_vtenc_get_bitrate (self));
|
||||
|
||||
status = VTCompressionSessionPrepareToEncodeFrames (session);
|
||||
if (status != noErr) {
|
||||
GST_ERROR_OBJECT (self,
|
||||
"VTCompressionSessionPrepareToEncodeFrames() returned: %d",
|
||||
(int) status);
|
||||
}
|
||||
|
||||
beach:
|
||||
CFRelease (pb_attrs);
|
||||
|
||||
|
|
Loading…
Reference in a new issue