Ok, I need to follow up as not everything is working as expected.
Passing:
specialFlags1 = 2 + 16;
works perfectly fine on my development machine:
Ubuntu 22.04
'3.0.19 - Flavor: Manual Install, 11-Aug-2024 21:22:37'
gst-inspect-1.0 version 1.20.3
GStreamer 1.20.3
But when I run on a PC with a haploscope:
Ubuntu 24.04
'3.0.19 - Flavor: Manual Install, 11-Aug-2024 21:22:37'
gst-inspect-1.0 version 1.24.2
GStreamer 1.24.2
I am getting an error:
...
INTERNAL PSYCHTOOLBOX ERROR
error: Psycherror_OpenGL
general description: OpenGL call returned an error
specific description: GL_INVALID_VALUE
module name: Screen
subfunction call: GetMovieImage
file name: /home/kleinerm/projects/OpenGLPsychtoolbox/Psychtoolbox-3/PsychSourceGL/Source/Common/Screen/PsychTextureSupport.c
function name: PsychCreateTexture
line number: 158
...
Error using Screen
See error message printed above.
Error in hdrmfs_stereo_video/get_frame (line 66)
tex(kk) = Screen('GetMovieImage', obj.disp.wins_unique(kk), obj.movie(kk), 1, [], 0);
complete log below.
At first, I thought it was a gstreamer issue - but the gst-play-1.0
executed from Matlab’s terminal (!gst-play-1.0 ...
) worked fine on the same movie files. SimpleMovieDemo.m
also worked fine.
When I pass instead:
specialFlags1 = 2;
the video plays on the PC with the haploscope, but it is missing the processing steps (as I use custom shaders).
When I Screen( 'DrawTexture' ...)
to a temporary texture to trigger video processing, I am getting blocky artifacts, as reported before.
I could try Screen('TransformTexture', ...)
, but I cannot work out what transformProxyPtr
is.
The complete log (note that some messages are from our software, please ignore those):
> stereo_video_demo
Loading HDRMFS geometric calibration profile from "/auto/homes/rkm38/projects/hdr_display/mfs_calibration/../hdrmfs_profiles/hdrmfs_camera_calib.mat"
Initializing display BL...
Initializing display BR...
Initializing display UL...
Initializing display UR...
Opening window for screen 2 ...
PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under Matlab 64-Bit (Version 3.0.19 - Build date: Jun 22 2024).
PTB-INFO: OS support status: Linux 6.8.0-48-generic Supported.
PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.
PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with
PTB-INFO: some restrictions. See file 'License.txt' in the Psychtoolbox root folder for the exact licensing conditions.
PTB-INFO: For information about paid support, support memberships and other commercial services, please type
PTB-INFO: 'PsychPaidSupportAndServices'.
PTB-INFO: Connected to NVidia TU116 [GeForce GTX 1650] GPU of NV-160 family with 4 display heads.
PTB-WARNING: Querying rasterbeam-position doesn't work on your setup! (Returns a constant value 0)
PTB-WARNING: This can happen if Psychtoolbox gets the mapping of connected displays to graphics card
PTB-WARNING: outputs wrong. See 'help DisplayOutputMappings' for tips on how to resolve this problem.
PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: NVIDIA GeForce RTX 4090/PCIe/SSE2 :: 4.6.0 NVIDIA 560.35.03
PTB-INFO: VBL startline = 2160 , VBL Endline = -1
PTB-INFO: Measured monitor refresh interval from VBLsync = 33.333450 ms [29.999895 Hz]. (29 valid samples taken, stddev=0.008395 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 33.333333 ms [30.000000 Hz].
PTB-INFO: Small deviations between reported values are normal and no reason to worry.
PTB-INFO: Support for OpenGL 3D graphics rendering enabled: depth-buffer and stencil buffer attached.
WARNING: Couldn't compute a reliable estimate of monitor refresh interval! Trouble with VBL syncing?!?
----- ! PTB - ERROR: SYNCHRONIZATION FAILURE ! -----
One or more internal checks (see Warnings above) indicate that synchronization
of Psychtoolbox to the vertical retrace (VBL) is not working on your setup.
This will seriously impair proper stimulus presentation and stimulus presentation timing!
Please read 'help SyncTrouble' for information about how to solve or work-around the problem.
You can force Psychtoolbox to continue, despite the severe problems, by adding the command
Screen('Preference', 'SkipSyncTests', 1); at the top of your script, if you really know what you are doing.
----- ! PTB - WARNING: SYNCHRONIZATION TROUBLE ! -----
One or more internal checks (see Warnings above) indicate that
queries of rasterbeam position are not properly working for your setup.
Psychtoolbox will work around this by using a different timing algorithm,
but it will cause Screen('Flip') to report less accurate/robust timestamps
for stimulus timing.
Read 'help BeampositionQueries' for more info and troubleshooting tips.
PTB-INFO: Psychtoolbox imaging pipeline starting up for window with requested imagingmode 1057 ...
PTB-INFO: Will use 32 bits per color component floating point framebuffer for stimulus drawing. Alpha blending should work correctly.
PTB-INFO: Will use 32 bits per color component floating point framebuffer for stimulus post-processing (if any).
Opening window for screen 1 ...
PTB-WARNING: Querying rasterbeam-position doesn't work on your setup! (Returns a constant value 0)
PTB-WARNING: This can happen if Psychtoolbox gets the mapping of connected displays to graphics card
PTB-WARNING: outputs wrong. See 'help DisplayOutputMappings' for tips on how to resolve this problem.
PTB-WARNING: Couldn't even collect one single valid flip interval sample! Sanity range checks failed!
PTB-WARNING: Could be a system bug, or a temporary timing problem. Retrying the procedure might help if
PTB-WARNING: the latter is the culprit.
WARNING: VBL Calibration run No. 1 failed. Retrying...
PTB-WARNING: Couldn't even collect one single valid flip interval sample! Sanity range checks failed!
PTB-WARNING: Could be a system bug, or a temporary timing problem. Retrying the procedure might help if
PTB-WARNING: the latter is the culprit.
WARNING: VBL Calibration run No. 2 failed. Retrying...
WARNING: Will enable VBL busywait-workaround before trying final VBL Calibration run No. 3.
WARNING: This will hopefully work-around graphics driver bugs of the GPU sync-to-retrace mechanism. Cross your fingers!
PTB-WARNING: Couldn't even collect one single valid flip interval sample! Sanity range checks failed!
PTB-WARNING: Could be a system bug, or a temporary timing problem. Retrying the procedure might help if
PTB-WARNING: the latter is the culprit.
PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: NVIDIA GeForce RTX 4090/PCIe/SSE2 :: 4.6.0 NVIDIA 560.35.03
PTB-INFO: VBL startline = 2160 , VBL Endline = -1
PTB-INFO: Measured monitor refresh interval from VBLsync = 0.000000 ms [inf Hz]. (0 valid samples taken, stddev=10000000.000000 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 16.666667 ms [60.000000 Hz].
PTB-INFO: Small deviations between reported values are normal and no reason to worry.
PTB-INFO: Support for OpenGL 3D graphics rendering enabled: depth-buffer and stencil buffer attached.
WARNING: Couldn't compute a reliable estimate of monitor refresh interval! Trouble with VBL syncing?!?
WARNING: Mismatch between measured monitor refresh interval and interval reported by operating system.
This indicates massive problems with VBL sync.
PTB-WARNING: Unable to measure monitor refresh interval! Using a fake value of 16.666667 milliseconds.
----- ! PTB - ERROR: SYNCHRONIZATION FAILURE ! -----
One or more internal checks (see Warnings above) indicate that synchronization
of Psychtoolbox to the vertical retrace (VBL) is not working on your setup.
This will seriously impair proper stimulus presentation and stimulus presentation timing!
Please read 'help SyncTrouble' for information about how to solve or work-around the problem.
You can force Psychtoolbox to continue, despite the severe problems, by adding the command
Screen('Preference', 'SkipSyncTests', 1); at the top of your script, if you really know what you are doing.
----- ! PTB - WARNING: SYNCHRONIZATION TROUBLE ! -----
One or more internal checks (see Warnings above) indicate that
queries of rasterbeam position are not properly working for your setup.
Psychtoolbox will work around this by using a different timing algorithm,
but it will cause Screen('Flip') to report less accurate/robust timestamps
for stimulus timing.
Read 'help BeampositionQueries' for more info and troubleshooting tips.
PTB-INFO: Psychtoolbox imaging pipeline starting up for window with requested imagingmode 1057 ...
PTB-INFO: Will use 32 bits per color component floating point framebuffer for stimulus drawing. Alpha blending should work correctly.
PTB-INFO: Will use 32 bits per color component floating point framebuffer for stimulus post-processing (if any).
Setting context for display BL ...
Setting context for display BR ...
Setting context for display UL ...
Setting context for display UR ...
Starting grid calibration
Starting eye-position calibration
Loading display geometry profile from: /auto/homes/rkm38/projects/hdr_display/mfs_calibration/../hdrmfs_profiles/hdrmfs_camera_calib.mat
Loading eye calibration profile from: /auto/homes/rkm38/projects/hdr_display/mfs_calibration/../eye_tracker/et_profile_test_observer
Finished grid calibration
Left eye position in RSB: [163.784 150.383 847.343] mm
Right eye position in RSB: [228.065 154.28 848.833] mm
Inter-ocular distance: 64.2806 mm
=== Keyboard controls ===
UpArrow / DownArrow - exposure
RightArrow / LeftArrow - contrast
PageDown / PageUp - change video
ESCAPE - exit
F1 (hold) - show shortcuts
/? - print shortcuts
INTERNAL PSYCHTOOLBOX ERROR
error: Psycherror_OpenGL
general description: OpenGL call returned an error
specific description: GL_INVALID_VALUE
module name: Screen
subfunction call: GetMovieImage
file name: /home/kleinerm/projects/OpenGLPsychtoolbox/Psychtoolbox-3/PsychSourceGL/Source/Common/Screen/PsychTextureSupport.c
function name: PsychCreateTexture
line number: 158
PTB-INFO: There are still 2 movies open. Screen('CloseAll') will auto-close them.
PTB-INFO: This may be fine for studies where you only use a single movie, but a large number of open
PTB-INFO: movies can be an indication that you forgot to dispose no longer needed movie objects
PTB-INFO: via a proper call to Screen('CloseMovie', moviePtr); , e.g., at the end of each trial. These
PTB-INFO: stale movies linger around and can consume significant memory and cpu ressources, causing
PTB-INFO: degraded performance, timing trouble and ultimately out of memory or out of ressource
PTB-INFO: conditions or even crashes of Matlab/Octave (in rare cases). Please check your code.
PTB-INFO: There are still 18 textures, offscreen windows or proxy windows open. Screen('CloseAll') will auto-close them.
PTB-INFO: This may be fine for studies where you only use a few textures or windows, but a large number of open
PTB-INFO: textures or offscreen windows can be an indication that you forgot to dispose no longer needed items
PTB-INFO: via a proper call to Screen('Close', [windowOrTextureIndex]); , e.g., at the end of each trial. These
PTB-INFO: stale objects linger around and can consume significant memory ressources, causing degraded performance,
PTB-INFO: timing trouble (if the system has to resort to disk paging) and ultimately out of memory conditions or
PTB-INFO: crashes. Please check your code. (Screen('Close') is a quick way to release all textures and offscreen windows)
INFO: PTB's Screen('Flip', 11) command seems to have missed the requested stimulus presentation deadline
INFO: a total of 4 times out of a total of 5 flips during this session.
INFO: This number is fairly accurate (and indicative of real timing problems in your own code or your system)
INFO: if you provided requested stimulus onset times with the 'when' argument of Screen('Flip', window [, when]);
INFO: If you called Screen('Flip', window); without the 'when' argument, this count is more of a ''mild'' indicator
INFO: of timing behaviour than a hard reliable measurement. Large numbers may indicate problems and should at least
INFO: deserve your closer attention. Cfe. 'help SyncTrouble', the FAQ section at www.psychtoolbox.org and the
INFO: examples in the PDF presentation in PsychDocumentation/Psychtoolbox3-Slides.pdf for more info and timing tips.
WARNING: This session of your experiment was run by you with the setting Screen('Preference', 'SkipSyncTests', 1).
WARNING: This means that some internal self-tests and calibrations were skipped. Your stimulus presentation timing
WARNING: may have been wrong. This is fine for development and debugging of your experiment, but for running the real
WARNING: study, please make sure to set Screen('Preference', 'SkipSyncTests', 0) for maximum accuracy and reliability.
WARNING: This session of your experiment was run by you with the setting Screen('Preference', 'SkipSyncTests', 1).
WARNING: This means that some internal self-tests and calibrations were skipped. Your stimulus presentation timing
WARNING: may have been wrong. This is fine for development and debugging of your experiment, but for running the real
WARNING: study, please make sure to set Screen('Preference', 'SkipSyncTests', 0) for maximum accuracy and reliability.
Error using Screen
See error message printed above.
Error in hdrmfs_stereo_video/get_frame (line 66)
tex(kk) = Screen('GetMovieImage', obj.disp.wins_unique(kk), obj.movie(kk), 1, [], 0);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in stereo_video_demo (line 77)
[svid, vid_tex] = svid.get_frame();