mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
pzapit: add get video format
Origin commit data
------------------
Commit: 1f89d395de
Author: GetAway <get-away@t-online.de>
Date: 2018-05-14 (Mon, 14 May 2018)
This commit is contained in:
@@ -187,6 +187,7 @@ public:
|
|||||||
int getLastMode() {
|
int getLastMode() {
|
||||||
return lastMode;
|
return lastMode;
|
||||||
}
|
}
|
||||||
|
int getVideoFormat() { return g_settings.video_Format; }
|
||||||
void switchTvRadioMode(const int prev_mode = NeutrinoModes::mode_unknown);
|
void switchTvRadioMode(const int prev_mode = NeutrinoModes::mode_unknown);
|
||||||
void switchInfoIconsOnOff(); //NI
|
void switchInfoIconsOnOff(); //NI
|
||||||
|
|
||||||
|
@@ -150,9 +150,10 @@ class CZapitMessages
|
|||||||
CMD_SET_ASPECTRATIO = 110,
|
CMD_SET_ASPECTRATIO = 110,
|
||||||
CMD_GET_MODE43 = 111,
|
CMD_GET_MODE43 = 111,
|
||||||
CMD_SET_MODE43 = 112,
|
CMD_SET_MODE43 = 112,
|
||||||
CMD_STOP_PIP = 113,
|
CMD_GET_VIDEO_FORMAT = 113,
|
||||||
CMD_ZAPTO_EPG = 114,
|
CMD_STOP_PIP = 114,
|
||||||
CMD_LOCKRC = 115
|
CMD_ZAPTO_EPG = 115,
|
||||||
|
CMD_LOCKRC = 116
|
||||||
};
|
};
|
||||||
|
|
||||||
struct commandBoolean
|
struct commandBoolean
|
||||||
|
@@ -512,6 +512,7 @@ class CZapitClient:public CBasicClient
|
|||||||
void setAspectRatio(int ratio);
|
void setAspectRatio(int ratio);
|
||||||
void getMode43(int *m43);
|
void getMode43(int *m43);
|
||||||
void setMode43(int m43);
|
void setMode43(int m43);
|
||||||
|
void getVideoFormat(int *vf);
|
||||||
|
|
||||||
/****************************************/
|
/****************************************/
|
||||||
/* */
|
/* */
|
||||||
|
@@ -1302,6 +1302,17 @@ void CZapitClient::setMode43(int m43)
|
|||||||
close_connection();
|
close_connection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CZapitClient::getVideoFormat(int *vf)
|
||||||
|
{
|
||||||
|
CZapitMessages::commandInt msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(mutex);
|
||||||
|
send(CZapitMessages::CMD_GET_VIDEO_FORMAT, 0, 0);
|
||||||
|
CBasicClient::receive_data((char* )&msg, sizeof(msg));
|
||||||
|
* vf = msg.val;
|
||||||
|
close_connection();
|
||||||
|
}
|
||||||
|
|
||||||
void CZapitClient::registerEvent(const unsigned int eventID, const unsigned int clientID, const char * const udsName)
|
void CZapitClient::registerEvent(const unsigned int eventID, const unsigned int clientID, const char * const udsName)
|
||||||
{
|
{
|
||||||
CEventServer::commandRegisterEvent msg;
|
CEventServer::commandRegisterEvent msg;
|
||||||
|
@@ -70,6 +70,7 @@ int usage (const char * basename)
|
|||||||
<< "\t-var <aspectratio>\tset aspect ratio" << std::endl
|
<< "\t-var <aspectratio>\tset aspect ratio" << std::endl
|
||||||
<< "\t-vm43\t\t\tget 4:3 mode" << std::endl
|
<< "\t-vm43\t\t\tget 4:3 mode" << std::endl
|
||||||
<< "\t-vm43 <4:3mode>\t\tset 4:3 mode" << std::endl
|
<< "\t-vm43 <4:3mode>\t\tset 4:3 mode" << std::endl
|
||||||
|
<< "\t-vf\t\t\tget video format" << std::endl
|
||||||
<< "\t--1080\t\t\tswitch to hd 1080i mode" << std::endl
|
<< "\t--1080\t\t\tswitch to hd 1080i mode" << std::endl
|
||||||
<< "\t--pal\t\t\tswitch to pal mode" << std::endl
|
<< "\t--pal\t\t\tswitch to pal mode" << std::endl
|
||||||
<< "\t--720p\t\t\tswitch to hd 720p mode" << std::endl
|
<< "\t--720p\t\t\tswitch to hd 720p mode" << std::endl
|
||||||
@@ -99,10 +100,11 @@ int main (int argc, char** argv)
|
|||||||
int mute = -1;
|
int mute = -1;
|
||||||
int volume = -1;
|
int volume = -1;
|
||||||
int nvod = -1;
|
int nvod = -1;
|
||||||
|
int mosd = -1;
|
||||||
int arat = -1;
|
int arat = -1;
|
||||||
int m43 = -1;
|
int m43 = -1;
|
||||||
|
int vf = -1;
|
||||||
int lockrc = -1;
|
int lockrc = -1;
|
||||||
int mosd = -1;
|
|
||||||
const char * channelName = NULL;
|
const char * channelName = NULL;
|
||||||
|
|
||||||
bool playback = false;
|
bool playback = false;
|
||||||
@@ -124,9 +126,10 @@ int main (int argc, char** argv)
|
|||||||
bool quiet = false;
|
bool quiet = false;
|
||||||
bool getchannel = false;
|
bool getchannel = false;
|
||||||
bool getmode = false;
|
bool getmode = false;
|
||||||
|
bool osd = false;
|
||||||
bool aspectratio = false;
|
bool aspectratio = false;
|
||||||
bool mode43 = false;
|
bool mode43 = false;
|
||||||
bool osd = false;
|
bool videoformat = false;
|
||||||
uint8_t motorCmdType = 0;
|
uint8_t motorCmdType = 0;
|
||||||
uint8_t motorCmd = 0;
|
uint8_t motorCmd = 0;
|
||||||
uint8_t motorNumParameters = 0;
|
uint8_t motorNumParameters = 0;
|
||||||
@@ -286,6 +289,11 @@ int main (int argc, char** argv)
|
|||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if (!strncmp(argv[i], "-vf", 3))
|
||||||
|
{
|
||||||
|
videoformat = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
else if (!strncmp(argv[i], "-sb", 3))
|
else if (!strncmp(argv[i], "-sb", 3))
|
||||||
{
|
{
|
||||||
savebouquets = true;
|
savebouquets = true;
|
||||||
@@ -552,6 +560,13 @@ int main (int argc, char** argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (videoformat)
|
||||||
|
{
|
||||||
|
zapit.getVideoFormat(&vf);
|
||||||
|
printf("%d\n", vf);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (savebouquets)
|
if (savebouquets)
|
||||||
{
|
{
|
||||||
zapit.saveBouquets();
|
zapit.saveBouquets();
|
||||||
|
@@ -1878,6 +1878,13 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case CZapitMessages::CMD_GET_VIDEO_FORMAT: {
|
||||||
|
CZapitMessages::commandInt msg;
|
||||||
|
msg.val = CNeutrinoApp::getInstance()->getVideoFormat();
|
||||||
|
CBasicServer::send_data(connfd, &msg, sizeof(msg));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case CZapitMessages::CMD_GETPIDS: {
|
case CZapitMessages::CMD_GETPIDS: {
|
||||||
if (current_channel) {
|
if (current_channel) {
|
||||||
CZapitClient::responseGetOtherPIDs responseGetOtherPIDs;
|
CZapitClient::responseGetOtherPIDs responseGetOtherPIDs;
|
||||||
|
Reference in New Issue
Block a user