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

improve disposition properties #1925

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Tengyyy
Copy link
Contributor

@Tengyyy Tengyyy commented Nov 5, 2022

No description provided.

@saudet
Copy link
Member

saudet commented Nov 5, 2022

Are there cases where that actually changes something? In any case, it's probably a decision that should be left up to the user.

@Tengyyy
Copy link
Contributor Author

Tengyyy commented Nov 5, 2022

Well in my use case I want to grab a cover image only if the file contains a stream with the attached pic disposition. And as it is right now if no stream with the right disposition is found the video stream will be set to the default/first video stream. So while I'm expecting to get the cover image when I call grabImage(), I will instead get the first frame of the default video stream

@saudet
Copy link
Member

saudet commented Nov 5, 2022

My question is, why can't you call setVideoDisposition(AV_DISPOSITION_DEFAULT) in your application?

@Tengyyy
Copy link
Contributor Author

Tengyyy commented Nov 5, 2022

Because my app doesnt know if the framegrabber found a stream with the disposition value that I requested or not. But if the start method were to reset disposition back to default, then I could see it in my app by calling getvideodisposition().

@saudet
Copy link
Member

saudet commented Nov 5, 2022

To accomplish that, please override getVideoDisposition() instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants