Skip to content

improve disposition properties#1925

Open
Tengyyy wants to merge 1 commit into
bytedeco:masterfrom
Tengyyy:master
Open

improve disposition properties#1925
Tengyyy wants to merge 1 commit into
bytedeco:masterfrom
Tengyyy:master

Conversation

@Tengyyy

@Tengyyy Tengyyy commented Nov 5, 2022

Copy link
Copy Markdown
Contributor

No description provided.

@saudet

saudet commented Nov 5, 2022

Copy link
Copy Markdown
Member

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

Tengyyy commented Nov 5, 2022

Copy link
Copy Markdown
Contributor Author

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

saudet commented Nov 5, 2022

Copy link
Copy Markdown
Member

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

@Tengyyy

Tengyyy commented Nov 5, 2022

Copy link
Copy Markdown
Contributor Author

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

saudet commented Nov 5, 2022

Copy link
Copy Markdown
Member

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.

2 participants