Conversation
seriyps
left a comment
There was a problem hiding this comment.
I don't know gstreamer well enough to fully understand what's going on. Just added a few notes and questions
|
|
||
| splash_enabled = config["splash"]["enabled"].as<bool>(false); | ||
| splash_file = config["splash"]["file"].as<std::string>(""); | ||
| splash_timeout = config["splash"]["timeout"].as<int>(3); |
There was a problem hiding this comment.
might be better to pass splash config as arguments rather than extracting them from yaml. This is to not "contaminate" the whole codebase with configuration file details. IMO it's better to extract all the data from YAML config in the main.cpp:main function - this way we can detect config errors at early stage rather than crash somewhere deep
| initGstreamerOrThrow(); | ||
| splash_enabled = config["splash"]["enabled"].as<bool>(false); | ||
| splash_file = config["splash"]["file"].as<std::string>(""); | ||
| splash_timeout = config["splash"]["timeout"].as<int>(3); |
There was a problem hiding this comment.
the same comment - maybe pass those parameters from main function?
| << "selector.sink_0 "; | ||
| } | ||
|
|
||
| // Banch 2: Backup filesrc |
| ss << "filesrc name=filesrc location=\"" << splash_file << "\" ! qtdemux ! " | ||
| << "queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 ! " | ||
| << pipeline::create_parse_for_codec(m_video_codec) | ||
| << "selector.sink_1 "; |
There was a problem hiding this comment.
if I start a DVR while splash is playing, would it record the splash?
Also, if I lost the video link with the drone (it went out of range) would it mean the splash going to start?
| if (!m_bus) return; | ||
|
|
||
| GstMessage *msg = gst_bus_pop(m_bus); | ||
| while (msg) { |
There was a problem hiding this comment.
can it be while (msg = gst_bus_pop(m_bus)) {...? Sorry if dumb, C is not my professional tool
This PR adds a splash video feature.
When no video is received it will play the configured video in a loop.
The feature is configurable in
pixelpilot.yamlsplash_demo.mp4