mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-16 08:34:12 +02:00
2019-02-07 Fred Gleason <fredg@paravelsystems.com>
* Replaced the 'Add Event', 'Delete Event' and 'Modify Event' commands in the RDCatch Monitor Protocol with multicast update events.
This commit is contained in:
parent
34e722849a
commit
06dd4c336b
@ -18460,3 +18460,7 @@
|
|||||||
2019-02-05 Fred Gleason <fredg@paravelsystems.com>
|
2019-02-05 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed a bug in rdairplay(1) that threw a segfault when processing
|
* Fixed a bug in rdairplay(1) that threw a segfault when processing
|
||||||
a null RML.
|
a null RML.
|
||||||
|
2019-02-07 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Replaced the 'Add Event', 'Delete Event' and 'Modify Event'
|
||||||
|
commands in the RDCatch Monitor Protocol with multicast update
|
||||||
|
events.
|
||||||
|
@ -171,78 +171,6 @@
|
|||||||
<computeroutput>RS +!</computeroutput>.
|
<computeroutput>RS +!</computeroutput>.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
<sect2 xml:id="sect.privileged_commands.add_event">
|
|
||||||
<title>Add Event</title>
|
|
||||||
<para>
|
|
||||||
Add event to the event list.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
<userinput>RA <replaceable>event-num</replaceable>!</userinput>
|
|
||||||
</para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable>event-num</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The number of the event to add.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
<para>
|
|
||||||
<command>rdcatchd</command><manvolnum>8</manvolnum>
|
|
||||||
will respond with
|
|
||||||
<computeroutput>RA <replaceable>event-num</replaceable>+!</computeroutput>.
|
|
||||||
</para>
|
|
||||||
</sect2>
|
|
||||||
<sect2 xml:id="sect.privileged_commands.remove_event">
|
|
||||||
<title>Remove Event</title>
|
|
||||||
<para>
|
|
||||||
Remove event from the event list.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
<userinput>RR <replaceable>event-num</replaceable>!</userinput>
|
|
||||||
</para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable>event-num</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The number of the event to remove.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
<para>
|
|
||||||
<command>rdcatchd</command><manvolnum>8</manvolnum>
|
|
||||||
will respond with
|
|
||||||
<computeroutput>RR <replaceable>event-num</replaceable>+!</computeroutput>.
|
|
||||||
</para>
|
|
||||||
</sect2>
|
|
||||||
<sect2 xml:id="sect.privileged_commands.update_event">
|
|
||||||
<title>Update Event</title>
|
|
||||||
<para>
|
|
||||||
Update event from the event list.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
<userinput>RU <replaceable>event-num</replaceable>!</userinput>
|
|
||||||
</para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable>event-num</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The number of the event to update.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
<para>
|
|
||||||
<command>rdcatchd</command><manvolnum>8</manvolnum>
|
|
||||||
will respond with
|
|
||||||
<computeroutput>RU <replaceable>event-num</replaceable>+!</computeroutput>.
|
|
||||||
</para>
|
|
||||||
</sect2>
|
|
||||||
<sect2 xml:id="sect.privileged_commands.request_deck_status">
|
<sect2 xml:id="sect.privileged_commands.request_deck_status">
|
||||||
<title>Request Deck Status</title>
|
<title>Request Deck Status</title>
|
||||||
<para>
|
<para>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Connect to the Rivendell Netcatcher Daemon.
|
// Connect to the Rivendell Netcatcher Daemon.
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2004,2016-2017 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -105,24 +105,6 @@ void RDCatchConnect::reloadDropboxes()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RDCatchConnect::addEvent(int id)
|
|
||||||
{
|
|
||||||
SendCommand(QString().sprintf("RA %d!",id));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void RDCatchConnect::removeEvent(int id)
|
|
||||||
{
|
|
||||||
SendCommand(QString().sprintf("RR %d!",id));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void RDCatchConnect::updateEvent(int id)
|
|
||||||
{
|
|
||||||
SendCommand(QString().sprintf("RU %d!",id));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void RDCatchConnect::reset()
|
void RDCatchConnect::reset()
|
||||||
{
|
{
|
||||||
SendCommand("RS!");
|
SendCommand("RS!");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Connect to the Rivendell Netcatcher Daemon.
|
// Connect to the Rivendell Netcatcher Daemon.
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2004,2016-2017 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -49,9 +49,6 @@ class RDCatchConnect : public QObject
|
|||||||
void reloadDropboxes();
|
void reloadDropboxes();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void addEvent(int id);
|
|
||||||
void removeEvent(int id);
|
|
||||||
void updateEvent(int id);
|
|
||||||
void reset();
|
void reset();
|
||||||
void reload();
|
void reload();
|
||||||
void refresh();
|
void refresh();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A container class for a Rivendell Notification message.
|
// A container class for a Rivendell Notification message.
|
||||||
//
|
//
|
||||||
// (C) Copyright 2018 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2018-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -111,6 +111,10 @@ bool RDNotification::read(const QString &str)
|
|||||||
notify_id=QVariant(args[3]);
|
notify_id=QVariant(args[3]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case RDNotification::CatchEventType:
|
||||||
|
notify_id=QVariant(args[3].toUInt());
|
||||||
|
break;
|
||||||
|
|
||||||
case RDNotification::NullType:
|
case RDNotification::NullType:
|
||||||
case RDNotification::LastType:
|
case RDNotification::LastType:
|
||||||
break;
|
break;
|
||||||
@ -158,6 +162,10 @@ QString RDNotification::write() const
|
|||||||
ret+=notify_id.toString();
|
ret+=notify_id.toString();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case RDNotification::CatchEventType:
|
||||||
|
ret+=QString().sprintf("%u",notify_id.toUInt());
|
||||||
|
break;
|
||||||
|
|
||||||
case RDNotification::NullType:
|
case RDNotification::NullType:
|
||||||
case RDNotification::LastType:
|
case RDNotification::LastType:
|
||||||
break;
|
break;
|
||||||
@ -187,6 +195,10 @@ QString RDNotification::typeString(RDNotification::Type type)
|
|||||||
ret="DROPBOX";
|
ret="DROPBOX";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case RDNotification::CatchEventType:
|
||||||
|
ret="CATCH_EVENT";
|
||||||
|
break;
|
||||||
|
|
||||||
case RDNotification::NullType:
|
case RDNotification::NullType:
|
||||||
case RDNotification::LastType:
|
case RDNotification::LastType:
|
||||||
break;
|
break;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A container class for a Rivendell Notification message.
|
// A container class for a Rivendell Notification message.
|
||||||
//
|
//
|
||||||
// (C) Copyright 2018 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2018-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -28,7 +28,7 @@ class RDNotification
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum Type {NullType=0,CartType=1,LogType=2,PypadType=3,DropboxType=4,
|
enum Type {NullType=0,CartType=1,LogType=2,PypadType=3,DropboxType=4,
|
||||||
LastType=5};
|
CatchEventType=5,LastType=6};
|
||||||
enum Action {NoAction=0,AddAction=1,DeleteAction=2,ModifyAction=3,
|
enum Action {NoAction=0,AddAction=1,DeleteAction=2,ModifyAction=3,
|
||||||
LastAction=4};
|
LastAction=4};
|
||||||
RDNotification(Type type,Action action,const QVariant &id);
|
RDNotification(Type type,Action action,const QVariant &id);
|
||||||
|
@ -190,7 +190,7 @@ void AddRecording::closeEvent(QCloseEvent *e)
|
|||||||
void AddRecording::recordingData()
|
void AddRecording::recordingData()
|
||||||
{
|
{
|
||||||
EditRecording *recording=new EditRecording(add_id,NULL,add_filter,this);
|
EditRecording *recording=new EditRecording(add_id,NULL,add_filter,this);
|
||||||
if(recording->exec()<0) {
|
if(!recording->exec()) {
|
||||||
delete recording;
|
delete recording;
|
||||||
done(-1);
|
done(-1);
|
||||||
return;
|
return;
|
||||||
@ -203,7 +203,7 @@ void AddRecording::recordingData()
|
|||||||
void AddRecording::playoutData()
|
void AddRecording::playoutData()
|
||||||
{
|
{
|
||||||
EditPlayout *playout=new EditPlayout(add_id,NULL,add_filter,this);
|
EditPlayout *playout=new EditPlayout(add_id,NULL,add_filter,this);
|
||||||
if(playout->exec()<0) {
|
if(!playout->exec()) {
|
||||||
delete playout;
|
delete playout;
|
||||||
done(-1);
|
done(-1);
|
||||||
return;
|
return;
|
||||||
@ -217,7 +217,7 @@ void AddRecording::downloadData()
|
|||||||
{
|
{
|
||||||
EditDownload *recording=
|
EditDownload *recording=
|
||||||
new EditDownload(add_id,NULL,add_filter,this);
|
new EditDownload(add_id,NULL,add_filter,this);
|
||||||
if(recording->exec()<0) {
|
if(!recording->exec()) {
|
||||||
delete recording;
|
delete recording;
|
||||||
done(-1);
|
done(-1);
|
||||||
return;
|
return;
|
||||||
@ -230,7 +230,7 @@ void AddRecording::downloadData()
|
|||||||
void AddRecording::uploadData()
|
void AddRecording::uploadData()
|
||||||
{
|
{
|
||||||
EditUpload *recording=new EditUpload(add_id,NULL,add_filter,this);
|
EditUpload *recording=new EditUpload(add_id,NULL,add_filter,this);
|
||||||
if(recording->exec()<0) {
|
if(!recording->exec()) {
|
||||||
delete recording;
|
delete recording;
|
||||||
done(-1);
|
done(-1);
|
||||||
return;
|
return;
|
||||||
@ -243,7 +243,7 @@ void AddRecording::uploadData()
|
|||||||
void AddRecording::macroData()
|
void AddRecording::macroData()
|
||||||
{
|
{
|
||||||
EditCartEvent *recording=new EditCartEvent(add_id,NULL,this);
|
EditCartEvent *recording=new EditCartEvent(add_id,NULL,this);
|
||||||
if(recording->exec()<0) {
|
if(!recording->exec()) {
|
||||||
delete recording;
|
delete recording;
|
||||||
done(-1);
|
done(-1);
|
||||||
return;
|
return;
|
||||||
@ -256,7 +256,7 @@ void AddRecording::macroData()
|
|||||||
void AddRecording::switchData()
|
void AddRecording::switchData()
|
||||||
{
|
{
|
||||||
EditSwitchEvent *recording=new EditSwitchEvent(add_id,NULL,this);
|
EditSwitchEvent *recording=new EditSwitchEvent(add_id,NULL,this);
|
||||||
if(recording->exec()<0) {
|
if(!recording->exec()) {
|
||||||
delete recording;
|
delete recording;
|
||||||
done(-1);
|
done(-1);
|
||||||
return;
|
return;
|
||||||
|
@ -365,13 +365,13 @@ void EditCartEvent::okData()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Save();
|
Save();
|
||||||
done(0);
|
done(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EditCartEvent::cancelData()
|
void EditCartEvent::cancelData()
|
||||||
{
|
{
|
||||||
done(-1);
|
done(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -545,13 +545,13 @@ void EditDownload::okData()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Save();
|
Save();
|
||||||
done(0);
|
done(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EditDownload::cancelData()
|
void EditDownload::cancelData()
|
||||||
{
|
{
|
||||||
done(-1);
|
done(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -340,13 +340,13 @@ void EditPlayout::saveasData()
|
|||||||
void EditPlayout::okData()
|
void EditPlayout::okData()
|
||||||
{
|
{
|
||||||
Save();
|
Save();
|
||||||
done(0);
|
done(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EditPlayout::cancelData()
|
void EditPlayout::cancelData()
|
||||||
{
|
{
|
||||||
done(-1);
|
done(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -747,13 +747,13 @@ void EditRecording::okData()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Save();
|
Save();
|
||||||
done(0);
|
done(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EditRecording::cancelData()
|
void EditRecording::cancelData()
|
||||||
{
|
{
|
||||||
done(-1);
|
done(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -482,13 +482,13 @@ void EditSwitchEvent::okData()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Save();
|
Save();
|
||||||
done(0);
|
done(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EditSwitchEvent::cancelData()
|
void EditSwitchEvent::cancelData()
|
||||||
{
|
{
|
||||||
done(-1);
|
done(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -568,13 +568,13 @@ void EditUpload::okData()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Save();
|
Save();
|
||||||
done(0);
|
done(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EditUpload::cancelData()
|
void EditUpload::cancelData()
|
||||||
{
|
{
|
||||||
done(-1);
|
done(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// The Event Schedule Manager for Rivendell.
|
// The Event Schedule Manager for Rivendell.
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -197,9 +197,6 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
str=QString("RDCatch")+" v"+VERSION+" - "+tr("Host")+":";
|
str=QString("RDCatch")+" v"+VERSION+" - "+tr("Host")+":";
|
||||||
setWindowTitle(str+" "+rda->config()->stationName());
|
setWindowTitle(str+" "+rda->config()->stationName());
|
||||||
|
|
||||||
// connect(RDDbStatus(),SIGNAL(logText(RDConfig::LogPriority,const QString &)),
|
|
||||||
// this,SLOT(log(RDConfig::LogPriority,const QString &)));
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Allocate Global Resources
|
// Allocate Global Resources
|
||||||
//
|
//
|
||||||
@ -665,6 +662,7 @@ void MainWidget::addData()
|
|||||||
RDSqlQuery *q;
|
RDSqlQuery *q;
|
||||||
RDListViewItem *item;
|
RDListViewItem *item;
|
||||||
int conn;
|
int conn;
|
||||||
|
RDNotification *notify=NULL;
|
||||||
|
|
||||||
if(!rda->user()->editCatches()) {
|
if(!rda->user()->editCatches()) {
|
||||||
return;
|
return;
|
||||||
@ -679,6 +677,10 @@ void MainWidget::addData()
|
|||||||
case RDRecording::SwitchEvent:
|
case RDRecording::SwitchEvent:
|
||||||
case RDRecording::Download:
|
case RDRecording::Download:
|
||||||
case RDRecording::Upload:
|
case RDRecording::Upload:
|
||||||
|
notify=new RDNotification(RDNotification::CatchEventType,
|
||||||
|
RDNotification::AddAction,n);
|
||||||
|
rda->ripc()->sendNotification(*notify);
|
||||||
|
delete notify;
|
||||||
item=new RDListViewItem(catch_recordings_list);
|
item=new RDListViewItem(catch_recordings_list);
|
||||||
item->setBackgroundColor(catch_recordings_list->palette().color(QPalette::Active,QColorGroup::Base));
|
item->setBackgroundColor(catch_recordings_list->palette().color(QPalette::Active,QColorGroup::Base));
|
||||||
item->setText(28,QString().sprintf("%d",n));
|
item->setText(28,QString().sprintf("%d",n));
|
||||||
@ -690,7 +692,6 @@ void MainWidget::addData()
|
|||||||
}
|
}
|
||||||
catch_recordings_list->setSelected(item,true);
|
catch_recordings_list->setSelected(item,true);
|
||||||
catch_recordings_list->ensureItemVisible(item);
|
catch_recordings_list->ensureItemVisible(item);
|
||||||
catch_connect[conn]->connector()->addEvent(n);
|
|
||||||
nextEventData();
|
nextEventData();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -706,8 +707,6 @@ void MainWidget::addData()
|
|||||||
|
|
||||||
void MainWidget::editData()
|
void MainWidget::editData()
|
||||||
{
|
{
|
||||||
int old_conn;
|
|
||||||
int new_conn;
|
|
||||||
std::vector<int> new_events;
|
std::vector<int> new_events;
|
||||||
|
|
||||||
RDListViewItem *item=(RDListViewItem *)catch_recordings_list->selectedItem();
|
RDListViewItem *item=(RDListViewItem *)catch_recordings_list->selectedItem();
|
||||||
@ -717,6 +716,7 @@ void MainWidget::editData()
|
|||||||
EditSwitchEvent *switch_event;
|
EditSwitchEvent *switch_event;
|
||||||
EditDownload *download;
|
EditDownload *download;
|
||||||
EditUpload *upload;
|
EditUpload *upload;
|
||||||
|
bool updated=false;
|
||||||
|
|
||||||
if(!rda->user()->editCatches()) {
|
if(!rda->user()->editCatches()) {
|
||||||
return;
|
return;
|
||||||
@ -739,111 +739,54 @@ void MainWidget::editData()
|
|||||||
}
|
}
|
||||||
EnableScroll(false);
|
EnableScroll(false);
|
||||||
int id=item->text(28).toInt();
|
int id=item->text(28).toInt();
|
||||||
old_conn=GetConnection(item->text(24));
|
|
||||||
if(old_conn<0) {
|
|
||||||
fprintf(stderr,"rdcatch: invalid connection index!\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
switch((RDRecording::Type)item->text(29).toInt()) {
|
switch((RDRecording::Type)item->text(29).toInt()) {
|
||||||
case RDRecording::Recording:
|
case RDRecording::Recording:
|
||||||
recording=new EditRecording(id,&new_events,&catch_filter,this);
|
recording=new EditRecording(id,&new_events,&catch_filter,this);
|
||||||
if(recording->exec()>=0) {
|
updated=recording->exec();
|
||||||
RefreshLine(item);
|
|
||||||
new_conn=GetConnection(item->text(24));
|
|
||||||
if(new_conn<0) {
|
|
||||||
fprintf(stderr,"rdcatch: invalid connection index!\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch_connect[old_conn]->connector()->removeEvent(id);
|
|
||||||
catch_connect[new_conn]->connector()->addEvent(id);
|
|
||||||
nextEventData();
|
|
||||||
}
|
|
||||||
delete recording;
|
delete recording;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RDRecording::Playout:
|
case RDRecording::Playout:
|
||||||
playout=new EditPlayout(id,&new_events,&catch_filter,this);
|
playout=new EditPlayout(id,&new_events,&catch_filter,this);
|
||||||
if(playout->exec()>=0) {
|
updated=playout->exec();
|
||||||
RefreshLine(item);
|
|
||||||
new_conn=GetConnection(item->text(24));
|
|
||||||
if(new_conn<0) {
|
|
||||||
fprintf(stderr,"rdcatch: invalid connection index!\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch_connect[old_conn]->connector()->removeEvent(id);
|
|
||||||
catch_connect[new_conn]->connector()->addEvent(id);
|
|
||||||
nextEventData();
|
|
||||||
}
|
|
||||||
delete playout;
|
delete playout;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RDRecording::MacroEvent:
|
case RDRecording::MacroEvent:
|
||||||
event=new EditCartEvent(id,&new_events,this);
|
event=new EditCartEvent(id,&new_events,this);
|
||||||
if(event->exec()>=0) {
|
updated=event->exec();
|
||||||
RefreshLine(item);
|
|
||||||
new_conn=GetConnection(item->text(24));
|
|
||||||
if(new_conn<0) {
|
|
||||||
fprintf(stderr,"rdcatch: invalid connection index!\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch_connect[old_conn]->connector()->removeEvent(id);
|
|
||||||
catch_connect[new_conn]->connector()->addEvent(id);
|
|
||||||
nextEventData();
|
|
||||||
}
|
|
||||||
delete event;
|
delete event;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RDRecording::SwitchEvent:
|
case RDRecording::SwitchEvent:
|
||||||
switch_event=new EditSwitchEvent(id,&new_events,this);
|
switch_event=new EditSwitchEvent(id,&new_events,this);
|
||||||
if(switch_event->exec()>=0) {
|
updated=switch_event->exec();
|
||||||
RefreshLine(item);
|
|
||||||
new_conn=GetConnection(item->text(24));
|
|
||||||
if(new_conn<0) {
|
|
||||||
fprintf(stderr,"rdcatch: invalid connection index!\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch_connect[old_conn]->connector()->removeEvent(id);
|
|
||||||
catch_connect[new_conn]->connector()->addEvent(id);
|
|
||||||
nextEventData();
|
|
||||||
}
|
|
||||||
delete switch_event;
|
delete switch_event;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RDRecording::Download:
|
case RDRecording::Download:
|
||||||
download=new EditDownload(id,&new_events,&catch_filter,this);
|
download=new EditDownload(id,&new_events,&catch_filter,this);
|
||||||
if(download->exec()>=0) {
|
updated=download->exec();
|
||||||
RefreshLine(item);
|
|
||||||
new_conn=GetConnection(item->text(24));
|
|
||||||
if(new_conn<0) {
|
|
||||||
fprintf(stderr,"rdcatch: invalid connection index!\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch_connect[old_conn]->connector()->removeEvent(id);
|
|
||||||
catch_connect[new_conn]->connector()->addEvent(id);
|
|
||||||
nextEventData();
|
|
||||||
}
|
|
||||||
delete download;
|
delete download;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RDRecording::Upload:
|
case RDRecording::Upload:
|
||||||
upload=new EditUpload(id,&new_events,&catch_filter,this);
|
upload=new EditUpload(id,&new_events,&catch_filter,this);
|
||||||
if(upload->exec()>=0) {
|
updated=upload->exec();
|
||||||
RefreshLine(item);
|
|
||||||
new_conn=GetConnection(item->text(24));
|
|
||||||
if(new_conn<0) {
|
|
||||||
fprintf(stderr,"rdcatch: invalid connection index!\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch_connect[old_conn]->connector()->removeEvent(id);
|
|
||||||
catch_connect[new_conn]->connector()->addEvent(id);
|
|
||||||
nextEventData();
|
|
||||||
}
|
|
||||||
delete upload;
|
delete upload;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RDRecording::LastType:
|
case RDRecording::LastType:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if(updated) {
|
||||||
|
RDNotification *notify=new RDNotification(RDNotification::CatchEventType,
|
||||||
|
RDNotification::ModifyAction,id);
|
||||||
|
rda->ripc()->sendNotification(*notify);
|
||||||
|
delete notify;
|
||||||
|
RefreshLine(item);
|
||||||
|
nextEventData();
|
||||||
|
}
|
||||||
ProcessNewRecords(&new_events);
|
ProcessNewRecords(&new_events);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -879,11 +822,15 @@ void MainWidget::deleteData()
|
|||||||
fprintf(stderr,"rdcatch: invalid connection index!\n");
|
fprintf(stderr,"rdcatch: invalid connection index!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
catch_connect[conn]->connector()->removeEvent(item->text(28).toInt());
|
|
||||||
sql=QString("delete from RECORDINGS where ")+
|
sql=QString("delete from RECORDINGS where ")+
|
||||||
"ID="+item->text(28);
|
"ID="+item->text(28);
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
delete q;
|
delete q;
|
||||||
|
RDNotification *notify=new RDNotification(RDNotification::CatchEventType,
|
||||||
|
RDNotification::DeleteAction,
|
||||||
|
item->text(28).toInt());
|
||||||
|
rda->ripc()->sendNotification(*notify);
|
||||||
|
delete notify;
|
||||||
RDListViewItem *next=(RDListViewItem *)item->nextSibling();
|
RDListViewItem *next=(RDListViewItem *)item->nextSibling();
|
||||||
catch_recordings_list->removeItem(item);
|
catch_recordings_list->removeItem(item);
|
||||||
if(next!=NULL) {
|
if(next!=NULL) {
|
||||||
@ -1238,9 +1185,6 @@ void MainWidget::heartbeatFailedData(int id)
|
|||||||
if(!catch_host_warnings) {
|
if(!catch_host_warnings) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QString str;
|
|
||||||
|
|
||||||
str=QString(tr("Control connection timed out to host"));
|
|
||||||
QString msg=tr("Control connection timed out to host")+
|
QString msg=tr("Control connection timed out to host")+
|
||||||
" `"+catch_connect[id]->stationName()+"'?";
|
" `"+catch_connect[id]->stationName()+"'?";
|
||||||
QMessageBox::warning(this,"RDCatch - "+tr("Connection Error"),msg);
|
QMessageBox::warning(this,"RDCatch - "+tr("Connection Error"),msg);
|
||||||
@ -1602,7 +1546,11 @@ void MainWidget::ProcessNewRecords(std::vector<int> *adds)
|
|||||||
fprintf(stderr,"rdcatch: invalid connection index!\n");
|
fprintf(stderr,"rdcatch: invalid connection index!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
catch_connect[conn]->connector()->addEvent(adds->at(i));
|
RDNotification *notify=new RDNotification(RDNotification::CatchEventType,
|
||||||
|
RDNotification::AddAction,
|
||||||
|
adds->at(i));
|
||||||
|
rda->ripc()->sendNotification(*notify);
|
||||||
|
delete notify;
|
||||||
}
|
}
|
||||||
nextEventData();
|
nextEventData();
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
#include <qcombobox.h>
|
#include <qcombobox.h>
|
||||||
#include <qpixmap.h>
|
#include <qpixmap.h>
|
||||||
#include <q3scrollview.h>
|
#include <q3scrollview.h>
|
||||||
//Added by qt3to4:
|
|
||||||
#include <QCloseEvent>
|
#include <QCloseEvent>
|
||||||
#include <QResizeEvent>
|
#include <QResizeEvent>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// The Rivendell Netcatcher Daemon
|
// The Rivendell Netcatcher Daemon
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -61,7 +61,6 @@
|
|||||||
#include "rdcatchd.h"
|
#include "rdcatchd.h"
|
||||||
|
|
||||||
// Logging function that works within and outside the MainObject.
|
// Logging function that works within and outside the MainObject.
|
||||||
//static RDConfig *rd_config = NULL;
|
|
||||||
void LogLine(RDConfig::LogPriority prio,const QString &line)
|
void LogLine(RDConfig::LogPriority prio,const QString &line)
|
||||||
{
|
{
|
||||||
FILE *logfile;
|
FILE *logfile;
|
||||||
@ -305,6 +304,8 @@ MainObject::MainObject(QObject *parent)
|
|||||||
this,SLOT(rmlReceivedData(RDMacro *)));
|
this,SLOT(rmlReceivedData(RDMacro *)));
|
||||||
connect(rda->ripc(),SIGNAL(gpiStateChanged(int,int,bool)),
|
connect(rda->ripc(),SIGNAL(gpiStateChanged(int,int,bool)),
|
||||||
this,SLOT(gpiStateChangedData(int,int,bool)));
|
this,SLOT(gpiStateChangedData(int,int,bool)));
|
||||||
|
connect(rda->ripc(),SIGNAL(notificationReceived(RDNotification *)),
|
||||||
|
this,SLOT(notificationReceivedData(RDNotification *)));
|
||||||
|
|
||||||
//
|
//
|
||||||
// CAE Connection
|
// CAE Connection
|
||||||
@ -467,6 +468,24 @@ void MainObject::log(RDConfig::LogPriority prio,const QString &msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainObject::notificationReceivedData(RDNotification *notify)
|
||||||
|
{
|
||||||
|
if(notify->type()==RDNotification::CatchEventType) {
|
||||||
|
switch(notify->action()) {
|
||||||
|
case RDNotification::AddAction:
|
||||||
|
case RDNotification::ModifyAction:
|
||||||
|
case RDNotification::DeleteAction:
|
||||||
|
UpdateEvent(notify->id().toUInt());
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDNotification::NoAction:
|
||||||
|
case RDNotification::LastAction:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainObject::newConnectionData()
|
void MainObject::newConnectionData()
|
||||||
{
|
{
|
||||||
int i=0;
|
int i=0;
|
||||||
@ -568,12 +587,6 @@ void MainObject::startTimerData(int id)
|
|||||||
unsigned deck=catch_events[event].channel()-1;
|
unsigned deck=catch_events[event].channel()-1;
|
||||||
|
|
||||||
catch_events[event].setStatus(RDDeck::Idle);
|
catch_events[event].setStatus(RDDeck::Idle);
|
||||||
for(unsigned i=0;i<catch_events.size();i++) {
|
|
||||||
if((catch_events[i].status()==RDDeck::Waiting)&&
|
|
||||||
((catch_events[i].channel()-1)==deck)) {
|
|
||||||
// waiting=true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
WriteExitCodeById(id,RDRecording::Ok);
|
WriteExitCodeById(id,RDRecording::Ok);
|
||||||
catch_record_deck_status[deck]=RDDeck::Idle;
|
catch_record_deck_status[deck]=RDDeck::Idle;
|
||||||
catch_record_id[deck]=0;
|
catch_record_id[deck]=0;
|
||||||
@ -1702,31 +1715,6 @@ void MainObject::DispatchCommand(ServerConnection *conn)
|
|||||||
LoadEngine();
|
LoadEngine();
|
||||||
}
|
}
|
||||||
|
|
||||||
if((cmds.at(0)=="RA")&&(cmds.size()==2)) { // Add Event
|
|
||||||
if(AddEvent(cmds.at(1).toInt())) {
|
|
||||||
EchoArgs(conn->id(),'+');
|
|
||||||
BroadcastCommand("RU "+cmds.at(1)+"!",conn->id());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
EchoArgs(conn->id(),'-');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if((cmds.at(0)=="RR")&&(cmds.size()==2)) { // Remove Event
|
|
||||||
RemoveEvent(cmds.at(1).toInt());
|
|
||||||
EchoArgs(conn->id(),'+');
|
|
||||||
BroadcastCommand("RU "+cmds.at(1)+"!",conn->id());
|
|
||||||
}
|
|
||||||
|
|
||||||
if((cmds.at(0)=="RU")&&(cmds.size()==2)) { // Update Event
|
|
||||||
if(UpdateEvent(cmds.at(1).toInt())) {
|
|
||||||
EchoArgs(conn->id(),'+');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
EchoArgs(conn->id(),'-');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(cmds.at(0)=="RD") { // Load Deck List
|
if(cmds.at(0)=="RD") { // Load Deck List
|
||||||
EchoArgs(conn->id(),'+');
|
EchoArgs(conn->id(),'+');
|
||||||
LoadDeckList();
|
LoadDeckList();
|
||||||
@ -2238,7 +2226,8 @@ bool MainObject::AddEvent(int id)
|
|||||||
delete q;
|
delete q;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
LogLine(RDConfig::LogWarning,QString().sprintf("event %d not found, not loaded",id));
|
LogLine(RDConfig::LogDebug,QString().
|
||||||
|
sprintf("event %d not found, not loaded",id));
|
||||||
delete q;
|
delete q;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2248,7 +2237,7 @@ void MainObject::RemoveEvent(int id)
|
|||||||
{
|
{
|
||||||
int event=GetEvent(id);
|
int event=GetEvent(id);
|
||||||
if(event<0) {
|
if(event<0) {
|
||||||
LogLine(RDConfig::LogNotice,QString().
|
LogLine(RDConfig::LogDebug,QString().
|
||||||
sprintf("event %d not found, not removed",id));
|
sprintf("event %d not found, not removed",id));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// The Rivendell Netcatcher.
|
// The Rivendell Netcatcher.
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -128,6 +128,7 @@ class MainObject : public QObject
|
|||||||
void updateXloadsData();
|
void updateXloadsData();
|
||||||
void startupCartData();
|
void startupCartData();
|
||||||
void log(RDConfig::LogPriority prio,const QString &line);
|
void log(RDConfig::LogPriority prio,const QString &line);
|
||||||
|
void notificationReceivedData(RDNotification *notify);
|
||||||
|
|
||||||
//
|
//
|
||||||
// batch.cpp
|
// batch.cpp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user