Skip to content

Usage with ffmpeg 6.0 #38

Description

@AaronPorts

Can it be used with ffmpeg 6.0? I try to compile it, but getting next error:

#0 50.03 CC     libavfilter/vf_extractplanes.o
#0 50.14 CC     libavfilter/vf_fade.o
#0 50.22 CC     libavfilter/vf_fadeglshader.o
#0 50.36 libavfilter/vf_fadeglshader.c:41: warning: "TS2T" redefined
#0 50.36    41 | #define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)*av_q2d(tb))
#0 50.36       |
#0 50.36 In file included from libavfilter/vf_fadeglshader.c:18:
#0 50.36 libavfilter/internal.h:255: note: this is the location of the previous definition
#0 50.36   255 | #define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb))
#0 50.36       |
#0 50.36 libavfilter/vf_fadeglshader.c: In function 'build_shader':
#0 50.36 libavfilter/vf_fadeglshader.c:197:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.36   197 |     GLuint shader = glCreateShader(type);
#0 50.36       |     ^~~~~~
#0 50.36 libavfilter/vf_fadeglshader.c:204:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.36   204 |     GLint status;
#0 50.36       |     ^~~~~
#0 50.36 libavfilter/vf_fadeglshader.c:208:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.36   208 |     int InfoLogLength = 0;
#0 50.36       |     ^~~
#0 50.36 libavfilter/vf_fadeglshader.c:214:57: warning: passing argument 4 of '__glewGetShaderInfoLog' from incompatible pointer type [-Wincompatible-pointer-types]
#0 50.36   214 |         glGetShaderInfoLog(shader, InfoLogLength, NULL, &ShaderErrorMessage);
#0 50.36       |                                                         ^~~~~~~~~~~~~~~~~~~
#0 50.36       |                                                         |
#0 50.36       |                                                         char **
#0 50.36 libavfilter/vf_fadeglshader.c:214:57: note: expected 'GLchar *' {aka 'char *'} but argument is of type 'char **'
#0 50.36 libavfilter/vf_fadeglshader.c:215:79: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'char **' [-Wformat=]
#0 50.36   215 |         av_log(ctx, AV_LOG_ERROR, "doing vf_fadeglshader build_shader ERROR: %s\n", &ShaderErrorMessage);
#0 50.36       |                                                                              ~^     ~~~~~~~~~~~~~~~~~~~
#0 50.36       |                                                                               |     |
#0 50.36       |                                                                               |     char **     
#0 50.36       |                                                                               char *
#0 50.36 libavfilter/vf_fadeglshader.c:218:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.36   218 |     GLuint ret = status == GL_TRUE ? shader : 0;
#0 50.36       |     ^~~~~~
#0 50.36 libavfilter/vf_fadeglshader.c: In function 'vbo_setup':
#0 50.36 libavfilter/vf_fadeglshader.c:227:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.36   227 |     GLint loc = glGetAttribLocation(gs->program, "position");
#0 50.36       |     ^~~~~
#0 50.36 libavfilter/vf_fadeglshader.c: In function 'open_ext_source':
#0 50.36 libavfilter/vf_fadeglshader.c:319:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.36   319 |     int vIndex = -1;
#0 50.36       |     ^~~
#0 50.37 libavfilter/vf_fadeglshader.c:358:32: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#0 50.37   358 |                 AVCodec *dec = avcodec_find_decoder(codecId);
#0 50.37       |                                ^~~~~~~~~~~~~~~~~~~~
#0 50.37 libavfilter/vf_fadeglshader.c:358:17: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.37   358 |                 AVCodec *dec = avcodec_find_decoder(codecId);
#0 50.37       |                 ^~~~~~~
#0 50.37 libavfilter/vf_fadeglshader.c:407:17: warning: 'av_init_packet' is deprecated [-Wdeprecated-declarations]
#0 50.37   407 |                 av_init_packet(gs->extAvMediaContext.m_decPacket);
#0 50.37       |                 ^~~~~~~~~~~~~~
#0 50.37 In file included from ./libavcodec/avcodec.h:44,
#0 50.37                  from libavfilter/vf_fadeglshader.c:10:
#0 50.37 ./libavcodec/packet.h:629:6: note: declared here
#0 50.37   629 | void av_init_packet(AVPacket *pkt);
#0 50.37       |      ^~~~~~~~~~~~~~
#0 50.37 libavfilter/vf_fadeglshader.c: In function 'render_rgba_frame':
#0 50.37 libavfilter/vf_fadeglshader.c:463:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.37   463 |         float scaleRatio = 1.0;
#0 50.37       |         ^~~~~
#0 50.37 libavfilter/vf_fadeglshader.c:481:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.37   481 |     int ret = 0;
#0 50.37       |     ^~~
#0 50.37 libavfilter/vf_fadeglshader.c:499:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.37   499 |     GLuint textureTemp = 0;
#0 50.37       |     ^~~~~~
#0 50.37 libavfilter/vf_fadeglshader.c:499:12: warning: unused variable 'textureTemp' [-Wunused-variable]        
#0 50.37   499 |     GLuint textureTemp = 0;
#0 50.37       |            ^~~~~~~~~~~
#0 50.37 libavfilter/vf_fadeglshader.c: In function 'ext_get_frame':
#0 50.37 libavfilter/vf_fadeglshader.c:613:21: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.37   613 |                     int rgb24size = gs->extAvMediaContext.m_ext_width * gs->extAvMediaContext.m_frame->height * 4;
#0 50.37       |                     ^~~
#0 50.37 libavfilter/vf_fadeglshader.c:561:14: warning: unused variable 'szError' [-Wunused-variable]
#0 50.37   561 |         char szError[256] = {0};
#0 50.37       |              ^~~~~~~
#0 50.37 libavfilter/vf_fadeglshader.c: In function 'ext_source_prepare':
#0 50.37 libavfilter/vf_fadeglshader.c:706:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.37   706 |     int ret = open_ext_source(inlink);
#0 50.37       |     ^~~
#0 50.37 libavfilter/vf_fadeglshader.c: In function 'update_program':
#0 50.37 libavfilter/vf_fadeglshader.c:729:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.37   729 |     GLuint v_shader, f_shader;
#0 50.37       |     ^~~~~~
#0 50.37 libavfilter/vf_fadeglshader.c:744:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.37   744 |     GLint status;
#0 50.37       |     ^~~~~
#0 50.37 libavfilter/vf_fadeglshader.c: In function 'build_program':
#0 50.37 libavfilter/vf_fadeglshader.c:762:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.37   762 |     FadeGLShaderContext *gs = ctx->priv;
#0 50.37       |     ^~~~~~~~~~~~~~~~~~~
#0 50.37 libavfilter/vf_fadeglshader.c:774:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.37   774 |         FILE *f = fopen(gs->sdsource, "rb");
#0 50.37       |         ^~~~
#0 50.37 libavfilter/vf_fadeglshader.c:783:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.37   783 |         unsigned long fsize = ftell(f);
#0 50.37       |         ^~~~~~~~
#0 50.37 libavfilter/vf_fadeglshader.c:801:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.37   801 |         FILE *f = fopen(gs->vxsource, "rb");
#0 50.37       |         ^~~~
#0 50.37 libavfilter/vf_fadeglshader.c:810:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.37   810 |         unsigned long fsize = ftell(f);
#0 50.37       |         ^~~~~~~~
#0 50.37 libavfilter/vf_fadeglshader.c:824:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.37   824 |     const char *gl_sdsource_dst = gs->sdsource_data ? gs->sdsource_data : f_shader_source;      
#0 50.37       |     ^~~~~
#0 50.38 libavfilter/vf_fadeglshader.c: In function 'config_props':
#0 50.38 libavfilter/vf_fadeglshader.c:895:84: warning: format '%d' expects argument of type 'int', but argument 4 has type 'int64_t' {aka 'long int'} [-Wformat=]
#0 50.38   895 |     av_log(ctx, AV_LOG_DEBUG, "doing vf_fadeglshader config_props total frames in:%d out:%d\n", 
#0 50.38       |                                                                                   ~^
#0 50.38       |                                                                                    |
#0 50.38       |                                                                                    int
#0 50.38       |                                                                                   %ld
#0 50.38   896 |            inlink->frame_count_in, inlink->frame_count_out);
#0 50.38       |            ~~~~~~~~~~~~~~~~~~~~~~
#0 50.38       |                  |
#0 50.38       |                  int64_t {aka long int}
#0 50.38 libavfilter/vf_fadeglshader.c:895:91: warning: format '%d' expects argument of type 'int', but argument 5 has type 'int64_t' {aka 'long int'} [-Wformat=]
#0 50.38   895 |     av_log(ctx, AV_LOG_DEBUG, "doing vf_fadeglshader config_props total frames in:%d out:%d\n", 
#0 50.38       |                                                                                          ~^     
#0 50.38       |                                                                                           |     
#0 50.38       |                                                                                           int   
#0 50.38       |                                                                                          %ld    
#0 50.38   896 |            inlink->frame_count_in, inlink->frame_count_out);
#0 50.38       |                                    ~~~~~~~~~~~~~~~~~~~~~~~
#0 50.38       |                                          |
#0 50.38       |                                          int64_t {aka long int}
#0 50.38 libavfilter/vf_fadeglshader.c:956:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.38   956 |     int ret;
#0 50.38       |     ^~~
#0 50.38 libavfilter/vf_fadeglshader.c: In function 'config_props_external':
#0 50.38 libavfilter/vf_fadeglshader.c:976:26: warning: unused variable 'gs' [-Wunused-variable]
#0 50.38   976 |     FadeGLShaderContext *gs      = ctx->priv;
#0 50.38       |                          ^~
#0 50.38 libavfilter/vf_fadeglshader.c: In function 'config_output':
#0 50.38 libavfilter/vf_fadeglshader.c:987:9: warning: unused variable 'ret' [-Wunused-variable]
#0 50.38   987 |     int ret;
#0 50.38       |         ^~~
#0 50.38 libavfilter/vf_fadeglshader.c:986:26: warning: unused variable 's' [-Wunused-variable]
#0 50.38   986 |     FadeGLShaderContext *s  = ctx->priv;
#0 50.38       |                          ^
#0 50.38 libavfilter/vf_fadeglshader.c: In function 'render_first':
#0 50.38 libavfilter/vf_fadeglshader.c:1007:19: warning: unused variable 'outlink' [-Wunused-variable]
#0 50.38  1007 |     AVFilterLink *outlink   = ctx->outputs[0];
#0 50.38       |                   ^~~~~~~
#0 50.42 libavfilter/vf_fadeglshader.c: In function 'filter_frame':
#0 50.42 libavfilter/vf_fadeglshader.c:1054:20: error: implicit declaration of function 'ff_get_video_buffer' [-Werror=implicit-function-declaration]
#0 50.42  1054 |     AVFrame *out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
#0 50.42       |                    ^~~~~~~~~~~~~~~~~~~
#0 50.42 libavfilter/vf_fadeglshader.c:1054:20: warning: initialization of 'AVFrame *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
#0 50.42 libavfilter/vf_fadeglshader.c:1054:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.42  1054 |     AVFrame *out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
#0 50.42       |     ^~~~~~~
#0 50.42 libavfilter/vf_fadeglshader.c:1060:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.42  1060 |     int copy_props_ret = av_frame_copy_props(out, in);
#0 50.42       |     ^~~
#0 50.42 libavfilter/vf_fadeglshader.c:1074:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.42  1074 |     double timeProgress = MAX_DEF(MIN_DEF((gs->playTime_ft - gs->r_offset_time_ft) / gs->fade_duration_ft, 1.0), 0.0);
#0 50.42       |     ^~~~~~
#0 50.42 libavfilter/vf_fadeglshader.c: In function 'uninit':
#0 50.42 libavfilter/vf_fadeglshader.c:1129:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
#0 50.42  1129 |     FadeGLShaderContext *c = ctx->priv;
#0 50.42       |     ^~~~~~~~~~~~~~~~~~~
#0 50.46 CC     libavfilter/vf_feedback.o
#0 50.46 libavfilter/vf_fadeglshader.c: In function 'query_formats':
#0 50.46 libavfilter/vf_fadeglshader.c:1177:12: error: implicit declaration of function 'ff_set_common_formats' [-Werror=implicit-function-declaration]
#0 50.46  1177 |     return ff_set_common_formats(ctx, ff_make_format_list(formats));
#0 50.46       |            ^~~~~~~~~~~~~~~~~~~~~
#0 50.49 libavfilter/vf_fadeglshader.c:1177:39: error: implicit declaration of function 'ff_make_format_list' [-Werror=implicit-function-declaration]
#0 50.49  1177 |     return ff_set_common_formats(ctx, ff_make_format_list(formats));
#0 50.49       |                                       ^~~~~~~~~~~~~~~~~~~
#0 50.49 libavfilter/vf_fadeglshader.c: At top level:
#0 50.49 libavfilter/vf_fadeglshader.c:1218:10: error: 'AVFilter' has no member named 'query_formats'
#0 50.49  1218 |         .query_formats = query_formats,
#0 50.49       |          ^~~~~~~~~~~~~
#0 50.49 libavfilter/vf_fadeglshader.c:1212:31: warning: missing braces around initializer [-Wmissing-braces]    
#0 50.49  1212 | AVFilter ff_vf_fadeglshader = {
#0 50.49       |                               ^
#0 50.49 ......
#0 50.49  1218 |         .query_formats = query_formats,
#0 50.49       |                          {            }
#0 50.50 libavfilter/vf_fadeglshader.c:983:12: warning: 'config_output' defined but not used [-Wunused-function] 
#0 50.50   983 | static int config_output(AVFilterLink *outlink)
#0 50.50       |            ^~~~~~~~~~~~~
#0 50.50 libavfilter/vf_fadeglshader.c:974:12: warning: 'config_props_external' defined but not used [-Wunused-function]
#0 50.50   974 | static int config_props_external(AVFilterLink *inlink) {
#0 50.50       |            ^~~~~~~~~~~~~~~~~~~~~
#0 50.50 cc1: some warnings being treated as errors
#0 50.50 make: *** [ffbuild/common.mak:81: libavfilter/vf_fadeglshader.o] Error 1
#0 50.50 make: *** Waiting for unfinished jobs....
`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions