gephex--main--0.4--patch-1794

[email protected]
Newsgroups gmane.comp.video.gephex.devel
Message-ID <[email protected]>
Archive: [email protected]
New revision: gephex--main--0.4--patch-1794

--
Revision: gephex--main--0.4--patch-1794
Archive: [email protected]
Creator: GePhex <[email protected]>
Date: Wed Sep 29 01:42:43 CEST 2004
Standard-date: 2004-09-28 23:42:43 GMT
Modified-files: modules/src/capturemodule/capturemodule.cpp
    modules/src/capturemodule/v4lcapturedriver.cpp
New-patches: [email protected]/gephex--main--0.4--patch-1794
    [email protected]/gephex--v4lbugfix--0.4--base-0
    [email protected]/gephex--v4lbugfix--0.4--patch-1
    [email protected]/gephex--v4lbugfix--0.4--patch-2
Summary: better error handling in capturemodule(v4l)
Keywords: 

Patches applied:

 * [email protected]/gephex--v4lbugfix--0.4--base-0
   tag of [email protected]/gephex--main--0.4--patch-1791

 * [email protected]/gephex--v4lbugfix--0.4--patch-1
   set black 1x1 frame as output if an error happens

 * [email protected]/gephex--v4lbugfix--0.4--patch-2
   fix error handling in v4l1 capture driver

* added directories

    {arch}/gephex/gephex--v4lbugfix
    {arch}/gephex/gephex--v4lbugfix/gephex--v4lbugfix--0.4
    {arch}/gephex/gephex--v4lbugfix/gephex--v4lbugfix--0.4/[email protected]
    {arch}/gephex/gephex--v4lbugfix/gephex--v4lbugfix--0.4/[email protected]/patch-log

* added files

    {arch}/gephex/gephex--main/gephex--main--0.4/[email protected]/patch-log/patch-1794
    {arch}/gephex/gephex--v4lbugfix/gephex--v4lbugfix--0.4/[email protected]/patch-log/base-0
    {arch}/gephex/gephex--v4lbugfix/gephex--v4lbugfix--0.4/[email protected]/patch-log/patch-1
    {arch}/gephex/gephex--v4lbugfix/gephex--v4lbugfix--0.4/[email protected]/patch-log/patch-2

* modified files

--- orig/modules/src/capturemodule/capturemodule.cpp
+++ mod/modules/src/capturemodule/capturemodule.cpp
@@ -187,9 +187,12 @@
           s_log(0, e.what());
         }
     }
-
+  
+  try
+    {
+      
   if (my->drv == 0 || !my->drv->is_open())
-    return;
+    throw std::runtime_error("no usable capture device");
 
   bool new_frame = true;
   int capture_width;
@@ -211,8 +214,6 @@
   attribs.ysize = ysize;
   framebuffer_changeAttributes(inst->out_result, &attribs);
 
-  try
-    {
       my->drv->decode_frame(inst->out_result->framebuffer,
                             xsize, ysize);
     }


--- orig/modules/src/capturemodule/v4lcapturedriver.cpp
+++ mod/modules/src/capturemodule/v4lcapturedriver.cpp
@@ -89,7 +89,10 @@
     // is it a character device?
     if (!S_ISCHR(stat_buf.st_mode))
       throw std::runtime_error("devicefile is no character device");
-    
+
+    try
+      {
+	
     vd = std::auto_ptr<v4l1_device>(new v4l1_device(device_name));
 
     // get capture dimensions
@@ -156,6 +159,13 @@
   m_pixel_format=videoMMap.format;
 
   m_tmp_img = new uint32_t[m_width*m_height];
+
+      }
+    catch(std::runtime_error& e)
+      {
+	vd.release();
+	throw e;
+      }
   }
 
   void grab_frame(uint_32* frb, int width, int height)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.