mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-30 17:20:32 +01:00
2022-09-17 Fred Gleason <fredg@paravelsystems.com>
* Added type icons to the 'Source' and 'Destination' columns of the events list in rdcatch(1). * Removed the 'RSS Feed' column from the event list in rdcatch(1). * Consolidated the 'Start Date Offset' and 'End Date Offset' columns into a single 'Start/End Date' column in rdcatch(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -117,6 +117,7 @@
|
||||
#include "../icons/record.xpm"
|
||||
#include "../icons/upload.xpm"
|
||||
#include "../icons/download.xpm"
|
||||
#include "../icons/url.xpm"
|
||||
|
||||
#include "../icons/host-16x16.xpm"
|
||||
#include "../icons/service-16x16.xpm"
|
||||
@@ -279,6 +280,7 @@ RDIconEngine::RDIconEngine()
|
||||
d_list_icons.push_back(QPixmap(rss_xpm));
|
||||
d_list_icons.push_back(QPixmap(upload_xpm));
|
||||
d_list_icons.push_back(QPixmap(download_xpm));
|
||||
d_list_icons.push_back(QPixmap(url_xpm));
|
||||
|
||||
//
|
||||
// Create Service Icon
|
||||
|
||||
@@ -32,8 +32,8 @@ class RDIconEngine
|
||||
{
|
||||
public:
|
||||
enum IconType {GreenCheck=0,RedX=1,GreenBall=2,RedBall=3,WhiteBall=4,
|
||||
BlueBall=5,Switcher=6,Input=7,Output=8,Record=9,Download=10,
|
||||
Upload=11};
|
||||
BlueBall=5,Switcher=6,Input=7,Output=8,Record=9,RssFeed=10,
|
||||
Download=11,Upload=12,Url=13};
|
||||
enum Application {Rivendell=0,RdAdmin=1,RdAirPlay=2,RdCartSlots=3,
|
||||
RdCastManager=4,RdCatch=5,RdLibrary=6,RdLogEdit=7,
|
||||
RdLogManager=8,RdPanel=9,LastApplication=10};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Audio Format Settings
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -150,73 +150,8 @@ void RDSettings::setAutotrimLevel(int level)
|
||||
|
||||
QString RDSettings::description()
|
||||
{
|
||||
QString desc;
|
||||
QString sr=QString::asprintf("%d S/sec",set_sample_rate);
|
||||
switch(set_format) {
|
||||
case RDSettings::Pcm16:
|
||||
desc="PCM16, ";
|
||||
break;
|
||||
|
||||
case RDSettings::Pcm24:
|
||||
desc="PCM24, ";
|
||||
break;
|
||||
|
||||
case RDSettings::MpegL1:
|
||||
desc="MPEG L1, ";
|
||||
if(set_bit_rate==0) {
|
||||
desc+=QString::asprintf("Qual %d, ",set_quality);
|
||||
}
|
||||
else {
|
||||
desc+=QString::asprintf("%d kbit/sec, ",set_bit_rate/1000);
|
||||
}
|
||||
break;
|
||||
|
||||
case RDSettings::MpegL2:
|
||||
case RDSettings::MpegL2Wav:
|
||||
desc="MPEG L2, ";
|
||||
if(set_bit_rate==0) {
|
||||
desc+=QString::asprintf("Qual %d, ",set_quality);
|
||||
}
|
||||
else {
|
||||
desc+=QString::asprintf("%d kbit/sec, ",set_bit_rate/1000);
|
||||
}
|
||||
break;
|
||||
|
||||
case RDSettings::MpegL3:
|
||||
desc="MPEG L3, ";
|
||||
if(set_bit_rate==0) {
|
||||
desc+=QString::asprintf("Qual %d, ",set_quality);
|
||||
}
|
||||
else {
|
||||
desc+=QString::asprintf("%d kbit/sec, ",set_bit_rate/1000);
|
||||
}
|
||||
break;
|
||||
|
||||
case RDSettings::Flac:
|
||||
desc="FLAC, ";
|
||||
break;
|
||||
|
||||
case RDSettings::OggVorbis:
|
||||
desc=QString::asprintf("OggVorbis, Qual %d, ",set_quality);
|
||||
break;
|
||||
}
|
||||
if(set_sample_rate>0) {
|
||||
desc+=QString::asprintf("%d samp/sec, ",set_sample_rate);
|
||||
}
|
||||
switch(set_channels) {
|
||||
case 1:
|
||||
desc+="Mono";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
desc+="Stereo";
|
||||
break;
|
||||
|
||||
default:
|
||||
desc+=QString::asprintf("%d chans",set_channels);
|
||||
break;
|
||||
}
|
||||
return desc;
|
||||
return RDSettings::description(set_format,set_channels,set_sample_rate,
|
||||
set_bit_rate,set_quality);
|
||||
}
|
||||
|
||||
|
||||
@@ -339,6 +274,79 @@ QString RDSettings::defaultExtension(RDSettings::Format fmt)
|
||||
}
|
||||
|
||||
|
||||
QString RDSettings::description(Format fmt,unsigned chans,unsigned samprate,
|
||||
unsigned bitrate,unsigned qual)
|
||||
{
|
||||
QString desc;
|
||||
QString sr=QString::asprintf("%d S/sec",samprate);
|
||||
switch(fmt) {
|
||||
case RDSettings::Pcm16:
|
||||
desc="PCM16, ";
|
||||
break;
|
||||
|
||||
case RDSettings::Pcm24:
|
||||
desc="PCM24, ";
|
||||
break;
|
||||
|
||||
case RDSettings::MpegL1:
|
||||
desc="MPEG L1, ";
|
||||
if(bitrate==0) {
|
||||
desc+=QString::asprintf("Qual %d, ",qual);
|
||||
}
|
||||
else {
|
||||
desc+=QString::asprintf("%d kbit/sec, ",bitrate/1000);
|
||||
}
|
||||
break;
|
||||
|
||||
case RDSettings::MpegL2:
|
||||
case RDSettings::MpegL2Wav:
|
||||
desc="MPEG L2, ";
|
||||
if(bitrate==0) {
|
||||
desc+=QString::asprintf("Qual %d, ",qual);
|
||||
}
|
||||
else {
|
||||
desc+=QString::asprintf("%d kbit/sec, ",bitrate/1000);
|
||||
}
|
||||
break;
|
||||
|
||||
case RDSettings::MpegL3:
|
||||
desc="MPEG L3, ";
|
||||
if(bitrate==0) {
|
||||
desc+=QString::asprintf("Qual %d, ",qual);
|
||||
}
|
||||
else {
|
||||
desc+=QString::asprintf("%d kbit/sec, ",bitrate/1000);
|
||||
}
|
||||
break;
|
||||
|
||||
case RDSettings::Flac:
|
||||
desc="FLAC, ";
|
||||
break;
|
||||
|
||||
case RDSettings::OggVorbis:
|
||||
desc=QString::asprintf("OggVorbis, Qual %d, ",qual);
|
||||
break;
|
||||
}
|
||||
if(samprate>0) {
|
||||
desc+=QString::asprintf("%d samp/sec, ",samprate);
|
||||
}
|
||||
switch(chans) {
|
||||
case 1:
|
||||
desc+="Mono";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
desc+="Stereo";
|
||||
break;
|
||||
|
||||
default:
|
||||
desc+=QString::asprintf("%d chans",chans);
|
||||
break;
|
||||
}
|
||||
return desc;
|
||||
}
|
||||
|
||||
|
||||
QString RDSettings::dump() const
|
||||
{
|
||||
QString ret;
|
||||
|
||||
@@ -56,6 +56,8 @@ class RDSettings
|
||||
bool deletePreset(unsigned id) const;
|
||||
static QString pathName(QString pathname,RDSettings::Format fmt);
|
||||
static QString defaultExtension(RDSettings::Format fmt);
|
||||
static QString description(Format fmt,unsigned chans,unsigned samprate,
|
||||
unsigned bitrate,unsigned qual);
|
||||
QString dump() const;
|
||||
void clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user