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

How to display frames(I,P,B) #7

Closed
a44281071 opened this issue Aug 10, 2019 · 1 comment
Closed

How to display frames(I,P,B) #7

a44281071 opened this issue Aug 10, 2019 · 1 comment

Comments

@a44281071
Copy link

I need to display android screen in WPF, the data in WPF will received byte[] frame.
But the byte[] frame will be (I,P,B),
I find the method YUV420PtoRGB() , but just worked about P frame.
How to display all frames? Is it difficult?

@secile
Copy link
Owner

secile commented Aug 10, 2019

OpenH264Lib is only wrapper library, I'm not very detailed with how encode/decode works,
so, my answer may not be accurate.

In my understanding, to decode frame data, you do not have to worry about frame type(I, P, B).
All you have to do is only call decode method of decoder class.
If frame data have enough information, decode function returns Bitmap, if not enough, returns null.

P / B frame only have difference from I frame, so you can not decode image from only P or B frame.
OpenH264Lib decode function returns an image using the data received so far.

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