[FFmpeg-devel] [PATCH 0/2] avdevice/dshow: set color information in stream

2021-06-01 Thread Diederick Niehorster
fps=5 max s=640x480 fps=30 vcodec=h264 min s=640x480 fps=5 max s=640x480 fps=30 (tv, bt470bg/bt709/unknown, topleft) vcodec=mjpeg min s=1920x1080 fps=5 max s=1920x1080 fps=30 vcodec=mjpeg min s=1920x1080 fps=5 max s=1920x1080 fps=30 (pc, bt470bg/bt709/unknown, center) Diederick Niehorst

[FFmpeg-devel] [PATCH 2/2] avdevice/dshow: select format with extended color info

2021-06-01 Thread Diederick Niehorster
ut of their device. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 448 1 file changed, 323 insertions(+), 125 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index c59cd30f30..7467fae1fc 100644 --- a/libavdevice/ds

[FFmpeg-devel] [PATCH 1/2] avdevice/dshow: discover source color range/space/etc

2021-06-02 Thread Diederick Niehorster
Enabled discovering a DirectShow device's color range, space, primaries, transfer characteristics and chroma location, if the device exposes that information. Sets them in the stream's codecpars. Signed-off-by: Diederick Niehorster --- libavdevice/dsh

[FFmpeg-devel] [PATCH] avdevice/dshow: implement get_device_list

2021-06-02 Thread Diederick Niehorster
Needed to enable programmatic discovery of DirectShow devices Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 68 - 1 file changed, 61 insertions(+), 7 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 8d0a6fcc09

[FFmpeg-devel] [PATCH] avdevice/dshow: implement option to use device video timestamps

2021-06-02 Thread Diederick Niehorster
evice provides broken timestamps. Solves trac #8620. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 1 + libavdevice/dshow_capture.h | 1 + libavdevice/dshow_pin.c | 13 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libavdevice/dshow.c b/libavd

[FFmpeg-devel] [PATCH 0/6] avdevice/dshow: control_message interface

2021-06-02 Thread Diederick Niehorster
concerns these devices, I only moved some of it into functions, didn't change its logic. Rest is thoroughly tested of course. Diederick Niehorster (6): avformat: add control_message function to AVInputFormat avdevice/dshow: implement control_message interface avdevice: adding control me

[FFmpeg-devel] [PATCH 1/6] avformat: add control_message function to AVInputFormat

2021-06-02 Thread Diederick Niehorster
Control messages are useful for programmatic control of not only outdevs but also indevs. Bumping avformat version. Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 8 +--- libavformat/avformat.h | 6 ++ libavformat/version.h | 4 ++-- 3 files changed, 13 insertions

[FFmpeg-devel] [PATCH 2/6] avdevice/dshow: implement control_message interface

2021-06-02 Thread Diederick Niehorster
: Diederick Niehorster --- libavdevice/dshow.c | 41 + libavdevice/dshow_capture.h | 1 + 2 files changed, 42 insertions(+) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 8d0a6fcc09..6e0147aed7 100644 --- a/libavdevice/dshow.c +++ b

[FFmpeg-devel] [PATCH 3/6] avdevice: adding control message requesting to show config dialog

2021-06-02 Thread Diederick Niehorster
This control message can be used to programmatically ask a device to show its configuration dialog. Bumping avdevice version. Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.h | 10 ++ libavdevice/version.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff

[FFmpeg-devel] [PATCH 4/6] avdevice/dshow: accept show config dialog control message

2021-06-02 Thread Diederick Niehorster
DirectShow source will pop up its configuration dialog when AV_APP_TO_DEV_CONFIG is received. Implementation for several other possible configuration dialogs is more involved and will be provided in the next commit. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 19

[FFmpeg-devel] [PATCH 5/6] avdevice/dshow: tv_tuner_audio_dialog cleanup missing

2021-06-02 Thread Diederick Niehorster
Cleanup in case the show_analog_tv_tuner_audio_dialog was set was missing. Signed-off-by: Diederick Niehorster --- libavdevice/dshow_crossbar.c | 4 1 file changed, 4 insertions(+) diff --git a/libavdevice/dshow_crossbar.c b/libavdevice/dshow_crossbar.c index 2438683cde..961defe690 100644

[FFmpeg-devel] [PATCH 6/6] avdevice/dshow: add config dialog command for crossbar and tv tuner

2021-06-02 Thread Diederick Niehorster
The "show config dialog" command message can now also trigger dialog boxes for the crossbar connecting pins filter the analog tuner audio / analog tuner filters. _Untested_ as I do not have either device. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c

[FFmpeg-devel] [PATCH 1/2] avdevice/dshow: query graph time only once

2021-06-02 Thread Diederick Niehorster
No need to query twice, use value we've already unconditionally got. Signed-off-by: Diederick Niehorster --- libavdevice/dshow_pin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavdevice/dshow_pin.c b/libavdevice/dshow_pin.c index ee0d4a1b42..8408af26da 1

[FFmpeg-devel] [PATCH 2/2] avdevice/dshow: handle unknown sample time

2021-06-02 Thread Diederick Niehorster
GetTime may return an error indication that the sample has not timestamps, or may return a NULL start time. In those cases, fall back to graph time Signed-off-by: Diederick Niehorster --- libavdevice/dshow_pin.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a

[FFmpeg-devel] [PATCH 0/3] avdevice/dshow: use video device timestamps

2021-06-02 Thread Diederick Niehorster
This patch series enables using video device instead of wallclock times for a DirectShow device. It supersedes https://ffmpeg.org/pipermail/ffmpeg-devel/2021-June/280879.html, which i messed up. Diederick Niehorster (3): avdevice/dshow: implement option to use device video timestamps

[FFmpeg-devel] [PATCH 1/3] avdevice/dshow: implement option to use device video timestamps

2021-06-02 Thread Diederick Niehorster
r can switch this off and revert to the old behavior, so a fall back remains available in case the device provides broken timestamps. Solves trac #8620. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 1 + libavdevice/dshow_capture.h | 1 + libavdevice/dshow_pin.c

[FFmpeg-devel] [PATCH 2/3] avdevice/dshow: query graph time only once

2021-06-02 Thread Diederick Niehorster
No need to query twice, use value we've already unconditionally got. Signed-off-by: Diederick Niehorster --- libavdevice/dshow_pin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavdevice/dshow_pin.c b/libavdevice/dshow_pin.c index ee0d4a1b42..8408af26da 1

[FFmpeg-devel] [PATCH 3/3] avdevice/dshow: handle unknown sample time

2021-06-02 Thread Diederick Niehorster
GetTime may return an error indication that the sample has not timestamps, or may return a NULL start time. In those cases, fall back to graph time better debug message in case sample dropped: could now be audio or video frame Signed-off-by: Diederick Niehorster --- libavdevice/dshow_pin.c

[FFmpeg-devel] [PATCH] avdevice/dshow: set no-seek flags

2021-06-02 Thread Diederick Niehorster
not permitted) instead of -22 (invalid argument). This actually seems to apply to many other devices, at least the gdigrab, v4l2, vfwcap, x11grab, fbdev, kmsgrab and android_camera devices, from reading the source. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 2 +- 1 file

[FFmpeg-devel] [PATCH] avdevice/dshow: set no-seek flags

2021-06-02 Thread Diederick Niehorster
not permitted) instead of -22 (invalid argument). This actually seems to apply to many other devices, at least the gdigrab, v4l2, vfwcap, x11grab, fbdev, kmsgrab and android_camera devices, from reading the source. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 2 +- 1 file

[FFmpeg-devel] [PATCH 1/4] avdevice/avdevice: Revert "Deprecate AVDevice Capabilities API"

2021-06-03 Thread Diederick Niehorster
options, instead of asking them to discover a dshow devices capabilities through the list_options option with an ffmpeg tool, and listing what they want to configure in text boxes. Signed-off-by: Diederick Niehorster --- doc/APIchanges | 4 +++ libavdevice/avdevice.c | 71

[FFmpeg-devel] [PATCH 4/4] examples: adding device_get_capabilities example

2021-06-03 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- configure | 2 + doc/examples/.gitignore| 1 + doc/examples/Makefile | 47 doc/examples/Makefile.example | 1 + doc/examples/device_get_capabilities.c | 151

[FFmpeg-devel] [PATCH 2/4] avdevice/avdevice: clean up avdevice_capabilities_create

2021-06-03 Thread Diederick Niehorster
Draw implementation in line with that of avdevice_list_devices Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index 371ec17d02..2e64d35cf5 100644 --- a

[FFmpeg-devel] [PATCH 0/4] avdevice/dshow: implement capabilities API

2021-06-03 Thread Diederick Niehorster
Undeprecating the avdevice capabilities API and implementing it for the dshow device. Much needed. Together with the other patches i sent, a dshow device can now be properly used programmatically by programs using ffmpeg under the hood. Diederick Niehorster (4): avdevice/avdevice: Revert

[FFmpeg-devel] [PATCH 0/4] avdevice/dshow: implement capabilities API

2021-06-03 Thread Diederick Niehorster
hood. Diederick Niehorster (4): avdevice/avdevice: Revert "Deprecate AVDevice Capabilities API" avdevice/avdevice: clean up avdevice_capabilities_create avdevice/dshow: implement capabilities API examples: adding device_get_capabilities example configure

[FFmpeg-devel] [PATCH 1/4] avdevice/avdevice: Revert "Deprecate AVDevice Capabilities API"

2021-06-03 Thread Diederick Niehorster
options, instead of asking them to discover a dshow devices capabilities through the list_options option with an ffmpeg tool, and listing what they want to configure in text boxes. Signed-off-by: Diederick Niehorster --- doc/APIchanges | 4 +++ libavdevice/avdevice.c | 71

[FFmpeg-devel] [PATCH 2/4] avdevice/avdevice: clean up avdevice_capabilities_create

2021-06-03 Thread Diederick Niehorster
Draw implementation in line with that of avdevice_list_devices Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index 371ec17d02..2e64d35cf5 100644 --- a

[FFmpeg-devel] [PATCH 3/4] avdevice/dshow: implement capabilities API

2021-06-03 Thread Diederick Niehorster
This implements avdevice_capabilities_create and avdevice_capabilities_free for the dshow device. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 498 1 file changed, 462 insertions(+), 36 deletions(-) diff --git a/libavdevice/dshow.c

[FFmpeg-devel] [PATCH 4/4] examples: adding device_get_capabilities example

2021-06-03 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- configure | 2 + doc/examples/.gitignore| 1 + doc/examples/Makefile | 47 doc/examples/Makefile.example | 1 + doc/examples/device_get_capabilities.c | 151

[FFmpeg-devel] [PATCH 1/2] avdevice/dshow: implement capabilities API

2021-06-03 Thread Diederick Niehorster
This implements avdevice_capabilities_create and avdevice_capabilities_free for the dshow device. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 498 1 file changed, 462 insertions(+), 36 deletions(-) diff --git a/libavdevice/dshow.c

[FFmpeg-devel] [PATCH 3/4] avdevice/dshow: implement capabilities API

2021-06-03 Thread Diederick Niehorster
This implements avdevice_capabilities_create and avdevice_capabilities_free for the dshow device. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 498 1 file changed, 462 insertions(+), 36 deletions(-) diff --git a/libavdevice/dshow.c

[FFmpeg-devel] [PATCH 2/2] examples: adding device_get_capabilities example

2021-06-03 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- configure | 2 + doc/examples/.gitignore| 1 + doc/examples/Makefile | 47 doc/examples/Makefile.example | 1 + doc/examples/device_get_capabilities.c | 151

[FFmpeg-devel] [PATCH 17/35] avdevice/dshow: discover source color range/space/etc

2021-06-07 Thread Diederick Niehorster
Enabled discovering a DirectShow device's color range, space, primaries, transfer characteristics and chroma location, if the device exposes that information. Sets them in the stream's codecpars. Signed-off-by: Diederick Niehorster Co-authored-by: Valerii Zapodovnikov --- libavdevi

[FFmpeg-devel] [PATCH 18/35] avdevice/dshow: select format with extended color info

2021-06-07 Thread Diederick Niehorster
ut of their device. Closes: #9271 Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 460 1 file changed, 332 insertions(+), 128 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 6a7bac579a..252db47351 100644

[FFmpeg-devel] [PATCH 19/35] avdevice/avdevice: Revert "Deprecate AVDevice Capabilities API"

2021-06-07 Thread Diederick Niehorster
options, instead of asking them to discover a dshow devices capabilities through the list_options option with an ffmpeg tool, and listing what they want to configure in text boxes. Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 71

[FFmpeg-devel] [PATCH 20/35] avdevice/avdevice: clean up avdevice_capabilities_create

2021-06-07 Thread Diederick Niehorster
Draw implementation in line with that of avdevice_list_devices Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index 695b9143af..d73d36e1dd 100644 --- a

[FFmpeg-devel] [PATCH 21/35] avdevice: capabilities API details no longer public

2021-06-07 Thread Diederick Niehorster
NB: will break build, makes needed corresponding changes to avformat. Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 34 -- libavdevice/avdevice.h | 42 +- libavdevice/internal.h | 33

[FFmpeg-devel] [PATCH 22/35] avformat: avdevice capabilities API details no longer public

2021-06-07 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- libavformat/avformat.h | 9 - libavformat/version.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 6fd09f52cb..12197465bc 100644 --- a/libavformat/avformat.h +++ b

[FFmpeg-devel] [PATCH 23/35] avformat: cosmetics

2021-06-07 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- libavformat/avformat.h | 9 + 1 file changed, 9 insertions(+) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 12197465bc..5e1e82a315 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -530,6 +530,7 @@ typedef

[FFmpeg-devel] [PATCH 24/35] avutil/opt: AVOptionRange gains is_set field.

2021-06-07 Thread Diederick Niehorster
ugh a special value (like 0 or -1), but that is a problem (like always with special values). The is_set field alleviates the use of special values. This will be used when implementing the avdevice capabilities API for avdevice/dshow in a later commit Signed-off-by: Diederick Niehorster --- libavutil/

[FFmpeg-devel] [PATCH 25/35] avutil/opt: add av_opt_to_string

2021-06-07 Thread Diederick Niehorster
age will be shown in upcoming device_get_capabilities example. av_opt_get (body changed) still passes FATE. Signed-off-by: Diederick Niehorster --- libavutil/opt.c | 93 + libavutil/opt.h | 12 +- libavutil/version.h | 2 +- 3 files chan

[FFmpeg-devel] [PATCH 26/35] avdevice: Add internal helpers for querying device capabilities

2021-06-07 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- libavdevice/internal.h | 31 +++ libavdevice/utils.c| 48 ++ libavdevice/version.h | 2 +- 3 files changed, 80 insertions(+), 1 deletion(-) diff --git a/libavdevice/internal.h b

[FFmpeg-devel] [PATCH 27/35] avdevice/dshow: move audio format helpers

2021-06-07 Thread Diederick Niehorster
Needs to be moved up in file for upcoming implementation of avdevice_capabilities_create. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice

[FFmpeg-devel] [PATCH 28/35] avdevice/dshow: when closing, set context fields back to zero

2021-06-07 Thread Diederick Niehorster
their state. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 17 + 1 file changed, 17 insertions(+) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 004b4e6154..40a492b787 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -272,14 +272,18

[FFmpeg-devel] [PATCH 29/35] avdevice/dshow: implement capabilities API

2021-06-07 Thread Diederick Niehorster
This implements avdevice_capabilities_create for the dshow device (avdevice_capabilities_free not needed as it would be no-op). Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 384 +--- 1 file changed, 365 insertions(+), 19 deletions

[FFmpeg-devel] [PATCH 30/35] avdevice/dshow: cosmetics

2021-06-07 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 082ae5f26c..c158a536d8 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -940,6

[FFmpeg-devel] [PATCH 31/35] avformat: add avformat_alloc_input_context()

2021-06-07 Thread Diederick Niehorster
"", but keep current url 4. if s->priv_data has already been allocated, do not do so again. Signed-off-by: Diederick Niehorster --- libavformat/avformat.h | 20 + libavformat/utils.c| 66 +++--- libavformat/version.h | 2

[FFmpeg-devel] [PATCH 32/35] examples: adding device_get_capabilities example

2021-06-07 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- configure | 2 + doc/examples/.gitignore| 1 + doc/examples/Makefile | 1 + doc/examples/Makefile.example | 1 + doc/examples/device_get_capabilities.c | 192

[FFmpeg-devel] [PATCH 33/35] Makefile/examples: cosmetics

2021-06-07 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- doc/examples/Makefile | 48 +-- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/doc/examples/Makefile b/doc/examples/Makefile index de707bb3ca..7988ed4226 100644 --- a/doc/examples/Makefile +++ b/doc

[FFmpeg-devel] [PATCH 34/35] avdevice/dshow: prevent NULL access

2021-06-07 Thread Diederick Niehorster
list_options true would crash when both a video and an audio device were specified as input. Crash would occur on line 1618 (in this new rev) because ctx->device_unique_name[otherDevType] would be NULL Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 6 -- 1 file changed

[FFmpeg-devel] [PATCH 35/35] avdevice/dshow: capabilities query also works on opened device

2021-06-07 Thread Diederick Niehorster
While the capabilities API is in principle meant to be used with an allocated format context belonging to an unopened device, small changes make it work for an opened dshow device as well. So hereby done. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 36

[FFmpeg-devel] [PATCH 02/35] avdevice/dshow: add use_video_device_timestamps to docs

2021-06-07 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- doc/indevs.texi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/doc/indevs.texi b/doc/indevs.texi index b377924c2f..685b1357a6 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -611,6 +611,12 @@ Save the currently used video capture filter

[FFmpeg-devel] [PATCH 05/35] avdevice/dshow: set no-seek flags

2021-06-07 Thread Diederick Niehorster
not permitted) instead of -22 (invalid argument). This actually seems to apply to many other devices, at least the gdigrab, v4l2, vfwcap, x11grab, fbdev, kmsgrab and android_camera devices, from reading the source. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 2 +- 1 file

[FFmpeg-devel] [PATCH 06/35] avdevice/dshow: implement get_device_list

2021-06-07 Thread Diederick Niehorster
Needed to enable programmatic discovery of DirectShow devices Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 80 + 1 file changed, 73 insertions(+), 7 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 389daa6380

[FFmpeg-devel] [PATCH 09/35] avdevice/dshow: add media type info to get_device_list

2021-06-07 Thread Diederick Niehorster
The list returned by get_device_list now contains info about what media type(s), if any, can be provided by each device. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index

[FFmpeg-devel] [PATCH 04/35] avdevice/dshow: handle unknown sample time

2021-06-07 Thread Diederick Niehorster
GetTime may return an error indication that the sample has not timestamps, or may return a NULL start time. In those cases, fall back to graph time better debug message in case sample dropped: could now be audio or video frame Signed-off-by: Diederick Niehorster --- libavdevice/dshow_pin.c

[FFmpeg-devel] [PATCH 07/35] avdevice/dshow: list_devices: show media type(s) per device

2021-06-07 Thread Diederick Niehorster
this now allows to find devices that provide both audio and video, and devices that provide neither. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 103 +--- 1 file changed, 98 insertions(+), 5 deletions(-) diff --git a/libavdevice/dsho

[FFmpeg-devel] [PATCH 01/35] avdevice/dshow: implement option to use device video timestamps

2021-06-07 Thread Diederick Niehorster
r can switch this off and revert to the old behavior, so a fall back remains available in case the device provides broken timestamps. Closes: #8620 Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 1 + libavdevice/dshow_capture.h | 1 + libavdevice/dshow_pin.c

[FFmpeg-devel] [PATCH 15/35] avdevice/dshow: tv_tuner_audio_dialog cleanup missing

2021-06-07 Thread Diederick Niehorster
Cleanup in case the show_analog_tv_tuner_audio_dialog was set was missing. Signed-off-by: Diederick Niehorster --- libavdevice/dshow_crossbar.c | 4 1 file changed, 4 insertions(+) diff --git a/libavdevice/dshow_crossbar.c b/libavdevice/dshow_crossbar.c index 2438683cde..961defe690 100644

[FFmpeg-devel] [PATCH 14/35] avdevice/dshow: accept show config dialog control message

2021-06-07 Thread Diederick Niehorster
DirectShow source will pop up its configuration dialog when AV_APP_TO_DEV_CONFIG is received. Implementation for several other possible configuration dialogs is more involved and will be provided in the next commit. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 26

[FFmpeg-devel] [PATCH 00/35] avdevice (mostly dshow) enhancements

2021-06-07 Thread Diederick Niehorster
ntext(). Diederick Niehorster (35): avdevice/dshow: implement option to use device video timestamps avdevice/dshow: add use_video_device_timestamps to docs avdevice/dshow: query graph and sample time only once avdevice/dshow: handle unknown sample time avdevice/dshow: set no-seek flags avd

[FFmpeg-devel] [PATCH 13/35] avdevice: adding control message requesting to show config dialog

2021-06-07 Thread Diederick Niehorster
This control message can be used to programmatically ask a device to show its configuration dialog. Bumping avdevice version. Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.h | 10 ++ libavdevice/version.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff

[FFmpeg-devel] [PATCH 11/35] avformat: add control_message function to AVInputFormat

2021-06-07 Thread Diederick Niehorster
Control messages are useful for programmatic control of not only outdevs but also indevs. Bumping avformat version. Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 8 +--- libavformat/avformat.h | 6 ++ libavformat/version.h | 4 ++-- 3 files changed, 13 insertions

[FFmpeg-devel] [PATCH 08/35] avdevice: add info about media types(s) to AVDeviceInfo

2021-06-07 Thread Diederick Niehorster
cases. Users should be provided with this information, so AVDeviceInfo is extended to provide it. Bump avdevice version Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 2 ++ libavdevice/avdevice.h | 2 ++ libavdevice/version.h | 2 +- 3 files changed, 5 insertions(+), 1

[FFmpeg-devel] [PATCH 03/35] avdevice/dshow: query graph and sample time only once

2021-06-07 Thread Diederick Niehorster
No need to query twice, use value we've already unconditionally got. Improve variable names Signed-off-by: Diederick Niehorster --- libavdevice/dshow_pin.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/libavdevice/dshow_pin.c b/libavd

[FFmpeg-devel] [PATCH 12/35] avdevice/dshow: implement control_message interface

2021-06-07 Thread Diederick Niehorster
: Diederick Niehorster --- libavdevice/dshow.c | 42 + libavdevice/dshow_capture.h | 1 + 2 files changed, 43 insertions(+) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 3e41f4f99f..9f041e90f8 100644 --- a/libavdevice/dshow.c +++ b

[FFmpeg-devel] [PATCH 16/35] avdevice/dshow: add config dialog command for crossbar and tv tuner

2021-06-07 Thread Diederick Niehorster
The "show config dialog" command message can now also trigger dialog boxes for the crossbar connecting pins filter the analog tuner audio / analog tuner filters. _Untested_ as I do not have either device. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c

[FFmpeg-devel] [PATCH 10/35] fftools: provide media type info for devices

2021-06-07 Thread Diederick Niehorster
gy (IntelĀ® SST))" is printed incorrectly). Signed-off-by: Diederick Niehorster --- fftools/cmdutils.c | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 4148285971..b7018b7dab 10064

[FFmpeg-devel] [PATCH 02/33] avdevice/dshow: add use_video_device_timestamps to docs

2021-06-08 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- doc/indevs.texi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/doc/indevs.texi b/doc/indevs.texi index b377924c2f..685b1357a6 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -611,6 +611,12 @@ Save the currently used video capture filter

[FFmpeg-devel] [PATCH 05/33] avdevice/dshow: set no-seek flags

2021-06-08 Thread Diederick Niehorster
not permitted) instead of -22 (invalid argument). This actually seems to apply to many other devices, at least the gdigrab, v4l2, vfwcap, x11grab, fbdev, kmsgrab and android_camera devices, from reading the source. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 2 +- 1 file

[FFmpeg-devel] [PATCH v2 01/33] avdevice/dshow: implement option to use device video timestamps

2021-06-11 Thread Diederick Niehorster
r can switch this off and revert to the old behavior, so a fall back remains available in case the device provides broken timestamps. Closes: #8620 Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 1 + libavdevice/dshow_capture.h | 1 + libavdevice/dshow_pin.c

[FFmpeg-devel] [PATCH v2 02/33] avdevice/dshow: add use_video_device_timestamps to docs

2021-06-11 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- doc/indevs.texi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/doc/indevs.texi b/doc/indevs.texi index b377924c2f..685b1357a6 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -611,6 +611,12 @@ Save the currently used video capture filter

[FFmpeg-devel] [PATCH v2 04/33] avdevice/dshow: handle unknown sample time

2021-06-11 Thread Diederick Niehorster
GetTime may return an error indication that the sample has not timestamps, or may return a NULL start time. In those cases, fall back to graph time. Better debug message in case sample dropped: could now be audio or video frame Signed-off-by: Diederick Niehorster --- libavdevice/dshow_pin.c

[FFmpeg-devel] [PATCH v2 05/33] avdevice/dshow: set no-seek flags

2021-06-11 Thread Diederick Niehorster
not permitted) instead of -22 (invalid argument). This actually seems to apply to many other devices, at least the gdigrab, v4l2, vfwcap, x11grab, fbdev, kmsgrab and android_camera devices, from reading the source. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 2 +- 1 file changed

[FFmpeg-devel] [PATCH v2 06/33] avdevice/dshow: implement get_device_list

2021-06-11 Thread Diederick Niehorster
Needed to enable programmatic discovery of DirectShow devices Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 80 + 1 file changed, 73 insertions(+), 7 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 389daa6380

[FFmpeg-devel] [PATCH v2 07/33] avdevice/dshow: list_devices: show media type(s) per device

2021-06-11 Thread Diederick Niehorster
this now allows to find devices that provide both audio and video, and devices that provide neither. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 103 +--- 1 file changed, 98 insertions(+), 5 deletions(-) diff --git a/libavdevice/dsho

[FFmpeg-devel] [PATCH v2 08/33] avdevice: add info about media types(s) to AVDeviceInfo

2021-06-11 Thread Diederick Niehorster
cases. Users should be provided with this information, so AVDeviceInfo is extended to provide it. Bump avdevice version Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 2 ++ libavdevice/avdevice.h | 2 ++ libavdevice/version.h | 2 +- 3 files changed, 5 insertions(+), 1 deletion

[FFmpeg-devel] [PATCH v2 09/33] avdevice/dshow: add media type info to get_device_list

2021-06-11 Thread Diederick Niehorster
The list returned by get_device_list now contains info about what media type(s), if any, can be provided by each device. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index

[FFmpeg-devel] [PATCH v2 10/33] fftools: provide media type info for devices

2021-06-11 Thread Diederick Niehorster
fftools now print info about what media type(s), if any, are provided by sink and source avdevices. Signed-off-by: Diederick Niehorster --- fftools/cmdutils.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/fftools/cmdutils.c b/fftools

[FFmpeg-devel] [PATCH v2 11/33] avformat: add control_message function to AVInputFormat

2021-06-11 Thread Diederick Niehorster
Control messages are useful for programmatic control of not only outdevs but also indevs. Bumping avformat version. Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 8 +--- libavformat/avformat.h | 6 ++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a

[FFmpeg-devel] [PATCH v2 12/33] avdevice/dshow: implement control_message interface

2021-06-11 Thread Diederick Niehorster
: Diederick Niehorster --- libavdevice/dshow.c | 42 + libavdevice/dshow_capture.h | 1 + 2 files changed, 43 insertions(+) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 3e41f4f99f..9f041e90f8 100644 --- a/libavdevice/dshow.c +++ b/libavdevice

[FFmpeg-devel] [PATCH v2 13/33] avdevice: adding control message requesting to show config dialog

2021-06-11 Thread Diederick Niehorster
This control message can be used to programmatically ask a device to show one of its configuration dialogs. Adding documentation of this message's int argument. Bumping avdevice version. Signed-off-by: Diederick Niehorster --- doc/indevs.texi

[FFmpeg-devel] [PATCH v2 14/33] avdevice/dshow: accept show config dialog control message

2021-06-11 Thread Diederick Niehorster
DirectShow source will pop up its configuration dialog when AV_APP_TO_DEV_CONFIG is received. Implementation for several other possible configuration dialogs is more involved and will be provided in the next commit. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 29

[FFmpeg-devel] [PATCH v2 15/33] avdevice/dshow: tv_tuner_audio_dialog cleanup missing

2021-06-11 Thread Diederick Niehorster
Cleanup was missing for when the show_analog_tv_tuner_audio_dialog is true. Signed-off-by: Diederick Niehorster --- libavdevice/dshow_crossbar.c | 4 1 file changed, 4 insertions(+) diff --git a/libavdevice/dshow_crossbar.c b/libavdevice/dshow_crossbar.c index 2438683cde..961defe690

[FFmpeg-devel] [PATCH v2 16/33] avdevice/dshow: add config dialog command for crossbar and tv tuner

2021-06-11 Thread Diederick Niehorster
The "show config dialog" command message can now also trigger dialog boxes for the crossbar connecting pins filter the analog tuner audio / analog tuner filters. _Untested_ as I do not have either device. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c

[FFmpeg-devel] [PATCH v2 17/33] avdevice/dshow: discover source color range/space/etc

2021-06-11 Thread Diederick Niehorster
Enabled discovering a DirectShow device's color range, space, primaries, transfer characteristics and chroma location, if the device exposes that information. Sets them in the stream's codecpars. Signed-off-by: Diederick Niehorster Co-authored-by: Valerii Zapodovnikov Signed-off-by:

[FFmpeg-devel] [PATCH v2 18/33] avdevice/dshow: select format with extended color info

2021-06-11 Thread Diederick Niehorster
their device. Closes: #9271 Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 460 1 file changed, 332 insertions(+), 128 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index b3fcd9444e..34c7b63220 100644 --- a/libavd

[FFmpeg-devel] [PATCH v2 19/33] avdevice/avdevice: Revert "Deprecate AVDevice Capabilities API"

2021-06-11 Thread Diederick Niehorster
This reverts commit 4f49ca7bbc75a9db4cdf93f27f95a668c751f160. The next few patches clean up the API and implement this capability for avdevice/dshow. Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 71 ++ libavdevice/avdevice.h | 5

[FFmpeg-devel] [PATCH v2 20/33] avdevice/avdevice: clean up avdevice_capabilities_create

2021-06-11 Thread Diederick Niehorster
Draw implementation in line with that of avdevice_list_devices Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index 695b9143af..e66906e91b 100644 --- a

[FFmpeg-devel] [PATCH v2 00/33] avdevice (mostly dshow) enhancements

2021-06-11 Thread Diederick Niehorster
of the avdevices, so in principle it is important that this patchset adds the ability to create an allocated but unopened AVFormatContext+AVInputFormat with the new function avformat_alloc_input_context(). Diederick Niehorster (33): avdevice/dshow: implement option to use device video timestamps

[FFmpeg-devel] [PATCH v2 21/33] avdevice: capabilities API details no longer public

2021-06-11 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 2 +- libavdevice/avdevice.h | 28 +--- libavdevice/internal.h | 33 + libavdevice/version.h | 2 +- 4 files changed, 36 insertions(+), 29 deletions(-) diff --git a

[FFmpeg-devel] [PATCH v2 22/33] avutil/opt: document AVOptionRange min_value > max_value

2021-06-11 Thread Diederick Niehorster
solution. Documenting that an invalid range means value not available allows communicating this situation without adding a field to the AVOptionRange struct. Signed-off-by: Diederick Niehorster --- libavutil/opt.c | 2 +- libavutil/opt.h | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff

[FFmpeg-devel] [PATCH v2 23/33] avutil/opt: add av_opt_print_num

2021-06-11 Thread Diederick Niehorster
age will be shown in upcoming device_get_capabilities example. av_opt_get (body changed) still passes FATE. Signed-off-by: Diederick Niehorster --- libavutil/opt.c | 81 + libavutil/opt.h | 17 +- libavutil/version.h | 2 +- 3 files chan

[FFmpeg-devel] [PATCH v2 24/33] avdevice: Add internal helpers for querying device capabilities

2021-06-11 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- libavdevice/internal.h | 31 +++ libavdevice/utils.c| 48 ++ libavdevice/version.h | 2 +- 3 files changed, 80 insertions(+), 1 deletion(-) diff --git a/libavdevice/internal.h b

[FFmpeg-devel] [PATCH v2 25/33] avdevice/dshow: move audio format helpers

2021-06-11 Thread Diederick Niehorster
Needs to be moved up in file for upcoming implementation of avdevice_capabilities_create. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice

[FFmpeg-devel] [PATCH v2 26/33] avdevice/dshow: when closing, set context fields back to zero

2021-06-11 Thread Diederick Niehorster
their state after cleanup. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 17 + 1 file changed, 17 insertions(+) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 4605bd6f8e..20f58aee63 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -291,14

[FFmpeg-devel] [PATCH v2 27/33] avdevice/dshow: implement capabilities API

2021-06-11 Thread Diederick Niehorster
options, instead of asking them to discover a dshow device's capabilities through the list_options option with an FFmpeg tool, and listing what they want to configure in dumb text boxes. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 377 +-

[FFmpeg-devel] [PATCH v2 28/33] avdevice/dshow: cosmetics

2021-06-11 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 73113acddd..92cfaa062d 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -959,6

[FFmpeg-devel] [PATCH v2 29/33] avformat: add avformat_alloc_input_context()

2021-06-11 Thread Diederick Niehorster
t s->url to "", but keep current url 4. if s->priv_data has already been allocated, do not do so again. 4b. do reset options to default and apply provided options (if any) 5. add 4b to docs of avformat_open_input Bumping avformat version. Signed-off-by: Diederick Nieh

[FFmpeg-devel] [PATCH v2 30/33] doc/examples: adding device_get_capabilities example

2021-06-11 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- configure | 2 + doc/examples/.gitignore| 1 + doc/examples/Makefile | 1 + doc/examples/Makefile.example | 1 + doc/examples/device_get_capabilities.c | 190

  1   2   3   >