mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-06-27 14:35:31 -04:00
REST API: implemented play toggle for Local source and sink plugins
This commit is contained in:
parent
282267dc38
commit
6ea3356371
@ -12,6 +12,9 @@ LocalSinkSettings:
|
|||||||
type: integer
|
type: integer
|
||||||
filterChainHash:
|
filterChainHash:
|
||||||
type: integer
|
type: integer
|
||||||
|
play:
|
||||||
|
description: boolean (1 to play, 0 to stop)
|
||||||
|
type: integer
|
||||||
streamIndex:
|
streamIndex:
|
||||||
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
||||||
type: integer
|
type: integer
|
||||||
|
@ -12,6 +12,9 @@ LocalSourceSettings:
|
|||||||
type: integer
|
type: integer
|
||||||
filterChainHash:
|
filterChainHash:
|
||||||
type: integer
|
type: integer
|
||||||
|
play:
|
||||||
|
description: boolean (1 to play, 0 to stop)
|
||||||
|
type: integer
|
||||||
streamIndex:
|
streamIndex:
|
||||||
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
||||||
type: integer
|
type: integer
|
||||||
|
@ -12,6 +12,9 @@ LocalSinkSettings:
|
|||||||
type: integer
|
type: integer
|
||||||
filterChainHash:
|
filterChainHash:
|
||||||
type: integer
|
type: integer
|
||||||
|
play:
|
||||||
|
description: boolean (1 to play, 0 to stop)
|
||||||
|
type: integer
|
||||||
streamIndex:
|
streamIndex:
|
||||||
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
||||||
type: integer
|
type: integer
|
||||||
|
@ -12,6 +12,9 @@ LocalSourceSettings:
|
|||||||
type: integer
|
type: integer
|
||||||
filterChainHash:
|
filterChainHash:
|
||||||
type: integer
|
type: integer
|
||||||
|
play:
|
||||||
|
description: boolean (1 to play, 0 to stop)
|
||||||
|
type: integer
|
||||||
streamIndex:
|
streamIndex:
|
||||||
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
||||||
type: integer
|
type: integer
|
||||||
|
@ -38,6 +38,8 @@ SWGLocalSinkSettings::SWGLocalSinkSettings() {
|
|||||||
m_log2_decim_isSet = false;
|
m_log2_decim_isSet = false;
|
||||||
filter_chain_hash = 0;
|
filter_chain_hash = 0;
|
||||||
m_filter_chain_hash_isSet = false;
|
m_filter_chain_hash_isSet = false;
|
||||||
|
play = 0;
|
||||||
|
m_play_isSet = false;
|
||||||
stream_index = 0;
|
stream_index = 0;
|
||||||
m_stream_index_isSet = false;
|
m_stream_index_isSet = false;
|
||||||
use_reverse_api = 0;
|
use_reverse_api = 0;
|
||||||
@ -68,6 +70,8 @@ SWGLocalSinkSettings::init() {
|
|||||||
m_log2_decim_isSet = false;
|
m_log2_decim_isSet = false;
|
||||||
filter_chain_hash = 0;
|
filter_chain_hash = 0;
|
||||||
m_filter_chain_hash_isSet = false;
|
m_filter_chain_hash_isSet = false;
|
||||||
|
play = 0;
|
||||||
|
m_play_isSet = false;
|
||||||
stream_index = 0;
|
stream_index = 0;
|
||||||
m_stream_index_isSet = false;
|
m_stream_index_isSet = false;
|
||||||
use_reverse_api = 0;
|
use_reverse_api = 0;
|
||||||
@ -93,6 +97,7 @@ SWGLocalSinkSettings::cleanup() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(reverse_api_address != nullptr) {
|
if(reverse_api_address != nullptr) {
|
||||||
delete reverse_api_address;
|
delete reverse_api_address;
|
||||||
}
|
}
|
||||||
@ -122,6 +127,8 @@ SWGLocalSinkSettings::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&filter_chain_hash, pJson["filterChainHash"], "qint32", "");
|
::SWGSDRangel::setValue(&filter_chain_hash, pJson["filterChainHash"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&play, pJson["play"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
|
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
|
||||||
@ -165,6 +172,9 @@ SWGLocalSinkSettings::asJsonObject() {
|
|||||||
if(m_filter_chain_hash_isSet){
|
if(m_filter_chain_hash_isSet){
|
||||||
obj->insert("filterChainHash", QJsonValue(filter_chain_hash));
|
obj->insert("filterChainHash", QJsonValue(filter_chain_hash));
|
||||||
}
|
}
|
||||||
|
if(m_play_isSet){
|
||||||
|
obj->insert("play", QJsonValue(play));
|
||||||
|
}
|
||||||
if(m_stream_index_isSet){
|
if(m_stream_index_isSet){
|
||||||
obj->insert("streamIndex", QJsonValue(stream_index));
|
obj->insert("streamIndex", QJsonValue(stream_index));
|
||||||
}
|
}
|
||||||
@ -237,6 +247,16 @@ SWGLocalSinkSettings::setFilterChainHash(qint32 filter_chain_hash) {
|
|||||||
this->m_filter_chain_hash_isSet = true;
|
this->m_filter_chain_hash_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGLocalSinkSettings::getPlay() {
|
||||||
|
return play;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGLocalSinkSettings::setPlay(qint32 play) {
|
||||||
|
this->play = play;
|
||||||
|
this->m_play_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGLocalSinkSettings::getStreamIndex() {
|
SWGLocalSinkSettings::getStreamIndex() {
|
||||||
return stream_index;
|
return stream_index;
|
||||||
@ -317,6 +337,9 @@ SWGLocalSinkSettings::isSet(){
|
|||||||
if(m_filter_chain_hash_isSet){
|
if(m_filter_chain_hash_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
if(m_play_isSet){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
if(m_stream_index_isSet){
|
if(m_stream_index_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,9 @@ public:
|
|||||||
qint32 getFilterChainHash();
|
qint32 getFilterChainHash();
|
||||||
void setFilterChainHash(qint32 filter_chain_hash);
|
void setFilterChainHash(qint32 filter_chain_hash);
|
||||||
|
|
||||||
|
qint32 getPlay();
|
||||||
|
void setPlay(qint32 play);
|
||||||
|
|
||||||
qint32 getStreamIndex();
|
qint32 getStreamIndex();
|
||||||
void setStreamIndex(qint32 stream_index);
|
void setStreamIndex(qint32 stream_index);
|
||||||
|
|
||||||
@ -94,6 +97,9 @@ private:
|
|||||||
qint32 filter_chain_hash;
|
qint32 filter_chain_hash;
|
||||||
bool m_filter_chain_hash_isSet;
|
bool m_filter_chain_hash_isSet;
|
||||||
|
|
||||||
|
qint32 play;
|
||||||
|
bool m_play_isSet;
|
||||||
|
|
||||||
qint32 stream_index;
|
qint32 stream_index;
|
||||||
bool m_stream_index_isSet;
|
bool m_stream_index_isSet;
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@ SWGLocalSourceSettings::SWGLocalSourceSettings() {
|
|||||||
m_log2_interp_isSet = false;
|
m_log2_interp_isSet = false;
|
||||||
filter_chain_hash = 0;
|
filter_chain_hash = 0;
|
||||||
m_filter_chain_hash_isSet = false;
|
m_filter_chain_hash_isSet = false;
|
||||||
|
play = 0;
|
||||||
|
m_play_isSet = false;
|
||||||
stream_index = 0;
|
stream_index = 0;
|
||||||
m_stream_index_isSet = false;
|
m_stream_index_isSet = false;
|
||||||
use_reverse_api = 0;
|
use_reverse_api = 0;
|
||||||
@ -68,6 +70,8 @@ SWGLocalSourceSettings::init() {
|
|||||||
m_log2_interp_isSet = false;
|
m_log2_interp_isSet = false;
|
||||||
filter_chain_hash = 0;
|
filter_chain_hash = 0;
|
||||||
m_filter_chain_hash_isSet = false;
|
m_filter_chain_hash_isSet = false;
|
||||||
|
play = 0;
|
||||||
|
m_play_isSet = false;
|
||||||
stream_index = 0;
|
stream_index = 0;
|
||||||
m_stream_index_isSet = false;
|
m_stream_index_isSet = false;
|
||||||
use_reverse_api = 0;
|
use_reverse_api = 0;
|
||||||
@ -93,6 +97,7 @@ SWGLocalSourceSettings::cleanup() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(reverse_api_address != nullptr) {
|
if(reverse_api_address != nullptr) {
|
||||||
delete reverse_api_address;
|
delete reverse_api_address;
|
||||||
}
|
}
|
||||||
@ -122,6 +127,8 @@ SWGLocalSourceSettings::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&filter_chain_hash, pJson["filterChainHash"], "qint32", "");
|
::SWGSDRangel::setValue(&filter_chain_hash, pJson["filterChainHash"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&play, pJson["play"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
|
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
|
||||||
@ -165,6 +172,9 @@ SWGLocalSourceSettings::asJsonObject() {
|
|||||||
if(m_filter_chain_hash_isSet){
|
if(m_filter_chain_hash_isSet){
|
||||||
obj->insert("filterChainHash", QJsonValue(filter_chain_hash));
|
obj->insert("filterChainHash", QJsonValue(filter_chain_hash));
|
||||||
}
|
}
|
||||||
|
if(m_play_isSet){
|
||||||
|
obj->insert("play", QJsonValue(play));
|
||||||
|
}
|
||||||
if(m_stream_index_isSet){
|
if(m_stream_index_isSet){
|
||||||
obj->insert("streamIndex", QJsonValue(stream_index));
|
obj->insert("streamIndex", QJsonValue(stream_index));
|
||||||
}
|
}
|
||||||
@ -237,6 +247,16 @@ SWGLocalSourceSettings::setFilterChainHash(qint32 filter_chain_hash) {
|
|||||||
this->m_filter_chain_hash_isSet = true;
|
this->m_filter_chain_hash_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGLocalSourceSettings::getPlay() {
|
||||||
|
return play;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGLocalSourceSettings::setPlay(qint32 play) {
|
||||||
|
this->play = play;
|
||||||
|
this->m_play_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGLocalSourceSettings::getStreamIndex() {
|
SWGLocalSourceSettings::getStreamIndex() {
|
||||||
return stream_index;
|
return stream_index;
|
||||||
@ -317,6 +337,9 @@ SWGLocalSourceSettings::isSet(){
|
|||||||
if(m_filter_chain_hash_isSet){
|
if(m_filter_chain_hash_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
if(m_play_isSet){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
if(m_stream_index_isSet){
|
if(m_stream_index_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,9 @@ public:
|
|||||||
qint32 getFilterChainHash();
|
qint32 getFilterChainHash();
|
||||||
void setFilterChainHash(qint32 filter_chain_hash);
|
void setFilterChainHash(qint32 filter_chain_hash);
|
||||||
|
|
||||||
|
qint32 getPlay();
|
||||||
|
void setPlay(qint32 play);
|
||||||
|
|
||||||
qint32 getStreamIndex();
|
qint32 getStreamIndex();
|
||||||
void setStreamIndex(qint32 stream_index);
|
void setStreamIndex(qint32 stream_index);
|
||||||
|
|
||||||
@ -94,6 +97,9 @@ private:
|
|||||||
qint32 filter_chain_hash;
|
qint32 filter_chain_hash;
|
||||||
bool m_filter_chain_hash_isSet;
|
bool m_filter_chain_hash_isSet;
|
||||||
|
|
||||||
|
qint32 play;
|
||||||
|
bool m_play_isSet;
|
||||||
|
|
||||||
qint32 stream_index;
|
qint32 stream_index;
|
||||||
bool m_stream_index_isSet;
|
bool m_stream_index_isSet;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user