Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to compile on Ubuntu 14.04? #2

Open
ricardogsilva opened this issue Mar 2, 2015 · 5 comments
Open

How to compile on Ubuntu 14.04? #2

ricardogsilva opened this issue Mar 2, 2015 · 5 comments

Comments

@ricardogsilva
Copy link

Hi
I'm trying to compile the freej master branch on ubuntu 14.04 and keep getting the error:

video_layer.cpp:143:3: error: 'AVFormatParameters' was not declared in this scope
   AVFormatParameters avp, *av_format_par = NULL;
   ^
video_layer.cpp:143:22: error: expected ';' before 'avp'
   AVFormatParameters avp, *av_format_par = NULL;
                      ^
video_layer.cpp:144:3: error: 'av_format_par' was not declared in this scope
   av_format_par = &avp;
   ^
video_layer.cpp:144:20: error: 'avp' was not declared in this scope
   av_format_par = &avp;
                    ^
video_layer.cpp:180:28: error: 'url_set_interrupt_cb' was not declared in this scope
   url_set_interrupt_cb(NULL);
                            ^
video_layer.cpp:186:87: error: 'av_open_input_file' was not declared in this scope
   err = av_open_input_file (&avformat_context, file, av_input_format, 0, av_format_par);
                                                                                       ^
video_layer.cpp:196:45: error: 'av_find_stream_info' was not declared in this scope
   err = av_find_stream_info(avformat_context);
                                             ^
video_layer.cpp:231:52: error: 'avcodec_open' was not declared in this scope
       if (avcodec_open(video_codec_ctx, video_codec) < 0) {
                                                    ^
video_layer.cpp:274:52: error: 'avcodec_open' was not declared in this scope
       if (avcodec_open(audio_codec_ctx, audio_codec) < 0) {
                                                    ^
video_layer.cpp: In member function 'int VideoLayer::decode_audio_packet(int*)':
video_layer.cpp:601:9: warning: 'int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3608) [-Wdeprecated-declarations]
   res = avcodec_decode_audio3(audio_codec_ctx, (int16_t *)audio_buf,
         ^
video_layer.cpp:602:25: warning: 'int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3608) [-Wdeprecated-declarations]
          &datasize, &pkt);
                         ^
video_layer.cpp: In member function 'int VideoLayer::decode_video_packet(int*)':
video_layer.cpp:671:29: error: 'FF_B_TYPE' was not declared in this scope
   if (av_frame.pict_type == FF_B_TYPE)
                             ^
video_layer.cpp:673:34: error: 'FF_I_TYPE' was not declared in this scope
   else if (av_frame.pict_type == FF_I_TYPE)
                                  ^
video_layer.cpp: In member function 'virtual void VideoLayer::close()':
video_layer.cpp:710:5: warning: 'void av_close_input_file(AVFormatContext*)' is deprecated (declared at /usr/include/libavformat/avformat.h:1397) [-Wdeprecated-declarations]
     av_close_input_file(avformat_context);
     ^
video_layer.cpp:710:41: warning: 'void av_close_input_file(AVFormatContext*)' is deprecated (declared at /usr/include/libavformat/avformat.h:1397) [-Wdeprecated-declarations]
     av_close_input_file(avformat_context);
                                         ^
make[3]: *** [video_layer.lo] Error 1
make[3]: Leaving directory `/home/ricardo/dev/FreeJ/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/ricardo/dev/FreeJ/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ricardo/dev/FreeJ'
make: *** [all] Error 2

Can I build freej on a recent ubuntu?

@jaromil
Copy link
Member

jaromil commented Mar 3, 2015

FreeJ needs a version on FFMpeg preceeding the complete overhaul and devastation that has been done to its API.

I am considering to restore static linking of FFMpeg as it was before being included in Debian

(Debian has first included FreeJ recommending such a change, then it has removed it from packages. How nice of them!)

@jaromil
Copy link
Member

jaromil commented Mar 3, 2015

As @diorcety is working on FreeJ 2.0 I see this may be a fix diorcety@05d0bc8

@diorcety
Copy link

diorcety commented Mar 3, 2015

Maybe, it is not tested, it takes the code from the old function,brainlessly ...

@ricardogsilva
Copy link
Author

I'll try using @diorcety repo to see if it builds. If not, what version of ffmpeg would I need to compile and link with the freej source?

@jaromil
Copy link
Member

jaromil commented Mar 3, 2015

I'd go with any of the 1.x releases maintained by Niedermayer https://www.ffmpeg.org/olddownload.html and recall using 0.10 "Freedom" succesfully, may also work up to 1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants