diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-05-25 19:11:34 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-05-28 11:18:53 +0200 |
commit | c6e73ad2b783b81e043d1b04c69d8dbe93237068 (patch) | |
tree | eff1276f2b793b4e47f2094d73e4a6baaacda441 /libavformat | |
parent | ab42db9bed019c1247fb20c9d7be77ff9ccb006a (diff) | |
download | ffmpeg-c6e73ad2b783b81e043d1b04c69d8dbe93237068.tar.gz |
avformat/hlsplaylist: Add const where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/hlsplaylist.c | 27 | ||||
-rw-r--r-- | libavformat/hlsplaylist.h | 23 |
2 files changed, 29 insertions, 21 deletions
diff --git a/libavformat/hlsplaylist.c b/libavformat/hlsplaylist.c index 43f9d281ba..7a89846369 100644 --- a/libavformat/hlsplaylist.c +++ b/libavformat/hlsplaylist.c @@ -35,8 +35,10 @@ void ff_hls_write_playlist_version(AVIOContext *out, int version) { avio_printf(out, "#EXT-X-VERSION:%d\n", version); } -void ff_hls_write_audio_rendition(AVIOContext *out, char *agroup, - const char *filename, char *language, int name_id, int is_default) { +void ff_hls_write_audio_rendition(AVIOContext *out, const char *agroup, + const char *filename, const char *language, + int name_id, int is_default) +{ if (!out || !agroup || !filename) return; @@ -48,8 +50,10 @@ void ff_hls_write_audio_rendition(AVIOContext *out, char *agroup, avio_printf(out, "URI=\"%s\"\n", filename); } -void ff_hls_write_subtitle_rendition(AVIOContext *out, char *sgroup, - const char *filename, char *language, int name_id, int is_default) { +void ff_hls_write_subtitle_rendition(AVIOContext *out, const char *sgroup, + const char *filename, const char *language, + int name_id, int is_default) +{ if (!out || !filename) return; @@ -61,10 +65,11 @@ void ff_hls_write_subtitle_rendition(AVIOContext *out, char *sgroup, avio_printf(out, "URI=\"%s\"\n", filename); } -void ff_hls_write_stream_info(AVStream *st, AVIOContext *out, - int bandwidth, const char *filename, char *agroup, - char *codecs, char *ccgroup, char *sgroup) { - +void ff_hls_write_stream_info(AVStream *st, AVIOContext *out, int bandwidth, + const char *filename, const char *agroup, + const char *codecs, const char *ccgroup, + const char *sgroup) +{ if (!out || !filename) return; @@ -112,7 +117,7 @@ void ff_hls_write_playlist_header(AVIOContext *out, int version, int allowcache, } } -void ff_hls_write_init_file(AVIOContext *out, char *filename, +void ff_hls_write_init_file(AVIOContext *out, const char *filename, int byterange_mode, int64_t size, int64_t pos) { avio_printf(out, "#EXT-X-MAP:URI=\"%s\"", filename); if (byterange_mode) { @@ -125,8 +130,8 @@ int ff_hls_write_file_entry(AVIOContext *out, int insert_discont, int byterange_mode, double duration, int round_duration, int64_t size, int64_t pos, //Used only if HLS_SINGLE_FILE flag is set - char *baseurl, //Ignored if NULL - char *filename, double *prog_date_time, + const char *baseurl /* Ignored if NULL */, + const char *filename, double *prog_date_time, int64_t video_keyframe_size, int64_t video_keyframe_pos, int iframe_mode) { if (!out || !filename) return AVERROR(EINVAL); diff --git a/libavformat/hlsplaylist.h b/libavformat/hlsplaylist.h index a124bdcffb..4348a26c75 100644 --- a/libavformat/hlsplaylist.h +++ b/libavformat/hlsplaylist.h @@ -37,24 +37,27 @@ typedef enum { } PlaylistType; void ff_hls_write_playlist_version(AVIOContext *out, int version); -void ff_hls_write_audio_rendition(AVIOContext *out, char *agroup, - const char *filename, char *language, int name_id, int is_default); -void ff_hls_write_subtitle_rendition(AVIOContext *out, char *sgroup, - const char *filename, char *language, int name_id, int is_default); -void ff_hls_write_stream_info(AVStream *st, AVIOContext *out, - int bandwidth, const char *filename, char *agroup, - char *codecs, char *ccgroup, char *sgroup); +void ff_hls_write_audio_rendition(AVIOContext *out, const char *agroup, + const char *filename, const char *language, + int name_id, int is_default); +void ff_hls_write_subtitle_rendition(AVIOContext *out, const char *sgroup, + const char *filename, const char *language, + int name_id, int is_default); +void ff_hls_write_stream_info(AVStream *st, AVIOContext *out, int bandwidth, + const char *filename, const char *agroup, + const char *codecs, const char *ccgroup, + const char *sgroup); void ff_hls_write_playlist_header(AVIOContext *out, int version, int allowcache, int target_duration, int64_t sequence, uint32_t playlist_type, int iframe_mode); -void ff_hls_write_init_file(AVIOContext *out, char *filename, +void ff_hls_write_init_file(AVIOContext *out, const char *filename, int byterange_mode, int64_t size, int64_t pos); int ff_hls_write_file_entry(AVIOContext *out, int insert_discont, int byterange_mode, double duration, int round_duration, int64_t size, int64_t pos, //Used only if HLS_SINGLE_FILE flag is set - char *baseurl, //Ignored if NULL - char *filename, double *prog_date_time, + const char *baseurl /* Ignored if NULL */, + const char *filename, double *prog_date_time, int64_t video_keyframe_size, int64_t video_keyframe_pos, int iframe_mode); void ff_hls_write_end_list (AVIOContext *out); |