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

Modified for macOSX #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions DeckLinkCapture.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ CONFIG += c++1z
DESTDIR = $$PWD/_bin

win32:INCLUDEPATH += C:\opencv\build\include
macx:INCLUDEPATH += /usr/local/Cellar/libomp/10.0.1/include

linux:QMAKE_CXXFLAGS += -fopenmp
linux:QMAKE_LFLAGS += -fopenmp
Expand All @@ -27,8 +28,8 @@ use_video_recording {
INCLUDEPATH += C:/ffmpeg-4.1.3-win64-dev/include
LIBS += -LC:/ffmpeg-4.1.3-win64-dev/lib
}
macx:INCLUDEPATH += /usr/local/Cellar/ffmpeg/4.1.4_1/include
macx:LIBS += -L/usr/local/Cellar/ffmpeg/4.1.4_1/lib
macx:INCLUDEPATH += /usr/local/Cellar/ffmpeg/4.3.1_1/include
macx:LIBS += -L/usr/local/Cellar/ffmpeg/4.3.1_1/lib
LIBS += -lavutil -lavcodec -lavformat -lswscale -lswresample
}

Expand All @@ -39,8 +40,8 @@ use_opencv {
DEFINES += USE_OPENCV
linux:INCLUDEPATH += /usr/include/opencv4
linux:LIBS += -lopencv_core -lopencv_highgui -lopencv_imgproc
macx:INCLUDEPATH += /usr/local/Cellar/opencv/4.1.0_2/include/opencv4
macx:LIBS += -L/usr/local/Cellar/opencv/4.1.0_2/lib -lopencv_core -lopencv_highgui -lopencv_imgproc
macx:INCLUDEPATH += /usr/local/Cellar/opencv/4.4.0_2/include/opencv4
macx:LIBS += -L/usr/local/Cellar/opencv/4.4.0_2/lib -lopencv_core -lopencv_highgui -lopencv_imgproc
CONFIG(release,debug|release):win32:LIBS += -LC:\opencv\build\x64\vc15\lib -lopencv_world410
CONFIG(debug,debug|release):win32:LIBS += -LC:\opencv\build\x64\vc15\lib -lopencv_world410d
}
Expand Down Expand Up @@ -88,5 +89,5 @@ use_video_recording {
win32:SOURCES += sdk/Win/DeckLinkAPI_i.c
win32:HEADERS += sdk/Win/DeckLinkAPI_h.h
linux:SOURCES += sdk/Linux/include/DeckLinkAPIDispatch.cpp
macx:SOURCES += sdk/Mac/include/DeckLinkAPIDispatch.cpp
macx:SOURCES += sdk/Mac/include/DeckLinkAPIDispatch.cpp

16 changes: 8 additions & 8 deletions MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ static inline void BlockSignals(QWidget *w, std::function<void ()> const &callba

// Video input connector map
const QVector<QPair<BMDVideoConnection, QString>> kVideoInputConnections = {
qMakePair(bmdVideoConnectionSDI, QString("SDI")),
qMakePair(bmdVideoConnectionHDMI, QString("HDMI")),
qMakePair(bmdVideoConnectionSDI, QString("SDI")),
qMakePair(bmdVideoConnectionHDMI, QString("HDMI")),
qMakePair(bmdVideoConnectionOpticalSDI, QString("Optical SDI")),
qMakePair(bmdVideoConnectionComponent, QString("Component")),
qMakePair(bmdVideoConnectionComposite, QString("Composite")),
qMakePair(bmdVideoConnectionSVideo, QString("S-Video")),
qMakePair(bmdVideoConnectionSVideo, QString("S-Video")),
};

const QVector<QPair<DeinterlaceMode, QString>> deinterlace_mode_list = {
qMakePair(DeinterlaceMode::None, QString("None")),
qMakePair(DeinterlaceMode::InterpolateEven, QString("Interporate Even")),
qMakePair(DeinterlaceMode::InterpolateOdd, QString("Interporate Odd")),
qMakePair(DeinterlaceMode::Merge, QString("Merge")),
qMakePair(DeinterlaceMode::MergeX2, QString("Merge x2 Frames")),
qMakePair(DeinterlaceMode::None, QString("None")),
qMakePair(DeinterlaceMode::InterpolateEven, QString("Interporate Even")),
qMakePair(DeinterlaceMode::InterpolateOdd, QString("Interporate Odd")),
qMakePair(DeinterlaceMode::Merge, QString("Merge")),
qMakePair(DeinterlaceMode::MergeX2, QString("Merge x2 Frames")),
};

struct MainWindow::Private {
Expand Down
2 changes: 1 addition & 1 deletion VideoEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern "C" {

namespace {
//static const int STREAM_DURATION = 5.0;
//static const double STREAM_FRAME_RATE = 29.97;
//static const double STREAM_FRAME_RATE = 50;
static const AVPixelFormat STREAM_PIX_FMT = AV_PIX_FMT_YUV420P;
static const int sws_flags = SWS_BILINEAR;

Expand Down
2 changes: 1 addition & 1 deletion VideoEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class VideoEncoder : public QThread {
void run();
public:
struct VideoOption {
double fps = 30;
double fps = 50;
};
struct AudioOption {
};
Expand Down