caprica / vlcj

Java framework for the vlc media player
http://www.capricasoftware.co.uk/projects/vlcj
1.13k stars 259 forks source link

What causes main libvlc error: stale plugins cache: modified #1182

Closed jmccay-work closed 1 year ago

jmccay-work commented 1 year ago

I am using Java 8, and VLCJ 3.12.1 from maven central. I am trying to figure out what is going on with my code. What causes the stale error and how can I get rid of it? Also, how can I prevent it in the future?

public class Screen {
    private static final Logger LOGGER = Logger.getLogger(Screen.class.getPackage().getName());
    private boolean found = false;
    private final EmbeddedMediaPlayerComponent mediaPlayerComponent;
    private final EmbeddedMediaPlayer mediaPlayer;
    private JPanel panel = null;

    /**
     * Main constructor.
     * @throws com.qed.bookingcam.exceptions.VlcNotFound
     */
    public Screen() throws VlcNotFound {
        if (locateVlc()) {
            LOGGER.log(Level.INFO, String.format("The VLC library version found is %s!", LibVlc.INSTANCE.libvlc_get_version()));
            mediaPlayerComponent = new EmbeddedMediaPlayerComponent();
            this.mediaPlayer = mediaPlayerComponent.getMediaPlayer();
        } else {
            LOGGER.log(Level.INFO, "VLC library not found!");
            mediaPlayerComponent = null;
            throw new VlcNotFound();
        }
    }

    /**
     * You the VLCJ native discovery method to locate the install directory of the VLC program.
     * @return 
     */
    private boolean locateVlc() {
        found = (new NativeDiscovery()).discover();
        return found;
    }

    public boolean isFound() {
        return found;
    }

    /**
     * Get the current panel on which the VLC component is displayed.
     * @return current panel used to display the screen.
     */
    public JPanel getPanel() {
        return panel;
    }

    /**
     * Sets the panel on which the VLC component is displayed.
     * @param panel panel to be used to display the VLC component.
     */
    public void setPanel(JPanel panel) {
        this.panel = panel;
        this.panel.setSize(500, 1000);
        addVlcToPanel();
    }

    public void startStream(String url) {
        this.mediaPlayer.playMedia(url);
    }

    public void cleanupVLC() {
        if (null!=this.mediaPlayerComponent) {
            this.mediaPlayer.release();
            this.mediaPlayerComponent.release();
        }
    }

    private void addVlcToPanel() {
        if (null!=panel) {
            panel.setLayout(new BorderLayout());
            if (null!=this.mediaPlayerComponent) {
                Dimension d = panel.getPreferredSize();
                this.mediaPlayerComponent.setSize(d);
                panel.add(this.mediaPlayerComponent, BorderLayout.CENTER);
            }
        }
    }
}

main libvlc error: stale plugins cache: modified....
caprica commented 1 year ago

Does it happen every time you start your app?

It's really just VLC saying its plugin cache is out of date, so it's not an error as such as the cache should just be regenerated.

In any case, this is more something to do with VLC itself and not something specifically to do with vlcj.

caprica commented 1 year ago

Something like this? https://ubuntuforums.org/showthread.php?t=2388949

jmccay-work commented 1 year ago

Thanks for your response. It happens every time I run debug now. Things worked fine the first day I used it, and then it started doing this.

jmccay-work commented 1 year ago

I wouldn't mind so much if it still worked, but it doesn't work anymore. Here is what I think is the important messages I am getting near the end of the debugging output.

 C:\Program Files (x86)\VideoLAN\VLC\plugins\video_output\libwinhibit_plugin.dll
[014cb5c0] main libvlc error: stale plugins cache: modified C:\Program Files (x86)\VideoLAN\VLC\plugins\video_output\libyuv_plugin.dll
[014cb5c0] main libvlc error: stale plugins cache: modified C:\Program Files (x86)\VideoLAN\VLC\plugins\video_splitter\libclone_plugin.dll
[014cb5c0] main libvlc error: stale plugins cache: modified C:\Program Files (x86)\VideoLAN\VLC\plugins\video_splitter\libpanoramix_plugin.dll
[014cb5c0] main libvlc error: stale plugins cache: modified C:\Program Files (x86)\VideoLAN\VLC\plugins\video_splitter\libwall_plugin.dll
[014cb5c0] main libvlc error: stale plugins cache: modified C:\Program Files (x86)\VideoLAN\VLC\plugins\visualization\libglspectrum_plugin.dll
[014cb5c0] main libvlc error: stale plugins cache: modified C:\Program Files (x86)\VideoLAN\VLC\plugins\visualization\libgoom_plugin.dll
[014cb5c0] main libvlc error: stale plugins cache: modified C:\Program Files (x86)\VideoLAN\VLC\plugins\visualization\libprojectm_plugin.dll
[014cb5c0] main libvlc error: stale plugins cache: modified C:\Program Files (x86)\VideoLAN\VLC\plugins\visualization\libvisual_plugin.dll
[4270c070] wasapi generic error: cannot negotiate audio format (error 0x88890008)
[4270c070] wasapi generic error: cannot negotiate audio format (error 0x88890008)
[4269de08] main decoder error: buffer deadlock prevented
[42f72368] main decoder error: Timestamp conversion failed (delay 1000000, buffering 100000, bound 3000000)
[42f72368] main decoder error: Could not convert timestamp 81708177845 for g711
[42ea3078] direct3d11 vout display error: Could not create the depth stencil texture. (hr=0x80070057)
[4269de08] avcodec decoder: Using D3D11VA (Intel(R) UHD Graphics, vendor 8086(Intel), device 9bc4, revision 5) for hardware decoding
[h264 @ 42705640] get_buffer() failed
[h264 @ 42705640] thread_get_buffer() failed
[h264 @ 42705640] decode_slice_header error
[h264 @ 42705640] no frame!
[42ea3078] direct3d11 vout display error: SetThumbNailClip failed: 0x800706f4
caprica commented 1 year ago

These things can't be caused by vlcj.

Did you try googling for just VLC and this issue rather than vlcj.

jmccay-work commented 1 year ago

I have, and I will continue to do so. I figured that it was the case that is wasn't VLCJ. I had hope someone had seen it before. Again, thank you for the help.