pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toxic-git: Drop upstreamed patches and adjust the remaining ones (amendment)



Module Name:	pkgsrc-wip
Committed By:	Mateusz Poszwa <old4%o2.pl@localhost>
Pushed By:	f8l
Date:		Wed Nov 15 20:13:19 2017 +0100
Changeset:	982dbd57a222a0689f6eea3ceb64ee4dbf7bc5fa

Modified Files:
	toxic-git/distinfo
	toxic-git/patches/patch-src_video__device.c

Log Message:
toxic-git: Drop upstreamed patches and adjust the remaining ones (amendment)

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=982dbd57a222a0689f6eea3ceb64ee4dbf7bc5fa

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 toxic-git/distinfo                          |  5 +-
 toxic-git/patches/patch-src_video__device.c | 98 +++++------------------------
 2 files changed, 17 insertions(+), 86 deletions(-)

diffs:
diff --git a/toxic-git/distinfo b/toxic-git/distinfo
index 8a81f6c360..ff825beedb 100644
--- a/toxic-git/distinfo
+++ b/toxic-git/distinfo
@@ -1,7 +1,4 @@
 $NetBSD$
 
-SHA1 (patch-Makefile) = c996154317aedaaa4b3a1bac2a69e4fc1b89173b
 SHA1 (patch-cfg_global__vars.mk) = 5aad096f067f485c439135d3838b8912d1ad7d5e
-SHA1 (patch-src_name__lookup.c) = 212742961593ff970e5d108af2f14b8f93199a76
-SHA1 (patch-src_toxic.c) = 0c466bb767a77f5bf25aeef934ca61e5dc550923
-SHA1 (patch-src_video__device.c) = 982389ffce64ba4e12e5a88a12130637e0ada6e3
+SHA1 (patch-src_video__device.c) = 7659ab20ef26fd65feb0c3f937afb2f54cc9fd30
diff --git a/toxic-git/patches/patch-src_video__device.c b/toxic-git/patches/patch-src_video__device.c
index 7db1aed522..10d9697615 100644
--- a/toxic-git/patches/patch-src_video__device.c
+++ b/toxic-git/patches/patch-src_video__device.c
@@ -2,49 +2,9 @@ $NetBSD$
 
 Do not assume what is not Linux or FreeBSD is OSX.
 
---- src/video_device.c.orig	2017-07-10 22:33:54.000000000 +0000
+--- src/video_device.c.orig	2017-11-15 18:32:08.108030377 +0000
 +++ src/video_device.c
-@@ -30,14 +30,18 @@
- 
- #include <vpx/vpx_image.h>
- 
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__OSX__)
-+#import "osx_video.h"
-+#else
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/mman.h>
- #include <fcntl.h>
-+#ifdef __linux__
- #include <linux/videodev2.h>
--#else /* __OSX__ */
--#import "osx_video.h"
-+#else
-+#include <sys/videoio.h>
-+#endif
- #endif
- 
- #include "line_info.h"
-@@ -65,7 +69,7 @@ typedef struct VideoDevice {
-     void *cb_data;                          /* Data to be passed to callback */
-     int32_t friend_number;                  /* ToxAV friend number */
- 
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
-     int fd;                                 /* File descriptor of video device selected/opened */
-     struct v4l2_format fmt;
-     struct VideoBuffer *buffers;
-@@ -132,7 +136,7 @@ static void yuv420tobgr(uint16_t width, 
-     }
- }
- 
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
- static void yuv422to420(uint8_t *plane_y, uint8_t *plane_u, uint8_t *plane_v,
-                         uint8_t *input, uint16_t width, uint16_t height)
- {
-@@ -170,7 +174,7 @@ static int xioctl(int fh, unsigned long 
+@@ -174,7 +174,7 @@ static int xioctl(int fh, unsigned long 
      return r;
  }
  
@@ -53,11 +13,11 @@ Do not assume what is not Linux or FreeBSD is OSX.
  
  /* Meet devices */
  #ifdef VIDEO
-@@ -181,7 +185,10 @@ VideoDeviceError init_video_devices()
+@@ -185,7 +185,10 @@ VideoDeviceError init_video_devices()
  {
      size[vdt_input] = 0;
  
--#if defined(__linux__) || defined(__FreeBSD__)
+-#if defined(__linux__) || SYSTEM == BSD
 +#if defined(__OSX__)
 +    if( osx_video_init((char**)video_devices_names[vdt_input], &size[vdt_input]) != 0 )
 +        return vde_InternalError;
@@ -65,7 +25,7 @@ Do not assume what is not Linux or FreeBSD is OSX.
  
      for (; size[vdt_input] <= MAX_DEVICES; ++size[vdt_input]) {
          int fd;
-@@ -216,11 +223,6 @@ VideoDeviceError init_video_devices()
+@@ -220,11 +223,6 @@ VideoDeviceError init_video_devices()
          }
      }
  
@@ -77,11 +37,11 @@ Do not assume what is not Linux or FreeBSD is OSX.
  #endif
  
      size[vdt_output] = 1;
-@@ -271,15 +273,15 @@ VideoDeviceError terminate_video_devices
+@@ -275,15 +273,15 @@ VideoDeviceError terminate_video_devices
  VideoDeviceError register_video_device_callback(int32_t friend_number, uint32_t device_idx,
          VideoDataHandleCallback callback, void *data)
  {
--#if defined(__linux__) || defined(__FreeBSD__)
+-#if defined(__linux__) || SYSTEM == BSD
 +#if defined(__OSX__)
  
 -    if ( size[vdt_input] <= device_idx || !video_devices_running[vdt_input][device_idx]
@@ -98,11 +58,11 @@ Do not assume what is not Linux or FreeBSD is OSX.
          return vde_InvalidSelection;
  
  #endif
-@@ -355,7 +357,13 @@ VideoDeviceError open_video_device(Video
+@@ -359,7 +357,13 @@ VideoDeviceError open_video_device(Video
      if ( type == vdt_input ) {
          video_thread_paused = true;
  
--#if defined(__linux__) || defined(__FreeBSD__)
+-#if defined(__linux__) || SYSTEM == BSD
 +#if defined(__OSX__)
 +        if ( osx_video_open_device(selection, &device->video_width, &device->video_height) != 0 ) {
 +            free(device);
@@ -113,7 +73,7 @@ Do not assume what is not Linux or FreeBSD is OSX.
          /* Open selected device */
          char device_address[] = "/dev/videoXX";
          snprintf(device_address + 10, sizeof(device_address) - 10, "%i", selection);
-@@ -482,14 +490,6 @@ VideoDeviceError open_video_device(Video
+@@ -486,14 +490,6 @@ VideoDeviceError open_video_device(Video
              return vde_FailedStart;
          }
  
@@ -128,11 +88,11 @@ Do not assume what is not Linux or FreeBSD is OSX.
  #endif
  
          /* Create X11 window associated to device */
-@@ -666,7 +666,12 @@ void *video_thread_poll (void *arg) // T
+@@ -670,7 +666,12 @@ void *video_thread_poll (void *arg) // T
                      uint8_t *u = device->input.planes[1];
                      uint8_t *v = device->input.planes[2];
  
--#if defined(__linux__) || defined(__FreeBSD__)
+-#if defined(__linux__) || SYSTEM == BSD
 +#if defined(__OSX__)
 +                    if ( osx_video_read_device(y, u, v, &video_width, &video_height) != 0 ) {
 +                        unlock;
@@ -142,7 +102,7 @@ Do not assume what is not Linux or FreeBSD is OSX.
                      struct v4l2_buffer buf;
                      memset(&(buf), 0, sizeof(buf));
  
-@@ -683,13 +688,6 @@ void *video_thread_poll (void *arg) // T
+@@ -687,13 +688,6 @@ void *video_thread_poll (void *arg) // T
                      /* Convert frame image data to YUV420 for ToxAV */
                      yuv422to420(y, u, v, data, video_width, video_height);
  
@@ -156,28 +116,11 @@ Do not assume what is not Linux or FreeBSD is OSX.
  #endif
  
                      /* Send frame data to friend through ToxAV */
-@@ -726,14 +724,14 @@ void *video_thread_poll (void *arg) // T
-                     XFlush(device->x_display);
-                     free(img_data);
- 
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
- 
-                     if ( -1 == xioctl(device->fd, VIDIOC_QBUF, &buf) ) {
-                         unlock;
-                         continue;
-                     }
- 
--#endif /* __linux__ */
-+#endif
- 
-                 }
- 
-@@ -765,7 +763,10 @@ VideoDeviceError close_video_device(Vide
+@@ -769,7 +763,10 @@ VideoDeviceError close_video_device(Vide
      if ( !device->ref_count ) {
  
          if ( type == vdt_input ) {
--#if defined(__linux__) || defined(__FreeBSD__)
+-#if defined(__linux__) || SYSTEM == BSD
 +#if defined(__OSX__)
 +
 +            osx_video_close_device(device_idx);
@@ -185,7 +128,7 @@ Do not assume what is not Linux or FreeBSD is OSX.
              enum v4l2_buf_type buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
  
              if ( -1 == xioctl(device->fd, VIDIOC_STREAMOFF, &buf_type) ) {}
-@@ -779,8 +780,6 @@ VideoDeviceError close_video_device(Vide
+@@ -783,8 +780,6 @@ VideoDeviceError close_video_device(Vide
  
              close(device->fd);
  
@@ -194,12 +137,3 @@ Do not assume what is not Linux or FreeBSD is OSX.
  #endif
              vpx_img_free(&device->input);
              XDestroyWindow(device->x_display, device->x_window);
-@@ -788,7 +787,7 @@ VideoDeviceError close_video_device(Vide
-             XCloseDisplay(device->x_display);
-             pthread_mutex_destroy(device->mutex);
- 
--#if defined(__linux__) || defined(__FreeBSD__)
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
-             free(device->buffers);
- #endif /* __linux__ */
- 


Home | Main Index | Thread Index | Old Index