Essentia  2.1-beta6-dev
ffmpegapi.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra
3  *
4  * This file is part of Essentia
5  *
6  * Essentia is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License as published by the Free
8  * Software Foundation (FSF), either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14  * details.
15  *
16  * You should have received a copy of the Affero GNU General Public License
17  * version 3 along with this program. If not, see http://www.gnu.org/licenses/
18  */
19 
20 #ifndef ESSENTIA_FFMPEGAPI_H
21 #define ESSENTIA_FFMPEGAPI_H
22 
23 extern "C" {
24 #include <libavcodec/avcodec.h>
25 #include <libavformat/avformat.h>
26 #include <libavutil/md5.h>
27 #include <libswresample/swresample.h>
28 #include <libavutil/opt.h>
29 }
30 
31 
32 // --- from audiocontext
33 
34 #ifndef AV_PKT_FLAG_KEY
35 # define AV_PKT_FLAG_KEY PKT_FLAG_KEY
36 #endif
37 
38 #ifndef AVIO_FLAG_WRITE
39 # define AVIO_FLAG_WRITE URL_WRONLY
40 # define avio_open url_fopen
41 # define avio_close url_fclose
42 # define avformat_write_header(c, o) av_write_header(c)
43 #endif
44 
45 
46 #endif // ESSENTIA_FFMPEGAPI_H
47