mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
add pzapit -gi returns the current channel ID (hexadecimal)& name (tuxcvs)
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@155 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
|
||||
int usage (const char * basename)
|
||||
{
|
||||
std::cout << "get current channel id: " << basename << " -gi" << std::endl;
|
||||
std::cout << "bouquet list: " << basename << " [-ra]" << std::endl;
|
||||
std::cout << "channel list: " << basename << " [-ra] <bouquet-number>" << std::endl;
|
||||
std::cout << "zap by number: " << basename << " [-ra] <bouquet-number> <channel-number>" << std::endl;
|
||||
@@ -100,6 +101,7 @@ int main (int argc, char** argv)
|
||||
bool leaveStandby = false;
|
||||
bool sendMotorCommand = false;
|
||||
bool quiet = false;
|
||||
bool getchannel = false;
|
||||
uint8_t motorCmdType = 0;
|
||||
uint8_t motorCmd = 0;
|
||||
uint8_t motorNumParameters = 0;
|
||||
@@ -304,6 +306,11 @@ int main (int argc, char** argv)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (!strncmp(argv[i], "-gi", 3))
|
||||
{
|
||||
getchannel = true;
|
||||
continue;
|
||||
}
|
||||
else if (i < argc - 1)
|
||||
{
|
||||
if ((sscanf(argv[i], "%d", &bouquet) > 0) && (sscanf(argv[++i], "%u", &channel) > 0))
|
||||
@@ -503,6 +510,12 @@ int main (int argc, char** argv)
|
||||
//zapit.startPlayBack();
|
||||
return 0;
|
||||
}
|
||||
if (getchannel)
|
||||
{
|
||||
t_channel_id channel = zapit.getCurrentServiceID();
|
||||
printf("%llx (%s)\n", channel, (zapit.getChannelName(channel)).c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* choose source mode */
|
||||
@@ -584,7 +597,6 @@ int main (int argc, char** argv)
|
||||
std::cout << "zapped to " << channels[channel-1].name << std::endl;
|
||||
}
|
||||
|
||||
|
||||
if (!quiet)
|
||||
{
|
||||
CZapitClient::responseGetPIDs pids;
|
||||
|
Reference in New Issue
Block a user