Compare commits

...

4 commits

Author SHA1 Message Date
Seungha Yang ea5c232307 Merge branch 'fallbacksrc-last-error' into 'main'
fallbacksrc: Add last source error message to statistics structure

See merge request gstreamer/gst-plugins-rs!1314
2024-04-28 02:13:04 +00:00
Maksym Khomenko a87eaa4b79 hrtfrender: use bitmask, not int, to prevent a capsnego failure
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1549>
2024-04-26 20:24:19 +00:00
Philippe Normand 88cbc93338 dav1ddec: Negotiate bt709 colorimetry when values from seq header are unspecified
With unknown range colorimetry validation would fail in video-info. As our
decoder outputs only YUV formats Bt709 should be a reasonable default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1548>
2024-04-26 19:35:41 +00:00
Seungha Yang 2b23b07f48 fallbacksrc: Add last source error message to statistics structure
Adding "last-error-message" and "last-fallback-error-message" fields
to statistics structure so that application can get more information
about the fallback reasons.
2023-08-25 19:33:51 +09:00
3 changed files with 12 additions and 4 deletions

View file

@ -649,7 +649,7 @@ impl BaseTransformImpl for HrtfRender {
if direction == gst::PadDirection::Sink {
s.set("channels", 2);
s.set("channel-mask", 0x3);
s.set("channel-mask", gst::Bitmask(0x3));
} else {
let settings = self.settings.lock().unwrap();
if let Some(objs) = &settings.spatial_objects {

View file

@ -35,6 +35,8 @@ struct Stats {
last_fallback_retry_reason: RetryReason,
buffering_percent: i32,
fallback_buffering_percent: i32,
last_error_msg: String,
last_fallback_error_msg: String,
}
impl Default for Stats {
@ -46,6 +48,8 @@ impl Default for Stats {
last_fallback_retry_reason: RetryReason::None,
buffering_percent: 100,
fallback_buffering_percent: 100,
last_error_msg: "".to_string(),
last_fallback_error_msg: "".to_string(),
}
}
}
@ -65,6 +69,8 @@ impl Stats {
"fallback-buffering-percent",
self.fallback_buffering_percent,
)
.field("last-error-message", &self.last_error_msg)
.field("last-fallback-error-message", &self.last_fallback_error_msg)
.build()
}
}
@ -2797,6 +2803,7 @@ impl FallbackSrc {
);
if src == &state.source.source || src.has_as_ancestor(&state.source.source) {
state.stats.last_error_msg = format!("{:?}", m);
self.handle_source_error(state, RetryReason::Error, false);
drop(state_guard);
self.obj().notify("status");
@ -2807,6 +2814,7 @@ impl FallbackSrc {
// Check if error is from fallback input and if so, use a dummy fallback
if let Some(ref source) = state.fallback_source {
if src == &source.source || src.has_as_ancestor(&source.source) {
state.stats.last_fallback_error_msg = format!("{:?}", m);
self.handle_source_error(state, RetryReason::Error, true);
drop(state_guard);
self.obj().notify("status");

View file

@ -134,7 +134,7 @@ impl Dav1dDec {
let matrix = match pic.matrix_coefficients() {
pixel::MatrixCoefficients::Identity => gst_video::VideoColorMatrix::Rgb,
pixel::MatrixCoefficients::BT709 => gst_video::VideoColorMatrix::Bt709,
pixel::MatrixCoefficients::Unspecified => gst_video::VideoColorMatrix::Unknown,
pixel::MatrixCoefficients::Unspecified => gst_video::VideoColorMatrix::Bt709,
pixel::MatrixCoefficients::BT470M => gst_video::VideoColorMatrix::Fcc,
pixel::MatrixCoefficients::BT470BG => gst_video::VideoColorMatrix::Bt601,
pixel::MatrixCoefficients::ST240M => gst_video::VideoColorMatrix::Smpte240m,
@ -149,7 +149,7 @@ impl Dav1dDec {
let transfer = match pic.transfer_characteristic() {
pixel::TransferCharacteristic::BT1886 => gst_video::VideoTransferFunction::Bt709,
pixel::TransferCharacteristic::Unspecified => gst_video::VideoTransferFunction::Unknown,
pixel::TransferCharacteristic::Unspecified => gst_video::VideoTransferFunction::Bt709,
pixel::TransferCharacteristic::BT470M => gst_video::VideoTransferFunction::Bt709,
pixel::TransferCharacteristic::BT470BG => gst_video::VideoTransferFunction::Gamma28,
pixel::TransferCharacteristic::ST170M => gst_video::VideoTransferFunction::Bt601,
@ -180,7 +180,7 @@ impl Dav1dDec {
let primaries = match pic.color_primaries() {
pixel::ColorPrimaries::BT709 => gst_video::VideoColorPrimaries::Bt709,
pixel::ColorPrimaries::Unspecified => gst_video::VideoColorPrimaries::Unknown,
pixel::ColorPrimaries::Unspecified => gst_video::VideoColorPrimaries::Bt709,
pixel::ColorPrimaries::BT470M => gst_video::VideoColorPrimaries::Bt470m,
pixel::ColorPrimaries::BT470BG => gst_video::VideoColorPrimaries::Bt470bg,
pixel::ColorPrimaries::ST240M => gst_video::VideoColorPrimaries::Smpte240m,