Changes of Revision 53

pipewire-aptx.changes Changed
x
 
1
@@ -1,4 +1,9 @@
2
 -------------------------------------------------------------------
3
+Wed Apr 16 08:10:32 UTC 2025 - Bjørn Lie <zaitor@opensuse.org>
4
+
5
+- Update to version 1.4.2
6
+
7
+-------------------------------------------------------------------
8
 Wed Mar 19 21:34:39 UTC 2025 - Bjørn Lie <zaitor@opensuse.org>
9
 
10
 - Update to version 1.4.1
11
pipewire-aptx.spec Changed
10
 
1
@@ -8,7 +8,7 @@
2
 %define minimum_version 1.4.0
3
 
4
 Name:           pipewire-aptx
5
-Version:        1.4.1
6
+Version:        1.4.2
7
 Release:        0
8
 Summary:        PipeWire Bluetooth aptX codec plugin
9
 License:        MIT
10
_service Changed
10
 
1
@@ -2,6 +2,6 @@
2
   <service name="download_url">
3
     <param name="host">gitlab.freedesktop.org</param>
4
     <param name="protocol">https</param>
5
-    <param name="path">/pipewire/pipewire/-/archive/1.4.1/pipewire-1.4.1.tar.bz2</param>
6
+    <param name="path">/pipewire/pipewire/-/archive/1.4.2/pipewire-1.4.2.tar.bz2</param>
7
   </service>
8
 </services>
9
\ No newline at end of file
10
_service:download_url:pipewire-1.4.1.tar.bz2/NEWS -> _service:download_url:pipewire-1.4.2.tar.bz2/NEWS Changed
49
 
1
@@ -1,3 +1,37 @@
2
+# PipeWire 1.4.2 (2025-04-14)
3
+
4
+This is a bugfix release that is API and ABI compatible with
5
+previous 1.x releases.
6
+
7
+## Highlights
8
+  - Do extra checks for MIDI to avoid 100% CPU usage on older kernels.
9
+  - Fix some potential crashes in POD builder.
10
+  - pw-cat streaming improvements on stdout/stdin.
11
+  - Small fixes and improvements.
12
+
13
+
14
+## PipeWire
15
+  - Make the service files depend on DBus to avoid startup races.
16
+
17
+## SPA
18
+  - Do extra checks for MIDI to avoid 100% CPU usage on older kernels.
19
+  - Use Header metadata by default in videoadapter.
20
+  - Handle set_format result from v4l2 better.
21
+  - Handle crash when POD builder overflows in the filter.
22
+  - Work around a libebur128 bug. (#4646)
23
+
24
+## Tools
25
+  - pw-cat prefers AU format when streaming on stdout/stdin. (#4629)
26
+  - Improve pw-cat verbose sndfile format debug.
27
+  - Add the missing --channel-map long option to pw-loopback.
28
+
29
+## GStreamer
30
+  - Fix a leak in the deviceprovider. (#4616)
31
+  - Fix negotiation and make renegotiation better.
32
+
33
+
34
+Older versions:
35
+
36
 # PipeWire 1.4.1 (2025-03-14)
37
 
38
 This is a quick bugfix release that is API and ABI compatible with
39
@@ -35,9 +69,6 @@
40
 ## Bluetooth
41
   - Fix a crash with an incomming call.
42
 
43
-
44
-Older versions:
45
-
46
 # PipeWire 1.4.0 (2025-03-06)
47
 
48
 This is the 1.4 release that is API and ABI compatible with previous
49
_service:download_url:pipewire-1.4.1.tar.bz2/doc/dox/programs/pw-link.1.md -> _service:download_url:pipewire-1.4.2.tar.bz2/doc/dox/programs/pw-link.1.md Changed
10
 
1
@@ -37,7 +37,7 @@
2
 List output ports
3
 
4
 \par -i | \--input
5
-List output ports
6
+List input ports
7
 
8
 \par -l | \--links
9
 List links
10
_service:download_url:pipewire-1.4.1.tar.bz2/meson.build -> _service:download_url:pipewire-1.4.2.tar.bz2/meson.build Changed
8
 
1
@@ -1,5 +1,5 @@
2
 project('pipewire', 'c' ,
3
-  version : '1.4.1',
4
+  version : '1.4.2',
5
   license :  'MIT', 'LGPL-2.1-or-later', 'GPL-2.0-only' ,
6
   meson_version : '>= 0.61.1',
7
   default_options :  'warning_level=3',
8
_service:download_url:pipewire-1.4.1.tar.bz2/spa/include/spa/pod/filter.h -> _service:download_url:pipewire-1.4.2.tar.bz2/spa/include/spa/pod/filter.h Changed
21
 
1
@@ -139,7 +139,7 @@
2
        const struct spa_pod_prop *p2)
3
 {
4
    const struct spa_pod *v1, *v2;
5
-   struct spa_pod_choice *nc;
6
+   struct spa_pod_choice *nc, dummy;
7
    uint32_t j, k, nalt1, nalt2;
8
    void *alt1, *alt2, *a1, *a2;
9
    uint32_t type, size, p1c, p2c;
10
@@ -175,6 +175,10 @@
11
    spa_pod_builder_prop(b, p1->key, p1->flags & p2->flags);
12
    spa_pod_builder_push_choice(b, &f, 0, 0);
13
    nc = (struct spa_pod_choice*)spa_pod_builder_frame(b, &f);
14
+   /* write to dummy value when builder overflows. We don't want to error
15
+    * because overflowing is a way to determine the required buffer size. */
16
+   if (nc == NULL)
17
+       nc = &dummy;
18
 
19
    /* default value */
20
    spa_pod_builder_primitive(b, v1);
21
_service:download_url:pipewire-1.4.1.tar.bz2/spa/plugins/alsa/alsa-seq.c -> _service:download_url:pipewire-1.4.2.tar.bz2/spa/plugins/alsa/alsa-seq.c Changed
29
 
1
@@ -44,9 +44,27 @@
2
 
3
 #ifdef HAVE_ALSA_UMP
4
    res = snd_seq_set_client_midi_version(conn->hndl, SND_SEQ_CLIENT_UMP_MIDI_2_0);
5
+   if (!res) {
6
+       snd_seq_client_info_t *info = NULL;
7
+
8
+       /* Double check client version */
9
+       res = snd_seq_client_info_malloc(&info);
10
+       if (!res)
11
+           res = snd_seq_get_client_info(conn->hndl, info);
12
+       if (!res) {
13
+           res = snd_seq_client_info_get_midi_version(info);
14
+           if (res == SND_SEQ_CLIENT_UMP_MIDI_2_0)
15
+               res = 0;
16
+           else
17
+               res = -EIO;
18
+       }
19
+       if (info)
20
+           snd_seq_client_info_free(info);
21
+   }
22
 #else
23
    res = -EOPNOTSUPP;
24
 #endif
25
+
26
    if (res < 0) {
27
        spa_log_lev(state->log, (probe_ump ? SPA_LOG_LEVEL_INFO : SPA_LOG_LEVEL_ERROR),
28
                "%p: ALSA failed to enable UMP MIDI: %s", state, snd_strerror(res));
29
_service:download_url:pipewire-1.4.1.tar.bz2/spa/plugins/audioconvert/audioadapter.c -> _service:download_url:pipewire-1.4.2.tar.bz2/spa/plugins/audioconvert/audioadapter.c Changed
26
 
1
@@ -997,6 +997,8 @@
2
    format = merge_objects(this, &b, SPA_PARAM_Format,
3
            (struct spa_pod_object*)format,
4
            (struct spa_pod_object*)def);
5
+   if (format == NULL)
6
+       return -ENOSPC;
7
 
8
    spa_pod_fixate(format);
9
 
10
@@ -1612,13 +1614,13 @@
11
    uint32_t count = 0;
12
    struct spa_result_node_params result;
13
 
14
-   spa_pod_builder_init(&b, buffer, sizeof(buffer));
15
-
16
    result.id = id;
17
    result.next = start;
18
 next:
19
    result.index = result.next;
20
 
21
+   spa_pod_builder_init(&b, buffer, sizeof(buffer));
22
+
23
    if (result.next < 0x100000) {
24
        /* Enumerate follower formats first, until we have enough or we run out */
25
        if ((res = node_port_enum_params_sync(this, this->follower, direction, port_id, id,
26
_service:download_url:pipewire-1.4.1.tar.bz2/spa/plugins/audioconvert/audioconvert.c -> _service:download_url:pipewire-1.4.2.tar.bz2/spa/plugins/audioconvert/audioconvert.c Changed
10
 
1
@@ -1214,7 +1214,7 @@
2
    while (true) {
3
        const char *name;
4
        struct spa_pod *pod;
5
-       char value512;
6
+       char value4096;
7
 
8
        if (spa_pod_parser_get_string(&prs, &name) < 0)
9
            break;
10
_service:download_url:pipewire-1.4.1.tar.bz2/spa/plugins/filter-graph/ebur128_plugin.c -> _service:download_url:pipewire-1.4.2.tar.bz2/spa/plugins/filter-graph/ebur128_plugin.c Changed
29
 
1
@@ -235,6 +235,8 @@
2
 static void ebur128_activate(void * Instance)
3
 {
4
    struct ebur128_impl *impl = Instance;
5
+   unsigned long max_window;
6
+   int major, minor, patch;
7
    int mode = 0, i;
8
    int modes = {
9
        EBUR128_MODE_M,
10
@@ -264,12 +266,17 @@
11
            mode |= modesi;
12
    }
13
 
14
+   ebur128_get_version(&major, &minor, &patch);
15
+   max_window = impl->max_window;
16
+   if (major == 1 && minor == 2 && (patch == 5 || patch == 6))
17
+       max_window = (max_window + 999) / 1000;
18
+
19
    for (i = 0; i < 7; i++) {
20
        impl->sti = ebur128_init(1, impl->rate, mode);
21
        if (impl->sti) {
22
            ebur128_set_channel(impl->sti, i, channelsi);
23
            ebur128_set_max_history(impl->sti, impl->max_history);
24
-           ebur128_set_max_window(impl->sti, impl->max_window);
25
+           ebur128_set_max_window(impl->sti, max_window);
26
        }
27
    }
28
 }
29
_service:download_url:pipewire-1.4.1.tar.bz2/spa/plugins/v4l2/v4l2-source.c -> _service:download_url:pipewire-1.4.2.tar.bz2/spa/plugins/v4l2/v4l2-source.c Changed
19
 
1
@@ -675,7 +675,7 @@
2
               const struct spa_pod *format)
3
 {
4
    struct spa_video_info info;
5
-   int res;
6
+   int res = 0;
7
 
8
    spa_zero(info);
9
 
10
@@ -755,7 +755,7 @@
11
    emit_port_info(this, port, false);
12
    emit_node_info(this, false);
13
 
14
-   return 0;
15
+   return res;
16
 }
17
 
18
 static int impl_node_port_set_param(void *object,
19
_service:download_url:pipewire-1.4.1.tar.bz2/spa/plugins/videoconvert/videoadapter.c -> _service:download_url:pipewire-1.4.2.tar.bz2/spa/plugins/videoconvert/videoadapter.c Changed
31
 
1
@@ -403,6 +403,7 @@
2
    uint32_t i, size, buffers, blocks, align, flags, stride = 0;
3
    uint32_t *aligns;
4
    struct spa_data *datas;
5
+   struct spa_meta metas1;
6
    uint64_t follower_flags, conv_flags;
7
 
8
    spa_log_debug(this->log, "%p: n_buffers:%d", this, this->n_buffers);
9
@@ -484,9 +485,11 @@
10
        datasi.maxsize = size;
11
        alignsi = align;
12
    }
13
+   metas0.type = SPA_META_Header;
14
+   metas0.size = sizeof(struct spa_meta_header);
15
 
16
    free(this->buffers);
17
-   this->buffers = spa_buffer_alloc_array(buffers, flags, 0, NULL, blocks, datas, aligns);
18
+   this->buffers = spa_buffer_alloc_array(buffers, flags, 1, metas, blocks, datas, aligns);
19
    if (this->buffers == NULL)
20
        return -errno;
21
    this->n_buffers = buffers;
22
@@ -961,6 +964,8 @@
23
    format = merge_objects(this, &b, SPA_PARAM_Format,
24
            (struct spa_pod_object*)format,
25
            (struct spa_pod_object*)def);
26
+   if (format == NULL)
27
+       return -ENOSPC;
28
 
29
    spa_pod_fixate(format);
30
 
31
_service:download_url:pipewire-1.4.1.tar.bz2/src/daemon/systemd/user/meson.build -> _service:download_url:pipewire-1.4.2.tar.bz2/src/daemon/systemd/user/meson.build Changed
14
 
1
@@ -11,6 +11,12 @@
2
 systemd_config.set('PW_BINARY', pipewire_bindir / 'pipewire')
3
 systemd_config.set('PW_PULSE_BINARY', pipewire_bindir / 'pipewire-pulse')
4
 
5
+pw_service_reqs = ''
6
+if get_option('dbus').enabled()
7
+  pw_service_reqs += 'dbus.service '
8
+endif
9
+systemd_config.set('PW_SERVICE_REQS', pw_service_reqs)
10
+
11
 configure_file(input : 'pipewire.service.in',
12
                output : 'pipewire.service',
13
                configuration : systemd_config,
14
_service:download_url:pipewire-1.4.1.tar.bz2/src/daemon/systemd/user/pipewire.service.in -> _service:download_url:pipewire-1.4.2.tar.bz2/src/daemon/systemd/user/pipewire.service.in Changed
10
 
1
@@ -13,7 +13,7 @@
2
 #
3
 # After=pipewire.socket is not needed, as it is already implicit in the
4
 # socket-service relationship, see systemd.socket(5).
5
-Requires=pipewire.socket
6
+Requires=pipewire.socket @PW_SERVICE_REQS@
7
 ConditionUser=!root
8
 
9
 Service
10
_service:download_url:pipewire-1.4.1.tar.bz2/src/gst/gstpipewiredeviceprovider.c -> _service:download_url:pipewire-1.4.2.tar.bz2/src/gst/gstpipewiredeviceprovider.c Changed
19
 
1
@@ -327,6 +327,7 @@
2
                                             gst_object_ref_sink (device),
3
                                             compare_device_session_priority);
4
     } else {
5
+      gst_object_ref (device);
6
       gst_device_provider_device_add (GST_DEVICE_PROVIDER (self), device);
7
     }
8
   }
9
@@ -484,7 +485,8 @@
10
   }
11
 
12
   if (nd->dev != NULL) {
13
-    gst_device_provider_device_remove (provider, GST_DEVICE (nd->dev));
14
+    gst_device_provider_device_remove (provider, nd->dev);
15
+    gst_clear_object (&nd->dev);
16
   }
17
   if (nd->caps)
18
     gst_caps_unref(nd->caps);
19
_service:download_url:pipewire-1.4.1.tar.bz2/src/gst/gstpipewireformat.c -> _service:download_url:pipewire-1.4.2.tar.bz2/src/gst/gstpipewireformat.c Changed
43
 
1
@@ -1065,8 +1065,19 @@
2
     {
3
       if (n_items < 3)
4
         return;
5
-      gst_caps_set_simple (res, width, GST_TYPE_INT_RANGE, rect1.width, rect2.width,
6
-                                height, GST_TYPE_INT_RANGE, rect1.height, rect2.height, NULL);
7
+
8
+      if (rect1.width == rect2.width &&
9
+          rect1.height == rect2.height) {
10
+        gst_caps_set_simple (res,
11
+            width, G_TYPE_INT, rect1.width,
12
+            height, G_TYPE_INT, rect1.height,
13
+            NULL);
14
+      } else {
15
+        gst_caps_set_simple (res,
16
+            width, GST_TYPE_INT_RANGE, rect1.width, rect2.width,
17
+            height, GST_TYPE_INT_RANGE, rect1.height, rect2.height,
18
+            NULL);
19
+      }
20
       break;
21
     }
22
     case SPA_CHOICE_Enum:
23
@@ -1117,8 +1128,17 @@
24
     {
25
       if (n_items < 3)
26
         return;
27
-      gst_caps_set_simple (res, key, GST_TYPE_FRACTION_RANGE, fract1.num, fract1.denom,
28
-                                                              fract2.num, fract2.denom, NULL);
29
+
30
+      if (fract1.num == fract2.num &&
31
+          fract1.denom == fract2.denom) {
32
+        gst_caps_set_simple (res, key, GST_TYPE_FRACTION,
33
+            fract1.num, fract1.denom, NULL);
34
+      } else {
35
+        gst_caps_set_simple (res, key, GST_TYPE_FRACTION_RANGE,
36
+            fract1.num, fract1.denom,
37
+            fract2.num, fract2.denom,
38
+            NULL);
39
+      }
40
       break;
41
     }
42
     case SPA_CHOICE_Enum:
43
_service:download_url:pipewire-1.4.1.tar.bz2/src/gst/gstpipewiresink.c -> _service:download_url:pipewire-1.4.2.tar.bz2/src/gst/gstpipewiresink.c Changed
39
 
1
@@ -305,6 +305,7 @@
2
   struct spa_pod_builder b = { NULL };
3
   uint8_t buffer1024;
4
   struct spa_pod_frame f;
5
+  guint n_params = 0;
6
 
7
   config = gst_buffer_pool_get_config (GST_BUFFER_POOL (pool));
8
   gst_buffer_pool_config_get_params (config, &caps, &size, &min_buffers, &max_buffers);
9
@@ -325,20 +326,22 @@
10
                                                 (1<<SPA_DATA_MemFd) |
11
                                                 (1<<SPA_DATA_MemPtr)),
12
       0);
13
-  port_params0 = spa_pod_builder_pop (&b, &f);
14
+  port_paramsn_params++ = spa_pod_builder_pop (&b, &f);
15
 
16
-  port_params1 = spa_pod_builder_add_object (&b,
17
+  port_paramsn_params++ = spa_pod_builder_add_object (&b,
18
       SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta,
19
       SPA_PARAM_META_type, SPA_POD_Id(SPA_META_Header),
20
       SPA_PARAM_META_size, SPA_POD_Int(sizeof (struct spa_meta_header)));
21
 
22
-  port_params2 = spa_pod_builder_add_object (&b,
23
-      SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta,
24
-      SPA_PARAM_META_type, SPA_POD_Id(SPA_META_VideoCrop),
25
-      SPA_PARAM_META_size, SPA_POD_Int(sizeof (struct spa_meta_region)));
26
+  if (sink->is_video) {
27
+    port_paramsn_params++ = spa_pod_builder_add_object (&b,
28
+        SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta,
29
+        SPA_PARAM_META_type, SPA_POD_Id(SPA_META_VideoCrop),
30
+        SPA_PARAM_META_size, SPA_POD_Int(sizeof (struct spa_meta_region)));
31
+  }
32
 
33
   pw_thread_loop_lock (sink->stream->core->loop);
34
-  pw_stream_update_params (sink->stream->pwstream, port_params, 3);
35
+  pw_stream_update_params (sink->stream->pwstream, port_params, n_params);
36
   pw_thread_loop_unlock (sink->stream->core->loop);
37
 }
38
 
39
_service:download_url:pipewire-1.4.1.tar.bz2/src/gst/gstpipewiresrc.c -> _service:download_url:pipewire-1.4.2.tar.bz2/src/gst/gstpipewiresrc.c Changed
66
 
1
@@ -1091,14 +1091,34 @@
2
   }
3
 
4
   pw_peer_caps = gst_caps_from_format (param);
5
+
6
   if (pw_peer_caps && pwsrc->possible_caps) {
7
+    GST_DEBUG_OBJECT (pwsrc, "peer caps %" GST_PTR_FORMAT, pw_peer_caps);
8
+    GST_DEBUG_OBJECT (pwsrc, "possible caps %" GST_PTR_FORMAT, pwsrc->possible_caps);
9
+
10
     pwsrc->caps = gst_caps_intersect_full (pw_peer_caps,
11
                                            pwsrc->possible_caps,
12
                                            GST_CAPS_INTERSECT_FIRST);
13
+
14
+  /*
15
+   * We expect pw_peer_caps to be fixed caps as we receive that from
16
+   * PipeWire. See pw_context_find_format() and SPA_PARAM_Format.
17
+   * possible_caps can be non-fixated caps based on what is downstream
18
+   * in the pipeline.
19
+   *
20
+   * The intersection result above might give us non-fixated caps. A
21
+   * possible scenario for this is the below pipeline.
22
+   * pipewiresrc ! audioconvert ! audio/x-raw,rate=44100,channels=2 ! ..
23
+   *
24
+   * So we fixate the caps explicitly here.
25
+   */
26
+    pwsrc->caps = gst_caps_fixate (pwsrc->caps);
27
     gst_caps_maybe_fixate_dma_format (pwsrc->caps);
28
   }
29
 
30
-  if (pwsrc->caps && gst_caps_is_fixed (pwsrc->caps)) {
31
+  if (pwsrc->caps) {
32
+    g_return_if_fail (gst_caps_is_fixed (pwsrc->caps));
33
+
34
     pwsrc->negotiated = TRUE;
35
 
36
     structure = gst_caps_get_structure (pwsrc->caps, 0);
37
@@ -1127,14 +1147,15 @@
38
 #ifdef HAVE_GSTREAMER_DMA_DRM
39
       }
40
 #endif
41
+    } else {
42
+      /* Don't provide bufferpool for audio if not requested by the
43
+       * application/user */
44
+      if (pwsrc->use_bufferpool != USE_BUFFERPOOL_YES)
45
+        pwsrc->use_bufferpool = USE_BUFFERPOOL_NO;
46
     }
47
   } else {
48
     pwsrc->negotiated = FALSE;
49
     pwsrc->is_video = FALSE;
50
-
51
-    /* Don't provide bufferpool for audio if not requested by the application/user */
52
-    if (pwsrc->use_bufferpool != USE_BUFFERPOOL_YES)
53
-      pwsrc->use_bufferpool = USE_BUFFERPOOL_NO;
54
   }
55
 
56
   if (pwsrc->caps) {
57
@@ -1158,7 +1179,7 @@
58
                                                             pwsrc->min_buffers,
59
                                                             pwsrc->max_buffers),
60
         SPA_PARAM_BUFFERS_blocks,  SPA_POD_CHOICE_RANGE_Int(0, 1, INT32_MAX),
61
-        SPA_PARAM_BUFFERS_size,    SPA_POD_CHOICE_RANGE_Int(0, 0, INT32_MAX),
62
+        SPA_PARAM_BUFFERS_size,    SPA_POD_CHOICE_RANGE_Int(0, 1, INT32_MAX),
63
         SPA_PARAM_BUFFERS_stride,  SPA_POD_CHOICE_RANGE_Int(0, 0, INT32_MAX),
64
         SPA_PARAM_BUFFERS_dataType, SPA_POD_CHOICE_FLAGS_Int(buffertypes));
65
 
66
_service:download_url:pipewire-1.4.1.tar.bz2/src/modules/module-raop-sink.c -> _service:download_url:pipewire-1.4.2.tar.bz2/src/modules/module-raop-sink.c Changed
18
 
1
@@ -1331,10 +1331,12 @@
2
 
3
 static int rtsp_do_post_auth_setup(struct impl *impl)
4
 {
5
-   static const unsigned char content33 =
6
-       "\x01"
7
-       "\x59\x02\xed\xe9\x0d\x4e\xf2\xbd\x4c\xb6\x8a\x63\x30\x03\x82\x07"
8
-       "\xa9\x4d\xbd\x50\xd8\xaa\x46\x5b\x5d\x8c\x01\x2a\x0c\x7e\x1d\x4e";
9
+   static const uint8_t content33 = {
10
+       0x01,
11
+       0x59, 0x02, 0xed, 0xe9, 0x0d, 0x4e, 0xf2, 0xbd,
12
+       0x4c, 0xb6, 0x8a, 0x63, 0x30, 0x03, 0x82, 0x07,
13
+       0xa9, 0x4d, 0xbd, 0x50, 0xd8, 0xaa, 0x46, 0x5b,
14
+       0x5d, 0x8c, 0x01, 0x2a, 0x0c, 0x7e, 0x1d, 0x4e };
15
 
16
    return pw_rtsp_client_url_send(impl->rtsp, "/auth-setup", "POST", &impl->headers->dict,
17
                       "application/octet-stream", content, sizeof(content),
18
_service:download_url:pipewire-1.4.1.tar.bz2/src/pipewire/impl-link.c -> _service:download_url:pipewire-1.4.2.tar.bz2/src/pipewire/impl-link.c Changed
32
 
1
@@ -388,11 +388,10 @@
2
        }
3
    }
4
 
5
-   pw_log_pod(SPA_LOG_LEVEL_DEBUG, format);
6
-
7
    SPA_POD_OBJECT_ID(format) = SPA_PARAM_Format;
8
    pw_log_debug("%p: doing set format %p fixated:%d", this,
9
            format, spa_pod_is_fixated(format));
10
+   pw_log_pod(SPA_LOG_LEVEL_INFO, format);
11
 
12
    if (out_state == PW_IMPL_PORT_STATE_CONFIGURE) {
13
        pw_log_debug("%p: doing set format on output", this);
14
@@ -405,7 +404,7 @@
15
            goto error;
16
        }
17
        if (SPA_RESULT_IS_ASYNC(res)) {
18
-           pw_log_info("output set format %d", res);
19
+           pw_log_debug("output set format %d", res);
20
            busy_id = pw_work_queue_add(impl->work, &this->output_link,
21
                    spa_node_sync(output->node->node, res),
22
                    complete_ready, this);
23
@@ -425,7 +424,7 @@
24
            goto error;
25
        }
26
        if (SPA_RESULT_IS_ASYNC(res2)) {
27
-           pw_log_info("input set format %d", res2);
28
+           pw_log_debug("input set format %d", res2);
29
            busy_id = pw_work_queue_add(impl->work, &this->input_link,
30
                    spa_node_sync(input->node->node, res2),
31
                    complete_ready, this);
32
_service:download_url:pipewire-1.4.1.tar.bz2/src/tools/pw-cat.c -> _service:download_url:pipewire-1.4.2.tar.bz2/src/tools/pw-cat.c Changed
65
 
1
@@ -1343,7 +1343,7 @@
2
        }
3
    }
4
    if (format == -1)
5
-       format = SF_FORMAT_WAV;
6
+       format = spa_streq(filename, "-") ? SF_FORMAT_AU : SF_FORMAT_WAV;
7
    if (format == SF_FORMAT_WAV && info->channels > 2)
8
        format = SF_FORMAT_WAVEX;
9
 
10
@@ -1436,6 +1436,21 @@
11
 }
12
 #endif
13
 
14
+static const char *endianness_to_name(int format)
15
+{
16
+   switch (format & SF_FORMAT_ENDMASK) {
17
+   case SF_ENDIAN_FILE:
18
+       return "Default Endian";
19
+   case SF_ENDIAN_LITTLE:
20
+       return "Little Endian";
21
+   case SF_ENDIAN_BIG:
22
+       return "Big Endian";
23
+   case SF_ENDIAN_CPU:
24
+       return "CPU Endian";
25
+   }
26
+   return "unknown";
27
+}
28
+
29
 static int setup_sndfile(struct data *data)
30
 {
31
    const struct format_info *fi = NULL;
32
@@ -1473,9 +1488,21 @@
33
        return -EIO;
34
    }
35
 
36
-   if (data->verbose)
37
-       fprintf(stderr, "sndfile: opened file \"%s\" format %08x channels:%d rate:%d\n",
38
-               data->filename, info.format, info.channels, info.samplerate);
39
+   if (data->verbose) {
40
+       SF_FORMAT_INFO ti, sti;
41
+       spa_zero(ti);
42
+       ti.format = info.format & SF_FORMAT_TYPEMASK;
43
+       if (sf_command(NULL, SFC_GET_FORMAT_INFO, &ti, sizeof(ti)) != 0)
44
+           ti.name = "unknown";
45
+       spa_zero(sti);
46
+       sti.format = info.format & SF_FORMAT_SUBMASK;
47
+       if (sf_command(NULL, SFC_GET_FORMAT_INFO, &sti, sizeof(sti)) != 0)
48
+           sti.name = "unknown";
49
+
50
+       fprintf(stderr, "sndfile: opened file \"%s\" format \"%s %s %s\" channels:%d rate:%d\n",
51
+               data->filename, endianness_to_name(info.format),
52
+               ti.name, sti.name, info.channels, info.samplerate);
53
+   }
54
    if (data->channels > 0 && info.channels != (int)data->channels) {
55
        fprintf(stderr, "sndfile: given channels (%u) don't match file channels (%d)\n",
56
                data->channels, info.channels);
57
@@ -1511,7 +1538,6 @@
58
        /* try native format first, else decode to float */
59
        if ((fi = format_info_by_sf_format(info.format)) == NULL)
60
            fi = format_info_by_sf_format(SF_FORMAT_FLOAT);
61
-
62
    }
63
    if (fi == NULL)
64
        return -EIO;
65
_service:download_url:pipewire-1.4.1.tar.bz2/src/tools/pw-loopback.c -> _service:download_url:pipewire-1.4.2.tar.bz2/src/tools/pw-loopback.c Changed
9
 
1
@@ -103,6 +103,7 @@
2
        { "group",      required_argument,  NULL, 'g' },
3
        { "name",       required_argument,  NULL, 'n' },
4
        { "channels",       required_argument,  NULL, 'c' },
5
+       { "channel-map",    required_argument,  NULL, 'm' },
6
        { "latency",        required_argument,  NULL, 'l' },
7
        { "delay",      required_argument,  NULL, 'd' },
8
        { "capture",        required_argument,  NULL, 'C' },
9