Basic support for UIBC (single mouse events and key events)
- Option --uibc on miracle-sinkctl to enable it
- Option --log-journal-level to see player execution on journalctl
- Controller for uibc miracle-uibcctl
- Player based on PyGtk to receive and communicate mouse and keyevents
closes#57
Some peers (like Nexus 5 and Nexus 7) send empty GET_PARAMETER
request during streaming. Seems it just some kind of ping. Do not
include unnecessary information in reply.
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Devices sometimes report sessions followed by ";timeout=..". Cut this off.
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Forward the --audio and --scale arguments to our gst-spawn helper and
parse them via bash for now.
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
The sinkctl tool is currently a hack to make Miracast sinks work. The
embedded gst-launch invocation is kinda ugly to handle. Move it into a
bash-script so we can experiment a bit more with different pipelines.
Ultimatively, the goal is obviously to make this work as its own gst
element.
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
rtsp_message_readv() is a convenience function. If one of the values to be
read fails, it does not restore the previous situation. Therefore, handle
that in sinkctl in case we cannot read a value.
Reported-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
M6 M7 messages should use URL from wfd_presentation_URL of M4. Parse it
during set_parameter and use it in further requests instead of a
hard-coded URL.
Signed-off-by: Andrey Gusakov <adnrey.gusakov@cogentembedded.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
In M7 message session ID should be included. Session ID is returned in M6
response. So we should wait for M6 response.
Signed-off-by: Andrey Gusakov <adnrey.gusakov@cogentembedded.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Forward group-formation-failure events via dbus so sinkctl can restart
p2p-scans immediately. Unfortunately, the event itself does not contain
any useful information at all. Therefore, we have to track the connection
attempts ourselves.
Signed-off-by: Andrey Gusakov <adnrey.gusakov@cogentembedded.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
sd_bus never uses 'bool', and given the weird implicit type promotions, it
is totally right to do so. Make sure we never pass pointers to 'bool' to
va_arg sd_bus functions to avoid overwriting stack space.
Signed-off-by: Andrey Gusakov <adnrey.gusakov@cogentembedded.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
The libsystemd-bus API changed recently. Update our calls to use the new
API so it compiles with newer systemd versions.
Signed-off-by: Andrey Gusakov <adnrey.gusakov@cogentembedded.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Once we have a source connection to our local sink, spawn gstreamer so the
actual video data is rendered.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
miracle-sinkctl is a very basic Miracast-Sink implementation. It is meant
for debugging and as proof-of-concept.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
If we advertise changes in Peer.Connected _before_ updating other props,
they're not available in the callbacks. Delay the notifications after we
parsed all props.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
The event-loop might be needed in later ctl additions for timeouts, so
make it global. Same for the bus-logic.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Delay object-broadcasts so we first parse properties and then advertise
the objects. Otherwise, the caller will get almost empty objects which are
rather useless.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
The miracle-wifictl program can be used to manage miracle-wifid. It
provides low-level P2P helpers, so the main miraclectl can skip thos.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>