mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-31 08:02:43 +02:00
2016-06-17 Fred Gleason <fredg@paravelsystems.com>
* Modified rdexport(1) to list correct audio format parameters in the XML output.
This commit is contained in:
parent
605dfbb964
commit
f04fa15090
@ -15246,3 +15246,6 @@
|
||||
2016-06-17 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in 'lib/rdcut.cpp' that caused a SQL error when
|
||||
generating an XML 'cutList' object.
|
||||
2016-06-17 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Modified rdexport(1) to list correct audio format parameters
|
||||
in the XML output.
|
||||
|
@ -971,7 +971,7 @@ bool RDCart::validateLengths(int len) const
|
||||
}
|
||||
|
||||
|
||||
QString RDCart::xml(bool include_cuts,int cutnum) const
|
||||
QString RDCart::xml(bool include_cuts,RDSettings *settings,int cutnum) const
|
||||
{
|
||||
#ifdef WIN32
|
||||
return QString();
|
||||
@ -1046,7 +1046,7 @@ QString RDCart::xml(bool include_cuts,int cutnum) const
|
||||
q1=new RDSqlQuery(sql);
|
||||
while(q1->next()) {
|
||||
cut=new RDCut(q1->value(0).toString());
|
||||
ret+=cut->xml();
|
||||
ret+=cut->xml(settings);
|
||||
delete cut;
|
||||
}
|
||||
delete q1;
|
||||
@ -1054,7 +1054,7 @@ QString RDCart::xml(bool include_cuts,int cutnum) const
|
||||
else {
|
||||
cut=new RDCut(RDCut::cutName(cart_number,cutnum));
|
||||
if(cut->exists()) {
|
||||
ret+=cut->xml();
|
||||
ret+=cut->xml(settings);
|
||||
}
|
||||
delete cut;
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ class RDCart
|
||||
bool validateLengths(int len) const;
|
||||
void getMetadata(RDWaveData *data) const;
|
||||
void setMetadata(const RDWaveData *data);
|
||||
QString xml(bool include_cuts,int cutnum=-1) const;
|
||||
QString xml(bool include_cuts,RDSettings *settings=NULL,int cutnum=-1) const;
|
||||
void updateLength();
|
||||
void updateLength(bool enforce_length,unsigned length);
|
||||
void resetRotation() const;
|
||||
|
@ -1122,7 +1122,7 @@ void RDCut::setMetadata(RDWaveData *data) const
|
||||
}
|
||||
|
||||
|
||||
QString RDCut::xml() const
|
||||
QString RDCut::xml(RDSettings *settings) const
|
||||
{
|
||||
#ifdef WIN32
|
||||
return QString();
|
||||
@ -1228,10 +1228,18 @@ QString RDCut::xml() const
|
||||
ret+=" "+RDXmlField("playCounter",q->value(21).toUInt());
|
||||
ret+=" "+RDXmlField("localCounter",q->value(22).toUInt());
|
||||
ret+=" "+RDXmlField("validity",q->value(23).toUInt());
|
||||
ret+=" "+RDXmlField("codingFormat",q->value(24).toUInt());
|
||||
ret+=" "+RDXmlField("sampleRate",q->value(25).toUInt());
|
||||
ret+=" "+RDXmlField("bitRate",q->value(26).toUInt());
|
||||
ret+=" "+RDXmlField("channels",q->value(27).toUInt());
|
||||
if(settings==NULL) {
|
||||
ret+=" "+RDXmlField("codingFormat",q->value(24).toUInt());
|
||||
ret+=" "+RDXmlField("sampleRate",q->value(25).toUInt());
|
||||
ret+=" "+RDXmlField("bitRate",q->value(26).toUInt());
|
||||
ret+=" "+RDXmlField("channels",q->value(27).toUInt());
|
||||
}
|
||||
else {
|
||||
ret+=" "+RDXmlField("codingFormat",(int)settings->format());
|
||||
ret+=" "+RDXmlField("sampleRate",settings->sampleRate());
|
||||
ret+=" "+RDXmlField("bitRate",settings->bitRate());
|
||||
ret+=" "+RDXmlField("channels",settings->channels());
|
||||
}
|
||||
ret+=" "+RDXmlField("playGain",q->value(28).toUInt());
|
||||
ret+=" "+RDXmlField("startPoint",q->value(29).toInt());
|
||||
ret+=" "+RDXmlField("endPoint",q->value(30).toInt());
|
||||
|
@ -127,7 +127,7 @@ class RDCut
|
||||
RDConfig *config) const;
|
||||
void getMetadata(RDWaveData *data) const;
|
||||
void setMetadata(RDWaveData *data) const;
|
||||
QString xml() const;
|
||||
QString xml(RDSettings *settings=NULL) const;
|
||||
bool checkInRecording(const QString &stationname,RDSettings *settings,
|
||||
unsigned msecs) const;
|
||||
void autoTrim(RDCut::AudioEnd end,int level);
|
||||
|
@ -434,7 +434,8 @@ void MainObject::ExportCut(RDCart *cart,RDCut *cut)
|
||||
}
|
||||
filename+="xml";
|
||||
if((f=fopen(filename,"w"))!=NULL) {
|
||||
fprintf(f,"%s\n",(const char *)cart->xml(true,cut->cutNumber()));
|
||||
fprintf(f,"%s\n",
|
||||
(const char *)cart->xml(true,&settings,cut->cutNumber()));
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user