mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-16 07:31:19 +02:00
2023-10-16 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'end-pos' parameter from the 'Start Playback' CAE command. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
10
cae/cae.cpp
10
cae/cae.cpp
@@ -156,9 +156,9 @@ MainObject::MainObject(QObject *parent)
|
||||
connect(cae_server,SIGNAL(playPositionReq(const SessionId &,int)),
|
||||
this,SLOT(playPositionData(const SessionId &,int)));
|
||||
connect(cae_server,SIGNAL(startPlaybackReq(const SessionId &,const QString &,
|
||||
unsigned,unsigned,int,int,int,int)),
|
||||
unsigned,unsigned,int,int,int)),
|
||||
this,SLOT(startPlaybackData(const SessionId &,const QString &,
|
||||
unsigned,unsigned,int,int,int,int)));
|
||||
unsigned,unsigned,int,int,int)));
|
||||
connect(cae_server,SIGNAL(playStopReq(const SessionId &)),
|
||||
this,SLOT(stopPlaybackData(const SessionId &)));
|
||||
connect(cae_server,SIGNAL(loadPlaybackReq(int,unsigned,const QString &)),
|
||||
@@ -353,8 +353,7 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
void MainObject::startPlaybackData(const SessionId &sid,const QString &cutname,
|
||||
unsigned cardnum,unsigned portnum,
|
||||
int start_pos,int end_pos,int speed,
|
||||
int volume)
|
||||
int start_pos,int speed,int volume)
|
||||
{
|
||||
Driver *dvr=NULL;
|
||||
|
||||
@@ -397,7 +396,7 @@ void MainObject::startPlaybackData(const SessionId &sid,const QString &cutname,
|
||||
//
|
||||
// Start the transport
|
||||
//
|
||||
if(!dvr->play(cardnum,streamnum,end_pos-start_pos,speed,false,false)) {
|
||||
if(!dvr->play(cardnum,streamnum,0,speed,false,false)) {
|
||||
rda->syslog(LOG_WARNING,
|
||||
"play start failed - session: %s card: %d stream: %d",
|
||||
sid.dump().toUtf8().constData(),cardnum,streamnum);
|
||||
@@ -413,7 +412,6 @@ void MainObject::startPlaybackData(const SessionId &sid,const QString &cutname,
|
||||
sess->setPortNumber(portnum);
|
||||
sess->setStreamNumber(streamnum);
|
||||
sess->setStartPosition(start_pos);
|
||||
sess->setEndPosition(end_pos);
|
||||
sess->setSpeed(speed);
|
||||
cae_play_sessions[sid]=sess;
|
||||
|
||||
|
@@ -77,7 +77,7 @@ class MainObject : public QObject
|
||||
//
|
||||
void startPlaybackData(const SessionId &sid,const QString &cutname,
|
||||
unsigned cardnum,unsigned portnum,
|
||||
int start_pos,int end_pos,int speed,int volume);
|
||||
int start_pos,int speed,int volume);
|
||||
void playPositionData(const SessionId &sid,int position);
|
||||
void stopPlaybackData(const SessionId &sid);
|
||||
|
||||
|
@@ -138,7 +138,6 @@ bool CaeServer::ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
||||
unsigned cardnum;
|
||||
unsigned portnum;
|
||||
int start_pos;
|
||||
int end_pos;
|
||||
int position;
|
||||
int speed;
|
||||
int level;
|
||||
@@ -187,7 +186,7 @@ bool CaeServer::ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
||||
//
|
||||
// Playback Operations
|
||||
//
|
||||
if((f0.at(0)=="PY")&&(f0.size()==9)) { // Start Playback
|
||||
if((f0.at(0)=="PY")&&(f0.size()==8)) { // Start Playback
|
||||
serial=f0.at(1).toUInt(&ok);
|
||||
if(ok) {
|
||||
origin.setSerialNumber(serial);
|
||||
@@ -199,16 +198,13 @@ bool CaeServer::ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
||||
if(ok&&(portnum<RD_MAX_PORTS)) {
|
||||
start_pos=f0.at(5).toInt(&ok);
|
||||
if(ok&&(start_pos>=0)) {
|
||||
end_pos=f0.at(6).toInt(&ok);
|
||||
if(ok&&(end_pos>=0)&&(end_pos>=start_pos)) {
|
||||
speed=f0.at(7).toInt(&ok);
|
||||
if(ok&&(speed>0)) {
|
||||
volume=f0.at(8).toInt(&ok);
|
||||
if(ok) {
|
||||
emit startPlaybackReq(origin,cutname,cardnum,portnum,
|
||||
start_pos,end_pos,speed,volume);
|
||||
was_processed=true;
|
||||
}
|
||||
speed=f0.at(6).toInt(&ok);
|
||||
if(ok&&(speed>0)) {
|
||||
volume=f0.at(7).toInt(&ok);
|
||||
if(ok) {
|
||||
emit startPlaybackReq(origin,cutname,cardnum,portnum,
|
||||
start_pos,speed,volume);
|
||||
was_processed=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -55,7 +55,7 @@ class CaeServer : public QObject
|
||||
void connectionClosed(const SessionId &sid);
|
||||
void startPlaybackReq(const SessionId &sid,const QString &cutname,
|
||||
unsigned cardnum,unsigned portnum,
|
||||
int start_pos,int end_pos,int speed,int volume);
|
||||
int start_pos,int speed,int volume);
|
||||
void playPositionReq(const SessionId &sid,int position);
|
||||
void playPauseReq(const SessionId &sid);
|
||||
void playResumeReq(const SessionId &sid);
|
||||
|
@@ -18,6 +18,8 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <rd.h>
|
||||
|
||||
#include "session.h"
|
||||
|
||||
SessionId::SessionId(const QHostAddress &src_addr,uint16_t src_port,int serial)
|
||||
@@ -106,11 +108,7 @@ Session::Session(const QHostAddress &addr,uint16_t port,int serial)
|
||||
d_port_number=-1;
|
||||
d_stream_number=-1;
|
||||
d_start_position=-1;
|
||||
d_end_position=-1;
|
||||
d_speed=100000;
|
||||
|
||||
// d_meter_port=0;
|
||||
// d_meters_enabled=false;
|
||||
d_speed=RD_TIMESCALE_DIVISOR;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,31 +120,9 @@ Session::Session(const SessionId &sid)
|
||||
d_port_number=-1;
|
||||
d_stream_number=-1;
|
||||
d_start_position=-1;
|
||||
d_end_position=-1;
|
||||
d_speed=100000;
|
||||
|
||||
// d_meter_port=0;
|
||||
// d_meters_enabled=false;
|
||||
d_speed=RD_TIMESCALE_DIVISOR;
|
||||
}
|
||||
|
||||
/*
|
||||
Session::Session(const Connection &conn)
|
||||
{
|
||||
d_session_id=SessionId(conn);
|
||||
|
||||
d_session_id=sid;
|
||||
|
||||
d_card_number=-1;
|
||||
d_port_number=-1;
|
||||
d_stream_number=-1;
|
||||
d_start_position=-1;
|
||||
d_end_position=-1;
|
||||
d_speed=100000;
|
||||
|
||||
d_meter_port=0;
|
||||
d_meters_enabled=false;
|
||||
}
|
||||
*/
|
||||
|
||||
SessionId Session::sessionId() const
|
||||
{
|
||||
@@ -202,18 +178,6 @@ void Session::setStartPosition(int pos)
|
||||
}
|
||||
|
||||
|
||||
int Session::endPosition() const
|
||||
{
|
||||
return d_end_position;
|
||||
}
|
||||
|
||||
|
||||
void Session::setEndPosition(int pos)
|
||||
{
|
||||
d_end_position=pos;
|
||||
}
|
||||
|
||||
|
||||
int Session::speed() const
|
||||
{
|
||||
return d_speed;
|
||||
@@ -224,28 +188,3 @@ void Session::setSpeed(int speed)
|
||||
{
|
||||
d_speed=speed;
|
||||
}
|
||||
|
||||
/*
|
||||
uint16_t Session::meterPort() const
|
||||
{
|
||||
return d_meter_port;
|
||||
}
|
||||
|
||||
|
||||
void Session::setMeterPort(uint16_t port)
|
||||
{
|
||||
d_meter_port=port;
|
||||
}
|
||||
|
||||
|
||||
bool Session::metersEnabled()
|
||||
{
|
||||
return d_meters_enabled;
|
||||
}
|
||||
|
||||
|
||||
void Session::setMetersEnabled(bool state)
|
||||
{
|
||||
d_meters_enabled=state;
|
||||
}
|
||||
*/
|
||||
|
@@ -61,12 +61,10 @@ class Session
|
||||
void setPortNumber(int portnum);
|
||||
int streamNumber() const;
|
||||
void setStreamNumber(int streamnum);
|
||||
// uint16_t meterPort() const;
|
||||
// void setMeterPort(uint16_t port);
|
||||
int startPosition() const;
|
||||
void setStartPosition(int pos);
|
||||
int endPosition() const;
|
||||
void setEndPosition(int pos);
|
||||
// int endPosition() const;
|
||||
// void setEndPosition(int pos);
|
||||
int speed() const;
|
||||
void setSpeed(int speed);
|
||||
// bool metersEnabled();
|
||||
@@ -78,10 +76,8 @@ class Session
|
||||
int d_port_number;
|
||||
int d_stream_number;
|
||||
int d_start_position;
|
||||
int d_end_position;
|
||||
// int d_end_position;
|
||||
int d_speed;
|
||||
// uint16_t d_meter_port;
|
||||
// bool d_meters_enabled;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user