Skip to content

MCM doesn't adapts to stream changes #532

@joaoantoniocardoso

Description

@joaoantoniocardoso

For example, when a stream changes encoding from h264 to h265, even though it stopped streaming to switch between the encodings, MCM would stick with the first known encoding and fail to play it back:

{  "stream": {    "id": "aaddd0b3-6342-452f-99eb-5aea89b8cd1c",    "running": false,    "error": "Failed to recreate the stream aaddd0b3-6342-452f-99eb-5aea89b8cd1c: \"Failed to add Sink of type RTSP to the Pipeline. Reason: Failed setting Pipeline aaddd0b3-6342-452f-99eb-5aea89b8cd1c to Playing state. Reason: set state timed-out (2 seconds)\\n\\nStack backtrace:\\n   0: std::backtrace::Backtrace::create\\n   1: anyhow::error::<impl anyhow::Error>::msg\\n   2: anyhow::__private::format_err\\n   3: mavlink_camera_manager::stream::gst::utils::wait_for_element_state\\n   4: mavlink_camera_manager::stream::pipeline::PipelineState::add_sink\\n   5: mavlink_camera_manager::stream::pipeline::Pipeline::add_sink\\n   6: core::result::Result<T,E>::and_then\\n   7: mavlink_camera_manager::stream::StreamState::try_new::{{closure}}::{{closure}}\\n   8: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll\\n   9: mavlink_camera_manager::stream::Stream::watcher::{{closure}}::{{closure}}\\n  10: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll\\n  11: mavlink_camera_manager::stream::Stream::try_new::{{closure}}::{{closure}}::{{closure}}\\n  12: tokio::runtime::task::core::Core<T,S>::poll\\n  13: tokio::runtime::task::harness::Harness<T,S>::poll\\n  14: tokio::runtime::scheduler::multi_thread::worker::Context::run_task\\n  15: tokio::runtime::scheduler::multi_thread::worker::Context::run\\n  16: tokio::runtime::context::scoped::Scoped<T>::set\\n  17: tokio::runtime::context::runtime::enter_runtime\\n  18: tokio::runtime::scheduler::multi_thread::worker::run\\n  19: tokio::runtime::task::core::Core<T,S>::poll\\n  20: tokio::runtime::task::harness::Harness<T,S>::poll\\n  21: tokio::runtime::blocking::pool::Inner::run\\n  22: std::sys::backtrace::__rust_begin_short_backtrace\\n  23: core::ops::function::FnOnce::call_once{{vtable.shim}}\\n  24: std::sys::pal::unix::thread::Thread::new::thread_start\\n  25: <unknown>\\n  26: <unknown>\". Trying again in one second...",    "video_and_stream": {      "name": "RadCam 192.168.2.10/0",      "stream_information": {        "endpoints": [          "rtsp://0.0.0.0:8554/radcam_192.168.2.10/0"        ],        "configuration": {          "type": "video",          "encode": "H264",          "height": 2160,          "width": 3840,          "frame_interval": {            "numerator": 1,            "denominator": 25          }        },        "extended_configuration": null      },      "video_source": {        "Onvif": {          "name": "HDIPC - IPCamera (IPCamera)",          "source": {            "Onvif": "rtsp://admin:[email protected]:554/stream_0"          },          "manufacturer": "IPCamera",          "model": "HDIPC",          "firmware_version": "18.010.25.4_MAIN_V11(240621)",          "serial_number": "H010001181D0100011775",          "hardware_id": "IPCamera"        }      }    }  },  "device": {    "name": "HDIPC - IPCamera (IPCamera)",    "source": "rtsp://admin:[email protected]:554/stream_0",    "formats": [      {        "encode": "H265",        "sizes": [          {            "width": 3840,            "height": 2160,            "intervals": [              {                "numerator": 1,                "denominator": 25              }            ]          }        ]      }    ],    "controls": []  }}

Today's workaround is to reset MCM settings to force the probe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmust-haveHigh priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions