Skip to content

add splash video#90

Draft
henkwiedig wants to merge 1 commit into
OpenIPC:masterfrom
henkwiedig:backupsrc
Draft

add splash video#90
henkwiedig wants to merge 1 commit into
OpenIPC:masterfrom
henkwiedig:backupsrc

Conversation

@henkwiedig
Copy link
Copy Markdown
Collaborator

@henkwiedig henkwiedig commented Oct 14, 2025

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.yaml

splash_demo.mp4

Copy link
Copy Markdown
Collaborator

@seriyps seriyps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know gstreamer well enough to fully understand what's going on. Just added a few notes and questions

Comment thread src/gstrtpreceiver.cpp

splash_enabled = config["splash"]["enabled"].as<bool>(false);
splash_file = config["splash"]["file"].as<std::string>("");
splash_timeout = config["splash"]["timeout"].as<int>(3);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread src/gstrtpreceiver.cpp
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);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same comment - maybe pass those parameters from main function?

Comment thread src/gstrtpreceiver.cpp
<< "selector.sink_0 ";
}

// Banch 2: Backup filesrc
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backup?

Comment thread src/gstrtpreceiver.cpp
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 ";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread src/gstrtpreceiver.cpp
if (!m_bus) return;

GstMessage *msg = gst_bus_pop(m_bus);
while (msg) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can it be while (msg = gst_bus_pop(m_bus)) {...? Sorry if dumb, C is not my professional tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants