Skip to content

Commit d08d008

Browse files
committed
Merge pull request #145 from mikrosimage/develop
Up to v0.5.10 (MIK fork)
2 parents 6574e59 + 6116b64 commit d08d008

Some content is hidden

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

78 files changed

+1506
-619
lines changed

.travis.yml

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Use container-based infrastructure
2+
sudo: required
3+
services:
4+
- docker
5+
16
language: cpp
27

38
os:
@@ -15,14 +20,42 @@ env:
1520
- DEPENDENCY_INSTALL=${TRAVIS_BUILD_DIR}/install-dependency
1621
- CI_NODE_TOTAL=2
1722
matrix:
18-
- DEPENDENCY_MODE=libav ENABLE_COVERAGE=true
19-
- DEPENDENCY_MODE=libav ENABLE_COVERAGE=false
23+
- DEPENDENCY_MODE=libav ENABLE_COVERAGE=true
24+
- DEPENDENCY_MODE=libav ENABLE_COVERAGE=false
2025
- DEPENDENCY_MODE=ffmpeg ENABLE_COVERAGE=true
2126
- DEPENDENCY_MODE=ffmpeg ENABLE_COVERAGE=false
2227

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+
2339
# This results in a 2×2×2x2 build matrix.
2440
# Where the variables are: os / compiler / DEPENDENCY_MODE / ENABLE_COVERAGE
2541

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+
2659
before_script:
2760
- env | sort
2861
- date -u
@@ -39,18 +72,12 @@ before_script:
3972

4073
script:
4174
# build
42-
- mkdir -p ${AVTRANSCODER_BUILD}
43-
- cd ${AVTRANSCODER_BUILD}
44-
- cmake .. -DCMAKE_INSTALL_PREFIX=${AVTRANSCODER_INSTALL} -DCMAKE_PREFIX_PATH=${DEPENDENCY_INSTALL} -DCMAKE_BUILD_TYPE=Release -DAVTRANSCODER_PYTHON_VERSION_OF_BINDING=2.7 -DAVTRANSCODER_COVERAGE=${ENABLE_COVERAGE}
45-
- make -j${CI_NODE_TOTAL}
46-
- make install
75+
- ./tools/travis.build.sh
4776

4877
# launch tests
49-
- if [ ${DEPENDENCY_MODE} = "ffmpeg" ]; then ./../tools/travis.python.nosetests.sh; fi
78+
- if [ ${DEPENDENCY_MODE} = "ffmpeg" ]; then ./tools/travis.python.nosetests.sh; fi
5079

5180
after_success:
52-
- cd ${TRAVIS_BUILD_DIR}
53-
5481
# generate coverage for coveralls
5582
- if [ ${ENABLE_COVERAGE} ]; then ./tools/travis.gcc.generate.coverage.sh; fi
5683

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ project(AvTranscoder)
55
# Set AvTranscoder versions
66
set(AVTRANSCODER_VERSION_MAJOR "0")
77
set(AVTRANSCODER_VERSION_MINOR "5")
8-
set(AVTRANSCODER_VERSION_MICRO "8")
8+
set(AVTRANSCODER_VERSION_MICRO "10")
99
set(AVTRANSCODER_VERSION ${AVTRANSCODER_VERSION_MAJOR}.${AVTRANSCODER_VERSION_MINOR}.${AVTRANSCODER_VERSION_MICRO})
1010

1111
# Define AvTranscoder versions
@@ -27,8 +27,8 @@ if(MSVC)
2727
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
2828
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
2929
else()
30-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -fPIC -pg -g")
31-
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC -O3")
30+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -fPIC -g")
31+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -fPIC -O3")
3232
endif()
3333

3434
# CPP flag to create code coverage report

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ 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=master)](https://travis-ci.org/avTranscoder/avTranscoder)
7+
[![Build Status](https://travis-ci.org/avTranscoder/avTranscoder.svg?branch=develop)](https://travis-ci.org/avTranscoder/avTranscoder)
88
[![Coverage Status](https://coveralls.io/repos/avTranscoder/avTranscoder/badge.svg)](https://coveralls.io/r/avTranscoder/avTranscoder)
99
<a href="https://scan.coverity.com/projects/2626"><img alt="Coverity Scan Build Status" src="https://scan.coverity.com/projects/2626/badge.svg"/></a>
1010

@@ -17,12 +17,15 @@ Based on Libav/FFmpeg libraries to support various video and audio formats, avTr
1717
#### License
1818
See [**COPYING.md**](COPYING.md)
1919

20-
#### Compilation
21-
See [**INSTALL.md**](INSTALL.md)
22-
2320
#### How to use
2421
See [**USAGE.md**](USAGE.md)
2522

23+
#### Documentation
24+
See [**Doxygen documentation**](http://avtranscoder.github.io/avTranscoder-doxygen/)
25+
26+
#### Compilation
27+
See [**INSTALL.md**](INSTALL.md)
28+
2629
#### Tests
2730

2831
###### nosetests

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/avPlay/AvReader.cpp

Lines changed: 0 additions & 85 deletions
This file was deleted.

app/avPlay/AvReader.hpp

Lines changed: 0 additions & 41 deletions
This file was deleted.

app/avPlay/Reader.hpp

Lines changed: 0 additions & 27 deletions
This file was deleted.

app/avPlay/Window.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <iomanip>
1515
#include <cstring>
1616

17-
Reader* Window::_reader = NULL;
17+
avtranscoder::VideoReader* Window::_reader = NULL;
1818

1919
size_t Window::_width = 0;
2020
size_t Window::_height = 0;
@@ -94,7 +94,7 @@ void loadNewTexture( const char* data, GLint internalFormat, size_t width, size_
9494
loadNewTexture( _imageProperties );
9595
}
9696

97-
Window::Window( Reader& reader )
97+
Window::Window( avtranscoder::VideoReader& reader )
9898
{
9999
_reader = &reader;
100100
_width = _reader->getWidth();
@@ -124,7 +124,7 @@ Window::Window( Reader& reader )
124124

125125
void Window::launch()
126126
{
127-
displayNextFrame();
127+
displayFirstFrame();
128128
glutMainLoop();
129129
}
130130

@@ -220,11 +220,6 @@ void Window::keyboard( unsigned char k, int x, int y )
220220
case 'a':
221221
showAlphaChannelTexture();
222222
break;
223-
224-
case 'm':
225-
_reader->printMetadatas();
226-
break;
227-
228223
case 'H':
229224
if( shift )
230225
{
@@ -398,8 +393,7 @@ void Window::displayHelp()
398393
{
399394
static const std::string kViewerHelp =
400395
"Av Player Viewer Help\n" \
401-
"i : information about image (dimensions, bit depth, channels)\n"\
402-
"m : full metadatas of media\n"\
396+
"i : information about image (dimensions, bit depth, channels) + video stream\n"\
403397
"z : zoom view to 1:1\n"\
404398
"h, F1 : print help\n" \
405399
"SHIFT + V : flip\n" \
@@ -425,6 +419,9 @@ void Window::displayInformations()
425419
case GL_FLOAT : textureType += "32 float"; break;
426420
}
427421
std::cout << textureType << " " << _width << "x" << _height << std::endl;
422+
423+
// stream info
424+
_reader->printInfo();
428425
}
429426

430427
void Window::move( float x, float y )
@@ -532,14 +529,16 @@ void Window::showAlphaChannelTexture( )
532529

533530
void Window::displayNextFrame()
534531
{
535-
const char* buffer = _reader->readNextFrame();
532+
const char* buffer = (const char*)_reader->readNextFrame()->getData();
536533
loadNewTexture( buffer, _reader->getComponents(), _reader->getWidth(), _reader->getHeight(), GL_RGB, GL_UNSIGNED_BYTE );
534+
display();
537535
}
538536

539537
void Window::displayPrevFrame()
540538
{
541-
const char* buffer = _reader->readPrevFrame();
539+
const char* buffer = (const char*)_reader->readPrevFrame()->getData();
542540
loadNewTexture( buffer, _reader->getComponents(), _reader->getWidth(), _reader->getHeight(), GL_RGB, GL_UNSIGNED_BYTE );
541+
display();
543542
}
544543

545544
void Window::displayFirstFrame()
@@ -549,8 +548,9 @@ void Window::displayFirstFrame()
549548

550549
void Window::displayAtFrame( const size_t frame )
551550
{
552-
const char* buffer = _reader->readFrameAt( frame );
551+
const char* buffer = (const char*)_reader->readFrameAt( frame )->getData();
553552
loadNewTexture( buffer, _reader->getComponents(), _reader->getWidth(), _reader->getHeight(), GL_RGB, GL_UNSIGNED_BYTE );
553+
display();
554554
}
555555

556556
void Window::loopPlaying( int value )

app/avPlay/Window.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
#include <string>
55

6-
#include "Reader.hpp"
6+
#include <AvTranscoder/reader/VideoReader.hpp>
77

88
class Window
99
{
1010
public:
11-
Window( Reader& reader );
11+
Window( avtranscoder::VideoReader& reader );
1212

1313
void launch();
1414

@@ -43,7 +43,7 @@ class Window
4343

4444
static void loopPlaying( int value );
4545

46-
static Reader* _reader;
46+
static avtranscoder::VideoReader* _reader;
4747

4848
static size_t _width;
4949
static size_t _height;

0 commit comments

Comments
 (0)