From b1e29b2c8582349fe23076e36bbdd74f06cb9df3 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Sat, 2 Oct 2021 13:57:56 +0200 Subject: [PATCH] Enable building medialib --- configure.ac | 10 +++++- osx/deadbeef.xcodeproj/project.pbxproj | 49 ++++++++++++++++++++++++++ plugins/gtkui/Makefile.am | 11 ++++-- plugins/gtkui/gtkui.c | 4 --- plugins/gtkui/prefwin/prefwin.c | 7 ---- po/POTFILES.in | 2 ++ premake5.lua | 22 ++++++++++++ scripts/portable_package_static.sh | 1 + scripts/portable_postbuild.sh | 2 +- 9 files changed, 93 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index 67f63819fc..8bf3d9e492 100644 --- a/configure.ac +++ b/configure.ac @@ -126,6 +126,7 @@ AC_ARG_ENABLE(src, [AS_HELP_STRING([--enable-src ], [build libsamplera AC_ARG_ENABLE(m3u, [AS_HELP_STRING([--enable-m3u ], [build m3u plugin (default: auto)])], [enable_m3u=$enableval], [enable_m3u=yes]) AC_ARG_ENABLE(vfs-zip, [AS_HELP_STRING([--enable-vfs-zip ], [build vfs_zip plugin (default: auto)])], [enable_vfs_zip=$enableval], [enable_vfs_zip=yes]) AC_ARG_ENABLE(converter, [AS_HELP_STRING([--enable-converter ], [build converter plugin (default: auto)])], [enable_converter=$enableval], [enable_converter=yes]) +AC_ARG_ENABLE(medialib, [AS_HELP_STRING([--enable-medialib ], [build media library plugin (default: auto)])], [enable_medialib=$enableval], [enable_medialib=yes]) AC_ARG_ENABLE(dumb, [AS_HELP_STRING([--enable-dumb ], [build DUMB plugin (default: auto)])], [enable_dumb=$enableval], [enable_dumb=yes]) AC_ARG_ENABLE(shn, [AS_HELP_STRING([--enable-shn ], [build SHN plugin (default: auto)])], [enable_shn=$enableval], [enable_shn=yes]) AC_ARG_ENABLE(psf, [AS_HELP_STRING([--enable-psf ], [build AOSDK-based PSF(,QSF,SSF,DSF) plugin (default: auto)])], [enable_psf=$enableval], [enable_psf=yes]) @@ -794,6 +795,10 @@ AS_IF([test "${enable_converter}" != "no"], [ ]) ]) +AS_IF([test "${enable_medialib}" != "no"], [ + HAVE_MEDIALIB=yes +]) + AS_IF([test "${enable_dumb}" != "no"], [ HAVE_DUMB=yes ]) @@ -847,7 +852,7 @@ AS_IF([test "${enable_soundtouch}" != "no"], [ HAVE_SOUNDTOUCH=yes ]) -PLUGINS_DIRS="plugins/liboggedit plugins/libparser plugins/lastfm plugins/mp3 plugins/vorbis plugins/opus plugins/flac plugins/wavpack plugins/sndfile plugins/vfs_curl plugins/cdda plugins/gtkui plugins/alsa plugins/ffmpeg plugins/hotkeys plugins/oss plugins/artwork plugins/adplug plugins/ffap plugins/sid plugins/nullout plugins/supereq plugins/vtx plugins/gme plugins/pulse plugins/notify plugins/musepack plugins/wildmidi plugins/tta plugins/dca plugins/aac plugins/mms plugins/shellexec plugins/shellexecui plugins/dsp_libsrc plugins/m3u plugins/vfs_zip plugins/converter plugins/dumb plugins/shn plugins/psf plugins/mono2stereo plugins/alac plugins/wma plugins/pltbrowser plugins/coreaudio plugins/sc68 plugins/rg_scanner plugins/soundtouch" +PLUGINS_DIRS="plugins/liboggedit plugins/libparser plugins/lastfm plugins/mp3 plugins/vorbis plugins/opus plugins/flac plugins/wavpack plugins/sndfile plugins/vfs_curl plugins/cdda plugins/gtkui plugins/alsa plugins/ffmpeg plugins/hotkeys plugins/oss plugins/artwork plugins/adplug plugins/ffap plugins/sid plugins/nullout plugins/supereq plugins/vtx plugins/gme plugins/pulse plugins/notify plugins/musepack plugins/wildmidi plugins/tta plugins/dca plugins/aac plugins/mms plugins/shellexec plugins/shellexecui plugins/dsp_libsrc plugins/m3u plugins/vfs_zip plugins/converter plugins/dumb plugins/shn plugins/psf plugins/mono2stereo plugins/alac plugins/wma plugins/pltbrowser plugins/coreaudio plugins/sc68 plugins/rg_scanner plugins/soundtouch plugins/medialib" AM_CONDITIONAL(APE_USE_YASM, test "x$APE_USE_YASM" = "xyes") AM_CONDITIONAL(HAVE_VORBIS, test "x$HAVE_VORBISPLUGIN" = "xyes") @@ -897,6 +902,7 @@ AM_CONDITIONAL(HAVE_M3U, test "x$HAVE_M3U" = "xyes") AM_CONDITIONAL(HAVE_VFS_ZIP, test "x$HAVE_VFS_ZIP" = "xyes") AM_CONDITIONAL(HAVE_CONVERTER, test "x$HAVE_CONVERTER" = "xyes") AM_CONDITIONAL(HAVE_YASM, test "x$HAVE_YASM" = "xyes") +AM_CONDITIONAL(HAVE_MEDIALIB, test "x$HAVE_MEDIALIB" = "xyes") AM_CONDITIONAL(HAVE_DUMB, test "x$HAVE_DUMB" = "xyes") AM_CONDITIONAL(HAVE_PSF, test "x$HAVE_PSF" = "xyes") AM_CONDITIONAL(HAVE_SHN, test "x$HAVE_SHN" = "xyes") @@ -979,6 +985,7 @@ plugins/sc68/Makefile plugins/coreaudio/Makefile plugins/rg_scanner/Makefile plugins/soundtouch/Makefile +plugins/medialib/Makefile po/Makefile.in intl/Makefile deadbeef.desktop @@ -1029,6 +1036,7 @@ PRINT_PLUGIN_INFO([hotkeys],[Local and global hotkeys support],[test "x$HAVE_HOT PRINT_PLUGIN_INFO([lastfm],[last.fm scrobbler],[test "x$HAVE_LASTFM" = "xyes"]) PRINT_PLUGIN_INFO([libretro],[Libretro resampler plugin],[test "x$HAVE_LIBRETRO" = "xyes"]) PRINT_PLUGIN_INFO([m3u],[M3U and PLS playlist support],[test "x$HAVE_M3U" = "xyes"]) +PRINT_PLUGIN_INFO([medialib],[Media library],[test "x$HAVE_MEDIALIB" = "xyes"]) PRINT_PLUGIN_INFO([mms],[mms streaming support],[test "x$HAVE_MMS" = "xyes"]) PRINT_PLUGIN_INFO([mono2stereo],[mono2stereo DSP plugin],[test "x$HAVE_MONO2STEREO" = "xyes"]) PRINT_PLUGIN_INFO([mp3],[mp3 plugin],[test "x$HAVE_MP3" = "xyes"]) diff --git a/osx/deadbeef.xcodeproj/project.pbxproj b/osx/deadbeef.xcodeproj/project.pbxproj index 33638f444e..58052d5976 100644 --- a/osx/deadbeef.xcodeproj/project.pbxproj +++ b/osx/deadbeef.xcodeproj/project.pbxproj @@ -885,6 +885,7 @@ 2D30D20E25E2A8930023A299 /* WidgetTopLevelView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D30D20B25E2A8930023A299 /* WidgetTopLevelView.m */; }; 2D3138251D08AB3400CBD871 /* artwork.dylib in Copy Plugins */ = {isa = PBXBuildFile; fileRef = 2D621F831CD92C9000EB6D22 /* artwork.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 2D3992E125C2038700CFA936 /* WeakRefWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D3992DF25C2038700CFA936 /* WeakRefWrapper.h */; }; + 2D3A4BBD1D6315D6002C7098 /* medialib.dylib in Copy Plugins */ = {isa = PBXBuildFile; fileRef = 2D3A4BB41D631530002C7098 /* medialib.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 2D3CD9372409A091005875A9 /* PinnedGroupTitleView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D3CD9352409A091005875A9 /* PinnedGroupTitleView.h */; }; 2D3CD9382409A091005875A9 /* PinnedGroupTitleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D3CD9362409A091005875A9 /* PinnedGroupTitleView.m */; }; 2D3E0E1C1B39AAC20007ECC3 /* btnBrowseTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 2D3E0E1B1B39AAC20007ECC3 /* btnBrowseTemplate.pdf */; }; @@ -912,6 +913,7 @@ 2D48DBFA2269B731002CACFD /* supereq.dylib in Copy Plugins */ = {isa = PBXBuildFile; fileRef = 2DF16CB01DCB62D9007D7F05 /* supereq.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 2D48DBFB2269B731002CACFD /* ddb_mono2stereo.dylib in Copy Plugins */ = {isa = PBXBuildFile; fileRef = 2D1DC0961DCB39EC00441A08 /* ddb_mono2stereo.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 2D48DBFC2269B731002CACFD /* rg_scanner.dylib in Copy Plugins */ = {isa = PBXBuildFile; fileRef = 2D27AED41D9D86ED00842D76 /* rg_scanner.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 2D48DBFD2269B731002CACFD /* medialib.dylib in Copy Plugins */ = {isa = PBXBuildFile; fileRef = 2D3A4BB41D631530002C7098 /* medialib.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 2D48DBFE2269B731002CACFD /* artwork.dylib in Copy Plugins */ = {isa = PBXBuildFile; fileRef = 2D621F831CD92C9000EB6D22 /* artwork.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 2D48DC002269B731002CACFD /* adplug.dylib in Copy Plugins */ = {isa = PBXBuildFile; fileRef = 2D652FCB1CE79E8500163808 /* adplug.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 2D48DC012269B731002CACFD /* ffmpeg.dylib in Copy Plugins */ = {isa = PBXBuildFile; fileRef = 2D026D891CAC5BBF00E27961 /* ffmpeg.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; @@ -1353,6 +1355,7 @@ 2D715C1E26C83A010022A8F0 /* prefwinplugins.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D715C1C26C83A010022A8F0 /* prefwinplugins.h */; }; 2D715C1F26C83A010022A8F0 /* prefwinplugins.c in Sources */ = {isa = PBXBuildFile; fileRef = 2D715C1D26C83A010022A8F0 /* prefwinplugins.c */; }; 2D715C3626C8451A0022A8F0 /* prefwinmedialib.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D715C3426C8451A0022A8F0 /* prefwinmedialib.h */; }; + 2D715C3726C8451A0022A8F0 /* prefwinmedialib.c in Sources */ = {isa = PBXBuildFile; fileRef = 2D715C3526C8451A0022A8F0 /* prefwinmedialib.c */; }; 2D71C26A1DC88E5C00247CEF /* ScriptableTableDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D71C2681DC88E5C00247CEF /* ScriptableTableDataSource.h */; }; 2D71C26B1DC88E5C00247CEF /* ScriptableTableDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D71C2691DC88E5C00247CEF /* ScriptableTableDataSource.m */; }; 2D71F1B624AE7A1A00E753D3 /* mp4p.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 2D71F1B124AE799B00E753D3 /* mp4p.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -2251,12 +2254,15 @@ 2DC656A82744289C00583E14 /* prefwinplugins.c in Sources */ = {isa = PBXBuildFile; fileRef = 2D715C1D26C83A010022A8F0 /* prefwinplugins.c */; }; 2DC656AB2744289C00583E14 /* prefwin.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DE3B5A42269BB4300AFF9AE /* prefwin.c */; }; 2DC656AC2744289C00583E14 /* ddbseekbar.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DE3B5AF2269BB4300AFF9AE /* ddbseekbar.c */; }; + 2DC656AD2744289C00583E14 /* medialibwidget.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DCCCF7D26C43D080034F4BB /* medialibwidget.c */; }; 2DC656AE2744289C00583E14 /* support.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DE3B5B82269BB4300AFF9AE /* support.c */; }; 2DC656AF2744289C00583E14 /* ddbtabstrip.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DE3B5812269BB4300AFF9AE /* ddbtabstrip.c */; }; + 2DC656B02744289C00583E14 /* prefwinmedialib.c in Sources */ = {isa = PBXBuildFile; fileRef = 2D715C3526C8451A0022A8F0 /* prefwinmedialib.c */; }; 2DC656B12744289C00583E14 /* clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DE3B59B2269BB4300AFF9AE /* clipboard.c */; }; 2DC656B22744289C00583E14 /* prefwinmisc.c in Sources */ = {isa = PBXBuildFile; fileRef = 2D715C1126C836FE0022A8F0 /* prefwinmisc.c */; }; 2DC656B32744289C00583E14 /* gdkdrawing.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DE3B5D72269BB4300AFF9AE /* gdkdrawing.c */; }; 2DC656B42744289C00583E14 /* prefwinplayback.c in Sources */ = {isa = PBXBuildFile; fileRef = 2D715C0D26C835E90022A8F0 /* prefwinplayback.c */; }; + 2DC656B52744289C00583E14 /* medialibmanager.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DE55ACD26C5A47F008F33FF /* medialibmanager.c */; }; 2DC656B62744289C00583E14 /* plcommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DE3B5A12269BB4300AFF9AE /* plcommon.c */; }; 2DC656B72744289C00583E14 /* actions.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DE3B5E52269BB4300AFF9AE /* actions.c */; }; 2DC656B82744289C00583E14 /* hotkeys.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DE3B5F72269BB4300AFF9AE /* hotkeys.c */; }; @@ -2428,6 +2434,7 @@ 2DCB5F3E2A71928600F20ABC /* libzip.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D00FE7F2435392E000FC130 /* libzip.framework */; }; 2DCB5F3F2A71928600F20ABC /* libzip.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 2D00FE7F2435392E000FC130 /* libzip.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 2DCCCF7E26C43D080034F4BB /* medialibwidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DCCCF7C26C43D080034F4BB /* medialibwidget.h */; }; + 2DCCCF8026C43D0E0034F4BB /* medialibwidget.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DCCCF7D26C43D080034F4BB /* medialibwidget.c */; }; 2DCF64811D54A2A4002282D3 /* cocoautil.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DD9EF0519A5089F00189344 /* cocoautil.m */; }; 2DCF73B41A952F8900495740 /* PreferencesWindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DCF73B21A952F8900495740 /* PreferencesWindowController.h */; }; 2DCF73B51A952F8900495740 /* PreferencesWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DCF73B31A952F8900495740 /* PreferencesWindowController.m */; }; @@ -2601,6 +2608,7 @@ 2DE5562826075B8400285BF9 /* AlbumArtWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DE5562526075B8400285BF9 /* AlbumArtWidget.h */; }; 2DE5562926075B8400285BF9 /* AlbumArtWidget.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DE5562626075B8400285BF9 /* AlbumArtWidget.m */; }; 2DE55ACE26C5A47F008F33FF /* medialibmanager.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DE55ACC26C5A47F008F33FF /* medialibmanager.h */; }; + 2DE55ADF26C5A580008F33FF /* medialibmanager.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DE55ACD26C5A47F008F33FF /* medialibmanager.c */; }; 2DE77484275E89DF00890350 /* support.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DE7747C275E89DD00890350 /* support.h */; }; 2DE77486275E89DF00890350 /* convgui.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DE7747D275E89DD00890350 /* convgui.c */; }; 2DE77488275E89DF00890350 /* interface.c in Sources */ = {isa = PBXBuildFile; fileRef = 2DE7747E275E89DE00890350 /* interface.c */; }; @@ -2611,6 +2619,7 @@ 2DE77496275E8AFB00890350 /* converter_gtk3.dylib in Copy Plugins */ = {isa = PBXBuildFile; fileRef = 2DE77467275E893400890350 /* converter_gtk3.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 2DE7A7B119A689E600F8C0B8 /* bufferingTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 2DE7A7B019A689E600F8C0B8 /* bufferingTemplate.pdf */; }; 2DE92F561BAFFBEE00F37154 /* wavpack.dylib in Copy Plugins */ = {isa = PBXBuildFile; fileRef = 2DE92F2F1BAFFB4F00F37154 /* wavpack.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 2DEAA7CE2789A256005416CA /* MediaLibTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DAA405A269B6308006D2754 /* MediaLibTests.m */; }; 2DEBA1D223E207A3000E4135 /* EqualizerWindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DEBA1CF23E207A3000E4135 /* EqualizerWindowController.h */; }; 2DEBA1D323E207A3000E4135 /* EqualizerWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DEBA1D023E207A3000E4135 /* EqualizerWindowController.m */; }; 2DEBA1D423E207A3000E4135 /* EqualizerWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2DEBA1D123E207A3000E4135 /* EqualizerWindowController.xib */; }; @@ -3256,6 +3265,13 @@ remoteGlobalIDString = 2D621F821CD92C9000EB6D22; remoteInfo = artwork; }; + 2D3A4BBB1D6315CE002C7098 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4D1B3E7218379829003E6066 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2D3A4BB31D631530002C7098; + remoteInfo = medialib; + }; 2D40E52826CA539E00522C79 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 2DA84F7624F58894003507A2 /* jansson.xcodeproj */; @@ -3291,6 +3307,13 @@ remoteGlobalIDString = 2D27AED31D9D86ED00842D76; remoteInfo = rg_scanner; }; + 2D48DB8B2269B731002CACFD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4D1B3E7218379829003E6066 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2D3A4BB31D631530002C7098; + remoteInfo = medialib; + }; 2D48DB8D2269B731002CACFD /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 4D1B3E7218379829003E6066 /* Project object */; @@ -4434,6 +4457,7 @@ 2DF16CB61DCB62FD007D7F05 /* supereq.dylib in Copy Plugins */, 2D1DC09C1DCB3A1500441A08 /* ddb_mono2stereo.dylib in Copy Plugins */, 2D27AEF11D9D877D00842D76 /* rg_scanner.dylib in Copy Plugins */, + 2D3A4BBD1D6315D6002C7098 /* medialib.dylib in Copy Plugins */, 2D3138251D08AB3400CBD871 /* artwork.dylib in Copy Plugins */, 2D6530E41CE79F4E00163808 /* adplug.dylib in Copy Plugins */, 2D8DA07A1C97184B0044CC15 /* psf.dylib in Copy Plugins */, @@ -4505,6 +4529,7 @@ 2D48DBFA2269B731002CACFD /* supereq.dylib in Copy Plugins */, 2D48DBFB2269B731002CACFD /* ddb_mono2stereo.dylib in Copy Plugins */, 2D48DBFC2269B731002CACFD /* rg_scanner.dylib in Copy Plugins */, + 2D48DBFD2269B731002CACFD /* medialib.dylib in Copy Plugins */, 2D48DBFE2269B731002CACFD /* artwork.dylib in Copy Plugins */, 2D48DC002269B731002CACFD /* adplug.dylib in Copy Plugins */, 2D48DC012269B731002CACFD /* ffmpeg.dylib in Copy Plugins */, @@ -14958,6 +14983,8 @@ 2D48DB842269B731002CACFD /* PBXTargetDependency */, 2D48DB862269B731002CACFD /* PBXTargetDependency */, 2D48DB882269B731002CACFD /* PBXTargetDependency */, + 2D48DB8A2269B731002CACFD /* PBXTargetDependency */, + 2D48DB8C2269B731002CACFD /* PBXTargetDependency */, 2D48DB8E2269B731002CACFD /* PBXTargetDependency */, 2D48DB902269B731002CACFD /* PBXTargetDependency */, 2D48DB922269B731002CACFD /* PBXTargetDependency */, @@ -15647,6 +15674,7 @@ 2DF16CB51DCB62F4007D7F05 /* PBXTargetDependency */, 2D1DC09B1DCB3A1000441A08 /* PBXTargetDependency */, 2D27AEF01D9D876E00842D76 /* PBXTargetDependency */, + 2D3A4BBC1D6315CE002C7098 /* PBXTargetDependency */, 2D3138241D08AB2700CBD871 /* PBXTargetDependency */, 2D6530E31CE79F2900163808 /* PBXTargetDependency */, 2DFD51661C9715FA00961D19 /* PBXTargetDependency */, @@ -17652,6 +17680,7 @@ 2D4A9468223EFC6700199551 /* CoreAudioTests.m in Sources */, 4D31BECE1E9FB194001D1B89 /* ResamplerTests.cpp in Sources */, 2DB521172AAC68C200B6250A /* scriptable.c in Sources */, + 2DEAA7CE2789A256005416CA /* MediaLibTests.m in Sources */, 2DBF3DC5270A101400023138 /* medialibstate.c in Sources */, 2D7F38031B2858AC00692A7B /* JunklibTests.cpp in Sources */, 4D0B0CEE20162D95004162DA /* FormatConversionTests.cpp in Sources */, @@ -17704,13 +17733,16 @@ 2DC656A82744289C00583E14 /* prefwinplugins.c in Sources */, 2DC656AB2744289C00583E14 /* prefwin.c in Sources */, 2DC656AC2744289C00583E14 /* ddbseekbar.c in Sources */, + 2DC656AD2744289C00583E14 /* medialibwidget.c in Sources */, 2DC656AE2744289C00583E14 /* support.c in Sources */, 2DB522FB2AACF14500B6250A /* gtkScriptableSelectViewController.c in Sources */, 2DC656AF2744289C00583E14 /* ddbtabstrip.c in Sources */, + 2DC656B02744289C00583E14 /* prefwinmedialib.c in Sources */, 2DC656B12744289C00583E14 /* clipboard.c in Sources */, 2DC656B22744289C00583E14 /* prefwinmisc.c in Sources */, 2DC656B32744289C00583E14 /* gdkdrawing.c in Sources */, 2DC656B42744289C00583E14 /* prefwinplayback.c in Sources */, + 2DC656B52744289C00583E14 /* medialibmanager.c in Sources */, 2DC656B62744289C00583E14 /* plcommon.c in Sources */, 2D9793F3276F6D2F0062585E /* albumartwidget.c in Sources */, 2D60EB00277235C800C28A44 /* playlistcontroller.c in Sources */, @@ -17802,13 +17834,16 @@ 2D715C1F26C83A010022A8F0 /* prefwinplugins.c in Sources */, 2DE3B7D72269BF1700AFF9AE /* prefwin.c in Sources */, 2DE3B7DC2269BF1700AFF9AE /* ddbseekbar.c in Sources */, + 2DCCCF8026C43D0E0034F4BB /* medialibwidget.c in Sources */, 2DE3B7E12269BF3100AFF9AE /* support.c in Sources */, 2DB522FC2AACF14500B6250A /* gtkScriptableSelectViewController.c in Sources */, 2DE3B7C62269BF1300AFF9AE /* ddbtabstrip.c in Sources */, + 2D715C3726C8451A0022A8F0 /* prefwinmedialib.c in Sources */, 2DE3B7D22269BF1700AFF9AE /* clipboard.c in Sources */, 2D715C1326C836FE0022A8F0 /* prefwinmisc.c in Sources */, 2DE3B7F12269BF3100AFF9AE /* gdkdrawing.c in Sources */, 2D715C0F26C835E90022A8F0 /* prefwinplayback.c in Sources */, + 2DE55ADF26C5A580008F33FF /* medialibmanager.c in Sources */, 2DE3B7D52269BF1700AFF9AE /* plcommon.c in Sources */, 2D9793F4276F6D2F0062585E /* albumartwidget.c in Sources */, 2D60EB01277235C800C28A44 /* playlistcontroller.c in Sources */, @@ -18570,6 +18605,11 @@ target = 2D621F821CD92C9000EB6D22 /* artwork */; targetProxy = 2D3138231D08AB2700CBD871 /* PBXContainerItemProxy */; }; + 2D3A4BBC1D6315CE002C7098 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2D3A4BB31D631530002C7098 /* medialib */; + targetProxy = 2D3A4BBB1D6315CE002C7098 /* PBXContainerItemProxy */; + }; 2D40E52926CA539E00522C79 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = jansson; @@ -18595,6 +18635,11 @@ target = 2D27AED31D9D86ED00842D76 /* rg_scanner */; targetProxy = 2D48DB892269B731002CACFD /* PBXContainerItemProxy */; }; + 2D48DB8A2269B731002CACFD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2D3A4BB31D631530002C7098 /* medialib */; + targetProxy = 2D48DB8B2269B731002CACFD /* PBXContainerItemProxy */; + }; 2D48DB8C2269B731002CACFD /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 2D621F821CD92C9000EB6D22 /* artwork */; @@ -22862,6 +22907,7 @@ GLIB_DISABLE_DEPRECATION_WARNINGS, GTK_DISABLE_DEPRECATION_WARNINGS, "DDB_WARN_DEPRECATED=1", + "ENABLE_MEDIALIB=1", ); GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; GCC_TREAT_WARNINGS_AS_ERRORS = YES; @@ -22926,6 +22972,7 @@ GLIB_DISABLE_DEPRECATION_WARNINGS, GTK_DISABLE_DEPRECATION_WARNINGS, "DDB_WARN_DEPRECATED=1", + "ENABLE_MEDIALIB=1", ); GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; GCC_TREAT_WARNINGS_AS_ERRORS = YES; @@ -23593,6 +23640,7 @@ "DISABLE_MM_KEY_GRABBER=1", "_DEBUG=1", "DDB_ENABLE_SCRIPTABLE=1", + "ENABLE_MEDIALIB=1", ); GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; @@ -23652,6 +23700,7 @@ "HAVE_LOG2=1", "OSX_APPBUNDLE=1", "DDB_ENABLE_SCRIPTABLE=1", + "ENABLE_MEDIALIB=1", ); GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; diff --git a/plugins/gtkui/Makefile.am b/plugins/gtkui/Makefile.am index 90871067fa..2b2a77e99d 100644 --- a/plugins/gtkui/Makefile.am +++ b/plugins/gtkui/Makefile.am @@ -38,6 +38,8 @@ GTKUI_SOURCES = \ namedicons.c namedicons.h\ pltmenu.c\ tfimport.c tfimport.h\ + medialib/medialibwidget.c medialib/medialibwidget.h\ + medialib/medialibmanager.c medialib/medialibmanager.h\ covermanager/covermanager.c covermanager/covermanager.h\ covermanager/gobjcache.c covermanager/gobjcache.h\ covermanager/albumartwidget.c covermanager/albumartwidget.h\ @@ -50,6 +52,7 @@ GTKUI_SOURCES = \ playlist/searchplaylist.c playlist/searchplaylist.h\ prefwin/prefwin.c prefwin/prefwin.h\ prefwin/prefwinappearance.c prefwin/prefwinappearance.h\ + prefwin/prefwinmedialib.c prefwin/prefwinmedialib.h\ prefwin/prefwinmisc.c prefwin/prefwinmisc.h\ prefwin/prefwinnetwork.c prefwin/prefwinnetwork.h\ prefwin/prefwinplayback.c prefwin/prefwinplayback.h\ @@ -61,6 +64,10 @@ GTKUI_SOURCES = \ sdkdir = $(pkgincludedir) sdk_HEADERS = gtkui_api.h +if HAVE_MEDIALIB +MEDIALIB_CFLAGS = -DENABLE_MEDIALIB=1 +endif + if STATICLINK if HAVE_GTK2 if HAVE_GTK3 @@ -95,7 +102,7 @@ ddb_gui_GTK2_la_LDFLAGS = -module -avoid-version ddb_gui_GTK2_la_LIBADD = $(LDADD) $(GTK2_DEPS_LIBS) $(SM_LIBADD) ../libparser/libparser.la ../../shared/libtrkpropertiesutil.la ../../shared/libeqpreset.la ../../shared/libdeletefromdisk.la ../../shared/libtftintutil.la ../../shared/analyzer/libanalyzer.la ../../shared/scope/libscope.la ../../shared/scriptable/libscriptable.la $(JANSSON_LIBS) $(DISPATCH_LIBS) -ddb_gui_GTK2_la_CFLAGS = -std=c99 -Werror -DGLIB_DISABLE_DEPRECATION_WARNINGS -DGDK_DISABLE_DEPRECATION_WARNINGS -DGTK_DISABLE_DEPRECATION_WARNINGS $(GTK2_DEPS_CFLAGS) $(SM_CFLAGS) $(JANSSON_CFLAGS) $(DISPATCH_CFLAGS) -I@top_srcdir@/include -I@top_srcdir@/shared -DDDB_WARN_DEPRECATED=1 +ddb_gui_GTK2_la_CFLAGS = -std=c99 -Werror -DGLIB_DISABLE_DEPRECATION_WARNINGS -DGDK_DISABLE_DEPRECATION_WARNINGS -DGTK_DISABLE_DEPRECATION_WARNINGS $(GTK2_DEPS_CFLAGS) $(SM_CFLAGS) $(JANSSON_CFLAGS) $(DISPATCH_CFLAGS) $(MEDIALIB_CFLAGS) -I@top_srcdir@/include -I@top_srcdir@/shared -DDDB_WARN_DEPRECATED=1 endif @@ -106,7 +113,7 @@ ddb_gui_GTK3_la_LDFLAGS = -module -avoid-version ddb_gui_GTK3_la_SOURCES = $(GTKUI_SOURCES_GTK3) ddb_gui_GTK3_la_LIBADD = $(LDADD) $(GTK3_DEPS_LIBS) $(SM_LIBADD) ../libparser/libparser.la ../../shared/libtrkpropertiesutil.la ../../shared/libeqpreset.la ../../shared/libdeletefromdisk.la ../../shared/libtftintutil.la ../../shared/analyzer/libanalyzer.la ../../shared/scope/libscope.la ../../shared/scriptable/libscriptable.la $(JANSSON_LIBS) $(DISPATCH_LIBS) -ddb_gui_GTK3_la_CFLAGS = -std=c99 -Werror -DGLIB_DISABLE_DEPRECATION_WARNINGS -DGDK_DISABLE_DEPRECATION_WARNINGS -DGTK_DISABLE_DEPRECATION_WARNINGS $(GTK3_DEPS_CFLAGS) $(SM_CFLAGS) $(JANSSON_CFLAGS) $(DISPATCH_CFLAGS) -I@top_srcdir@/include -I@top_srcdir@/shared -DDDB_WARN_DEPRECATED=1 +ddb_gui_GTK3_la_CFLAGS = -std=c99 -Werror -DGLIB_DISABLE_DEPRECATION_WARNINGS -DGDK_DISABLE_DEPRECATION_WARNINGS -DGTK_DISABLE_DEPRECATION_WARNINGS $(GTK3_DEPS_CFLAGS) $(SM_CFLAGS) $(JANSSON_CFLAGS) $(DISPATCH_CFLAGS) $(MEDIALIB_CFLAGS) -I@top_srcdir@/include -I@top_srcdir@/shared -DDDB_WARN_DEPRECATED=1 ddb_gui_GTK3_la_OBJCFLAGS = $(GTK3_DEPS_CFLAGS) $(SM_CFLAGS) $(JANSSON_CFLAGS) nodist_ddb_gui_GTK3_la_SOURCES = gtkui-gresources.c diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index 06c9c496d3..5c11c8fe51 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -52,10 +52,8 @@ #include "gtkui_api.h" #include "hotkeys.h" #include "interface.h" -#if ENABLE_MEDIALIB #include "medialib/medialibmanager.h" #include "medialib/medialibwidget.h" -#endif #include "playlist/plcommon.h" #include "pluginconf.h" #include "prefwin/prefwin.h" @@ -1835,9 +1833,7 @@ quit_gtk_cb (gpointer nothing) { trkproperties_modified = 0; trkproperties_destroy (); search_destroy (); -#if ENABLE_MEDIALIB gtkui_medialib_free(); -#endif #if GTK_CHECK_VERSION(3,10,0) && USE_GTK_APPLICATION g_application_quit (G_APPLICATION (gapp)); #else diff --git a/plugins/gtkui/prefwin/prefwin.c b/plugins/gtkui/prefwin/prefwin.c index a23be530c4..9011f6d15d 100644 --- a/plugins/gtkui/prefwin/prefwin.c +++ b/plugins/gtkui/prefwin/prefwin.c @@ -43,9 +43,7 @@ #include "../wingeom.h" #include "prefwin.h" #include "prefwinappearance.h" -#if ENABLE_MEDIALIVB #include "prefwinmedialib.h" -#endif #include "prefwinmisc.h" #include "prefwinnetwork.h" #include "prefwinplayback.h" @@ -153,10 +151,7 @@ on_prefwin_response_cb (GtkDialog *dialog, gtk_widget_destroy (prefwin); deadbeef->conf_save (); prefwin_free_plugins (); -#if ENABLE_MEDIALIVB prefwin_free_medialib (); -#endif - prefwin = NULL; } @@ -198,9 +193,7 @@ _init_prefwin(void) { // override bar colors prefwin_init_appearance_tab (prefwin); -#if ENABLE_MEDIALIB prefwin_init_medialib (prefwin); -#endif // network ctmapping_setup_init (w); diff --git a/po/POTFILES.in b/po/POTFILES.in index ab30733221..4dee16b894 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -20,6 +20,7 @@ plugins/gtkui/gtk/menus.ui plugins/gtkui/gtkui.c plugins/gtkui/gtkui_deletefromdisk.c plugins/gtkui/interface.c +plugins/gtkui/medialib/medialibwidget.c plugins/gtkui/playlist/mainplaylist.c plugins/gtkui/playlist/plcommon.c plugins/gtkui/playlist/searchplaylist.c @@ -28,6 +29,7 @@ plugins/gtkui/pltmenu.c plugins/gtkui/pluginconf.c plugins/gtkui/prefwin/prefwin.c plugins/gtkui/prefwin/prefwinappearance.c +plugins/gtkui/prefwin/prefwinmedialib.c plugins/gtkui/prefwin/prefwinmisc.c plugins/gtkui/prefwin/prefwinnetwork.c plugins/gtkui/prefwin/prefwinplayback.c diff --git a/premake5.lua b/premake5.lua index 5fdbc2a7ac..de9ef572b8 100644 --- a/premake5.lua +++ b/premake5.lua @@ -1201,6 +1201,28 @@ project "ddb_dsp_libretro" } end +if option ("plugin-medialib") then +project "medialib" + files { + "plugins/medialib/medialib.c", + "plugins/medialib/medialibcommon.c", + "plugins/medialib/medialibdb.c", + "plugins/medialib/medialibfilesystem_stub.c", + "plugins/medialib/medialibscanner.c", + "plugins/medialib/medialibsource.c", + "plugins/medialib/medialibstate.c", + "plugins/medialib/medialibtree.c", + "plugins/medialib/scriptable_tfquery.c", + "shared/scriptable/scriptable.c" + } + includedirs { + "shared" + } + pkgconfig ("jansson") + buildoptions {"-fblocks"} + links {"dispatch", "BlocksRuntime"} +end + project "translations" kind "Utility" files { diff --git a/scripts/portable_package_static.sh b/scripts/portable_package_static.sh index ad937fa115..4352b337c4 100755 --- a/scripts/portable_package_static.sh +++ b/scripts/portable_package_static.sh @@ -86,6 +86,7 @@ tar jcvf ../../portable_out/build/$OUTNAME\ $PLUGDIR/in_sc68.so\ $PLUGDIR/ddb_soundtouch.so\ $PLUGDIR/data68\ + $PLUGDIR/medialib.so\ $PIXMAPDIR\ $SRCDIR/locale\ || exit 1 diff --git a/scripts/portable_postbuild.sh b/scripts/portable_postbuild.sh index d2f1acd823..5eefb9ec52 100755 --- a/scripts/portable_postbuild.sh +++ b/scripts/portable_postbuild.sh @@ -46,7 +46,7 @@ for i in nullout cdda flac alsa mp3 hotkeys vtx \ supereq gme dumb notify musepack wildmidi \ tta dca aac mms shn psf shellexec vfs_zip \ m3u converter pulse dsp_libsrc mono2stereo \ - wma rg_scanner soundtouch artwork\ + wma rg_scanner soundtouch artwork medialib\ ; do if [ -f ./plugins/$i/.libs/$i.so ]; then cp ./plugins/$i/.libs/$i.so $PLUGDIR/