Commit Graph

73 Commits

Author SHA1 Message Date
Mahyar Koshkouei e3077ac078 libretro-common: update
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-05-23 09:16:34 +01:00
Mahyar Koshkouei dde40b7732 Use libretro-common
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-02-24 23:20:15 +00:00
Mahyar Koshkouei a8f84fa9b4 Fix build for C99
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-02-24 15:13:32 +00:00
twinaphex 665aa372e0 Updates 2018-02-24 14:34:03 +01:00
Mahyar Koshkouei c5c2053913 Link to math lib
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-02-23 12:43:23 +00:00
Mahyar Koshkouei 6bb5c358f3 Use fps to set appropriate audio buffer size
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>
2018-02-23 12:27:43 +00:00
Mahyar Koshkouei 6e0e2b949c Fix sampling rate
Doesn't affect anything, since it was reset to 48kHz immediately after
anyway.

Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-02-12 22:46:44 +00:00
Mahyar Koshkouei 4e359318c4 Use audio callback
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>
2018-02-12 22:35:56 +00:00
Mahyar Koshkouei 2cea3d17b5 Force gnu99 since it's currently required
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-02-11 20:29:57 +00:00
Mahyar Koshkouei 5e06e100b2 Workaround for get_proc_address failing
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>
2018-01-24 18:57:49 +00:00
Mahyar Koshkouei 3642b31b8a Preliminary fix to stop overloading logs
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-24 18:57:23 +00:00
Mahyar Koshkouei 8c658229c1 Print mpv logging on error
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>
2018-01-24 17:41:42 +00:00
Mahyar Koshkouei 27b40337e8 Change if statements to make explicit checks
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-19 22:34:17 +00:00
Mahyar Koshkouei 07e0c1d10e Remove unused ifdef for GL setting
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-19 22:09:30 +00:00
Mahyar Koshkouei a4fb27346f Shutdown core after eof reached
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-15 22:53:55 +00:00
Mahyar Koshkouei 262eaf1882 Reset geometry once we know video size
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-15 21:11:42 +00:00
Mahyar Koshkouei 5ac3dca1b7 Suppress warning
I don't know of a way of fixing the function pointer warning.

Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-14 12:21:02 +00:00
Mahyar Koshkouei 97d910da99 Add help target
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-14 12:20:47 +00:00
Mahyar Koshkouei 67ed3ce49e Remove double fpic in Makefile
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-14 12:20:22 +00:00
Mahyar Koshkouei 1d05713672 Enable locale support by default
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-14 12:19:41 +00:00
Mahyar Koshkouei 59ba06a1ec Remove unnecessary GL options
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-14 12:03:35 +00:00
Mahyar Koshkouei 87d4158ee1 Exit on libmpv failure
These errors shouldn't happen. But if they do we don't want to continue.

Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-14 11:15:05 +00:00
Mahyar Koshkouei 3f882b445d Return error on get_proc_address failure
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-14 11:14:26 +00:00
Mahyar Koshkouei 21c7d127a8 Sort includes
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-14 11:13:57 +00:00
Mahyar Koshkouei b72446d4d6 Locale changes
Systems that have locale support must be set to "C" locale otherwise
libmpv will complain.

Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-14 11:13:02 +00:00
Mahyar Koshkouei 1450694edb Add install and debug to Makefile
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-13 09:41:52 +00:00
Mahyar Koshkouei ffeec1a197 Enable debugging
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-10 13:49:17 +00:00
Mahyar Koshkouei 7534a3d6e9 Fix Makefile platform detection
Now works with buildroot.

Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-09 19:58:16 +00:00
Mahyar Koshkouei fd7fb797da Minor code style change
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-08 20:02:04 +00:00
Mahyar Koshkouei a0cae4f346 Bump version
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-08 19:31:54 +00:00
Mahyar Koshkouei 4ef000bb34 Fix incorrect aspect ratio
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>
2018-01-08 19:31:54 +00:00
Mahyar Koshkouei 014e758361 Don't stop on hwdec failure
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>
2018-01-08 10:51:46 +00:00
Mahyar Koshkouei 19036f5b74 Use ffmpeg valid extensions
Use the valid extensions as listed by ffmpeg.

Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-08 10:40:56 +00:00
Mahyar Koshkouei 416211e780 Add licence notice to source
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-08 01:04:41 +00:00
Mahyar Koshkouei 7294c33e62
Create LICENSE 2018-01-08 00:56:02 +00:00
Mahyar Koshkouei 12845cd676
Fix spelling 2018-01-08 00:53:13 +00:00
Mahyar Koshkouei be2a895144 Add issue numbers to todo labels
There should be no untracked todo's.

Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-08 00:15:17 +00:00
Mahyar Koshkouei 278ab3d394 Change comments style
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-08 00:05:25 +00:00
Mahyar Koshkouei 44ea1570d5 Add tags to gitignore
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-07 23:58:17 +00:00
Mahyar Koshkouei 2a399a8793 Move struct declaration to local
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-07 23:57:49 +00:00
Mahyar Koshkouei f50d33ac68 Changes for input on rising edge only
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>
2018-01-07 23:36:24 +00:00
Mahyar Koshkouei a907c8756f Change default pixel format
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-07 22:07:19 +00:00
Mahyar Koshkouei 425dc752c2 Use correct version
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-07 21:50:54 +00:00
Mahyar Koshkouei 2c42b3613b Do not link to libm
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-07 21:18:47 +00:00
Mahyar Koshkouei 24083619a7 Add .gitignore
Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-07 20:52:17 +00:00
Mahyar Koshkouei 0d92199936 Cleanup Makefile
Additionally strip the output object file.

Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-07 20:51:55 +00:00
Mahyar Koshkouei 052a95b7bf Use libretro.h instead of submodule
This allows releases to include the libretro.h header file required for
compiling. We also don't require any of the other header files the
submodule provided.

Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-07 20:31:00 +00:00
Mahyar Koshkouei 0c4d58e326 Context fixes and logging
Fixed an issue whereby changing context (eg. going fullscreen) stopped
video, caused music to continue playing until eventually pulseaudio
segfaulted. Closes #1.

Print out mpv log.

Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-05 23:19:16 +00:00
Mahyar Koshkouei 8038eb3465
Rename repository 2018-01-03 10:29:26 +00:00
Mahyar Koshkouei 24e6ed7fdc Set framebuffer size to video resolution
We now automatically select the correct video size and aspect ratio. Now
the video doesn't look like a blury mess.

Closes issue #8.

Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
2018-01-03 00:04:43 +00:00