-
-
Notifications
You must be signed in to change notification settings - Fork 613
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
core/libraries: WIP Videodec2 implementation #1241
base: main
Are you sure you want to change the base?
Conversation
bc9849b
to
c85122f
Compare
@vladmikhalin can you review this? |
It's still a draft, is it ready for review? |
it is ready |
It's still marked as a draft but I'd still want you to review it |
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.
Apart from the obvious magic numbers and bogus values that I can attribute to this PR being a draft I only have these 2 comments.
} | ||
|
||
AVFrame* frame = av_frame_alloc(); | ||
ret = avcodec_receive_frame(mCodecContext, frame); |
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.
One packet can contain several frames. You should drain them all until AVERROR(EAGAIN)
or AVERROR_EOF
is returned. What you can do here is call avcodec_receive_frame
before avcodec_send_packet
to query the decoder on available frames. Only if it returns AVERROR(EAGAIN)
you should call avcodec_send_packet
again.
outputInfo.pictureCount = 0; | ||
|
||
packet->data = (u8*)inputData.pAuData; | ||
packet->size = inputData.auSize; |
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.
You can set packet->pts
to inputData.ptsData
and packet->dts
to inputData.dtsData
what other games uses videcodec2 expect persona???? |
Work-in-progress and very basic implementation of the Videodec2 library.