I am currently working on the development of a custom pipeline using BCI2000. My goal is to provide video feedback to the user. At this stage, the video should be played as-is, although in the future I plan to implement dynamic control of playback speed. For this purpose, I have referred to a previous forum thread (viewtopic.php?t=3794). So I'm using the MyModifiedVideoPlayer class previously discussed.
Specifically, I am using the CursorTask module as a template, and I am attempting to play a video at standard speed during the feedback phase. However, I am encountering an issue: the video does not play, and no error messages are displayed.
Below, I have provided the relevant code related to video playback:
Code: Select all
MyCursorTask::MyCursorTask()
{
[...]
mpVideoPlayer = new MyModifiedVideoPlayer(mrWindow, 1.0); // declared also in the header
mSpeed = 1.0;
mpVideoPlayer->SetSpeedup(mSpeed);
}
void MyCursorTask::OnInitialize(const SignalProperties& /*Input*/)
{
[...]
mrWindow.Show();
source_video = ".prog/video/myvideo.mp4";
mpVideoPlayer->SetFile(source_video);
AppLog.Screen << mpVideoPlayer->SetFile(source_video) << std::endl;
mSpeed = 1.0;
mpVideoPlayer->SetSpeedup(mSpeed);
}
void MyCursorTask::OnFeedbackEnd()
{
[...]
mpVideoPlayer->Hide();
}
void MyCursorTask::DoFeedback(const GenericSignal& ControlSignal, bool& doProgress)
{
[...]
mpVideoPlayer->Show();
mSpeed = 1.0;
mpVideoPlayer->SetSpeedup(mSpeed);
mpVideoPlayer->Play();
}
Code: Select all
AppLog.Screen << mpVideoPlayer->SetFile(source_video) << std::endl;Any assistance or suggestions you could provide would be greatly appreciated.
Thank you in advance for your support.
