Giter Site home page Giter Site logo

Comments (2)

devpack avatar devpack commented on July 21, 2024

Hi,

Yes I just rebuilt it, "glfw_shader" is the name of the output binary, clone the repo and run ./build.sh, you should see something like this:

$ ./build.sh 
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tony/Desktop/opengl-ffmpeg-video/build
Scanning dependencies of target glfw_shader
[ 14%] Building CXX object CMakeFiles/glfw_shader.dir/video_light.cpp.o
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp: In constructor ‘VideoLight::VideoLight(int, int, const char*)’:
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:18:4: warning: ‘void av_register_all()’ is deprecated [-Wdeprecated-declarations]
  ::av_register_all();
    ^~~~~~~~~~~~~~~
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:15:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavformat/avformat.h:2050:6: note: declared here
 void av_register_all(void);
      ^~~~~~~~~~~~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:18:20: warning: ‘void av_register_all()’ is deprecated [-Wdeprecated-declarations]
  ::av_register_all();
                    ^
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:15:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavformat/avformat.h:2050:6: note: declared here
 void av_register_all(void);
      ^~~~~~~~~~~~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:47:29: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
    if (fmt_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
                             ^~~~~
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:15:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavformat/avformat.h:885:21: note: declared here
     AVCodecContext *codec;
                     ^~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:47:29: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
    if (fmt_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
                             ^~~~~
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:15:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavformat/avformat.h:885:21: note: declared here
     AVCodecContext *codec;
                     ^~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:47:29: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
    if (fmt_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
                             ^~~~~
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:15:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavformat/avformat.h:885:21: note: declared here
     AVCodecContext *codec;
                     ^~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:62:29: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
   codec_ctx = video_stream->codec;
                             ^~~~~
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:15:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavformat/avformat.h:885:21: note: declared here
     AVCodecContext *codec;
                     ^~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:62:29: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
   codec_ctx = video_stream->codec;
                             ^~~~~
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:15:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavformat/avformat.h:885:21: note: declared here
     AVCodecContext *codec;
                     ^~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:62:29: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
   codec_ctx = video_stream->codec;
                             ^~~~~
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:15:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavformat/avformat.h:885:21: note: declared here
     AVCodecContext *codec;
                     ^~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:85:18: warning: ‘int avpicture_get_size(AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations]
     int size = ::avpicture_get_size(AV_PIX_FMT_RGB24, codec_ctx->width, codec_ctx->height);
                  ^~~~~~~~~~~~~~~~~~
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:14:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavcodec/avcodec.h:5510:5: note: declared here
 int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height);
     ^~~~~~~~~~~~~~~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:85:90: warning: ‘int avpicture_get_size(AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations]
     int size = ::avpicture_get_size(AV_PIX_FMT_RGB24, codec_ctx->width, codec_ctx->height);
                                                                                          ^
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:14:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavcodec/avcodec.h:5510:5: note: declared here
 int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height);
     ^~~~~~~~~~~~~~~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:87:7: warning: ‘int avpicture_fill(AVPicture*, const uint8_t*, AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations]
     ::avpicture_fill((AVPicture *)gl_frame, internal_buffer, AV_PIX_FMT_RGB24, codec_ctx->width, codec_ctx->height);
       ^~~~~~~~~~~~~~
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:14:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavcodec/avcodec.h:5495:5: note: declared here
 int avpicture_fill(AVPicture *picture, const uint8_t *ptr,
     ^~~~~~~~~~~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:87:115: warning: ‘int avpicture_fill(AVPicture*, const uint8_t*, AVPixelFormat, int, int)’ is deprecated [-Wdeprecated-declarations]
     ::avpicture_fill((AVPicture *)gl_frame, internal_buffer, AV_PIX_FMT_RGB24, codec_ctx->width, codec_ctx->height);
                                                                                                                   ^
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:14:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavcodec/avcodec.h:5495:5: note: declared here
 int avpicture_fill(AVPicture *picture, const uint8_t *ptr,
     ^~~~~~~~~~~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp: In member function ‘bool VideoLight::readVideoFrame()’:
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:106:6: warning: ‘void av_free_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
    ::av_free_packet(packet);
      ^~~~~~~~~~~~~~
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:14:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavcodec/avcodec.h:4473:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^~~~~~~~~~~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:106:27: warning: ‘void av_free_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
    ::av_free_packet(packet);
                           ^
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:14:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavcodec/avcodec.h:4473:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^~~~~~~~~~~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:113:10: warning: ‘int avcodec_decode_video2(AVCodecContext*, AVFrame*, int*, const AVPacket*)’ is deprecated [-Wdeprecated-declarations]
    if (::avcodec_decode_video2(codec_ctx, av_frame, &frame_finished, packet) < 0) {
          ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:14:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavcodec/avcodec.h:4828:5: note: declared here
 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
     ^~~~~~~~~~~~~~~~~~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:113:76: warning: ‘int avcodec_decode_video2(AVCodecContext*, AVFrame*, int*, const AVPacket*)’ is deprecated [-Wdeprecated-declarations]
    if (::avcodec_decode_video2(codec_ctx, av_frame, &frame_finished, packet) < 0) {
                                                                            ^
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:14:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavcodec/avcodec.h:4828:5: note: declared here
 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
     ^~~~~~~~~~~~~~~~~~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:114:7: warning: ‘void av_free_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
     ::av_free_packet(packet);
       ^~~~~~~~~~~~~~
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:14:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavcodec/avcodec.h:4473:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^~~~~~~~~~~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:114:28: warning: ‘void av_free_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
     ::av_free_packet(packet);
                            ^
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:14:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavcodec/avcodec.h:4473:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^~~~~~~~~~~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:133:5: warning: ‘void av_free_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
   ::av_free_packet(packet);
     ^~~~~~~~~~~~~~
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:14:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavcodec/avcodec.h:4473:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^~~~~~~~~~~~~~
/home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:133:26: warning: ‘void av_free_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
   ::av_free_packet(packet);
                          ^
In file included from /home/tony/Desktop/opengl-ffmpeg-video/video_light.h:14:0,
                 from /home/tony/Desktop/opengl-ffmpeg-video/video_light.cpp:1:
/usr/local/include/libavcodec/avcodec.h:4473:6: note: declared here
 void av_free_packet(AVPacket *pkt);
      ^~~~~~~~~~~~~~
[ 28%] Building CXX object CMakeFiles/glfw_shader.dir/input.cpp.o
[ 42%] Building CXX object CMakeFiles/glfw_shader.dir/render.cpp.o
[ 57%] Building CXX object CMakeFiles/glfw_shader.dir/shader.cpp.o
[ 71%] Building CXX object CMakeFiles/glfw_shader.dir/display.cpp.o
[ 85%] Building CXX object CMakeFiles/glfw_shader.dir/main.cpp.o
[100%] Linking CXX executable glfw_shader
[100%] Built target glfw_shader

You might need to edit "CMakeLists.txt" to fit with your libglfw version (/usr/lib/x86_64-linux-gnu/libglfw.so.3.2 on my system)

target_link_libraries(glfw_shader avcodecmm avformatmm avutilmm swscalemm swresamplemm X11 GL GLEW /usr/lib/x86_64-linux-gnu/libglfw.so.3.2)

from opengl-ffmpeg-video.

wujilingfeng avatar wujilingfeng commented on July 21, 2024

Thanks! I want to write such demo,but I don't know FFmpeg very well.
Maybe I'll ask you more questions in future.

from opengl-ffmpeg-video.

Related Issues (2)

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.