Skip to content

Commit 3d50866

Browse files
author
Clement Champetier
committed
Merge branch 'develop' of https://github.com/avTranscoder/avTranscoder into build_appveyor
2 parents a56139e + 698e8c6 commit 3d50866

File tree

155 files changed

+4489
-2592
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+4489
-2592
lines changed

.travis.yml

Lines changed: 82 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,97 @@
1+
# Use container-based infrastructure
2+
sudo: required
3+
services:
4+
- docker
5+
6+
language: cpp
7+
18
os:
29
- linux
310
- osx
411

5-
language: cpp
6-
712
compiler:
813
- gcc
914
- clang
1015

16+
env:
17+
global:
18+
- AVTRANSCODER_BUILD=${TRAVIS_BUILD_DIR}/build-avtranscoder
19+
- AVTRANSCODER_INSTALL=${TRAVIS_BUILD_DIR}/install-avtranscoder
20+
- DEPENDENCY_INSTALL=${TRAVIS_BUILD_DIR}/install-dependency
21+
- CI_NODE_TOTAL=2
22+
matrix:
23+
- DEPENDENCY_MODE=libav ENABLE_COVERAGE=true
24+
- DEPENDENCY_MODE=libav ENABLE_COVERAGE=false
25+
- DEPENDENCY_MODE=ffmpeg ENABLE_COVERAGE=true
26+
- DEPENDENCY_MODE=ffmpeg ENABLE_COVERAGE=false
27+
28+
matrix:
29+
# generate coverage only with gcc
30+
exclude:
31+
- compiler: clang
32+
env: DEPENDENCY_MODE=ffmpeg ENABLE_COVERAGE=true
33+
- compiler: clang
34+
env: DEPENDENCY_MODE=libav ENABLE_COVERAGE=true
35+
allow_failures:
36+
- os: osx
37+
fast_finish: true
38+
39+
# This results in a 2×2×2x2 build matrix.
40+
# Where the variables are: os / compiler / DEPENDENCY_MODE / ENABLE_COVERAGE
41+
42+
addons:
43+
apt:
44+
sources: ['kalakris-cmake']
45+
packages:
46+
- cmake
47+
- swig
48+
- python-dev
49+
- python-nose
50+
- freeglut3-dev
51+
52+
cache:
53+
# Caching Ubuntu packages
54+
apt: true
55+
# Caching other directories
56+
directories:
57+
- ${DEPENDENCY_INSTALL}
58+
1159
before_script:
1260
- env | sort
1361
- date -u
1462
- uname -a
1563

16-
- chmod +x tools/travis.linux.install.deps.sh
17-
- chmod +x tools/travis.osx.install.deps.sh
18-
19-
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ./tools/travis.linux.install.deps.sh; fi
20-
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ./tools/travis.osx.install.deps.sh; fi
64+
- cd ${TRAVIS_BUILD_DIR}
65+
66+
# install coverage tools
67+
- if [ ${ENABLE_COVERAGE} ]; then ./tools/travis.gcc.install.coverage.sh; fi
68+
69+
# install avtranscoder dependencies
70+
- if [ ${TRAVIS_OS_NAME} = "linux" ]; then ./tools/travis.linux.install.deps.sh; fi
71+
- if [ ${TRAVIS_OS_NAME} = "osx" ]; then ./tools/travis.osx.install.deps.sh; fi
2172

2273
script:
23-
# Build
24-
- mkdir build
25-
- cd build
26-
- cmake .. -DCMAKE_INSTALL_PREFIX=`pwd`/dist
27-
- make install
28-
# Launch tests
29-
- cd ..
30-
- chmod +x tools/travis.python.nosetests.sh
31-
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ./tools/travis.python.nosetests.sh; fi
74+
# build
75+
- ./tools/travis.build.sh
76+
77+
# launch tests
78+
- if [ ${DEPENDENCY_MODE} = "ffmpeg" ]; then ./tools/travis.python.nosetests.sh; fi
79+
80+
after_success:
81+
# generate coverage for coveralls
82+
- if [ ${ENABLE_COVERAGE} ]; then ./tools/travis.gcc.generate.coverage.sh; fi
83+
84+
before_deploy:
85+
# create archive
86+
- cd ${TRAVIS_BUILD_DIR}
87+
- tar -cvzf avtranscoder-${TRAVIS_OS_NAME}-${CC}-${DEPENDENCY_MODE}.tgz ${DEPENDENCY_INSTALL} ${AVTRANSCODER_INSTALL}
88+
89+
deploy:
90+
provider: releases
91+
api_key:
92+
secure: ${GITHUB_RELEASE_API_KEY}
93+
file: avtranscoder-${TRAVIS_OS_NAME}-${CC}-${DEPENDENCY_MODE}.tgz
94+
skip_cleanup: true
95+
on:
96+
branch: master
97+
condition: ${ENABLE_COVERAGE} = false

CMakeLists.txt

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,34 @@ cmake_minimum_required(VERSION 2.8.11)
22

33
project(AvTranscoder)
44

5-
# Set AvTranscoder versions
6-
set(AVTRANSCODER_VERSION_MAJOR "0")
7-
set(AVTRANSCODER_VERSION_MINOR "5")
8-
set(AVTRANSCODER_VERSION_MICRO "4")
9-
set(AVTRANSCODER_VERSION ${AVTRANSCODER_VERSION_MAJOR}.${AVTRANSCODER_VERSION_MINOR}.${AVTRANSCODER_VERSION_MICRO})
10-
11-
# Define AvTranscoder versions
12-
add_definitions(-DAVTRANSCODER_VERSION_MAJOR=${AVTRANSCODER_VERSION_MAJOR})
13-
add_definitions(-DAVTRANSCODER_VERSION_MINOR=${AVTRANSCODER_VERSION_MINOR})
14-
add_definitions(-DAVTRANSCODER_VERSION_MICRO=${AVTRANSCODER_VERSION_MICRO})
15-
165
# Define AvTranscoder default path to profiles
17-
add_definitions(-DAVTRANSCODER_DEFAULT_AVPROFILES="${CMAKE_INSTALL_PREFIX}/share/ressource")
6+
add_definitions(-DAVTRANSCODER_DEFAULT_AVPROFILES="${CMAKE_INSTALL_PREFIX}/share/avprofiles")
187

198
# Diplay commands being ran by CMake
209
set(CMAKE_VERBOSE_MAKEFILE OFF)
2110

11+
# The install rule does not depend on all, i.e. everything will not be built before installing
12+
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY TRUE)
13+
2214
# CPP flags on debug / release mode
2315
if(MSVC)
2416
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
2517
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
2618
else()
27-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -fPIC -pg -g")
28-
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC -O3")
19+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -fPIC -g")
20+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -fPIC -O3")
2921
endif()
3022

23+
# CPP flag to create code coverage report
24+
if(AVTRANSCODER_COVERAGE)
25+
message("Add coverage build option.")
26+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
27+
endif()
3128

29+
# Build library
3230
add_subdirectory(src)
3331

32+
# Build apps
3433
if(AVTRANSCODER_DISABLE_APPS)
3534
message("Apps disabled, will not build applications.")
3635
else()

INSTALL.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,29 @@ cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install
4545
```
4646
cmake .. -DCMAKE_BUILD_TYPE=Release/Debug
4747
```
48+
###### To build python binding with a specific python version
49+
```
50+
cmake .. -DAVTRANSCODER_PYTHON_VERSION_OF_BINDING=2.7
51+
```
4852

4953
#### Mac OSX using homebrew
5054

5155
###### Install homebrew
5256
http://brew.sh/
5357

5458
###### Install avTranscoder
59+
Last stable version:
5560
```
5661
brew tap cbenhagen/video
5762
brew install avtranscoder
5863
```
5964

65+
From develop branch:
66+
```
67+
brew tap cbenhagen/video
68+
brew install avtranscoder --devel
69+
```
70+
6071
###### Use homebrew to install only dependencies
6172
```
6273
brew deps avtranscoder

README.md

Lines changed: 13 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ C++ API for Libav / FFmpeg
44

55
Based on Libav/FFmpeg libraries to support various video and audio formats, avTranscoder provides the high level API to re-wrap or transcode media easily.
66

7+
[![Build Status](https://travis-ci.org/avTranscoder/avTranscoder.svg?branch=develop)](https://travis-ci.org/avTranscoder/avTranscoder)
8+
[![Coverage Status](https://coveralls.io/repos/avTranscoder/avTranscoder/badge.svg)](https://coveralls.io/r/avTranscoder/avTranscoder)
9+
<a href="https://scan.coverity.com/projects/2626"><img alt="Coverity Scan Build Status" src="https://scan.coverity.com/projects/2626/badge.svg"/></a>
10+
711
#### What you need to know
812
* C++ library
913
* Java and Python bindings generated with SWIG
@@ -13,53 +17,14 @@ Based on Libav/FFmpeg libraries to support various video and audio formats, avTr
1317
#### License
1418
See [**COPYING.md**](COPYING.md)
1519

16-
#### Compilation
17-
See [**INSTALL.md**](INSTALL.md)
18-
1920
#### How to use
20-
Check out applications contained in the project to see examples of how to use the library in C++, Java or Python.
21+
See [**USAGE.md**](USAGE.md)
2122

22-
To encode, avTranscoder manipulates profiles.
23-
A profile is a text file which discribes, with a set of key-value, what we want as output for the format, the video, or the audio.
24-
You can create your own profiles and export a variable called ```AVPROFILES``` to indicate the path to them.
23+
#### Documentation
24+
See [**Doxygen documentation**](http://avtranscoder.github.io/avTranscoder-doxygen/)
2525

26-
The minimum format profile is:
27-
```
28-
avProfileName=profileName
29-
avProfileLongName=profileLongName
30-
avProfileType=avProfileTypeFormat
31-
format=formatName
32-
```
33-
34-
The minimum video profile is:
35-
```
36-
avProfileName=profileName
37-
avProfileLongName=profileLongName
38-
avProfileType=avProfileTypeVideo
39-
codec=codecName
40-
```
41-
42-
The minimum audio profile is:
43-
```
44-
avProfileName=profileName
45-
avProfileLongName=profileLongName
46-
avProfileType=avProfileTypeAudio
47-
codec=codecName
48-
```
49-
50-
#### Continuous Integration
51-
52-
###### Drone.io
53-
[![Build Status](https://drone.io/github.com/avTranscoder/avTranscoder/status.png)](https://drone.io/github.com/avTranscoder/avTranscoder/latest)
54-
55-
###### Travis
56-
[![Build Status](https://travis-ci.org/avTranscoder/avTranscoder.svg?branch=master)](https://travis-ci.org/avTranscoder/avTranscoder)
57-
58-
###### Coverity Scan
59-
<a href="https://scan.coverity.com/projects/2626">
60-
<img alt="Coverity Scan Build Status"
61-
src="https://scan.coverity.com/projects/2626/badge.svg"/>
62-
</a>
26+
#### Compilation
27+
See [**INSTALL.md**](INSTALL.md)
6328

6429
#### Tests
6530

@@ -83,3 +48,7 @@ Note: for continuous integration, we launch tests with media files contained in
8348
###### Build openSUSE
8449
comming soon
8550

51+
52+
53+
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/avTranscoder/avtranscoder/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
54+

USAGE.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# How to use avTranscoder
2+
3+
Check out applications contained in the project to see examples of how to use the library in C++, Java or Python.
4+
5+
#### In C++
6+
Set environment:
7+
```
8+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/ffmpeg/lib:/path/to/avtranscoder/lib
9+
export PATH=$PATH:/path/to/avtranscoder/bin
10+
```
11+
12+
#### In Java
13+
Add argument to the JVM:
14+
```
15+
-Djava.library.path=/path/to/avtranscoder/lib/java
16+
```
17+
Set environment:
18+
```
19+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/ffmpeg/lib
20+
```
21+
22+
#### In Python
23+
Set environment:
24+
```
25+
export PYTHONPATH=$PYTHONPATH:/path/to/avtranscoder/lib/python<version>/site-packages/
26+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/ffmpeg/lib
27+
```
28+
29+
#### Use profiles
30+
To wrap/unwrap/encode/decode, avTranscoder manipulates profiles.
31+
A profile is a set of key-value given as parameters to the InputFile(unwrap), the OutputFile(wrap), the Video/AudioDecoder(decode) or the Video/AudioEncoder(encode).
32+
There are two ways to manipulate profiles:
33+
* create profiles inside your code, by instanciate ```Map``` structures.
34+
* create profiles outside your code, by create text files.
35+
To indicate the path to the text files, export environment variable:
36+
```
37+
export AVPROFILES=/path/to/profiles
38+
```
39+
40+
The minimum format profile (wrap/unwrap) is:
41+
```
42+
avProfileName=profileName
43+
avProfileLongName=profileLongName
44+
avProfileType=avProfileTypeFormat
45+
format=formatName
46+
```
47+
48+
The minimum video profile (encode/decode) is:
49+
```
50+
avProfileName=profileName
51+
avProfileLongName=profileLongName
52+
avProfileType=avProfileTypeVideo
53+
codec=codecName
54+
```
55+
56+
The minimum audio profile (encode/decode) is:
57+
```
58+
avProfileName=profileName
59+
avProfileLongName=profileLongName
60+
avProfileType=avProfileTypeAudio
61+
codec=codecName
62+
```

app/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ add_subdirectory(avProcessor)
77
# Python apps
88
add_subdirectory(pyProcessor)
99
add_subdirectory(pyThumbnail)
10+
add_subdirectory(pyRewrap)

app/avInfo/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ install(
2020
FILES ${BINARY_FILES}
2121
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE
2222
DESTINATION "bin/"
23+
OPTIONAL
2324
)
2425

2526
install(

app/avMeta/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ install(
2020
FILES ${BINARY_FILES}
2121
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE
2222
DESTINATION "bin/"
23+
OPTIONAL
2324
)
2425

2526
install(

0 commit comments

Comments
 (0)