-
Notifications
You must be signed in to change notification settings - Fork 16
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
Other surface options #43
Comments
Exactly what I was looking for 👍 I only know OpenGL case, but the issue is caused by the fact that SDL Textures need a renderer. A well known issue is that this renderer, does not work very well with other OpenGL contexts (to illustrate, see ocornut/imgui#935 ). Provide as SDL Surface, or simple bitmap could be very helpfull too, and lead to an easy use (e.g. using FBO, or PBO). For other cases, like Direct3D or Vulkan, I don't know, but I can imagine this could be interesting too. Just in case, some links I found in meantime:
Last but not least, a completely orthogonal approach :
If I find something interesting, I'll keep you informed. HTH |
After reading more deeply the code, in include/kitchensink/kitplayer.h, we have GetPlayerVideoData() function :
What about:
Or maybe the GetVideoData is enough, and instantiate a texture could be done after, using another method/function ? As previously explained, your kit works extremely well, but the SDL2 renderer is not an option for me. FYI, I'll try to implement the Kit_GetPlayerVideoOpenGLData (Kit_Player *player, glTexture2D *texture), and I'll keep you informed if I'm doing progress (or not). |
In addition to these changes, also need to change subtitle texture stuff. |
FYI, I'm testing : Kit_GetPlayerVideoOpenCVData (see : https://github.com/ebachard/SDL_kitchensink/blob/master/src/internal/video/kitvideo.c ). I'm still stuck with a mysterious buffer update or visibility issue (some lock somewhere, and the frame is not updated), but I think this could be usefull too. At least me, because I'm very interested to decode frames and turn them into OpenCV Mat. Too bad the SDL2 renderer cannot be mixed safely with OpenGL context. |
FYI, one other case (works well so far) : https://github.com/mattbeghin/FFmpegHapGlPlayer |
This was originally part of v1 plans, but moved to v2 now.
SDL_Texture is basically a wrapper for OpenGL/Direct3D textures. It might be a good idea to let the library decode directly on those (In addition to / instead of) SDL_Textures.
Consider:
The text was updated successfully, but these errors were encountered: