xlat changes, layout changes
[goodguy/history.git] / cinelerra-5.1 / cinelerra / devicev4l2base.C
index efc3c0616fdd7ceac574369f5242aa050098fa88..b2f332b967c9bc1a84673679045f33fea66eb2ac 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 
+#ifdef HAVE_VIDEO4LINUX2
 
 #include "bctimer.h"
 #include "channel.h"
@@ -41,9 +42,7 @@
 #include <errno.h>
 #include <fcntl.h>
 
-#ifdef HAVE_VIDEO4LINUX2
 #include <linux/videodev2.h>
-#endif
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 
@@ -165,8 +164,8 @@ DeviceV4L2Put::~DeviceV4L2Put()
                done = 1;
                buffer_lock->unlock();
                Thread::cancel();
-               Thread::join();
        }
+       Thread::join();
        delete buffer_lock;
        delete putq;
 }
@@ -382,24 +381,28 @@ int DeviceV4L2Base::v4l2_open(int color_model)
                        best_format = cmodel_to_device(color_model);
                        break;
                }
-               printf(_("DeviceV4L2Base::v4l2_open "
-                       " attempting format %4.4s\n"), (char *)&best_format);
+               printf("DeviceV4L2Base::v4l2_open ");
+               printf(_(" attempting format %4.4s\n"),
+                       (char *)&best_format);
        }
        if(driver == VIDEO4LINUX2JPEG && best_format != V4L2_PIX_FMT_MJPEG)
        {
-               printf(_("DeviceV4L2Base::v4l2_open jpeg driver"
-                       " and best_format not mjpeg (%4.4s)\n"), (char *)&best_format);
+               printf("DeviceV4L2Base::v4l2_open ");
+               printf(_("jpeg driver and best_format not mjpeg (%4.4s)\n"),
+                       (char *)&best_format);
                return 1;
        }
        if(driver == VIDEO4LINUX2MPEG && best_format != V4L2_PIX_FMT_MPEG)
        {
-               printf(_("DeviceV4L2Base::v4l2_open mpeg driver"
-                       " and best_format not mpeg (%4.4s)\n"),(char *)&best_format);
+               printf("DeviceV4L2Base::v4l2_open ");
+               printf(_("mpeg driver and best_format not mpeg (%4.4s)\n"),
+                       (char *)&best_format);
                return 1;
        }
        if(config_width != best_width || config_height != best_height)
        {
-               printf(_("DeviceV4L2Base::v4l2_open  config geom %dx%d != %dx%d best_geom\n"),
+               printf("DeviceV4L2Base::v4l2_open ");
+               printf(_("config geom %dx%d != %dx%d best_geom\n"),
                        config_width, config_height, best_width, best_height);
        }
 
@@ -709,8 +712,8 @@ void DeviceV4L2Base::close_dev()
                {
                        done = 1;
                        Thread::cancel();
-                       Thread::join();
                }
+               Thread::join();
                if(put_thread)
                {
                        delete put_thread;
@@ -949,3 +952,4 @@ void DeviceV4L2Base::run()
        }
 }
 
+#endif