-
-
Notifications
You must be signed in to change notification settings - Fork 110
Add demos #444
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
Add demos #444
Conversation
This is a demo that will probably appeal to few users, but working on it has helped me with some of the pipeline concepts I'm using in another demo I'm working on: one to save to an AVI file. The demo itself seems ready to go, but I still need to add references to the demos in the documentation.
BoboTiG
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is insane! The quality of the code + comments is awesome. It will be very helpfull to other developers 👍
I am not sure what you want to do with upcoming demos, I would just say it might be good to keep self-contained examples. That would ease sharing informations, and developers tasks. WDYT?
|
Thank you! I'm glad you like it! MSS is popular enough that it's gone beyond the simple "take a screenshot, save a PNG" use cases. I think that having clear demos showing how to use a library in practical situations, beyond simple examples, is a big help. As for the code reuse question, this is something I'm of two minds about. On one hand, yes, it's great for demos to be self-contained. On the other hand, I've also got the video encoding demo (you can see an early test, although that's using some features that I was playing with in a separate branch). That uses the same basic pipeline concept. It's still "input -> processing -> output" in separate threads. The pipeline code in the tinytv-stream demo is nearly 300 lines long. I was thinking it might be worth separating that into a separate file, rather than copying it into a separate That would let users review both demos without having to check to see if all that code is the same or if they need to re-read it all. It would also make sure that we don't accidentally change the pipeline code in one and not the other. So as I said, I'm conflicted. That said, I think we're fine committing this as-is, and possibly factoring things out later if we want to. |
|
Ah yes, the pipeline code could be in its own file: it will reduce demos code, and ease understanding MSS-specific usage. |
|
Ok! Do you want me to do that before we commit these, or as part of the video streaming demo commit? |
|
By the way, while writing this I was wondering if it was a particularly useful demo, since it's so focused on pipelines and such, and not much about MSS. Then I realized that there's a reason for that: MSS is so easy to use that it doesn't require a lot of support code! |
This makes this compatible with Windows and macOS, where time.clock_gettime() does not exist.
|
That's insanely usefull, we keep it! :) |
|
A link in the documentation can be added later, I'm now hungry to see what other cool stuff your wrote with MSS :D |
Changes proposed in this PR
Adds demos, which are longer examples than belong in the regular documentation. The first of these is one that streams to a toy TV. Before merging this, I'd like to get a sense of how much of the code would be shared with the other demo I've got in progress, one that saves to an AVI file.
It is very important to keep up to date tests and documentation.
Is your code right?
./check.shpassed