Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH v2 14/22] avformat/avio_internal: Don't include url.h
Date: Thu,  7 Sep 2023 03:05:30 +0200
Message-ID: <AS8P250MB074402147093AB0FE6E13D988FEEA@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <AS8P250MB0744BBA654FCCAFE5649A4868FEEA@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>

It is only included because two very rarely used functions
use pointers to URLContexts; use struct URLContext instead.
Also move ffio_geturlcontext() so that one can avoid
a forward declaration of struct URLContext (which would be
necessary as soon as FF_API_AVIODIRCONTEXT is no more).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/avio_internal.h | 19 +++++++++----------
 libavformat/dashdec.c       |  1 +
 libavformat/format.c        |  1 +
 libavformat/hls.c           |  1 +
 libavformat/hlsenc.c        |  1 +
 libavformat/rtpenc_chain.c  |  1 +
 6 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h
index 57796ade03..aef6ab660e 100644
--- a/libavformat/avio_internal.h
+++ b/libavformat/avio_internal.h
@@ -20,7 +20,6 @@
 #define AVFORMAT_AVIO_INTERNAL_H
 
 #include "avio.h"
-#include "url.h"
 
 #include "libavutil/log.h"
 
@@ -194,6 +193,14 @@ unsigned long ff_crcA001_update(unsigned long checksum, const uint8_t *buf,
  */
 int ffio_open_dyn_packet_buf(AVIOContext **s, int max_packet_size);
 
+/**
+ * Return the URLContext associated with the AVIOContext
+ *
+ * @param s IO context
+ * @return pointer to URLContext or NULL.
+ */
+struct URLContext *ffio_geturlcontext(AVIOContext *s);
+
 /**
  * Create and initialize a AVIOContext for accessing the
  * resource referenced by the URLContext h.
@@ -205,15 +212,7 @@ int ffio_open_dyn_packet_buf(AVIOContext **s, int max_packet_size);
  * @return >= 0 in case of success, a negative value corresponding to an
  * AVERROR code in case of failure
  */
-int ffio_fdopen(AVIOContext **s, URLContext *h);
-
-/**
- * Return the URLContext associated with the AVIOContext
- *
- * @param s IO context
- * @return pointer to URLContext or NULL.
- */
-URLContext *ffio_geturlcontext(AVIOContext *s);
+int ffio_fdopen(AVIOContext **s, struct URLContext *h);
 
 
 /**
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index f4af625814..cbe34f4f50 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -29,6 +29,7 @@
 #include "avio_internal.h"
 #include "dash.h"
 #include "demux.h"
+#include "url.h"
 
 #define INITIAL_BUFFER_SIZE 32768
 
diff --git a/libavformat/format.c b/libavformat/format.c
index c91f71057a..477ad6b43b 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -30,6 +30,7 @@
 #include "avformat.h"
 #include "id3v2.h"
 #include "internal.h"
+#include "url.h"
 
 
 /**
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 276e4ee333..b2a93d578b 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -43,6 +43,7 @@
 #include "internal.h"
 #include "avio_internal.h"
 #include "id3v2.h"
+#include "url.h"
 
 #include "hls_sample_encryption.h"
 
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 12e20580ee..08f3746ce7 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -51,6 +51,7 @@
 #include "internal.h"
 #include "mux.h"
 #include "os_support.h"
+#include "url.h"
 
 typedef enum {
     HLS_START_SEQUENCE_AS_START_NUMBER = 0,
diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c
index cd751f48b6..45d0e313fd 100644
--- a/libavformat/rtpenc_chain.c
+++ b/libavformat/rtpenc_chain.c
@@ -23,6 +23,7 @@
 #include "avio_internal.h"
 #include "rtpenc_chain.h"
 #include "rtp.h"
+#include "url.h"
 #include "libavutil/opt.h"
 
 int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s,
-- 
2.34.1

_______________________________________________
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".

  parent reply	other threads:[~2023-09-07  1:06 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07  1:02 [FFmpeg-devel] [PATCH v2 01/22] fate/demux, lavf-container: Workaround for AV1-aspect ratio issue Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 02/22] avformat/avio: Don't use incompatible function pointer type for call Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 03/22] avformat/internal: Avoid casting const away Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 04/22] avformat/aviobuf: Don't use incompatible function pointer type for call Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 05/22] avformat/dashenc: Avoid unnecessary casts Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 06/22] avformat/dashenc: Use proper type for AVCodecIDs Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 07/22] avformat/dashenc: Add const where appropriate Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 08/22] avformat/dashenc: Simplify getting format string Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 09/22] avformat/dashenc: Avoid relocations for short strings Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 10/22] avformat/teeproto: Remove useless AVClass without options Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 11/22] avdevice/lavfi: Remove unnecessary avio_internal.h inclusion Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 12/22] avformat: Remove avformat and avio headers from protocols Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 13/22] avformat/teeproto: Remove always-false check Andreas Rheinhardt
2023-09-07  1:05 ` Andreas Rheinhardt [this message]
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 15/22] avformat/avio: Constify data pointees of write callbacks Andreas Rheinhardt
2023-09-07 15:02   ` Anton Khirnov
2023-09-07 17:08     ` Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 16/22] avutil/imgutils: Constify some pointees Andreas Rheinhardt
2023-09-10 11:09   ` Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 17/22] avutil/samplefmt: " Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 18/22] avutil/audio_fifo: " Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 19/22] avutil/fifo: Constify AVFifo pointees in peek functions Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 20/22] avcodec/v210dec: Don't cast const away Andreas Rheinhardt
2023-09-07  7:36   ` Paul B Mahol
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 21/22] avutil/imgutils: Add wrapper for av_image_copy() to avoid casts Andreas Rheinhardt
2023-09-07  1:05 ` [FFmpeg-devel] [PATCH v2 22/22] avfilter/vf_framepack: Use dedicated pointer for access Andreas Rheinhardt
2023-09-07 10:38 ` [FFmpeg-devel] [PATCH 23/26] avformat/avio: Remove duplicated freeing code Andreas Rheinhardt
2023-09-07 10:38 ` [FFmpeg-devel] [PATCH 24/26] avformat/avio: Remove redundant checks Andreas Rheinhardt
2023-09-07 10:38 ` [FFmpeg-devel] [PATCH 25/26] all: Use av_frame_replace() where appropriate Andreas Rheinhardt
2023-09-07 10:38 ` [FFmpeg-devel] [PATCH 26/26] avfilter/buffersrc: Use av_frame_clone() " Andreas Rheinhardt
2023-09-07 11:09   ` Nicolas George
2023-09-07 14:03 ` [FFmpeg-devel] [PATCH 27/31] avfilter/vf_vif: Don't cast const away unnecessarily Andreas Rheinhardt
2023-09-07 14:32   ` Paul B Mahol
2023-09-07 14:03 ` [FFmpeg-devel] [PATCH 28/31] avfilter/vsrc_testsrc: Don't use const uint8_t* when pointee changes Andreas Rheinhardt
2023-09-07 14:47   ` Paul B Mahol
2023-09-07 14:03 ` [FFmpeg-devel] [PATCH 29/31] avcodec/tiff: Don't cast const away Andreas Rheinhardt
2023-09-07 17:58   ` Paul B Mahol
2023-09-07 14:03 ` [FFmpeg-devel] [PATCH 30/31] avfilter/vf_varblur: Don't use pointer-to-const for destination Andreas Rheinhardt
2023-09-07 14:31   ` Paul B Mahol
2023-09-07 14:03 ` [FFmpeg-devel] [PATCH 31/31] avfilter/blend_modes: Always preserve constness Andreas Rheinhardt
2023-09-07 14:32   ` Paul B Mahol
2023-09-10 10:23 ` [FFmpeg-devel] [PATCH v2 01/22] fate/demux, lavf-container: Workaround for AV1-aspect ratio issue Andreas Rheinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AS8P250MB074402147093AB0FE6E13D988FEEA@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
    --to=andreas.rheinhardt@outlook.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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