A GlistEngine plugin that plays a video and draws it on the screen using FFmpeg library. For instant, the plugin is compatible with Windows and Linux.
Fork & clone this project into
C:\dev\glist\glistplugins (on Windows) ~/dev/glist/glistplugins (on Linux)
Notice For Linux Developers : Please install necessary libraries before running the plugin:
sudo apt-get install libavcodec58 libavcodec-dev libavformat58 libavformat-dev libavfilter7 libavfilter-dev libavdevice58 libavdevice-dev libavutil56 libavutil-dev libswscale5 libswscale-dev libao-dev libportaudio libportaudio-dev
Please add the PATH variable to eclipse paths by:
Right Click the GlistApp project once on the left, inside the Project Explorer
Then:
Project > Properties > C/C++ Build > Environment
then click PATH followed by clicking Edit on the right. There, at the end of the paths, add:
${workspace_loc}\..\..\..\..\glistplugins\gipFFmpegVideo\prebuilts\bin
- Add gipFFmpegVideo into plugins of your GlistApp/CMakeLists.txt
set(PLUGINS gipFFmpegVideo)
- Include gipFFmpegVideo.h in GameCanvas.h
#include "gipFFmpegVideo.h"
- Define gipFFmpegVideo object
gipFFmpegVideo video;
- Load video and set your app fps (default is 60 if you haven't changed it) in setup
void GameCanvas::setup() {
video.loadVideo("sintel_trailer-480p.mp4");
video.setPaused(false);
video.play();
}
- Draw
void GameCanvas::draw() {
video.draw(x, y);
}
Apache 2