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

Is it going to use sdl2_nim or sdl2? #3

Open
gogolxdong opened this issue Jan 21, 2020 · 2 comments
Open

Is it going to use sdl2_nim or sdl2? #3

gogolxdong opened this issue Jan 21, 2020 · 2 comments

Comments

@gogolxdong
Copy link

gogolxdong commented Jan 21, 2020

Is it going to use sdl2_nim or sdl2, updateYUVTexture only exists in sdl2_nim,
but

import sdl2,sdl2/audio 

of fplay.nim
means import from nim-lang/sdl2, though it compiles and can play video, but sound processing has some obvious issue, makes sound sharp and lags. I suspect that it has some business with this issue.Using sdl2_nim uses

import sdl2/sdl

is enough, it includes all the modules.

I've tried using sdl2_nim , it's the same, not sure where the issue lies in.

@mashingan
Copy link
Owner

mashingan commented Jan 21, 2020

For the fplay.nim example, I'm using nim-lang/sdl2.

As for its audio example, it's indeed has problem with choppy player. I believe due to SDL2 added a silent padding on each audio frame so it's playing a choppy audio.

I was looking a workaround for this issue, one of workaround I found is using queued frame for video and audio frame on different thread and play those frame when the queued packet/frame is enough. (ref: fosterseth/sdl2_video_player .

I haven't had any chance to try it further, will look it later.

@gogolxdong
Copy link
Author

Thanks for your quick reply, hope your workaround works and looking forward to the progress.

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