root/OpenSceneGraph/trunk/src/osgPlugins/CMakeLists.txt @ 10798

Revision 10798, 4.7 kB (checked in by robert, 4 years ago)

From Cedric Pinson, "Here an update of the directshow plugin. It fixes issues with
synchronization, improve capture device support.

here how to use it to display a capture device:

osg::Options* options = new osg::Options;
options->setPluginStringData("captureWantedWidth", "800");
options->setPluginStringData("captureWantedHeight", "600");
options->setPluginStringData("captureWantedFps", "30");
options->setPluginStringData("captureVideoDevice", "USB Video Device" );
options->setPluginStringData("captureSoundDevice", "");
then
osgDB::readImageFile("capture.directshow", options)
you can use a graphedit application to list devices available in
directshow.

for classic avi file you just need to do a
osgDB::readImageFile("file.avi.directshow");
You will need of course to install the codec needed by directshow to
read the avi files.

I recommand this tool http://avicodec.duby.info/, that check which
video/sound codec is needed to play an avi file.

You can test it with the osgmovie example.
"

  • Property svn:eol-style set to native
Line 
1#---------------------------------------------------
2# OSG CMAKE SUPPORT
3# (C) by Michael Wagner, mtw@shared-reality.com 2005
4# (C) Eric Wing, Luigi Calori and Robert Osfield 2006-2007
5#---------------------------------------------------
6
7PROJECT(OSG_PLUGINS_MASTER)
8
9IF(NOT DYNAMIC_OPENSCENEGRAPH)
10    ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
11ENDIF()
12
13IF(NOT MSVC)
14    SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/${OSG_PLUGINS}")
15    SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${OSG_PLUGINS}")
16ENDIF()
17
18SET(CMAKE_SHARED_MODULE_PREFIX ${OSG_PLUGIN_PREFIX})
19
20IF(MSVC80)
21    IF(NOT OSG_MSVC_GENERATE_PLUGINS_AND_WRAPPERS_MANIFESTS)
22        SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /MANIFEST:NO")
23    ENDIF()
24ENDIF()
25
26SET(TARGET_DEFAULT_PREFIX "osgdb_")
27SET(TARGET_DEFAULT_LABEL_PREFIX "Plugins")
28SET(TARGET_COMMON_LIBRARIES
29    OpenThreads
30    osg
31    osgDB
32    osgUtil
33)
34
35############################################################
36#
37#  NodeKit/Psudo loader plugins
38#
39ADD_SUBDIRECTORY(osgAnimation)
40ADD_SUBDIRECTORY(osgFX)
41ADD_SUBDIRECTORY(osgParticle)
42ADD_SUBDIRECTORY(osgSim)
43ADD_SUBDIRECTORY(osgText)
44ADD_SUBDIRECTORY(osgViewer)
45ADD_SUBDIRECTORY(osgShadow)
46ADD_SUBDIRECTORY(osgTerrain)
47ADD_SUBDIRECTORY(osgVolume)
48ADD_SUBDIRECTORY(osgWidget)
49ADD_SUBDIRECTORY(osga)
50ADD_SUBDIRECTORY(rot)
51ADD_SUBDIRECTORY(scale)
52ADD_SUBDIRECTORY(trans)
53ADD_SUBDIRECTORY(normals)
54ADD_SUBDIRECTORY(revisions)
55
56############################################################
57#
58#  Main native plugins
59#
60ADD_SUBDIRECTORY(osg)
61ADD_SUBDIRECTORY(ive)
62
63############################################################
64#
65#  Viewer plugins
66#
67ADD_SUBDIRECTORY(cfg)
68
69############################################################
70#
71#  Shader plugins
72#
73ADD_SUBDIRECTORY(glsl)
74
75############################################################
76#
77#  Image plugins
78#
79ADD_SUBDIRECTORY(rgb)
80ADD_SUBDIRECTORY(bmp)
81ADD_SUBDIRECTORY(pnm)
82ADD_SUBDIRECTORY(dds)
83ADD_SUBDIRECTORY(tga)
84ADD_SUBDIRECTORY(hdr)
85ADD_SUBDIRECTORY(dot)
86ADD_SUBDIRECTORY(vtf)
87
88IF(JPEG_FOUND)
89    ADD_SUBDIRECTORY(jpeg)
90ENDIF()
91IF(JASPER_FOUND)
92    ADD_SUBDIRECTORY(jp2)
93ENDIF()
94IF(OPENEXR_FOUND)
95    ADD_SUBDIRECTORY(exr)
96ENDIF()
97IF(GIFLIB_FOUND)
98    ADD_SUBDIRECTORY(gif)
99ENDIF()
100IF(PNG_FOUND)
101    ADD_SUBDIRECTORY(png)
102ENDIF()
103IF(TIFF_FOUND)
104    ADD_SUBDIRECTORY(tiff)
105ENDIF()
106IF(GDAL_FOUND)
107    ADD_SUBDIRECTORY(gdal)
108    ADD_SUBDIRECTORY(ogr)
109ENDIF()
110
111IF(XUL_FOUND)
112    IF(WIN32 OR APPLE OR GTK_FOUND)
113        ADD_SUBDIRECTORY(gecko)
114    ENDIF()
115ENDIF()
116
117
118
119############################################################
120#
121# 3D Image plugins
122#
123IF(DCMTK_FOUND AND ZLIB_FOUND)
124    ADD_SUBDIRECTORY(dicom)
125ELSE()
126    IF(ITK_FOUND)
127        ADD_SUBDIRECTORY(dicom)
128    ENDIF()
129ENDIF()
130
131############################################################
132#
133#  3rd party 3d plugins
134#
135
136ADD_SUBDIRECTORY(3dc)
137
138ADD_SUBDIRECTORY(p3d)
139
140IF(CURL_FOUND)
141    ADD_SUBDIRECTORY(curl)
142ENDIF()
143
144IF(ZLIB_FOUND)
145    ADD_SUBDIRECTORY(gz)
146ENDIF()
147
148IF(INVENTOR_FOUND)
149    ADD_SUBDIRECTORY(Inventor)
150ENDIF()
151
152IF(OPENVRML_FOUND)
153    ADD_SUBDIRECTORY(vrml)
154ENDIF()
155
156IF(COLLADA_FOUND)
157    ADD_SUBDIRECTORY(dae)
158ENDIF()
159
160IF(FBX_FOUND)
161    ADD_SUBDIRECTORY(fbx)
162ENDIF()
163
164IF(OSG_GLU_AVAILABLE)
165    ADD_SUBDIRECTORY(lwo)
166    ADD_SUBDIRECTORY(dw)
167ENDIF()
168
169ADD_SUBDIRECTORY(bvh)
170ADD_SUBDIRECTORY(x)
171ADD_SUBDIRECTORY(dxf)
172ADD_SUBDIRECTORY(OpenFlight)
173# ADD_SUBDIRECTORY(flt)
174ADD_SUBDIRECTORY(geo)
175ADD_SUBDIRECTORY(obj)
176
177IF(PERFORMER_FOUND)
178    ADD_SUBDIRECTORY(pfb)
179ENDIF()
180
181ADD_SUBDIRECTORY(pic)
182ADD_SUBDIRECTORY(stl)
183ADD_SUBDIRECTORY(3ds)
184ADD_SUBDIRECTORY(ac)
185
186ADD_SUBDIRECTORY(logo)
187ADD_SUBDIRECTORY(lws)
188ADD_SUBDIRECTORY(md2)
189ADD_SUBDIRECTORY(osgtgz)
190ADD_SUBDIRECTORY(tgz)
191
192ADD_SUBDIRECTORY(shp)
193ADD_SUBDIRECTORY(txf)
194
195ADD_SUBDIRECTORY(bsp)
196ADD_SUBDIRECTORY(mdl)
197
198IF(OSG_CPP_EXCEPTIONS_AVAILABLE)
199    ADD_SUBDIRECTORY(ply)
200    ADD_SUBDIRECTORY(txp)
201ENDIF()
202
203IF(XINE_FOUND)
204    ADD_SUBDIRECTORY(xine)
205ENDIF()
206
207IF(FFMPEG_FOUND)
208    ADD_SUBDIRECTORY(ffmpeg)
209ENDIF()
210
211IF(DIRECTSHOW_FOUND)
212    ADD_SUBDIRECTORY(directshow)
213ENDIF()
214
215# IF(OPENAL_FOUND)
216#    ADD_SUBDIRECTORY(OpenAL)
217# ENDIF()
218
219IF(APPLE)
220    ADD_SUBDIRECTORY(imageio)
221ENDIF()
222
223IF(QUICKTIME_FOUND)
224    ADD_SUBDIRECTORY(quicktime)
225ENDIF()
226
227IF(FREETYPE_FOUND)
228    ADD_SUBDIRECTORY(freetype)
229ENDIF()
230
231IF(ZLIB_FOUND)
232    ADD_SUBDIRECTORY(zip)
233ENDIF()
234
235IF(RSVG_FOUND AND CAIRO_FOUND)
236    ADD_SUBDIRECTORY(svg)
237ENDIF()
238
239IF(POPPLER_FOUND AND CAIRO_FOUND)
240    ADD_SUBDIRECTORY(pdf)
241ENDIF()
242
243IF(LIBVNCSERVER_FOUND)
244    ADD_SUBDIRECTORY(vnc)
245ENDIF()
246
247##########to get all the variables of Cmake
248#GET_CMAKE_PROPERTY(MYVARS VARIABLES)
249#FOREACH(myvar ${MYVARS})
250#    FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt
251#        "${myvar} -->${${myvar}}<-\n"
252#    )
253#ENDFOREACH(myvar)
254
255
Note: See TracBrowser for help on using the browser.