mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-27 07:58:16 -04:00
tools: add -C | --monitor to pw-cat
It sets the stream.capture.sink property which makes a record stream capture from a sink monitor instead.
This commit is contained in:
parent
9eeb2f1930
commit
50fcf64058
2 changed files with 10 additions and 2 deletions
|
|
@ -124,6 +124,9 @@ Set a node target (default auto). The value can be:
|
||||||
- <b>\<id\></b>: The object.serial or the node.name of a target node
|
- <b>\<id\></b>: The object.serial or the node.name of a target node
|
||||||
\endparblock
|
\endparblock
|
||||||
|
|
||||||
|
\par -C | \--monitor
|
||||||
|
In recording mode, record from monitor ports.
|
||||||
|
|
||||||
\par \--latency=VALUE\[*units*\]
|
\par \--latency=VALUE\[*units*\]
|
||||||
\parblock
|
\parblock
|
||||||
Set the node latency (default 100ms)
|
Set the node latency (default 100ms)
|
||||||
|
|
|
||||||
|
|
@ -1125,9 +1125,9 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HAVE_PW_CAT_FFMPEG_INTEGRATION
|
#ifdef HAVE_PW_CAT_FFMPEG_INTEGRATION
|
||||||
#define OPTIONS "hvprmdosR:P:q:aM:n:c"
|
#define OPTIONS "hvprmdosR:P:q:aM:n:cC"
|
||||||
#else
|
#else
|
||||||
#define OPTIONS "hvprmdsR:P:q:aM:n:c"
|
#define OPTIONS "hvprmdsR:P:q:aM:n:cC"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct option long_options[] = {
|
static const struct option long_options[] = {
|
||||||
|
|
@ -1168,6 +1168,7 @@ static const struct option long_options[] = {
|
||||||
{ "force-midi", required_argument, NULL, 'M' },
|
{ "force-midi", required_argument, NULL, 'M' },
|
||||||
{ "sample-count", required_argument, NULL, 'n' },
|
{ "sample-count", required_argument, NULL, 'n' },
|
||||||
{ "midi-clip", no_argument, NULL, 'c' },
|
{ "midi-clip", no_argument, NULL, 'c' },
|
||||||
|
{ "monitor", no_argument, NULL, 'C' },
|
||||||
|
|
||||||
{ NULL, 0, NULL, 0 }
|
{ NULL, 0, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
@ -1192,6 +1193,7 @@ static void show_usage(const char *name, bool is_error)
|
||||||
" --media-role Set media role (default %s)\n"
|
" --media-role Set media role (default %s)\n"
|
||||||
" --target Set node target serial or name (default %s)\n"
|
" --target Set node target serial or name (default %s)\n"
|
||||||
" 0 means don't link\n"
|
" 0 means don't link\n"
|
||||||
|
" -C --monitor Capture monitor ports (in recording mode)\n"
|
||||||
" --latency Set node latency (default %s)\n"
|
" --latency Set node latency (default %s)\n"
|
||||||
" Xunit (unit = s, ms, us, ns)\n"
|
" Xunit (unit = s, ms, us, ns)\n"
|
||||||
" or direct samples (256)\n"
|
" or direct samples (256)\n"
|
||||||
|
|
@ -2342,6 +2344,9 @@ int main(int argc, char *argv[])
|
||||||
case 'c':
|
case 'c':
|
||||||
data.data_type = TYPE_MIDI2;
|
data.data_type = TYPE_MIDI2;
|
||||||
break;
|
break;
|
||||||
|
case 'C':
|
||||||
|
pw_properties_set(data.props, PW_KEY_STREAM_CAPTURE_SINK, "true");
|
||||||
|
break;
|
||||||
case OPT_LISTFORMATS:
|
case OPT_LISTFORMATS:
|
||||||
list_formats(&data);
|
list_formats(&data);
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue