mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-23 22:49:37 -05:00
Fixed includes and macros for newer opencv
This commit is contained in:
parent
c7b6f5ffba
commit
7a0dfbcda9
@ -121,10 +121,17 @@ win32 {
|
||||
message(Use system opencv libraries.)
|
||||
LIBS += -lopencv_core -lopencv_highgui -lopencv_imgproc
|
||||
}
|
||||
LIBS += -lzlib -lole32 -loleaut32 -luuid -lvfw32 -llibjpeg-turbo -llibtiff -llibpng -llibjasper -lIlmImf
|
||||
LIBS += -lole32 -loleaut32 -luuid -lvfw32
|
||||
LIBS += -lavifil32 -lavicap32 -lavcodec -lavutil -lswresample
|
||||
|
||||
# Check for msys2
|
||||
!isEmpty(PREFIX_MSYS2) {
|
||||
message(Use msys2 opencv4.)
|
||||
INCLUDEPATH += "$${PREFIX_MSYS2}/include/opencv4"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#################################### MacOSX #####################################
|
||||
|
||||
macx {
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "gui/SoundManager.h"
|
||||
#include "gui/chat/ChatWidget.h"
|
||||
|
||||
#include <opencv/cv.h>
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <speex/speex.h>
|
||||
|
||||
#define IMAGE_VOIP ":/images/talking_on.svg"
|
||||
|
@ -18,8 +18,9 @@
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include <opencv/cv.h>
|
||||
#include <opencv/highgui.h>
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <opencv2/imgproc/types_c.h>
|
||||
|
||||
#include <QTimer>
|
||||
#include <QPainter>
|
||||
|
@ -473,10 +473,10 @@ FFmpegVideo::FFmpegVideo()
|
||||
encoding_context->rc_max_rate = 0;
|
||||
encoding_context->rc_buffer_size = 0;
|
||||
#endif
|
||||
if (encoding_codec->capabilities & CODEC_CAP_TRUNCATED)
|
||||
encoding_context->flags |= CODEC_FLAG_TRUNCATED;
|
||||
encoding_context->flags |= CODEC_FLAG_PSNR;//Peak signal-to-noise ratio
|
||||
encoding_context->flags |= CODEC_CAP_PARAM_CHANGE;
|
||||
if (encoding_codec->capabilities & AV_CODEC_CAP_TRUNCATED)
|
||||
encoding_context->flags |= AV_CODEC_FLAG_TRUNCATED;
|
||||
encoding_context->flags |= AV_CODEC_FLAG_PSNR;//Peak signal-to-noise ratio
|
||||
encoding_context->flags |= AV_CODEC_CAP_PARAM_CHANGE;
|
||||
encoding_context->i_quant_factor = 0.769f;
|
||||
encoding_context->b_quant_factor = 1.4f;
|
||||
encoding_context->time_base.num = 1;
|
||||
@ -569,10 +569,10 @@ FFmpegVideo::FFmpegVideo()
|
||||
decoding_context->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
#endif
|
||||
|
||||
if(decoding_codec->capabilities & CODEC_CAP_TRUNCATED)
|
||||
decoding_context->flags |= CODEC_FLAG_TRUNCATED; // we do not send complete frames
|
||||
if(decoding_codec->capabilities & AV_CODEC_CAP_TRUNCATED)
|
||||
decoding_context->flags |= AV_CODEC_FLAG_TRUNCATED; // we do not send complete frames
|
||||
//we can receive truncated frames
|
||||
decoding_context->flags2 |= CODEC_FLAG2_CHUNKS;
|
||||
decoding_context->flags2 |= AV_CODEC_FLAG2_CHUNKS;
|
||||
|
||||
AVDictionary* dictionary = NULL;
|
||||
if(avcodec_open2(decoding_context, decoding_codec, &dictionary) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user