2016-05-18 Fred Gleason <fredg@paravelsystems.com>

* Added an entry for the Broadcast Tools SRC-16 in
	'docs/SWITCHERS.txt'.
	* Added a 'CUT_EVENTS' table to the database.
	* Added a 'DECK_EVENTS' table to the database.
	* Incremented the database version to 256.
	* Implemented a 'Cut Event' ['CE'] RML.
	* Added a 'Event Carts' section to the Edit Deck dialog in
	'rdadmin/edit_deck.cpp' and 'rdadmin/edit_deck.h'.
This commit is contained in:
Fred Gleason
2016-05-18 13:43:21 -04:00
parent df9ac7cff1
commit 3b766a5e7d
34 changed files with 689 additions and 44 deletions

View File

@@ -24,7 +24,7 @@
/*
* Current Database Version
*/
#define RD_VERSION_DATABASE 255
#define RD_VERSION_DATABASE 256
#endif // DBVERSION_H

View File

@@ -571,5 +571,10 @@
*/
#define RDMIMETYPE_CART "application/rivendell-cart"
/*
* Number of Cut Event IDs
*/
#define RD_CUT_EVENT_ID_QUAN 16
#endif // RD_H

View File

@@ -1475,10 +1475,16 @@ bool RDCart::removeCutAudio(RDStation *station,RDUser *user,unsigned cart_num,
long response_code=0;
char url[1024];
QString xml="";
QString sql;
RDSqlQuery *q;
if(user==NULL) {
unlink(RDCut::pathName(cutname));
unlink(RDCut::pathName(cutname)+".energy");
sql=QString("delete from CUT_EVENTS where ")+
"CUT_NAME=\""+cutname+"\"";
q=new RDSqlQuery(sql);
delete q;
}
else {
//

View File

@@ -2,9 +2,7 @@
//
// Abstract a Rivendell Cut.
//
// (C) Copyright 2002-2004 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: rdcut.cpp,v 1.76.6.10.2.2 2014/07/15 20:02:22 cvs Exp $
// (C) Copyright 2002-2016 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
@@ -829,6 +827,7 @@ bool RDCut::copyTo(RDStation *station,RDUser *user,
#else
QString sql;
RDSqlQuery *q;
RDSqlQuery *q1;
bool ret=true;
//
@@ -891,6 +890,22 @@ bool RDCut::copyTo(RDStation *station,RDUser *user,
q=new RDSqlQuery(sql);
delete q;
//
// Copy the Cut Events
//
sql=QString("select NUMBER,POINT from CUT_EVENTS ")+
"where CUT_NAME=\""+cutName()+"\"";
q=new RDSqlQuery(sql);
while(q->next()) {
sql=QString("insert into CUT_EVENTS set ")+
"CUT_NAME=\""+cutname+"\","+
QString().sprintf("NUMBER=%d,",q->value(0).toInt())+
QString().sprintf("POINT=%d",q->value(1).toInt());
q1=new RDSqlQuery(sql);
delete q1;
}
delete q;
//
// Copy the Audio
//

View File

@@ -166,6 +166,7 @@ bool RDMacro::parseString(const char *str,int n)
case RDMacro::AL:
case RDMacro::BO:
case RDMacro::CC:
case RDMacro::CE:
case RDMacro::CL:
case RDMacro::CP:
case RDMacro::DB:

View File

@@ -2,9 +2,7 @@
//
// A container class for a Rivendell Macro Language Command
//
// (C) Copyright 2002-2007 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: rdmacro.h,v 1.37.4.2.2.1 2014/05/22 19:37:44 cvs Exp $
// (C) Copyright 2002-2016 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
@@ -37,16 +35,16 @@
class RDMacro
{
public:
enum Command {AL=0x414C,BO=0x424F,CC=0x4343,CL=0x434C,CP=0x4350,DB=0x4442,
DL=0x444C,DP=0x4450,DS=0x4453,DX=0x4458,EX=0x4558,FS=0x4653,
GE=0x4745,GI=0x4749,GO=0x474F,JC=0x4A43,JD=0x4A44,LB=0x4C42,
LC=0x4C43,LL=0x4C4C,LO=0x4C4F,MB=0x4D42,MD=0x4D44,MN=0x4D4E,
MT=0x4D54,NN=0x4E4E,PB=0x5042,PC=0x5043,PD=0x5044,PE=0x5045,
PL=0x504C,PM=0x504D,PN=0x504E,PP=0x5050,PS=0x5053,PT=0x5054,
PU=0x5055,PW=0x5057,PX=0x5058,RL=0x524C,RN=0x524E,RS=0x5253,
RR=0x5252,SA=0x5341,SC=0x5343,SD=0x5344,SG=0x5347,SI=0x5349,
SL=0x534C,SN=0x534e,SO=0x534F,SP=0x5350,SR=0x5352,ST=0x5354,
SX=0x5358,SY=0x5359,SZ=0x535A,TA=0x5441,UO=0x554F};
enum Command {AL=0x414C,BO=0x424F,CC=0x4343,CE=0x4345,CL=0x434C,CP=0x4350,
DB=0x4442,DL=0x444C,DP=0x4450,DS=0x4453,DX=0x4458,EX=0x4558,
FS=0x4653,GE=0x4745,GI=0x4749,GO=0x474F,JC=0x4A43,JD=0x4A44,
LB=0x4C42,LC=0x4C43,LL=0x4C4C,LO=0x4C4F,MB=0x4D42,MD=0x4D44,
MN=0x4D4E,MT=0x4D54,NN=0x4E4E,PB=0x5042,PC=0x5043,PD=0x5044,
PE=0x5045,PL=0x504C,PM=0x504D,PN=0x504E,PP=0x5050,PS=0x5053,
PT=0x5054,PU=0x5055,PW=0x5057,PX=0x5058,RL=0x524C,RN=0x524E,
RS=0x5253,RR=0x5252,SA=0x5341,SC=0x5343,SD=0x5344,SG=0x5347,
SI=0x5349,SL=0x534C,SN=0x534e,SO=0x534F,SP=0x5350,SR=0x5352,
ST=0x5354,SX=0x5358,SY=0x5359,SZ=0x535A,TA=0x5441,UO=0x554F};
enum Role {Invalid=0,Cmd=1,Reply=2};
RDMacro();
RDMacro::Role role() const;