Fri Apr 29, 2016 6:45 am
thanks all,
+ that vancoutput example show only a blue frame 1 time right?, i only add while(1) to show that blue frame many time, but error, here some code, i dont edit more, just only add while(1)
// Enable video output
result = deckLinkOutput->EnableVideoOutput(kDisplayMode, kOutputFlag);
if(result != S_OK)
{
fprintf(stderr, "Could not enable video output - result = %08x\n", result);
goto bail;
}
while(1)
{
// Create a frame with defined format
videoFrameBlue = CreateFrame(deckLinkOutput);
// Schedule a blue frame 3 times
for(int i = 0; i < 3; i++)
{
result = deckLinkOutput->ScheduleVideoFrame(videoFrameBlue, gTotalFramesScheduled*kFrameDuration, kFrameDuration, kTimeScale);
if(result != S_OK)
{
fprintf(stderr, "Could not schedule video frame - result = %08x\n", result);
goto bail;
}
gTotalFramesScheduled ++;
}
// Start
result = deckLinkOutput->StartScheduledPlayback(0, kTimeScale, 1.0);
if(result != S_OK)
{
fprintf(stderr, "Could not start - result = %08x\n", result);
goto bail;
}
// Wait until user presses Enter
printf("Monitoring... Press <RETURN> to exit\n");
getchar();
printf("Exiting.\n");
}
i have error "Could not schedule video frame", i dont know what make this error and how to fix it.