Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Miracast source side implementation #172

Closed
wants to merge 222 commits into from
Closed

Conversation

derekdai
Copy link
Contributor

Hi albfan:

What's in this PR

  • a unified interface to provide both source and sink functionality
  • source side RTSP protocol (partial implemented)
  • DBus control interface
  • a shell script to demo how to use miracle-wfdctl

derekdai and others added 30 commits February 13, 2017 13:12
If miraclecat is GO, miracle-dhcp runs as server, it send out SERVER_ID
option in little endian, causes non-GO peer connect to wrong IP address, so
RTSP connection can't be established.

In scenario like, say Android (GO) <-> miracalcast (non-GO), the DHCP service
is provided by Android, in this case, the SERVER_ID is in expected byte order
(big endian).
since gstplayer has argument --audio to enable audio support but no
way to disable it, audio=False might a better choise.

If we left audio=True and incoming stream has video only, the whole
pipeline will be blocked and wait for audio stream.
The new option --lazy-managed will let miracle-wifid don't managed the
links automatically. Instead, the link will be managed only when the new
DBus property Managed was set to true. So this will be possible that
miracle-wifid could be conexists with other network tools like
networkmanager.

For example, unmange the device in networkmanager with setting the DBus
property org.freedesktop.NetworkManager.Device.Managed to false and
manage it in miracle-wifid with setting
org.freedesktop.miracle.wifi.Link.Managed to true, then both them could
works and don't need to kill each other.

Besides, there is new command named make-managed in miracle-wifictl and
miracle-sinkctla.
while parsing ctl_peer and ctl_link objects, if a ctl_peer appear prior
to its related ctl_link, -EINVAL is reported, and miracle-*ctl will quit
immediately.
@alexanderadam
Copy link

wow, this looks impressive! @derekdai any chance that the mentioned points are getting fixed? It looks like you did an awesome amount of work!

@albfan
Copy link
Owner

albfan commented Sep 22, 2018

@derekdai I just merge #135 so part of this PR can be rebased on top of that.

I will use your work on systemd services to fix #98, as using --lazy-managed allows to run it without any harm.

I decide to merge that PR trying again this one (founding that service running with --lazy-managed

I will rebase my branch https://github.com/albfan/miraclecast/tree/derekdai-master-squashed on top of master and try to split it into atomic changes.

Need to look again carefully as I feel lot more treasures are included in these PR

About this PR, My tries with external devices (were I don't control the miracast implementation) do not pass from the handshaking, but using my raspberry pi (now raspbian has systemd updated enough) I think I can get progress and see what is blocking these from being merged

@ra100
Copy link

ra100 commented Dec 24, 2018

I tried to build (on ubuntu 18.04) these changes and got error while make:

miraclecast/res/dispctl.vala:807.2-807.18: error: 1 missing arguments for `void GLib.Application.set_default (GLib.Application?)'
	app.set_default();
	^^^^^^^^^^^^^^^^^
Compilation failed: 1 error(s), 2 warning(s)
res/CMakeFiles/miracle-dispctl.dir/build.make:80: recipe for target 'res/dispctl_valac.stamp' failed
make[2]: *** [res/dispctl_valac.stamp] Error 1
CMakeFiles/Makefile2:528: recipe for target 'res/CMakeFiles/miracle-dispctl.dir/all' failed
make[1]: *** [res/CMakeFiles/miracle-dispctl.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

@albfan
Copy link
Owner

albfan commented Dec 25, 2018

@ra100 there's a rebased branch derekdai-master-squashed with several fixes.

@rfolland
Copy link

Hi albfan,

What is the status of the WIP on source side Miraclecast? I have tried it and end up with an error when the app does not detect that connection is successful:

miracle-dispctl: failed to cast to wireless display: timeout to wait for property Connected change

Is there a setup which works, or is this the current status? Then I suppose some work is required to get the Connected status from dbus and move on?

@albfan
Copy link
Owner

albfan commented Apr 23, 2019

It is not working for me too. We could check https://github.com/benzea/gnome-screencast and see what is different (not easy to do)

@rfolland
Copy link

It is not working for me too. We could check https://github.com/benzea/gnome-screencast and see what is different (not easy to do)

Thanks! I will try it out.

@redbrain
Copy link

Is this PR somewhat functional yet? I'd like to use Miraclecast as a source but it seems like progress is stalling.

Repository owner deleted a comment from piranna Feb 14, 2022
Repository owner deleted a comment from fsevenm Feb 14, 2022
@albfan
Copy link
Owner

albfan commented Nov 1, 2022

This is still not working, but is rebased on top of master in https://github.com/albfan/miraclecast/tree/source-impl

Closing this PR to continue on #455

@albfan albfan closed this Nov 1, 2022
@hypertextPreprocessor
Copy link

sorry, I use this commit complie failed at make process. the error message shows
image
vala version : Vala 0.56.0
libglib version : libglib2.0-0
systemd version : 249 (249.11-0ubuntu3.12)
and I do checked valadoc ,it (the BusType) indeed has "get_address_sync" method , it has enum type though, see below:
image
Where was I wrong ? How can I complie this WIP?

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.

8 participants