pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/multimedia/mpv
Module Name: pkgsrc
Committed By: nia
Date: Mon Mar 16 20:58:18 UTC 2020
Modified Files:
pkgsrc/multimedia/mpv: Makefile distinfo
pkgsrc/multimedia/mpv/patches: patch-audio_out_ao__netbsd.c
Log Message:
mpv: Simplify NetBSD audio implementation
To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 pkgsrc/multimedia/mpv/Makefile
cvs rdiff -u -r1.60 -r1.61 pkgsrc/multimedia/mpv/distinfo
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/multimedia/mpv/patches/patch-audio_out_ao__netbsd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/multimedia/mpv/Makefile
diff -u pkgsrc/multimedia/mpv/Makefile:1.99 pkgsrc/multimedia/mpv/Makefile:1.100
--- pkgsrc/multimedia/mpv/Makefile:1.99 Mon Mar 16 20:31:44 2020
+++ pkgsrc/multimedia/mpv/Makefile Mon Mar 16 20:58:18 2020
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.99 2020/03/16 20:31:44 nia Exp $
+# $NetBSD: Makefile,v 1.100 2020/03/16 20:58:18 nia Exp $
DISTNAME= mpv-0.32.0
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= multimedia
MASTER_SITES= ${MASTER_SITE_GITHUB:=mpv-player/}
GITHUB_TAG= v${PKGVERSION_NOREV}
Index: pkgsrc/multimedia/mpv/distinfo
diff -u pkgsrc/multimedia/mpv/distinfo:1.60 pkgsrc/multimedia/mpv/distinfo:1.61
--- pkgsrc/multimedia/mpv/distinfo:1.60 Mon Mar 16 20:31:44 2020
+++ pkgsrc/multimedia/mpv/distinfo Mon Mar 16 20:58:18 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.60 2020/03/16 20:31:44 nia Exp $
+$NetBSD: distinfo,v 1.61 2020/03/16 20:58:18 nia Exp $
SHA1 (mpv-0.32.0.tar.gz) = 5b69ea34dd5f8d209acd5266415c7bc00ab83341
RMD160 (mpv-0.32.0.tar.gz) = d1e399fce8985a0399fe627248b87d8537cfefd7
@@ -7,7 +7,7 @@ Size (mpv-0.32.0.tar.gz) = 3148730 bytes
SHA1 (patch-DOCS_man_ao.rst) = 5940fe1ad4d4328c03b9e6e5265c517762cfe2d0
SHA1 (patch-audio_out_ao.c) = 1527c818d0f50801485ad3b90c5d86b30b2ca6f1
SHA1 (patch-audio_out_ao__alsa.c) = c4661d0d22550d6e4eb2b7a42dd04dbcc58123b0
-SHA1 (patch-audio_out_ao__netbsd.c) = 137cd9da82108adc02848954fa72c057a9de7a1e
+SHA1 (patch-audio_out_ao__netbsd.c) = a0cdd3c10cf2320c738ff88a51f380675b123022
SHA1 (patch-options_options.c) = c75fb27140ad21e0a11c6ded976116c544661f56
SHA1 (patch-player_main.c) = 7d1d62091c327fca698844004ddb9a7871e15fce
SHA1 (patch-video_out_drm__common.c) = a545a8aec29f1b3c44d26aacbc59b86d3333a0b9
Index: pkgsrc/multimedia/mpv/patches/patch-audio_out_ao__netbsd.c
diff -u pkgsrc/multimedia/mpv/patches/patch-audio_out_ao__netbsd.c:1.1 pkgsrc/multimedia/mpv/patches/patch-audio_out_ao__netbsd.c:1.2
--- pkgsrc/multimedia/mpv/patches/patch-audio_out_ao__netbsd.c:1.1 Mon Mar 16 20:31:44 2020
+++ pkgsrc/multimedia/mpv/patches/patch-audio_out_ao__netbsd.c Mon Mar 16 20:58:18 2020
@@ -1,10 +1,10 @@
-$NetBSD: patch-audio_out_ao__netbsd.c,v 1.1 2020/03/16 20:31:44 nia Exp $
+$NetBSD: patch-audio_out_ao__netbsd.c,v 1.2 2020/03/16 20:58:18 nia Exp $
NetBSD audio support.
---- audio/out/ao_netbsd.c.orig 2020-03-16 20:20:16.030655720 +0000
+--- audio/out/ao_netbsd.c.orig 2020-03-16 20:38:28.287433271 +0000
+++ audio/out/ao_netbsd.c
-@@ -0,0 +1,276 @@
+@@ -0,0 +1,263 @@
+/*
+ * Copyright (c) 2020 Nia Alarie <nia%NetBSD.org@localhost>
+ * All rights reserved.
@@ -46,8 +46,16 @@ NetBSD audio support.
+#include "ao.h"
+#include "internal.h"
+
-+#ifndef NETBSD_MAXDEVS
-+#define NETBSD_MAXDEVS (8)
++#ifndef NETBSD_MAX_DEVS
++#define NETBSD_MAX_DEVS (8)
++#endif
++
++#ifndef NETBSD_MAX_CHANNELS
++#define NETBSD_MAX_CHANNELS (12)
++#endif
++
++#ifndef NETBSD_BUF_FRAMES
++#define NETBSD_BUF_FRAMES (32)
+#endif
+
+struct priv {
@@ -81,7 +89,7 @@ NetBSD audio support.
+
+ info.mode = AUMODE_PLAY;
+
-+ for (int n = 1; n <= 12; n++) {
++ for (int n = 1; n <= NETBSD_MAX_CHANNELS; n++) {
+ struct mp_chmap map;
+
+ mp_chmap_from_channels(&map, n);
@@ -108,6 +116,7 @@ NetBSD audio support.
+ default:
+ pinfo->precision = 32;
+ pinfo->encoding = AUDIO_ENCODING_SLINEAR;
++ ao->format = AF_FORMAT_S32;
+ break;
+ }
+
@@ -123,21 +132,6 @@ NetBSD audio support.
+
+ ao->samplerate = pinfo->sample_rate;
+
-+ switch (pinfo->precision) {
-+ case 8:
-+ ao->format = AF_FORMAT_U8;
-+ break;
-+ case 16:
-+ ao->format = AF_FORMAT_S16;
-+ break;
-+ case 32:
-+ ao->format = AF_FORMAT_S32;
-+ break;
-+ default:
-+ MP_ERR(ao, "Unsupported precision %d\n", pinfo->precision);
-+ goto fail;
-+ }
-+
+ return 0;
+
+fail:
@@ -174,14 +168,7 @@ NetBSD audio support.
+
+static int get_space(struct ao *ao)
+{
-+ struct priv *p = ao->priv;
-+ struct audio_info info;
-+
-+ if (ioctl(p->fd, AUDIO_GETINFO, &info) == -1) {
-+ MP_ERR(ao, "AUDIO_GETINFO failed: %s\n", mp_strerror(errno));
-+ return 0;
-+ }
-+ return (info.blocksize - info.play.seek) / ao->sstride;
++ return NETBSD_BUF_FRAMES * ao->sstride;
+}
+
+static void audio_pause(struct ao *ao)
@@ -255,7 +242,7 @@ NetBSD audio support.
+ struct audio_device dev;
+ int fd;
+
-+ for (int i = 0; 0 < NETBSD_MAXDEVS; ++i) {
++ for (int i = 0; 0 < NETBSD_MAX_DEVS; ++i) {
+ (void)snprintf(name, sizeof(name), "/dev/audio%d", i);
+ fd = open(name, O_WRONLY);
+ if (fd == -1 || ioctl(fd, AUDIO_GETDEV, &dev) == -1) {
Home |
Main Index |
Thread Index |
Old Index