blupi-games / planetblupi

Planet Blupi source code
https://www.blupi.org
Other
89 stars 22 forks source link

new libsdl-kitchensink API (1.0) #64

Closed OdyX closed 6 years ago

OdyX commented 6 years ago

Hi there,

you might have seen tha sdl-kitchensink released new versions: https://github.com/katajakasa/SDL_kitchensink/releases

The API changed sufficiently to make planetblupi FTBFS:

--- a/debian/libsdl-kitchensink0.symbols
+++ b/debian/libsdl-kitchensink1.symbols
@@ -1,25 +1,29 @@
-libSDL_kitchensink.so.0 libsdl-kitchensink0 #MINVER#
+libSDL_kitchensink.so.1 libsdl-kitchensink1 #MINVER#
  Kit_ClearError@Base 0.0.6
  Kit_ClosePlayer@Base 0.0.6
  Kit_CloseSource@Base 0.0.6
  Kit_CreatePlayer@Base 0.0.6
+ Kit_CreateSourceFromCustom@Base 1.0.2
  Kit_CreateSourceFromUrl@Base 0.0.6
- Kit_GetAudioData@Base 0.0.6
  Kit_GetBestSourceStream@Base 0.0.6
  Kit_GetError@Base 0.0.6
+ Kit_GetHint@Base 1.0.2
  Kit_GetKitStreamTypeString@Base 0.0.6
+ Kit_GetPlayerAudioData@Base 1.0.2
+ Kit_GetPlayerAudioStream@Base 1.0.2
  Kit_GetPlayerDuration@Base 0.0.6
  Kit_GetPlayerInfo@Base 0.0.6
  Kit_GetPlayerPosition@Base 0.0.6
  Kit_GetPlayerState@Base 0.0.6
+ Kit_GetPlayerSubtitleData@Base 1.0.2
+ Kit_GetPlayerSubtitleStream@Base 1.0.2
+ Kit_GetPlayerVideoData@Base 1.0.2
+ Kit_GetPlayerVideoStream@Base 1.0.2
  Kit_GetSDLAudioFormatString@Base 0.0.6
  Kit_GetSDLPixelFormatString@Base 0.0.6
- Kit_GetSourceStream@Base 0.0.6
  Kit_GetSourceStreamCount@Base 0.0.6
  Kit_GetSourceStreamInfo@Base 0.0.6
- Kit_GetSubtitleData@Base 0.0.6
  Kit_GetVersion@Base 0.0.6
- Kit_GetVideoData@Base 0.0.6
  Kit_Init@Base 0.0.6
  Kit_PlayerPause@Base 0.0.6
  Kit_PlayerPlay@Base 0.0.6
@@ -27,4 +31,5 @@ libSDL_kitchensink.so.0 libsdl-kitchensink0 #MINVER#
  Kit_PlayerStop@Base 0.0.6
  Kit_Quit@Base 0.0.6
  Kit_SetError@Base 0.0.6
- Kit_SetSourceStream@Base 0.0.6
+ Kit_SetHint@Base 1.0.2
+ Kit_SetPlayerScreenSize@Base 1.0.2

I needed to add a small patch to permit building:

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -125,7 +125,8 @@ find_package (SDLKitchensink REQUIRED)
 include_directories (${SDLKitchensink_INCLUDE_DIRS})

 find_package (PkgConfig REQUIRED)
-pkg_search_module (SDL2 REQUIRED sdl2)
+find_package (SDL2 REQUIRED)
+include_directories (${SDL2_INCLUDE_DIRS})
 pkg_search_module (SDL2_MIXER REQUIRED SDL2_mixer)
 pkg_search_module (SDL2_IMAGE REQUIRED SDL2_image)
 if (${PB_HTTP_VERSION_CHECK})

But it still fails to build: The first errors are:

{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx: In member function ‘bool CMovie::initAVI()’:
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx:39:26: error: ‘KIT_INIT_FORMATS’ was not declared in this scope
   Sint32 err = Kit_Init (KIT_INIT_FORMATS);
                          ^~~~~~~~~~~~~~~~
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx:39:26: note: suggested alternative: ‘KIT_INIT_ASS’
   Sint32 err = Kit_Init (KIT_INIT_FORMATS);
                          ^~~~~~~~~~~~~~~~
                          KIT_INIT_ASS
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx: In member function ‘bool CMovie::fileOpenMovie(const string&)’:
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx:107:41: error: too few arguments to function ‘Kit_Player* Kit_CreatePlayer(const Kit_Source*, int, int, int, int, int)’
     m_player = Kit_CreatePlayer (m_movie);
                                         ^
In file included from /usr/include/kitchensink/kitchensink.h:17:0,
                 from {{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx:25:
/usr/include/kitchensink/kitplayer.h:105:21: note: declared here
 KIT_API Kit_Player* Kit_CreatePlayer(const Kit_Source *src,
                     ^~~~~~~~~~~~~~~~
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx:117:39: error: ‘Kit_PlayerStreamInfo {aka struct Kit_PlayerStreamInfo}’ has no member named ‘samplerate’
     wanted_spec.freq     = info.audio.samplerate;
                                       ^~~~~~~~~~
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx:118:39: error: ‘Kit_PlayerStreamInfo {aka struct Kit_PlayerStreamInfo}’ has no member named ‘format’
     wanted_spec.format   = info.audio.format;
                                       ^~~~~~
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx:119:39: error: ‘Kit_PlayerStreamInfo {aka struct Kit_PlayerStreamInfo}’ has no member named ‘channels’
     wanted_spec.channels = info.audio.channels;
                                       ^~~~~~~~
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx:124:30: error: ‘Kit_PlayerStreamInfo {aka struct Kit_PlayerStreamInfo}’ has no member named ‘format’
       g_renderer, info.video.format, SDL_TEXTUREACCESS_TARGET, info.video.width,
                              ^~~~~~
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx:124:75: error: ‘Kit_PlayerStreamInfo {aka struct Kit_PlayerStreamInfo}’ has no member named ‘width’
       g_renderer, info.video.format, SDL_TEXTUREACCESS_TARGET, info.video.width,
                                                                           ^~~~~
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx:125:18: error: ‘Kit_PlayerStreamInfo {aka struct Kit_PlayerStreamInfo}’ has no member named ‘height’
       info.video.height);
                  ^~~~~~
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx: In member function ‘bool CMovie::Render()’:
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx:263:15: error: ‘Kit_GetAudioData’ was not declared in this scope
       m_ret = Kit_GetAudioData (
               ^~~~~~~~~~~~~~~~
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx:263:15: note: suggested alternative: ‘Kit_GetPlayerAudioData’
       m_ret = Kit_GetAudioData (
               ^~~~~~~~~~~~~~~~
               Kit_GetPlayerAudioData
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx:290:3: error: ‘Kit_GetVideoData’ was not declared in this scope
   Kit_GetVideoData (m_player, m_videoTex);
   ^~~~~~~~~~~~~~~~
{{ BUILDDIR }}/planetblupi-1.12.5/src/movie.cxx:290:3: note: suggested alternative: ‘Kit_GetPlayerVideoData’
   Kit_GetVideoData (m_player, m_videoTex);
   ^~~~~~~~~~~~~~~~
   Kit_GetPlayerVideoData
Skywalker13 commented 6 years ago

Yes, I've seen thanks; I must look for its last changes because now it supports Android (indirectly) too and I've a working version for Android that I want to finish. I'm must update kitchensink for this reason.

Skywalker13 commented 6 years ago

I've most fixes in the #65 MR

Skywalker13 commented 6 years ago

Merged in master

Skywalker13 commented 6 years ago

I will release a new version v1.12.6 (soon) because I've other small fixes