lavf/rtpdec*: Constify all RTPDynamicProtocolHandler.

Reviewed-by: Muhammad Faiz
This commit is contained in:
Carl Eugen Hoyos 2018-02-12 22:21:06 +01:00
parent 71f39de2a5
commit dc77e64f2d
26 changed files with 73 additions and 73 deletions

View File

@ -122,7 +122,7 @@ static int ac3_handle_packet(AVFormatContext *ctx, PayloadContext *data,
return 0;
}
RTPDynamicProtocolHandler ff_ac3_dynamic_handler = {
const RTPDynamicProtocolHandler ff_ac3_dynamic_handler = {
.enc_name = "ac3",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_AC3,

View File

@ -182,7 +182,7 @@ static int amr_parse_sdp_line(AVFormatContext *s, int st_index,
return 0;
}
RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler = {
const RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler = {
.enc_name = "AMR",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_AMR_NB,
@ -192,7 +192,7 @@ RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler = {
.parse_packet = amr_handle_packet,
};
RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler = {
const RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler = {
.enc_name = "AMR-WB",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_AMR_WB,

View File

@ -300,7 +300,7 @@ static void asfrtp_close_context(PayloadContext *asf)
}
#define RTP_ASF_HANDLER(n, s, t) \
RTPDynamicProtocolHandler ff_ms_rtp_ ## n ## _handler = { \
const RTPDynamicProtocolHandler ff_ms_rtp_ ## n ## _handler = { \
.enc_name = s, \
.codec_type = t, \
.codec_id = AV_CODEC_ID_NONE, \

View File

@ -131,7 +131,7 @@ static int dv_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_dv_ctx,
return 0;
}
RTPDynamicProtocolHandler ff_dv_dynamic_handler = {
const RTPDynamicProtocolHandler ff_dv_dynamic_handler = {
.enc_name = "DV",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_DVVIDEO,

View File

@ -47,47 +47,47 @@ int ff_h264_handle_frag_packet(AVPacket *pkt, const uint8_t *buf, int len,
int nal_header_len);
void ff_h264_parse_framesize(AVCodecParameters *par, const char *p);
extern RTPDynamicProtocolHandler ff_ac3_dynamic_handler;
extern RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler;
extern RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler;
extern RTPDynamicProtocolHandler ff_dv_dynamic_handler;
extern RTPDynamicProtocolHandler ff_g726_16_dynamic_handler;
extern RTPDynamicProtocolHandler ff_g726_24_dynamic_handler;
extern RTPDynamicProtocolHandler ff_g726_32_dynamic_handler;
extern RTPDynamicProtocolHandler ff_g726_40_dynamic_handler;
extern RTPDynamicProtocolHandler ff_g726le_16_dynamic_handler;
extern RTPDynamicProtocolHandler ff_g726le_24_dynamic_handler;
extern RTPDynamicProtocolHandler ff_g726le_32_dynamic_handler;
extern RTPDynamicProtocolHandler ff_g726le_40_dynamic_handler;
extern RTPDynamicProtocolHandler ff_h261_dynamic_handler;
extern RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler;
extern RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler;
extern RTPDynamicProtocolHandler ff_h263_rfc2190_dynamic_handler;
extern RTPDynamicProtocolHandler ff_h264_dynamic_handler;
extern RTPDynamicProtocolHandler ff_hevc_dynamic_handler;
extern RTPDynamicProtocolHandler ff_ilbc_dynamic_handler;
extern RTPDynamicProtocolHandler ff_jpeg_dynamic_handler;
extern RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler;
extern RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler;
extern RTPDynamicProtocolHandler ff_mpeg_audio_dynamic_handler;
extern RTPDynamicProtocolHandler ff_mpeg_audio_robust_dynamic_handler;
extern RTPDynamicProtocolHandler ff_mpeg_video_dynamic_handler;
extern RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler;
extern RTPDynamicProtocolHandler ff_mpegts_dynamic_handler;
extern RTPDynamicProtocolHandler ff_ms_rtp_asf_pfa_handler;
extern RTPDynamicProtocolHandler ff_ms_rtp_asf_pfv_handler;
extern RTPDynamicProtocolHandler ff_qcelp_dynamic_handler;
extern RTPDynamicProtocolHandler ff_qdm2_dynamic_handler;
extern RTPDynamicProtocolHandler ff_qt_rtp_aud_handler;
extern RTPDynamicProtocolHandler ff_qt_rtp_vid_handler;
extern RTPDynamicProtocolHandler ff_quicktime_rtp_aud_handler;
extern RTPDynamicProtocolHandler ff_quicktime_rtp_vid_handler;
extern RTPDynamicProtocolHandler ff_rfc4175_rtp_handler;
extern RTPDynamicProtocolHandler ff_svq3_dynamic_handler;
extern RTPDynamicProtocolHandler ff_theora_dynamic_handler;
extern RTPDynamicProtocolHandler ff_vc2hq_dynamic_handler;
extern RTPDynamicProtocolHandler ff_vorbis_dynamic_handler;
extern RTPDynamicProtocolHandler ff_vp8_dynamic_handler;
extern RTPDynamicProtocolHandler ff_vp9_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_ac3_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_dv_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_g726_16_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_g726_24_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_g726_32_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_g726_40_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_g726le_16_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_g726le_24_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_g726le_32_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_g726le_40_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_h261_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_h263_rfc2190_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_h264_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_hevc_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_ilbc_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_jpeg_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_mpeg_audio_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_mpeg_audio_robust_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_mpeg_video_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_mpegts_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_ms_rtp_asf_pfa_handler;
extern const RTPDynamicProtocolHandler ff_ms_rtp_asf_pfv_handler;
extern const RTPDynamicProtocolHandler ff_qcelp_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_qdm2_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_qt_rtp_aud_handler;
extern const RTPDynamicProtocolHandler ff_qt_rtp_vid_handler;
extern const RTPDynamicProtocolHandler ff_quicktime_rtp_aud_handler;
extern const RTPDynamicProtocolHandler ff_quicktime_rtp_vid_handler;
extern const RTPDynamicProtocolHandler ff_rfc4175_rtp_handler;
extern const RTPDynamicProtocolHandler ff_svq3_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_theora_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_vc2hq_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_vorbis_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_vp8_dynamic_handler;
extern const RTPDynamicProtocolHandler ff_vp9_dynamic_handler;
#endif /* AVFORMAT_RTPDEC_FORMATS_H */

View File

@ -35,13 +35,13 @@ static av_cold int g726_ ## bitrate ##_init(AVFormatContext *s, int st_index, \
return 0; \
} \
\
RTPDynamicProtocolHandler ff_g726_ ## bitrate ## _dynamic_handler = { \
const RTPDynamicProtocolHandler ff_g726_ ## bitrate ## _dynamic_handler = { \
.enc_name = "AAL2-G726-" #bitrate, \
.codec_type = AVMEDIA_TYPE_AUDIO, \
.codec_id = AV_CODEC_ID_ADPCM_G726, \
.init = g726_ ## bitrate ## _init, \
}; \
RTPDynamicProtocolHandler ff_g726le_ ## bitrate ## _dynamic_handler = { \
const RTPDynamicProtocolHandler ff_g726le_ ## bitrate ## _dynamic_handler = { \
.enc_name = "G726-" #bitrate, \
.codec_type = AVMEDIA_TYPE_AUDIO, \
.codec_id = AV_CODEC_ID_ADPCM_G726LE, \

View File

@ -162,7 +162,7 @@ static int h261_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_h261_ctx
return 0;
}
RTPDynamicProtocolHandler ff_h261_dynamic_handler = {
const RTPDynamicProtocolHandler ff_h261_dynamic_handler = {
.enc_name = "H261",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_H261,

View File

@ -89,7 +89,7 @@ int ff_h263_handle_packet(AVFormatContext *ctx, PayloadContext *data,
return 0;
}
RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler = {
const RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler = {
.enc_name = "H263-1998",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_H263,
@ -97,7 +97,7 @@ RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler = {
.parse_packet = ff_h263_handle_packet,
};
RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler = {
const RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler = {
.enc_name = "H263-2000",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_H263,

View File

@ -183,7 +183,7 @@ static int h263_handle_packet(AVFormatContext *ctx, PayloadContext *data,
return 0;
}
RTPDynamicProtocolHandler ff_h263_rfc2190_dynamic_handler = {
const RTPDynamicProtocolHandler ff_h263_rfc2190_dynamic_handler = {
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_H263,
.need_parsing = AVSTREAM_PARSE_FULL,

View File

@ -408,7 +408,7 @@ static int parse_h264_sdp_line(AVFormatContext *s, int st_index,
return 0;
}
RTPDynamicProtocolHandler ff_h264_dynamic_handler = {
const RTPDynamicProtocolHandler ff_h264_dynamic_handler = {
.enc_name = "H264",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_H264,

View File

@ -347,7 +347,7 @@ static int hevc_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_hevc_ctx
return res;
}
RTPDynamicProtocolHandler ff_hevc_dynamic_handler = {
const RTPDynamicProtocolHandler ff_hevc_dynamic_handler = {
.enc_name = "H265",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_HEVC,

View File

@ -66,7 +66,7 @@ static int ilbc_parse_sdp_line(AVFormatContext *s, int st_index,
return 0;
}
RTPDynamicProtocolHandler ff_ilbc_dynamic_handler = {
const RTPDynamicProtocolHandler ff_ilbc_dynamic_handler = {
.enc_name = "iLBC",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_ILBC,

View File

@ -379,7 +379,7 @@ static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg,
return AVERROR(EAGAIN);
}
RTPDynamicProtocolHandler ff_jpeg_dynamic_handler = {
const RTPDynamicProtocolHandler ff_jpeg_dynamic_handler = {
.enc_name = "JPEG",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_MJPEG,

View File

@ -162,7 +162,7 @@ static int latm_parse_sdp_line(AVFormatContext *s, int st_index,
return 0;
}
RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler = {
const RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler = {
.enc_name = "MP4A-LATM",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_AAC,

View File

@ -189,7 +189,7 @@ static int mpa_robust_parse_packet(AVFormatContext *ctx, PayloadContext *data,
return 0;
}
RTPDynamicProtocolHandler ff_mpeg_audio_robust_dynamic_handler = {
const RTPDynamicProtocolHandler ff_mpeg_audio_robust_dynamic_handler = {
.enc_name = "mpa-robust",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_MP3ADU,

View File

@ -48,7 +48,7 @@ static int mpeg_parse_packet(AVFormatContext *ctx, PayloadContext *data,
return 0;
}
RTPDynamicProtocolHandler ff_mpeg_audio_dynamic_handler = {
const RTPDynamicProtocolHandler ff_mpeg_audio_dynamic_handler = {
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_MP3,
.need_parsing = AVSTREAM_PARSE_FULL,
@ -56,7 +56,7 @@ RTPDynamicProtocolHandler ff_mpeg_audio_dynamic_handler = {
.static_payload_id = 14,
};
RTPDynamicProtocolHandler ff_mpeg_video_dynamic_handler = {
const RTPDynamicProtocolHandler ff_mpeg_video_dynamic_handler = {
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_MPEG2VIDEO,
.need_parsing = AVSTREAM_PARSE_FULL,

View File

@ -325,7 +325,7 @@ static int parse_sdp_line(AVFormatContext *s, int st_index,
return 0;
}
RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler = {
const RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler = {
.enc_name = "MP4V-ES",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_MPEG4,
@ -334,7 +334,7 @@ RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler = {
.parse_sdp_a_line = parse_sdp_line,
};
RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler = {
const RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler = {
.enc_name = "mpeg4-generic",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_AAC,

View File

@ -89,7 +89,7 @@ static int mpegts_handle_packet(AVFormatContext *ctx, PayloadContext *data,
return 0;
}
RTPDynamicProtocolHandler ff_mpegts_dynamic_handler = {
const RTPDynamicProtocolHandler ff_mpegts_dynamic_handler = {
.codec_type = AVMEDIA_TYPE_DATA,
.priv_data_size = sizeof(PayloadContext),
.parse_packet = mpegts_handle_packet,

View File

@ -209,7 +209,7 @@ static int qcelp_parse_packet(AVFormatContext *ctx, PayloadContext *data,
return return_stored_frame(ctx, data, st, pkt, timestamp, buf, len);
}
RTPDynamicProtocolHandler ff_qcelp_dynamic_handler = {
const RTPDynamicProtocolHandler ff_qcelp_dynamic_handler = {
.enc_name = "x-Purevoice",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_QCELP,

View File

@ -298,7 +298,7 @@ static int qdm2_parse_packet(AVFormatContext *s, PayloadContext *qdm,
return (qdm->cache > 0) ? 1 : 0;
}
RTPDynamicProtocolHandler ff_qdm2_dynamic_handler = {
const RTPDynamicProtocolHandler ff_qdm2_dynamic_handler = {
.enc_name = "X-QDM",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_NONE,

View File

@ -226,7 +226,7 @@ static int rfc4175_handle_packet(AVFormatContext *ctx, PayloadContext *data,
return AVERROR(EAGAIN);
}
RTPDynamicProtocolHandler ff_rfc4175_rtp_handler = {
const RTPDynamicProtocolHandler ff_rfc4175_rtp_handler = {
.enc_name = "raw",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_BITPACKED,

View File

@ -110,7 +110,7 @@ static void svq3_close_context(PayloadContext *sv)
ffio_free_dyn_buf(&sv->pktbuf);
}
RTPDynamicProtocolHandler ff_svq3_dynamic_handler = {
const RTPDynamicProtocolHandler ff_svq3_dynamic_handler = {
.enc_name = "X-SV3V-ES",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_NONE, // see if (config_packet) above

View File

@ -216,7 +216,7 @@ static int vc2hq_handle_packet(AVFormatContext *ctx, PayloadContext *pl_ctx,
return res;
}
RTPDynamicProtocolHandler ff_vc2hq_dynamic_handler = {
const RTPDynamicProtocolHandler ff_vc2hq_dynamic_handler = {
.enc_name = "VC2",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_DIRAC,

View File

@ -276,7 +276,7 @@ static int vp8_need_keyframe(PayloadContext *vp8)
return vp8->sequence_dirty || !vp8->sequence_ok;
}
RTPDynamicProtocolHandler ff_vp8_dynamic_handler = {
const RTPDynamicProtocolHandler ff_vp8_dynamic_handler = {
.enc_name = "VP8",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_VP8,

View File

@ -330,7 +330,7 @@ static void vp9_close_context(PayloadContext *vp9)
ffio_free_dyn_buf(&vp9->buf);
}
RTPDynamicProtocolHandler ff_vp9_dynamic_handler = {
const RTPDynamicProtocolHandler ff_vp9_dynamic_handler = {
.enc_name = "VP9",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_VP9,

View File

@ -365,7 +365,7 @@ static int xiph_parse_sdp_line(AVFormatContext *s, int st_index,
return 0;
}
RTPDynamicProtocolHandler ff_theora_dynamic_handler = {
const RTPDynamicProtocolHandler ff_theora_dynamic_handler = {
.enc_name = "theora",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_THEORA,
@ -375,7 +375,7 @@ RTPDynamicProtocolHandler ff_theora_dynamic_handler = {
.parse_packet = xiph_handle_packet,
};
RTPDynamicProtocolHandler ff_vorbis_dynamic_handler = {
const RTPDynamicProtocolHandler ff_vorbis_dynamic_handler = {
.enc_name = "vorbis",
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_VORBIS,