pkgsrc-Changes archive

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

CVS commit: pkgsrc/www/seamonkey



Module Name:    pkgsrc
Committed By:   nia
Date:           Thu Jun 13 23:08:05 UTC 2019

Modified Files:
        pkgsrc/www/seamonkey: Makefile
        pkgsrc/www/seamonkey/files: cubeb_sun.c

Log Message:
seamonkey: Disable non-blocking i/o in sun audio backend, follows firefox60


To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 pkgsrc/www/seamonkey/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/www/seamonkey/files/cubeb_sun.c

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

Modified files:

Index: pkgsrc/www/seamonkey/Makefile
diff -u pkgsrc/www/seamonkey/Makefile:1.192 pkgsrc/www/seamonkey/Makefile:1.193
--- pkgsrc/www/seamonkey/Makefile:1.192 Thu Jun 13 10:53:11 2019
+++ pkgsrc/www/seamonkey/Makefile       Thu Jun 13 23:08:05 2019
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.192 2019/06/13 10:53:11 nia Exp $
+# $NetBSD: Makefile,v 1.193 2019/06/13 23:08:05 nia Exp $
 
 DISTNAME=      seamonkey-${SM_VER}.source
 PKGNAME=       seamonkey-${SM_VER:S/b/beta/}
-PKGREVISION=   10
+PKGREVISION=   11
 SM_VER=                2.49.4
 CATEGORIES=    www
 MASTER_SITES=  ${MASTER_SITE_MOZILLA:=seamonkey/releases/${SM_VER}/source/}

Index: pkgsrc/www/seamonkey/files/cubeb_sun.c
diff -u pkgsrc/www/seamonkey/files/cubeb_sun.c:1.1 pkgsrc/www/seamonkey/files/cubeb_sun.c:1.2
--- pkgsrc/www/seamonkey/files/cubeb_sun.c:1.1  Thu Jun 13 10:53:11 2019
+++ pkgsrc/www/seamonkey/files/cubeb_sun.c      Thu Jun 13 23:08:05 2019
@@ -8,7 +8,6 @@
 #include <sys/ioctl.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <poll.h>
 #include <pthread.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -440,7 +439,6 @@ sun_io_routine(void * arg)
   long to_write = 0;
   size_t write_ofs = 0;
   size_t read_ofs = 0;
-  struct pollfd pfds[1];
   int drain = 0;
 
   s->state_cb(s, s->user_ptr, CUBEB_STATE_STARTED);
@@ -485,15 +483,7 @@ sun_io_routine(void * arg)
     if (to_write < SUN_BUFFER_FRAMES) {
       drain = 1;
     }
-    pfds[0].fd = s->play_fd;
-    if (s->play_fd != -1) {
-      if (to_write > 0) {
-        pfds[0].events = POLLOUT;
-      }
-    } else {
-      pfds[0].events = 0;
-      to_write = 0;
-    }
+    to_write = s->play_fd != -1 ? to_write : 0;
     to_read = s->record_fd != -1 ? SUN_BUFFER_FRAMES : 0;
     write_ofs = 0;
     read_ofs = 0;
@@ -501,17 +491,7 @@ sun_io_routine(void * arg)
       size_t bytes;
       ssize_t n, frames;
 
-      if (pfds[0].events != 0 && poll(pfds, 1, SUN_POLL_TIMEOUT) == -1) {
-        LOG("poll failed");
-        state = CUBEB_STATE_ERROR;
-        break;
-      }
-      if ((pfds[0].revents & POLLHUP) || (pfds[0].revents & POLLERR)) {
-        LOG("audio device disconnected");
-        state = CUBEB_STATE_ERROR;
-        break;
-      }
-      if (to_write > 0 && (pfds[0].revents & POLLOUT)) {
+      if (to_write > 0) {
         bytes = FRAMES_TO_BYTES(to_write, s->p_info.play.channels);
         if ((n = write(s->play_fd, s->play_buf + write_ofs, bytes)) < 0) {
           state = CUBEB_STATE_ERROR;
@@ -523,9 +503,6 @@ sun_io_routine(void * arg)
         pthread_mutex_unlock(&s->mutex);
         to_write -= frames;
         write_ofs += frames;
-        if (to_write == 0) {
-          pfds[0].events = 0;
-        }
       }
       if (to_read > 0) {
         bytes = FRAMES_TO_BYTES(to_read, s->r_info.record.channels);
@@ -617,7 +594,7 @@ sun_stream_init(cubeb * context,
     }
 #endif
     if (s->play_fd == -1) {
-      if ((s->play_fd = open(s->output_name, O_WRONLY | O_NONBLOCK)) == -1) {
+      if ((s->play_fd = open(s->output_name, O_WRONLY)) == -1) {
         LOG("Audio device cannot be opened as write-only");
         ret = CUBEB_ERROR_DEVICE_UNAVAILABLE;
         goto error;
@@ -707,7 +684,7 @@ sun_stream_get_latency(cubeb_stream * st
                              info.play.channels);
   return CUBEB_OK;
 #else
-  cubeb_params params;
+  cubeb_stream_params params;
 
   params.rate = stream->p_info.play.sample_rate;
 



Home | Main Index | Thread Index | Old Index