# HG changeset patch # User tomwalters # Date 1288051409 0 # Node ID 88df1647d1a0d5c59d988ebb96da7775c677b4aa # Parent 21d8502c10f8fd5dc68d87cc447018602c822d0c - Support (hopefully) both movie writing and HTK file output. diff -r 21d8502c10f8 -r 88df1647d1a0 experiments/scripts/cnbh-syllables/feature_generation/ssi_profile_features.aimcopycfg --- a/experiments/scripts/cnbh-syllables/feature_generation/ssi_profile_features.aimcopycfg Mon Oct 25 03:33:59 2010 +0000 +++ b/experiments/scripts/cnbh-syllables/feature_generation/ssi_profile_features.aimcopycfg Tue Oct 26 00:03:29 2010 +0000 @@ -35,7 +35,7 @@ module7.name = SmoothNAPOutput module7.id = htk_out module7.parameters = << %s"), script_[i].first.c_str(), script_[i].second.c_str()); tree_.Process(); - tree_.Reset(); } + // A final call to Reset() is required to close any open files. + global_parameters_.SetString("input_filename", ""); + global_parameters_.SetString("output_filename_base", ""); + tree_.Reset(); return true; } diff -r 21d8502c10f8 -r 88df1647d1a0 src/Modules/Output/Graphics/Devices/GraphicsOutputDevice.h --- a/src/Modules/Output/Graphics/Devices/GraphicsOutputDevice.h Mon Oct 25 03:33:59 2010 +0000 +++ b/src/Modules/Output/Graphics/Devices/GraphicsOutputDevice.h Tue Oct 26 00:03:29 2010 +0000 @@ -182,6 +182,9 @@ //! \brief Called when animation stops virtual void Stop() { m_bRunning = false; } + + virtual void Reset(Parameters* global_parameters) = 0; + protected: //! \brief True when animation is running diff -r 21d8502c10f8 -r 88df1647d1a0 src/Modules/Output/Graphics/Devices/GraphicsOutputDeviceMovie.cc --- a/src/Modules/Output/Graphics/Devices/GraphicsOutputDeviceMovie.cc Mon Oct 25 03:33:59 2010 +0000 +++ b/src/Modules/Output/Graphics/Devices/GraphicsOutputDeviceMovie.cc Tue Oct 26 00:03:29 2010 +0000 @@ -133,6 +133,11 @@ gRelease(); } +void GraphicsOutputDeviceMovie::Reset(Parameters* global_parameters) { + Stop(); + Initialize(global_parameters); +} + void GraphicsOutputDeviceMovie::Stop() { GraphicsOutputDeviceCairo::Stop(); CloseFile(); diff -r 21d8502c10f8 -r 88df1647d1a0 src/Modules/Output/Graphics/Devices/GraphicsOutputDeviceMovie.h --- a/src/Modules/Output/Graphics/Devices/GraphicsOutputDeviceMovie.h Mon Oct 25 03:33:59 2010 +0000 +++ b/src/Modules/Output/Graphics/Devices/GraphicsOutputDeviceMovie.h Tue Oct 26 00:03:29 2010 +0000 @@ -55,6 +55,9 @@ void Start(); //! \brief This function now also generates the output movie. void Stop(); + + void Reset(Parameters* global_parameters); + protected: /*! \brief Plots a summary of relevant parameters on the output diff -r 21d8502c10f8 -r 88df1647d1a0 src/Modules/Output/Graphics/GraphicsView.cc --- a/src/Modules/Output/Graphics/GraphicsView.cc Mon Oct 25 03:33:59 2010 +0000 +++ b/src/Modules/Output/Graphics/GraphicsView.cc Tue Oct 26 00:03:29 2010 +0000 @@ -82,7 +82,7 @@ void GraphicsView::ResetInternal() { if (m_pDev != NULL) { - m_pDev->Stop(); + m_pDev->Reset(global_parameters_); } }