From 7036d755016a459043b472214406e50139d97571 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 8 Nov 2009 12:56:45 +0000 Subject: [PATCH] Move OpenCVTexture, ARToolKit and WebcamVideo to a new "vision" module --- panda/src/grutil/Sources.pp | 10 +-- panda/src/grutil/config_grutil.cxx | 21 +------ panda/src/grutil/grutil_composite1.cxx | 1 - panda/src/grutil/grutil_composite2.cxx | 1 - panda/src/movies/Sources.pp | 4 -- panda/src/movies/config_movies.cxx | 2 - panda/src/movies/movies_composite1.cxx | 3 - panda/src/vision/Sources.pp | 34 +++++++++++ panda/src/{grutil => vision}/arToolKit.I | 0 panda/src/{grutil => vision}/arToolKit.cxx | 20 +++--- panda/src/{grutil => vision}/arToolKit.h | 2 +- panda/src/vision/config_vision.cxx | 61 +++++++++++++++++++ panda/src/vision/config_vision.h | 26 ++++++++ panda/src/{grutil => vision}/openCVTexture.I | 0 .../src/{grutil => vision}/openCVTexture.cxx | 18 +++--- panda/src/{grutil => vision}/openCVTexture.h | 2 +- panda/src/vision/vision_composite1.cxx | 6 ++ panda/src/{movies => vision}/webcamVideo.I | 0 panda/src/{movies => vision}/webcamVideo.cxx | 0 panda/src/{movies => vision}/webcamVideo.h | 2 +- .../src/{movies => vision}/webcamVideoDS.cxx | 0 21 files changed, 154 insertions(+), 59 deletions(-) create mode 100644 panda/src/vision/Sources.pp rename panda/src/{grutil => vision}/arToolKit.I (100%) rename panda/src/{grutil => vision}/arToolKit.cxx (96%) rename panda/src/{grutil => vision}/arToolKit.h (98%) create mode 100644 panda/src/vision/config_vision.cxx create mode 100644 panda/src/vision/config_vision.h rename panda/src/{grutil => vision}/openCVTexture.I (100%) rename panda/src/{grutil => vision}/openCVTexture.cxx (98%) rename panda/src/{grutil => vision}/openCVTexture.h (98%) create mode 100644 panda/src/vision/vision_composite1.cxx rename panda/src/{movies => vision}/webcamVideo.I (100%) rename panda/src/{movies => vision}/webcamVideo.cxx (100%) rename panda/src/{movies => vision}/webcamVideo.h (96%) rename panda/src/{movies => vision}/webcamVideoDS.cxx (100%) diff --git a/panda/src/grutil/Sources.pp b/panda/src/grutil/Sources.pp index e0900ed3b1..ff79f2a275 100644 --- a/panda/src/grutil/Sources.pp +++ b/panda/src/grutil/Sources.pp @@ -1,7 +1,7 @@ #define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \ dtoolutil:c dtoolbase:c dtool:m prc:c -#define USE_PACKAGES opencv ffmpeg artoolkit +#define USE_PACKAGES ffmpeg #begin lib_target #define TARGET grutil @@ -13,7 +13,6 @@ #define SOURCES \ pipeOcclusionCullTraverser.I pipeOcclusionCullTraverser.h \ cardMaker.I cardMaker.h \ - arToolKit.I arToolKit.h \ config_grutil.h \ ffmpegTexture.I ffmpegTexture.h \ movieTexture.I movieTexture.h \ @@ -26,12 +25,10 @@ lineSegs.I lineSegs.h \ multitexReducer.I multitexReducer.h multitexReducer.cxx \ nodeVertexTransform.I nodeVertexTransform.h \ - openCVTexture.I openCVTexture.h \ rigidBodyCombiner.I rigidBodyCombiner.h #define INCLUDED_SOURCES \ cardMaker.cxx \ - arToolKit.cxx \ ffmpegTexture.cxx \ movieTexture.cxx \ fisheyeMaker.cxx \ @@ -41,15 +38,13 @@ geoMipTerrain.cxx \ sceneGraphAnalyzerMeter.cxx \ heightfieldTesselator.cxx \ - nodeVertexTransform.cxx \ - openCVTexture.cxx \ + nodeVertexTransform.cxx \ pipeOcclusionCullTraverser.cxx \ lineSegs.cxx \ rigidBodyCombiner.cxx #define INSTALL_HEADERS \ cardMaker.I cardMaker.h \ - arToolKit.I arToolKit.h \ ffmpegTexture.I ffmpegTexture.h \ movieTexture.I movieTexture.h \ fisheyeMaker.I fisheyeMaker.h \ @@ -61,7 +56,6 @@ lineSegs.I lineSegs.h \ multitexReducer.I multitexReducer.h \ nodeVertexTransform.I nodeVertexTransform.h \ - openCVTexture.I openCVTexture.h \ rigidBodyCombiner.I rigidBodyCombiner.h #define IGATESCAN all diff --git a/panda/src/grutil/config_grutil.cxx b/panda/src/grutil/config_grutil.cxx index 8441c47eb9..4d43ca5877 100644 --- a/panda/src/grutil/config_grutil.cxx +++ b/panda/src/grutil/config_grutil.cxx @@ -17,7 +17,6 @@ #include "sceneGraphAnalyzerMeter.h" #include "meshDrawer.h" #include "geoMipTerrain.h" -#include "openCVTexture.h" #include "ffmpegTexture.h" #include "movieTexture.h" #include "pandaSystem.h" @@ -98,34 +97,20 @@ init_libgrutil() { MovieTexture::init_type(); MovieTexture::register_with_read_factory(); #endif // HAVE_AUDIO -#ifdef HAVE_OPENCV - OpenCVTexture::init_type(); - OpenCVTexture::register_with_read_factory(); -#endif + #ifdef HAVE_FFMPEG av_register_all(); FFMpegTexture::init_type(); FFMpegTexture::register_with_read_factory(); #endif -#ifdef HAVE_OPENCV - PandaSystem *ps = PandaSystem::get_global_ptr(); - ps->add_system("OpenCV"); -#endif - +#if defined(HAVE_FFMPEG) TexturePool *ts = TexturePool::get_global_ptr(); if (use_movietexture) { -#if defined(HAVE_FFMPEG) ts->register_texture_type(MovieTexture::make_texture, "avi mov mpg wmv asf flv nut ogm"); -#elif defined(HAVE_OPENCV) - ts->register_texture_type(OpenCVTexture::make_texture, "avi"); -#endif } else { -#if defined(HAVE_FFMPEG) ts->register_texture_type(FFMpegTexture::make_texture, "avi mov mpg wmv asf flv nut ogm"); -#elif defined(HAVE_OPENCV) - ts->register_texture_type(OpenCVTexture::make_texture, "avi"); -#endif } +#endif } diff --git a/panda/src/grutil/grutil_composite1.cxx b/panda/src/grutil/grutil_composite1.cxx index c14587e754..c02bb0c421 100644 --- a/panda/src/grutil/grutil_composite1.cxx +++ b/panda/src/grutil/grutil_composite1.cxx @@ -1,5 +1,4 @@ #include "cardMaker.cxx" -#include "arToolKit.cxx" #include "heightfieldTesselator.cxx" #include "geoMipTerrain.cxx" #include "config_grutil.cxx" diff --git a/panda/src/grutil/grutil_composite2.cxx b/panda/src/grutil/grutil_composite2.cxx index 1e4992e95a..c6c08bf6d7 100644 --- a/panda/src/grutil/grutil_composite2.cxx +++ b/panda/src/grutil/grutil_composite2.cxx @@ -1,4 +1,3 @@ -#include "openCVTexture.cxx" #include "ffmpegTexture.cxx" #include "movieTexture.cxx" #include "nodeVertexTransform.cxx" diff --git a/panda/src/movies/Sources.pp b/panda/src/movies/Sources.pp index 77d40ffd02..3aff396ef2 100644 --- a/panda/src/movies/Sources.pp +++ b/panda/src/movies/Sources.pp @@ -25,7 +25,6 @@ ffmpegVirtualFile.h ffmpegVirtualFile.I \ userDataAudio.h userDataAudio.I \ userDataAudioCursor.h userDataAudioCursor.I \ - webcamVideo.h webcamVideo.I \ microphoneAudio.h microphoneAudio.I \ config_movies.h @@ -43,8 +42,6 @@ ffmpegVirtualFile.cxx \ userDataAudio.cxx \ userDataAudioCursor.cxx \ - webcamVideo.cxx \ - webcamVideoDS.cxx \ microphoneAudio.cxx \ microphoneAudioDS.cxx \ config_movies.cxx @@ -61,7 +58,6 @@ ffmpegAudio.h ffmpegAudio.I \ ffmpegAudioCursor.h ffmpegAudioCursor.I \ ffmpegVirtualFile.h ffmpegVirtualFile.I \ - webcamVideo.h webcamVideo.I \ microphoneAudio.h microphoneAudio.I \ config_movies.h diff --git a/panda/src/movies/config_movies.cxx b/panda/src/movies/config_movies.cxx index e78c96c1e2..424cb8c665 100644 --- a/panda/src/movies/config_movies.cxx +++ b/panda/src/movies/config_movies.cxx @@ -14,7 +14,6 @@ #include "config_movies.h" #include "dconfig.h" -#include "webcamVideo.h" #ifdef HAVE_FFMPEG extern "C" { @@ -53,7 +52,6 @@ init_libmovies() { InkblotVideoCursor::init_type(); UserDataAudio::init_type(); UserDataAudioCursor::init_type(); - WebcamVideo::init_type(); MicrophoneAudio::init_type(); #ifdef HAVE_FFMPEG FfmpegVideo::init_type(); diff --git a/panda/src/movies/movies_composite1.cxx b/panda/src/movies/movies_composite1.cxx index 9a8a9d6043..6df7f2b4ad 100644 --- a/panda/src/movies/movies_composite1.cxx +++ b/panda/src/movies/movies_composite1.cxx @@ -18,9 +18,6 @@ #include "userDataAudio.cxx" #include "userDataAudioCursor.cxx" -#include "webcamVideo.cxx" -#include "webcamVideoDS.cxx" - #include "microphoneAudio.cxx" #include "microphoneAudioDS.cxx" diff --git a/panda/src/vision/Sources.pp b/panda/src/vision/Sources.pp new file mode 100644 index 0000000000..901a9f795b --- /dev/null +++ b/panda/src/vision/Sources.pp @@ -0,0 +1,34 @@ +#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \ + dtoolutil:c dtoolbase:c dtool:m prc:c movies:m + +#define USE_PACKAGES opencv artoolkit + +#begin lib_target + #define TARGET vision + #define LOCAL_LIBS \ + display text pgraph gobj linmath putil movies audio + + #define COMBINED_SOURCES $[TARGET]_composite1.cxx + + #define SOURCES \ + arToolKit.I arToolKit.h \ + config_vision.h \ + openCVTexture.I openCVTexture.h \ + webcamVideo.h webcamVideo.I + + #define INCLUDED_SOURCES \ + arToolKit.cxx \ + config_vision.cxx \ + openCVTexture.cxx \ + webcamVideo.cxx \ + webcamVideoDS.cxx + + #define INSTALL_HEADERS \ + arToolKit.I arToolKit.h \ + openCVTexture.I openCVTexture.h \ + webcamVideo.h webcamVideo.I + + #define IGATESCAN all + +#end lib_target + diff --git a/panda/src/grutil/arToolKit.I b/panda/src/vision/arToolKit.I similarity index 100% rename from panda/src/grutil/arToolKit.I rename to panda/src/vision/arToolKit.I diff --git a/panda/src/grutil/arToolKit.cxx b/panda/src/vision/arToolKit.cxx similarity index 96% rename from panda/src/grutil/arToolKit.cxx rename to panda/src/vision/arToolKit.cxx index c1addc06ee..101a850e15 100644 --- a/panda/src/grutil/arToolKit.cxx +++ b/panda/src/vision/arToolKit.cxx @@ -21,7 +21,7 @@ #include "perspectiveLens.h" #include "lvecBase3.h" #include "compose_matrix.h" -#include "config_grutil.h" +#include "config_vision.h" extern "C" { #include "AR/ar.h" }; @@ -123,7 +123,7 @@ make(NodePath camera, const Filename ¶mfile, double marker_size) { AR_DEFAULT_PIXEL_FORMAT != AR_PIXEL_FORMAT_RGBA && AR_DEFAULT_PIXEL_FORMAT != AR_PIXEL_FORMAT_RGB && AR_DEFAULT_PIXEL_FORMAT != AR_PIXEL_FORMAT_BGR) { - grutil_cat.error() << + vision_cat.error() << "The copy of ARToolKit that you are using is not compiled " "for RGB, BGR, RGBA or ARGB input. Panda3D cannot use " "this copy of ARToolKit. Please modify the ARToolKit's " @@ -132,25 +132,25 @@ make(NodePath camera, const Filename ¶mfile, double marker_size) { } if (camera.is_empty()) { - grutil_cat.error() << "ARToolKit: invalid camera nodepath\n"; + vision_cat.error() << "ARToolKit: invalid camera nodepath\n"; return 0; } PandaNode *node = camera.node(); if ((node == 0) || (node->get_type() != Camera::get_class_type())) { - grutil_cat.error() << "ARToolKit: invalid camera nodepath\n"; + vision_cat.error() << "ARToolKit: invalid camera nodepath\n"; return 0; } Camera *cam = DCAST(Camera, node); Lens *lens = cam->get_lens(); if (lens->get_type() != PerspectiveLens::get_class_type()) { - grutil_cat.error() << "ARToolKit: supplied camera node must be perspective.\n"; + vision_cat.error() << "ARToolKit: supplied camera node must be perspective.\n"; return 0; } ARParam wparam; string fn = paramfile.to_os_specific(); if( arParamLoad(fn.c_str(), 1, &wparam) < 0 ) { - grutil_cat.error() << "Cannot load ARToolKit camera config\n"; + vision_cat.error() << "Cannot load ARToolKit camera config\n"; return 0; } @@ -221,7 +221,7 @@ get_pattern(const Filename &filename) { string fn = filename.to_os_specific(); int id = arLoadPatt(fn.c_str()); if (id < 0) { - grutil_cat.error() << "Could not load AR ToolKit Pattern: " << fn << "\n"; + vision_cat.error() << "Could not load AR ToolKit Pattern: " << fn << "\n"; return -1; } arDeactivatePatt(id); @@ -275,7 +275,7 @@ analyze(Texture *tex, bool do_flip_texture) { nassertv(tex->get_texture_type() == Texture::TT_2d_texture); if (tex->get_num_components() != 3 && tex->get_num_components() != 4) { - grutil_cat.error() << "ARToolKit can only analyze RGB and RGBA textures.\n"; + vision_cat.error() << "ARToolKit can only analyze RGB and RGBA textures.\n"; return; } @@ -381,7 +381,7 @@ analyze(Texture *tex, bool do_flip_texture) { int marker_num; if (arDetectMarker(data, _threshold * 256, &marker_info, &marker_num) < 0) { - grutil_cat.error() << "ARToolKit detection error.\n"; + vision_cat.error() << "ARToolKit detection error.\n"; delete data; return; } @@ -423,7 +423,7 @@ analyze(Texture *tex, bool do_flip_texture) { decompose_matrix(mat, scale, shear, hpr, pos); if (np.get_parent().is_empty()) { - grutil_cat.error() << "NodePath must have a parent.\n"; + vision_cat.error() << "NodePath must have a parent.\n"; } else { np.set_pos_hpr(_camera, pos, hpr); } diff --git a/panda/src/grutil/arToolKit.h b/panda/src/vision/arToolKit.h similarity index 98% rename from panda/src/grutil/arToolKit.h rename to panda/src/vision/arToolKit.h index f12b289191..3439d887b4 100644 --- a/panda/src/grutil/arToolKit.h +++ b/panda/src/vision/arToolKit.h @@ -40,7 +40,7 @@ // This class is a wrapper around the ARToolKit // library. //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA_GRUTIL ARToolKit { +class EXPCL_VISION ARToolKit { PUBLISHED: static ARToolKit *make(NodePath camera, const Filename ¶mfile, double markersize); diff --git a/panda/src/vision/config_vision.cxx b/panda/src/vision/config_vision.cxx new file mode 100644 index 0000000000..6b36d1aed1 --- /dev/null +++ b/panda/src/vision/config_vision.cxx @@ -0,0 +1,61 @@ +// Filename: config_vision.cxx +// Created by: pro-rsoft (07Nov09) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#include "config_vision.h" +#include "openCVTexture.h" +#include "webcamVideo.h" + +#include "pandaSystem.h" +#include "texturePool.h" +#include "dconfig.h" + +Configure(config_vision); +NotifyCategoryDef(vision, ""); + +ConfigureFn(config_vision) { + init_libvision(); +} + +//////////////////////////////////////////////////////////////////// +// Function: init_libvision +// Description: Initializes the library. This must be called at +// least once before any of the functions or classes in +// this library can be used. Normally it will be +// called by the static initializers and need not be +// called explicitly, but special cases exist. +//////////////////////////////////////////////////////////////////// +void +init_libvision() { + static bool initialized = false; + if (initialized) { + return; + } + initialized = true; + + WebcamVideo::init_type(); + +#ifdef HAVE_OPENCV + OpenCVTexture::init_type(); + OpenCVTexture::register_with_read_factory(); + + PandaSystem *ps = PandaSystem::get_global_ptr(); + ps->add_system("OpenCV"); + + TexturePool *ts = TexturePool::get_global_ptr(); +#ifndef HAVE_FFMPEG + ts->register_texture_type(OpenCVTexture::make_texture, "avi"); +#endif +#endif +} + diff --git a/panda/src/vision/config_vision.h b/panda/src/vision/config_vision.h new file mode 100644 index 0000000000..eb1d4a6b17 --- /dev/null +++ b/panda/src/vision/config_vision.h @@ -0,0 +1,26 @@ +// Filename: config_vision.h +// Created by: pro-rsoft (07Nov09) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +#ifndef CONFIG_VISION_H +#define CONFIG_VISION_H + +#include "pandabase.h" +#include "notifyCategoryProxy.h" + +NotifyCategoryDecl(vision, EXPCL_VISION, EXPTP_VISION); + +extern EXPCL_VISION void init_libvision(); + +#endif + diff --git a/panda/src/grutil/openCVTexture.I b/panda/src/vision/openCVTexture.I similarity index 100% rename from panda/src/grutil/openCVTexture.I rename to panda/src/vision/openCVTexture.I diff --git a/panda/src/grutil/openCVTexture.cxx b/panda/src/vision/openCVTexture.cxx similarity index 98% rename from panda/src/grutil/openCVTexture.cxx rename to panda/src/vision/openCVTexture.cxx index 189eb35075..b0ae60705f 100644 --- a/panda/src/grutil/openCVTexture.cxx +++ b/panda/src/vision/openCVTexture.cxx @@ -18,7 +18,7 @@ #include "openCVTexture.h" #include "clockObject.h" #include "config_gobj.h" -#include "config_grutil.h" +#include "config_vision.h" #include "bamReader.h" #include "bamCacheRecord.h" @@ -156,8 +156,8 @@ do_reconsider_video_properties(const OpenCVTexture::VideoStream &stream, if (stream.is_from_file()) { frame_rate = cvGetCaptureProperty(stream._capture, CV_CAP_PROP_FPS); num_frames = (int)cvGetCaptureProperty(stream._capture, CV_CAP_PROP_FRAME_COUNT); - if (grutil_cat.is_debug()) { - grutil_cat.debug() + if (vision_cat.is_debug()) { + vision_cat.debug() << "Loaded " << stream._filename << ", " << num_frames << " frames at " << frame_rate << " fps\n"; } @@ -173,8 +173,8 @@ do_reconsider_video_properties(const OpenCVTexture::VideoStream &stream, y_size = up_to_power_2(height); } - if (grutil_cat.is_debug()) { - grutil_cat.debug() + if (vision_cat.is_debug()) { + vision_cat.debug() << "Video stream is " << width << " by " << height << " pixels; fitting in texture " << x_size << " by " << y_size << " texels.\n"; @@ -188,7 +188,7 @@ do_reconsider_video_properties(const OpenCVTexture::VideoStream &stream, if (_loaded_from_image && (get_video_width() != width || get_video_height() != height || get_num_frames() != num_frames || get_frame_rate() != frame_rate)) { - grutil_cat.error() + vision_cat.error() << "Video properties have changed for texture " << get_name() << " level " << z << ".\n"; return false; @@ -238,7 +238,7 @@ update_frame(int frame) { //////////////////////////////////////////////////////////////////// void OpenCVTexture:: update_frame(int frame, int z) { - grutil_cat.spam() << "Updating OpenCVTexture page " << z << "\n"; + vision_cat.spam() << "Updating OpenCVTexture page " << z << "\n"; VideoPage &page = _pages[z]; if (page._color.is_valid() || page._alpha.is_valid()) { do_modify_ram_image(); @@ -332,13 +332,13 @@ do_read_one(const Filename &fullpath, const Filename &alpha_fullpath, VideoPage &page = modify_page(z); if (!page._color.read(fullpath)) { - grutil_cat.error() + vision_cat.error() << "OpenCV couldn't read " << fullpath << " as video.\n"; return false; } if (!alpha_fullpath.empty()) { if (!page._alpha.read(alpha_fullpath)) { - grutil_cat.error() + vision_cat.error() << "OpenCV couldn't read " << alpha_fullpath << " as video.\n"; page._color.clear(); return false; diff --git a/panda/src/grutil/openCVTexture.h b/panda/src/vision/openCVTexture.h similarity index 98% rename from panda/src/grutil/openCVTexture.h rename to panda/src/vision/openCVTexture.h index 40de158a30..4ef777ba7a 100644 --- a/panda/src/grutil/openCVTexture.h +++ b/panda/src/vision/openCVTexture.h @@ -31,7 +31,7 @@ // with its source taken from an .avi file or from a // camera input. //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA_GRUTIL OpenCVTexture : public VideoTexture { +class EXPCL_VISION OpenCVTexture : public VideoTexture { PUBLISHED: OpenCVTexture(const string &name = string()); protected: diff --git a/panda/src/vision/vision_composite1.cxx b/panda/src/vision/vision_composite1.cxx new file mode 100644 index 0000000000..db78df9d67 --- /dev/null +++ b/panda/src/vision/vision_composite1.cxx @@ -0,0 +1,6 @@ +#include "arToolKit.cxx" +#include "config_vision.cxx" +#include "openCVTexture.cxx" +#include "webcamVideo.cxx" +#include "webcamVideoDS.cxx" + diff --git a/panda/src/movies/webcamVideo.I b/panda/src/vision/webcamVideo.I similarity index 100% rename from panda/src/movies/webcamVideo.I rename to panda/src/vision/webcamVideo.I diff --git a/panda/src/movies/webcamVideo.cxx b/panda/src/vision/webcamVideo.cxx similarity index 100% rename from panda/src/movies/webcamVideo.cxx rename to panda/src/vision/webcamVideo.cxx diff --git a/panda/src/movies/webcamVideo.h b/panda/src/vision/webcamVideo.h similarity index 96% rename from panda/src/movies/webcamVideo.h rename to panda/src/vision/webcamVideo.h index 64571d6cf4..ad0f5e834e 100644 --- a/panda/src/movies/webcamVideo.h +++ b/panda/src/vision/webcamVideo.h @@ -22,7 +22,7 @@ // Description : Allows you to open a webcam or other video capture // device as a video stream. //////////////////////////////////////////////////////////////////// -class EXPCL_PANDA_MOVIES WebcamVideo : public MovieVideo { +class EXPCL_VISION WebcamVideo : public MovieVideo { PUBLISHED: virtual ~WebcamVideo(); diff --git a/panda/src/movies/webcamVideoDS.cxx b/panda/src/vision/webcamVideoDS.cxx similarity index 100% rename from panda/src/movies/webcamVideoDS.cxx rename to panda/src/vision/webcamVideoDS.cxx