3
Psychtoolbox3/Source/Common/SCREENGetMovieTimeIndex.c
3
Psychtoolbox3/Source/Common/SCREENGetMovieTimeIndex.c
9
7
mario.kleiner at tuebingen.mpg.de mk
15
11
This file should build on any platform.
21
15
10/23/05 mk Created.
29
Close a previously opened movie file and release all associated ressources.
33
On OS-X, all movie/multimedia handling functions are implemented via the Apple Quicktime API,
35
version 7 or later. On a later Windows port we'll probably do the same, but for other OS'es,
37
e.g., Linux, we would use a different multimedia engine.
57
23
#include "Screen.h"
63
25
static char useString[] = "timeindex = Screen('GetMovieTimeIndex', moviePtr);";
65
26
static char synopsisString[] = "Return current time index for movie object 'moviePtr'.";
67
27
static char seeAlsoString[] = "CloseMovie PlayMovie GetMovieImage GetMovieTimeIndex SetMovieTimeIndex";
71
29
PsychError SCREENGetMovieTimeIndex(void)
79
33
// All sub functions should have these two lines
81
34
PsychPushHelp(useString, synopsisString, seeAlsoString);
83
35
if(PsychIsGiveHelp()) {PsychGiveHelp(); return(PsychError_none);};
87
37
PsychErrorExit(PsychCapNumInputArgs(1)); // Max. 1 input args.
89
38
PsychErrorExit(PsychRequireNumInputArgs(1)); // Min. 1 input args required.
91
39
PsychErrorExit(PsychCapNumOutputArgs(1)); // One output arg.
95
41
// Get the movie handle:
97
42
PsychCopyInIntegerArg(1, TRUE, &moviehandle);
99
43
if (moviehandle==-1) {
101
44
PsychErrorExitMsg(PsychError_user, "GetMovieTimeIndex called without valid handle to a movie object.");
107
47
// Retrieve and return current movie time index:
109
48
PsychCopyOutDoubleArg(1, TRUE, PsychGetMovieTimeIndex(moviehandle));
115
50
return(PsychError_none);