-
Notifications
You must be signed in to change notification settings - Fork 334
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 FrameInfo
handling
#8099
Conversation
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.
Fixes #8072 if understand correctly!
@@ -93,6 +93,11 @@ impl From<Error> for crate::decode::Error { | |||
/// ffmpeg does not tell us the timestamp/duration of a given frame, so we need to remember it. | |||
#[derive(Clone)] | |||
struct FfmpegFrameInfo { | |||
/// The start of a new [`crate::demux::GroupOfPictures`]? | |||
/// | |||
/// If true, an entire frame can be decoded from this one sample, |
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.
I thought for very long that this was true. But now I'm not so sure anymore that we are guaranteed to get a frame back from a decoder when we enqueue such a frame.
I would have expected PTS==DTS on those, but that part I know for sure now is not the case.
One subtle problem with this statement that I'm a bit more sure about is that while we have a sample -> frame
, it may still be that a frame needs meta information from other samples even though this is supposed to be an IDR frame.
For instance in AV1, the information we append right now in our annex_b stream in the ffmpeg decoder is dispersed over the samples of the video and I have no ideas if there's any guarantees at all.
With that in mind I'd be in favor for leaving this out of the doc comment & tooltip (affects a bunch of places where this is copy pasted) until we understand better what we're dealing with.
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.
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.
had mixed success with LLMs in this area. And I've got too often burned by now believing the simple answers :/
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.
not a strong conviction here as described.
What bugs me about all this is that the is_sync
is derived in quite strange way in the mp4 crate which I don't follow and I'd rather have per codec defined things that are easier to look up :(
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.
we obviously depend on it meaning something though as it governs our enqueuing strategy
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.
maybe just slap a We generally assume
in front of it 🤷
"{} {}:{} {}", | ||
record.level(), |
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.
what is this? I'm lacking context
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.
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.
I meant
- why does it make it better - before/after
- what has this to do with anything in this pr
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.
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.
It was completely unrelated to the PR, except I wanted to debug "what the hell is wring that annoying log message"
What
Added
is_sync
and make sureFrameInfo
is either valid orNone
.Checklist