mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
vpxenc: add configure_encoder virtual method
For subclasses to expose format-specific properties Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/707>
This commit is contained in:
parent
19860200ed
commit
e61932c358
2 changed files with 11 additions and 1 deletions
|
@ -1776,6 +1776,13 @@ gst_vpx_enc_set_format (GstVideoEncoder * video_encoder,
|
|||
gst_vpx_error_name (status));
|
||||
}
|
||||
|
||||
if (vpx_enc_class->configure_encoder
|
||||
&& !vpx_enc_class->configure_encoder (encoder)) {
|
||||
ret = FALSE;
|
||||
g_mutex_unlock (&encoder->encoder_lock);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (GST_VIDEO_INFO_FPS_D (info) == 0 || GST_VIDEO_INFO_FPS_N (info) == 0) {
|
||||
/* FIXME: Assume 25fps for unknown framerates. Better than reporting
|
||||
* that we introduce no latency while we actually do
|
||||
|
@ -1823,6 +1830,7 @@ gst_vpx_enc_set_format (GstVideoEncoder * video_encoder,
|
|||
|
||||
gst_video_encoder_negotiate (GST_VIDEO_ENCODER (encoder));
|
||||
|
||||
done:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ struct _GstVPXEnc
|
|||
{
|
||||
GstVideoEncoder base_video_encoder;
|
||||
|
||||
/* < private > */
|
||||
/* < protected > */
|
||||
vpx_codec_ctx_t encoder;
|
||||
GMutex encoder_lock;
|
||||
|
||||
|
@ -120,6 +120,8 @@ struct _GstVPXEncClass
|
|||
vpx_codec_iface_t* (*get_algo) (GstVPXEnc *enc);
|
||||
/*enabled scaling*/
|
||||
gboolean (*enable_scaling) (GstVPXEnc *enc);
|
||||
/*called from set_format with lock taken*/
|
||||
gboolean (*configure_encoder) (GstVPXEnc *enc);
|
||||
/*set image format info*/
|
||||
void (*set_image_format) (GstVPXEnc *enc, vpx_image_t *image);
|
||||
/*get new simple caps*/
|
||||
|
|
Loading…
Reference in a new issue