fprintf(stderr, " ($DISPLAY spec or /dev/dri/render* path)\n");
fprintf(stderr, " --http-uncompressed-video send uncompressed NV12 video to HTTP clients\n");
fprintf(stderr, " --flat-audio start with most audio processing turned off\n");
+ fprintf(stderr, " --no-flush-pbos do not explicitly signal texture data uploads\n");
+ fprintf(stderr, " (will give display corruption, but makes it\n");
+ fprintf(stderr, " possible to run with apitrace in real time)\n");
}
void parse_flags(int argc, char * const argv[])
{ "va-display", required_argument, 0, 1000 },
{ "http-uncompressed-video", no_argument, 0, 1001 },
{ "flat-audio", no_argument, 0, 1002 },
+ { "no-flush-pbos", no_argument, 0, 1003 },
{ 0, 0, 0, 0 }
};
for ( ;; ) {
case 1002:
global_flags.flat_audio = true;
break;
+ case 1003:
+ global_flags.flush_pbos = false;
+ break;
case 'h':
usage();
exit(0);
bool uncompressed_video_to_http = false;
std::string theme_filename = "theme.lua";
bool flat_audio = false;
+ bool flush_pbos = true;
};
extern Flags global_flags;
check_error();
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, pbo);
check_error();
- glFlushMappedBufferRange(GL_PIXEL_UNPACK_BUFFER, 0, video_frame.size);
- check_error();
+ if (global_flags.flush_pbos) {
+ glFlushMappedBufferRange(GL_PIXEL_UNPACK_BUFFER, 0, video_frame.size);
+ check_error();
+ }
glBindTexture(GL_TEXTURE_2D, userdata->tex_cbcr[field]);
check_error();