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

« back to all changes in this revision

Viewing changes to PsychSourceGL/Source/Common/Screen/SCREENPlayMovie.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:
16
16
 
17
17
 DESCRIPTION:
18
18
 
19
 
 Start playback of given movie object.
20
 
 
21
 
 On OS-X, all movie/multimedia handling functions are implemented via the Apple Quicktime API,
22
 
 version 7 or later. On a later Windows port we'll probably do the same, but for other OS'es,
23
 
 e.g., Linux, we would use a different multimedia engine.
 
19
 Start/Stop playback of given movie object or change its sound volume.
24
20
 
25
21
 TO DO:
 
22
 
26
23
 */
27
24
 
28
25
#include "Screen.h"
29
26
 
30
27
static char useString[] = "[droppedframes] = Screen('PlayMovie', moviePtr, rate, [loop], [soundvolume]);";
31
28
static char synopsisString[] = 
32
 
"Start playback of movie associated with movieobject 'moviePtr'. 'rate' defines the playback rate: 0 == Stop playback, "
33
 
"1 == Normal speed forward, -1 == Normal speed backward, ... . 'loop' Enable looped playback. 'soundvolume' Output volume "
34
 
"of associated soundtrack: 0 = Mute sound output, 0.01 - 1.0 Volume in percent. On OS-X, media files are handled by use of "
35
 
"Apples Quicktime-7 API. On other platforms, the playback engine may be different from Quicktime. Returns number of frames "
36
 
"that needed to be dropped in order to keep video playback in sync with realtime and audio playback.";
 
29
"Start playback of movie associated with movieobject 'moviePtr'. 'rate' defines the desired playback rate: 0 == Stop playback, "
 
30
"1 == Normal speed forward, -1 == Normal speed backward, ... . Not all movie files allow reverse playback or playback at other "
 
31
"rates than normal speed forward. 'loop' Enable looped playback if set to a value greater than zero. A value of 1 will enable "
 
32
"repetitive looped playback with the default strategy, or the special strategy selected via the optional 'specialFlags1' settings "
 
33
"provided during the call to Screen('OpenMovie', ...). Values greater than 1 select different repetition strategies when combined together. "
 
34
"Different strategies exist to handle different quirks with some movie file formats and encodings and with some versions of GStreamer: "
 
35
"A flag of 2 requests looped playback via gapless reloading of the movie instead of rewinding it to the start. A flag of 1+4 uses "
 
36
"so called segment seeks for rewinding, whereas adding 8 (e.g., 1+8 or 1+4+8) asks to flush the video pipeline during rewinding. "
 
37
"Your mileage with these looping strategies will differ, but usually the default settings are good enough for most purposes. "
 
38
"There are however movie files or network video streams that can't be automatically repeated at all, so called non-seekable streams.\n"
 
39
"'soundvolume' Select the output audio volume of an associated soundtrack: 0 = Mute sound output, 0.01 - 1.0 Volume in percent. "
 
40
"You can choose the sound volume with low overhead while playback is active by calling this function, as long as you provide the "
 
41
"same parameters for all other settings as the ones you used when starting playback, ie. only 'soundvolume' may differ.\n"
 
42
"If the function is called to stop playback, it will return the number of frames that needed to be dropped in order to keep "
 
43
"video playback in sync with realtime and audio playback. Otherwise it returns zero.\n";
37
44
 
38
45
static char seeAlsoString[] = "CloseMovie PlayMovie GetMovieImage GetMovieTimeIndex SetMovieTimeIndex";  
39
46
 
80
87
    // Ready!
81
88
    return(PsychError_none);
82
89
}
83
 
 
84
 
 
85
 
 
86
 
 
87
 
 
88
 
 
89
 
 
90
 
 
91
 
 
92