Skip to content

Commit

Permalink
Merge pull request #1 from wang-bin/master
Browse files Browse the repository at this point in the history
updata
  • Loading branch information
jonntd authored Sep 19, 2019
2 parents a265c8b b51fee7 commit 5219a63
Show file tree
Hide file tree
Showing 701 changed files with 85,365 additions and 35,934 deletions.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 1,17 @@
### QtAV, Qt version and platform

or commit id if not using release version

### Reproduction steps

### Expected behavior

### Actual behavior

### Log file

set environment var `QTAV_LOG=all` or C api `QtAV::setLogLevel(All)` to enable log.

For Player and QMLPlayer example app, choose log level `all` in config page.

### Sample files (optional)
35 changes: 29 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 1,29 @@
CVS
.#*

.hg
.hgignore
*.patch
*.diff
*.orig
#*.rej
contrib/include
*~
*.mak

# Hidden files are ignored by default with exceptions
.*
!/.gitignore
!/.github
!/.gitmodules
!/.qmake.conf
!/.travis.yml

# .install files in debian/ are generated and ignored
debian/*.install

obj
TestResults
*.pbxuser
*.perspectivev3
.DS_Store

*.old
*.log
Expand Down Expand Up @@ -47,16 62,22 @@ Makefile*
*.ilk

#dirs
.moc
.rcc
.obj
/bin*
/lib*
build
Debug
Release
*.Debug
*.Release

# Ignore temporary Python files
python/PyQtAV.api
python/PyQtAV.pro
python/QtAV.pyi
python/QtAVWidgets.pyi
python/QtAV
python/QtAVWidgets

*.fuse*

#qt
Expand All @@ -65,3 86,5 @@ Release
*.moc
*qrc_res.cpp

#cache
*.swp
15 changes: 12 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 1,12 @@
[submodule "contrib/libchardet"]
path = contrib/libchardet
url = https://github.com/wang-bin/libchardet.git
[submodule "contrib/capi"]
path = contrib/capi
url = https://github.com/wang-bin/capi.git
[submodule "tools/build_ffmpeg"]
path = tools/build_ffmpeg
url = https://github.com/wang-bin/build_ffmpeg.git
[submodule "contrib/uchardet"]
path = contrib/uchardet
url = https://github.com/BYVoid/uchardet.git
[submodule "src/jmi"]
path = src/jmi
url = https://github.com/wang-bin/JMI.git
14 changes: 14 additions & 0 deletions .qmake.conf
Original file line number Diff line number Diff line change
@@ -0,0 1,14 @@
QTAV_MAJOR_VERSION = 1
QTAV_MINOR_VERSION = 13
QTAV_PATCH_VERSION = 0

QTAV_VERSION = $${QTAV_MAJOR_VERSION}.$${QTAV_MINOR_VERSION}.$${QTAV_PATCH_VERSION}
#MODULE_VERSION = $$QTAV_VERSION

# set runpath instead of rpath for gcc for elf targets. Qt>=5.5
CONFIG *= enable_new_dtags
# OSX10.6 is not supported in Qt5.4
macx:isEqual(QT_MAJOR_VERSION,5):greaterThan(QT_MINOR_VERSION, 3): CONFIG *= c 11
android: CONFIG*=c 11
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8
QMAKE_IOS_DEPLOYMENT_TARGET = 6.0
59 changes: 45 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 1,55 @@
dist: trusty
#TODO: mingw cross build
language: cpp
compiler:
- clang
cache: apt
install: true
env:
- FFMPEG=ffmpeg-2.2.5

matrix:
include:
- os: osx
compiler: clang
env:
- QT=brew
- AV=ffmpeg-brew
- os: linux
compiler: gcc
env:
- QT=4.8.6
- AV=ffmpeg-1.0.10
- CC=gcc
- os: linux
compiler: clang
env:
- QT=5.0.2
- AV=ffmpeg-1.2.10
- os: linux
compiler: clang
env:
- QT=5.1.1
- AV=ffmpeg-2.0.6
- os: linux
compiler: clang
env:
- QT=5.2.1
- AV=ffmpeg-2.2.11

branches:
only:
- master
- ci
- prelease
- ci/travis
- /^travis.*$/
- dev

git:
submodules: true

install: . tools/ci/$TRAVIS_OS_NAME/install.sh

before_script:
- sudo apt-get update -qq
- sudo apt-get install -qq -y portaudio19-dev libopenal-dev libva-dev libass-dev libxv-dev parallel
script:
- ./tools/ci/travis_build.sh $FFMPEG
- ./tools/ci/$TRAVIS_OS_NAME/script.sh

after_success: ./tools/ci/$TRAVIS_OS_NAME/after_success.sh

notifications:
irc:
channels:
Expand All @@ -24,7 59,3 @@ notifications:
- [email protected]
on_success: change
on_failure: always
env:
- LANG="en_US.UTF-8"
os:
- linux
132 changes: 132 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 1,132 @@
cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR)

project(QTAV)

set(QTAV_MAJOR 1)
set(QTAV_MINOR 13)
set(QTAV_PATCH 0)
set(PROJECT_VERSION ${QTAV_MAJOR}.${QTAV_MINOR}.${QTAV_PATCH})
set(SO_VERSION ${QTAV_MAJOR})

set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

if(POLICY CMP0063) # visibility. since 3.3
cmake_policy(SET CMP0063 NEW)
endif()
if(POLICY CMP0071)
cmake_policy(SET CMP0071 NEW)
endif()
set(CMAKE_CXX_VISIBILITY_PRESET hidden) #use with -fdata-sections -ffunction-sections to reduce target size
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)


option(BUILD_EXAMPLES "Build examples" ON)
option(BUILD_PLAYERS "Build players" ON)
option(BUILD_TESTS "Build tests" ON)
option(BUILD_QT5OPENGL "Build with Qt5 OpenGL module" ON)

list(APPEND CMAKE_FIND_ROOT_PATH ${QTDIR})

find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
get_target_property(qmake Qt5::qmake LOCATION)
execute_process(
COMMAND ${qmake} -query QT_INSTALL_HEADERS
OUTPUT_VARIABLE QT_INSTALL_HEADERS
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND ${qmake} -query QT_INSTALL_LIBS
OUTPUT_VARIABLE QT_INSTALL_LIBS
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND ${qmake} -query QT_INSTALL_BINS
OUTPUT_VARIABLE QT_INSTALL_BINS
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND ${qmake} -query QT_INSTALL_QML
OUTPUT_VARIABLE QT_INSTALL_QML
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND ${qmake} -query QT_INSTALL_PREFIX
OUTPUT_VARIABLE QT_INSTALL_PREFIX
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QT5_CFLAGS}")

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

if(POLICY CMP0063) # visibility. since 3.3
cmake_policy(SET CMP0063 NEW)
endif()
set(CMAKE_CXX_VISIBILITY_PRESET hidden) #use with -fdata-sections -ffunction-sections to reduce target size
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)

# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON) # for .moc
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
if(NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(QTAV_INSTALL_HEADERS ${CMAKE_INSTALL_PREFIX}/include)
set(QTAV_INSTALL_LIBS ${CMAKE_INSTALL_PREFIX}/lib)
set(QTAV_INSTALL_BINS ${CMAKE_INSTALL_PREFIX}/bin)
set(QTAV_INSTALL_QML ${CMAKE_INSTALL_PREFIX}/qml)
else()
set(CMAKE_INSTALL_PREFIX ${QT_INSTALL_PREFIX} CACHE PATH "default install path" FORCE)
set(QTAV_INSTALL_HEADERS ${QT_INSTALL_HEADERS})
set(QTAV_INSTALL_LIBS ${QT_INSTALL_LIBS})
set(QTAV_INSTALL_BINS ${QT_INSTALL_BINS})
set(QTAV_INSTALL_QML ${QT_INSTALL_QML})
endif()

message(STATUS "Qt version: ${Qt5Core_VERSION_STRING}")
message(STATUS "Qt prefix: ${QT_INSTALL_PREFIX}")
message(STATUS "QtAV headers prefix: ${QTAV_INSTALL_HEADERS}")
message(STATUS "QtAV libs prefix: ${QTAV_INSTALL_LIBS}")
message(STATUS "QtAV bins prefix: ${QTAV_INSTALL_BINS}")
message(STATUS "QtAV qml prefix: ${QTAV_INSTALL_QML}")

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

#set(CMAKE_DEBUG_POSTFIX d)

install(FILES
cmake/FindQtAV.cmake
DESTINATION ${QTAV_INSTALL_LIBS}/cmake
)

if(CMAKE_GENERATOR MATCHES "Visual Studio.*")
set(UCRT_INCLUDE $ENV{UniversalCRTSDKDir}Include\\$ENV{UCRTVersion}\\ucrt)
set(VC_ARCH $ENV{Platform})
if(NOT VC_ARCH)
set(VC_ARCH x86)
endif()
set(UCRT_LIB $ENV{UniversalCRTSDKDir}Lib\\$ENV{UCRTVersion}\\ucrt\\${VC_ARCH})
if(EXISTS ${UCRT_INCLUDE})
message("VS project. ucrt: ${UCRT_LIB}")
include_directories(${UCRT_INCLUDE})
link_libraries(${CMAKE_LIBRARY_PATH_FLAG}${UCRT_LIB})
endif()
endif()

add_subdirectory(src)
find_package(Qt5Widgets)
if(Qt5Widgets_FOUND)
add_subdirectory(widgets)
endif()
find_package(Qt5 COMPONENTS Qml Quick)
if(Qt5Qml_FOUND AND Qt5Quick_FOUND)
add_subdirectory(qml)
endif()

if(BUILD_EXAMPLES OR BUILD_PLAYERS)
add_subdirectory(examples)
endif()


Loading

0 comments on commit 5219a63

Please sign in to comment.