Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/sr99622/libonvif
Browse files Browse the repository at this point in the history
master README was changed
  • Loading branch information
sr99622 committed Dec 16, 2022
2 parents ee7831a + 79dd93b commit 7571966
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,20 @@ environment to install dependencies. To install anaconda on Windows, please
refer to the link https://docs.anaconda.com/anaconda/install/windows/. Once
anaconda has been installed, launch a conda prompt and then use the following
commands to build. You will need to have Microsoft Visual Studio installed
with the C++ compiler. After the build, the executable files can be found in
the Release directory. The conda environment must be active when running the
program.
with the C++ compiler, as well as git and cmake. The cmake installer will
integrate the executables and development files into the conda environment.
The conda environment must be active when running the executables.

```bash
conda create --name onvif -c conda-forge qt libxml2 ffmpeg sdl2 git cmake
conda create --name onvif -c conda-forge qt libxml2 ffmpeg sdl2
conda activate onvif
git clone https://github.com/sr99622/libonvif.git
cd libonvif
mkdir build
cd build
cmake -DBUILD_GUI=ON ..
cmake -DBUILD_GUI=ON -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ..
cmake --build . --config Release
cmake --install .
```

ALTERNATE WINDOWS BUILD
Expand Down
3 changes: 2 additions & 1 deletion libavio/src/Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ Reader::Reader(const char* filename)
#else
av_dict_set(&opts, "stimeout", "5000000", 0);
#endif

ex.ck(avformat_open_input(&fmt_ctx, filename, NULL, &opts), CmdTag::AOI);

av_dict_free(&opts);
timeout_start = time(NULL);

AVIOInterruptCB cb = { interrupt_callback, this };
fmt_ctx->interrupt_callback = cb;

Expand Down
1 change: 0 additions & 1 deletion onvif-gui/include/settingspanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class SettingsPanel : public QWidget
QLineEdit *commonUsername;
QLineEdit *commonPassword;
QCheckBox *lowLatency;
QCheckBox *hardwareDecoding;
QComboBox *hardwareDecoders;
QSlider *zoom;
QSlider *panX;
Expand Down
18 changes: 11 additions & 7 deletions onvif-gui/src/settingspanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ SettingsPanel::SettingsPanel(QMainWindow* parent)

QStringList decoders = {
"NONE",
"VDPAU",
"CUDA",
"VAAPI",
"VDPAU",
"DXVA2",
"QSV",
"VIDEOTOOLBOX",
"D3D11VA",
"QSV",
"DRM",
"OPENCL",
"MEDIACODEC"
// "MEDIACODEC"
// "VIDEOTOOLBOX",
};

listDecoders = new QListWidget(this);
Expand Down Expand Up @@ -305,6 +305,7 @@ void SettingsPanel::getActiveNetworkInterfaces()
PIP_ADAPTER_INFO pAdapter = NULL;
DWORD dwRetVal = 0;
//UINT i;
QStringList args;

ULONG ulOutBufLen = sizeof (IP_ADAPTER_INFO);
pAdapterInfo = (IP_ADAPTER_INFO *) malloc(sizeof (IP_ADAPTER_INFO));
Expand All @@ -329,11 +330,15 @@ void SettingsPanel::getActiveNetworkInterfaces()
char interface_info[1024];
sprintf(interface_info, "%s - %s", pAdapter->IpAddressList.IpAddress.String, pAdapter->Description);
emit msg(QString("Network interface info %1").arg(interface_info));
networkInterfaces->addItem(QString(interface_info));
args.push_back(interface_info);
}
pAdapter = pAdapter->Next;
}
} else {
interfaces->addItems(args);
networkInterfaces->setModel(interfaces->model());
networkInterfaces->setView(interfaces);
}
else {
emit msg(QString("GetAdaptersInfo failed with error: %1").arg(dwRetVal));
}
if (pAdapterInfo)
Expand Down Expand Up @@ -372,7 +377,6 @@ void SettingsPanel::getActiveNetworkInterfaces()
label += " - ";
label += ifa->ifa_name;
emit msg(label);
//networkInterfaces->addItem(label);
args.push_back(label);
}

Expand Down

0 comments on commit 7571966

Please sign in to comment.