]> rtime.felk.cvut.cz Git - opencv.git/commitdiff
generated CvCapture
authorjamesb <jamesb@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
Wed, 10 Mar 2010 00:13:11 +0000 (00:13 +0000)
committerjamesb <jamesb@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
Wed, 10 Mar 2010 00:13:11 +0000 (00:13 +0000)
git-svn-id: https://code.ros.org/svn/opencv/trunk@2768 73c94f0f-984f-4a5f-82bc-2d8db8d8ee08

opencv/interfaces/python/cv.cpp
opencv/interfaces/python/gen.py

index 0243675bc2c973b623e3eb236cbd2e9c1d1e59df..5cc1e62d2858b54e972a2b101edec7a630f7fdca 100644 (file)
@@ -88,11 +88,6 @@ struct cvlineiterator_t {
   int type;
 };
 
-struct cvcapture_t {
-  PyObject_HEAD
-  CvCapture *a;
-};
-
 typedef IplImage ROIplImage;
 
 struct cvmoments_t {
@@ -925,29 +920,6 @@ static void memtrack_specials(void)
 
 /************************************************************************/
 
-/* cvcapture */
-
-static void cvcapture_dealloc(PyObject *self)
-{
-  cvcapture_t *pi = (cvcapture_t*)self;
-  cvReleaseCapture(&(pi->a));
-  PyObject_Del(self);
-}
-
-static PyTypeObject cvcapture_Type = {
-  PyObject_HEAD_INIT(&PyType_Type)
-  0,                                      /*size*/
-  MODULESTR".cvcapture",                  /*name*/
-  sizeof(cvcapture_t),                    /*basicsize*/
-};
-
-static void cvcapture_specials(void)
-{
-  cvcapture_Type.tp_dealloc = cvcapture_dealloc;
-}
-
-/************************************************************************/
-
 /* cvmoments */
 
 static PyTypeObject cvmoments_Type = {
@@ -2024,17 +1996,6 @@ static int convert_to_floatPTRPTR(PyObject *o, float*** dst, const char *name =
   return 1;
 }
 
-static int convert_to_CvCapturePTR(PyObject *o, CvCapture** dst, const char *name = "no_name")
-{
-  if (PyType_IsSubtype(o->ob_type, &cvcapture_Type)) {
-    *dst = ((cvcapture_t*)o)->a;
-    return 1;
-  } else {
-    (*dst) = (CvCapture*)NULL;
-    return failmsg("Expected CvCapture for argument '%s'", name);
-  }
-}
-
 static int convert_to_CvMomentsPTR(PyObject *o, CvMoments** dst, const char *name = "no_name")
 {
   if (PyType_IsSubtype(o->ob_type, &cvmoments_Type)) {
@@ -2415,13 +2376,6 @@ static PyObject *FROM_CvSeqOfCvSURFDescriptorPTR(CvSeqOfCvSURFDescriptor *r)
   return pr;
 }
 
-static PyObject *FROM_CvCapturePTR(CvCapture *r)
-{
-  cvcapture_t *c = PyObject_NEW(cvcapture_t, &cvcapture_Type);
-  c->a = r;
-  return (PyObject*)c;
-}
-
 typedef CvPoint2D32f CvPoint2D32f_4[4];
 static PyObject *FROM_CvPoint2D32f_4(CvPoint2D32f* r)
 {
@@ -3781,7 +3735,6 @@ void initcv()
 
   cvSetErrMode(CV_ErrModeParent);
 
-  MKTYPE(cvcapture);
   MKTYPE(cvcontourtree);
   MKTYPE(cvfont);
   MKTYPE(cvhaarclassifiercascade);
index 5c79928db88d779ab72112ce7a51b0a0aff564de..c8356c2ee91ce51e457c09ff72ed16387ec45197 100644 (file)
@@ -423,6 +423,7 @@ objects = [
         "anchorX" : 'i',
         "anchorY" : 'i',
     }),
+    ( 'CvCapture', {}),
     ( 'CvPOSITObject', {}),
     ( 'CvVideoWriter', {}),
     ( 'CvStereoBMState', {