Red-colored videos using libav

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Red-colored videos using libav

gouessej
Administrator
Good job. Do you still have any artefacts?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Red-colored videos using libav

gouessej
Administrator
In reply to this post by Aksenov239
If you want, I can spend some hours tonight in improving your code but please can you mention an open source license in the header of the file?

The improvements I suggest are these furthers:
- create a single NIO buffer, recreate it if and only if a NIO buffer with a different size is needed (currently, you create a NIO buffer at each frame :s )
- use a direct NIO buffer, add the comment to encourage the developer to release the native resources by using a known solution
- don't use an array, use directly the NIO buffer
- support the other formats
- create a single texture data object, recreate it if and only if a texture data object with a different size is needed
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Red-colored videos using libav

Aksenov239
Julien, thank you.
Yes, the code is working properly right now.

I've updated the code using your comments, except for different encodings.

AV
Reply | Threaded
Open this post in threaded view
|

Re: Red-colored videos using libav

gouessej
Administrator
Excellent job :) I'll try to find a way of getting the video pixel format but it will be a bit hacky :s Maybe using GLMediaPlayer.getVideoCodec() or adding a listener into it to detect codec change would be enough.
Julien Gouesse | Personal blog | Website
12