[FFmpeg-cvslog] avfilter/vf_showinfo: add const to the AVFrameSideData instance
Limin Wang
git at videolan.org
Thu Sep 17 13:54:24 EEST 2020
ffmpeg | branch: master | Limin Wang <lance.lmwang at gmail.com> | Thu Sep 17 18:33:19 2020 +0800| [0ea2bda099c6ede92bedaa1c2545c60ff84f7401] | committer: Limin Wang
avfilter/vf_showinfo: add const to the AVFrameSideData instance
Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ea2bda099c6ede92bedaa1c2545c60ff84f7401
---
libavfilter/vf_showinfo.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index 0ac1f90000..66a30c7a32 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -57,9 +57,9 @@ static const AVOption showinfo_options[] = {
AVFILTER_DEFINE_CLASS(showinfo);
-static void dump_spherical(AVFilterContext *ctx, AVFrame *frame, AVFrameSideData *sd)
+static void dump_spherical(AVFilterContext *ctx, AVFrame *frame, const AVFrameSideData *sd)
{
- AVSphericalMapping *spherical = (AVSphericalMapping *)sd->data;
+ const AVSphericalMapping *spherical = (const AVSphericalMapping *)sd->data;
double yaw, pitch, roll;
av_log(ctx, AV_LOG_INFO, "spherical information: ");
@@ -96,9 +96,9 @@ static void dump_spherical(AVFilterContext *ctx, AVFrame *frame, AVFrameSideData
}
}
-static void dump_stereo3d(AVFilterContext *ctx, AVFrameSideData *sd)
+static void dump_stereo3d(AVFilterContext *ctx, const AVFrameSideData *sd)
{
- AVStereo3D *stereo;
+ const AVStereo3D *stereo;
av_log(ctx, AV_LOG_INFO, "stereoscopic information: ");
if (sd->size < sizeof(*stereo)) {
@@ -106,7 +106,7 @@ static void dump_stereo3d(AVFilterContext *ctx, AVFrameSideData *sd)
return;
}
- stereo = (AVStereo3D *)sd->data;
+ stereo = (const AVStereo3D *)sd->data;
av_log(ctx, AV_LOG_INFO, "type - %s", av_stereo3d_type_name(stereo->type));
@@ -114,7 +114,7 @@ static void dump_stereo3d(AVFilterContext *ctx, AVFrameSideData *sd)
av_log(ctx, AV_LOG_INFO, " (inverted)");
}
-static void dump_s12m_timecode(AVFilterContext *ctx, AVRational frame_rate, AVFrameSideData *sd)
+static void dump_s12m_timecode(AVFilterContext *ctx, AVRational frame_rate, const AVFrameSideData *sd)
{
const uint32_t *tc = (const uint32_t *)sd->data;
@@ -130,7 +130,7 @@ static void dump_s12m_timecode(AVFilterContext *ctx, AVRational frame_rate, AVFr
}
}
-static void dump_roi(AVFilterContext *ctx, AVFrameSideData *sd)
+static void dump_roi(AVFilterContext *ctx, const AVFrameSideData *sd)
{
int nb_rois;
const AVRegionOfInterest *roi;
@@ -152,9 +152,9 @@ static void dump_roi(AVFilterContext *ctx, AVFrameSideData *sd)
}
}
-static void dump_mastering_display(AVFilterContext *ctx, AVFrameSideData *sd)
+static void dump_mastering_display(AVFilterContext *ctx, const AVFrameSideData *sd)
{
- AVMasteringDisplayMetadata *mastering_display;
+ const AVMasteringDisplayMetadata *mastering_display;
av_log(ctx, AV_LOG_INFO, "mastering display: ");
if (sd->size < sizeof(*mastering_display)) {
@@ -162,7 +162,7 @@ static void dump_mastering_display(AVFilterContext *ctx, AVFrameSideData *sd)
return;
}
- mastering_display = (AVMasteringDisplayMetadata *)sd->data;
+ mastering_display = (const AVMasteringDisplayMetadata *)sd->data;
av_log(ctx, AV_LOG_INFO, "has_primaries:%d has_luminance:%d "
"r(%5.4f,%5.4f) g(%5.4f,%5.4f) b(%5.4f %5.4f) wp(%5.4f, %5.4f) "
@@ -178,18 +178,18 @@ static void dump_mastering_display(AVFilterContext *ctx, AVFrameSideData *sd)
av_q2d(mastering_display->min_luminance), av_q2d(mastering_display->max_luminance));
}
-static void dump_content_light_metadata(AVFilterContext *ctx, AVFrameSideData *sd)
+static void dump_content_light_metadata(AVFilterContext *ctx, const AVFrameSideData *sd)
{
- AVContentLightMetadata* metadata = (AVContentLightMetadata*)sd->data;
+ const AVContentLightMetadata *metadata = (const AVContentLightMetadata *)sd->data;
av_log(ctx, AV_LOG_INFO, "Content Light Level information: "
"MaxCLL=%d, MaxFALL=%d",
metadata->MaxCLL, metadata->MaxFALL);
}
-static void dump_video_enc_params(AVFilterContext *ctx, AVFrameSideData *sd)
+static void dump_video_enc_params(AVFilterContext *ctx, const AVFrameSideData *sd)
{
- AVVideoEncParams *par = (AVVideoEncParams*)sd->data;
+ const AVVideoEncParams *par = (const AVVideoEncParams *)sd->data;
int plane, acdc;
av_log(ctx, AV_LOG_INFO, "video encoding parameters: type %d; ", par->type);
@@ -206,10 +206,10 @@ static void dump_video_enc_params(AVFilterContext *ctx, AVFrameSideData *sd)
av_log(ctx, AV_LOG_INFO, "%u blocks; ", par->nb_blocks);
}
-static void dump_sei_unregistered_metadata(AVFilterContext *ctx, AVFrameSideData *sd)
+static void dump_sei_unregistered_metadata(AVFilterContext *ctx, const AVFrameSideData *sd)
{
const int uuid_size = 16;
- uint8_t *user_data = sd->data;
+ const uint8_t *user_data = sd->data;
int i;
if (sd->size < uuid_size) {
More information about the ffmpeg-cvslog
mailing list