Login  Register

Red-colored videos using libav

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

Re: Red-colored videos using libav

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

Re: Red-colored videos using libav

gouessej
Administrator
6044 posts
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
| More
Print post
Permalink

Re: Red-colored videos using libav

Aksenov239
15 posts
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
| More
Print post
Permalink

Re: Red-colored videos using libav

gouessej
Administrator
6044 posts
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