mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
rpicamsrc: Disable bitrate, quantisation and intra-refresh dynamic changes
The firmware rejects dynamic changes of those encoder params.
This commit is contained in:
parent
92aa566c43
commit
e58951cfb8
1 changed files with 7 additions and 2 deletions
|
@ -1848,10 +1848,13 @@ raspi_capture_update_config (RASPIVID_STATE *state, RASPIVID_CONFIG *config)
|
||||||
MMAL_COMPONENT_T *encoder = state->encoder_component;
|
MMAL_COMPONENT_T *encoder = state->encoder_component;
|
||||||
MMAL_PORT_T *encoder_output = encoder->output[0];
|
MMAL_PORT_T *encoder_output = encoder->output[0];
|
||||||
|
|
||||||
|
#if 0 /* not dynamically change-able */
|
||||||
encoder_output->format->bitrate = config->bitrate;
|
encoder_output->format->bitrate = config->bitrate;
|
||||||
status = mmal_port_format_commit(encoder_output);
|
status = mmal_port_format_commit(encoder_output);
|
||||||
if (status != MMAL_SUCCESS)
|
if (status != MMAL_SUCCESS) {
|
||||||
vcos_log_warn("Unable to change bitrate dynamically");
|
vcos_log_warn("Cannot change bitrate dynamically");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
MMAL_PARAMETER_UINT32_T param = {{ MMAL_PARAMETER_INTRAPERIOD, sizeof(param)}, config->intraperiod};
|
MMAL_PARAMETER_UINT32_T param = {{ MMAL_PARAMETER_INTRAPERIOD, sizeof(param)}, config->intraperiod};
|
||||||
|
@ -1860,6 +1863,7 @@ raspi_capture_update_config (RASPIVID_STATE *state, RASPIVID_CONFIG *config)
|
||||||
vcos_log_warn("Unable to change intraperiod dynamically");
|
vcos_log_warn("Unable to change intraperiod dynamically");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /* not dynamically change-able */
|
||||||
{
|
{
|
||||||
MMAL_PARAMETER_UINT32_T param = {{ MMAL_PARAMETER_VIDEO_ENCODE_INITIAL_QUANT, sizeof(param)}, config->quantisationParameter};
|
MMAL_PARAMETER_UINT32_T param = {{ MMAL_PARAMETER_VIDEO_ENCODE_INITIAL_QUANT, sizeof(param)}, config->quantisationParameter};
|
||||||
status = mmal_port_parameter_set(encoder_output, ¶m.hdr);
|
status = mmal_port_parameter_set(encoder_output, ¶m.hdr);
|
||||||
|
@ -1898,6 +1902,7 @@ raspi_capture_update_config (RASPIVID_STATE *state, RASPIVID_CONFIG *config)
|
||||||
if (status != MMAL_SUCCESS)
|
if (status != MMAL_SUCCESS)
|
||||||
vcos_log_warn("Unable to set H264 intra-refresh values dynamically");
|
vcos_log_warn("Unable to set H264 intra-refresh values dynamically");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (config->change_flags & PROP_CHANGE_PREVIEW) {
|
if (config->change_flags & PROP_CHANGE_PREVIEW) {
|
||||||
/* Preview settings or fullscreen */
|
/* Preview settings or fullscreen */
|
||||||
|
|
Loading…
Reference in a new issue