
#include "Component/ModelManager.H"#include "Component/ComponentOpts.H"#include "Component/ModelOptionDef.H"#include "Component/EventLog.H"#include "Image/Image.H"#include "Raster/Raster.H"#include "Video/VideoFrame.H"#include "Util/Types.H"#include "Util/MathFunctions.H"#include "Util/FileUtil.H"#include "Util/sformat.H"#include "rutz/time.h"#include "Psycho/PsychoDisplay.H"#include "Psycho/EyeTrackerConfigurator.H"#include "Psycho/EyeTracker.H"#include "Psycho/PsychoOpts.H"#include "GUI/GUIOpts.H"#include "Devices/AudioGrabber.H"#include "Devices/AudioMixer.H"#include "Devices/DeviceOpts.H"#include "Audio/AudioWavFile.H"#include "Media/MPEGStream.H"#include "Media/MediaOpts.H"#include "Neuro/NeuroOpts.H"#include <vector>#include <pthread.h>#include <signal.h>
Go to the source code of this file.
Classes | |
| struct | SESSION_EXP12 |
| struct | SESSION_EXP3 |
| struct | SESSION_EXP4 |
Defines | |
| #define | CACHELEN 150 |
| #define | PROC_NORMAL 0 |
| #define | PROC_EXP1 1 |
| #define | PROC_EXP2 2 |
| #define | PROC_EXP3 3 |
| #define | PROC_EXP4 4 |
| #define | PROC_INVALID -1 |
| #define | STIM_IMAGE 0 |
| #define | STIM_MOVIE 1 |
| #define | STIM_UNKNOWN -1 |
| #define | REC_NONE 0 |
| #define | REC_DURING (1 << 0) |
| #define | REC_AFTER (1 << 1) |
| #define | REC_ALL (REC_DURING | REC_AFTER) |
Functions | |
| int | readRecordStyle (const std::string &recStr) |
| int | readProcType (const std::string &procType) |
| int | getStimulusType (const std::string &fname) |
| void | getStimulusName (const std::string &stimPath, std::string &stimName) |
| void | pause (bool mouse, nub::soft_ref< PsychoDisplay > &d) |
| void | snooze (uint sec, nub::soft_ref< PsychoDisplay > &d) |
| void | trackEyes (bool trk, nub::soft_ref< EyeTracker > &et, nub::soft_ref< PsychoDisplay > &d) |
| void | recordAudio (bool rec, nub::soft_ref< PsychoDisplay > &d) |
| void | calibrateISCAN (bool mouse, nub::soft_ref< PsychoDisplay > &d) |
| static bool | cacheFrame (nub::soft_ref< InputMPEGStream > &mp, std::deque< VideoFrame > &cache) |
| void | saveAudioRecord (const std::string &wavname, nub::soft_ref< PsychoDisplay > &d) |
| static void * | grabAudio (void *arg) |
| static int | submain (const int argc, char **argv) |
| int | main (const int argc, char **argv) |
Variables | |
| const char * | imageExtensions [] = { ".pnm", ".pgm", ".ppm", ".pbm", ".pfm", ".png", ".jpeg", ".jpg", ".dpx", NULL } |
| const char * | movieExtensions [] = { ".avi", ".mpg", ".mpeg", ".m4v", ".m2v", ".mov", ".flv", ".dv", NULL } |
| static const ModelOptionDef | OPT_ProcedureType |
| static const ModelOptionDef | OPT_EyeTrackerRecalib |
| static const ModelOptionDef | OPT_ShuffleOrder |
| static const ModelOptionDef | OPT_MouseInput |
| static const ModelOptionDef | OPT_BlankPeriod |
| static const ModelOptionDef | OPT_StaticPeriod |
| static const ModelOptionDef | OPT_EyeTrackerRec |
| static const ModelOptionDef | OPT_AudRec |
| static pthread_mutex_t | audMutexKey = PTHREAD_MUTEX_INITIALIZER |
| volatile bool | audExit = false |
| volatile bool | audRec = false |
| std::vector< AudioBuffer< byte > > | rec |
Psychophysics interactive display of still images or movies with speech recording
Definition in file psycho-narrator.C.
const ModelOptionDef OPT_AudRec [static] |
{ MODOPT_ARG_STRING, "AudioRecordStyle", &MOC_DISPLAY, OPTEXP_SAVE,
"During when audio(speech) should be grabbed and recorded. "
"'During' means the recording is done only during the stimulus presentation whereas "
"'After' is done only after the presentation - i.e. during the blank sessions.",
"aud-rec", '\0', "<None|During|After|All>", "All" }
Definition at line 179 of file psycho-narrator.C.
const ModelOptionDef OPT_BlankPeriod [static] |
{ MODOPT_ARG(uint), "BlankPeriod", &MOC_DISPLAY, OPTEXP_CORE,
"The period (in sec) of the blank sessions between the visual stimulus presentations. "
"If set to 0, no blank session will be presented. If set bigger than 999,"
"blank session continues until the user presses mouse button or a key.",
"blank-period", '\0', "<int>", "5" }
Definition at line 159 of file psycho-narrator.C.
const ModelOptionDef OPT_EyeTrackerRec [static] |
{ MODOPT_ARG_STRING, "EyeTrackerRecordStyle", &MOC_EYETRACK, OPTEXP_SAVE,
"During when eye-tracker data should be grabbed and recorded. "
"'During' means the recording is done only during the stimulus presentation whereas "
"'All' is done even after the presentation - i.e. including the blank presentation.",
"et-rec", '\0', "<During|All>", "During" }
Definition at line 172 of file psycho-narrator.C.
const ModelOptionDef OPT_EyeTrackerRecalib [static] |
{ MODOPT_ARG(uint), "EyeTrackerRecalibration", &MOC_EYETRACK, OPTEXP_CORE,
"Recalibration frequency of EyeTracker. Set 0 if you don't want recalibration at all."
"If you set to 1, then recalibration will be done after every single image session.",
"et-recalib", '\0', "<int>", "0" }
Definition at line 143 of file psycho-narrator.C.
const ModelOptionDef OPT_MouseInput [static] |
{ MODOPT_FLAG, "MouseInput", &MOC_DISPLAY, OPTEXP_CORE,
"Make mouse input available and use it instead of key presses.",
"mouse-input", '\0', "<bool>", "false" }
Definition at line 154 of file psycho-narrator.C.
const ModelOptionDef OPT_ProcedureType [static] |
{ MODOPT_ARG_STRING, "ProcedureType", &MOC_DISPLAY, OPTEXP_CORE,
"Use experiment specific procedure types that would override relevant parameter settings.",
"proc-type", '\0', "<Normal|Exp1|Exp2|Exp3|Exp4>", "Normal" }
Definition at line 138 of file psycho-narrator.C.
const ModelOptionDef OPT_ShuffleOrder [static] |
{ MODOPT_FLAG, "ShuffleOrder", &MOC_DISPLAY, OPTEXP_CORE,
"Whether shuffle the order of input stimuli or not.",
"shuffle", '\0', "<bool>", "false" }
Definition at line 149 of file psycho-narrator.C.
const ModelOptionDef OPT_StaticPeriod [static] |
{ MODOPT_ARG(uint), "StaticImagePeriod", &MOC_DISPLAY, OPTEXP_CORE,
"The period (in sec) of static images (if the currently showing image is a raster file) "
"during which they are presented on the screen. For video clips, this option is ignored.",
"static-period", '\0', "<int>", "5" }
Definition at line 166 of file psycho-narrator.C.
1.6.3