Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoWin32DirectShow
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22005
Modified Files:
videoWin32DirectShow.cpp libARvideo.vcproj libARvideo.dsp
Log Message:
Merge DSVideoLib-0.0.8b.
Index: libARvideo.dsp
===================================================================
RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoWin32DirectShow/libARvideo.dsp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** libARvideo.dsp 4 Nov 2004 08:51:57 -0000 1.1.1.1
--- libARvideo.dsp 23 Jul 2005 00:01:38 -0000 1.2
***************
*** 26,30 ****
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
! CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
--- 26,30 ----
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
! CPP=xicl6.exe
MTL=midl.exe
RSC=rc.exe
***************
*** 44,48 ****
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBARVIDEO_EXPORTS" /YX /FD /c
! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /I "..\..\..\DSVideoLib\src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBARVIDEO_EXPORTS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
--- 44,48 ----
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBARVIDEO_EXPORTS" /YX /FD /c
! # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /I "..\..\..\DSVL\src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBARVIDEO_EXPORTS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
***************
*** 53,59 ****
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
! LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
! # ADD LINK32 DSVideoLib.lib comsupp.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /nodefaultlib:"libc.lib" /out:"..\..\..\bin\libARvideo.dll" /implib:"..\..\..\lib\libARvideo.lib" /libpath:"..\..\..\lib" /libpath:"..\..\..\DSVideoLib\lib.vc60"
# SUBTRACT LINK32 /pdb:none /nodefaultlib
--- 53,59 ----
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
! LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
! # ADD LINK32 DSVL.lib comsupp.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /nodefaultlib:"libc.lib" /out:"..\..\..\bin\libARvideo.dll" /implib:"..\..\..\lib\libARvideo.lib" /libpath:"..\..\..\lib" /libpath:"..\..\..\DSVL\lib"
# SUBTRACT LINK32 /pdb:none /nodefaultlib
***************
*** 72,76 ****
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBARVIDEO_EXPORTS" /YX /FD /GZ /c
! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\DSVideoLib\src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBARVIDEO_EXPORTS" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
--- 72,76 ----
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBARVIDEO_EXPORTS" /YX /FD /GZ /c
! # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\include" /I "..\..\..\DSVL\src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBARVIDEO_EXPORTS" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
***************
*** 81,87 ****
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
! LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
! # ADD LINK32 DSVideoLibd.lib comsupp.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"libcd.lib" /out:"..\..\..\bin\libARvideod.dll" /implib:"..\..\..\lib\libARvideod.lib" /pdbtype:sept /libpath:"..\..\..\lib" /libpath:"..\..\..\DSVideoLib\lib.vc60"
# SUBTRACT LINK32 /pdb:none /nodefaultlib
--- 81,87 ----
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
! LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
! # ADD LINK32 DSVLd.lib comsupp.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"libcd.lib" /out:"..\..\..\bin\libARvideod.dll" /implib:"..\..\..\lib\libARvideod.lib" /pdbtype:sept /libpath:"..\..\..\lib" /libpath:"..\..\..\DSVL\lib"
# SUBTRACT LINK32 /pdb:none /nodefaultlib
Index: libARvideo.vcproj
===================================================================
RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoWin32DirectShow/libARvideo.vcproj,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** libARvideo.vcproj 4 Nov 2004 08:51:57 -0000 1.1.1.1
--- libARvideo.vcproj 23 Jul 2005 00:01:38 -0000 1.2
***************
*** 20,29 ****
Name="VCCLCompilerTool"
Optimization="0"
! AdditionalIncludeDirectories="$(ProjectDir)/../../../include;$(ProjectDir)/../../../DSVideoLib/src"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBARVIDEO_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
BrowseInformation="1"
- WarningLevel="3"
DebugInformationFormat="3"/>
<Tool
--- 20,28 ----
Name="VCCLCompilerTool"
Optimization="0"
! AdditionalIncludeDirectories=""$(ProjectDir)../../../include";"$(ProjectDir)../../../DSVL/src""
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBARVIDEO_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
BrowseInformation="1"
DebugInformationFormat="3"/>
<Tool
***************
*** 31,38 ****
<Tool
Name="VCLinkerTool"
! AdditionalDependencies="DsVideoLibd.lib comsupp.lib"
! OutputFile="$(ProjectDir)/../../../bin/$(ProjectName)d.dll"
LinkIncremental="0"
! AdditionalLibraryDirectories="$(ProjectDir)/../../../DsVideoLib/lib.vc70/"
GenerateDebugInformation="TRUE"
ImportLibrary="$(ProjectDir)..\..\$(ProjectName)d.lib"/>
--- 30,37 ----
<Tool
Name="VCLinkerTool"
! AdditionalDependencies="DSVLd.lib comsupp.lib"
! OutputFile="$(ProjectDir)../../../bin/$(ProjectName)d.dll"
LinkIncremental="0"
! AdditionalLibraryDirectories=""$(ProjectDir)../../../DSVL/lib/""
GenerateDebugInformation="TRUE"
ImportLibrary="$(ProjectDir)..\..\$(ProjectName)d.lib"/>
***************
*** 69,73 ****
InlineFunctionExpansion="1"
FavorSizeOrSpeed="1"
! AdditionalIncludeDirectories="$(ProjectDir)/../../../include;$(ProjectDir)/../../../DSVideoLib/src"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBARVIDEO_EXPORTS"
RuntimeLibrary="2"/>
--- 68,72 ----
InlineFunctionExpansion="1"
FavorSizeOrSpeed="1"
! AdditionalIncludeDirectories=""$(ProjectDir)../../../include";"$(ProjectDir)../../../DSVL/src""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBARVIDEO_EXPORTS"
RuntimeLibrary="2"/>
***************
*** 76,82 ****
<Tool
Name="VCLinkerTool"
! AdditionalDependencies="DsVideoLib.lib comsupp.lib"
! OutputFile="$(ProjectDir)/../../../bin/$(ProjectName).dll"
! AdditionalLibraryDirectories="$(ProjectDir)/../../../DsVideoLib/lib.vc70/"
ImportLibrary="$(ProjectDir)..\..\$(ProjectName).lib"/>
<Tool
--- 75,81 ----
<Tool
Name="VCLinkerTool"
! AdditionalDependencies="DSVL.lib comsupp.lib"
! OutputFile="$(ProjectDir)../../../bin/$(ProjectName).dll"
! AdditionalLibraryDirectories=""$(ProjectDir)../../../DSVL/lib/""
ImportLibrary="$(ProjectDir)..\..\$(ProjectName).lib"/>
<Tool
Index: videoWin32DirectShow.cpp
===================================================================
RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoWin32DirectShow/videoWin32DirectShow.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** videoWin32DirectShow.cpp 4 Nov 2004 08:52:00 -0000 1.1.1.1
--- videoWin32DirectShow.cpp 23 Jul 2005 00:01:38 -0000 1.2
***************
*** 1,41 ****
- /* ========================================================================
- * PROJECT: DirectShow Video Processing Library
- * FILE: ARToolkit 2.6x WIN32/DirectShow video input
- * ========================================================================
- * Author: Thomas Pintaric, Vienna University of Technology
- * Contact: pin...@im... http://ims.tuwien.ac.at/~thomas
- * =======================================================================
- *
- * Copyright (C) 2003 Vienna University of Technology
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * For further information please contact Thomas Pintaric under
- * <pin...@im...> or write to Thomas Pintaric,
- * Vienna University of Technology, Favoritenstr. 9-11/188, A1040 Vienna,
- * Austria.
- * ========================================================================*/
/*
! * Copyright (c) 2004-2004 Philip Lamb (PRL) ph...@ed.... All rights reserved.
*
* Rev Date Who Changes
* 2.6.8 2004-07-20 PRL Rewrite for ARToolKit 2.68.2
*
*/
! #include "DsVideoLib.h"
! #include <string.h>
#include <AR/video.h>
#include <stdlib.h>
--- 1,45 ----
/*
! ========================================================================
! PROJECT: DirectShow Video Processing Library
! Version: 0.0.8 (05/04/2005)
! ========================================================================
! Author: Thomas Pintaric, Vienna University of Technology
! Contact: pin...@im... http://ims.tuwien.ac.at/~thomas
! =======================================================================
!
! Copyright (C) 2005 Vienna University of Technology
!
! This library is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License
! as published by the Free Software Foundation; either version 2
! of the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; if not, write to the Free Software
! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
! USA.
!
! For further information please contact Thomas Pintaric under
! <pin...@im...> or write to Thomas Pintaric,
! Vienna University of Technology, Favoritenstr. 9-11/E188/2, A-1040
! Vienna, Austria.
! ========================================================================
! */
! /*
! * Copyright (c) 2004-2005 Philip Lamb (PRL) ph...@ed.... All rights reserved.
*
* Rev Date Who Changes
* 2.6.8 2004-07-20 PRL Rewrite for ARToolKit 2.68.2
+ * 2.8.0 2004-07-20 PRL Incorporate DSVL-0.0.8b
*
*/
! #include "DSVL.h"
! //#include <string.h>
#include <AR/video.h>
#include <stdlib.h>
***************
*** 45,49 ****
struct _AR2VideoParamT {
! CGraphManager *graphManager;
MemoryBufferHandle g_Handle;
__int64 g_Timestamp; // deprecated, use (g_Handle.t) instead.
--- 49,53 ----
struct _AR2VideoParamT {
! DSVL_VideoSource *graphManager;
MemoryBufferHandle g_Handle;
__int64 g_Timestamp; // deprecated, use (g_Handle.t) instead.
***************
*** 133,248 ****
int ar2VideoDispOption(void)
{
!
! printf("parameter format is either NULL or a list of tokens, separated by commas ","\n");
! printf("\n");
! printf("BINARY TOKENS:\n");
! printf("--------------\n");
! printf("flipH : flip image horizontally (WARNING: non-optimal performance)\n");
! printf("flipV : flip image vertically (WARNING: non-optimal performance)\n");
! printf("showDlg : displays either WDM capture filter's property page or\n");
! printf(" MSDV decoder format dialog (depending on source media type).\n");
! printf(" only applies to WDM_CAP, will be ignored for AVI_FILE\n");
! printf("loopAVI : continuously loops through an AVI file (applies only to AVI_FILE)\n");
! printf("noClock : does not use a Reference Clock to synchronize samples;\n");
! printf(" use this flag for offline post-processing (applies only to AVI_FILE)\n");
! printf("renderSec : render secondary streams (applies only to AVI_FILE)\n");
! printf(" An AVI file can contain an arbitrary number of multiplexed A/V substreams,\n");
! printf(" usually there are at most 2 substreams (1st: video, 2nd: audio).\n");
! printf(" the AVI_FILE input module will only try to render stream 0x00 (assuming that\n");
! printf(" it's video) and ignore the remaning substreams.\n");
! printf(" Use this flag to force IGraphBuilder->Render(IPin*) calls on substreams 1..n\n");
! printf(" DO NOT SET this flag if your AVI file contains more than one video stream\n");
! printf("\n");
! printf("PARAMETRIZED TOKENS:\n");
! printf("--------------------\n");
! printf("inputDevice=? : supported parameters: \n");
! printf(" \"WDM_CAP\" (WDM_VIDEO_CAPTURE_FILTER) use the DirectShow WDM wrapper\n");
! printf(" to obtain live video input from a streaming capture device\n");
! printf(" such as a IEEE 1394 DV camera or USB webcam.\n");
! printf(" OPTIONAL: set deviceName=? and/or ieee1394id=? for better\n");
! printf(" control over the choice of suitable WDM drivers\n");
! printf(" \"AVI_FILE\" (ASYNC_FILE_INPUT_FILTER) use an Asynchronous File Input\n");
! printf(" Filter to read & decode AVI video data\n");
! printf(" NOTE: be sure to specify the input file name by pointing\n");
! printf(" fileName=? to a valid AVI file.\n");
! printf("\n");
! printf(" EXAMPLE: \"inputDevive=WDM_CAP\", or \"inputDevice=AVI_FILE\"\n");
! printf(" DEFAULT: \"WDM_CAP\" will be selected if you omit this token\n");
! printf("\n");
! printf("videoWidth=? : preferred video width, EXAMPLE: \"videoWidth=720\"\n");
! printf(" only applies to WDM_CAP, will be ignored for AVI_FILE\n");
! printf("videoHeight=? : preferred video height, EXAMPLE: \"videoHeight=576\"\n");
! printf(" only applies to WDM_CAP, will be ignored for AVI_FILE\n");
! printf("\n");
! printf("pixelFormat=? : internal pixel format (see PixelFormat.h for supported types)\n");
! printf(" PERFORMANCE WARNING: Be sure to match your IDirect3DTexture/OpenGL texture\n");
! printf(" formats to whatever you specify here, i.e. use\n");
! printf(" PXtoOpenGL(format), PXtoD3D(format) for creating your\n");
! printf(" textures! (see PixelFormat.h for details)\n");
! printf(" EXAMPLE: \"pixelFormat=PIXELFORMAT_RGB32\"\n");
! printf(" NOTE: if you omit the pixelFormat=? token, the global\n");
! printf(" constant (default_PIXELFORMAT, usually PIXELFORMAT_RGB32)\n");
! printf(" will be selected.\n");
! printf("\n");
! printf("friendlyName=? : only applies to WDM_CAP, will be IGNORED if \"inputDevice=WDM_CAP\" is not set.\n");
! printf(" Used to select a preferred WDM device. WILL BE IGNORED IF deviceName=? IS SET.");
! printf(" (WARNING: WDM \"friendly names\" are locale-dependent), i.e. try to match substring <?>\n");
! printf(" with the \"friendly names\" of enumerated DirectShow WDM wrappers (ksproxy.ax).\n");
! printf(" EXAMPLE: \"friendlyName=Microsoft DV Camera\" for IEEE1394 DV devices\n");
! printf(" \"friendlyName=QuickCam\" for Logitech QuickCam\n");
! printf("\n");
! printf("deviceName=? : only applies to WDM_CAP, will be IGNORED if \"inputDevice=WDM_CAP\" is not set.\n");
! printf(" Used to select a preferred WDM device. WILL ALWAYS WILL OVERRIDE friendlyName=?\n");
! printf(" i.e. try to match substring <?> with the \"device names\" of enumerated DirectShow\n");
! printf(" WDM wrappers (ksproxy.ax).\n");
! printf(" Device names look like: \"@device:*:{860BB310-5D01-11d0-BD3B-00A0C911CE86}\n");
! printf(" Use GraphEdit (part of the DirectX SDK, under \\DXSDK\\bin\\DxUtils\\graphedt.exe)\n");
! printf(" to figure out your camera's device name.\n");
! printf(" EXAMPLE: \"deviceName=1394#unibrain&fire-i_1.2#4510000061431408\n");
! printf("\n");
! printf("fileName=? : only applies to AVI_FILE, will be IGNORED if \"inputDevice=AVI_FILE\" is not set.\n");
! printf(" input file name, if just use a file's name (without its full path), the WIN32\n");
! printf(" API fuction SearchPath() (Winbase.h) will be used to locate the file.\n");
! printf(" EXAMPLE: \"fileName=C:\\Some Directory\\Another Directory\\Video.AVI\"\n");
! printf(" \"fileName=video.AVI\" (will succeed if C:\\Some Directory\\Another Directory\\\n");
! printf(" is: * the application's startup directory\n");
! printf(" * the current directory\n");
! printf(" * listed in the PATH environment variable)\n");
! printf("\n");
! printf("ieee1394id=? : only applies to WDM_CAP, will be IGNORED if \"inputDevice=WDM_CAP\" is not set.\n");
! printf(" Unique 64-bit device identifier, as defined by IEEE 1394.\n");
! printf(" Hexadecimal value expected, i.e. \"ieee1394id=437d3b0201460008\"\n");
! printf(" Use /bin/IEEE394_id.exe to determine your camera's ID.\n");
! printf("\n");
! printf("deinterlaceState=? : supported parameters (see VFX_STATE_names[])\n");
! printf(" \"off\" : disable deinterlacing (DEFAULT)\n");
! printf(" \"on\" : force deinterlacing (even for progressive frames) \n");
! printf(" \"auto\" : enable deinterlacing only if \n");
! printf(" (VIDEOINFOHEADER.dwInterlaceFlags & AMINTERLACE_IsInterlaced)\n");
! printf(" WARNING: EXPERIMENTAL FEATURE!\n");
! printf("\n");
! printf("deinterlaceMethod=? : deinterlacing method (see VFxDeinterlaceParam.h for supported modes)\n");
! printf(" supported parameters (see DEINTERLACE_METHOD_names[]):\n");
! printf(" \"blend\" : blend fields (best quality)\n");
! printf(" \"duplicate1\" : duplicate first field\n");
! printf(" \"duplicate2\" : duplicate second field\n");
! printf(" NOTE: omitting this token results in default mode (DEINTERLACE_BLEND) being used.\n");
! printf(" WARNING: EXPERIMENTAL FEATURE!\n");
! printf("\n");
! printf("EXAMPLES:\n");
! printf("\n");
! printf("arVideoOpen(NULL);\n");
! printf("arVideoOpen(\"inputDevice=WDM_CAP,showDlg\");\n");
! printf("arVideoOpen(\"inputDevice=WDM_CAP,flipH,flipV,showDlg\");\n");
! printf("arVideoOpen(\"inputDevice=WDM_CAP,pixelFormat=PIXELFORMAT_RGB24,showDlg\");\n");
! printf("arVideoOpen(\"inputDevice=WDM_CAP,showDlg,deinterlaceState=on,deinterlaceMethod=duplicate1\");\n");
! printf("arVideoOpen(\"inputDevice=WDM_CAP,videoWidth=640,flipH,videoHeight=480,showDlg,deinterlaceState=auto\");\n");
! printf("arVideoOpen(\"inputDevice=WDM_CAP,friendlyName=Microsoft DV Camera,videoWidth=720,videoHeight=480\");\n");
! printf("arVideoOpen(\"inputDevice=WDM_CAP,friendlyName=Logitech,videoWidth=320,videoHeight=240,flipV\");\n");
! printf("arVideoOpen(\"inputDevice=WDM_CAP,friendlyName=Microsoft DV Camera,ieee1394id=437d3b0201460008\");\n");
! printf("arVideoOpen(\"inputDevice=AVI_FILE,fileName=C:\\Some Directory\\Another Directory\\Video.AVI\");\n");
! printf("arVideoOpen(\"inputDevice=AVI_FILE,fileName=Video.AVI,pixelFormat=PIXELFORMAT_RGB24\");\n");
! printf("\n");
!
return (0);
}
--- 137,141 ----
int ar2VideoDispOption(void)
{
! printf("parameter is a file name (e.g. 'config.XML') conforming to the DSVideoLib XML Schema (DsVideoLib.xsd).\n");
return (0);
}
***************
*** 251,255 ****
{
AR2VideoParamT *vid = NULL;
- DS_MEDIA_FORMAT mf;
// Allocate the parameters structure and fill it in.
--- 144,147 ----
***************
*** 259,270 ****
CoInitialize(NULL);
! vid->graphManager = new CGraphManager();
!
! if(FAILED(vid->graphManager->BuildGraph(config))) return(NULL);
! vid->graphManager->GetCurrentMediaFormat(&mf);
! //vid->flip_horizontal = mf.flipH;
! //vid->flip_vertical = mf.flipV;
!
if(FAILED(vid->graphManager->EnableMemoryBuffer())) return(NULL);
--- 151,157 ----
CoInitialize(NULL);
! vid->graphManager = new DSVL_VideoSource();
! if(FAILED(vid->graphManager->BuildGraphFromXMLFile(config))) return(NULL);
if(FAILED(vid->graphManager->EnableMemoryBuffer())) return(NULL);
***************
*** 334,346 ****
int ar2VideoInqSize(AR2VideoParamT *vid, int *x, int *y)
{
- DS_MEDIA_FORMAT mf;
-
if (vid == NULL) return (-1);
if (vid->graphManager == NULL) return(-1);
!
! vid->graphManager->GetCurrentMediaFormat(&mf);
! *x = (int) mf.biWidth;
! *y = (int) mf.biHeight;
!
return (0);
}
--- 221,238 ----
int ar2VideoInqSize(AR2VideoParamT *vid, int *x, int *y)
{
if (vid == NULL) return (-1);
if (vid->graphManager == NULL) return(-1);
!
! long frame_width;
!
! long frame_height;
!
! vid->graphManager->GetCurrentMediaFormat(&frame_width, &frame_height,NULL,NULL);
!
! *x = (int) frame_width;
!
! *y = (int) frame_height;
!
!
return (0);
}
***************
*** 350,377 ****
int ar2VideoInqFlipping(AR2VideoParamT *vid, int *flipH, int *flipV)
{
! DS_MEDIA_FORMAT mf;
!
! if (vid == NULL) return (-1);
! if (vid->graphManager == NULL) return(-1);
!
! vid->graphManager->GetCurrentMediaFormat(&mf);
! *flipH = (int) mf.flipH;
! *flipV = (int) mf.flipV;
! //vid->flipH = (int) mf.flipH;
! //vid->flipV = (int) mf.flipV;
!
! return (0);
}
int ar2VideoInqFreq(AR2VideoParamT *vid, float *fps)
{
- DS_MEDIA_FORMAT mf;
-
if (vid == NULL) return (-1);
if (vid->graphManager == NULL) return(-1);
!
! vid->graphManager->GetCurrentMediaFormat(&mf);
! *fps = (float) mf.frameRate;
!
return (0);
}
--- 242,265 ----
int ar2VideoInqFlipping(AR2VideoParamT *vid, int *flipH, int *flipV)
{
! // DEPRECATED
! // image flipping can be specified in the XML config file, but can
!
! // no longer be queried via arVideoInqFlipping()
!
! return (-1); // not implemented
}
int ar2VideoInqFreq(AR2VideoParamT *vid, float *fps)
{
if (vid == NULL) return (-1);
if (vid->graphManager == NULL) return(-1);
!
! double frames_per_second;
!
! vid->graphManager->GetCurrentMediaFormat(NULL,NULL,&frames_per_second,NULL);
!
! *fps = (float) frames_per_second;
!
!
return (0);
}
|