Removed the need for nanosleep() and keeping track of number of events
triggered by libmpv.
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
audio-cb support will be merged to mpv-libretro when a suitable
implementation is merged into libmpv.
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
If we get a sane container-fps value from mpv, we use it to set an
appropriate buffer size length.
Added some further comments.
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
The libretro frontend now controls audio, and can now therefore pause
the video and audio.
This requires a modified version of libmpv which is not currently
upstream: 789aa4528e
Not that all audio is currently converted to 48000Hz.
Squashed commit of the following:
commit ef16a4045e36cb9acd87ef2632d57f7380494781
Author: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
Date: Mon Feb 12 22:29:52 2018 +0000
Working audio-cb
Audio currently resampled to 48kHz.
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
commit 0b430219b8cae47af4f0f32611f888d51c3393b1
Author: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
Date: Mon Feb 12 19:23:38 2018 +0000
Minor audio-cb changes for testing
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
commit 65a2ebe354066839bd8e27584684c901709a1c2b
Author: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
Date: Mon Feb 12 16:51:53 2018 +0000
WIP: use mpv audio-cb output
Audio quality and timing is poor.
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
commit ce22b385461c087217542b2a4c1e0f01ea530164
Author: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
Date: Mon Feb 12 10:22:53 2018 +0000
Remove spaces
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
Retroarch currently has an issue where get_proc_address call fails on
the Raspberry Pi (https://github.com/libretro/RetroArch/issues/6137). If
the call fails, we fall back to loading symbols from libGLESv2.so, if
available.
Tested working on the Pi 3 with buildroot.
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
When an error occurs during context initialisation, libmpv is now
allowed to print logs to better debug issue.
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
Systems that have locale support must be set to "C" locale otherwise
libmpv will complain.
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
Fixed an issue whereby the video size reported by the container was used
instead of the size after filters and the such were applied. Closes#10.
Tested working with 16:9 and 5:4 videos.
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
Some platforms may not support harware decoding, unsure if this would
mean that the hwdec option string would no longer work but falling back
to software decode shouldn't be an issue.
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
Pausing, changing audio and changing subtitles are only performed on the
rising edge of a button press only. They no longer change whilst the
button is pressed.
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>