Closed tuximail closed 3 years ago
Also please rebase on top of master to resolve the conflicts.
Sorry for the intendation - this was due to a configuration of my git client, that I was not aware of. I fixed this. Also I did a rebase on the current master.
What would make more sense in my opinion is, when no explicit ip is passed, to first run discovery until the selected PS4 is discovered and then connect to it. This would probably make sense in a second pr. What do you think?
I thought so too, but from what I understood the discovery heavily relies on the components declared in maindow.cpp
- which means we would loose the comfort we are now having where we directly run the streamingwindow. Maybe I am just mistaken and the discovery can easily be started from main.cpp
in this case I should have a deeper look...
I thought so too, but from what I understood the discovery heavily relies on the components declared in
maindow.cpp
- which means we would loose the comfort we are now having where we directly run the streamingwindow. Maybe I am just mistaken and the discovery can easily be started frommain.cpp
in this case I should have a deeper look...
The discovery in the gui is indeed implemented as part of the MainWindow, but this is only an interface on top of the functionality that is implemented in the library. You can see an example of this in the non-gui CLI: https://github.com/thestr4ng3r/chiaki/blob/master/cli/src/discover.c
By using this, it would be even possible to launch a stream by just typing chiaki stream
without anything else. It could start discovery, wait until the first known console is detected and then automatically start the stream. If an explicit console name is passed, wait until this exact console is available.
So I changed the PR as discussed to include the following features:
Param combinations that are ensured to work:
$ chiaki --registkey 123456789 --morning abcdefgh== stream 192.168.178.24
$ chiaki list
Host: PS4-123
$ chiaki stream PS4-123 192.168.178.24
$ chiaki --fullscreen stream PS4-123 192.168.178.24
$ chiaki stream foo 192.168.178.24
No configuration found for 'foo'
Let me know, if you still see anything that should be changed or could be done in a better way :)
The discovery in the gui is indeed implemented as part of the MainWindow, but this is only an interface on top of the functionality that is implemented in the library. You can see an example of this in the non-gui CLI: https://github.com/thestr4ng3r/chiaki/blob/master/cli/src/discover.c
Thanks for pointing me in this direction. This seems indeed like the best approach. I will try this in a "to be created soon"- pull request ;-)
Very nice now, thank you! I have pushed a few style fixes myself since that's faster than going through review again. By the way, the registered PS4s are generally identified by their MAC address more than their Nickname so providing that option on the CLI would be another nice addition.
Disclaimer: This is the first time I wrote (that much) code for a C++/Qt project. It is possible that I didn't use the perfect ways to achieve all my goals. I am of cource open for feedback and willing to improve parts, if they need to be.
New Features
Auto-read of config settings from cli
This is an improvement based on https://github.com/thestr4ng3r/chiaki/issues/345.
morning
andreg key
are now automatically read from the config file if the nickname of the ps4 is passed:To achieve this behaviour the IP address of the PS4 is now stored in the config file. The limit at this time is that it only works if you're IP doesn't change. However the user is able to override the IP and pass the correct one if this scenario might have happened:
To make the user aware of this, an Information is printed out by default when the param is used:
Using IP '192.168.178.24' from the configuration file. This IP could have changed. If the connection does not succeed please pass the correct IP manually. (To avoid this in the future assign a static IP to your PS4)
List nickname of PS4
To get the nickname one can use the newly introduced param
list
:Fullscreen (when using
stream
param)In combination with the new feature the param
--fullscreen=true
can be used to start the stream in fullscreen directly:What has not changed
All calls with other params are working as before, e.g.: