nurupo / vlc-pause-click-plugin

Plugin for VLC that pauses/plays video on mouse click
GNU Lesser General Public License v2.1
914 stars 63 forks source link

fails to build on v4 #51

Closed mailinglists35 closed 5 years ago

mailinglists35 commented 5 years ago

I know it is difficult for you to develop it for v4, but what if my error below is an easy fix, could you have a look? I must use v4 because I it is the only version that plays modern codecs (ios clips, h265 videos etc) without stuttering on my low end legacy graphics card

many thanks!

$ make
cc -std=gnu11 -g0 -O3 -Wall -Wextra -fPIC -D__PLUGIN__ -D_FILE_OFFSET_BITS=64 -I/usr/include/vlc/plugins -DPIC -I. -Isrc -DMODULE_STRING=\"pause_click\"  -c -o pause_click.o pause_click.c
pause_click.c: In function ‘pause_play’:
pause_click.c:142:5: warning: implicit declaration of function ‘playlist_Control’; did you mean ‘vlc_playlist_Count’? [-Wimplicit-function-declaration]
     playlist_Control(p_playlist,
     ^~~~~~~~~~~~~~~~
     vlc_playlist_Count
pause_click.c:143:23: warning: implicit declaration of function ‘playlist_Status’; did you mean ‘vlc_playlist_Start’? [-Wimplicit-function-declaration]
                      (playlist_Status(p_playlist) == PLAYLIST_RUNNING ? PLAYLIST_PAUSE : PLAYLIST_PLAY), 0);
                       ^~~~~~~~~~~~~~~
                       vlc_playlist_Start
pause_click.c:143:54: error: ‘PLAYLIST_RUNNING’ undeclared (first use in this function)
                      (playlist_Status(p_playlist) == PLAYLIST_RUNNING ? PLAYLIST_PAUSE : PLAYLIST_PLAY), 0);
                                                      ^~~~~~~~~~~~~~~~
pause_click.c:143:54: note: each undeclared identifier is reported only once for each function it appears in
pause_click.c:143:73: error: ‘PLAYLIST_PAUSE’ undeclared (first use in this function); did you mean ‘PLAYLIST_RUNNING’?
                  (playlist_Status(p_playlist) == PLAYLIST_RUNNING ? PLAYLIST_PAUSE : PLAYLIST_PLAY), 0);
                                                                     ^~~~~~~~~~~~~~
                                                                         PLAYLIST_RUNNING
pause_click.c:143:90: error: ‘PLAYLIST_PLAY’ undeclared (first use in this function); did you mean ‘PLAYLIST_PAUSE’?
 (playlist_Status(p_playlist) == PLAYLIST_RUNNING ? PLAYLIST_PAUSE : PLAYLIST_PLAY), 0);
                                                                     ^~~~~~~~~~~~~
                                                                                          PLAYLIST_PAUSE
<builtin>: recipe for target 'pause_click.o' failed
make: *** [pause_click.o] Error 1

$ apt policy vlc
vlc:
  Installed: 4.0.0~rc1~~git20181210+r78623+166~ubuntu18.04.1
  Candidate: 4.0.0~rc1~~git20181210+r78623+166~ubuntu18.04.1
  Version table:
 *** 4.0.0~rc1~~git20181210+r78623+166~ubuntu18.04.1 500
        500 http://ppa.launchpad.net/videolan/master-daily/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
     3.0.3-1-1ubuntu1 500
        500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
     3.0.1-3build1 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
mailinglists35 commented 5 years ago

ps: if I see and understand correctly, -rc1 in the version number should indicate a stabilized api?

nurupo commented 5 years ago

v4 is unsupported until it's released, so the build failing is expected. You can see README.md for reasons of why I don't support in-development versions.

nurupo commented 5 years ago

Change #include <vlc_playlist.h> to #include <vlc_playlist_legacy.h> in pause_click.c and try again. The build succeeds but I have not tested if the plugin works. If it does - good, if not - it will have to wait until after v4 is released. I don't want to invest my time into making the plugin work on v4 while it's still in-development and subject to ABI and API changes.

nurupo commented 4 years ago

FYI - the latest version of the plugin has an experimental VLC 4.0 support, so you should be able to build it. There is even a whole separate nightly repository for nightly Windows and macOS plugin builds for VLC 4.0, linked in README.