libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcvd-members] libcvd cvd/OSX/qtbuffer.h cvd_src/OSX/qtbuffer.cpp


From: Georg Klein
Subject: [libcvd-members] libcvd cvd/OSX/qtbuffer.h cvd_src/OSX/qtbuffer.cpp
Date: Mon, 14 Jan 2008 17:47:15 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Georg Klein <georgklein>        08/01/14 17:47:15

Modified files:
        cvd/OSX        : qtbuffer.h 
        cvd_src/OSX    : qtbuffer.cpp 

Log message:
        Added a settingsdialog option to QTBuffer, so that a settings dialog 
appears
        before video capture starts. This lets you choose video input, sharpness
        etc. Since I have no idea how to program OSX, this a bit broken, in that
        the supposedly modal dialog appears behind other windows, and cannot be
        moved or raised. Sweet!

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/OSX/qtbuffer.h?cvsroot=libcvd&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/OSX/qtbuffer.cpp?cvsroot=libcvd&r1=1.2&r2=1.3

Patches:
Index: cvd/OSX/qtbuffer.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/OSX/qtbuffer.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- cvd/OSX/qtbuffer.h  7 Dec 2007 15:02:08 -0000       1.2
+++ cvd/OSX/qtbuffer.h  14 Jan 2008 17:47:15 -0000      1.3
@@ -95,7 +95,7 @@
                * @param mode color palette to use (not supported yet)
                * @param which camera to open (not supported yet)
                */
-        RawQT(const ImageRef & size, unsigned int mode, unsigned int num = 0);
+      RawQT(const ImageRef & size, unsigned int mode, unsigned int num = 0, 
bool showSettingsDialog=false);
         virtual ~RawQT();
         
                /** Get the width in pixels of the captured frames. */
@@ -135,7 +135,7 @@
 public:
     /// Construct a video buffer
     /// @param dev file name of the device to use
-    QTBuffer(const ImageRef & size, unsigned int number = 0 ) : RawQT( size, 
0, number ) {}
+    QTBuffer(const ImageRef & size, unsigned int number = 0, bool 
showSettingsDialog=false ) : RawQT( size, 0, number, showSettingsDialog ) {}
        
     virtual ImageRef size()
     {

Index: cvd_src/OSX/qtbuffer.cpp
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/OSX/qtbuffer.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- cvd_src/OSX/qtbuffer.cpp    7 Dec 2007 15:02:08 -0000       1.2
+++ cvd_src/OSX/qtbuffer.cpp    14 Jan 2008 17:47:15 -0000      1.3
@@ -85,7 +85,7 @@
        return err;
 }
 
-RawQT::RawQT(const ImageRef & size, unsigned int mode, unsigned int num) : 
pimpl(NULL) 
+RawQT::RawQT(const ImageRef & size, unsigned int mode, unsigned int num, bool 
showSettingsDialog) : pimpl(NULL) 
 {
        if( !RawQTPimpl::isInitialized ){
                EnterMovies();
@@ -129,6 +129,14 @@
        if(err != noErr){
                throw Exceptions::QTBUFFER::DeviceOpen("SGNewChannel returned 
error");
        }
+       
+       if(showSettingsDialog)
+         {
+           err = SGSettingsDialog(pimpl->seqGrab, pimpl->chanVideo, 0, NULL, 
0L, NULL, 0); 
+           if(err != noErr)
+             throw Exceptions::QTBUFFER::DeviceOpen("SGSettingsDialog returned 
an error");
+         }
+
     try {
            err = SGSetChannelBounds(pimpl->chanVideo, &pimpl->bounds);
            if (err != noErr) {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]