├── .gitignore
├── Generative
├── Generative.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── andreasmuller.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ └── WorkspaceSettings.xcsettings
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ ├── emptyExample Debug.xcscheme
│ │ │ └── emptyExample Release.xcscheme
│ └── xcuserdata
│ │ └── andreasmuller.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── Makefile
├── Project.xcconfig
├── addons.make
├── bin
│ └── data
│ │ ├── .gitkeep
│ │ └── Fonts
│ │ └── DIN.otf
├── config.make
├── openFrameworks-Info.plist
└── src
│ ├── main.cpp
│ ├── testApp.cpp
│ └── testApp.h
├── HelloWorld
├── HelloWorld.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── andreasmuller.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ └── WorkspaceSettings.xcsettings
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ ├── emptyExample Debug.xcscheme
│ │ │ └── emptyExample Release.xcscheme
│ └── xcuserdata
│ │ └── andreasmuller.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── Makefile
├── Project.xcconfig
├── addons.make
├── bin
│ ├── HelloWorld.bin
│ └── data
│ │ └── DIN.otf
├── config.make
├── openFrameworks-Info.plist
└── src
│ ├── main.cpp
│ ├── testApp.cpp
│ └── testApp.h
├── README.md
├── ShaderSimple
├── Makefile
├── Project.xcconfig
├── ShaderSimple.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── andreasmuller.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ └── WorkspaceSettings.xcsettings
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ ├── emptyExample Debug.xcscheme
│ │ │ └── emptyExample Release.xcscheme
│ └── xcuserdata
│ │ └── andreasmuller.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── addons.make
├── bin
│ ├── ShaderSimple.bin
│ └── data
│ │ ├── .gitkeep
│ │ ├── Fonts
│ │ └── DIN.otf
│ │ └── Shaders
│ │ ├── ShaderDesktop.frag
│ │ ├── ShaderDesktop.vert
│ │ ├── ShaderGLES.frag
│ │ └── ShaderGLES.vert
├── config.make
├── openFrameworks-Info.plist
└── src
│ ├── main.cpp
│ ├── testApp.cpp
│ └── testApp.h
├── ofxAddons
└── ofxOMXPlayer
│ ├── libs
│ └── ffmpeg
│ │ ├── include
│ │ ├── libavcodec
│ │ │ ├── avcodec.h
│ │ │ ├── avfft.h
│ │ │ ├── dxva2.h
│ │ │ ├── old_codec_ids.h
│ │ │ ├── vaapi.h
│ │ │ ├── vda.h
│ │ │ ├── vdpau.h
│ │ │ ├── version.h
│ │ │ └── xvmc.h
│ │ ├── libavdevice
│ │ │ ├── avdevice.h
│ │ │ └── version.h
│ │ ├── libavfilter
│ │ │ ├── asrc_abuffer.h
│ │ │ ├── avcodec.h
│ │ │ ├── avfilter.h
│ │ │ ├── avfiltergraph.h
│ │ │ ├── buffersink.h
│ │ │ ├── buffersrc.h
│ │ │ └── version.h
│ │ ├── libavformat
│ │ │ ├── avformat.h
│ │ │ ├── avio.h
│ │ │ └── version.h
│ │ ├── libavutil
│ │ │ ├── adler32.h
│ │ │ ├── aes.h
│ │ │ ├── attributes.h
│ │ │ ├── audio_fifo.h
│ │ │ ├── audioconvert.h
│ │ │ ├── avassert.h
│ │ │ ├── avconfig.h
│ │ │ ├── avstring.h
│ │ │ ├── avutil.h
│ │ │ ├── base64.h
│ │ │ ├── blowfish.h
│ │ │ ├── bprint.h
│ │ │ ├── bswap.h
│ │ │ ├── channel_layout.h
│ │ │ ├── common.h
│ │ │ ├── cpu.h
│ │ │ ├── crc.h
│ │ │ ├── dict.h
│ │ │ ├── error.h
│ │ │ ├── eval.h
│ │ │ ├── fifo.h
│ │ │ ├── file.h
│ │ │ ├── hmac.h
│ │ │ ├── imgutils.h
│ │ │ ├── intfloat.h
│ │ │ ├── intfloat_readwrite.h
│ │ │ ├── intreadwrite.h
│ │ │ ├── lfg.h
│ │ │ ├── log.h
│ │ │ ├── lzo.h
│ │ │ ├── mathematics.h
│ │ │ ├── md5.h
│ │ │ ├── mem.h
│ │ │ ├── old_pix_fmts.h
│ │ │ ├── opt.h
│ │ │ ├── parseutils.h
│ │ │ ├── pixdesc.h
│ │ │ ├── pixfmt.h
│ │ │ ├── random_seed.h
│ │ │ ├── rational.h
│ │ │ ├── samplefmt.h
│ │ │ ├── sha.h
│ │ │ ├── time.h
│ │ │ ├── timecode.h
│ │ │ ├── timestamp.h
│ │ │ ├── version.h
│ │ │ └── xtea.h
│ │ ├── libpostproc
│ │ │ ├── postprocess.h
│ │ │ └── version.h
│ │ ├── libswresample
│ │ │ ├── swresample.h
│ │ │ └── version.h
│ │ └── libswscale
│ │ │ ├── swscale.h
│ │ │ └── version.h
│ │ └── libs
│ │ ├── libavcodec.a
│ │ ├── libavdevice.a
│ │ ├── libavfilter.a
│ │ ├── libavformat.a
│ │ ├── libavutil.a
│ │ ├── libpostproc.a
│ │ ├── libswresample.a
│ │ └── libswscale.a
│ └── src
│ ├── BitstreamConverter.cpp
│ ├── BitstreamConverter.h
│ ├── COPYING
│ ├── DllAvCodec.h
│ ├── DllAvFilter.h
│ ├── DllAvFormat.h
│ ├── DllAvUtil.h
│ ├── DllBCM.h
│ ├── DllSwResample.h
│ ├── DynamicDll.cpp
│ ├── DynamicDll.h
│ ├── File.cpp
│ ├── File.h
│ ├── GlobalEGLContainer.h
│ ├── IAudioRenderer.h
│ ├── OMXAudio.cpp
│ ├── OMXAudio.h
│ ├── OMXAudioCodecOMX.cpp
│ ├── OMXAudioCodecOMX.h
│ ├── OMXClock.cpp
│ ├── OMXClock.h
│ ├── OMXCore.cpp
│ ├── OMXCore.h
│ ├── OMXDecoderBase.cpp
│ ├── OMXDecoderBase.h
│ ├── OMXEGLImage.cpp
│ ├── OMXEGLImage.h
│ ├── OMXPlayerAudio.cpp
│ ├── OMXPlayerAudio.h
│ ├── OMXPlayerEGLImage.cpp
│ ├── OMXPlayerEGLImage.h
│ ├── OMXPlayerVideo.cpp
│ ├── OMXPlayerVideo.h
│ ├── OMXPlayerVideoBase.cpp
│ ├── OMXPlayerVideoBase.h
│ ├── OMXReader.cpp
│ ├── OMXReader.h
│ ├── OMXStreamInfo.cpp
│ ├── OMXStreamInfo.h
│ ├── OMXThread.cpp
│ ├── OMXThread.h
│ ├── OMXVideo.cpp
│ ├── OMXVideo.h
│ ├── linux
│ ├── ConvUtils.h
│ ├── PlatformDefs.h
│ ├── PlatformInclude.h
│ ├── XMemUtils.cpp
│ ├── XMemUtils.h
│ ├── XSyncUtils.h
│ ├── stat_utf8.h
│ └── stdio_utf8.h
│ ├── ofxOMXPlayer.cpp
│ ├── ofxOMXPlayer.h
│ ├── ofxOMXPlayerEngine.cpp
│ ├── ofxOMXPlayerEngine.h
│ ├── ofxOMXPlayerListener.h
│ └── utils
│ ├── MathUtils.h
│ ├── PCMRemap.cpp
│ ├── PCMRemap.h
│ └── StdString.h
├── omxPlayerNonTextured
├── .gitignore
├── Makefile
├── bin
│ └── omxPlayerNonTextured.bin
├── config.make
└── src
│ ├── main.cpp
│ ├── testApp.cpp
│ └── testApp.h
├── omxPlayerShaders
├── .gitignore
├── Makefile
├── bin
│ ├── data
│ │ ├── .gitkeep
│ │ ├── shaderExample.frag
│ │ └── shaderExample.vert
│ └── omxPlayerShaders.bin
├── config.make
└── src
│ ├── main.cpp
│ ├── testApp.cpp
│ └── testApp.h
├── omxPlayerTextured
├── .gitignore
├── Makefile
├── bin
│ └── omxPlayerTextured.bin
├── config.make
└── src
│ ├── main.cpp
│ ├── testApp.cpp
│ └── testApp.h
├── opencvExample
├── Makefile
├── Project.xcconfig
├── addons.make
├── bin
│ ├── data
│ │ ├── DIN.otf
│ │ └── fingers.mp4
│ └── opencvExample.bin
├── config.make
├── openFrameworks-Info.plist
├── opencvExample.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ ├── opencvExample Debug.xcscheme
│ │ └── opencvExample Release.xcscheme
└── src
│ ├── ConsoleListener.h
│ ├── main.cpp
│ ├── ofApp.cpp
│ └── ofApp.h
├── ruttEtraExample
├── .gitignore
├── Makefile
├── Project.xcconfig
├── addons.make
├── bin
│ ├── data
│ │ ├── .gitkeep
│ │ ├── movies
│ │ │ ├── fingers.mp4
│ │ │ └── fingers_160x120.mp4
│ │ ├── palettes
│ │ │ ├── palette1.png
│ │ │ ├── palette2.png
│ │ │ ├── palette3.png
│ │ │ ├── palette4.png
│ │ │ ├── palette5.png
│ │ │ ├── palette6.png
│ │ │ ├── palette7.png
│ │ │ ├── palette8.png
│ │ │ └── palette9.png
│ │ └── shaders
│ │ │ ├── ColorFromHeight.frag
│ │ │ ├── ColorFromHeight.vert
│ │ │ ├── ColorFromHeightGLES.frag
│ │ │ └── ColorFromHeightGLES.vert
│ └── ruttEtraExample.bin
├── config.make
├── openFrameworks-Info.plist
├── ruttEtraExample.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ ├── opencvExample Debug.xcscheme
│ │ └── opencvExample Release.xcscheme
└── src
│ ├── main.cpp
│ ├── testApp.cpp
│ └── testApp.h
└── videos
└── 720p.mov
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | libs
3 | !ofxAddons/ofxOMXPlayer/libs
4 | !ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs
5 | obj
6 | *.app
7 | */*/bin/*
8 | !*/*/bin/data
9 | *._*
10 | */*bin/readMe.txt
11 | #XCode
12 | *.pbxuser
13 | *.perspective
14 | *.perspectivev3
15 | *.mode1v3
16 | *.mode2v3
17 | #XCode 4
18 | xcuserdata
19 | *.xcworkspace
20 |
21 | # OS-specific ignore patterns
22 |
23 | #Linux
24 | *~
25 | # KDE
26 | .directory
27 | .AppleDouble
28 |
29 | #OSX
30 | .DS_Store
31 | *.swp
32 | *~.nib
33 | # Thumbnails
34 | ._*
35 |
36 | #Windows
37 | # Windows image file caches
38 | Thumbs.db
39 | # Folder config file
40 | Desktop.ini
--------------------------------------------------------------------------------
/Generative/Generative.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Generative/Generative.xcodeproj/project.xcworkspace/xcuserdata/andreasmuller.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/Generative/Generative.xcodeproj/project.xcworkspace/xcuserdata/andreasmuller.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Generative/Generative.xcodeproj/project.xcworkspace/xcuserdata/andreasmuller.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Generative/Generative.xcodeproj/xcshareddata/xcschemes/emptyExample Debug.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/Generative/Generative.xcodeproj/xcshareddata/xcschemes/emptyExample Release.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/Generative/Generative.xcodeproj/xcuserdata/andreasmuller.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SuppressBuildableAutocreation
6 |
7 | E4B69B5A0A3A1756003C02F2
8 |
9 | primary
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Generative/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/Generative/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/Generative/addons.make:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Generative/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/Generative/bin/data/.gitkeep
--------------------------------------------------------------------------------
/Generative/bin/data/Fonts/DIN.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/Generative/bin/data/Fonts/DIN.otf
--------------------------------------------------------------------------------
/Generative/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.yourcompany.openFrameworks
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Generative/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "testApp.h"
3 |
4 | //========================================================================
5 | int main( )
6 | {
7 | ofSetupOpenGL(1280, 720, OF_WINDOW); // OF_WINDOW or OF_FULLSCREEN
8 | ofRunApp( new testApp());
9 | }
10 |
--------------------------------------------------------------------------------
/Generative/src/testApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 |
5 | // ---------------------------------------------------------------------------------------------------------------------------------------------------
6 | //
7 | class Particle
8 | {
9 | public:
10 |
11 | ofVec2f pos;
12 | ofVec2f vel;
13 |
14 | int myID;
15 |
16 | int spacePartitioningIndexX;
17 | int spacePartitioningIndexY;
18 | };
19 |
20 | // ---------------------------------------------------------------------------------------------------------------------------------------------------
21 | //
22 | class testApp : public ofBaseApp
23 | {
24 |
25 | public:
26 |
27 | void setup();
28 | void update();
29 | void draw();
30 |
31 | void keyPressed(int key);
32 |
33 | vector< Particle* > particles;
34 |
35 | vector< vector< vector< Particle* > > > spacePartitioningGrid;
36 | int spacePartitioningResX;
37 | int spacePartitioningResY;
38 | float spacePartitioningGridWidth;
39 | float spacePartitioningGridHeight;
40 |
41 | float lastUpdateTime;
42 |
43 | ofMesh lineMesh;
44 |
45 | bool debugDraw;
46 |
47 | ofTrueTypeFont fontSmall;
48 | ofTrueTypeFont fontLarge;
49 |
50 | char tmpStr[256];
51 | };
52 |
--------------------------------------------------------------------------------
/HelloWorld/HelloWorld.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/HelloWorld/HelloWorld.xcodeproj/project.xcworkspace/xcuserdata/andreasmuller.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/HelloWorld/HelloWorld.xcodeproj/project.xcworkspace/xcuserdata/andreasmuller.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/HelloWorld/HelloWorld.xcodeproj/project.xcworkspace/xcuserdata/andreasmuller.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/HelloWorld/HelloWorld.xcodeproj/xcshareddata/xcschemes/emptyExample Debug.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/HelloWorld/HelloWorld.xcodeproj/xcshareddata/xcschemes/emptyExample Release.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/HelloWorld/HelloWorld.xcodeproj/xcuserdata/andreasmuller.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SuppressBuildableAutocreation
6 |
7 | E4B69B5A0A3A1756003C02F2
8 |
9 | primary
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/HelloWorld/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/HelloWorld/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/HelloWorld/addons.make:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/HelloWorld/addons.make
--------------------------------------------------------------------------------
/HelloWorld/bin/HelloWorld.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/HelloWorld/bin/HelloWorld.bin
--------------------------------------------------------------------------------
/HelloWorld/bin/data/DIN.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/HelloWorld/bin/data/DIN.otf
--------------------------------------------------------------------------------
/HelloWorld/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.yourcompany.openFrameworks
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/HelloWorld/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "testApp.h"
3 |
4 | //========================================================================
5 | int main( )
6 | {
7 | ofSetupOpenGL(1280, 720, OF_WINDOW); // OF_WINDOW or OF_FULLSCREEN
8 | ofRunApp( new testApp());
9 | }
10 |
--------------------------------------------------------------------------------
/HelloWorld/src/testApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 |
5 | class testApp : public ofBaseApp
6 | {
7 | public:
8 |
9 | void setup();
10 | void update();
11 | void draw();
12 |
13 | string message;
14 | ofTrueTypeFont font;
15 |
16 | ofFbo* frontBuffer;
17 | ofFbo* backBuffer;
18 | ofMesh screenMesh;
19 | };
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | RaspberryPiGuideCAN
2 | ===================
3 |
4 | Example projects for a guide on the Raspberry Pi written for Creativeapplications.net
5 |
6 |
--------------------------------------------------------------------------------
/ShaderSimple/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/ShaderSimple/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/ShaderSimple/ShaderSimple.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ShaderSimple/ShaderSimple.xcodeproj/project.xcworkspace/xcuserdata/andreasmuller.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ShaderSimple/ShaderSimple.xcodeproj/project.xcworkspace/xcuserdata/andreasmuller.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ShaderSimple/ShaderSimple.xcodeproj/project.xcworkspace/xcuserdata/andreasmuller.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ShaderSimple/ShaderSimple.xcodeproj/xcshareddata/xcschemes/emptyExample Debug.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/ShaderSimple/ShaderSimple.xcodeproj/xcshareddata/xcschemes/emptyExample Release.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/ShaderSimple/ShaderSimple.xcodeproj/xcuserdata/andreasmuller.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SuppressBuildableAutocreation
6 |
7 | E4B69B5A0A3A1756003C02F2
8 |
9 | primary
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ShaderSimple/addons.make:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ShaderSimple/bin/ShaderSimple.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ShaderSimple/bin/ShaderSimple.bin
--------------------------------------------------------------------------------
/ShaderSimple/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ShaderSimple/bin/data/.gitkeep
--------------------------------------------------------------------------------
/ShaderSimple/bin/data/Fonts/DIN.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ShaderSimple/bin/data/Fonts/DIN.otf
--------------------------------------------------------------------------------
/ShaderSimple/bin/data/Shaders/ShaderDesktop.frag:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | uniform float time;
4 |
5 | void main( void )
6 | {
7 | // Pulse screen
8 | float col = (cos(time*2.0)+1.0)*0.5;
9 | gl_FragColor = vec4( col, col, col, 1.0 );
10 |
11 |
12 | // Bars
13 | /*
14 | float barLength = (((cos(time)+1.0)*0.5) * 90.0) + 10.0;
15 | float col = mod( gl_FragCoord.x, barLength) / barLength;
16 | gl_FragColor = vec4( col, col, col, 1.0 );
17 | */
18 |
19 | // Plasma
20 | /*
21 | float x = gl_FragCoord.x;
22 | float y = gl_FragCoord.y;
23 | float mov0 = x+y+cos(sin(time)*2.)*100.+sin(x/100.)*1000.;
24 | float mov1 = y / 720.0 / 0.2 + time;
25 | float mov2 = x / 1280.0 / 0.2;
26 | float c1 = abs(sin(mov1+time)/2.+mov2/2.-mov1-mov2+time);
27 | float c2 = abs(sin(c1+sin(mov0/1000.+time)+sin(y/40.+time)+sin((x+y)/100.)*3.));
28 | float c3 = abs(sin(c2+cos(mov1+mov2+c2)+cos(mov2)+sin(x/1000.)));
29 | gl_FragColor = vec4( c1,c2,c3,1.0);
30 | */
31 |
32 |
33 | }
--------------------------------------------------------------------------------
/ShaderSimple/bin/data/Shaders/ShaderDesktop.vert:
--------------------------------------------------------------------------------
1 | void main(void)
2 | {
3 | gl_TexCoord[0] = gl_MultiTexCoord0;
4 | gl_Position = ftransform();
5 | }
6 |
--------------------------------------------------------------------------------
/ShaderSimple/bin/data/Shaders/ShaderGLES.frag:
--------------------------------------------------------------------------------
1 | precision highp float; // this will make the default precision high
2 |
3 | uniform vec4 color;
4 |
5 | uniform float time;
6 |
7 | void main()
8 | {
9 | // Pulse screen
10 | float col = (cos(time*2.0)+1.0)*0.5;
11 | gl_FragColor = vec4( col, col, col, 1.0 );
12 |
13 | /*
14 | // Bars
15 | float barLength = (((cos(time)+1.0)*0.5) * 90.0) + 10.0;
16 | float col = mod( gl_FragCoord.x, barLength) / barLength;
17 | gl_FragColor = vec4( col, col, col, 1.0 );
18 | */
19 |
20 | /*
21 | // Plasma
22 | float x = gl_FragCoord.x;
23 | float y = gl_FragCoord.y;
24 | float mov0 = x+y+cos(sin(time)*2.)*100.+sin(x/100.)*1000.;
25 | float mov1 = y / 768.0 / 0.2 + time;
26 | float mov2 = x / 1024.0 / 0.2;
27 | float c1 = abs(sin(mov1+time)/2.+mov2/2.-mov1-mov2+time);
28 | float c2 = abs(sin(c1+sin(mov0/1000.+time)+sin(y/40.+time)+sin((x+y)/100.)*3.));
29 | float c3 = abs(sin(c2+cos(mov1+mov2+c2)+cos(mov2)+sin(x/1000.)));
30 | gl_FragColor = vec4( c1,c2,c3,1.0);
31 | */
32 | }
33 |
--------------------------------------------------------------------------------
/ShaderSimple/bin/data/Shaders/ShaderGLES.vert:
--------------------------------------------------------------------------------
1 | attribute vec4 position; // set automatically by OF
2 | attribute vec4 color; // set automatically by OF
3 | attribute vec4 normal; // set automatically by OF
4 | attribute vec2 texcoord; // set automatically by OF
5 |
6 | uniform mat4 modelViewMatrix; // set automatically by OF
7 | uniform mat4 projectionMatrix; // set automatically by OF
8 |
9 | uniform float time;
10 |
11 | void main()
12 | {
13 | vec4 pos = projectionMatrix * modelViewMatrix * position;
14 | gl_Position = pos;
15 | }
--------------------------------------------------------------------------------
/ShaderSimple/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.yourcompany.openFrameworks
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/ShaderSimple/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "testApp.h"
3 |
4 | //========================================================================
5 | int main( )
6 | {
7 |
8 | // If we want shaders on the Pi, we need to set the renderer to the programmable renderer
9 | #ifdef TARGET_OPENGLES
10 | ofSetCurrentRenderer(ofPtr(new ofGLProgrammableRenderer()));
11 | #endif
12 |
13 | ofSetupOpenGL(1280, 720, OF_WINDOW); // OF_WINDOW or OF_FULLSCREEN
14 | ofRunApp( new testApp());
15 | }
16 |
--------------------------------------------------------------------------------
/ShaderSimple/src/testApp.cpp:
--------------------------------------------------------------------------------
1 | #include "testApp.h"
2 |
3 | // ---------------------------------------------------------------------------------------------------------------------------------------------------
4 | //
5 | void testApp::setup()
6 | {
7 | ofBackground( 0, 0, 0 );
8 |
9 | fontSmall.loadFont("Fonts/DIN.otf", 8 );
10 |
11 | // We need to load different shaders for mobile (or Pi) and desktop.
12 | #ifdef TARGET_OPENGLES
13 | shader.load("Shaders/ShaderGLES");
14 | #else
15 | shader.load("Shaders/ShaderDesktop");
16 | #endif
17 | }
18 |
19 | // ---------------------------------------------------------------------------------------------------------------------------------------------------
20 | //
21 | void testApp::update()
22 | {
23 |
24 | }
25 |
26 | // ---------------------------------------------------------------------------------------------------------------------------------------------------
27 | //
28 | void testApp::draw()
29 | {
30 | ofSetColor(255);
31 |
32 | shader.begin();
33 | shader.setUniform1f("time", ofGetElapsedTimef() );
34 |
35 | // we need to draw something for the shader to run on those pixels
36 | ofRect(0, 0, ofGetWidth(), ofGetHeight() );
37 |
38 | shader.end();
39 |
40 |
41 | ofSetColor( 128, 128, 128 );
42 | fontSmall.drawString( "fps: " + ofToString( ofGetFrameRate(), 1), 5, ofGetHeight() - 10 );
43 | }
44 | // ---------------------------------------------------------------------------------------------------------------------------------------------------
45 | //
46 | void testApp::keyPressed(int key)
47 | {
48 | }
49 |
--------------------------------------------------------------------------------
/ShaderSimple/src/testApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 |
5 |
6 | // ---------------------------------------------------------------------------------------------------------------------------------------------------
7 | //
8 | class testApp : public ofBaseApp
9 | {
10 |
11 | public:
12 |
13 | void setup();
14 | void update();
15 | void draw();
16 |
17 | void keyPressed(int key);
18 |
19 | ofTrueTypeFont fontSmall;
20 |
21 | ofShader shader;
22 |
23 |
24 | };
25 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavcodec/avfft.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVCODEC_AVFFT_H
20 | #define AVCODEC_AVFFT_H
21 |
22 | /**
23 | * @file
24 | * @ingroup lavc_fft
25 | * FFT functions
26 | */
27 |
28 | /**
29 | * @defgroup lavc_fft FFT functions
30 | * @ingroup lavc_misc
31 | *
32 | * @{
33 | */
34 |
35 | typedef float FFTSample;
36 |
37 | typedef struct FFTComplex {
38 | FFTSample re, im;
39 | } FFTComplex;
40 |
41 | typedef struct FFTContext FFTContext;
42 |
43 | /**
44 | * Set up a complex FFT.
45 | * @param nbits log2 of the length of the input array
46 | * @param inverse if 0 perform the forward transform, if 1 perform the inverse
47 | */
48 | FFTContext *av_fft_init(int nbits, int inverse);
49 |
50 | /**
51 | * Do the permutation needed BEFORE calling ff_fft_calc().
52 | */
53 | void av_fft_permute(FFTContext *s, FFTComplex *z);
54 |
55 | /**
56 | * Do a complex FFT with the parameters defined in av_fft_init(). The
57 | * input data must be permuted before. No 1.0/sqrt(n) normalization is done.
58 | */
59 | void av_fft_calc(FFTContext *s, FFTComplex *z);
60 |
61 | void av_fft_end(FFTContext *s);
62 |
63 | FFTContext *av_mdct_init(int nbits, int inverse, double scale);
64 | void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
65 | void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input);
66 | void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
67 | void av_mdct_end(FFTContext *s);
68 |
69 | /* Real Discrete Fourier Transform */
70 |
71 | enum RDFTransformType {
72 | DFT_R2C,
73 | IDFT_C2R,
74 | IDFT_R2C,
75 | DFT_C2R,
76 | };
77 |
78 | typedef struct RDFTContext RDFTContext;
79 |
80 | /**
81 | * Set up a real FFT.
82 | * @param nbits log2 of the length of the input array
83 | * @param trans the type of transform
84 | */
85 | RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
86 | void av_rdft_calc(RDFTContext *s, FFTSample *data);
87 | void av_rdft_end(RDFTContext *s);
88 |
89 | /* Discrete Cosine Transform */
90 |
91 | typedef struct DCTContext DCTContext;
92 |
93 | enum DCTTransformType {
94 | DCT_II = 0,
95 | DCT_III,
96 | DCT_I,
97 | DST_I,
98 | };
99 |
100 | /**
101 | * Set up DCT.
102 | * @param nbits size of the input array:
103 | * (1 << nbits) for DCT-II, DCT-III and DST-I
104 | * (1 << nbits) + 1 for DCT-I
105 | *
106 | * @note the first element of the input of DST-I is ignored
107 | */
108 | DCTContext *av_dct_init(int nbits, enum DCTTransformType type);
109 | void av_dct_calc(DCTContext *s, FFTSample *data);
110 | void av_dct_end (DCTContext *s);
111 |
112 | /**
113 | * @}
114 | */
115 |
116 | #endif /* AVCODEC_AVFFT_H */
117 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavcodec/dxva2.h:
--------------------------------------------------------------------------------
1 | /*
2 | * DXVA2 HW acceleration
3 | *
4 | * copyright (c) 2009 Laurent Aimar
5 | *
6 | * This file is part of FFmpeg.
7 | *
8 | * FFmpeg is free software; you can redistribute it and/or
9 | * modify it under the terms of the GNU Lesser General Public
10 | * License as published by the Free Software Foundation; either
11 | * version 2.1 of the License, or (at your option) any later version.
12 | *
13 | * FFmpeg is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | * Lesser General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU Lesser General Public
19 | * License along with FFmpeg; if not, write to the Free Software
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 | */
22 |
23 | #ifndef AVCODEC_DXVA_H
24 | #define AVCODEC_DXVA_H
25 |
26 | /**
27 | * @file
28 | * @ingroup lavc_codec_hwaccel_dxva2
29 | * Public libavcodec DXVA2 header.
30 | */
31 |
32 | #if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600
33 | #undef _WIN32_WINNT
34 | #endif
35 |
36 | #if !defined(_WIN32_WINNT)
37 | #define _WIN32_WINNT 0x0600
38 | #endif
39 |
40 | #include
41 | #include
42 | #include
43 |
44 | /**
45 | * @defgroup lavc_codec_hwaccel_dxva2 DXVA2
46 | * @ingroup lavc_codec_hwaccel
47 | *
48 | * @{
49 | */
50 |
51 | #define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards
52 |
53 | /**
54 | * This structure is used to provides the necessary configurations and data
55 | * to the DXVA2 FFmpeg HWAccel implementation.
56 | *
57 | * The application must make it available as AVCodecContext.hwaccel_context.
58 | */
59 | struct dxva_context {
60 | /**
61 | * DXVA2 decoder object
62 | */
63 | IDirectXVideoDecoder *decoder;
64 |
65 | /**
66 | * DXVA2 configuration used to create the decoder
67 | */
68 | const DXVA2_ConfigPictureDecode *cfg;
69 |
70 | /**
71 | * The number of surface in the surface array
72 | */
73 | unsigned surface_count;
74 |
75 | /**
76 | * The array of Direct3D surfaces used to create the decoder
77 | */
78 | LPDIRECT3DSURFACE9 *surface;
79 |
80 | /**
81 | * A bit field configuring the workarounds needed for using the decoder
82 | */
83 | uint64_t workaround;
84 |
85 | /**
86 | * Private to the FFmpeg AVHWAccel implementation
87 | */
88 | unsigned report_id;
89 | };
90 |
91 | /**
92 | * @}
93 | */
94 |
95 | #endif /* AVCODEC_DXVA_H */
96 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavdevice/avdevice.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVDEVICE_AVDEVICE_H
20 | #define AVDEVICE_AVDEVICE_H
21 |
22 | #include "version.h"
23 |
24 | /**
25 | * @file
26 | * @ingroup lavd
27 | * Main libavdevice API header
28 | */
29 |
30 | /**
31 | * @defgroup lavd Special devices muxing/demuxing library
32 | * @{
33 | * Libavdevice is a complementary library to @ref libavf "libavformat". It
34 | * provides various "special" platform-specific muxers and demuxers, e.g. for
35 | * grabbing devices, audio capture and playback etc. As a consequence, the
36 | * (de)muxers in libavdevice are of the AVFMT_NOFILE type (they use their own
37 | * I/O functions). The filename passed to avformat_open_input() often does not
38 | * refer to an actually existing file, but has some special device-specific
39 | * meaning - e.g. for x11grab it is the display name.
40 | *
41 | * To use libavdevice, simply call avdevice_register_all() to register all
42 | * compiled muxers and demuxers. They all use standard libavformat API.
43 | * @}
44 | */
45 |
46 | #include "libavformat/avformat.h"
47 |
48 | /**
49 | * Return the LIBAVDEVICE_VERSION_INT constant.
50 | */
51 | unsigned avdevice_version(void);
52 |
53 | /**
54 | * Return the libavdevice build-time configuration.
55 | */
56 | const char *avdevice_configuration(void);
57 |
58 | /**
59 | * Return the libavdevice license.
60 | */
61 | const char *avdevice_license(void);
62 |
63 | /**
64 | * Initialize libavdevice and register all the input and output devices.
65 | * @warning This function is not thread safe.
66 | */
67 | void avdevice_register_all(void);
68 |
69 | #endif /* AVDEVICE_AVDEVICE_H */
70 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavdevice/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVDEVICE_VERSION_H
20 | #define AVDEVICE_VERSION_H
21 |
22 | /**
23 | * @file
24 | * @ingroup lavd
25 | * Libavdevice version macros
26 | */
27 |
28 | #include "libavutil/avutil.h"
29 |
30 | #define LIBAVDEVICE_VERSION_MAJOR 54
31 | #define LIBAVDEVICE_VERSION_MINOR 3
32 | #define LIBAVDEVICE_VERSION_MICRO 103
33 |
34 | #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
35 | LIBAVDEVICE_VERSION_MINOR, \
36 | LIBAVDEVICE_VERSION_MICRO)
37 | #define LIBAVDEVICE_VERSION AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \
38 | LIBAVDEVICE_VERSION_MINOR, \
39 | LIBAVDEVICE_VERSION_MICRO)
40 | #define LIBAVDEVICE_BUILD LIBAVDEVICE_VERSION_INT
41 |
42 | #define LIBAVDEVICE_IDENT "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION)
43 |
44 | /**
45 | * FF_API_* defines may be placed below to indicate public API that will be
46 | * dropped at a future version bump. The defines themselves are not part of
47 | * the public API and may change, break or disappear at any time.
48 | */
49 |
50 | #endif /* AVDEVICE_VERSION_H */
51 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavfilter/buffersrc.h:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * This file is part of Libav.
4 | *
5 | * Libav is free software; you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public
7 | * License as published by the Free Software Foundation; either
8 | * version 2.1 of the License, or (at your option) any later version.
9 | *
10 | * Libav is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | * Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public
16 | * License along with Libav; if not, write to the Free Software
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 | */
19 |
20 | #ifndef AVFILTER_BUFFERSRC_H
21 | #define AVFILTER_BUFFERSRC_H
22 |
23 | /**
24 | * @file
25 | * Memory buffer source API.
26 | */
27 |
28 | #include "libavcodec/avcodec.h"
29 | #include "avfilter.h"
30 |
31 | enum {
32 |
33 | /**
34 | * Do not check for format changes.
35 | */
36 | AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT = 1,
37 |
38 | /**
39 | * Do not copy buffer data.
40 | */
41 | AV_BUFFERSRC_FLAG_NO_COPY = 2,
42 |
43 | /**
44 | * Immediately push the frame to the output.
45 | */
46 | AV_BUFFERSRC_FLAG_PUSH = 4,
47 |
48 | };
49 |
50 | /**
51 | * Add buffer data in picref to buffer_src.
52 | *
53 | * @param buffer_src pointer to a buffer source context
54 | * @param picref a buffer reference, or NULL to mark EOF
55 | * @param flags a combination of AV_BUFFERSRC_FLAG_*
56 | * @return >= 0 in case of success, a negative AVERROR code
57 | * in case of failure
58 | */
59 | int av_buffersrc_add_ref(AVFilterContext *buffer_src,
60 | AVFilterBufferRef *picref, int flags);
61 |
62 | /**
63 | * Get the number of failed requests.
64 | *
65 | * A failed request is when the request_frame method is called while no
66 | * frame is present in the buffer.
67 | * The number is reset when a frame is added.
68 | */
69 | unsigned av_buffersrc_get_nb_failed_requests(AVFilterContext *buffer_src);
70 |
71 | #ifdef FF_API_BUFFERSRC_BUFFER
72 | /**
73 | * Add a buffer to the filtergraph s.
74 | *
75 | * @param buf buffer containing frame data to be passed down the filtergraph.
76 | * This function will take ownership of buf, the user must not free it.
77 | * A NULL buf signals EOF -- i.e. no more frames will be sent to this filter.
78 | * @deprecated Use av_buffersrc_add_ref(s, picref, AV_BUFFERSRC_FLAG_NO_COPY) instead.
79 | */
80 | attribute_deprecated
81 | int av_buffersrc_buffer(AVFilterContext *s, AVFilterBufferRef *buf);
82 | #endif
83 |
84 | /**
85 | * Add a frame to the buffer source.
86 | *
87 | * @param s an instance of the buffersrc filter.
88 | * @param frame frame to be added.
89 | *
90 | * @warning frame data will be memcpy()ed, which may be a big performance
91 | * hit. Use av_buffersrc_buffer() to avoid copying the data.
92 | */
93 | int av_buffersrc_write_frame(AVFilterContext *s, const AVFrame *frame);
94 |
95 | #endif /* AVFILTER_BUFFERSRC_H */
96 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavfilter/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Version macros.
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVFILTER_VERSION_H
22 | #define AVFILTER_VERSION_H
23 |
24 | /**
25 | * @file
26 | * Libavfilter version macros
27 | */
28 |
29 | #include "libavutil/avutil.h"
30 |
31 | #define LIBAVFILTER_VERSION_MAJOR 3
32 | #define LIBAVFILTER_VERSION_MINOR 42
33 | #define LIBAVFILTER_VERSION_MICRO 103
34 |
35 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
36 | LIBAVFILTER_VERSION_MINOR, \
37 | LIBAVFILTER_VERSION_MICRO)
38 | #define LIBAVFILTER_VERSION AV_VERSION(LIBAVFILTER_VERSION_MAJOR, \
39 | LIBAVFILTER_VERSION_MINOR, \
40 | LIBAVFILTER_VERSION_MICRO)
41 | #define LIBAVFILTER_BUILD LIBAVFILTER_VERSION_INT
42 |
43 | #define LIBAVFILTER_IDENT "Lavfi" AV_STRINGIFY(LIBAVFILTER_VERSION)
44 |
45 | /**
46 | * FF_API_* defines may be placed below to indicate public API that will be
47 | * dropped at a future version bump. The defines themselves are not part of
48 | * the public API and may change, break or disappear at any time.
49 | */
50 |
51 | #ifndef FF_API_AVFILTERPAD_PUBLIC
52 | #define FF_API_AVFILTERPAD_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 4)
53 | #endif
54 | #ifndef FF_API_FOO_COUNT
55 | #define FF_API_FOO_COUNT (LIBAVFILTER_VERSION_MAJOR < 4)
56 | #endif
57 | #ifndef FF_API_FILL_FRAME
58 | #define FF_API_FILL_FRAME (LIBAVFILTER_VERSION_MAJOR < 4)
59 | #endif
60 | #ifndef FF_API_BUFFERSRC_BUFFER
61 | #define FF_API_BUFFERSRC_BUFFER (LIBAVFILTER_VERSION_MAJOR < 4)
62 | #endif
63 |
64 | #endif /* AVFILTER_VERSION_H */
65 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavformat/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Version macros.
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVFORMAT_VERSION_H
22 | #define AVFORMAT_VERSION_H
23 |
24 | /**
25 | * @file
26 | * @ingroup libavf
27 | * Libavformat version macros
28 | */
29 |
30 | #include "libavutil/avutil.h"
31 |
32 | #define LIBAVFORMAT_VERSION_MAJOR 54
33 | #define LIBAVFORMAT_VERSION_MINOR 63
34 | #define LIBAVFORMAT_VERSION_MICRO 104
35 |
36 | #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
37 | LIBAVFORMAT_VERSION_MINOR, \
38 | LIBAVFORMAT_VERSION_MICRO)
39 | #define LIBAVFORMAT_VERSION AV_VERSION(LIBAVFORMAT_VERSION_MAJOR, \
40 | LIBAVFORMAT_VERSION_MINOR, \
41 | LIBAVFORMAT_VERSION_MICRO)
42 | #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
43 |
44 | #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
45 |
46 | /**
47 | * FF_API_* defines may be placed below to indicate public API that will be
48 | * dropped at a future version bump. The defines themselves are not part of
49 | * the public API and may change, break or disappear at any time.
50 | */
51 |
52 | #ifndef FF_API_OLD_AVIO
53 | #define FF_API_OLD_AVIO (LIBAVFORMAT_VERSION_MAJOR < 55)
54 | #endif
55 | #ifndef FF_API_PKT_DUMP
56 | #define FF_API_PKT_DUMP (LIBAVFORMAT_VERSION_MAJOR < 54)
57 | #endif
58 | #ifndef FF_API_ALLOC_OUTPUT_CONTEXT
59 | #define FF_API_ALLOC_OUTPUT_CONTEXT (LIBAVFORMAT_VERSION_MAJOR < 55)
60 | #endif
61 | #ifndef FF_API_FORMAT_PARAMETERS
62 | #define FF_API_FORMAT_PARAMETERS (LIBAVFORMAT_VERSION_MAJOR < 55)
63 | #endif
64 | #ifndef FF_API_NEW_STREAM
65 | #define FF_API_NEW_STREAM (LIBAVFORMAT_VERSION_MAJOR < 55)
66 | #endif
67 | #ifndef FF_API_SET_PTS_INFO
68 | #define FF_API_SET_PTS_INFO (LIBAVFORMAT_VERSION_MAJOR < 55)
69 | #endif
70 | #ifndef FF_API_CLOSE_INPUT_FILE
71 | #define FF_API_CLOSE_INPUT_FILE (LIBAVFORMAT_VERSION_MAJOR < 55)
72 | #endif
73 | #ifndef FF_API_APPLEHTTP_PROTO
74 | #define FF_API_APPLEHTTP_PROTO (LIBAVFORMAT_VERSION_MAJOR < 55)
75 | #endif
76 | #ifndef FF_API_READ_PACKET
77 | #define FF_API_READ_PACKET (LIBAVFORMAT_VERSION_MAJOR < 55)
78 | #endif
79 | #ifndef FF_API_INTERLEAVE_PACKET
80 | #define FF_API_INTERLEAVE_PACKET (LIBAVFORMAT_VERSION_MAJOR < 55)
81 | #endif
82 | #ifndef FF_API_AV_GETTIME
83 | #define FF_API_AV_GETTIME (LIBAVFORMAT_VERSION_MAJOR < 55)
84 | #endif
85 | #ifndef FF_API_R_FRAME_RATE
86 | #define FF_API_R_FRAME_RATE (LIBAVFORMAT_VERSION_MAJOR < 55)
87 | #endif
88 |
89 | #endif /* AVFORMAT_VERSION_H */
90 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/adler32.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2006 Mans Rullgard
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_ADLER32_H
22 | #define AVUTIL_ADLER32_H
23 |
24 | #include
25 | #include "attributes.h"
26 |
27 | /**
28 | * @ingroup lavu_crypto
29 | * Calculate the Adler32 checksum of a buffer.
30 | *
31 | * Passing the return value to a subsequent av_adler32_update() call
32 | * allows the checksum of multiple buffers to be calculated as though
33 | * they were concatenated.
34 | *
35 | * @param adler initial checksum value
36 | * @param buf pointer to input buffer
37 | * @param len size of input buffer
38 | * @return updated checksum
39 | */
40 | unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf,
41 | unsigned int len) av_pure;
42 |
43 | #endif /* AVUTIL_ADLER32_H */
44 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/aes.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2007 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_AES_H
22 | #define AVUTIL_AES_H
23 |
24 | #include
25 |
26 | #include "attributes.h"
27 | #include "version.h"
28 |
29 | /**
30 | * @defgroup lavu_aes AES
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | extern const int av_aes_size;
36 |
37 | struct AVAES;
38 |
39 | /**
40 | * Allocate an AVAES context.
41 | */
42 | struct AVAES *av_aes_alloc(void);
43 |
44 | /**
45 | * Initialize an AVAES context.
46 | * @param key_bits 128, 192 or 256
47 | * @param decrypt 0 for encryption, 1 for decryption
48 | */
49 | int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt);
50 |
51 | /**
52 | * Encrypt or decrypt a buffer using a previously initialized context.
53 | * @param count number of 16 byte blocks
54 | * @param dst destination array, can be equal to src
55 | * @param src source array, can be equal to dst
56 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used
57 | * @param decrypt 0 for encryption, 1 for decryption
58 | */
59 | void av_aes_crypt(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
60 |
61 | /**
62 | * @}
63 | */
64 |
65 | #endif /* AVUTIL_AES_H */
66 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/audioconvert.h:
--------------------------------------------------------------------------------
1 |
2 | #include "version.h"
3 |
4 | #if FF_API_AUDIOCONVERT
5 | #include "channel_layout.h"
6 | #endif
7 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/avassert.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2010 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | /**
22 | * @file
23 | * simple assert() macros that are a bit more flexible than ISO C assert().
24 | * @author Michael Niedermayer
25 | */
26 |
27 | #ifndef AVUTIL_AVASSERT_H
28 | #define AVUTIL_AVASSERT_H
29 |
30 | #include
31 | #include "avutil.h"
32 | #include "log.h"
33 |
34 | /**
35 | * assert() equivalent, that is always enabled.
36 | */
37 | #define av_assert0(cond) do { \
38 | if (!(cond)) { \
39 | av_log(NULL, AV_LOG_PANIC, "Assertion %s failed at %s:%d\n", \
40 | AV_STRINGIFY(cond), __FILE__, __LINE__); \
41 | abort(); \
42 | } \
43 | } while (0)
44 |
45 |
46 | /**
47 | * assert() equivalent, that does not lie in speed critical code.
48 | * These asserts() thus can be enabled without fearing speedloss.
49 | */
50 | #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0
51 | #define av_assert1(cond) av_assert0(cond)
52 | #else
53 | #define av_assert1(cond) ((void)0)
54 | #endif
55 |
56 |
57 | /**
58 | * assert() equivalent, that does lie in speed critical code.
59 | */
60 | #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1
61 | #define av_assert2(cond) av_assert0(cond)
62 | #else
63 | #define av_assert2(cond) ((void)0)
64 | #endif
65 |
66 | #endif /* AVUTIL_AVASSERT_H */
67 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/avconfig.h:
--------------------------------------------------------------------------------
1 | /* Generated by ffconf */
2 | #ifndef AVUTIL_AVCONFIG_H
3 | #define AVUTIL_AVCONFIG_H
4 | #define AV_HAVE_BIGENDIAN 0
5 | #define AV_HAVE_FAST_UNALIGNED 1
6 | #define AV_HAVE_INCOMPATIBLE_FORK_ABI 0
7 | #endif /* AVUTIL_AVCONFIG_H */
8 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/base64.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com)
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_BASE64_H
22 | #define AVUTIL_BASE64_H
23 |
24 | #include
25 |
26 | /**
27 | * @defgroup lavu_base64 Base64
28 | * @ingroup lavu_crypto
29 | * @{
30 | */
31 |
32 |
33 | /**
34 | * Decode a base64-encoded string.
35 | *
36 | * @param out buffer for decoded data
37 | * @param in null-terminated input string
38 | * @param out_size size in bytes of the out buffer, must be at
39 | * least 3/4 of the length of in
40 | * @return number of bytes written, or a negative value in case of
41 | * invalid input
42 | */
43 | int av_base64_decode(uint8_t *out, const char *in, int out_size);
44 |
45 | /**
46 | * Encode data to base64 and null-terminate.
47 | *
48 | * @param out buffer for encoded data
49 | * @param out_size size in bytes of the out buffer (including the
50 | * null terminator), must be at least AV_BASE64_SIZE(in_size)
51 | * @param in input buffer containing the data to encode
52 | * @param in_size size in bytes of the in buffer
53 | * @return out or NULL in case of error
54 | */
55 | char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size);
56 |
57 | /**
58 | * Calculate the output size needed to base64-encode x bytes to a
59 | * null-terminated string.
60 | */
61 | #define AV_BASE64_SIZE(x) (((x)+2) / 3 * 4 + 1)
62 |
63 | /**
64 | * @}
65 | */
66 |
67 | #endif /* AVUTIL_BASE64_H */
68 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/blowfish.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Blowfish algorithm
3 | * Copyright (c) 2012 Samuel Pitoiset
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVUTIL_BLOWFISH_H
23 | #define AVUTIL_BLOWFISH_H
24 |
25 | #include
26 |
27 | /**
28 | * @defgroup lavu_blowfish Blowfish
29 | * @ingroup lavu_crypto
30 | * @{
31 | */
32 |
33 | #define AV_BF_ROUNDS 16
34 |
35 | typedef struct AVBlowfish {
36 | uint32_t p[AV_BF_ROUNDS + 2];
37 | uint32_t s[4][256];
38 | } AVBlowfish;
39 |
40 | /**
41 | * Initialize an AVBlowfish context.
42 | *
43 | * @param ctx an AVBlowfish context
44 | * @param key a key
45 | * @param key_len length of the key
46 | */
47 | void av_blowfish_init(struct AVBlowfish *ctx, const uint8_t *key, int key_len);
48 |
49 | /**
50 | * Encrypt or decrypt a buffer using a previously initialized context.
51 | *
52 | * @param ctx an AVBlowfish context
53 | * @param xl left four bytes halves of input to be encrypted
54 | * @param xr right four bytes halves of input to be encrypted
55 | * @param decrypt 0 for encryption, 1 for decryption
56 | */
57 | void av_blowfish_crypt_ecb(struct AVBlowfish *ctx, uint32_t *xl, uint32_t *xr,
58 | int decrypt);
59 |
60 | /**
61 | * Encrypt or decrypt a buffer using a previously initialized context.
62 | *
63 | * @param ctx an AVBlowfish context
64 | * @param dst destination array, can be equal to src
65 | * @param src source array, can be equal to dst
66 | * @param count number of 8 byte blocks
67 | * @param iv initialization vector for CBC mode, if NULL ECB will be used
68 | * @param decrypt 0 for encryption, 1 for decryption
69 | */
70 | void av_blowfish_crypt(struct AVBlowfish *ctx, uint8_t *dst, const uint8_t *src,
71 | int count, uint8_t *iv, int decrypt);
72 |
73 | /**
74 | * @}
75 | */
76 |
77 | #endif /* AVUTIL_BLOWFISH_H */
78 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/bswap.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2006 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | /**
22 | * @file
23 | * byte swapping routines
24 | */
25 |
26 | #ifndef AVUTIL_BSWAP_H
27 | #define AVUTIL_BSWAP_H
28 |
29 | #include
30 | #include "libavutil/avconfig.h"
31 | #include "attributes.h"
32 |
33 | #ifdef HAVE_AV_CONFIG_H
34 |
35 | #include "config.h"
36 |
37 | #if ARCH_ARM
38 | # include "arm/bswap.h"
39 | #elif ARCH_AVR32
40 | # include "avr32/bswap.h"
41 | #elif ARCH_BFIN
42 | # include "bfin/bswap.h"
43 | #elif ARCH_SH4
44 | # include "sh4/bswap.h"
45 | #elif ARCH_X86
46 | # include "x86/bswap.h"
47 | #endif
48 |
49 | #endif /* HAVE_AV_CONFIG_H */
50 |
51 | #define AV_BSWAP16C(x) (((x) << 8 & 0xff00) | ((x) >> 8 & 0x00ff))
52 | #define AV_BSWAP32C(x) (AV_BSWAP16C(x) << 16 | AV_BSWAP16C((x) >> 16))
53 | #define AV_BSWAP64C(x) (AV_BSWAP32C(x) << 32 | AV_BSWAP32C((x) >> 32))
54 |
55 | #define AV_BSWAPC(s, x) AV_BSWAP##s##C(x)
56 |
57 | #ifndef av_bswap16
58 | static av_always_inline av_const uint16_t av_bswap16(uint16_t x)
59 | {
60 | x= (x>>8) | (x<<8);
61 | return x;
62 | }
63 | #endif
64 |
65 | #ifndef av_bswap32
66 | static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
67 | {
68 | return AV_BSWAP32C(x);
69 | }
70 | #endif
71 |
72 | #ifndef av_bswap64
73 | static inline uint64_t av_const av_bswap64(uint64_t x)
74 | {
75 | return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32);
76 | }
77 | #endif
78 |
79 | // be2ne ... big-endian to native-endian
80 | // le2ne ... little-endian to native-endian
81 |
82 | #if AV_HAVE_BIGENDIAN
83 | #define av_be2ne16(x) (x)
84 | #define av_be2ne32(x) (x)
85 | #define av_be2ne64(x) (x)
86 | #define av_le2ne16(x) av_bswap16(x)
87 | #define av_le2ne32(x) av_bswap32(x)
88 | #define av_le2ne64(x) av_bswap64(x)
89 | #define AV_BE2NEC(s, x) (x)
90 | #define AV_LE2NEC(s, x) AV_BSWAPC(s, x)
91 | #else
92 | #define av_be2ne16(x) av_bswap16(x)
93 | #define av_be2ne32(x) av_bswap32(x)
94 | #define av_be2ne64(x) av_bswap64(x)
95 | #define av_le2ne16(x) (x)
96 | #define av_le2ne32(x) (x)
97 | #define av_le2ne64(x) (x)
98 | #define AV_BE2NEC(s, x) AV_BSWAPC(s, x)
99 | #define AV_LE2NEC(s, x) (x)
100 | #endif
101 |
102 | #define AV_BE2NE16C(x) AV_BE2NEC(16, x)
103 | #define AV_BE2NE32C(x) AV_BE2NEC(32, x)
104 | #define AV_BE2NE64C(x) AV_BE2NEC(64, x)
105 | #define AV_LE2NE16C(x) AV_LE2NEC(16, x)
106 | #define AV_LE2NE32C(x) AV_LE2NEC(32, x)
107 | #define AV_LE2NE64C(x) AV_LE2NEC(64, x)
108 |
109 | #endif /* AVUTIL_BSWAP_H */
110 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/crc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2006 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_CRC_H
22 | #define AVUTIL_CRC_H
23 |
24 | #include
25 | #include
26 | #include "attributes.h"
27 |
28 | typedef uint32_t AVCRC;
29 |
30 | typedef enum {
31 | AV_CRC_8_ATM,
32 | AV_CRC_16_ANSI,
33 | AV_CRC_16_CCITT,
34 | AV_CRC_32_IEEE,
35 | AV_CRC_32_IEEE_LE, /*< reversed bitorder version of AV_CRC_32_IEEE */
36 | AV_CRC_MAX, /*< Not part of public API! Do not use outside libavutil. */
37 | }AVCRCId;
38 |
39 | /**
40 | * Initialize a CRC table.
41 | * @param ctx must be an array of size sizeof(AVCRC)*257 or sizeof(AVCRC)*1024
42 | * @param le If 1, the lowest bit represents the coefficient for the highest
43 | * exponent of the corresponding polynomial (both for poly and
44 | * actual CRC).
45 | * If 0, you must swap the CRC parameter and the result of av_crc
46 | * if you need the standard representation (can be simplified in
47 | * most cases to e.g. bswap16):
48 | * av_bswap32(crc << (32-bits))
49 | * @param bits number of bits for the CRC
50 | * @param poly generator polynomial without the x**bits coefficient, in the
51 | * representation as specified by le
52 | * @param ctx_size size of ctx in bytes
53 | * @return <0 on failure
54 | */
55 | int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size);
56 |
57 | /**
58 | * Get an initialized standard CRC table.
59 | * @param crc_id ID of a standard CRC
60 | * @return a pointer to the CRC table or NULL on failure
61 | */
62 | const AVCRC *av_crc_get_table(AVCRCId crc_id);
63 |
64 | /**
65 | * Calculate the CRC of a block.
66 | * @param crc CRC of previous blocks if any or initial value for CRC
67 | * @return CRC updated with the data from the given block
68 | *
69 | * @see av_crc_init() "le" parameter
70 | */
71 | uint32_t av_crc(const AVCRC *ctx, uint32_t crc,
72 | const uint8_t *buffer, size_t length) av_pure;
73 |
74 | #endif /* AVUTIL_CRC_H */
75 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/file.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef AVUTIL_FILE_H
20 | #define AVUTIL_FILE_H
21 |
22 | #include
23 |
24 | #include "avutil.h"
25 |
26 | /**
27 | * @file
28 | * Misc file utilities.
29 | */
30 |
31 | /**
32 | * Read the file with name filename, and put its content in a newly
33 | * allocated buffer or map it with mmap() when available.
34 | * In case of success set *bufptr to the read or mmapped buffer, and
35 | * *size to the size in bytes of the buffer in *bufptr.
36 | * The returned buffer must be released with av_file_unmap().
37 | *
38 | * @param log_offset loglevel offset used for logging
39 | * @param log_ctx context used for logging
40 | * @return a non negative number in case of success, a negative value
41 | * corresponding to an AVERROR error code in case of failure
42 | */
43 | int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
44 | int log_offset, void *log_ctx);
45 |
46 | /**
47 | * Unmap or free the buffer bufptr created by av_file_map().
48 | *
49 | * @param size size in bytes of bufptr, must be the same as returned
50 | * by av_file_map()
51 | */
52 | void av_file_unmap(uint8_t *bufptr, size_t size);
53 |
54 | /**
55 | * Wrapper to work around the lack of mkstemp() on mingw.
56 | * Also, tries to create file in /tmp first, if possible.
57 | * *prefix can be a character constant; *filename will be allocated internally.
58 | * @return file descriptor of opened file (or -1 on error)
59 | * and opened file name in **filename.
60 | * @note On very old libcs it is necessary to set a secure umask before
61 | * calling this, av_tempfile() cant call umask itself as it is used in
62 | * libraries and could interfere with the calling application.
63 | */
64 | int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx);
65 |
66 | #endif /* AVUTIL_FILE_H */
67 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/hmac.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Martin Storsjo
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_HMAC_H
22 | #define AVUTIL_HMAC_H
23 |
24 | #include
25 |
26 | /**
27 | * @defgroup lavu_hmac HMAC
28 | * @ingroup lavu_crypto
29 | * @{
30 | */
31 |
32 | enum AVHMACType {
33 | AV_HMAC_MD5,
34 | AV_HMAC_SHA1,
35 | };
36 |
37 | typedef struct AVHMAC AVHMAC;
38 |
39 | /**
40 | * Allocate an AVHMAC context.
41 | * @param type The hash function used for the HMAC.
42 | */
43 | AVHMAC *av_hmac_alloc(enum AVHMACType type);
44 |
45 | /**
46 | * Free an AVHMAC context.
47 | * @param ctx The context to free, may be NULL
48 | */
49 | void av_hmac_free(AVHMAC *ctx);
50 |
51 | /**
52 | * Initialize an AVHMAC context with an authentication key.
53 | * @param ctx The HMAC context
54 | * @param key The authentication key
55 | * @param keylen The length of the key, in bytes
56 | */
57 | void av_hmac_init(AVHMAC *ctx, const uint8_t *key, unsigned int keylen);
58 |
59 | /**
60 | * Hash data with the HMAC.
61 | * @param ctx The HMAC context
62 | * @param data The data to hash
63 | * @param len The length of the data, in bytes
64 | */
65 | void av_hmac_update(AVHMAC *ctx, const uint8_t *data, unsigned int len);
66 |
67 | /**
68 | * Finish hashing and output the HMAC digest.
69 | * @param ctx The HMAC context
70 | * @param out The output buffer to write the digest into
71 | * @param outlen The length of the out buffer, in bytes
72 | * @return The number of bytes written to out, or a negative error code.
73 | */
74 | int av_hmac_final(AVHMAC *ctx, uint8_t *out, unsigned int outlen);
75 |
76 | /**
77 | * Hash an array of data with a key.
78 | * @param ctx The HMAC context
79 | * @param data The data to hash
80 | * @param len The length of the data, in bytes
81 | * @param key The authentication key
82 | * @param keylen The length of the key, in bytes
83 | * @param out The output buffer to write the digest into
84 | * @param outlen The length of the out buffer, in bytes
85 | * @return The number of bytes written to out, or a negative error code.
86 | */
87 | int av_hmac_calc(AVHMAC *ctx, const uint8_t *data, unsigned int len,
88 | const uint8_t *key, unsigned int keylen,
89 | uint8_t *out, unsigned int outlen);
90 |
91 | /**
92 | * @}
93 | */
94 |
95 | #endif /* AVUTIL_HMAC_H */
96 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/intfloat.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2011 Mans Rullgard
3 | *
4 | * This file is part of Libav.
5 | *
6 | * Libav is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * Libav is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with Libav; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_INTFLOAT_H
22 | #define AVUTIL_INTFLOAT_H
23 |
24 | #include
25 | #include "attributes.h"
26 |
27 | union av_intfloat32 {
28 | uint32_t i;
29 | float f;
30 | };
31 |
32 | union av_intfloat64 {
33 | uint64_t i;
34 | double f;
35 | };
36 |
37 | /**
38 | * Reinterpret a 32-bit integer as a float.
39 | */
40 | static av_always_inline float av_int2float(uint32_t i)
41 | {
42 | union av_intfloat32 v;
43 | v.i = i;
44 | return v.f;
45 | }
46 |
47 | /**
48 | * Reinterpret a float as a 32-bit integer.
49 | */
50 | static av_always_inline uint32_t av_float2int(float f)
51 | {
52 | union av_intfloat32 v;
53 | v.f = f;
54 | return v.i;
55 | }
56 |
57 | /**
58 | * Reinterpret a 64-bit integer as a double.
59 | */
60 | static av_always_inline double av_int2double(uint64_t i)
61 | {
62 | union av_intfloat64 v;
63 | v.i = i;
64 | return v.f;
65 | }
66 |
67 | /**
68 | * Reinterpret a double as a 64-bit integer.
69 | */
70 | static av_always_inline uint64_t av_double2int(double f)
71 | {
72 | union av_intfloat64 v;
73 | v.f = f;
74 | return v.i;
75 | }
76 |
77 | #endif /* AVUTIL_INTFLOAT_H */
78 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/intfloat_readwrite.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2005 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_INTFLOAT_READWRITE_H
22 | #define AVUTIL_INTFLOAT_READWRITE_H
23 |
24 | #include
25 | #include "attributes.h"
26 |
27 | /* IEEE 80 bits extended float */
28 | typedef struct AVExtFloat {
29 | uint8_t exponent[2];
30 | uint8_t mantissa[8];
31 | } AVExtFloat;
32 |
33 | attribute_deprecated double av_int2dbl(int64_t v) av_const;
34 | attribute_deprecated float av_int2flt(int32_t v) av_const;
35 | attribute_deprecated double av_ext2dbl(const AVExtFloat ext) av_const;
36 | attribute_deprecated int64_t av_dbl2int(double d) av_const;
37 | attribute_deprecated int32_t av_flt2int(float d) av_const;
38 | attribute_deprecated AVExtFloat av_dbl2ext(double d) av_const;
39 |
40 | #endif /* AVUTIL_INTFLOAT_READWRITE_H */
41 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/lfg.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Lagged Fibonacci PRNG
3 | * Copyright (c) 2008 Michael Niedermayer
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVUTIL_LFG_H
23 | #define AVUTIL_LFG_H
24 |
25 | typedef struct AVLFG {
26 | unsigned int state[64];
27 | int index;
28 | } AVLFG;
29 |
30 | void av_lfg_init(AVLFG *c, unsigned int seed);
31 |
32 | /**
33 | * Get the next random unsigned 32-bit number using an ALFG.
34 | *
35 | * Please also consider a simple LCG like state= state*1664525+1013904223,
36 | * it may be good enough and faster for your specific use case.
37 | */
38 | static inline unsigned int av_lfg_get(AVLFG *c){
39 | c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63];
40 | return c->state[c->index++ & 63];
41 | }
42 |
43 | /**
44 | * Get the next random unsigned 32-bit number using a MLFG.
45 | *
46 | * Please also consider av_lfg_get() above, it is faster.
47 | */
48 | static inline unsigned int av_mlfg_get(AVLFG *c){
49 | unsigned int a= c->state[(c->index-55) & 63];
50 | unsigned int b= c->state[(c->index-24) & 63];
51 | return c->state[c->index++ & 63] = 2*a*b+a+b;
52 | }
53 |
54 | /**
55 | * Get the next two numbers generated by a Box-Muller Gaussian
56 | * generator using the random numbers issued by lfg.
57 | *
58 | * @param out array where the two generated numbers are placed
59 | */
60 | void av_bmg_get(AVLFG *lfg, double out[2]);
61 |
62 | #endif /* AVUTIL_LFG_H */
63 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/lzo.h:
--------------------------------------------------------------------------------
1 | /*
2 | * LZO 1x decompression
3 | * copyright (c) 2006 Reimar Doeffinger
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVUTIL_LZO_H
23 | #define AVUTIL_LZO_H
24 |
25 | /**
26 | * @defgroup lavu_lzo LZO
27 | * @ingroup lavu_crypto
28 | *
29 | * @{
30 | */
31 |
32 | #include
33 |
34 | /** @name Error flags returned by av_lzo1x_decode
35 | * @{ */
36 | /// end of the input buffer reached before decoding finished
37 | #define AV_LZO_INPUT_DEPLETED 1
38 | /// decoded data did not fit into output buffer
39 | #define AV_LZO_OUTPUT_FULL 2
40 | /// a reference to previously decoded data was wrong
41 | #define AV_LZO_INVALID_BACKPTR 4
42 | /// a non-specific error in the compressed bitstream
43 | #define AV_LZO_ERROR 8
44 | /** @} */
45 |
46 | #define AV_LZO_INPUT_PADDING 8
47 | #define AV_LZO_OUTPUT_PADDING 12
48 |
49 | /**
50 | * @brief Decodes LZO 1x compressed data.
51 | * @param out output buffer
52 | * @param outlen size of output buffer, number of bytes left are returned here
53 | * @param in input buffer
54 | * @param inlen size of input buffer, number of bytes left are returned here
55 | * @return 0 on success, otherwise a combination of the error flags above
56 | *
57 | * Make sure all buffers are appropriately padded, in must provide
58 | * AV_LZO_INPUT_PADDING, out must provide AV_LZO_OUTPUT_PADDING additional bytes.
59 | */
60 | int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen);
61 |
62 | /**
63 | * @}
64 | */
65 |
66 | #endif /* AVUTIL_LZO_H */
67 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/md5.h:
--------------------------------------------------------------------------------
1 | /*
2 | * copyright (c) 2006 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_MD5_H
22 | #define AVUTIL_MD5_H
23 |
24 | #include
25 |
26 | #include "attributes.h"
27 | #include "version.h"
28 |
29 | /**
30 | * @defgroup lavu_md5 MD5
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | extern const int av_md5_size;
36 |
37 | struct AVMD5;
38 |
39 | struct AVMD5 *av_md5_alloc(void);
40 | void av_md5_init(struct AVMD5 *ctx);
41 | void av_md5_update(struct AVMD5 *ctx, const uint8_t *src, const int len);
42 | void av_md5_final(struct AVMD5 *ctx, uint8_t *dst);
43 | void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len);
44 |
45 | /**
46 | * @}
47 | */
48 |
49 | #endif /* AVUTIL_MD5_H */
50 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/random_seed.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009 Baptiste Coudurier
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_RANDOM_SEED_H
22 | #define AVUTIL_RANDOM_SEED_H
23 |
24 | #include
25 | /**
26 | * @addtogroup lavu_crypto
27 | * @{
28 | */
29 |
30 | /**
31 | * Get a seed to use in conjunction with random functions.
32 | * This function tries to provide a good seed at a best effort bases.
33 | * Its possible to call this function multiple times if more bits are needed.
34 | * It can be quite slow, which is why it should only be used as seed for a faster
35 | * PRNG. The quality of the seed depends on the platform.
36 | */
37 | uint32_t av_get_random_seed(void);
38 |
39 | /**
40 | * @}
41 | */
42 |
43 | #endif /* AVUTIL_RANDOM_SEED_H */
44 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/sha.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Michael Niedermayer
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_SHA_H
22 | #define AVUTIL_SHA_H
23 |
24 | #include
25 |
26 | #include "attributes.h"
27 | #include "version.h"
28 |
29 | /**
30 | * @defgroup lavu_sha SHA
31 | * @ingroup lavu_crypto
32 | * @{
33 | */
34 |
35 | extern const int av_sha_size;
36 |
37 | struct AVSHA;
38 |
39 | /**
40 | * Allocate an AVSHA context.
41 | */
42 | struct AVSHA *av_sha_alloc(void);
43 |
44 | /**
45 | * Initialize SHA-1 or SHA-2 hashing.
46 | *
47 | * @param context pointer to the function context (of size av_sha_size)
48 | * @param bits number of bits in digest (SHA-1 - 160 bits, SHA-2 224 or 256 bits)
49 | * @return zero if initialization succeeded, -1 otherwise
50 | */
51 | int av_sha_init(struct AVSHA* context, int bits);
52 |
53 | /**
54 | * Update hash value.
55 | *
56 | * @param context hash function context
57 | * @param data input data to update hash with
58 | * @param len input data length
59 | */
60 | void av_sha_update(struct AVSHA* context, const uint8_t* data, unsigned int len);
61 |
62 | /**
63 | * Finish hashing and output digest value.
64 | *
65 | * @param context hash function context
66 | * @param digest buffer where output digest value is stored
67 | */
68 | void av_sha_final(struct AVSHA* context, uint8_t *digest);
69 |
70 | /**
71 | * @}
72 | */
73 |
74 | #endif /* AVUTIL_SHA_H */
75 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/time.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000-2003 Fabrice Bellard
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef AVUTIL_TIME_H
22 | #define AVUTIL_TIME_H
23 |
24 | #include
25 |
26 | /**
27 | * Get the current time in microseconds.
28 | */
29 | int64_t av_gettime(void);
30 |
31 | /**
32 | * Sleep for a period of time. Although the duration is expressed in
33 | * microseconds, the actual delay may be rounded to the precision of the
34 | * system timer.
35 | *
36 | * @param usec Number of microseconds to sleep.
37 | * @return zero on success or (negative) error code.
38 | */
39 | int av_usleep(unsigned usec);
40 |
41 | #endif /* AVUTIL_TIME_H */
42 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/timestamp.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | /**
20 | * @file
21 | * timestamp utils, mostly useful for debugging/logging purposes
22 | */
23 |
24 | #ifndef AVUTIL_TIMESTAMP_H
25 | #define AVUTIL_TIMESTAMP_H
26 |
27 | #include "common.h"
28 |
29 | #define AV_TS_MAX_STRING_SIZE 32
30 |
31 | /**
32 | * Fill the provided buffer with a string containing a timestamp
33 | * representation.
34 | *
35 | * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE
36 | * @param ts the timestamp to represent
37 | * @return the buffer in input
38 | */
39 | static inline char *av_ts_make_string(char *buf, int64_t ts)
40 | {
41 | if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS");
42 | else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%"PRId64"", ts);
43 | return buf;
44 | }
45 |
46 | /**
47 | * Convenience macro, the return value should be used only directly in
48 | * function arguments but never stand-alone.
49 | */
50 | #define av_ts2str(ts) av_ts_make_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts)
51 |
52 | /**
53 | * Fill the provided buffer with a string containing a timestamp time
54 | * representation.
55 | *
56 | * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE
57 | * @param ts the timestamp to represent
58 | * @param tb the timebase of the timestamp
59 | * @return the buffer in input
60 | */
61 | static inline char *av_ts_make_time_string(char *buf, int64_t ts, AVRational *tb)
62 | {
63 | if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS");
64 | else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%.6g", av_q2d(*tb) * ts);
65 | return buf;
66 | }
67 |
68 | /**
69 | * Convenience macro, the return value should be used only directly in
70 | * function arguments but never stand-alone.
71 | */
72 | #define av_ts2timestr(ts, tb) av_ts_make_time_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts, tb)
73 |
74 | #endif /* AVUTIL_TIMESTAMP_H */
75 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libavutil/xtea.h:
--------------------------------------------------------------------------------
1 | /*
2 | * A 32-bit implementation of the XTEA algorithm
3 | * Copyright (c) 2012 Samuel Pitoiset
4 | *
5 | * This file is part of FFmpeg.
6 | *
7 | * FFmpeg is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * FFmpeg is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with FFmpeg; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #ifndef AVUTIL_XTEA_H
23 | #define AVUTIL_XTEA_H
24 |
25 | #include
26 |
27 | /**
28 | * @defgroup lavu_xtea XTEA
29 | * @ingroup lavu_crypto
30 | * @{
31 | */
32 |
33 | typedef struct AVXTEA {
34 | uint32_t key[16];
35 | } AVXTEA;
36 |
37 | /**
38 | * Initialize an AVXTEA context.
39 | *
40 | * @param ctx an AVXTEA context
41 | * @param key a key of 16 bytes used for encryption/decryption
42 | */
43 | void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]);
44 |
45 | /**
46 | * Encrypt or decrypt a buffer using a previously initialized context.
47 | *
48 | * @param ctx an AVXTEA context
49 | * @param dst destination array, can be equal to src
50 | * @param src source array, can be equal to dst
51 | * @param count number of 8 byte blocks
52 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used
53 | * @param decrypt 0 for encryption, 1 for decryption
54 | */
55 | void av_xtea_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src,
56 | int count, uint8_t *iv, int decrypt);
57 |
58 | /**
59 | * @}
60 | */
61 |
62 | #endif /* AVUTIL_XTEA_H */
63 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libpostproc/postprocess.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2001-2003 Michael Niedermayer (michaelni@gmx.at)
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef POSTPROC_POSTPROCESS_H
22 | #define POSTPROC_POSTPROCESS_H
23 |
24 | /**
25 | * @file
26 | * @ingroup lpp
27 | * external API header
28 | */
29 |
30 | /**
31 | * @defgroup lpp Libpostproc
32 | * @{
33 | */
34 |
35 | #include "libpostproc/version.h"
36 |
37 | /**
38 | * Return the LIBPOSTPROC_VERSION_INT constant.
39 | */
40 | unsigned postproc_version(void);
41 |
42 | /**
43 | * Return the libpostproc build-time configuration.
44 | */
45 | const char *postproc_configuration(void);
46 |
47 | /**
48 | * Return the libpostproc license.
49 | */
50 | const char *postproc_license(void);
51 |
52 | #define PP_QUALITY_MAX 6
53 |
54 | #define QP_STORE_T int8_t
55 |
56 | #include
57 |
58 | typedef void pp_context;
59 | typedef void pp_mode;
60 |
61 | #if LIBPOSTPROC_VERSION_INT < (52<<16)
62 | typedef pp_context pp_context_t;
63 | typedef pp_mode pp_mode_t;
64 | extern const char *const pp_help; ///< a simple help text
65 | #else
66 | extern const char pp_help[]; ///< a simple help text
67 | #endif
68 |
69 | void pp_postprocess(const uint8_t * src[3], const int srcStride[3],
70 | uint8_t * dst[3], const int dstStride[3],
71 | int horizontalSize, int verticalSize,
72 | const QP_STORE_T *QP_store, int QP_stride,
73 | pp_mode *mode, pp_context *ppContext, int pict_type);
74 |
75 |
76 | /**
77 | * Return a pp_mode or NULL if an error occurred.
78 | *
79 | * @param name the string after "-pp" on the command line
80 | * @param quality a number from 0 to PP_QUALITY_MAX
81 | */
82 | pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality);
83 | void pp_free_mode(pp_mode *mode);
84 |
85 | pp_context *pp_get_context(int width, int height, int flags);
86 | void pp_free_context(pp_context *ppContext);
87 |
88 | #define PP_CPU_CAPS_MMX 0x80000000
89 | #define PP_CPU_CAPS_MMX2 0x20000000
90 | #define PP_CPU_CAPS_3DNOW 0x40000000
91 | #define PP_CPU_CAPS_ALTIVEC 0x10000000
92 | #define PP_CPU_CAPS_AUTO 0x00080000
93 |
94 | #define PP_FORMAT 0x00000008
95 | #define PP_FORMAT_420 (0x00000011|PP_FORMAT)
96 | #define PP_FORMAT_422 (0x00000001|PP_FORMAT)
97 | #define PP_FORMAT_411 (0x00000002|PP_FORMAT)
98 | #define PP_FORMAT_444 (0x00000000|PP_FORMAT)
99 |
100 | #define PP_PICT_TYPE_QP2 0x00000010 ///< MPEG2 style QScale
101 |
102 | /**
103 | * @}
104 | */
105 |
106 | #endif /* POSTPROC_POSTPROCESS_H */
107 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libpostproc/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Version macros.
3 | *
4 | * This file is part of FFmpeg.
5 | *
6 | * FFmpeg is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * FFmpeg is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with FFmpeg; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef POSTPROC_POSTPROCESS_VERSION_H
22 | #define POSTPROC_POSTPROCESS_VERSION_H
23 |
24 | /**
25 | * @file
26 | * Libpostproc version macros
27 | */
28 |
29 | #include "libavutil/avutil.h"
30 |
31 | #define LIBPOSTPROC_VERSION_MAJOR 52
32 | #define LIBPOSTPROC_VERSION_MINOR 2
33 | #define LIBPOSTPROC_VERSION_MICRO 100
34 |
35 | #define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \
36 | LIBPOSTPROC_VERSION_MINOR, \
37 | LIBPOSTPROC_VERSION_MICRO)
38 | #define LIBPOSTPROC_VERSION AV_VERSION(LIBPOSTPROC_VERSION_MAJOR, \
39 | LIBPOSTPROC_VERSION_MINOR, \
40 | LIBPOSTPROC_VERSION_MICRO)
41 | #define LIBPOSTPROC_BUILD LIBPOSTPROC_VERSION_INT
42 |
43 | #define LIBPOSTPROC_IDENT "postproc" AV_STRINGIFY(LIBPOSTPROC_VERSION)
44 |
45 | #endif /* POSTPROC_POSTPROCESS_VERSION_H */
46 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libswresample/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Version macros.
3 | *
4 | * This file is part of libswresample
5 | *
6 | * libswresample is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * libswresample is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with libswresample; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef SWR_VERSION_H
22 | #define SWR_VERSION_H
23 |
24 | /**
25 | * @file
26 | * Libswresample version macros
27 | */
28 |
29 | #include "libavutil/avutil.h"
30 |
31 | #define LIBSWRESAMPLE_VERSION_MAJOR 0
32 | #define LIBSWRESAMPLE_VERSION_MINOR 17
33 | #define LIBSWRESAMPLE_VERSION_MICRO 102
34 |
35 | #define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
36 | LIBSWRESAMPLE_VERSION_MINOR, \
37 | LIBSWRESAMPLE_VERSION_MICRO)
38 | #define LIBSWRESAMPLE_VERSION AV_VERSION(LIBSWRESAMPLE_VERSION_MAJOR, \
39 | LIBSWRESAMPLE_VERSION_MINOR, \
40 | LIBSWRESAMPLE_VERSION_MICRO)
41 | #define LIBSWRESAMPLE_BUILD LIBSWRESAMPLE_VERSION_INT
42 |
43 | #define LIBSWRESAMPLE_IDENT "SwR" AV_STRINGIFY(LIBSWRESAMPLE_VERSION)
44 |
45 | #endif /* SWR_VERSION_H */
46 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/include/libswscale/version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of FFmpeg.
3 | *
4 | * FFmpeg is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * FFmpeg is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with FFmpeg; if not, write to the Free Software
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 | */
18 |
19 | #ifndef SWSCALE_VERSION_H
20 | #define SWSCALE_VERSION_H
21 |
22 | /**
23 | * @file
24 | * swscale version macros
25 | */
26 |
27 | #include "libavutil/avutil.h"
28 |
29 | #define LIBSWSCALE_VERSION_MAJOR 2
30 | #define LIBSWSCALE_VERSION_MINOR 2
31 | #define LIBSWSCALE_VERSION_MICRO 100
32 |
33 | #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
34 | LIBSWSCALE_VERSION_MINOR, \
35 | LIBSWSCALE_VERSION_MICRO)
36 | #define LIBSWSCALE_VERSION AV_VERSION(LIBSWSCALE_VERSION_MAJOR, \
37 | LIBSWSCALE_VERSION_MINOR, \
38 | LIBSWSCALE_VERSION_MICRO)
39 | #define LIBSWSCALE_BUILD LIBSWSCALE_VERSION_INT
40 |
41 | #define LIBSWSCALE_IDENT "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION)
42 |
43 | /**
44 | * FF_API_* defines may be placed below to indicate public API that will be
45 | * dropped at a future version bump. The defines themselves are not part of
46 | * the public API and may change, break or disappear at any time.
47 | */
48 |
49 | #ifndef FF_API_SWS_GETCONTEXT
50 | #define FF_API_SWS_GETCONTEXT (LIBSWSCALE_VERSION_MAJOR < 3)
51 | #endif
52 | #ifndef FF_API_SWS_CPU_CAPS
53 | #define FF_API_SWS_CPU_CAPS (LIBSWSCALE_VERSION_MAJOR < 3)
54 | #endif
55 | #ifndef FF_API_SWS_FORMAT_NAME
56 | #define FF_API_SWS_FORMAT_NAME (LIBSWSCALE_VERSION_MAJOR < 3)
57 | #endif
58 |
59 | #endif /* SWSCALE_VERSION_H */
60 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libavcodec.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libavcodec.a
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libavdevice.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libavdevice.a
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libavfilter.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libavfilter.a
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libavformat.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libavformat.a
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libavutil.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libavutil.a
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libpostproc.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libpostproc.a
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libswresample.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libswresample.a
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libswscale.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ofxAddons/ofxOMXPlayer/libs/ffmpeg/libs/libswscale.a
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/DllSwResample.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | /*
3 | * Copyright (C) 2005-2010 Team XBMC
4 | * http://www.xbmc.org
5 | *
6 | * This Program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2, or (at your option)
9 | * any later version.
10 | *
11 | * This Program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with XBMC; see the file COPYING. If not, write to
18 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 | * http://www.gnu.org/copyleft/gpl.html
20 | *
21 | */
22 |
23 |
24 | #include "DynamicDll.h"
25 |
26 | extern "C" {
27 | #ifndef HAVE_MMX
28 | #define HAVE_MMX
29 | #endif
30 | #ifndef __STDC_CONSTANT_MACROS
31 | #define __STDC_CONSTANT_MACROS
32 | #endif
33 |
34 | #include
35 | /*#include
36 | #include
37 | #include
38 | #define SwrContext AVAudioResampleContext*/
39 |
40 | }
41 |
42 | class DllSwResampleInterface
43 | {
44 | public:
45 | virtual ~DllSwResampleInterface() {}
46 | virtual struct SwrContext *swr_alloc_set_opts(struct SwrContext *s, int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate, int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate, int log_offset, void *log_ctx)=0;
47 | virtual int swr_init(struct SwrContext *s)=0;
48 | virtual void swr_free(struct SwrContext **s)=0;
49 | virtual int swr_convert(struct SwrContext *s, uint8_t **out, int out_count, const uint8_t **in , int in_count)=0;
50 | };
51 |
52 |
53 | // Use direct mapping
54 | class DllSwResample : public DllDynamic, DllSwResampleInterface
55 | {
56 | public:
57 | virtual ~DllSwResample() {}
58 |
59 | // DLL faking.
60 | virtual bool ResolveExports() { return true; }
61 | virtual bool Load() {
62 | //ofLog(OF_LOG_VERBOSE, "DllAvFormat: Using libswresample system library");
63 | return true;
64 | }
65 | virtual void Unload() {}
66 | virtual struct SwrContext *swr_alloc_set_opts(struct SwrContext *s, int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate, int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate, int log_offset, void *log_ctx) { return ::swr_alloc_set_opts(s, out_ch_layout, out_sample_fmt, out_sample_rate, in_ch_layout, in_sample_fmt, in_sample_rate, log_offset, log_ctx); }
67 | virtual int swr_init(struct SwrContext *s) { return ::swr_init(s); }
68 | virtual void swr_free(struct SwrContext **s){ return ::swr_free(s); }
69 | virtual int swr_convert(struct SwrContext *s, uint8_t **out, int out_count, const uint8_t **in , int in_count){ return ::swr_convert(s, out, out_count, in, in_count); }
70 | };
71 |
72 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/DynamicDll.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2005-2008 Team XBMC
3 | * http://www.xbmc.org
4 | *
5 | * This Program is free software; you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation; either version 2, or (at your option)
8 | * any later version.
9 | *
10 | * This Program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with XBMC; see the file COPYING. If not, write to
17 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18 | * http://www.gnu.org/copyleft/gpl.html
19 | *
20 | */
21 |
22 | #include "DynamicDll.h"
23 |
24 |
25 | DllDynamic::DllDynamic()
26 | {
27 | m_dll=NULL;
28 | m_DelayUnload=true;
29 | }
30 |
31 | DllDynamic::DllDynamic(const CStdString& strDllName)
32 | {
33 | m_strDllName=strDllName;
34 | m_dll=NULL;
35 | m_DelayUnload=true;
36 | }
37 |
38 | DllDynamic::~DllDynamic()
39 | {
40 | Unload();
41 | }
42 |
43 | bool DllDynamic::Load()
44 | {
45 | if (m_dll)
46 | return true;
47 |
48 |
49 | return true;
50 | }
51 |
52 | void DllDynamic::Unload()
53 | {
54 |
55 | m_dll=NULL;
56 | }
57 |
58 | bool DllDynamic::CanLoad()
59 | {
60 | return true;
61 | }
62 |
63 | bool DllDynamic::EnableDelayedUnload(bool bOnOff)
64 | {
65 | if (m_dll)
66 | return false;
67 |
68 | m_DelayUnload=bOnOff;
69 |
70 | return true;
71 | }
72 |
73 | bool DllDynamic::SetFile(const CStdString& strDllName)
74 | {
75 | if (m_dll)
76 | return false;
77 |
78 | m_strDllName=strDllName;
79 | return true;
80 | }
81 |
82 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/DynamicDll.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | /*
4 | * Copyright (C) 2005-2008 Team XBMC
5 | * http://www.xbmc.org
6 | *
7 | * This Program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This Program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with XBMC; see the file COPYING. If not, write to
19 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20 | * http://www.gnu.org/copyleft/gpl.html
21 | *
22 | */
23 |
24 | #include "utils/StdString.h"
25 |
26 | class DllDynamic
27 | {
28 | public:
29 | DllDynamic();
30 | DllDynamic(const CStdString& strDllName);
31 | virtual ~DllDynamic();
32 | virtual bool Load();
33 | virtual void Unload();
34 | virtual bool IsLoaded() { return m_dll!=NULL; }
35 | bool CanLoad();
36 | bool EnableDelayedUnload(bool bOnOff);
37 | bool SetFile(const CStdString& strDllName);
38 |
39 | protected:
40 | virtual bool ResolveExports()=0;
41 | virtual bool LoadSymbols() { return false; }
42 | bool m_DelayUnload;
43 | void *m_dll;
44 | CStdString m_strDllName;
45 | };
46 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/File.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #define FFMPEG_FILE_BUFFER_SIZE 32768
4 |
5 | namespace XFILE
6 | {
7 |
8 | /* indicate that caller can handle truncated reads, where function returns before entire buffer has been filled */
9 | #define READ_TRUNCATED 0x01
10 |
11 | /* indicate that that caller support read in the minimum defined chunk size, this disables internal cache then */
12 | #define READ_CHUNKED 0x02
13 |
14 | /* use cache to access this file */
15 | #define READ_CACHED 0x04
16 |
17 | /* open without caching. regardless to file type. */
18 | #define READ_NO_CACHE 0x08
19 |
20 | /* calcuate bitrate for file while reading */
21 | #define READ_BITRATE 0x10
22 |
23 | typedef enum {
24 | IOCTRL_NATIVE = 1, /**< SNativeIoControl structure, containing what should be passed to native ioctrl */
25 | IOCTRL_SEEK_POSSIBLE = 2, /**< return 0 if known not to work, 1 if it should work */
26 | IOCTRL_CACHE_STATUS = 3, /**< SCacheStatus structure */
27 | IOCTRL_CACHE_SETRATE = 4, /**< unsigned int with with speed limit for caching in bytes per second */
28 | } EIoControl;
29 |
30 | class CFile
31 | {
32 | public:
33 | CFile();
34 | ~CFile();
35 |
36 | bool Open(const CStdString& strFileName, unsigned int flags = 0);
37 | bool OpenForWrite(const CStdString& strFileName, bool bOverWrite);
38 | unsigned int Read(void* lpBuf, int64_t uiBufSize);
39 | int Write(const void* lpBuf, int64_t uiBufSize);
40 | int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
41 | int64_t GetPosition();
42 | int64_t GetLength();
43 | void Close();
44 | static bool Exists(const CStdString& strFileName, bool bUseCache = true);
45 | int GetChunkSize() { return 6144 /*FFMPEG_FILE_BUFFER_SIZE*/; };
46 | int IoControl(EIoControl request, void* param);
47 | bool IsEOF();
48 | private:
49 | unsigned int m_flags;
50 | FILE *m_pFile;
51 | int64_t m_iLength;
52 | bool m_bPipe;
53 | };
54 |
55 | };
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/IAudioRenderer.h:
--------------------------------------------------------------------------------
1 |
2 | #pragma once
3 |
4 |
5 | #include "utils/StdString.h"
6 | #include "utils/PCMRemap.h"
7 |
8 | class IAudioRenderer
9 | {
10 | public:
11 | enum EEncoded {
12 | ENCODED_NONE = 0,
13 | ENCODED_IEC61937_AC3,
14 | ENCODED_IEC61937_EAC3,
15 | ENCODED_IEC61937_DTS,
16 | ENCODED_IEC61937_MPEG,
17 | ENCODED_IEC61937_UNKNOWN,
18 | };
19 |
20 | IAudioRenderer() {};
21 | virtual ~IAudioRenderer() {};
22 | virtual bool Initialize(const CStdString& device, int iChannels, enum PCMChannels *channelMap, unsigned int downmixChannels, unsigned int uiSamplesPerSec, unsigned int uiBitsPerSample, bool bResample, bool boostOnDownmix, bool bIsMusic=false, EEncoded encoded = ENCODED_NONE) = 0;
23 | virtual float GetDelay() = 0;
24 | virtual float GetCacheTime() = 0;
25 | virtual float GetCacheTotal() { return 1.0f; }
26 |
27 | virtual unsigned int AddPackets(const void* data, unsigned int len) = 0;
28 | virtual bool IsResampling() { return false;};
29 | virtual unsigned int GetSpace() = 0;
30 | virtual bool Deinitialize() = 0;
31 | virtual bool Pause() = 0;
32 | virtual bool Stop() = 0;
33 | virtual bool Resume() = 0;
34 | virtual unsigned int GetChunkLen() = 0;
35 |
36 | virtual long GetCurrentVolume() const = 0;
37 | virtual void Mute(bool bMute) = 0;
38 | virtual bool SetCurrentVolume(long nVolume) = 0;
39 | virtual float GetCurrentAttenuation() { return m_remap.GetCurrentAttenuation(); }
40 | virtual int SetPlaySpeed(int iSpeed) = 0;
41 | virtual void WaitCompletion() = 0;
42 |
43 | protected:
44 | CPCMRemap m_remap;
45 |
46 | private:
47 | };
48 |
49 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/OMXAudioCodecOMX.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | /*
4 | * Copyright (C) 2005-2008 Team XBMC
5 | * http://www.xbmc.org
6 | *
7 | * This Program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2, or (at your option)
10 | * any later version.
11 | *
12 | * This Program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with XBMC; see the file COPYING. If not, write to
19 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20 | * http://www.gnu.org/copyleft/gpl.html
21 | *
22 | */
23 |
24 | #include "ofMain.h"
25 |
26 | #include "DllAvCodec.h"
27 | #include "DllAvFormat.h"
28 | #include "DllAvUtil.h"
29 | #include "DllSwResample.h"
30 |
31 | #include "OMXStreamInfo.h"
32 | #include "utils/PCMRemap.h"
33 | #include "linux/PlatformDefs.h"
34 |
35 | class COMXAudioCodecOMX
36 | {
37 | public:
38 | COMXAudioCodecOMX();
39 | ~COMXAudioCodecOMX();
40 | bool Open(COMXStreamInfo &hints);
41 | void Dispose();
42 | int Decode(BYTE* pData, int iSize);
43 | int GetData(BYTE** dst);
44 | void Reset();
45 | int GetChannels();
46 | enum PCMChannels *GetChannelMap();
47 | int GetSampleRate();
48 | int GetBitsPerSample();
49 | const char* GetName() { return "FFmpeg"; }
50 | int GetBufferSize() { return m_iBuffered; }
51 | int GetBitRate();
52 |
53 | protected:
54 | AVCodecContext* m_pCodecContext;
55 | SwrContext* m_pConvert;
56 | enum AVSampleFormat m_iSampleFormat;
57 | enum PCMChannels m_channelMap[PCM_MAX_CH + 1];
58 |
59 | AVFrame* m_pFrame1;
60 | int m_iBufferSize1;
61 |
62 | BYTE *m_pBuffer2;
63 | int m_iBufferSize2;
64 |
65 | bool m_bOpenedCodec;
66 | int m_iBuffered;
67 |
68 | int m_channels;
69 | uint64_t m_layout;
70 |
71 | DllAvCodec m_dllAvCodec;
72 | DllAvUtil m_dllAvUtil;
73 | DllSwResample m_dllSwResample;
74 |
75 | void BuildChannelMap();
76 | };
77 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/OMXClock.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "DllAvFormat.h"
4 |
5 | #include "OMXCore.h"
6 |
7 | #define DVD_TIME_BASE 1000000
8 | #define DVD_NOPTS_VALUE (-1LL<<52) // should be possible to represent in both double and __int64
9 |
10 | #define DVD_TIME_TO_SEC(x) ((int)((double)(x) / DVD_TIME_BASE))
11 | #define DVD_TIME_TO_MSEC(x) ((int)((double)(x) * 1000 / DVD_TIME_BASE))
12 | #define DVD_SEC_TO_TIME(x) ((double)(x) * DVD_TIME_BASE)
13 | #define DVD_MSEC_TO_TIME(x) ((double)(x) * DVD_TIME_BASE / 1000)
14 |
15 | #define DVD_PLAYSPEED_PAUSE 0 // frame stepping
16 | #define DVD_PLAYSPEED_NORMAL 1000
17 |
18 | static inline OMX_TICKS ToOMXTime(int64_t pts)
19 | {
20 | OMX_TICKS ticks;
21 | ticks.nLowPart = pts;
22 | ticks.nHighPart = pts >> 32;
23 | return ticks;
24 | }
25 | static inline int64_t FromOMXTime(OMX_TICKS ticks)
26 | {
27 | int64_t pts = ticks.nLowPart | ((uint64_t)(ticks.nHighPart) << 32);
28 | return pts;
29 | }
30 |
31 | class OMXClock
32 | {
33 | protected:
34 | bool m_pause;
35 | bool m_has_video;
36 | bool m_has_audio;
37 | int m_omx_speed;
38 | pthread_mutex_t m_lock;
39 | private:
40 | COMXCoreComponent m_omx_clock;
41 | DllAvFormat m_dllAvFormat;
42 | public:
43 | OMXClock();
44 | ~OMXClock();
45 | void Lock();
46 | void UnLock();
47 | bool OMXInitialize(bool has_video, bool has_audio);
48 | void OMXDeinitialize();
49 | bool OMXIsPaused() { return m_pause; };
50 | bool OMXStop(bool lock = true);
51 | bool OMXStart(double pts, bool lock = true);
52 | bool OMXStep(int steps = 1, bool lock = true);
53 | bool OMXReset(bool lock = true);
54 | double OMXMediaTime(bool lock = true);
55 | double OMXClockAdjustment(bool lock = true);
56 | bool OMXMediaTime(double pts, bool lock = true);
57 | bool OMXPause(bool lock = true);
58 | bool OMXResume(bool lock = true);
59 | bool OMXSetSpeed(int speed, bool lock = true, bool pause_resume = false);
60 | int OMXPlaySpeed() { return m_omx_speed; };
61 | COMXCoreComponent *GetOMXClock();
62 | bool OMXStateExecute(bool lock = true);
63 | void OMXStateIdle(bool lock = true);
64 | bool HDMIClockSync(bool lock = true);
65 | int64_t GetAbsoluteClock();
66 | double GetClock(bool interpolated = true);
67 | static void OMXSleep(unsigned int dwMilliSeconds);
68 | };
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/OMXDecoderBase.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 |
5 | #include "OMXCore.h"
6 | #include "OMXStreamInfo.h"
7 |
8 | #include
9 |
10 | #include "OMXClock.h"
11 | #include "OMXReader.h"
12 |
13 | #define OMX_VIDEO_DECODER "OMX.broadcom.video_decode"
14 | #define OMX_H264BASE_DECODER OMX_VIDEO_DECODER
15 | #define OMX_H264MAIN_DECODER OMX_VIDEO_DECODER
16 | #define OMX_H264HIGH_DECODER OMX_VIDEO_DECODER
17 | #define OMX_MPEG4_DECODER OMX_VIDEO_DECODER
18 | #define OMX_MSMPEG4V1_DECODER OMX_VIDEO_DECODER
19 | #define OMX_MSMPEG4V2_DECODER OMX_VIDEO_DECODER
20 | #define OMX_MSMPEG4V3_DECODER OMX_VIDEO_DECODER
21 | #define OMX_MPEG4EXT_DECODER OMX_VIDEO_DECODER
22 | #define OMX_MPEG2V_DECODER OMX_VIDEO_DECODER
23 | #define OMX_VC1_DECODER OMX_VIDEO_DECODER
24 | #define OMX_WMV3_DECODER OMX_VIDEO_DECODER
25 | #define OMX_VP6_DECODER OMX_VIDEO_DECODER
26 | #define OMX_VP8_DECODER OMX_VIDEO_DECODER
27 | #define OMX_THEORA_DECODER OMX_VIDEO_DECODER
28 | #define OMX_MJPEG_DECODER OMX_VIDEO_DECODER
29 |
30 |
31 | class DllAvUtil;
32 | class DllAvFormat;
33 | class OMXDecoderBase
34 | {
35 | public:
36 | OMXDecoderBase();
37 | ~OMXDecoderBase();
38 | OMX_VIDEO_CODINGTYPE m_codingType;
39 |
40 | COMXCoreTunel m_omx_tunnel_clock;
41 | COMXCoreTunel m_omx_tunnel_sched;
42 | COMXCoreTunel m_omx_tunnel_decoder;
43 |
44 | COMXCoreComponent m_omx_decoder;
45 | COMXCoreComponent m_omx_render;
46 | COMXCoreComponent m_omx_sched;
47 |
48 | COMXCoreComponent* m_omx_clock;
49 | OMXClock* m_av_clock;
50 |
51 | bool m_is_open;
52 |
53 | bool m_Pause;
54 | bool m_setStartTime;
55 |
56 | bool m_drop_state;
57 | unsigned int m_decoded_width;
58 | unsigned int m_decoded_height;
59 |
60 | uint8_t* m_extradata;
61 | int m_extrasize;
62 |
63 | string m_video_codec_name;
64 |
65 | bool m_first_frame;
66 | uint32_t m_history_valid_pts;
67 |
68 |
69 | string decoder_name;
70 |
71 |
72 | virtual int Decode(uint8_t *pData, int iSize, double dts, double pts)=0;
73 |
74 |
75 |
76 | void WaitCompletion();
77 |
78 | bool Resume();
79 | bool Pause();
80 |
81 | bool SendDecoderConfig();
82 | bool NaluFormatStartCodes(enum CodecID codec, uint8_t *in_extradata, int in_extrasize);
83 |
84 | void SetDropState(bool bDrop);
85 | unsigned int GetFreeSpace();
86 | unsigned int GetSize();
87 | int GetInputBufferSize();
88 | void Reset();
89 |
90 | void ProcessCodec(COMXStreamInfo &hints);
91 | static unsigned count_bits(int32_t value)
92 | {
93 | unsigned bits = 0;
94 | for(;value;++bits)
95 | value &= value - 1;
96 | return bits;
97 | }
98 | std::string GetDecoderName() { return m_video_codec_name; };
99 | static int fillBufferCounter;
100 |
101 | };
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/OMXEGLImage.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofAppEGLWindow.h"
5 | #include "OMXDecoderBase.h"
6 | #include "GlobalEGLContainer.h"
7 |
8 | class OMXEGLImage : public OMXDecoderBase
9 | {
10 | public:
11 | OMXEGLImage();
12 | bool Open(COMXStreamInfo &hints, OMXClock *clock);
13 | int Decode(uint8_t *pData, int iSize, double dts, double pts);
14 |
15 | OMX_BUFFERHEADERTYPE* eglBuffer;
16 |
17 |
18 |
19 |
20 | };
21 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/OMXPlayerAudio.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "ofMain.h"
3 |
4 |
5 | #include "DllAvUtil.h"
6 | #include "DllAvFormat.h"
7 | #include "DllAvFilter.h"
8 | #include "DllAvCodec.h"
9 |
10 | #include "utils/PCMRemap.h"
11 |
12 | #include "OMXReader.h"
13 | #include "OMXClock.h"
14 | #include "OMXStreamInfo.h"
15 | #include "OMXAudio.h"
16 |
17 |
18 | #include "OMXAudioCodecOMX.h"
19 |
20 | #include "OMXThread.h"
21 |
22 | #include
23 | #include
24 | #include
25 |
26 |
27 | class OMXPlayerAudio : public OMXThread
28 | {
29 | protected:
30 | AVStream *m_pStream;
31 | int m_stream_id;
32 | std::deque m_packets;
33 | DllAvUtil m_dllAvUtil;
34 | DllAvCodec m_dllAvCodec;
35 | DllAvFormat m_dllAvFormat;
36 | bool m_open;
37 | COMXStreamInfo m_hints;
38 | double m_iCurrentPts;
39 | pthread_cond_t m_packet_cond;
40 | pthread_cond_t m_audio_cond;
41 | pthread_mutex_t m_lock;
42 | pthread_mutex_t m_lock_decoder;
43 | OMXClock *m_av_clock;
44 | OMXReader *m_omx_reader;
45 | COMXAudio *m_decoder;
46 | std::string m_codec_name;
47 | std::string m_device;
48 | bool m_use_passthrough;
49 | bool m_use_hw_decode;
50 | IAudioRenderer::EEncoded m_passthrough;
51 | bool m_hw_decode;
52 | bool m_boost_on_downmix;
53 | bool m_bAbort;
54 | bool m_use_thread;
55 | bool m_flush;
56 | enum PCMChannels *m_pChannelMap;
57 | unsigned int m_cached_size;
58 | COMXAudioCodecOMX *m_pAudioCodec;
59 | int m_speed;
60 |
61 | int64_t m_errortime; //timestamp of last time we measured
62 |
63 |
64 | bool m_player_error;
65 |
66 |
67 | void Lock();
68 | void UnLock();
69 | void LockDecoder();
70 | void UnLockDecoder();
71 | private:
72 | public:
73 | OMXPlayerAudio();
74 | ~OMXPlayerAudio();
75 | bool Open(COMXStreamInfo &hints, OMXClock *av_clock, OMXReader *omx_reader,
76 | std::string device, bool passthrough, bool hw_decode,
77 | bool boost_on_downmix, bool use_thread);
78 | bool Close();
79 | bool Decode(OMXPacket *pkt);
80 | void Process();
81 | void Flush();
82 | bool AddPacket(OMXPacket *pkt);
83 | bool OpenAudioCodec();
84 | void CloseAudioCodec();
85 | IAudioRenderer::EEncoded IsPassthrough(COMXStreamInfo hints);
86 | bool OpenDecoder();
87 | bool CloseDecoder();
88 | double GetDelay();
89 | double GetCacheTime();
90 | double GetCurrentPTS() { return m_iCurrentPts; };
91 | void WaitCompletion();
92 | unsigned int GetCached()
93 | {
94 | Lock();
95 | unsigned int cached_size = m_cached_size;
96 | UnLock();
97 | return cached_size;
98 |
99 | };
100 |
101 | void SetCurrentVolume(long nVolume);
102 | long GetCurrentVolume();
103 | void SetSpeed(int iSpeed);
104 | bool Error() { return !m_player_error; };
105 | };
106 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/OMXPlayerEGLImage.cpp:
--------------------------------------------------------------------------------
1 | #include "OMXPlayerEGLImage.h"
2 |
3 | #include
4 | #include
5 | #include
6 |
7 |
8 | #include "linux/XMemUtils.h"
9 |
10 |
11 | OMXPlayerEGLImage::OMXPlayerEGLImage()
12 | {
13 | m_open = false;
14 | m_stream_id = -1;
15 | m_pStream = NULL;
16 | m_av_clock = NULL;
17 | m_decoder = NULL;
18 | m_fps = 25.0f;
19 | m_flush = false;
20 | m_cached_size = 0;
21 | m_iVideoDelay = 0;
22 | m_pts = DVD_NOPTS_VALUE;
23 | m_speed = DVD_PLAYSPEED_NORMAL;
24 | eglImageDecoder = NULL;
25 | ofLogVerbose() << "OMXPlayerEGLImage CONSTRUCT";
26 | }
27 |
28 |
29 |
30 |
31 | bool OMXPlayerEGLImage::Open(COMXStreamInfo &hints, OMXClock *av_clock)
32 | {
33 | ofLogVerbose(__func__) << " OMXPlayerEGLImage Open";
34 |
35 | if (!m_dllAvUtil.Load() || !m_dllAvCodec.Load() || !m_dllAvFormat.Load() || !av_clock)
36 | {
37 | return false;
38 | }
39 |
40 | if(ThreadHandle())
41 | {
42 | Close();
43 | }
44 |
45 | m_dllAvFormat.av_register_all();
46 |
47 | m_hints = hints;
48 | m_av_clock = av_clock;
49 | m_fps = 25.0f;
50 | m_frametime = 0;
51 | m_iCurrentPts = DVD_NOPTS_VALUE;
52 | m_bAbort = false;
53 | m_flush = false;
54 | m_cached_size = 0;
55 | m_iVideoDelay = 0;
56 | m_pts = 0;
57 | m_speed = DVD_PLAYSPEED_NORMAL;
58 | m_FlipTimeStamp = m_av_clock->GetAbsoluteClock();
59 |
60 | if(!OpenDecoder())
61 | {
62 | Close();
63 | return false;
64 | }
65 |
66 | Create();
67 |
68 |
69 | m_open = true;
70 |
71 | return true;
72 | }
73 |
74 |
75 | bool OMXPlayerEGLImage::OpenDecoder()
76 | {
77 | if (m_hints.fpsrate && m_hints.fpsscale)
78 | {
79 | m_fps = DVD_TIME_BASE / OMXReader::NormalizeFrameduration((double)DVD_TIME_BASE * m_hints.fpsscale / m_hints.fpsrate);
80 | }else
81 | {
82 | m_fps = 25;
83 | }
84 |
85 | if( m_fps > 100 || m_fps < 5 )
86 | {
87 | ofLog(OF_LOG_VERBOSE, "OpenDecoder: Invalid framerate %d, using forced 25fps and just trust timestamps\n", (int)m_fps);
88 | m_fps = 25;
89 | }
90 |
91 | m_frametime = (double)DVD_TIME_BASE / m_fps;
92 |
93 | if (!eglImageDecoder)
94 | {
95 | eglImageDecoder = new OMXEGLImage();
96 |
97 | }
98 |
99 | m_decoder = (OMXDecoderBase*)eglImageDecoder;
100 |
101 | if(!eglImageDecoder->Open(m_hints, m_av_clock))
102 | {
103 | CloseDecoder();
104 | return false;
105 | }
106 |
107 | stringstream info;
108 | info << "Video codec: " << m_decoder->GetDecoderName() << "\n";
109 | info << "Video width: " << m_hints.width << "\n";
110 | info << "Video height: " << m_hints.height << "\n";
111 | info << "Video profile: " << m_hints.profile << "\n";
112 | info << "Video fps: " << m_fps << "\n";
113 | ofLogVerbose(__func__) << "\n" << info.str();
114 |
115 |
116 | /*ofLog(OF_LOG_VERBOSE, "Video codec %s width %d height %d profile %d fps %f\n",
117 | m_decoder->GetDecoderName().c_str() , m_hints.width, m_hints.height, m_hints.profile, m_fps);*/
118 |
119 |
120 | return true;
121 | }
122 |
123 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/OMXPlayerEGLImage.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "OMXPlayerVideoBase.h"
3 |
4 |
5 | #include "OMXEGLImage.h"
6 |
7 |
8 | #include
9 | #include
10 |
11 |
12 |
13 | class OMXPlayerEGLImage : public OMXPlayerVideoBase
14 | {
15 | public:
16 | OMXPlayerEGLImage();
17 | bool Open(COMXStreamInfo &hints, OMXClock *av_clock);
18 | bool OpenDecoder();
19 |
20 | OMXEGLImage* eglImageDecoder;
21 | };
22 |
23 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/OMXPlayerVideo.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 |
4 | #include "OMXPlayerVideoBase.h"
5 | #include "OMXVideo.h"
6 |
7 |
8 |
9 |
10 | class OMXPlayerVideo : public OMXPlayerVideoBase
11 | {
12 | public:
13 |
14 | bool m_Deinterlace;
15 | float m_display_aspect;
16 |
17 | bool m_hdmi_clock_sync;
18 | COMXVideo* nonTextureDecoder;
19 | OMXPlayerVideo();
20 |
21 | bool Open(COMXStreamInfo &hints, OMXClock *av_clock, bool deinterlace, bool hdmi_clock_sync, float display_aspect);
22 | bool OpenDecoder();
23 |
24 |
25 | };
26 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/OMXPlayerVideoBase.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "ofMain.h"
3 |
4 | #include "DllAvUtil.h"
5 | #include "DllAvFormat.h"
6 | #include "DllAvCodec.h"
7 |
8 | #include "OMXReader.h"
9 | #include "OMXClock.h"
10 | #include "OMXStreamInfo.h"
11 | #include "OMXThread.h"
12 | #include "OMXDecoderBase.h"
13 |
14 | #define MAX_DATA_SIZE 10 * 1024 * 1024
15 |
16 |
17 | class OMXPlayerVideoBase: public OMXThread
18 | {
19 | public:
20 | OMXPlayerVideoBase();
21 | ~OMXPlayerVideoBase();
22 | OMXDecoderBase* m_decoder;
23 | AVStream* m_pStream;
24 | int m_stream_id;
25 | std::deque m_packets;
26 |
27 | DllAvUtil m_dllAvUtil;
28 | DllAvCodec m_dllAvCodec;
29 | DllAvFormat m_dllAvFormat;
30 |
31 | bool m_open;
32 | COMXStreamInfo m_hints;
33 | double m_iCurrentPts;
34 |
35 | pthread_cond_t m_packet_cond;
36 | //pthread_cond_t m_picture_cond;
37 | pthread_mutex_t m_lock;
38 | pthread_mutex_t m_lock_decoder;
39 |
40 | OMXClock* m_av_clock;
41 | float m_fps;
42 | double m_frametime;
43 | bool m_bAbort;
44 | bool m_flush;
45 | int m_speed;
46 | double m_pts;
47 | double m_FlipTimeStamp; // time stamp of last flippage. used to play at a forced framerate
48 | double m_iVideoDelay;
49 | unsigned int m_cached_size;
50 |
51 |
52 | void SetSpeed(int speed);
53 | int GetSpeed();
54 |
55 | bool Close();
56 | bool Decode(OMXPacket *pkt);
57 | void Process();
58 | void Flush();
59 |
60 | bool AddPacket(OMXPacket *pkt);
61 |
62 | virtual bool OpenDecoder() =0;
63 |
64 | bool CloseDecoder();
65 | int GetDecoderBufferSize();
66 | int GetDecoderFreeSpace();
67 | double GetCurrentPTS() { return m_pts; };
68 | double GetFPS() { return m_fps; };
69 | unsigned int GetCached() { return m_cached_size; };
70 | void WaitCompletion();
71 |
72 | void Lock();
73 | void UnLock();
74 | void LockDecoder();
75 | void UnLockDecoder();
76 |
77 | };
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/OMXStreamInfo.cpp:
--------------------------------------------------------------------------------
1 | #include "OMXStreamInfo.h"
2 |
3 | COMXStreamInfo::COMXStreamInfo()
4 | {
5 | extradata = NULL;
6 | Clear();
7 | }
8 |
9 | COMXStreamInfo::~COMXStreamInfo()
10 | {
11 | //if( extradata && extrasize ) free(extradata);
12 |
13 | extradata = NULL;
14 | extrasize = 0;
15 | }
16 |
17 |
18 | void COMXStreamInfo::Clear()
19 | {
20 | codec = CODEC_ID_NONE;
21 | software = false;
22 | codec_tag = 0;
23 |
24 | //if( extradata && extrasize ) free(extradata);
25 |
26 | extradata = NULL;
27 | extrasize = 0;
28 |
29 | fpsscale = 0;
30 | fpsrate = 0;
31 | height = 0;
32 | width = 0;
33 | aspect = 0.0;
34 | vfr = false;
35 | stills = false;
36 | level = 0;
37 | profile = 0;
38 | ptsinvalid = false;
39 | duration = 0.0;
40 | nb_frames = 0;
41 | channels = 0;
42 | samplerate = 0;
43 | blockalign = 0;
44 | bitrate = 0;
45 | bitspersample = 0;
46 |
47 | identifier = 0;
48 |
49 | framesize = 0;
50 | syncword = 0;
51 | }
52 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/OMXStreamInfo.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 |
4 | extern "C" {
5 | #include "libavcodec/avcodec.h"
6 | }
7 |
8 |
9 | class CDemuxStream;
10 |
11 | class COMXStreamInfo
12 | {
13 | public:
14 | COMXStreamInfo();
15 |
16 | ~COMXStreamInfo();
17 |
18 | void Clear(); // clears current information
19 |
20 | CodecID codec;
21 | bool software; //force software decoding
22 |
23 |
24 | // VIDEO
25 | int fpsscale; // scale of 1000 and a rate of 29970 will result in 29.97 fps
26 | int fpsrate;
27 | int height; // height of the stream reported by the demuxer
28 | int width; // width of the stream reported by the demuxer
29 | float aspect; // display aspect as reported by demuxer
30 | bool vfr; // variable framerate
31 | bool stills; // there may be odd still frames in video
32 | int level; // encoder level of the stream reported by the decoder. used to qualify hw decoders.
33 | int profile; // encoder profile of the stream reported by the decoder. used to qualify hw decoders.
34 | bool ptsinvalid; // pts cannot be trusted (avi's).
35 | int nb_frames;
36 |
37 | float duration;
38 |
39 | // AUDIO
40 | int channels;
41 | int samplerate;
42 | int bitrate;
43 | int blockalign;
44 | int bitspersample;
45 |
46 | // SUBTITLE
47 | int identifier;
48 |
49 | // CODEC EXTRADATA
50 | void* extradata; // extra data for codec to use
51 | unsigned int extrasize; // size of extra data
52 | unsigned int codec_tag; // extra identifier hints for decoding
53 |
54 | /* ac3/dts indof */
55 | unsigned int framesize;
56 | uint32_t syncword;
57 | };
58 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/OMXThread.cpp:
--------------------------------------------------------------------------------
1 | #include "OMXThread.h"
2 |
3 | #ifdef CLASSNAME
4 | #undef CLASSNAME
5 | #endif
6 | #define CLASSNAME "OMXThread"
7 |
8 | OMXThread::OMXThread()
9 | {
10 | pthread_mutex_init(&m_lock, NULL);
11 | pthread_attr_setdetachstate(&m_tattr, PTHREAD_CREATE_JOINABLE);
12 | pthread_attr_init(&m_tattr);
13 | m_thread = 0;
14 | m_bStop = false;
15 | m_running = false;
16 | }
17 |
18 | OMXThread::~OMXThread()
19 | {
20 | pthread_mutex_destroy(&m_lock);
21 | pthread_attr_destroy(&m_tattr);
22 | }
23 |
24 | bool OMXThread::StopThread()
25 | {
26 | if(!m_running)
27 | {
28 | //ofLog(OF_LOG_ERROR, "%s::%s - No thread running ", CLASSNAME, __func__);
29 | return false;
30 | }
31 |
32 | m_bStop = true;
33 | pthread_join(m_thread, NULL);
34 | m_running = false;
35 |
36 | m_thread = 0;
37 |
38 | //ofLog(OF_LOG_VERBOSE, "%s::%s - Thread stopped ", CLASSNAME, __func__);
39 | return true;
40 | }
41 |
42 | bool OMXThread::Create()
43 | {
44 | if(m_running)
45 | {
46 | //ofLog(OF_LOG_ERROR, "%s::%s - Thread already running ", CLASSNAME, __func__);
47 | return false;
48 | }
49 |
50 | m_bStop = false;
51 | m_running = true;
52 |
53 | pthread_create(&m_thread, &m_tattr, &OMXThread::Run, this);
54 |
55 | //ofLog(OF_LOG_VERBOSE, "%s::%s - Thread with id %d started ", CLASSNAME, __func__, (int)m_thread);
56 | return true;
57 | }
58 |
59 | bool OMXThread::Running()
60 | {
61 | return m_running;
62 | }
63 |
64 | pthread_t OMXThread::ThreadHandle()
65 | {
66 | return m_thread;
67 | }
68 |
69 | void *OMXThread::Run(void *arg)
70 | {
71 | OMXThread *thread = static_cast(arg);
72 | thread->Process();
73 |
74 | //ofLog(OF_LOG_VERBOSE, "%s::%s - Exited thread with id %d ", CLASSNAME, __func__, (int)thread->ThreadHandle());
75 | pthread_exit(NULL);
76 | }
77 |
78 | void OMXThread::Lock()
79 | {
80 | if(!m_running)
81 | {
82 | //ofLog(OF_LOG_ERROR, "%s::%s - No thread running ", CLASSNAME, __func__);
83 | return;
84 | }
85 |
86 | pthread_mutex_lock(&m_lock);
87 | }
88 |
89 | void OMXThread::UnLock()
90 | {
91 | if(!m_running)
92 | {
93 | //ofLog(OF_LOG_ERROR, "%s::%s - No thread running ", CLASSNAME, __func__);
94 | return;
95 | }
96 |
97 | pthread_mutex_unlock(&m_lock);
98 | }
99 |
100 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/OMXThread.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "ofMain.h"
3 |
4 | #include
5 |
6 | class OMXThread
7 | {
8 | protected:
9 | pthread_attr_t m_tattr;
10 | struct sched_param m_sched_param;
11 | pthread_mutex_t m_lock;
12 | pthread_t m_thread;
13 | volatile bool m_running;
14 | volatile bool m_bStop;
15 | private:
16 | static void *Run(void *arg);
17 | public:
18 | OMXThread();
19 | virtual ~OMXThread();
20 | bool Create();
21 | virtual void Process() = 0;
22 | bool Running();
23 | pthread_t ThreadHandle();
24 | bool StopThread();
25 | void Lock();
26 | void UnLock();
27 | };
28 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/OMXVideo.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 |
5 | #include "OMXDecoderBase.h"
6 |
7 |
8 | class COMXVideo : public OMXDecoderBase
9 | {
10 | public:
11 | COMXVideo();
12 | bool Open(COMXStreamInfo &hints, OMXClock *clock, float display_aspect = 0.0f, bool deinterlace = false, bool hdmi_clock_sync = false);
13 | int Decode(uint8_t *pData, int iSize, double dts, double pts);
14 |
15 |
16 | COMXCoreComponent m_omx_image_fx;
17 | COMXCoreTunel m_omx_tunnel_image_fx;
18 |
19 |
20 |
21 | bool m_deinterlace;
22 | bool m_hdmi_clock_sync;
23 | bool m_syncclock;
24 |
25 | };
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/linux/ConvUtils.h:
--------------------------------------------------------------------------------
1 | #ifndef __CONV_UTILS__H__
2 | #define __CONV_UTILS__H__
3 |
4 | /*
5 | * Copyright (C) 2005-2008 Team XBMC
6 | * http://www.xbmc.org
7 | *
8 | * This Program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This Program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with XBMC; see the file COPYING. If not, write to
20 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21 | * http://www.gnu.org/copyleft/gpl.html
22 | *
23 | */
24 | #include "PlatformDefs.h" // UINT DWORD LPCSTR LPSTR LPBOOL ...
25 |
26 | int WideCharToMultiByte(
27 | UINT CodePage,
28 | DWORD dwFlags,
29 | LPCWSTR lpWideCharStr,
30 | int cchWideChar,
31 | LPSTR lpMultiByteStr,
32 | int cbMultiByte,
33 | LPCSTR lpDefaultChar,
34 | LPBOOL lpUsedDefaultChar
35 | );
36 |
37 | int MultiByteToWideChar(
38 | UINT CodePage,
39 | DWORD dwFlags,
40 | LPCSTR lpMultiByteStr,
41 | int cbMultiByte,
42 | LPWSTR lpWideCharStr,
43 | int cchWideChar
44 | );
45 |
46 |
47 | DWORD GetLastError();
48 | VOID SetLastError(DWORD dwErrCode);
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/linux/PlatformInclude.h:
--------------------------------------------------------------------------------
1 | #ifndef __PLATFORM_INCLUDE__H__
2 | #define __PLATFORM_INCLUDE__H__
3 |
4 | /*
5 | * Copyright (C) 2005-2008 Team XBMC
6 | * http://www.xbmc.org
7 | *
8 | * This Program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This Program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with XBMC; see the file COPYING. If not, write to
20 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21 | * http://www.gnu.org/copyleft/gpl.html
22 | *
23 | */
24 |
25 | #include "PlatformDefs.h"
26 | #include "XHandlePublic.h"
27 | #include "XFileUtils.h"
28 | #include "XSyncUtils.h"
29 | #include "XEventUtils.h"
30 | #include "XTimeUtils.h"
31 | #include "XThreadUtils.h"
32 | #include "XMemUtils.h"
33 | #include "ConvUtils.h"
34 |
35 | #endif
36 |
37 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/linux/XMemUtils.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | /*
6 | * Copyright (C) 2005-2008 Team XBMC
7 | * http://www.xbmc.org
8 | *
9 | * This Program is free software; you can redistribute it and/or modify
10 | * it under the terms of the GNU General Public License as published by
11 | * the Free Software Foundation; either version 2, or (at your option)
12 | * any later version.
13 | *
14 | * This Program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Public License
20 | * along with XBMC; see the file COPYING. If not, write to
21 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 | * http://www.gnu.org/copyleft/gpl.html
23 | *
24 | */
25 |
26 | #include "XMemUtils.h"
27 |
28 | #undef ALIGN
29 | #define ALIGN(value, alignment) (((value)+(alignment-1))&~(alignment-1))
30 |
31 | // aligned memory allocation.
32 | // in order to do so - we alloc extra space and store the original allocation in it (so that we can free later on).
33 | // the returned address will be the nearest alligned address within the space allocated.
34 | void *_aligned_malloc(size_t s, size_t alignTo) {
35 |
36 | char *pFull = (char*)malloc(s + alignTo + sizeof(char *));
37 | char *pAlligned = (char *)ALIGN(((unsigned long)pFull + sizeof(char *)), alignTo);
38 |
39 | *(char **)(pAlligned - sizeof(char*)) = pFull;
40 |
41 | return(pAlligned);
42 | }
43 |
44 | void _aligned_free(void *p) {
45 | if (!p)
46 | return;
47 |
48 | char *pFull = *(char **)(((char *)p) - sizeof(char *));
49 | free(pFull);
50 | }
51 |
52 |
53 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/linux/XMemUtils.h:
--------------------------------------------------------------------------------
1 | #ifndef __XMEMUTILS__H__
2 | #define __XMEMUTILS__H__
3 |
4 | /*
5 | * Copyright (C) 2005-2008 Team XBMC
6 | * http://www.xbmc.org
7 | *
8 | * This Program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This Program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with XBMC; see the file COPYING. If not, write to
20 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21 | * http://www.gnu.org/copyleft/gpl.html
22 | *
23 | */
24 |
25 | // aligned memory allocation and free. memory returned will be aligned to "alignTo" bytes.
26 | // this is a linux (actually platfom free) implementation of the win32 CRT methods _aligned_malloc and _aligned_free.
27 | void *_aligned_malloc(size_t s, size_t alignTo);
28 | void _aligned_free(void *p) ;
29 |
30 | #endif
31 |
32 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/linux/XSyncUtils.h:
--------------------------------------------------------------------------------
1 | #ifndef __X_SYNC_UTILS_
2 | #define __X_SYNC_UTILS_
3 |
4 | /*
5 | * Copyright (C) 2005-2008 Team XBMC
6 | * http://www.xbmc.org
7 | *
8 | * This Program is free software; you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as published by
10 | * the Free Software Foundation; either version 2, or (at your option)
11 | * any later version.
12 | *
13 | * This Program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public License
19 | * along with XBMC; see the file COPYING. If not, write to
20 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21 | * http://www.gnu.org/copyleft/gpl.html
22 | *
23 | */
24 |
25 | #include "PlatformDefs.h"
26 | #include "XHandlePublic.h"
27 |
28 | #ifdef _LINUX
29 |
30 | #define STATUS_WAIT_0 ((DWORD )0x00000000L)
31 | #define WAIT_FAILED ((DWORD)0xFFFFFFFF)
32 | #define WAIT_OBJECT_0 ((STATUS_WAIT_0 ) + 0 )
33 | #define WAIT_TIMEOUT 258L
34 | #define INFINITE 0xFFFFFFFF
35 | #define STATUS_ABANDONED_WAIT_0 0x00000080
36 | #define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0 ) + 0 )
37 | #define WAIT_ABANDONED_0 ((STATUS_ABANDONED_WAIT_0 ) + 0 )
38 |
39 | void GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer);
40 |
41 | #endif
42 |
43 | #endif
44 |
45 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/linux/stat_utf8.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2005-2011 Team XBMC
3 | * http://www.xbmc.org
4 | *
5 | * This Program is free software; you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation; either version 2, or (at your option)
8 | * any later version.
9 | *
10 | * This Program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with XBMC; see the file COPYING. If not, write to
17 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18 | * http://www.gnu.org/copyleft/gpl.html
19 | *
20 | */
21 |
22 | #ifndef STAT_UTF8_H__
23 | #define STAT_UTF8_H__
24 |
25 | #define stat64_utf8 stat64
26 |
27 | #endif //STAT_UTF8_H__
28 |
29 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/linux/stdio_utf8.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2005-2011 Team XBMC
3 | * http://www.xbmc.org
4 | *
5 | * This Program is free software; you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation; either version 2, or (at your option)
8 | * any later version.
9 | *
10 | * This Program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with XBMC; see the file COPYING. If not, write to
17 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18 | * http://www.gnu.org/copyleft/gpl.html
19 | *
20 | */
21 |
22 | #ifndef STDIO_UTF8_H__
23 | #define STDIO_UTF8_H__
24 |
25 | #include
26 |
27 | #define remove_utf8 remove
28 | #define rename_utf8 rename
29 | #define fopen64_utf8 fopen
30 |
31 | #endif // STDIO_UTF8_H__
32 |
33 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/ofxOMXPlayer.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxOMXPlayerListener.h"
5 | #include "ofxOMXPlayerEngine.h"
6 |
7 |
8 |
9 |
10 | class ofxOMXPlayer
11 | {
12 | public:
13 | ofxOMXPlayer();
14 | ~ofxOMXPlayer();
15 | bool setup(ofxOMXPlayerSettings settings);
16 |
17 | void loadMovie(string videoPath);
18 | bool isPaused();
19 | bool isPlaying();
20 |
21 | bool isTextureEnabled;
22 |
23 | ofTexture& getTextureReference();
24 | GLuint getTextureID();
25 | int getHeight();
26 | int getWidth();
27 |
28 | void draw(float x, float y, float w, float h);
29 | void draw(float x, float y);
30 |
31 |
32 | double getMediaTime();
33 | void stepFrameForward();
34 | void increaseVolume();
35 | void decreaseVolume();
36 |
37 | float getDuration();
38 |
39 |
40 | void setVolume(float volume); // 0..1
41 | float getVolume();
42 |
43 |
44 | int getCurrentFrame();
45 | int getTotalNumFrames();
46 |
47 | void setPaused(bool doPause);
48 | void saveImage(string imagePath="");
49 | void updatePixels();
50 |
51 | void close();
52 | bool isOpen;
53 |
54 |
55 |
56 | private:
57 |
58 | void openEngine();
59 | void addExitHandler();
60 | void onUpdate(ofEventArgs& args);
61 | ofxOMXPlayerEngine* engine;
62 | ofxOMXPlayerSettings settings;
63 | };
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/ofxOMXPlayerEngine.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofAppEGLWindow.h"
5 | #include "ofxOMXPlayerListener.h"
6 |
7 | extern "C"
8 | {
9 | #include
10 | #include
11 | };
12 |
13 | #include "OMXThread.h"
14 | #include "OMXClock.h"
15 | #include "OMXPlayerEGLImage.h"
16 | #include "OMXPlayerVideo.h"
17 | #include "OMXPlayerAudio.h"
18 |
19 |
20 |
21 |
22 | class ofxOMXPlayerEngine: public OMXThread
23 | {
24 | public:
25 | ofxOMXPlayerEngine();
26 | ~ofxOMXPlayerEngine();
27 |
28 | bool setup(ofxOMXPlayerSettings settings);
29 |
30 | void loadMovie();
31 |
32 | void play();
33 | void stop();
34 |
35 |
36 | float getDuration();
37 |
38 |
39 | void setVolume(float volume); // 0..1
40 | float getVolume();
41 |
42 |
43 |
44 |
45 | void setPaused(bool doPause);
46 |
47 | int getCurrentFrame();
48 | int getTotalNumFrames();
49 |
50 |
51 | int getHeight();
52 | int getWidth();
53 |
54 | bool isPaused();
55 | bool isPlaying();
56 |
57 | double getMediaTime();
58 | bool useHDMIForAudio;
59 |
60 | bool isTextureEnabled;
61 |
62 | void stepFrameForward();
63 | void increaseVolume();
64 | void decreaseVolume();
65 |
66 | void addListener(ofxOMXPlayerListener* listener_);
67 | void removeListener();
68 |
69 | //OMXThread inheritance
70 | void Process();
71 |
72 | private:
73 |
74 | COMXCore omxCore;
75 | OMXClock clock;
76 |
77 | OMXPacket* packet;
78 | OMXPlayerVideo* nonEglPlayer;
79 | OMXPlayerEGLImage* eglPlayer;
80 | OMXPlayerVideoBase* videoPlayer;
81 | OMXPlayerAudio* audioPlayer;
82 | ofxOMXPlayerListener* listener;
83 | OMXReader omxReader;
84 |
85 | COMXStreamInfo videoStreamInfo;
86 | COMXStreamInfo audioStreamInfo;
87 |
88 | bool hasVideo;
89 | bool hasAudio;
90 |
91 | bool openPlayer();
92 | bool didVideoOpen;
93 | bool didAudioOpen;
94 |
95 | int videoWidth;
96 | int videoHeight;
97 |
98 | string moviePath;
99 | int nFrames;
100 | bool bPlaying;
101 |
102 | double loop_offset;
103 | double startpts;
104 | int loopCounter;
105 |
106 | float duration;
107 |
108 | void onVideoEnd();
109 | };
110 |
111 |
--------------------------------------------------------------------------------
/ofxAddons/ofxOMXPlayer/src/ofxOMXPlayerListener.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 |
5 | class ofxOMXPlayerListenerEventData
6 | {
7 | public:
8 | ofxOMXPlayerListenerEventData(void* listener_)
9 | {
10 | listener = listener_;
11 | }
12 | void* listener;
13 | };
14 |
15 |
16 | class ofxOMXPlayerListener
17 | {
18 | public:
19 | virtual void onVideoEnd(ofxOMXPlayerListenerEventData& e) = 0;
20 | };
21 |
22 |
23 | struct ofxOMXPlayerSettings
24 | {
25 | ofxOMXPlayerSettings()
26 | {
27 | videoPath = "";
28 |
29 | useHDMIForAudio = true;
30 | enableTexture = true;
31 | enableLooping = true;
32 | listener = NULL;
33 | }
34 | string videoPath;
35 | bool enableTexture;
36 | bool useHDMIForAudio;
37 | bool enableLooping;
38 | ofxOMXPlayerListener* listener;
39 | /*
40 | To use HDMI Audio you may need to add the below line to /boot/config.txt and reboot
41 |
42 | hdmi_drive=2
43 |
44 | see http://elinux.org/RPiconfig for more details
45 | */
46 |
47 | };
48 |
--------------------------------------------------------------------------------
/omxPlayerNonTextured/.gitignore:
--------------------------------------------------------------------------------
1 | obj
2 | !bin/omxPlayerTextured.bin
3 | omxPlayerNonTextured
--------------------------------------------------------------------------------
/omxPlayerNonTextured/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/omxPlayerNonTextured/bin/omxPlayerNonTextured.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/omxPlayerNonTextured/bin/omxPlayerNonTextured.bin
--------------------------------------------------------------------------------
/omxPlayerNonTextured/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "testApp.h"
3 | #include "ofGLProgrammableRenderer.h"
4 |
5 | int main()
6 | {
7 | ofSetLogLevel(OF_LOG_VERBOSE);
8 | ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);
9 | ofSetupOpenGL(1280, 720, OF_WINDOW);
10 | ofRunApp( new testApp());
11 | }
12 |
--------------------------------------------------------------------------------
/omxPlayerNonTextured/src/testApp.cpp:
--------------------------------------------------------------------------------
1 | #include "testApp.h"
2 |
3 | //--------------------------------------------------------------
4 | void testApp::setup()
5 | {
6 | ofSetLogLevel(OF_LOG_VERBOSE);
7 |
8 | string videoPath = ofToDataPath("../../../videos/720p.mov", true);
9 |
10 | // this will just set videoPath to the first video in the videos folder, if any.
11 | ofDirectory currentVideoDirectory(ofToDataPath("videos", true));
12 | if (currentVideoDirectory.exists())
13 | {
14 | currentVideoDirectory.listDir();
15 | vector files = currentVideoDirectory.getFiles();
16 | if (files.size()>0)
17 | {
18 | videoPath = files[0].path();
19 | }
20 | }
21 |
22 | //Somewhat like ofFboSettings we may have a lot of options so this is the current model
23 | ofxOMXPlayerSettings settings;
24 | settings.videoPath = videoPath;
25 | settings.useHDMIForAudio = true; //default true
26 | settings.enableTexture = false; //default true
27 | settings.enableLooping = true; //default true
28 |
29 | omxPlayer.setup(settings);
30 | }
31 |
32 | //--------------------------------------------------------------
33 | void testApp::update() {
34 | //update background tasks here
35 | }
36 |
37 | //--------------------------------------------------------------
38 | void testApp::draw(){
39 | //not used as the non-textured player takes over the screen
40 | }
--------------------------------------------------------------------------------
/omxPlayerNonTextured/src/testApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxOMXPlayer.h"
5 |
6 | class testApp : public ofBaseApp{
7 |
8 | public:
9 |
10 | void setup();
11 | void update();
12 | void draw();
13 |
14 | ofxOMXPlayer omxPlayer;
15 |
16 | };
17 |
18 |
--------------------------------------------------------------------------------
/omxPlayerShaders/.gitignore:
--------------------------------------------------------------------------------
1 | obj
2 | !bin/omxPlayerShaders.bin
3 | !bin/data/PostProcessing*
4 | omxPlayerShaders
--------------------------------------------------------------------------------
/omxPlayerShaders/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/omxPlayerShaders/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/omxPlayerShaders/bin/data/.gitkeep
--------------------------------------------------------------------------------
/omxPlayerShaders/bin/data/shaderExample.frag:
--------------------------------------------------------------------------------
1 | precision highp float; // this will make the default precision high
2 |
3 | //we passed this in from our vert shader
4 | varying vec2 texcoord0;
5 |
6 | //These are variables we set in our ofApp using the ofShader API
7 |
8 | //our texture reference
9 | uniform sampler2D tex0;
10 |
11 | //width and height that we are working with
12 | uniform vec2 resolution;
13 |
14 | //a changing value to work with
15 | uniform float time;
16 |
17 |
18 | //Each shader has one main() function you can use
19 | //Below are a few implementations. Make sure you have all but one commented out
20 |
21 | //Shaders are compile at runtime meaning that you can just change the shader file and re-run the ofApp
22 |
23 | // let's wobble the image channels around independently, a bit Fear and Loathing in Las Vegas style
24 | void main()
25 | {
26 | mediump float newTime = time * 2.0;
27 |
28 | vec2 newTexCoord;
29 | newTexCoord.s = texcoord0.s + (cos(newTime + (texcoord0.s*20.0)) * 0.01);
30 | newTexCoord.t = texcoord0.t + (sin(newTime + (texcoord0.t*20.0)) * 0.01);
31 |
32 | mediump vec2 texCoordRed = newTexCoord;
33 | mediump vec2 texCoordGreen = newTexCoord;
34 | mediump vec2 texCoordBlue = newTexCoord;
35 |
36 | texCoordRed += vec2( cos((newTime * 2.76)), sin((newTime * 2.12)) )* 0.01;
37 | texCoordGreen += vec2( cos((newTime * 2.23)), sin((newTime * 2.40)) )* 0.01;
38 | texCoordBlue += vec2( cos((newTime * 2.98)), sin((newTime * 2.82)) )* 0.01;
39 |
40 | mediump float colorR = texture2D( tex0, texCoordRed ).r;
41 | mediump float colorG = texture2D( tex0, texCoordGreen).g;
42 | mediump float colorB = texture2D( tex0, texCoordBlue).b;
43 | mediump float colorA = texture2D( tex0, texCoordBlue).a;
44 | mediump vec4 outColor = vec4( colorR, colorG, colorB, colorA);
45 |
46 | gl_FragColor = outColor;
47 | }
48 |
49 |
50 | /*
51 |
52 | // just draw the texture to screen
53 | void main()
54 | {
55 | gl_FragColor = texture2D(tex0, texcoord0);
56 | }
57 |
58 | */
59 |
60 |
61 | /*
62 |
63 | // draw the texture to screen, inverted
64 | void main()
65 | {
66 | vec4 texColor = texture2D(tex0, texcoord0);
67 | gl_FragColor = vec4(1.0-texColor.r, 1.0-texColor.g, 1.0-texColor.b, texColor.a);
68 | }
69 |
70 | */
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/omxPlayerShaders/bin/data/shaderExample.vert:
--------------------------------------------------------------------------------
1 | attribute vec4 position; // set automatically by OF
2 | attribute vec2 texcoord; // set automatically by OF
3 | uniform mat4 modelViewProjectionMatrix; // set automatically by OF
4 |
5 | //our variables
6 | varying vec2 texcoord0;
7 |
8 | void main()
9 | {
10 | //boilerplate code somewhat new to Open GL ES 2 (and later)
11 | gl_Position = modelViewProjectionMatrix * position;
12 |
13 | //we copy the internal texcoords so we can manipulate them
14 | //this is essentially the internal structure of the image
15 | texcoord0 = texcoord;
16 | }
17 |
18 |
19 | /*
20 | //This is the internal RPi vert shader for reference
21 | precision lowp float;
22 |
23 | attribute vec4 position;
24 | attribute vec4 color;
25 | attribute vec4 normal;
26 | attribute vec2 texcoord;
27 |
28 | uniform mat4 modelViewMatrix;
29 | uniform mat4 projectionMatrix;
30 | uniform mat4 textureMatrix;
31 | uniform mat4 modelViewProjectionMatrix;
32 |
33 | varying vec4 colorVarying;
34 | varying vec2 texCoordVarying;
35 |
36 | uniform float usingTexture;
37 | uniform float usingColors;
38 |
39 | uniform vec4 globalColor;
40 |
41 | void main(){
42 | gl_Position = modelViewProjectionMatrix * position;
43 | if(usingTexture>.5) texCoordVarying = (textureMatrix*vec4(texcoord.x,texcoord.y,0,1)).xy;
44 | if(usingColors>.5) colorVarying = color*globalColor;
45 | else colorVarying = globalColor;
46 | }
47 | */
--------------------------------------------------------------------------------
/omxPlayerShaders/bin/omxPlayerShaders.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/omxPlayerShaders/bin/omxPlayerShaders.bin
--------------------------------------------------------------------------------
/omxPlayerShaders/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "testApp.h"
3 | #include "ofGLProgrammableRenderer.h"
4 |
5 | int main()
6 | {
7 | ofSetLogLevel(OF_LOG_VERBOSE);
8 | ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);
9 | ofSetupOpenGL(1280, 720, OF_WINDOW);
10 | ofRunApp( new testApp());
11 | }
12 |
--------------------------------------------------------------------------------
/omxPlayerShaders/src/testApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxOMXPlayer.h"
5 |
6 | class testApp : public ofBaseApp
7 | {
8 | public:
9 |
10 | void setup();
11 | void update();
12 | void draw();
13 |
14 | ofxOMXPlayer omxPlayer;
15 | ofShader shader;
16 | ofFbo fbo;
17 | };
18 |
19 |
--------------------------------------------------------------------------------
/omxPlayerTextured/.gitignore:
--------------------------------------------------------------------------------
1 | obj
2 | !bin/omxPlayerTextured.bin
3 | omxPlayerTextured
--------------------------------------------------------------------------------
/omxPlayerTextured/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/omxPlayerTextured/bin/omxPlayerTextured.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/omxPlayerTextured/bin/omxPlayerTextured.bin
--------------------------------------------------------------------------------
/omxPlayerTextured/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "testApp.h"
3 | #include "ofGLProgrammableRenderer.h"
4 |
5 | int main()
6 | {
7 | ofSetLogLevel(OF_LOG_VERBOSE);
8 | ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);
9 | ofSetupOpenGL(1280, 720, OF_WINDOW);
10 | ofRunApp( new testApp());
11 | }
12 |
--------------------------------------------------------------------------------
/omxPlayerTextured/src/testApp.cpp:
--------------------------------------------------------------------------------
1 | #include "testApp.h"
2 |
3 | //--------------------------------------------------------------
4 | void testApp::setup()
5 | {
6 | ofSetLogLevel(OF_LOG_VERBOSE);
7 |
8 | string videoPath = ofToDataPath("../../../videos/720p.mov", true);
9 |
10 | // this will just set videoPath to the first video in the videos folder, if any.
11 | ofDirectory currentVideoDirectory(ofToDataPath("videos", true));
12 | if (currentVideoDirectory.exists())
13 | {
14 | currentVideoDirectory.listDir();
15 | vector files = currentVideoDirectory.getFiles();
16 | if (files.size()>0)
17 | {
18 | videoPath = files[0].path();
19 | }
20 | }
21 |
22 | //Somewhat like ofFboSettings we may have a lot of options so this is the current model
23 | ofxOMXPlayerSettings settings;
24 | settings.videoPath = videoPath;
25 | settings.useHDMIForAudio = true; //default true
26 | settings.enableTexture = true; //default true
27 | settings.enableLooping = true; //default true
28 |
29 | omxPlayer.setup(settings);
30 |
31 | }
32 |
33 | //--------------------------------------------------------------
34 | void testApp::update()
35 | {
36 | //update background tasks here
37 | }
38 |
39 | //--------------------------------------------------------------
40 | void testApp::draw(){
41 |
42 | omxPlayer.draw(0, 0, ofGetWidth(), ofGetHeight());
43 |
44 | //draw a smaller version in the lower right
45 | int scaledHeight = omxPlayer.getHeight()/4;
46 | int scaledWidth = omxPlayer.getWidth()/4;
47 | omxPlayer.draw(ofGetWidth()-scaledWidth, ofGetHeight()-scaledHeight, scaledWidth, scaledHeight);
48 |
49 | stringstream info;
50 | info << "APP FPS: "+ ofToString(ofGetFrameRate());
51 | info <<"\n" << "MEDIA TIME: " << omxPlayer.getMediaTime();
52 | info <<"\n" << "DIMENSIONS: " << omxPlayer.getWidth()<<"x"<
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.yourcompany.openFrameworks
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/opencvExample/opencvExample.xcodeproj/xcshareddata/xcschemes/opencvExample Debug.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/opencvExample/opencvExample.xcodeproj/xcshareddata/xcschemes/opencvExample Release.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/opencvExample/src/ConsoleListener.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 |
5 | class SSHKeyListenerEventData
6 | {
7 | public:
8 | SSHKeyListenerEventData(char character_, void* listener_)
9 | {
10 | character = character_;
11 | listener = listener_;
12 | }
13 | void* listener;
14 |
15 | char character;
16 | };
17 |
18 | class SSHKeyListener
19 | {
20 | public:
21 | virtual void onCharacterReceived(SSHKeyListenerEventData& e) = 0;
22 | };
23 |
24 | class ConsoleListener: public Poco::Runnable
25 | {
26 | public:
27 | SSHKeyListener* listener;
28 | Poco::Thread thread;
29 | ConsoleListener()
30 | {
31 | listener = NULL;
32 |
33 | }
34 |
35 | ~ConsoleListener()
36 | {
37 | thread.tryJoin(50);
38 | ofLogVerbose() << "~ConsoleListener END";
39 | }
40 |
41 | void setup(SSHKeyListener* listener_)
42 | {
43 | listener = listener_;
44 | //thread.setOSPriority(Poco::Thread::getMinOSPriority());
45 | thread.start(*this);
46 | }
47 | void run()
48 | {
49 |
50 | while (thread.isRunning())
51 | {
52 | if (listener != NULL)
53 | {
54 |
55 | char buffer[10];
56 | if (fgets(buffer, 10 , stdin) != NULL)
57 | {
58 |
59 | SSHKeyListenerEventData eventData(buffer[0], (void *)this);
60 | listener->onCharacterReceived(eventData);
61 |
62 | }
63 | }
64 | }
65 | }
66 |
67 | };
68 |
69 |
70 |
71 | #if 0
72 | USAGE:
73 |
74 | 1.add to testApp.h
75 |
76 | #include "ConsoleListener.h"
77 |
78 | //extend testApp
79 | class testApp : public ofBaseApp, public SSHKeyListener
80 |
81 | 2. add required callback definition and instance
82 |
83 | void onCharacterReceived(SSHKeyListenerEventData& e);
84 | ConsoleListener consoleListener;
85 |
86 | 3. add to testApp.cpp
87 |
88 | void testApp::onCharacterReceived(SSHKeyListenerEventData& e)
89 | {
90 | keyPressed((int)e.character);
91 | }
92 |
93 | add in testApp::setup()
94 |
95 | consoleListener.setup(this);
96 |
97 | 4. and later
98 | void testApp::keyPressed (int key){
99 |
100 | if (key == 'e')
101 | {
102 | ofLogVerbose() << "e pressed!";
103 | }
104 | }
105 | #endif
--------------------------------------------------------------------------------
/opencvExample/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 | //#include "ofGLProgrammableRenderer.h"
4 |
5 | int main()
6 | {
7 | //ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);
8 | ofSetupOpenGL(1280, 720, OF_WINDOW);
9 | ofRunApp( new ofApp());
10 | }
--------------------------------------------------------------------------------
/opencvExample/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxOpenCv.h"
5 | #include "ConsoleListener.h"
6 |
7 |
8 | class ofApp : public ofBaseApp, public SSHKeyListener{
9 |
10 | public:
11 | void setup();
12 | void update();
13 | void draw();
14 | void keyPressed(int key);
15 |
16 | ofVideoPlayer videoPlayer;
17 | int videoWidth;
18 | int videoHeight;
19 |
20 | ofxCvColorImage colorImage;
21 | ofxCvGrayscaleImage grayImage;
22 | ofxCvGrayscaleImage backgroundImage;
23 | ofxCvGrayscaleImage differenceImage;
24 |
25 | ofxCvContourFinder contourFinder;
26 |
27 | int thresholdAmount;
28 | bool doLearnBackground;
29 |
30 | ofTrueTypeFont font;
31 |
32 | void onCharacterReceived(SSHKeyListenerEventData& e);
33 | ConsoleListener consoleListener;
34 |
35 | bool doDrawInfo;
36 | };
37 |
38 |
--------------------------------------------------------------------------------
/ruttEtraExample/.gitignore:
--------------------------------------------------------------------------------
1 | bin/ruttEtraExample
2 |
--------------------------------------------------------------------------------
/ruttEtraExample/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/ruttEtraExample/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/ruttEtraExample/addons.make:
--------------------------------------------------------------------------------
1 | # List the names of all required addons below.
2 | # These are the names of the folders in OF_ROOT/addons
3 |
4 | ofxOpenCv
5 |
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ruttEtraExample/bin/data/.gitkeep
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/movies/fingers.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ruttEtraExample/bin/data/movies/fingers.mp4
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/movies/fingers_160x120.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ruttEtraExample/bin/data/movies/fingers_160x120.mp4
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/palettes/palette1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ruttEtraExample/bin/data/palettes/palette1.png
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/palettes/palette2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ruttEtraExample/bin/data/palettes/palette2.png
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/palettes/palette3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ruttEtraExample/bin/data/palettes/palette3.png
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/palettes/palette4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ruttEtraExample/bin/data/palettes/palette4.png
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/palettes/palette5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ruttEtraExample/bin/data/palettes/palette5.png
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/palettes/palette6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ruttEtraExample/bin/data/palettes/palette6.png
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/palettes/palette7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ruttEtraExample/bin/data/palettes/palette7.png
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/palettes/palette8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ruttEtraExample/bin/data/palettes/palette8.png
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/palettes/palette9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ruttEtraExample/bin/data/palettes/palette9.png
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/shaders/ColorFromHeight.frag:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | #extension GL_ARB_texture_rectangle : enable
4 |
5 | // Uniforms --------------
6 | uniform sampler2DRect u_paletteSampler;
7 |
8 | // Varyings --------------
9 | varying float v_heightFrac;
10 |
11 |
12 | // -------------------------------------------
13 | void main( void )
14 | {
15 | vec2 texCoord = vec2(0.0, 0.0);
16 | texCoord.s = v_heightFrac;
17 | texCoord.s *= 256.0; // we assume the palettes are always 256 pixels/colors wide
18 | vec4 color = texture2DRect( u_paletteSampler, texCoord );
19 |
20 | gl_FragColor = color * gl_Color;
21 |
22 | //gl_FragColor = vec4(v_heightFrac,v_heightFrac,v_heightFrac,1.0);
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/shaders/ColorFromHeight.vert:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Uniforms --------------
4 | uniform float u_maxHeight;
5 |
6 | // Varyings --------------
7 | varying float v_heightFrac;
8 |
9 | // -------------------------------------------
10 | void main()
11 | {
12 | gl_TexCoord[0] = gl_MultiTexCoord0;
13 | gl_Position = ftransform();
14 | gl_FrontColor = gl_Color;
15 | v_heightFrac = gl_Vertex.y / u_maxHeight;
16 | }
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/shaders/ColorFromHeightGLES.frag:
--------------------------------------------------------------------------------
1 | precision highp float; // this will make the default precision high
2 |
3 | // Uniforms --------------
4 | uniform sampler2D u_paletteSampler;
5 |
6 | // Varyings --------------
7 | varying float v_heightFrac;
8 |
9 | // -------------------------------------------
10 | void main()
11 | {
12 |
13 | vec2 texCoord = vec2(0.0, 0.0);
14 | texCoord.s = v_heightFrac;
15 | vec4 color = texture2D( u_paletteSampler, texCoord );
16 |
17 | gl_FragColor = color;// * gl_Color;
18 |
19 | //gl_FragColor = vec4(v_heightFrac,v_heightFrac,v_heightFrac,1.0);
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/ruttEtraExample/bin/data/shaders/ColorFromHeightGLES.vert:
--------------------------------------------------------------------------------
1 | attribute vec4 position; // set automatically by OF
2 | attribute vec4 color; // set automatically by OF
3 | attribute vec4 normal; // set automatically by OF
4 | attribute vec2 texcoord; // set automatically by OF
5 |
6 | uniform mat4 modelViewMatrix; // set automatically by OF
7 | uniform mat4 projectionMatrix; // set automatically by OF
8 |
9 | // Uniforms --------------
10 | uniform float u_maxHeight;
11 |
12 | // Varyings --------------
13 | varying float v_heightFrac;
14 |
15 | // -------------------------------------------
16 | void main()
17 | {
18 | v_heightFrac = position.y / u_maxHeight;
19 |
20 | vec4 pos = projectionMatrix * modelViewMatrix * position;
21 | gl_Position = pos;
22 | }
--------------------------------------------------------------------------------
/ruttEtraExample/bin/ruttEtraExample.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/ruttEtraExample/bin/ruttEtraExample.bin
--------------------------------------------------------------------------------
/ruttEtraExample/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.yourcompany.openFrameworks
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/ruttEtraExample/ruttEtraExample.xcodeproj/xcshareddata/xcschemes/opencvExample Debug.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/ruttEtraExample/ruttEtraExample.xcodeproj/xcshareddata/xcschemes/opencvExample Release.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/ruttEtraExample/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "testApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 |
7 | // If we want shaders on the Pi, we need to set the renderer to the programmable renderer
8 | #ifdef TARGET_OPENGLES
9 | ofSetCurrentRenderer(ofGLProgrammableRenderer::TYPE);
10 | #endif
11 |
12 | ofSetupOpenGL(1280, 720, OF_WINDOW);
13 | ofRunApp( new testApp());
14 | }
15 |
--------------------------------------------------------------------------------
/ruttEtraExample/src/testApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 |
5 | #include "ofxOpenCv.h"
6 |
7 | //#define _USE_LIVE_VIDEO // uncomment this to use a live camera
8 | // otherwise, we'll use a movie file
9 |
10 | class testApp : public ofBaseApp{
11 |
12 | public:
13 | void setup();
14 | void update();
15 | void draw();
16 |
17 | void updateMesh();
18 |
19 | void keyPressed(int key);
20 | void keyReleased(int key);
21 | void mouseMoved(int x, int y );
22 | void mouseDragged(int x, int y, int button);
23 | void mousePressed(int x, int y, int button);
24 | void mouseReleased(int x, int y, int button);
25 | void windowResized(int w, int h);
26 | void dragEvent(ofDragInfo dragInfo);
27 | void gotMessage(ofMessage msg);
28 |
29 | #ifdef _USE_LIVE_VIDEO
30 | ofVideoGrabber vidGrabber;
31 | #else
32 | ofVideoPlayer vidPlayer;
33 | #endif
34 |
35 | ofxCvColorImage colorImg;
36 | ofxCvGrayscaleImage grayImage;
37 |
38 | ofEasyCam camera;
39 |
40 | ofShader colorFromHeightShader;
41 | vector palettes;
42 | ofImage* currPalette;
43 |
44 | float linesHeight;
45 | int lineSkip;
46 | ofVec3f imageToSpaceScaling;
47 | ofMesh mesh;
48 | //ofVboMesh mesh;
49 | float lastClickTime;
50 |
51 | ofFbo fbo;
52 | };
53 |
54 |
--------------------------------------------------------------------------------
/videos/720p.mov:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/openFrameworks-arm/RaspberryPiGuideCAN/6b84770668bd52c08e78264fae58342c0234e627/videos/720p.mov
--------------------------------------------------------------------------------