~ubuntu-branches/ubuntu/trusty/psychtoolbox-3/trusty-proposed

« back to all changes in this revision

Viewing changes to PsychSourceGL/Source/Common/Screen/SCREENGetMovieTimeIndex.c

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2013-11-19 23:34:50 UTC
  • mfrom: (3.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20131119233450-f7nf92vb8qavjmk8
Tags: 3.0.11.20131017.dfsg1-3
Upload to unsable since fresh glew has arrived to sid!

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 
3
 
Psychtoolbox3/Source/Common/SCREENGetMovieTimeIndex.c           
4
 
 
5
 
 
6
 
 
 
2
 
 
3
 Psychtoolbox3/Source/Common/SCREENGetMovieTimeIndex.c          
 
4
 
7
5
 AUTHORS:
8
 
 
 
6
 
9
7
 mario.kleiner at tuebingen.mpg.de   mk
10
 
 
11
8
 
12
 
 
13
9
 PLATFORMS:     
14
 
 
 
10
 
15
11
 This file should build on any platform. 
16
 
 
17
12
 
18
 
 
19
13
 HISTORY:
20
 
 
 
14
 
21
15
 10/23/05  mk           Created. 
22
 
 
23
16
 
24
 
 
25
17
 DESCRIPTION:
26
 
 
27
 
 
28
 
 
29
 
 Close a previously opened movie file and release all associated ressources.
30
 
 
31
 
 
32
 
 
33
 
 On OS-X, all movie/multimedia handling functions are implemented via the Apple Quicktime API,
34
 
 
35
 
 version 7 or later. On a later Windows port we'll probably do the same, but for other OS'es,
36
 
 
37
 
 e.g., Linux, we would use a different multimedia engine.
38
 
 
39
 
 
40
 
 
 
18
 
41
19
 TO DO:
42
 
 
43
 
 
44
 
 
45
 
 
46
 
 
47
 
 
48
 
 
49
 
 
50
 
 
 
20
 
51
21
 */
52
22
 
53
 
 
54
 
 
55
 
 
56
 
 
57
23
#include "Screen.h"
58
24
 
59
 
 
60
 
 
61
 
 
62
 
 
63
25
static char useString[] = "timeindex = Screen('GetMovieTimeIndex', moviePtr);";
64
 
 
65
26
static char synopsisString[] = "Return current time index for movie object 'moviePtr'.";
66
 
 
67
27
static char seeAlsoString[] = "CloseMovie PlayMovie GetMovieImage GetMovieTimeIndex SetMovieTimeIndex";
68
28
 
69
 
 
70
 
 
71
29
PsychError SCREENGetMovieTimeIndex(void) 
72
 
 
73
30
{
74
 
 
75
 
    int                                     moviehandle = -1;
76
 
 
 
31
    int moviehandle = -1;
77
32
    
78
 
 
79
33
    // All sub functions should have these two lines
80
 
 
81
34
    PsychPushHelp(useString, synopsisString, seeAlsoString);
82
 
 
83
35
    if(PsychIsGiveHelp()) {PsychGiveHelp(); return(PsychError_none);};
84
 
 
85
36
    
86
 
 
87
37
    PsychErrorExit(PsychCapNumInputArgs(1));            // Max. 1 input args.
88
 
 
89
38
    PsychErrorExit(PsychRequireNumInputArgs(1));        // Min. 1 input args required.
90
 
 
91
39
    PsychErrorExit(PsychCapNumOutputArgs(1));           // One output arg.
92
 
 
93
40
    
94
 
 
95
41
    // Get the movie handle:
96
 
 
97
42
    PsychCopyInIntegerArg(1, TRUE, &moviehandle);
98
 
 
99
43
    if (moviehandle==-1) {
100
 
 
101
44
        PsychErrorExitMsg(PsychError_user, "GetMovieTimeIndex called without valid handle to a movie object.");
102
 
 
103
45
    }
104
 
 
105
46
    
106
 
 
107
47
    // Retrieve and return current movie time index:
108
 
 
109
48
    PsychCopyOutDoubleArg(1, TRUE, PsychGetMovieTimeIndex(moviehandle));
110
 
 
111
49
    
112
 
 
113
 
    // Ready!    
114
 
 
115
50
    return(PsychError_none);
116
 
 
117
51
}
118
 
 
119