added some try-catch clauses to try and fix bug 928 (has not worked yet)
This commit is contained in:
parent
32376178d3
commit
acbc6aac27
4 changed files with 132 additions and 98 deletions
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.38 $
|
Version : $Revision: 1.39 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -758,14 +758,12 @@ GLiveSupport :: deletePlayable(Ptr<Playable>::Ref playable)
|
||||||
void
|
void
|
||||||
LiveSupport :: GLiveSupport ::
|
LiveSupport :: GLiveSupport ::
|
||||||
GLiveSupport :: playOutputAudio(Ptr<Playable>::Ref playable)
|
GLiveSupport :: playOutputAudio(Ptr<Playable>::Ref playable)
|
||||||
throw (XmlRpcException,
|
throw (std::logic_error)
|
||||||
std::invalid_argument,
|
|
||||||
std::logic_error,
|
|
||||||
std::runtime_error)
|
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
if (outputItemPlayingNow) {
|
if (outputItemPlayingNow) {
|
||||||
stopOutputAudio(); // stop the audio player and release old resources
|
stopOutputAudio(); // stop the audio player and
|
||||||
}
|
} // release old resources
|
||||||
|
|
||||||
switch (playable->getType()) {
|
switch (playable->getType()) {
|
||||||
case Playable::AudioClipType:
|
case Playable::AudioClipType:
|
||||||
|
@ -784,6 +782,22 @@ GLiveSupport :: playOutputAudio(Ptr<Playable>::Ref playable)
|
||||||
default: // this never happens
|
default: // this never happens
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} catch (XmlRpcException &e) {
|
||||||
|
Ptr<Glib::ustring>::Ref eMsg
|
||||||
|
= getResourceUstring("audioErrorMsg");
|
||||||
|
eMsg->append(e.what());
|
||||||
|
displayMessageWindow(eMsg);
|
||||||
|
} catch (std::invalid_argument &e) {
|
||||||
|
Ptr<Glib::ustring>::Ref eMsg
|
||||||
|
= getResourceUstring("audioErrorMsg");
|
||||||
|
eMsg->append(e.what());
|
||||||
|
displayMessageWindow(eMsg);
|
||||||
|
} catch (std::runtime_error &e) {
|
||||||
|
Ptr<Glib::ustring>::Ref eMsg
|
||||||
|
= getResourceUstring("audioErrorMsg");
|
||||||
|
eMsg->append(e.what());
|
||||||
|
displayMessageWindow(eMsg);
|
||||||
|
}
|
||||||
|
|
||||||
outputPlayerIsPaused = false;
|
outputPlayerIsPaused = false;
|
||||||
}
|
}
|
||||||
|
@ -814,9 +828,9 @@ GLiveSupport :: pauseOutputAudio(void)
|
||||||
void
|
void
|
||||||
LiveSupport :: GLiveSupport ::
|
LiveSupport :: GLiveSupport ::
|
||||||
GLiveSupport :: stopOutputAudio(void)
|
GLiveSupport :: stopOutputAudio(void)
|
||||||
throw (XmlRpcException,
|
throw (std::logic_error)
|
||||||
std::logic_error)
|
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
outputPlayer->close();
|
outputPlayer->close();
|
||||||
|
|
||||||
if (outputItemPlayingNow) {
|
if (outputItemPlayingNow) {
|
||||||
|
@ -835,6 +849,12 @@ GLiveSupport :: stopOutputAudio(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (XmlRpcException &e) {
|
||||||
|
Ptr<Glib::ustring>::Ref eMsg
|
||||||
|
= getResourceUstring("audioErrorMsg");
|
||||||
|
eMsg->append(e.what());
|
||||||
|
displayMessageWindow(eMsg);
|
||||||
|
}
|
||||||
|
|
||||||
outputPlayerIsPaused = false;
|
outputPlayerIsPaused = false;
|
||||||
}
|
}
|
||||||
|
@ -846,14 +866,12 @@ GLiveSupport :: stopOutputAudio(void)
|
||||||
void
|
void
|
||||||
LiveSupport :: GLiveSupport ::
|
LiveSupport :: GLiveSupport ::
|
||||||
GLiveSupport :: playCueAudio(Ptr<Playable>::Ref playable)
|
GLiveSupport :: playCueAudio(Ptr<Playable>::Ref playable)
|
||||||
throw (XmlRpcException,
|
throw (std::logic_error)
|
||||||
std::invalid_argument,
|
|
||||||
std::logic_error,
|
|
||||||
std::runtime_error)
|
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
if (cueItemPlayingNow) {
|
if (cueItemPlayingNow) {
|
||||||
stopCueAudio(); // stop the audio player and release old resources
|
stopCueAudio(); // stop the audio player and
|
||||||
}
|
} // release old resources
|
||||||
|
|
||||||
switch (playable->getType()) {
|
switch (playable->getType()) {
|
||||||
case Playable::AudioClipType:
|
case Playable::AudioClipType:
|
||||||
|
@ -872,6 +890,22 @@ GLiveSupport :: playCueAudio(Ptr<Playable>::Ref playable)
|
||||||
default: // this never happens
|
default: // this never happens
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} catch (XmlRpcException &e) {
|
||||||
|
Ptr<Glib::ustring>::Ref eMsg
|
||||||
|
= getResourceUstring("audioErrorMsg");
|
||||||
|
eMsg->append(e.what());
|
||||||
|
displayMessageWindow(eMsg);
|
||||||
|
} catch (std::invalid_argument &e) {
|
||||||
|
Ptr<Glib::ustring>::Ref eMsg
|
||||||
|
= getResourceUstring("audioErrorMsg");
|
||||||
|
eMsg->append(e.what());
|
||||||
|
displayMessageWindow(eMsg);
|
||||||
|
} catch (std::runtime_error &e) {
|
||||||
|
Ptr<Glib::ustring>::Ref eMsg
|
||||||
|
= getResourceUstring("audioErrorMsg");
|
||||||
|
eMsg->append(e.what());
|
||||||
|
displayMessageWindow(eMsg);
|
||||||
|
}
|
||||||
|
|
||||||
cuePlayerIsPaused = false;
|
cuePlayerIsPaused = false;
|
||||||
}
|
}
|
||||||
|
@ -902,9 +936,9 @@ GLiveSupport :: pauseCueAudio(void)
|
||||||
void
|
void
|
||||||
LiveSupport :: GLiveSupport ::
|
LiveSupport :: GLiveSupport ::
|
||||||
GLiveSupport :: stopCueAudio(void)
|
GLiveSupport :: stopCueAudio(void)
|
||||||
throw (XmlRpcException,
|
throw (std::logic_error)
|
||||||
std::logic_error)
|
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
cuePlayer->close();
|
cuePlayer->close();
|
||||||
|
|
||||||
if (cueItemPlayingNow) {
|
if (cueItemPlayingNow) {
|
||||||
|
@ -923,6 +957,12 @@ GLiveSupport :: stopCueAudio(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (XmlRpcException &e) {
|
||||||
|
Ptr<Glib::ustring>::Ref eMsg
|
||||||
|
= getResourceUstring("audioErrorMsg");
|
||||||
|
eMsg->append(e.what());
|
||||||
|
displayMessageWindow(eMsg);
|
||||||
|
}
|
||||||
|
|
||||||
cuePlayerIsPaused = false;
|
cuePlayerIsPaused = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.31 $
|
Version : $Revision: 1.32 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.h,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.h,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -101,7 +101,7 @@ class MasterPanelWindow;
|
||||||
* respective documentation.
|
* respective documentation.
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.31 $
|
* @version $Revision: 1.32 $
|
||||||
* @see LocalizedObject#getBundle(const xmlpp::Element &)
|
* @see LocalizedObject#getBundle(const xmlpp::Element &)
|
||||||
* @see AuthenticationClientFactory
|
* @see AuthenticationClientFactory
|
||||||
* @see StorageClientFactory
|
* @see StorageClientFactory
|
||||||
|
@ -588,10 +588,7 @@ class GLiveSupport : public LocalizedConfigurable,
|
||||||
*/
|
*/
|
||||||
virtual void
|
virtual void
|
||||||
playOutputAudio(Ptr<Playable>::Ref playable)
|
playOutputAudio(Ptr<Playable>::Ref playable)
|
||||||
throw (XmlRpcException,
|
throw (std::logic_error);
|
||||||
std::invalid_argument,
|
|
||||||
std::logic_error,
|
|
||||||
std::runtime_error);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop the output audio player.
|
* Stop the output audio player.
|
||||||
|
@ -601,8 +598,7 @@ class GLiveSupport : public LocalizedConfigurable,
|
||||||
*/
|
*/
|
||||||
virtual void
|
virtual void
|
||||||
stopOutputAudio(void)
|
stopOutputAudio(void)
|
||||||
throw (XmlRpcException,
|
throw (std::logic_error);
|
||||||
std::logic_error);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pause the output audio player.
|
* Pause the output audio player.
|
||||||
|
@ -624,10 +620,7 @@ class GLiveSupport : public LocalizedConfigurable,
|
||||||
*/
|
*/
|
||||||
virtual void
|
virtual void
|
||||||
playCueAudio(Ptr<Playable>::Ref playable)
|
playCueAudio(Ptr<Playable>::Ref playable)
|
||||||
throw (XmlRpcException,
|
throw (std::logic_error);
|
||||||
std::invalid_argument,
|
|
||||||
std::logic_error,
|
|
||||||
std::runtime_error);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop the cue audio player.
|
* Stop the cue audio player.
|
||||||
|
@ -637,8 +630,7 @@ class GLiveSupport : public LocalizedConfigurable,
|
||||||
*/
|
*/
|
||||||
virtual void
|
virtual void
|
||||||
stopCueAudio(void)
|
stopCueAudio(void)
|
||||||
throw (XmlRpcException,
|
throw (std::logic_error);
|
||||||
std::logic_error);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pause the cue audio player.
|
* Pause the cue audio player.
|
||||||
|
|
|
@ -16,6 +16,7 @@ hu:table
|
||||||
schedulerNotReachableMsg:string { "Az időzítő szerver nem elérhető" }
|
schedulerNotReachableMsg:string { "Az időzítő szerver nem elérhető" }
|
||||||
storageNotReachableMsg:string { "A tároló szerver nem elérhető" }
|
storageNotReachableMsg:string { "A tároló szerver nem elérhető" }
|
||||||
authenticationNotReachableMsg:string { "A beléptető szerver nem elérhető" }
|
authenticationNotReachableMsg:string { "A beléptető szerver nem elérhető" }
|
||||||
|
audioErrorMsg { "Hiba történt a lejátszáskor: " }
|
||||||
|
|
||||||
loginWindow:table
|
loginWindow:table
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,6 +17,7 @@ root:table
|
||||||
storageNotReachableMsg:string { "Storage server not available" }
|
storageNotReachableMsg:string { "Storage server not available" }
|
||||||
authenticationNotReachableMsg:string
|
authenticationNotReachableMsg:string
|
||||||
{ "Authentication server not available" }
|
{ "Authentication server not available" }
|
||||||
|
audioErrorMsg { "Audio player error: " }
|
||||||
|
|
||||||
loginWindow:table
|
loginWindow:table
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue