f4exb / sdrangel

SDR Rx/Tx software for Airspy, Airspy HF+, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay and FunCube
GNU General Public License v3.0
2.94k stars 447 forks source link

Cmake VS2017 #251

Closed GkvJeep closed 5 years ago

GkvJeep commented 5 years ago

Hi Edouard. In the attached file, the changes for assembly through Cmake for VS2017, without *.pro. ChangeCmakeVS.txt Konstantin.

f4exb commented 5 years ago

Do you still use some kind of tool like cmake GUI ?

GkvJeep commented 5 years ago

Yes Cmake GUI.

Prebuilt windows binaries. QT5 (must match MSVC version) - http://qt-project.org/downloads PothosSDR http://downloads.myriadrf.org/builds/PothosSDR/?C=M;O=D Boost https://sourceforge.net/projects/boost/files/boost-binaries/

GkvJeep commented 5 years ago

Hi . What version of FFMPEG are you using for assembly? 3.2 .... 4.x
I do the assembly under Windows https://ffmpeg.zeranoe.com/builds/win64/dev/

f4exb commented 5 years ago

This is used in the DATV demodulator that is not present in Windows distributions.

GkvJeep commented 5 years ago

I want to help you do it. Edit: demoddatv

f4exb commented 5 years ago

I see you managed to compile it on MSVC well done. If I take the build on Ubuntu 18.04 as a reference this is ffmpeg version 3.4.2-2

GkvJeep commented 5 years ago

Changes //=============== datvconstellation.h ============================= sdrangel-4.3.0\plugins\channelrx\demoddatv\datvconstellation.h

ifdef _WINDOWS

include <sys/timeb.h>

else

include <sys/time.h>

endif

//=========== leansdr\generic.h ================================= sdrangel-4.3.0\plugins\channelrx\demoddatv\leansdr\generic.h

ifdef _WINDOWS

include

include

else

include

endif

//============= leansdr\dvb.h =============================== sdrangel-4.3.0\plugins\channelrx\demoddatv\leansdr\dvb.h line 672 comment all [FECxx] { //[FEC12] = { 1, 2, polys_fec12 },// [FEC23] = { 2, 3, polys_fec23 },// [FEC46] = { 4, 6, polys_fec46 },// [FEC34] = { 3, 4, polys_fec34 },// [FEC56] = { 5, 6, polys_fec56 },// [FEC78] = { 7, 8, polys_fec78 },// [FEC45] =

// ======== Fixed error ================= sdrangel-4.3.0\plugins\channelrx\demoddatv\datvideostream.cpp Fixed error Line 52 m_objMutex.unlock(); Сall unlock() witout lock() from the DATVideostream::DATVideostream()

GkvJeep commented 5 years ago

2018-11-28 00:20:07.634 (D) MainWindow::MainWindow: update preset controls... 2018-11-28 00:20:07.637 (W) MainWindow::MainWindow: could not register resource file D:/SdrAngel/sdrangel-4.3.0_Buid64/bin_RELWITHDEBINFO/sdrbase.rcc

what resources?

f4exb commented 5 years ago

This is a Qt resources file that is built from a .qrc file. See this: https://github.com/f4exb/sdrangel/blob/bc7ad10f9d9a7694320e8ecebab65eb8b9c1b5e7/CMakeLists.txt#L244

This is actually the internal static web pages and the swagger-ui and is essential.

f4exb commented 5 years ago

Why do you comment all [FECxx] in plugins\channelrx\demoddatv\leansdr\dvb.h ? This is a breaking code change.

GkvJeep commented 5 years ago

Otherwise compile errors C3480,C3260,C2143. There is no code violation.

f4exb commented 5 years ago

OK, i'll test it. I am now able to build DATV Demod with .pro file. Using dev and shared distribution of ffmpeg from here: https://ffmpeg.zeranoe.com/builds/ (same as yours but selects the most up to date and you also need the shared version for the .dlls distribution). Edit: looks ok

GkvJeep commented 5 years ago

I make through cmake GUI. Secondly, you can select previous versions there,dev and shared. Label Previous Builds and three buttons .... Windows 64-bit build ... etc

GkvJeep commented 5 years ago

Hi ! A little bit of this. https://github.com/f4exb/sdrangel/tree/master/plugins/channelrx/demoddsd#dv-serial-device-support " Note also that this is not supported in Windows because of trouble with COM port support (contributors welcome!). What help is needed?

f4exb commented 5 years ago

Well I have no idea why it does not work in Windows. This is a serial port over USB interface so I would expect it to create a virtual COM port. I could never get it working on Windows but works like a charm on Linux and I use it every day for digital voice as it gives a superior sound.

GkvJeep commented 5 years ago

Not Windows problem. page 7. 3.2. FTDI's R, C and BM series chips allow the latency timer to be changed from 16 milliseconds to any value from 1 to 255 milliseconds, in 1 millisecond increments. When using the FTDI Virtual COM Port driver the latency timer can be set in the port properties page. In Windows, the port properties page is accessed via the Control Panel > System > Device Manager. For Windows 2000 and XP, the initial value of the latency timer can also be pre-configured in ftdiport.inf by changing the value of the last number in the following line: [FtdiPort.NT.HW.AddReg] HKR,,"LatencyTimer",0x00010001,16 where again, 16 milliseconds is the default value. When using FTDI's D2XX direct driver the function FT_SetLatencyTimer can be used to adjust the value of the latency timer.

https://www.ftdichip.com/Support/Documents/AppNotes/AN232B-04_DataLatencyFlow.pdf

Edit: I use to work in windows FTDI's chips code based on https://github.com/uli/cascade/blob/open_public/os_serial_win32.cpp

f4exb commented 5 years ago

This is a Windows + AMBE dongle issue and is a different problem that should be handled in another issue. This requires specific code for Windows.

GkvJeep commented 5 years ago

Checked. No comment required, line 52 files \sdrgui\CMakeLists.txt. Otherwise, a link error is fixed.

GkvJeep commented 5 years ago

Wish, add option ;-) option(BUILD_PLAGINSRV "Build PLAGINS SRV" OFF) ........ if (BUILD_PLAGINSRV) add_subdirectory(pluginssrv) endif()

GkvJeep commented 5 years ago

PVS-studio fixed.

V773 Visibility scope of the 'fifos' pointer was exited without releasing the memory. A memory leak is possible. soapysdrinput.cpp 522 V773 Visibility scope of the 'log2Decims' pointer was exited without releasing the memory. A memory leak is possible. soapysdrinput.cpp 522 V773 Visibility scope of the 'fcPoss' pointer was exited without releasing the memory. A memory leak is possible. soapysdrinput.cpp 522

V773 Visibility scope of the 'fifos' pointer was exited without releasing the memory. A memory leak is possible. soapysdrinput.cpp 656 V773 Visibility scope of the 'log2Decims' pointer was exited without releasing the memory. A memory leak is possible. soapysdrinput.cpp 656 V773 Visibility scope of the 'fcPoss' pointer was exited without releasing the memory. A memory leak is possible. soapysdrinput.cpp 656

V773 Visibility scope of the 'fifos' pointer was exited without releasing the memory. A memory leak is possible. soapysdroutput.cpp 486 V773 Visibility scope of the 'log2Interps' pointer was exited without releasing the memory. A memory leak is possible. soapysdroutput.cpp 486

V774 The 'soapySDROutputThread' pointer was used after the memory was released. soapysdroutput.cpp 610

V773 Visibility scope of the 'fifos' pointer was exited without releasing the memory. A memory leak is possible. soapysdroutput.cpp 612 V773 Visibility scope of the 'log2Interps' pointer was exited without releasing the memory. A memory leak is possible. soapysdroutput.cpp 612

V764 Possible incorrect order of arguments passed to 'create' function: 'individualGainsChanged' and 'globalGainChanged'. soapysdrinput.cpp 1260

f4exb commented 5 years ago

If the build of the server is conditional then the condition should be ON by default. It is true that it is not normally needed for Windows since it makes no sense to run headless on Windows.

Then the GUI version should also be optional also with default ON. Because similarly you would not run the GUI version on smallish SBCs like the Raspberry Pi.

The default should be ON for the unwary to compile all versions by default.

See #261

GkvJeep commented 5 years ago

Hi ! I noticed a bug in the channel analyzer. When changing the sample rate Device, does not display the timeline correctly. S/R 2.56M/S GSM Time Slot Ok. gsm_2560 S/R 1.28M/S GSM Time Slot Bug. gsm_1280

If change "lowpass filter cut-off frequency" timeline correctly. gsm

f4exb commented 5 years ago

Many different subjects were discussed here that were solved or worked around. The main point of integration with MSVC has been done. So closing this one.