Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 0/2] avisynth: pass audio channel layout
@ 2023-07-16  5:12 Stephen Hutchinson
  2023-07-16  5:12 ` [FFmpeg-devel] [PATCH 1/2] " Stephen Hutchinson
  2023-07-16  5:12 ` [FFmpeg-devel] [PATCH 2/2] configure: bump minimum AviSynth+ header version Stephen Hutchinson
  0 siblings, 2 replies; 5+ messages in thread
From: Stephen Hutchinson @ 2023-07-16  5:12 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Stephen Hutchinson

AviSynth+ 3.7.3 adds the ability to define audio
channel layouts, and adding it to the libavformat
demuxer is trivial.

Bumps the minimum required version of the AviSynth+
headers to 3.7.3.

Stephen Hutchinson (2):
  avisynth: pass audio channel layout
  configure: bump minimum AviSynth+ header version

 configure              | 4 ++--
 libavformat/avisynth.c | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

-- 
2.39.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [FFmpeg-devel] [PATCH 1/2] avisynth: pass audio channel layout
  2023-07-16  5:12 [FFmpeg-devel] [PATCH 0/2] avisynth: pass audio channel layout Stephen Hutchinson
@ 2023-07-16  5:12 ` Stephen Hutchinson
  2023-07-19 23:36   ` Stephen Hutchinson
  2023-07-16  5:12 ` [FFmpeg-devel] [PATCH 2/2] configure: bump minimum AviSynth+ header version Stephen Hutchinson
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hutchinson @ 2023-07-16  5:12 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Stephen Hutchinson

---
 libavformat/avisynth.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c
index b426ac343e..027e8c63f6 100644
--- a/libavformat/avisynth.c
+++ b/libavformat/avisynth.c
@@ -62,6 +62,7 @@ typedef struct AviSynthLibrary {
     AVSC_DECLARE_FUNC(avs_create_script_environment);
     AVSC_DECLARE_FUNC(avs_delete_script_environment);
     AVSC_DECLARE_FUNC(avs_get_audio);
+    AVSC_DECLARE_FUNC(avs_get_channel_mask);
     AVSC_DECLARE_FUNC(avs_get_error);
     AVSC_DECLARE_FUNC(avs_get_frame);
     AVSC_DECLARE_FUNC(avs_get_version);
@@ -157,6 +158,7 @@ static av_cold int avisynth_load_library(void)
     LOAD_AVS_FUNC(avs_create_script_environment, 0);
     LOAD_AVS_FUNC(avs_delete_script_environment, 0);
     LOAD_AVS_FUNC(avs_get_audio, 0);
+    LOAD_AVS_FUNC(avs_get_channel_mask, 1);
     LOAD_AVS_FUNC(avs_get_error, 1); // New to AviSynth 2.6
     LOAD_AVS_FUNC(avs_get_frame, 0);
     LOAD_AVS_FUNC(avs_get_version, 0);
@@ -793,6 +795,10 @@ static int avisynth_create_stream_audio(AVFormatContext *s, AVStream *st)
     st->duration                        = avs->vi->num_audio_samples;
     avpriv_set_pts_info(st, 64, 1, avs->vi->audio_samples_per_second);
 
+    if (avs_library.avs_get_version(avs->clip) >= 10)
+        av_channel_layout_from_mask(&st->codecpar->ch_layout,
+                                    avs_library.avs_get_channel_mask(avs->vi));
+
     switch (avs->vi->sample_type) {
     case AVS_SAMPLE_INT8:
         st->codecpar->codec_id = AV_CODEC_ID_PCM_U8;
-- 
2.39.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [FFmpeg-devel] [PATCH 2/2] configure: bump minimum AviSynth+ header version
  2023-07-16  5:12 [FFmpeg-devel] [PATCH 0/2] avisynth: pass audio channel layout Stephen Hutchinson
  2023-07-16  5:12 ` [FFmpeg-devel] [PATCH 1/2] " Stephen Hutchinson
@ 2023-07-16  5:12 ` Stephen Hutchinson
  2023-07-19 23:36   ` Stephen Hutchinson
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hutchinson @ 2023-07-16  5:12 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Stephen Hutchinson

AVISYNTH_INTERFACE_VERSION 10 fell in-between the releases of
3.7.2 and 3.7.3, and is required to be able to read the channel
layout information.
---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index dab3fb9036..a85122921e 100755
--- a/configure
+++ b/configure
@@ -6657,8 +6657,8 @@ done
 
 # these are off by default, so fail if requested and not available
 enabled avisynth          && { require_headers "avisynth/avisynth_c.h avisynth/avs/version.h" &&
-                               { test_cpp_condition avisynth/avs/version.h "AVS_MAJOR_VER >= 3 && AVS_MINOR_VER >= 7 && AVS_BUGFIX_VER >= 1 || AVS_MAJOR_VER >= 3 && AVS_MINOR_VER > 7 || AVS_MAJOR_VER > 3" ||
-                                 die "ERROR: AviSynth+ header version must be >= 3.7.1"; } }
+                               { test_cpp_condition avisynth/avs/version.h "AVS_MAJOR_VER >= 3 && AVS_MINOR_VER >= 7 && AVS_BUGFIX_VER >= 3 || AVS_MAJOR_VER >= 3 && AVS_MINOR_VER > 7 || AVS_MAJOR_VER > 3" ||
+                                 die "ERROR: AviSynth+ header version must be >= 3.7.3"; } }
 enabled cuda_nvcc         && { check_nvcc cuda_nvcc || die "ERROR: failed checking for nvcc."; }
 enabled chromaprint       && { check_pkg_config chromaprint libchromaprint "chromaprint.h" chromaprint_get_version ||
                                require chromaprint chromaprint.h chromaprint_get_version -lchromaprint; }
-- 
2.39.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/2] avisynth: pass audio channel layout
  2023-07-16  5:12 ` [FFmpeg-devel] [PATCH 1/2] " Stephen Hutchinson
@ 2023-07-19 23:36   ` Stephen Hutchinson
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Hutchinson @ 2023-07-19 23:36 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On 7/16/23 1:12 AM, Stephen Hutchinson wrote:
> ---
>   libavformat/avisynth.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c
> index b426ac343e..027e8c63f6 100644
> --- a/libavformat/avisynth.c
> +++ b/libavformat/avisynth.c
> @@ -62,6 +62,7 @@ typedef struct AviSynthLibrary {
>       AVSC_DECLARE_FUNC(avs_create_script_environment);
>       AVSC_DECLARE_FUNC(avs_delete_script_environment);
>       AVSC_DECLARE_FUNC(avs_get_audio);
> +    AVSC_DECLARE_FUNC(avs_get_channel_mask);
>       AVSC_DECLARE_FUNC(avs_get_error);
>       AVSC_DECLARE_FUNC(avs_get_frame);
>       AVSC_DECLARE_FUNC(avs_get_version);
> @@ -157,6 +158,7 @@ static av_cold int avisynth_load_library(void)
>       LOAD_AVS_FUNC(avs_create_script_environment, 0);
>       LOAD_AVS_FUNC(avs_delete_script_environment, 0);
>       LOAD_AVS_FUNC(avs_get_audio, 0);
> +    LOAD_AVS_FUNC(avs_get_channel_mask, 1);
>       LOAD_AVS_FUNC(avs_get_error, 1); // New to AviSynth 2.6
>       LOAD_AVS_FUNC(avs_get_frame, 0);
>       LOAD_AVS_FUNC(avs_get_version, 0);
> @@ -793,6 +795,10 @@ static int avisynth_create_stream_audio(AVFormatContext *s, AVStream *st)
>       st->duration                        = avs->vi->num_audio_samples;
>       avpriv_set_pts_info(st, 64, 1, avs->vi->audio_samples_per_second);
>   
> +    if (avs_library.avs_get_version(avs->clip) >= 10)
> +        av_channel_layout_from_mask(&st->codecpar->ch_layout,
> +                                    avs_library.avs_get_channel_mask(avs->vi));
> +
>       switch (avs->vi->sample_type) {
>       case AVS_SAMPLE_INT8:
>           st->codecpar->codec_id = AV_CODEC_ID_PCM_U8;

Pushed.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [FFmpeg-devel] [PATCH 2/2] configure: bump minimum AviSynth+ header version
  2023-07-16  5:12 ` [FFmpeg-devel] [PATCH 2/2] configure: bump minimum AviSynth+ header version Stephen Hutchinson
@ 2023-07-19 23:36   ` Stephen Hutchinson
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Hutchinson @ 2023-07-19 23:36 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On 7/16/23 1:12 AM, Stephen Hutchinson wrote:
> AVISYNTH_INTERFACE_VERSION 10 fell in-between the releases of
> 3.7.2 and 3.7.3, and is required to be able to read the channel
> layout information.
> ---
>   configure | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index dab3fb9036..a85122921e 100755
> --- a/configure
> +++ b/configure
> @@ -6657,8 +6657,8 @@ done
>   
>   # these are off by default, so fail if requested and not available
>   enabled avisynth          && { require_headers "avisynth/avisynth_c.h avisynth/avs/version.h" &&
> -                               { test_cpp_condition avisynth/avs/version.h "AVS_MAJOR_VER >= 3 && AVS_MINOR_VER >= 7 && AVS_BUGFIX_VER >= 1 || AVS_MAJOR_VER >= 3 && AVS_MINOR_VER > 7 || AVS_MAJOR_VER > 3" ||
> -                                 die "ERROR: AviSynth+ header version must be >= 3.7.1"; } }
> +                               { test_cpp_condition avisynth/avs/version.h "AVS_MAJOR_VER >= 3 && AVS_MINOR_VER >= 7 && AVS_BUGFIX_VER >= 3 || AVS_MAJOR_VER >= 3 && AVS_MINOR_VER > 7 || AVS_MAJOR_VER > 3" ||
> +                                 die "ERROR: AviSynth+ header version must be >= 3.7.3"; } }
>   enabled cuda_nvcc         && { check_nvcc cuda_nvcc || die "ERROR: failed checking for nvcc."; }
>   enabled chromaprint       && { check_pkg_config chromaprint libchromaprint "chromaprint.h" chromaprint_get_version ||
>                                  require chromaprint chromaprint.h chromaprint_get_version -lchromaprint; }

Pushed.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-19 23:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-16  5:12 [FFmpeg-devel] [PATCH 0/2] avisynth: pass audio channel layout Stephen Hutchinson
2023-07-16  5:12 ` [FFmpeg-devel] [PATCH 1/2] " Stephen Hutchinson
2023-07-19 23:36   ` Stephen Hutchinson
2023-07-16  5:12 ` [FFmpeg-devel] [PATCH 2/2] configure: bump minimum AviSynth+ header version Stephen Hutchinson
2023-07-19 23:36   ` Stephen Hutchinson

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git