Skip to content

Commit ba246b2

Browse files
update documentation and tests
1 parent a537551 commit ba246b2

File tree

10 files changed

+125
-122
lines changed

10 files changed

+125
-122
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ before_script:
1515

1616
- chmod +x tools/travis.linux.install.deps.sh
1717
- chmod +x tools/travis.osx.install.deps.sh
18-
18+
1919
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ./tools/travis.linux.install.deps.sh; fi
2020
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ./tools/travis.osx.install.deps.sh; fi
2121

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# avTranscoder
1+
# mediaManager
22

33
C++ API for LibAV / FFMpeg
44

5-
Based on LibAV/FFMpeg libraries to support various video formats, avTranscoder provides the high level API to re-wrap or transcode media easily.
5+
Based on LibAV/FFMpeg libraries to support various video formats, mediaManager provides the high level API to re-wrap or transcode media easily.
66

77
You can also use its Java & Python bindings for simpler integration in your own projects.
88

@@ -22,15 +22,14 @@ You can also use its Java & Python bindings for simpler integration in your own
2222

2323
#### Tests
2424

25-
###### nosetests
26-
Python tests using nosetests.
27-
28-
Create environment variables to use your files in tests.
29-
* AVTRANSCODER_TEST_AUDIO_FILE
30-
* AVTRANSCODER_TEST_VIDEO_FILE
25+
Test unit use the python nosetests library.
26+
For more information look this file: [test/README.md](test/README.md)
3127

3228
#### Packaging
3329

3430
###### Build openSUSE
3531
comming soon
3632

33+
###### packaging using CPack
34+
comming soon
35+

doc/code/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
3232
# title of most generated pages and in a few other places.
3333
# The default value is: My Project.
3434

35-
PROJECT_NAME = AvTranscoder
35+
PROJECT_NAME = mediaManager
3636

3737
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
3838
# could be handy for archiving the generated documentation or if some version

doc/code/index.doxygen

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** @mainpage AvTranscoder
1+
/** @mainpage mediaManager
22
*
33
* An High Level API for transform medias.<br/>
44
* Based on FFMpeg / libav projects.

test/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# TESTS
2+
3+
TODO

test/pyTest/testProperties.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@
22

33
from nose.tools import *
44

5-
from pyAvTranscoder import avtranscoder as av
6-
5+
from mediaManager import mediaCore
6+
from mediaManager import mediaIO
77

88
def testAddMetadataDate():
99
"""
1010
Add metadata 'date' to the outputFile.
1111
"""
1212
outputFileName = "testAddMetadataDate.wav"
1313

14-
ouputFile = av.OutputFile( outputFileName )
15-
transcoder = av.Transcoder( ouputFile )
14+
ouputFile = mediaIO.OutputFile( outputFileName )
15+
transcoder = mediaIO.Transcoder( ouputFile )
1616

1717
# rewrap a stream
18-
transcoder.add( os.environ['AVTRANSCODER_TEST_AUDIO_FILE'], 0, "")
18+
transcoder.add( os.environ['MEDIA_MANAGER_TEST_AUDIO_FILE'], 0, "")
1919

2020
# add one metadata
2121
metadata_to_check = ("date", "value")
2222
ouputFile.addMetadata( metadata_to_check[0], metadata_to_check[1] )
2323

24-
progress = av.NoDisplayProgress()
24+
progress = mediaCore.NoDisplayProgress()
2525
transcoder.process( progress )
2626

27-
inputFile = av.InputFile( outputFileName )
28-
inputFile.analyse( progress, av.InputFile.eAnalyseLevelFast )
27+
inputFile = mediaIO.InputFile( outputFileName )
28+
inputFile.analyse( progress, mediaIO.InputFile.eAnalyseLevelFast )
2929
properties = inputFile.getProperties()
3030

3131
assert_in( metadata_to_check, properties.metadatas )
@@ -36,21 +36,21 @@ def testAddImpossibleMetadata():
3636
"""
3737
outputFileName = "testAddMetadataPlop.wav"
3838

39-
ouputFile = av.OutputFile( outputFileName )
40-
transcoder = av.Transcoder( ouputFile )
39+
ouputFile = mediaIO.OutputFile( outputFileName )
40+
transcoder = mediaIO.Transcoder( ouputFile )
4141

4242
# rewrap a stream
43-
transcoder.add( os.environ['AVTRANSCODER_TEST_AUDIO_FILE'], 0, "")
43+
transcoder.add( os.environ['MEDIA_MANAGER_TEST_AUDIO_FILE'], 0, "")
4444

4545
# add one metadata
4646
metadata_to_check = ("undefinedMetadataKey", "undefinedMetadataValue")
4747
ouputFile.addMetadata( metadata_to_check[0], metadata_to_check[1] )
4848

49-
progress = av.NoDisplayProgress()
49+
progress = mediaCore.NoDisplayProgress()
5050
transcoder.process( progress )
5151

52-
inputFile = av.InputFile( outputFileName )
53-
inputFile.analyse( progress, av.InputFile.eAnalyseLevelFast )
52+
inputFile = mediaIO.InputFile( outputFileName )
53+
inputFile.analyse( progress, mediaIO.InputFile.eAnalyseLevelFast )
5454
properties = inputFile.getProperties()
5555

5656
assert_not_in( metadata_to_check, properties.metadatas )

test/pyTest/testTranscoderDummy.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from nose.tools import *
22

3-
from pyAvTranscoder import avtranscoder as av
4-
3+
from mediaManager import mediaCore
4+
from mediaManager import mediaIO
55

66
@raises(RuntimeError)
77
def testTranscodeNoStream():
@@ -10,10 +10,10 @@ def testTranscodeNoStream():
1010
"""
1111
outputFileName = "testTranscodeNoStream.avi"
1212

13-
ouputFile = av.OutputFile( outputFileName )
14-
transcoder = av.Transcoder( ouputFile )
13+
ouputFile = mediaIO.OutputFile( outputFileName )
14+
transcoder = mediaIO.Transcoder( ouputFile )
1515

16-
progress = av.NoDisplayProgress()
16+
progress = mediaCore.NoDisplayProgress()
1717
transcoder.process( progress )
1818

1919

@@ -24,13 +24,13 @@ def testRewrapDummy():
2424
"""
2525
outputFileName = "testRewrapDummy.avi"
2626

27-
ouputFile = av.OutputFile( outputFileName )
28-
transcoder = av.Transcoder( ouputFile )
27+
ouputFile = mediaIO.OutputFile( outputFileName )
28+
transcoder = mediaIO.Transcoder( ouputFile )
2929

3030
transcoder.add( "", 0, "")
3131
transcoder.add( "", 0, -1, "")
3232

33-
progress = av.NoDisplayProgress()
33+
progress = mediaCore.NoDisplayProgress()
3434
transcoder.process( progress )
3535

3636
@raises(RuntimeError)
@@ -40,13 +40,13 @@ def testTranscodeDummyExistingProfileWithNoEssenceDesc():
4040
"""
4141
outputFileName = "testTranscodeDummyExistingProfileWithNoEssenceDesc.avi"
4242

43-
ouputFile = av.OutputFile( outputFileName )
44-
transcoder = av.Transcoder( ouputFile )
43+
ouputFile = mediaIO.OutputFile( outputFileName )
44+
transcoder = mediaIO.Transcoder( ouputFile )
4545

4646
transcoder.add( "", 0, "dnxhd120" )
4747
transcoder.add( "", 0, -1, "dnxhd120" )
4848

49-
progress = av.NoDisplayProgress()
49+
progress = mediaCore.NoDisplayProgress()
5050
transcoder.process( progress )
5151

5252
@raises(RuntimeError)
@@ -56,18 +56,18 @@ def testTranscodeDummyNewProfileWithNoEssenceDesc():
5656
"""
5757
outputFileName = "testTranscodeDummyNewProfileWithNoEssenceDesc.avi"
5858

59-
ouputFile = av.OutputFile( outputFileName )
60-
transcoder = av.Transcoder( ouputFile )
59+
ouputFile = mediaIO.OutputFile( outputFileName )
60+
transcoder = mediaIO.Transcoder( ouputFile )
6161

6262
newProfile = {
63-
av.avProfileIdentificator : "newAudioPreset",
64-
av.avProfileIdentificatorHuman : "New audio preset",
65-
av.avProfileType : av.avProfileTypeAudio,
63+
mediaCore.mediaProfileIdentificator : "newAudioPreset",
64+
mediaCore.mediaProfileIdentificatorHuman : "New audio preset",
65+
mediaCore.mediaProfileType : mediaCore.mediaProfileTypeAudio,
6666
}
6767
transcoder.add( "", 0, newProfile )
6868
transcoder.add( "", 0, -1, newProfile )
6969

70-
progress = av.NoDisplayProgress()
70+
progress = mediaCore.NoDisplayProgress()
7171
transcoder.process( progress )
7272

7373
def testTranscodeDummyAudio():
@@ -76,17 +76,17 @@ def testTranscodeDummyAudio():
7676
"""
7777
outputFileName = "testTranscodeDummyAudio.wav"
7878

79-
ouputFile = av.OutputFile( outputFileName )
80-
transcoder = av.Transcoder( ouputFile )
79+
ouputFile = mediaIO.OutputFile( outputFileName )
80+
transcoder = mediaIO.Transcoder( ouputFile )
8181

8282
# add a dummy video stream
83-
audioDesc = av.AudioFrameDesc()
83+
audioDesc = mediaCore.AudioFrameDesc()
8484
audioDesc.setSampleRate( 48000 )
8585
audioDesc.setChannels( 1 )
8686
audioDesc.setFps( 25 )
8787
audioDesc.setSampleFormat( "s16" )
8888

89-
audioCodec = av.AudioCodec( av.eCodecTypeEncoder, "pcm_s16le" )
89+
audioCodec = mediaIO.AudioCodec( mediaIO.eCodecTypeEncoder, "pcm_s16le" )
9090
audioCodec.setAudioParameters( audioDesc )
9191
transcoder.add( "", 0, "wave24b48kmono", audioCodec )
9292

@@ -102,17 +102,17 @@ def testTranscodeDummyVideo():
102102
"""
103103
outputFileName = "testTranscodeDummyVideo.avi"
104104

105-
ouputFile = av.OutputFile( outputFileName )
106-
transcoder = av.Transcoder( ouputFile )
105+
ouputFile = mediaIO.OutputFile( outputFileName )
106+
transcoder = mediaIO.Transcoder( ouputFile )
107107

108108
# add a dummy video stream
109-
imageDesc = av.VideoFrameDesc()
109+
imageDesc = mediaCore.VideoFrameDesc()
110110
imageDesc.setWidth( 1920 )
111111
imageDesc.setHeight( 1080 )
112112
imageDesc.setDar( 1, 1 )
113-
inputPixel = av.Pixel( "yuv422p" )
113+
inputPixel = mediaCore.Pixel( "yuv422p" )
114114
imageDesc.setPixel( inputPixel )
115-
videoCodec = av.VideoCodec( av.eCodecTypeEncoder, "mpeg2video" )
115+
videoCodec = mediaIO.VideoCodec( mediaIO.eCodecTypeEncoder, "mpeg2video" )
116116
videoCodec.setImageParameters( imageDesc )
117117
transcoder.add( "", 0, "dnxhd120", videoCodec )
118118

test/pyTest/testTranscoderRewrap.py

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,33 @@
22

33
from nose.tools import *
44

5-
from pyAvTranscoder import avtranscoder as av
5+
from mediaManager import mediaCore
6+
from mediaManager import mediaIO
67

78
def testRewrapAudioStream():
89
"""
910
Rewrap one audio stream.
1011
"""
11-
inputFileName = os.environ['AVTRANSCODER_TEST_AUDIO_FILE']
12+
inputFileName = os.environ['MEDIA_MANAGER_TEST_AUDIO_FILE']
1213
outputFileName = "testRewrapAudioStream.wav"
1314

14-
ouputFile = av.OutputFile( outputFileName )
15-
transcoder = av.Transcoder( ouputFile )
15+
ouputFile = mediaIO.OutputFile( outputFileName )
16+
transcoder = mediaIO.Transcoder( ouputFile )
1617

1718
transcoder.add( inputFileName, 0, "" )
1819

19-
progress = av.NoDisplayProgress()
20+
progress = mediaCore.NoDisplayProgress()
2021
transcoder.process( progress )
2122

2223
# get src file of wrap
23-
src_inputFile = av.InputFile( inputFileName )
24-
src_inputFile.analyse( progress, av.InputFile.eAnalyseLevelFast )
24+
src_inputFile = mediaIO.InputFile( inputFileName )
25+
src_inputFile.analyse( progress, mediaIO.InputFile.eAnalyseLevelFast )
2526
src_properties = src_inputFile.getProperties()
2627
src_audioStream = src_properties.audioStreams[0]
2728

2829
# get dst file of wrap
29-
dst_inputFile = av.InputFile( outputFileName )
30-
dst_inputFile.analyse( progress, av.InputFile.eAnalyseLevelFast )
30+
dst_inputFile = mediaIO.InputFile( outputFileName )
31+
dst_inputFile.analyse( progress, mediaIO.InputFile.eAnalyseLevelFast )
3132
dst_properties = dst_inputFile.getProperties()
3233
dst_audioStream = dst_properties.audioStreams[0]
3334

@@ -64,26 +65,26 @@ def testRewrapVideoStream():
6465
"""
6566
Rewrap one video stream.
6667
"""
67-
inputFileName = os.environ['AVTRANSCODER_TEST_VIDEO_FILE']
68+
inputFileName = os.environ['MEDIA_MANAGER_TEST_VIDEO_FILE']
6869
outputFileName = "testRewrapVideoStream.avi"
6970

70-
ouputFile = av.OutputFile( outputFileName )
71-
transcoder = av.Transcoder( ouputFile )
71+
ouputFile = mediaIO.OutputFile( outputFileName )
72+
transcoder = mediaIO.Transcoder( ouputFile )
7273

7374
transcoder.add( inputFileName, 0, "" )
7475

75-
progress = av.NoDisplayProgress()
76+
progress = mediaCore.NoDisplayProgress()
7677
transcoder.process( progress )
7778

7879
# get src file of wrap
79-
src_inputFile = av.InputFile( inputFileName )
80-
src_inputFile.analyse( progress, av.InputFile.eAnalyseLevelFull )
80+
src_inputFile = mediaIO.InputFile( inputFileName )
81+
src_inputFile.analyse( progress, mediaIO.InputFile.eAnalyseLevelFull )
8182
src_properties = src_inputFile.getProperties()
8283
src_videoStream = src_properties.videoStreams[0]
8384

8485
# get dst file of wrap
85-
dst_inputFile = av.InputFile( outputFileName )
86-
dst_inputFile.analyse( progress, av.InputFile.eAnalyseLevelFast )
86+
dst_inputFile = mediaIO.InputFile( outputFileName )
87+
dst_inputFile.analyse( progress, mediaIO.InputFile.eAnalyseLevelFast )
8788
dst_properties = dst_inputFile.getProperties()
8889
dst_videoStream = dst_properties.videoStreams[0]
8990

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy