* [FFmpeg-devel] [PATCH 1/4] avformat/avio: Make avio_print_string_array() accept const pointers
@ 2024-02-28 19:06 Andreas Rheinhardt
2024-02-28 19:07 ` [FFmpeg-devel] [PATCH 2/4] avutil/timestamp: Constify av_ts_make_time_string() Andreas Rheinhardt
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Andreas Rheinhardt @ 2024-02-28 19:06 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
doc/APIchanges | 3 +++
libavformat/avio.h | 2 +-
libavformat/aviobuf.c | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index 10f6667e9e..055e6848a3 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09
API changes, most recent first:
+2024-02-28 - xxxxxxxxxx - lavf 60.xx.100 - avio.h
+ avio_print_string_array() now accepts an array of const pointers.
+
2024-02-26 - xxxxxxxxxx - lavf 60.22.101 - avformat.h
AV_DISPOSITION_DEPENDENT may now also be used for video streams
intended to be merged with other video streams for presentation.
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 887a397c37..43bce60ffd 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -544,7 +544,7 @@ int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);
* Usually you don't need to use this function directly but its macro wrapper,
* avio_print.
*/
-void avio_print_string_array(AVIOContext *s, const char *strings[]);
+void avio_print_string_array(AVIOContext *s, const char * const strings[]);
/**
* Write strings (const char *) to the context.
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 76780bc852..d80b8527bb 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -1400,7 +1400,7 @@ int avio_printf(AVIOContext *s, const char *fmt, ...)
return ret;
}
-void avio_print_string_array(AVIOContext *s, const char *strings[])
+void avio_print_string_array(AVIOContext *s, const char *const strings[])
{
for(; *strings; strings++)
avio_write(s, (const unsigned char *)*strings, strlen(*strings));
--
2.40.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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* [FFmpeg-devel] [PATCH 2/4] avutil/timestamp: Constify av_ts_make_time_string()
2024-02-28 19:06 [FFmpeg-devel] [PATCH 1/4] avformat/avio: Make avio_print_string_array() accept const pointers Andreas Rheinhardt
@ 2024-02-28 19:07 ` Andreas Rheinhardt
2024-02-28 19:07 ` [FFmpeg-devel] [PATCH 3/4] swresample/swresample: Constify swr_convert() Andreas Rheinhardt
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Andreas Rheinhardt @ 2024-02-28 19:07 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
(Actually, the time base should be passed by value.)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
doc/APIchanges | 3 +++
libavutil/timestamp.h | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index 055e6848a3..2fca5b7ea8 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09
API changes, most recent first:
+2024-02-28 - xxxxxxxxxx - lavu 58.xx.100 - timestamp.h
+ av_ts_make_time_string() now accepts a pointer to const AVRational.
+
2024-02-28 - xxxxxxxxxx - lavf 60.xx.100 - avio.h
avio_print_string_array() now accepts an array of const pointers.
diff --git a/libavutil/timestamp.h b/libavutil/timestamp.h
index 9ae64da8a1..2b37781eba 100644
--- a/libavutil/timestamp.h
+++ b/libavutil/timestamp.h
@@ -62,7 +62,8 @@ static inline char *av_ts_make_string(char *buf, int64_t ts)
* @param tb the timebase of the timestamp
* @return the buffer in input
*/
-static inline char *av_ts_make_time_string(char *buf, int64_t ts, AVRational *tb)
+static inline char *av_ts_make_time_string(char *buf, int64_t ts,
+ const AVRational *tb)
{
if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS");
else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%.6g", av_q2d(*tb) * ts);
--
2.40.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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* [FFmpeg-devel] [PATCH 3/4] swresample/swresample: Constify swr_convert()
2024-02-28 19:06 [FFmpeg-devel] [PATCH 1/4] avformat/avio: Make avio_print_string_array() accept const pointers Andreas Rheinhardt
2024-02-28 19:07 ` [FFmpeg-devel] [PATCH 2/4] avutil/timestamp: Constify av_ts_make_time_string() Andreas Rheinhardt
@ 2024-02-28 19:07 ` Andreas Rheinhardt
2024-02-28 19:07 ` [FFmpeg-devel] [PATCH 4/4] fftools/ffmpeg_demux, sync_queue: Constify a bit Andreas Rheinhardt
2024-03-01 11:37 ` [FFmpeg-devel] [PATCH 1/4] avformat/avio: Make avio_print_string_array() accept const pointers Andreas Rheinhardt
3 siblings, 0 replies; 5+ messages in thread
From: Andreas Rheinhardt @ 2024-02-28 19:07 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
doc/APIchanges | 3 +++
libswresample/swresample.c | 7 ++++---
libswresample/swresample.h | 4 ++--
libswresample/version.h | 2 +-
4 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index 2fca5b7ea8..7d34d12c62 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09
API changes, most recent first:
+2024-02-28 - xxxxxxxxxx - swr 4.14.100 - swresample.h
+ swr_convert() now accepts arrays of const pointers (to input and output).
+
2024-02-28 - xxxxxxxxxx - lavu 58.xx.100 - timestamp.h
av_ts_make_time_string() now accepts a pointer to const AVRational.
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 1cf83a803f..6948892d76 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -563,7 +563,8 @@ static void copy(AudioData *out, AudioData *in,
memcpy(out->ch[0], in->ch[0], count*out->ch_count*out->bps);
}
-static void fill_audiodata(AudioData *out, uint8_t *in_arg [SWR_CH_MAX]){
+static void fill_audiodata(AudioData *out, uint8_t *const in_arg [SWR_CH_MAX])
+{
int i;
if(!in_arg){
memset(out->ch, 0, sizeof(out->ch));
@@ -835,8 +836,8 @@ int swr_is_initialized(struct SwrContext *s) {
}
int attribute_align_arg swr_convert(struct SwrContext *s,
- uint8_t **out_arg, int out_count,
- const uint8_t **in_arg, int in_count)
+ uint8_t * const *out_arg, int out_count,
+ const uint8_t * const *in_arg, int in_count)
{
AudioData * in= &s->in;
AudioData *out= &s->out;
diff --git a/libswresample/swresample.h b/libswresample/swresample.h
index d4dcaebdcf..78495a0d4c 100644
--- a/libswresample/swresample.h
+++ b/libswresample/swresample.h
@@ -340,8 +340,8 @@ void swr_close(struct SwrContext *s);
*
* @return number of samples output per channel, negative value on error
*/
-int swr_convert(struct SwrContext *s, uint8_t **out, int out_count,
- const uint8_t **in , int in_count);
+int swr_convert(struct SwrContext *s, uint8_t * const *out, int out_count,
+ const uint8_t * const *in , int in_count);
/**
* Convert the next timestamp from input to output
diff --git a/libswresample/version.h b/libswresample/version.h
index 46a4e2fc62..dfaf6f8c42 100644
--- a/libswresample/version.h
+++ b/libswresample/version.h
@@ -30,7 +30,7 @@
#include "version_major.h"
-#define LIBSWRESAMPLE_VERSION_MINOR 13
+#define LIBSWRESAMPLE_VERSION_MINOR 14
#define LIBSWRESAMPLE_VERSION_MICRO 100
#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
--
2.40.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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* [FFmpeg-devel] [PATCH 4/4] fftools/ffmpeg_demux, sync_queue: Constify a bit
2024-02-28 19:06 [FFmpeg-devel] [PATCH 1/4] avformat/avio: Make avio_print_string_array() accept const pointers Andreas Rheinhardt
2024-02-28 19:07 ` [FFmpeg-devel] [PATCH 2/4] avutil/timestamp: Constify av_ts_make_time_string() Andreas Rheinhardt
2024-02-28 19:07 ` [FFmpeg-devel] [PATCH 3/4] swresample/swresample: Constify swr_convert() Andreas Rheinhardt
@ 2024-02-28 19:07 ` Andreas Rheinhardt
2024-03-01 11:37 ` [FFmpeg-devel] [PATCH 1/4] avformat/avio: Make avio_print_string_array() accept const pointers Andreas Rheinhardt
3 siblings, 0 replies; 5+ messages in thread
From: Andreas Rheinhardt @ 2024-02-28 19:07 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
fftools/ffmpeg_demux.c | 2 +-
fftools/sync_queue.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index d5a3dbc1d2..29f4a26224 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -161,7 +161,7 @@ InputStream *ist_find_unused(enum AVMediaType type)
static void report_new_stream(Demuxer *d, const AVPacket *pkt)
{
- AVStream *st = d->f.ctx->streams[pkt->stream_index];
+ const AVStream *st = d->f.ctx->streams[pkt->stream_index];
if (pkt->stream_index < d->nb_streams_warn)
return;
diff --git a/fftools/sync_queue.c b/fftools/sync_queue.c
index bc107ba4fe..0e35b5b1cb 100644
--- a/fftools/sync_queue.c
+++ b/fftools/sync_queue.c
@@ -319,7 +319,7 @@ static int overflow_heartbeat(SyncQueue *sq, int stream_idx)
/* signal a fake timestamp for all streams that prevent tail_ts from being output */
tail_ts++;
for (unsigned int i = 0; i < sq->nb_streams; i++) {
- SyncQueueStream *st1 = &sq->streams[i];
+ const SyncQueueStream *st1 = &sq->streams[i];
int64_t ts;
if (st == st1 || st1->finished ||
@@ -524,8 +524,8 @@ fail:
static int receive_for_stream(SyncQueue *sq, unsigned int stream_idx,
SyncQueueFrame frame)
{
- SyncQueueStream *st_head = sq->head_stream >= 0 ?
- &sq->streams[sq->head_stream] : NULL;
+ const SyncQueueStream *st_head = sq->head_stream >= 0 ?
+ &sq->streams[sq->head_stream] : NULL;
SyncQueueStream *st;
av_assert0(stream_idx < sq->nb_streams);
--
2.40.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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/4] avformat/avio: Make avio_print_string_array() accept const pointers
2024-02-28 19:06 [FFmpeg-devel] [PATCH 1/4] avformat/avio: Make avio_print_string_array() accept const pointers Andreas Rheinhardt
` (2 preceding siblings ...)
2024-02-28 19:07 ` [FFmpeg-devel] [PATCH 4/4] fftools/ffmpeg_demux, sync_queue: Constify a bit Andreas Rheinhardt
@ 2024-03-01 11:37 ` Andreas Rheinhardt
3 siblings, 0 replies; 5+ messages in thread
From: Andreas Rheinhardt @ 2024-03-01 11:37 UTC (permalink / raw)
To: ffmpeg-devel
Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> doc/APIchanges | 3 +++
> libavformat/avio.h | 2 +-
> libavformat/aviobuf.c | 2 +-
> 3 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 10f6667e9e..055e6848a3 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09
>
> API changes, most recent first:
>
> +2024-02-28 - xxxxxxxxxx - lavf 60.xx.100 - avio.h
> + avio_print_string_array() now accepts an array of const pointers.
> +
> 2024-02-26 - xxxxxxxxxx - lavf 60.22.101 - avformat.h
> AV_DISPOSITION_DEPENDENT may now also be used for video streams
> intended to be merged with other video streams for presentation.
> diff --git a/libavformat/avio.h b/libavformat/avio.h
> index 887a397c37..43bce60ffd 100644
> --- a/libavformat/avio.h
> +++ b/libavformat/avio.h
> @@ -544,7 +544,7 @@ int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);
> * Usually you don't need to use this function directly but its macro wrapper,
> * avio_print.
> */
> -void avio_print_string_array(AVIOContext *s, const char *strings[]);
> +void avio_print_string_array(AVIOContext *s, const char * const strings[]);
>
> /**
> * Write strings (const char *) to the context.
> diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
> index 76780bc852..d80b8527bb 100644
> --- a/libavformat/aviobuf.c
> +++ b/libavformat/aviobuf.c
> @@ -1400,7 +1400,7 @@ int avio_printf(AVIOContext *s, const char *fmt, ...)
> return ret;
> }
>
> -void avio_print_string_array(AVIOContext *s, const char *strings[])
> +void avio_print_string_array(AVIOContext *s, const char *const strings[])
> {
> for(; *strings; strings++)
> avio_write(s, (const unsigned char *)*strings, strlen(*strings));
Will apply this patchset tomorrow unless there are objections.
- Andreas
_______________________________________________
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:[~2024-03-01 11:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-28 19:06 [FFmpeg-devel] [PATCH 1/4] avformat/avio: Make avio_print_string_array() accept const pointers Andreas Rheinhardt
2024-02-28 19:07 ` [FFmpeg-devel] [PATCH 2/4] avutil/timestamp: Constify av_ts_make_time_string() Andreas Rheinhardt
2024-02-28 19:07 ` [FFmpeg-devel] [PATCH 3/4] swresample/swresample: Constify swr_convert() Andreas Rheinhardt
2024-02-28 19:07 ` [FFmpeg-devel] [PATCH 4/4] fftools/ffmpeg_demux, sync_queue: Constify a bit Andreas Rheinhardt
2024-03-01 11:37 ` [FFmpeg-devel] [PATCH 1/4] avformat/avio: Make avio_print_string_array() accept const pointers Andreas Rheinhardt
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