mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-11 17:13:47 +02:00
2016-03-29 Fred Gleason <fredg@paravelsystems.com>
* Added the 'Copy Cut' ['CP'] RML in 'lib/rdmacro.cpp' and 'lib/rdmacro.h'. * Implemented the 'Copy Cut' ['CP'] RML in 'rdcatchd/local_macros.cpp'.
This commit is contained in:
@@ -15046,3 +15046,7 @@
|
||||
* Translated 'docs/rml.sxw' to XML5-DocBook in 'docs/docbook/rml.xml'.
|
||||
2016-03-29 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Alphabeticized the set of RML commands in 'docs/docbook/rml.xml'.
|
||||
2016-03-29 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added the 'Copy Cut' ['CP'] RML in 'lib/rdmacro.cpp' and
|
||||
'lib/rdmacro.h'.
|
||||
* Implemented the 'Copy Cut' ['CP'] RML in 'rdcatchd/local_macros.cpp'.
|
||||
|
@@ -373,6 +373,40 @@
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title><command>Copy Cut [CP]</command></title>
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>Module</term>
|
||||
<listitem><command>rdcatchd</command><manvolnum>8</manvolnum></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Mnemonic</term>
|
||||
<listitem><userinput>CP</userinput></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
Copy cut audio and metadata.
|
||||
</para>
|
||||
<para>
|
||||
<userinput>CP
|
||||
<replaceable>srccart</replaceable>
|
||||
<replaceable>srccut</replaceable>
|
||||
<replaceable>dstcart</replaceable>
|
||||
<replaceable>dstcut</replaceable>!</userinput>
|
||||
</para>
|
||||
<para>
|
||||
Copy the audio and metadata from cut number
|
||||
<replaceable>srccut</replaceable> in cart
|
||||
<replaceable>srccart</replaceable> to cut number
|
||||
<replaceable>dstcut</replaceable> in cart
|
||||
<replaceable>dstcart</replaceable>. The destination cart/cut must
|
||||
already exist.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title><command>Database Backup [DB]</command></title>
|
||||
<para>
|
||||
|
@@ -167,6 +167,7 @@ bool RDMacro::parseString(const char *str,int n)
|
||||
case RDMacro::BO:
|
||||
case RDMacro::CC:
|
||||
case RDMacro::CL:
|
||||
case RDMacro::CP:
|
||||
case RDMacro::DB:
|
||||
case RDMacro::DL:
|
||||
case RDMacro::DP:
|
||||
|
@@ -37,16 +37,16 @@
|
||||
class RDMacro
|
||||
{
|
||||
public:
|
||||
enum Command {AL=0x414C,BO=0x424F,CC=0x4343,CL=0x434C,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,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;
|
||||
|
@@ -21,6 +21,7 @@
|
||||
//
|
||||
|
||||
#include <rdcart.h>
|
||||
#include <rduser.h>
|
||||
|
||||
#include <rdcatchd.h>
|
||||
|
||||
@@ -32,10 +33,42 @@ void MainObject::RunLocalMacros(RDMacro *rml)
|
||||
int chan;
|
||||
unsigned cartnum;
|
||||
unsigned cutnum;
|
||||
unsigned dst_cartnum;
|
||||
unsigned dst_cutnum;
|
||||
unsigned len;
|
||||
QDateTime dt;
|
||||
RDUser *user;
|
||||
bool ok=false;
|
||||
|
||||
switch(rml->command()) {
|
||||
case RDMacro::CP:
|
||||
cartnum=rml->arg(0).toUInt();
|
||||
cutnum=rml->arg(1).toUInt();
|
||||
dst_cartnum=rml->arg(2).toUInt();
|
||||
dst_cutnum=rml->arg(3).toUInt();
|
||||
if((cartnum<1)||(cartnum>RD_MAX_CART_NUMBER)||
|
||||
(dst_cartnum<1)||(dst_cartnum>RD_MAX_CART_NUMBER)||
|
||||
(cutnum<1)||(cutnum>RD_MAX_CUT_NUMBER)||
|
||||
(dst_cutnum<1)||(dst_cutnum>RD_MAX_CUT_NUMBER)||
|
||||
(catch_ripc->user().isEmpty())) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
catch_ripc->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
user=new RDUser(catch_ripc->user());
|
||||
cut=new RDCut(cartnum,cutnum);
|
||||
ok=cut->copyTo(catch_rdstation,user,RDCut::cutName(dst_cartnum,dst_cutnum),
|
||||
catch_config);
|
||||
delete cut;
|
||||
delete user;
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(ok);
|
||||
catch_ripc->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
case RDMacro::EX:
|
||||
cart=new RDCart(rml->arg(0).toUInt());
|
||||
if(cart->exists()) {
|
||||
|
Reference in New Issue
Block a user