Lines Matching +full:p +full:- +full:finally
1 /* SV module -- interface to the Indigo video board */
6 -- user beware! */
32 /* Set a SV-specific error from svideo_errno and return NULL */
52 (int)(self->ob_info.width * self->ob_info.height * factor)))) in svc_conversion()
61 (*function)((boolean)invert, self->ob_capture, in svc_conversion()
63 self->ob_info.width, self->ob_info.height); in svc_conversion()
75 if (self->ob_info.format != SV_YUV411_FRAMES) { in svc_YUVtoYUV422DC()
85 if (self->ob_info.format != SV_YUV411_FRAMES) { in svc_YUVtoYUV422DC_quarter()
96 if (self->ob_info.format != SV_YUV411_FRAMES) { in svc_YUVtoYUV422DC_sixteenth()
107 switch (self->ob_info.format) { in svc_YUVtoRGB()
121 if (self->ob_info.format != SV_RGB8_FRAMES) { in svc_RGB8toRGB32()
131 if (self->ob_info.format != SV_RGB8_FRAMES) { in svc_InterleaveFields()
147 if (self->ob_info.format != SV_RGB8_FRAMES) { in svc_GetFields()
152 fieldsize = self->ob_info.width * self->ob_info.height / 2; in svc_GetFields()
153 obcapture = (char*)self->ob_capture; in svc_GetFields()
156 goto finally; in svc_GetFields()
159 goto finally; in svc_GetFields()
162 finally: in svc_GetFields()
174 if (!self->ob_mustunlock) { in svc_UnlockCaptureData()
179 if (svUnlockCaptureData(self->ob_svideo->ob_svideo, self->ob_capture)) in svc_UnlockCaptureData()
182 self->ob_mustunlock = 0; in svc_UnlockCaptureData()
199 lrectwrite(x1, x2, y1, y2, (unsigned long *) self->ob_capture); in svc_lrectwrite()
224 size = self->ob_info.width * self->ob_info.height; in svc_writefile()
226 if (fwrite(self->ob_capture, sizeof(long), size, fp) != size) { in svc_writefile()
244 if (svFindVisibleRegion(self->ob_svideo->ob_svideo, in svc_FindVisibleRegion()
245 self->ob_capture, &visible, in svc_FindVisibleRegion()
246 self->ob_info.width)) in svc_FindVisibleRegion()
254 return newcaptureobject(self->ob_svideo, visible, 0); in svc_FindVisibleRegion()
277 if (self->ob_capture != NULL) { in capture_dealloc()
278 if (self->ob_mustunlock) in capture_dealloc()
279 (void)svUnlockCaptureData(self->ob_svideo->ob_svideo, in capture_dealloc()
280 self->ob_capture); in capture_dealloc()
281 self->ob_capture = NULL; in capture_dealloc()
282 Py_CLEAR(self->ob_svideo); in capture_dealloc()
311 captureobject *p; in newcaptureobject() local
313 p = PyObject_New(captureobject, &Capturetype); in newcaptureobject()
314 if (p == NULL) in newcaptureobject()
316 p->ob_svideo = self; in newcaptureobject()
318 p->ob_capture = ptr; in newcaptureobject()
319 p->ob_mustunlock = mustunlock; in newcaptureobject()
320 p->ob_info = self->ob_info; in newcaptureobject()
321 return (PyObject *) p; in newcaptureobject()
334 if (svGetCaptureData(self->ob_svideo, &ptr, &fieldID)) in sv_GetCaptureData()
359 if (svBindGLWindow(self->ob_svideo, wid, mode)) in sv_BindGLWindow()
373 if (svEndContinuousCapture(self->ob_svideo)) in sv_EndContinuousCapture()
388 v = svIsVideoDisplayed(self->ob_svideo); in sv_IsVideoDisplayed()
389 if (v == -1) in sv_IsVideoDisplayed()
404 if (svOutputOffset(self->ob_svideo, x_offset, y_offset)) in sv_OutputOffset()
419 if (svPutFrame(self->ob_svideo, buffer)) in sv_PutFrame()
437 if (svQuerySize(self->ob_svideo, w, h, &rw, &rh)) in sv_QuerySize()
452 if (svSetSize(self->ob_svideo, w, h)) in sv_SetSize()
466 if (svSetStdDefaults(self->ob_svideo)) in sv_SetStdDefaults()
482 if (svUseExclusive(self->ob_svideo, onoff, mode)) in sv_UseExclusive()
498 if (svWindowOffset(self->ob_svideo, x_offset, y_offset)) in sv_WindowOffset()
532 if (svQueryCaptureBufferSize(self->ob_svideo, &info, &bytes)) { in sv_CaptureBurst()
534 goto finally; in sv_CaptureBurst()
538 goto finally; in sv_CaptureBurst()
540 /* XXX -- need to do something about the bitvector */ in sv_CaptureBurst()
544 goto finally; in sv_CaptureBurst()
546 if (svCaptureBurst(self->ob_svideo, &info, str, bitvector)) { in sv_CaptureBurst()
548 goto finally; in sv_CaptureBurst()
555 goto finally; in sv_CaptureBurst()
559 goto finally; in sv_CaptureBurst()
562 goto finally; in sv_CaptureBurst()
575 goto finally; in sv_CaptureBurst()
587 finally: in sv_CaptureBurst()
614 if (svQueryCaptureBufferSize(self->ob_svideo, &info, &bytes)) in sv_CaptureOneFrame()
622 goto finally; in sv_CaptureOneFrame()
624 if (svCaptureOneFrame(self->ob_svideo, format, &width, &height, str)) { in sv_CaptureOneFrame()
626 goto finally; in sv_CaptureOneFrame()
631 finally: in sv_CaptureOneFrame()
646 if (svInitContinuousCapture(self->ob_svideo, &info)) in sv_InitContinuousCapture()
649 self->ob_info = info; in sv_InitContinuousCapture()
678 goto finally; in sv_LoadMap()
682 goto finally; in sv_LoadMap()
687 goto finally; in sv_LoadMap()
691 goto finally; in sv_LoadMap()
699 goto finally; in sv_LoadMap()
703 if (svLoadMap(self->ob_svideo, maptype, mapp)) { in sv_LoadMap()
705 goto finally; in sv_LoadMap()
711 finally: in sv_LoadMap()
722 if (svCloseVideo(self->ob_svideo)) in sv_CloseVideo()
725 self->ob_svideo = NULL; in sv_CloseVideo()
758 goto finally; in doParams()
762 goto finally; in doParams()
766 value was -1?! in doParams()
768 if (PVbuffer[i] == -1 && PyErr_Occurred()) in doParams()
769 goto finally; in doParams()
772 if ((*func)(self->ob_svideo, PVbuffer, length)) { in doParams()
774 goto finally; in doParams()
781 goto finally; in doParams()
788 finally: in doParams()
886 if (self->ob_svideo != NULL) in svideo_dealloc()
887 (void) svCloseVideo(self->ob_svideo); in svideo_dealloc()
915 svobject *p; in newsvobject() local
917 p = PyObject_New(svobject, &Svtype); in newsvobject()
918 if (p == NULL) in newsvobject()
920 p->ob_svideo = svp; in newsvobject()
921 p->ob_info.format = 0; in newsvobject()
922 p->ob_info.size = 0; in newsvobject()
923 p->ob_info.width = 0; in newsvobject()
924 p->ob_info.height = 0; in newsvobject()
925 p->ob_info.samplingrate = 0; in newsvobject()
926 return (PyObject *) p; in newsvobject()