databrary / datavyu-ffmpegplugin

A Java Media Player based on FFmpeg and SDL2
GNU General Public License v3.0
13 stars 4 forks source link

Dispatch SDL key event to the java Side #187

Closed TheoWolf closed 5 years ago

TheoWolf commented 5 years ago
TheoWolf commented 5 years ago

The feature is working on both Windows and Mac OS. However, when the SDL player is used into datavyu, only the Windows version is working, the Mac version seems to ignore the events. The Mac OS problem will be addressed in future commits.

TheoWolf commented 5 years ago

The https://github.com/databrary/datavyu-ffmpegplugin/tree/add_sdl_keybinding branch and this PR are still in progress, keybindings on Mac are not working as expected. Apparently, Datavyu is blocking threads in charge of forwarding key events from the native side to Datavyu Important Note: When testing Te SimpleSdlMediaPlayer on Mac the native side is sending key events to the Java side as expected, the issue is only when using the SDL player in Datavyu.

FFmpeg plugin Snapshot Dependencies deployed for Datavyu 1.5.0-RC5 Mac OS:

<dependency>
    <groupId>org.datavyu</groupId>
    <artifactId>ffmpeg-plugin</artifactId>
    <version>0.22-20190710.212748-4</version>
    <classifier>mac</classifier>
</dependency>

Windows:

<dependency>
    <groupId>org.datavyu</groupId>
    <artifactId>ffmpeg-plugin</artifactId>
    <version>0.22-20190710.212541-3</version>
    <classifier>win</classifier>
</dependency>
TheoWolf commented 5 years ago

Will merge this branch into dev, key binding is properly forwarded on both platform, Datavyu on Mac is apparently blocking the thread in charge of dispatching key events, will add follow up commits if needed.