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

There are many useful examples but they are undiscoverable #180

Closed
Farmadupe opened this issue Feb 19, 2022 · 1 comment
Closed

There are many useful examples but they are undiscoverable #180

Farmadupe opened this issue Feb 19, 2022 · 1 comment

Comments

@Farmadupe
Copy link

Farmadupe commented Feb 19, 2022

There is a rich set of examples in this repository, but it is very difficult to discover them because:

  • It is not possible to access a description of any example without opening its source code
  • Some examples are for users who are already familiar with the API (e.g "custom_meta.rs") and some are for those who are not ("video_converter.rs", "thumbnail.rs"). The mixing of "very detailed" examples with general-purpose examples makes the general purpose examples harder to find.
  • The directory hierarchy is a little 'odd' because it's uncommon to see a crate with ~30 different binary targets. Until I opened Cargo.toml I assumed there was a single binary but I couldn't find main.rs
  • I think there may be some common usecases where it is hard to work out what is the best example just by reading filenames in examples/src/bin. My particular usecase (which I think is probably fairly common) is "get every frame in a video for further processing (with minimum adequate error handling ie. stopping on any error)", but I think the best example is called "thumbnail.rs"

P.S. is there any chance such code has already been written, e.g.

struct VideoFrameIterator { .. }
impl VideoFrameIterator {fn next() -> Option<Result<ImageBuffer, ErrorType>> { .. }}

///Iterate over all frames in a video until the first error
fn thing_that_farmadupe_wants(uri : OsStr) -> VideoFrameIterator { .. }
@sdroege
Copy link
Owner

sdroege commented Feb 19, 2022

The closest example to that is the thumbnail examples, yes.

For the other issues, please report this at https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/ . This repository here is only a mirror :)

@sdroege sdroege closed this as completed Feb 19, 2022
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

No branches or pull requests

2 participants