Giter VIP home page Giter VIP logo

Comments (1)

SolarAquarion avatar SolarAquarion commented on July 18, 2024
videoencoder.cpp: In member function ‘bool VideoEncoder::createFile(QString, AVCodecID, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, int, int, int)’:
videoencoder.cpp:88:36: error: invalid conversion from ‘const AVOutputFormat*’ to ‘AVOutputFormat*’ [-fpermissive]
   88 |     pOutputFormat = av_guess_format(NULL, fileName.toStdString().c_str(), NULL);
      |                     ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                    |
      |                                    const AVOutputFormat*
videoencoder.cpp:90:40: error: invalid conversion from ‘const AVOutputFormat*’ to ‘AVOutputFormat*’ [-fpermissive]
   90 |         pOutputFormat = av_guess_format("mpeg", NULL, NULL);
      |                         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      |                                        |
      |                                        const AVOutputFormat*
videoencoder.cpp:106:26: error: ‘AVFormatContext’ {aka ‘struct AVFormatContext’} has no member named ‘filename’
  106 |     snprintf(pFormatCtx->filename, sizeof(pFormatCtx->filename), "%s", fileName.toStdString().c_str());
      |                          ^~~~~~~~
videoencoder.cpp:106:55: error: ‘AVFormatContext’ {aka ‘struct AVFormatContext’} has no member named ‘filename’
  106 |     snprintf(pFormatCtx->filename, sizeof(pFormatCtx->filename), "%s", fileName.toStdString().c_str());
      |                                                       ^~~~~~~~
videoencoder.cpp:116:38: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
  116 |         pCodec = avcodec_find_encoder(pOutputFormat->video_codec);
      |                  ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                      |
      |                                      const AVCodec*
videoencoder.cpp:129:33: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
  129 |         pCodecCtx=pVideoStream->codec;
      |                                 ^~~~~
videoencoder.cpp:165:49: warning: narrowing conversion of ‘fpsNumerator’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]
  165 |             pCodecCtx->time_base = (AVRational){fpsNumerator, fpsDenominator};
      |                                                 ^~~~~~~~~~~~
videoencoder.cpp:165:63: warning: narrowing conversion of ‘fpsDenominator’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]
  165 |             pCodecCtx->time_base = (AVRational){fpsNumerator, fpsDenominator};
      |                                                               ^~~~~~~~~~~~~~
videoencoder.cpp: In member function ‘bool VideoEncoder::closeFile()’:
videoencoder.cpp:271:33: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
  271 |     avcodec_close(pVideoStream->codec);
      |                                 ^~~~~
videoencoder.cpp:276:9: error: ‘av_free_packet’ was not declared in this scope; did you mean ‘av_new_packet’?
  276 |         av_free_packet(&pkt);
      |         ^~~~~~~~~~~~~~
      |         av_new_packet
videoencoder.cpp:286:43: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
  286 |         av_freep(&pFormatCtx->streams[i]->codec);
      |                                           ^~~~~
videoencoder.cpp: In member function ‘int VideoEncoder::encodePacket(uint8_t*, uint8_t)’:
videoencoder.cpp:351:8: error: ‘av_free_packet’ was not declared in this scope; did you mean ‘av_new_packet’?
  351 |        av_free_packet(&pkt);
      |        ^~~~~~~~~~~~~~
      |        av_new_packet
videoencoder.cpp:357:19: warning: ‘void av_init_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
  357 |     av_init_packet(&pkt);
      |     ~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/libavcodec/avcodec.h:45,
                 from videoencoder.h:37,
                 from videoencoder.cpp:22:
/usr/include/libavcodec/packet.h:512:6: note: declared here
  512 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
videoencoder.cpp:362:15: error: ‘avcodec_encode_video2’ was not declared in this scope; did you mean ‘avcodec_encode_subtitle’?
  362 |     int ret = avcodec_encode_video2(pCodecCtx, &pkt, ppicture, &got_packet);
      |               ^~~~~~~~~~~~~~~~~~~~~
      |               avcodec_encode_subtitle
videoencoder.cpp:367:9: error: ‘av_free_packet’ was not declared in this scope; did you mean ‘av_new_packet’?
  367 |         av_free_packet(&pkt);
      |         ^~~~~~~~~~~~~~
      |         av_new_packet
videoencoder.cpp:393:21: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses]
  393 |         if(pts_prev == pkt.pts | pkt.pts < pts_prev){
      |            ~~~~~~~~~^~~~~~~~~~
videoencoder.cpp:398:23: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘coded_frame’
  398 |         if(pCodecCtx->coded_frame->key_frame)
      |                       ^~~~~~~~~~~
videoencoder.cpp: In member function ‘bool VideoEncoder::initCodec()’:
videoencoder.cpp:495:5: error: ‘av_register_all’ was not declared in this scope
  495 |     av_register_all();
      |     ^~~~~~~~~~~~~~~
videoencoder.cpp: In member function ‘bool VideoEncoder::initFrame()’:
videoencoder.cpp:552:16: error: ‘avpicture_get_size’ was not declared in this scope
  552 |     int size = avpicture_get_size(pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height);
      |                ^~~~~~~~~~~~~~~~~~
videoencoder.cpp:562:21: error: ‘AVPicture’ was not declared in this scope; did you mean ‘QPicture’?
  562 |     avpicture_fill((AVPicture *)ppicture, picture_buf,pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height);
      |                     ^~~~~~~~~
      |                     QPicture
videoencoder.cpp:562:32: error: expected primary-expression before ‘)’ token
  562 |     avpicture_fill((AVPicture *)ppicture, picture_buf,pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height);
      |                                ^
videoencoder.cpp:562:5: error: ‘avpicture_fill’ was not declared in this scope
  562 |     avpicture_fill((AVPicture *)ppicture, picture_buf,pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height);
      |     ^~~~~~~~~~~~~~
videoencoder.cpp: In member function ‘int VideoEncoder::encodeH264Packet(void*, int)’:
videoencoder.cpp:691:19: warning: ‘void av_init_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
  691 |     av_init_packet(&pkt);
      |     ~~~~~~~~~~~~~~^~~~~~
/usr/include/libavcodec/packet.h:512:6: note: declared here
  512 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
videoencoder.cpp:695:19: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘coded_frame’
  695 |     if(pCodecCtx->coded_frame->key_frame)
      |                   ^~~~~~~~~~~
videoencoder.cpp:704:17: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses]
  704 |     if(pts_prev == pkt.pts | pkt.pts < pts_prev){
      |        ~~~~~~~~~^~~~~~~~~~
videoencoder.cpp:718:9: error: ‘av_free_packet’ was not declared in this scope; did you mean ‘av_new_packet’?
  718 |         av_free_packet(&pkt);
      |         ^~~~~~~~~~~~~~
      |         av_new_packet
videoencoder.cpp: In member function ‘AVStream* VideoEncoder::add_audio_stream(AVFormatContext*, AVCodecID, int, int)’:
videoencoder.cpp:750:39: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
  750 |     paudioCodec = avcodec_find_encoder(AV_CODEC_ID_MP2);
      |                   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
      |                                       |
      |                                       const AVCodec*
videoencoder.cpp:763:13: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
  763 |     c = st->codec;
      |             ^~~~~
videoencoder.cpp:778:8: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  778 |     c->channels    = channels;
      |        ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:778:8: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  778 |     c->channels    = channels;
      |        ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:778:8: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  778 |     c->channels    = channels;
      |        ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:779:12: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  779 |     if (c->channels < 2)
      |            ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:779:12: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  779 |     if (c->channels < 2)
      |            ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:779:12: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  779 |     if (c->channels < 2)
      |            ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:780:12: warning: ‘AVCodecContext::channel_layout’ is deprecated [-Wdeprecated-declarations]
  780 |         c->channel_layout = AV_CH_LAYOUT_MONO;
      |            ^~~~~~~~~~~~~~
/usr/include/libavcodec/avcodec.h:1060:14: note: declared here
 1060 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
videoencoder.cpp:780:12: warning: ‘AVCodecContext::channel_layout’ is deprecated [-Wdeprecated-declarations]
  780 |         c->channel_layout = AV_CH_LAYOUT_MONO;
      |            ^~~~~~~~~~~~~~
/usr/include/libavcodec/avcodec.h:1060:14: note: declared here
 1060 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
videoencoder.cpp:780:12: warning: ‘AVCodecContext::channel_layout’ is deprecated [-Wdeprecated-declarations]
  780 |         c->channel_layout = AV_CH_LAYOUT_MONO;
      |            ^~~~~~~~~~~~~~
/usr/include/libavcodec/avcodec.h:1060:14: note: declared here
 1060 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
videoencoder.cpp:782:12: warning: ‘AVCodecContext::channel_layout’ is deprecated [-Wdeprecated-declarations]
  782 |         c->channel_layout = AV_CH_LAYOUT_STEREO;
      |            ^~~~~~~~~~~~~~
/usr/include/libavcodec/avcodec.h:1060:14: note: declared here
 1060 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
videoencoder.cpp:782:12: warning: ‘AVCodecContext::channel_layout’ is deprecated [-Wdeprecated-declarations]
  782 |         c->channel_layout = AV_CH_LAYOUT_STEREO;
      |            ^~~~~~~~~~~~~~
/usr/include/libavcodec/avcodec.h:1060:14: note: declared here
 1060 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
videoencoder.cpp:782:12: warning: ‘AVCodecContext::channel_layout’ is deprecated [-Wdeprecated-declarations]
  782 |         c->channel_layout = AV_CH_LAYOUT_STEREO;
      |            ^~~~~~~~~~~~~~
/usr/include/libavcodec/avcodec.h:1060:14: note: declared here
 1060 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
videoencoder.cpp: In member function ‘int VideoEncoder::open_audio(AVStream*)’:
videoencoder.cpp:795:26: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
  795 |     pAudioCodecCtx = st->codec;
      |                          ^~~~~
videoencoder.cpp: In member function ‘int VideoEncoder::encodeAudio(void*)’:
videoencoder.cpp:849:19: warning: ‘void av_init_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
  849 |     av_init_packet(&audioPkt);
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~
/usr/include/libavcodec/packet.h:512:6: note: declared here
  512 | void av_init_packet(AVPacket *pkt);
      |      ^~~~~~~~~~~~~~
videoencoder.cpp:857:71: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  857 |     int bufferSize = av_samples_get_buffer_size(NULL, pAudioCodecCtx->channels, pAudioCodecCtx->frame_size,
      |                                                                       ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:857:71: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  857 |     int bufferSize = av_samples_get_buffer_size(NULL, pAudioCodecCtx->channels, pAudioCodecCtx->frame_size,
      |                                                                       ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:857:71: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  857 |     int bufferSize = av_samples_get_buffer_size(NULL, pAudioCodecCtx->channels, pAudioCodecCtx->frame_size,
      |                                                                       ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:863:29: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  863 |             pAudioCodecCtx->channels, pAudioCodecCtx->sample_fmt);
      |                             ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:863:29: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  863 |             pAudioCodecCtx->channels, pAudioCodecCtx->sample_fmt);
      |                             ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:863:29: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  863 |             pAudioCodecCtx->channels, pAudioCodecCtx->sample_fmt);
      |                             ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:868:65: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  868 |     ret = avcodec_fill_audio_frame(pAudioFrame, pAudioCodecCtx->channels, pAudioCodecCtx->sample_fmt,
      |                                                                 ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:868:65: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  868 |     ret = avcodec_fill_audio_frame(pAudioFrame, pAudioCodecCtx->channels, pAudioCodecCtx->sample_fmt,
      |                                                                 ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:868:65: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  868 |     ret = avcodec_fill_audio_frame(pAudioFrame, pAudioCodecCtx->channels, pAudioCodecCtx->sample_fmt,
      |                                                                 ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:875:29: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  875 |             pAudioCodecCtx->channels, pAudioCodecCtx->sample_fmt);
      |                             ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:875:29: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  875 |             pAudioCodecCtx->channels, pAudioCodecCtx->sample_fmt);
      |                             ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:875:29: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
  875 |             pAudioCodecCtx->channels, pAudioCodecCtx->sample_fmt);
      |                             ^~~~~~~~
/usr/include/libavcodec/avcodec.h:1006:9: note: declared here
 1006 |     int channels;
      |         ^~~~~~~~
videoencoder.cpp:880:11: error: ‘avcodec_encode_audio2’ was not declared in this scope; did you mean ‘avcodec_encode_subtitle’?
  880 |     ret = avcodec_encode_audio2(pAudioCodecCtx, &audioPkt, pAudioFrame, &got_packet);
      |           ^~~~~~~~~~~~~~~~~~~~~
      |           avcodec_encode_subtitle
videoencoder.cpp:883:9: error: ‘av_free_packet’ was not declared in this scope; did you mean ‘av_new_packet’?
  883 |         av_free_packet(&audioPkt);
      |         ^~~~~~~~~~~~~~
      |         av_new_packet
videoencoder.cpp:899:28: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘coded_frame’
  899 |         if(pAudioCodecCtx->coded_frame->key_frame)
      |                            ^~~~~~~~~~~
videoencoder.cpp:909:9: error: ‘av_free_packet’ was not declared in this scope; did you mean ‘av_new_packet’?
  909 |         av_free_packet(&audioPkt);
      |         ^~~~~~~~~~~~~~
      |         av_new_packet
videoencoder.cpp: At global scope:
videoencoder.cpp:32:16: warning: ‘audioPts’ defined but not used [-Wunused-variable]
   32 | static int64_t audioPts = 0;
      |                ^~~~~~~~

from qtcam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.