mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-12 07:35:55 +01:00
2017-08-28 Fred Gleason <fredg@paravelsystems.com>
* Added verbose messages for non-audio events to rdrender(1).
This commit is contained in:
@@ -15966,3 +15966,5 @@
|
|||||||
* Removed FIXME entries from 'utils/rdrender/mainloop.cpp'.
|
* Removed FIXME entries from 'utils/rdrender/mainloop.cpp'.
|
||||||
2017-08-22 Fred Gleason <fredg@paravelsystems.com>
|
2017-08-22 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Implemented SEGUE transitions in rdrender(1).
|
* Implemented SEGUE transitions in rdrender(1).
|
||||||
|
2017-08-28 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added verbose messages for non-audio events to rdrender(1).
|
||||||
|
|||||||
@@ -126,6 +126,47 @@ void LogLine::close()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString LogLine::summary() const
|
||||||
|
{
|
||||||
|
QString ret=QString().sprintf("unknown event [type: %d]",type());
|
||||||
|
switch(type()) {
|
||||||
|
case RDLogLine::Cart:
|
||||||
|
ret=QString().sprintf("cart %06u [",cartNumber())+title()+"]";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDLogLine::Marker:
|
||||||
|
ret="marker ["+markerComment()+"]";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDLogLine::Macro:
|
||||||
|
ret="macro cart ["+title()+"]";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDLogLine::Chain:
|
||||||
|
ret="chain-to ["+markerLabel()+"]";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDLogLine::Track:
|
||||||
|
ret="track marker ["+markerComment()+"]";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDLogLine::MusicLink:
|
||||||
|
ret="music link";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDLogLine::TrafficLink:
|
||||||
|
ret="traffic link";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RDLogLine::OpenBracket:
|
||||||
|
case RDLogLine::CloseBracket:
|
||||||
|
case RDLogLine::UnknownType:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool LogLine::GetCutFile(const QString &cutname,int start_pt,int end_pt,
|
bool LogLine::GetCutFile(const QString &cutname,int start_pt,int end_pt,
|
||||||
QString *dest_filename) const
|
QString *dest_filename) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ class LogLine : public RDLogLine
|
|||||||
void setRamp(RDLogLine::TransType next_trans);
|
void setRamp(RDLogLine::TransType next_trans);
|
||||||
bool open(const QTime &time);
|
bool open(const QTime &time);
|
||||||
void close();
|
void close();
|
||||||
|
QString summary() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool GetCutFile(const QString &cutname,int start_pt,int end_pt,
|
bool GetCutFile(const QString &cutname,int start_pt,int end_pt,
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ int MainObject::MainLoop()
|
|||||||
float *pcm=NULL;
|
float *pcm=NULL;
|
||||||
QTime current_time=render_start_time;
|
QTime current_time=render_start_time;
|
||||||
// QDate current_date=render_start_date;
|
// QDate current_date=render_start_date;
|
||||||
|
QString warnings="";
|
||||||
|
|
||||||
//
|
//
|
||||||
// Open Endpoints
|
// Open Endpoints
|
||||||
@@ -76,16 +77,15 @@ int MainObject::MainLoop()
|
|||||||
// Iterate through it
|
// Iterate through it
|
||||||
//
|
//
|
||||||
for(unsigned i=0;i<lls.size();i++) {
|
for(unsigned i=0;i<lls.size();i++) {
|
||||||
if((lls.at(i)->transType()==RDLogLine::Stop)&&
|
if(lls.at(i)->transType()==RDLogLine::Stop) {
|
||||||
(lls.at(i)->timeType()!=RDLogLine::Hard)) {
|
Verbose(current_time,i,"STOP "+lls.at(i)->summary());
|
||||||
Verbose(current_time,i,QString().sprintf("Unconditional STOP on %06u [",
|
warnings+=
|
||||||
lls.at(i)->cartNumber())+
|
QString().sprintf("log render halted at line %d due to STOP\n",i);
|
||||||
lls.at(i)->title()+"]");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(lls.at(i)->open(current_time)) {
|
if(lls.at(i)->open(current_time)) {
|
||||||
Verbose(current_time,i,
|
Verbose(current_time,i,RDLogLine::transText(lls.at(i)->transType())+
|
||||||
QString().sprintf("starting cart %06u [",lls.at(i)->cartNumber())+
|
QString().sprintf(" cart %06u [",lls.at(i)->cartNumber())+
|
||||||
lls.at(i)->title()+"]");
|
lls.at(i)->title()+"]");
|
||||||
sf_count_t frames=0;
|
sf_count_t frames=0;
|
||||||
if((lls.at(i+1)->transType()==RDLogLine::Segue)&&
|
if((lls.at(i+1)->transType()==RDLogLine::Segue)&&
|
||||||
@@ -113,8 +113,26 @@ int MainObject::MainLoop()
|
|||||||
pcm=NULL;
|
pcm=NULL;
|
||||||
lls.at(i)->setRamp(lls.at(i+1)->transType());
|
lls.at(i)->setRamp(lls.at(i+1)->transType());
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if(i<(lls.size()-1)) {
|
||||||
|
if(lls.at(i)->type()==RDLogLine::Cart) {
|
||||||
|
Verbose(current_time,i,"unable to start "+lls.at(i)->summary()+
|
||||||
|
" (NO AUDIO AVAILABLE)");
|
||||||
|
warnings+=
|
||||||
|
lls.at(i)->summary()+QString().
|
||||||
|
sprintf("at line %d failed to play (NO AUDIO AVAILABLE)\n",i);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
Verbose(current_time,i,"SKIP "+lls.at(i)->summary());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
Verbose(current_time,lls.size()-1,"--- end of log ---");
|
Verbose(current_time,lls.size()-1,"--- end of log ---");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fprintf(stderr,"%s",(const char *)warnings);
|
||||||
|
fflush(stderr);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Clean up
|
// Clean up
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ MainObject::MainObject(QObject *parent)
|
|||||||
}
|
}
|
||||||
cmd->setProcessed(i,true);
|
cmd->setProcessed(i,true);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if(cmd->key(i)=="--start-date") {
|
if(cmd->key(i)=="--start-date") {
|
||||||
render_start_date=QDate::fromString(cmd->value(i),Qt::ISODate);
|
render_start_date=QDate::fromString(cmd->value(i),Qt::ISODate);
|
||||||
if(!render_start_date.isValid()) {
|
if(!render_start_date.isValid()) {
|
||||||
@@ -90,9 +91,10 @@ MainObject::MainObject(QObject *parent)
|
|||||||
}
|
}
|
||||||
cmd->setProcessed(i,true);
|
cmd->setProcessed(i,true);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if(!cmd->processed(i)) {
|
if(!cmd->processed(i)) {
|
||||||
fprintf(stderr,"rdrender: unrecognized option\n");
|
fprintf(stderr,"rdrender: unrecognized option\n");
|
||||||
qApp->exit(256);
|
exit(256);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
render_logname=cmd->key(cmd->keys()-2);
|
render_logname=cmd->key(cmd->keys()-2);
|
||||||
@@ -169,6 +171,12 @@ uint64_t MainObject::FramesFromMsec(uint64_t msec)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainObject::Warning(const QTime &time,int line,const QString &msg) const
|
||||||
|
{
|
||||||
|
fprintf(stderr,"%s\n",(const char *)(QString().sprintf("%04d : ",line)+msg));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainObject::Verbose(const QString &msg)
|
void MainObject::Verbose(const QString &msg)
|
||||||
{
|
{
|
||||||
if(render_verbose) {
|
if(render_verbose) {
|
||||||
@@ -179,7 +187,9 @@ void MainObject::Verbose(const QString &msg)
|
|||||||
|
|
||||||
void MainObject::Verbose(const QTime &time,int line,const QString &msg)
|
void MainObject::Verbose(const QTime &time,int line,const QString &msg)
|
||||||
{
|
{
|
||||||
Verbose(time.toString("hh:mm:ss.zzz")+QString().sprintf("-%04d : ",line)+msg);
|
if(render_verbose) {
|
||||||
|
Warning(time,line,msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ class MainObject : public QObject
|
|||||||
int MainLoop();
|
int MainLoop();
|
||||||
void Sum(float *pcm_out,LogLine *ll,sf_count_t frames);
|
void Sum(float *pcm_out,LogLine *ll,sf_count_t frames);
|
||||||
uint64_t FramesFromMsec(uint64_t msec);
|
uint64_t FramesFromMsec(uint64_t msec);
|
||||||
|
void Warning(const QTime &time,int line,const QString &msg) const;
|
||||||
void Verbose(const QString &msg);
|
void Verbose(const QString &msg);
|
||||||
void Verbose(const QTime &time,int line,const QString &msg);
|
void Verbose(const QTime &time,int line,const QString &msg);
|
||||||
bool GetCutFile(const QString &cutname,int start_pt,int end_pt,
|
bool GetCutFile(const QString &cutname,int start_pt,int end_pt,
|
||||||
|
|||||||
Reference in New Issue
Block a user