diff --git a/README.md b/README.md index 5ce45d9..66059d1 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,10 @@ Micsig provide an Android apk for remote control of their networked scopes. I noticed video compression and delved into reverse engineering the protocol. +Build requirements (Ubuntu): +`sudo apt install libavcodec-dev libswscale-dev qtcreator qtbase5-dev qt5-qmake qtmultimedia5-dev qtdeclarative5-dev cmake icoutils` + +Runtime requirements (Ubuntu): +`sudo apt install qml-module-qtmultimedia qml-module-qt-labs-settings qml-module-qtquick-layouts qml-module-qtquick-controls qml-module-qtquick-controls2` + ![Screenshot](https://github.com/GothAck/oscope/blob/master/docs/screen-scope.png?raw=true) diff --git a/cmake/Icons.cmake b/cmake/Icons.cmake index e26f90f..6c8d877 100644 --- a/cmake/Icons.cmake +++ b/cmake/Icons.cmake @@ -4,7 +4,7 @@ function(icons) foreach(res IN LISTS ARGN) add_custom_target(icon_${res} COMMAND mkdir -p icons/hicolor/${res}x${res} - COMMAND inkscape -z -e icons/hicolor/${res}x${res}/oscope.png -w ${res} -h ${res} ${CMAKE_CURRENT_SOURCE_DIR}/resources/oscope.svg + COMMAND inkscape -z --export-type=png --export-filename=icons/hicolor/${res}x${res}/oscope.png -w ${res} -h ${res} ${CMAKE_CURRENT_SOURCE_DIR}/resources/oscope.svg BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/icons/hicolor/${res}x${res}/oscope.png ) list(APPEND icon_targets "icon_${res}") diff --git a/src/socket.cpp b/src/socket.cpp index 233dc43..154bef3 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -12,9 +12,6 @@ Socket::Socket(Scope *parent) : _buffer(new QBuffer(this)) { _buffer->open(QBuffer::WriteOnly); - memset(&pic_raw, 0, sizeof(pic_raw)); - - avcodec_register_all(); pkt = av_packet_alloc(); codec = avcodec_find_decoder(AV_CODEC_ID_H264); parser = av_parser_init(codec->id); @@ -111,6 +108,8 @@ bool Socket::decode() { vidFrame->unmap(); emit frameAvailable(vidFrame); } + + return true; } bool Socket::onFrame(QByteArray frame) { diff --git a/src/socket.hpp b/src/socket.hpp index a13b083..3285aa5 100644 --- a/src/socket.hpp +++ b/src/socket.hpp @@ -54,7 +54,6 @@ private slots: AVCodecParserContext *parser = nullptr; AVCodecContext *c= nullptr; AVFrame *picture = nullptr; - AVPicture pic_raw; AVPacket *pkt = nullptr; int num_nals = 0;