xpra icon
Bug tracker and wiki

Ticket #1223: patch-xpra_codecs_v4l2_pusher.c

File patch-xpra_codecs_v4l2_pusher.c, 1.5 KB (added by Thomas Klausner, 4 years ago)

Patch for the generated file pusher.c to make it compile on NetBSD.

Line 
1$NetBSD$
2
3--- xpra/codecs/v4l2/pusher.c.orig      2016-06-06 12:46:23.933527251 +0000
4+++ xpra/codecs/v4l2/pusher.c
5@@ -277,7 +277,12 @@ static CYTHON_INLINE float __PYX_NAN() {
6 #include "string.h"
7 #include "../../buffers/buffers.h"
8 #include "sys/ioctl.h"
9+#ifdef __Linux__
10 #include "linux/videodev2.h"
11+#endif
12+#ifdef __NetBSD__
13+#include <sys/videoio.h>
14+#endif
15 #ifdef _OPENMP
16 #include <omp.h>
17 #endif /* _OPENMP */
18@@ -6849,6 +6854,7 @@ PyMODINIT_FUNC PyInit_pusher(void)
19   if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_n_s_ALTERNATE) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
20   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21 
22+#ifdef V4L2_FIELD_INTERLACED_TB
23   /* "xpra/codecs/v4l2/pusher.pyx":164
24  *     V4L2_FIELD_SEQ_BT               : "SEQ BT",
25  *     V4L2_FIELD_ALTERNATE            : "ALTERNATE",
26@@ -6860,7 +6866,9 @@ PyMODINIT_FUNC PyInit_pusher(void)
27   __Pyx_GOTREF(__pyx_t_2);
28   if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_kp_s_INTERLACED_TB) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
29   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30+#endif
31 
32+#ifdef V4L2_FIELD_INTERLACED_BT
33   /* "xpra/codecs/v4l2/pusher.pyx":165
34  *     V4L2_FIELD_ALTERNATE            : "ALTERNATE",
35  *     V4L2_FIELD_INTERLACED_TB        : "INTERLACED TB",
36@@ -6874,6 +6882,7 @@ PyMODINIT_FUNC PyInit_pusher(void)
37   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38   if (PyDict_SetItem(__pyx_d, __pyx_n_s_FIELD_STR, __pyx_t_1) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
39   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40+#endif
41 
42   /* "xpra/codecs/v4l2/pusher.pyx":168
43  * }