文章目录
安装环境
IDE: Qt5.12
库:
- ffmpeg-4.2.1-win32
- SDL
项目工程配置
pro文件
cpp
TEMPLATE = app
TARGET = SimpleIJKPlayer
DESTDIR = bin
QT += core gui widgets
#CONFIG += debug
#DEFINES += _UNICODE WIN64 QT_WIDGETS_LIB
win32 {
LIBS += -L$$PWD/lib/SDL2/lib/x86 \
-L$$PWD/lib/ffmpeg-4.2.1-win32-dev/lib \
-lSDL2 \
-lavcodec \
-lavdevice \
-lavfilter \
-lavformat \
-lavutil \
-lswresample \
-lswscale
INCLUDEPATH += src \
lib/SDL2/include \
lib/ffmpeg-4.2.1-win32-dev/include
}
unix {
LIBS += \
-lSDL2 \
-lavcodec \
-lavdevice \
-lavfilter \
-lavformat \
-lavutil \
-lswresample \
-lswscale
}
HEADERS += src/customthread.h \
src/datactl.h \
src/globalhelper.h \
src/settingwid.h \
src/about.h \
src/CustomSlider.h \
src/videoctl.h \
src/mainwid.h \
src/medialist.h \
src/title.h \
src/playlist.h \
src/show.h \
src/ctrlbar.h \
src/sonic.h
SOURCES += src/main.cpp \
src/about.cpp \
src/CustomSlider.cpp \
src/customthread.cpp \
src/globalhelper.cpp \
src/settingwid.cpp \
src/videoctl.cpp \
src/ctrlbar.cpp \
src/mainwid.cpp \
src/medialist.cpp \
src/playlist.cpp \
src/show.cpp \
src/title.cpp \
src/sonic.cpp
FORMS += src/mainwid.ui \
src/ctrlbar.ui \
src/show.ui \
src/playlist.ui \
src/title.ui \
src/about.ui \
src/settingwid.ui
RESOURCES += src/mainwid.qrc
库文件
将配置文件解压后放到工程路径下
对应配置文件网盘链接:
链接:https://pan.baidu.com/s/1YO7ftVvrJMiflAOS_0roVw?pwd=regr
提取码:regr