Core rendering object—drives the capture → filter → shade → record pipeline. More...
Classes | |
| struct | MidiCode |
| struct | PlaylistNode |
Public Member Functions | |
| int | activePlaylistSize () const |
| ACView (const MXArguments &args) | |
| Construct the rendering object from parsed CLI arguments. | |
| void | appendRecordingTitleSuffix (std::ostringstream &stream) |
| void | appendSilentProgressFileSize (std::ostream &stream) const |
| Append the current encoded output size to a silent progress line. | |
| void | applyCrossfade (gl::GLWindow *win, GLuint currentTexture) |
| Render the crossfade blend for the current frame. | |
| void | autopilotRandomSwitch (gl::GLWindow *win) |
| Pick a random entry from the active playlist and apply it. | |
| void | autopilotSequentialAdvance (gl::GLWindow *win) |
| Advance to the next entry in the active playlist (wrapping). | |
| void | beginCrossfade (gl::GLWindow *win) |
| Start a crossfade transition from the current frame. | |
| void | bindPassHistoryTextures (size_t shader_index) |
| Bind history textures required by a cache-aware pass. | |
| void | convertResourcesToHdr (int w, int h) |
| One-time conversion of existing GL resources from SDR (8-bit) to HDR (16-bit) formats. | |
| virtual void | draw (gl::GLWindow *win) override |
| Called every frame: capture, GPU-filter, shade, composite, record, display overlay. | |
| void | emitSilentGraphicsProgress (bool complete) |
| Emit bounded progress updates for duration-limited headless graphics rendering. | |
| void | emitSilentVideoProgress (bool complete) |
| Emit progress for headless video rendering. | |
| void | ensureCrossfadeFBO (int width, int height) |
| Lazily create the crossfade FBO and its two textures. | |
| void | ensureHdrResources (int w, int h) |
| Lazily allocate the HDR decode/encode textures, FBOs and shader programs. | |
| void | ensurePassTargets (gl::GLWindow *win) |
| Allocate the shared fragment/compute ping-pong targets on demand. | |
| virtual void | event (gl::GLWindow *win, SDL_Event &e) override |
| Handle SDL keyboard events (shader navigation, mode toggles, etc.). | |
| void | generateRandomMultipass (gl::GLWindow *win) |
| void | generateRandomMultipassLong (gl::GLWindow *win) |
| void | generateRandomMultipassShort (gl::GLWindow *win) |
| int64_t | getFrameCount () |
| Return the current frame count (writer count or display count). | |
| std::optional< uintmax_t > | getOutputFileSizeBytes () const |
| std::string | getTimeString () |
| Format the current session time as HH:MM:SS. | |
| void | hdrReadback (GLuint src_linear_tex, int w, int h, std::vector< unsigned char > &out) |
HDR readback: run the encode pass and read 16-bit PQ-encoded RGB pixels back into out. | |
| virtual void | load (gl::GLWindow *win) override |
| Called once by the GLWindow to initialise capture, shaders, FBOs, and recording. | |
| void | maybeRandomizeAutopilotCrossfade () |
| bool | needsAsyncShutdown () |
| void | requestStop () |
| void | requestStopNoMux () |
| void | resetAutopilotInterval () |
| void | rotate_frame (cv::Mat &frame) |
| bool | rotation_swaps_dimensions () const |
| bool | runComputePass (gl::GLWindow *win, size_t shader_index, GLuint input_texture, GLuint output_texture) |
| void | runHdrDecodePass (int w, int h) |
Run the PQ/HLG -> linear BT.2020 decode pass, sampling camera_texture and writing into hdr_linear_video_texture. | |
| void | runHdrEncodePass (GLuint src_tex, int w, int h) |
Run the linear BT.2020 -> PQ/HLG encode pass from src_tex into hdr_encoded_texture. | |
| void | updateShaderNameCache () |
| Refresh the cached shader name string for the HUD overlay. | |
| void | uploadHdrFrame (const cv::Mat &rgba16) |
Upload a 16-bit-per-channel RGBA frame (from FFMpegVideoReader::readHdr()) into camera_texture. | |
| ~ACView () override | |
| Destroy the rendering object: stop threads, release GPU resources. | |
Public Attributes | |
| int | autopilot_counter = 0 |
| Frames elapsed since last autopilot switch. | |
| bool | autopilot_enabled = false |
| Toggle autopilot via SDLK_j when playlist is enabled. | |
| int | autopilot_frames = 0 |
| Frames between random switches in autopilot mode (0 = unset). | |
| int | autopilot_interval_frames = 0 |
| Active interval currently used by autopilot tick. | |
| bool | autopilot_random_crossfade = false |
| When true, autopilot picks a random crossfade shader on each switch. | |
| bool | autopilot_random_interval = false |
| When true, choose a new interval from [4, autopilot_random_timeout] after each switch. | |
| int | autopilot_random_timeout = 0 |
| Inclusive upper bound for random autopilot interval. | |
| std::mt19937 | autopilot_rng {std::random_device{}()} |
| bool | autopilot_sequential = false |
| When true, autopilot advances through the playlist in order instead of randomly (toggle via SDLK_y). | |
| std::string | cached_shader_name |
| bool | counter_disabled = false |
| mx::Model | cube |
| ac_gpu::GPUFilter * | d_filterList = nullptr |
| unsigned char ** | d_ptrList = nullptr |
| double | displayFPS = 0.0 |
| double | duration_limit = 0.0 |
| int | fpsFrameCount = 0 |
| std::chrono::steady_clock::time_point | fpsLastTime |
| size_t | frames_proc = 0 |
| gl::ShaderProgram | fshader |
| gl::ShaderProgram | fshader3d |
| float | gpu_alpha = 1.0f |
| int | gpu_alpha_dir = 1 |
| int | gpu_current_filter_index = 0 |
| bool | gpu_filter_enabled = false |
| std::vector< ac_gpu::Filter > | gpu_filters |
| bool | gpu_filtersChanged = true |
| std::unique_ptr< ac_gpu::DynamicFrameBuffer > | gpu_frame_buffer |
| int | gpu_frame_dir = 1 |
| int | gpu_frame_index = 0 |
| int | gpu_square_size = 8 |
| cv::Mat | gpuFilteredFrame |
| bool | is3d_enabled = false |
| std::string | m_file |
| double | max_size_limit_bytes = 0.0 |
| double | max_size_limit_mb = 0.0 |
| float | movementSpeed = 0.1f |
| float | mux_time_f = 0.0f |
| GLuint | muxDummyTex = 0 |
| gl::ShaderProgram | muxOverlayShader |
| gl::GLSprite | muxOverlaySprite |
| cv::Mat | newFrame |
| mx::Font | overlayFont |
| bool | playlist_enabled = false |
| std::string | playlist_file |
| int | playlist_index = 0 |
| std::vector< int > | playlist_indices |
| std::vector< PlaylistNode > | playlist_tree |
| bool | random_multipass_mode = false |
| bool | saved_pass_enabled = false |
| bool | saved_pass_enabled_before_random = false |
| std::vector< int > | saved_pass_list |
| std::vector< int > | saved_pass_list_before_random |
| size_t | saved_shader_index_before_random = 0 |
| std::chrono::steady_clock::time_point | sessionStartTime |
| bool | shader_pass_enabled = false |
| std::vector< int > | shader_pass_list |
| mx::Font | waterFont |
Private Member Functions | |
| void | beginMuxing (gl::GLWindow *win) |
| Launch the asynchronous audio-mux thread and show a progress overlay. | |
| void | cleanupMidi () |
| Close the MIDI input port and free the RtMidiIn instance. | |
| void | drawMidiOverlay (gl::GLWindow *win, mx::Font &font, int startY) |
| Draw the MIDI status overlay (active indicator, knob bars, last button). | |
| void | flushPBOs (gl::GLWindow *win) |
| Read any remaining pixels from both PBOs and enqueue them. | |
| void | initMidi (const std::string &mapFile, int deviceIndex) |
| Open a MIDI input port and load the key→action mapping file. | |
| void | injectKey (SDL_Keycode key, gl::GLWindow *win) |
| Synthesise an SDL_KEYUP event and dispatch it through event(). | |
| GLuint | loadTexture (cv::Mat &frame) |
| Create a new GL texture from a cv::Mat (BGR → RGBA upload). | |
| SDL_Keycode | midiKeyToSDL (int code) |
| Convert an ACMX2 virtual key code to an SDL_Keycode. | |
| bool | needsFileAudioMux () |
| bool | needsMux () |
| Determine if recorded-audio mux should run at shutdown. | |
| bool | needsTransferAudio () |
| Determine if source-track audio copy should run at shutdown. | |
| void | pollMidi (gl::GLWindow *win) |
| Drain all pending MIDI messages and dispatch mapped actions. | |
| void | resetAudioWarmupEnvelope () |
| Reset the startup envelope used to tame initial audio intensity. | |
| void | runFileAudioMuxSync () |
| Run ffmpeg synchronously to mux the audio file into the output video. | |
| void | runMuxSync () |
| Run ffmpeg synchronously to mux the recorded audio WAV into the video MP4. | |
| void | setupCaptureFBO (int width, int height) |
| Create the off-screen FBO used for capture/recording. | |
| void | startAudioRecordingIfNeeded () |
| Start WAV audio capture if recording is configured and not already active. | |
| void | startCaptureThread () |
| Start the background camera capture thread (camera mode only). | |
| void | startMediaTimelineIfReady () |
| Start playback and recording timing on the first valid source frame. | |
| void | startWriterThread () |
| Start the background writer thread (video recording + snapshots). | |
| void | stopCaptureThread () |
| Signal the capture thread to stop and wait for it to join. | |
| void | stopWriterThread () |
| Stop the writer thread, close the Writer, and handle audio transfer. | |
| float | updateAudioWarmupEnvelope () |
| Advance and return the startup warmup envelope in [0,1]. | |
| void | updateTexture (GLuint texture, cv::Mat &frame) |
| Update an existing GL texture with new cv::Mat data (BGR → RGBA). | |
| void | updateTextureRGBA (GLuint texture, cv::Mat &frame) |
| Update a GL texture with pre-converted RGBA data (no colour conversion). | |
Static Private Member Functions | |
| static const char * | midiKeyName (int code) |
| Map a virtual key code to a human-readable short name. | |
Private Attributes | |
| int | audio_buffer_count = 0 |
| Allocated history-array layer count. | |
| acmx2::audio::AudioEngine | audio_engine |
| std::string | audio_file_path |
| Path to the audio file used for file_audio_mode. | |
| int | audio_input_device |
| bool | audio_is_enabled = false |
| int | audio_output_device |
| std::string | audio_record_file |
| bool | audio_repeat_mode = false |
| When true, restart file audio when its samples are exhausted. | |
| bool | audio_trunc_mode = false |
| When true, stop playback when file audio samples are exhausted. | |
| float | audio_warmup_envelope = 0.0f |
| Startup fade for audio-driven uniforms/textures. | |
| std::chrono::steady_clock::time_point | audio_warmup_last_tick = std::chrono::steady_clock::now() |
| float | audio_warmup_rate = 0.5f |
| Warmup envelope slope in 1/sec (higher = faster ramp). | |
| int | cache_delay = 1 |
| int | cache_warmup_frames = 0 |
| int | camera_index = 0 |
| GLuint | camera_texture = 0 |
| float | cameraDistance = 0.0f |
| float | cameraPitch = 0.0f |
| float | cameraRotationSpeed = 5.0f |
| float | cameraYaw = 270.0f |
| cv::VideoCapture | cap |
| GLuint | captureFBO = 0 |
| std::queue< cv::Mat > | captureQueue |
| std::condition_variable | captureQueueCondVar |
| std::mutex | captureQueueMutex |
| std::atomic< bool > | captureRunning {false} |
| std::thread | captureThread |
| std::atomic< bool > | copy_audio {false} |
| std::string | crf = "23" |
| bool | crossfadeActive = false |
| True while a crossfade transition is in progress. | |
| float | crossfadeAlpha = 1.0f |
| Current blend factor (0 = old frame, 1 = new frame). | |
| float | crossfadeDuration = 0.5f |
| Duration of the crossfade transition in seconds. | |
| GLuint | crossfadeFBO = 0 |
| FBO used for the crossfade compositing pass. | |
| GLuint | crossfadePrevTexture = 0 |
| Snapshot of the previous frame used as the blend source. | |
| int | crossfadeShaderIndex = 0 |
| Active index into crossfadeShaders. | |
| std::vector< std::string > | crossfadeShaderNames |
| Display names matching crossfadeShaders by index. | |
| std::vector< gl::ShaderProgram > | crossfadeShaders |
| Available crossfade transition shaders (cycle with [ and ]). | |
| std::chrono::steady_clock::time_point | crossfadeStartTime |
| Wall-clock time the current crossfade began. | |
| GLuint | crossfadeTexture = 0 |
Colour attachment of crossfadeFBO (blended output). | |
| uint64_t | decoded_video_frame_count = 0 |
| GLuint | depthBuffer = 0 |
| bool | display_filter = false |
| gl::ShaderProgram | display_flip_shader |
| Display shader with optional Y-flip for windowed output. | |
| bool | enableWatermark = false |
| EncodeOptions | encode_opts {} |
| GLuint | fboTexture = 0 |
| FFMpegVideoReader | ffmpeg_reader |
| bool | file_audio_mode = false |
| True when audio comes from a file instead of RtAudio. | |
| std::string | filename |
| std::atomic< bool > | finished {false} |
| std::tuple< int, std::string, int > | flib |
| bool | flip_output = false |
| double | fps = 30 |
| FrameCache | frame_cache |
| unsigned int | frame_counter = 0 |
| FrameRotation | frame_rotation = FrameRotation::None |
| std::queue< FrameData > | frameQueue |
| std::atomic< uint64_t > | frames_dropped {0} |
| bool | full = false |
| std::atomic< uint64_t > | generate_all_frames {0} |
| std::string | generate_dir |
| int | generate_interval = 0 |
| bool | generate_mode = false |
| std::atomic< uint64_t > | generate_saved_counter {0} |
| int | gpu_cuda_device = 0 |
| std::string | graphic |
| cv::Mat | graphic_frame |
| gl::ShaderProgram | hdr_decode_shader |
| PQ/HLG -> linear BT.2020 fullscreen pass. | |
| gl::ShaderProgram | hdr_encode_shader |
| Linear BT.2020 -> PQ (or HLG) fullscreen pass. | |
| GLuint | hdr_encoded_fbo = 0 |
| FBO writing into hdr_encoded_texture. | |
| GLuint | hdr_encoded_texture = 0 |
| GL_RGBA16: final PQ-re-encoded output for readback. | |
| cv::Mat | hdr_frame_mat |
| Scratch CV_16UC4 RGBA frame for HDR decode. | |
| GLuint | hdr_linear_video_fbo = 0 |
| FBO writing into hdr_linear_video_texture. | |
| GLuint | hdr_linear_video_texture = 0 |
| GL_RGBA16F: PQ/HLG-decoded linear BT.2020 video. | |
| int | hdr_resource_h = 0 |
| Height of HDR intermediate/encoded textures. | |
| int | hdr_resource_w = 0 |
| Width of HDR intermediate/encoded textures. | |
| int | hdr_snapshot_state = 0 |
| int | hdr_upload_tex_h = 0 |
| Current GL size of camera_texture in HDR upload mode. | |
| int | hdr_upload_tex_w = 0 |
| Current GL size of camera_texture in HDR upload mode. | |
| int | input_hdr_trc = 0 |
| AVColorTransferCharacteristic (PQ/HLG/BT2020). | |
| bool | input_is_hdr = false |
| Active HDR pipeline for this input. | |
| bool | isFrozen = false |
| std::atomic< bool > | isMuxing {false} |
| bool | isPaused = false |
| std::map< std::pair< unsigned char, unsigned char >, int > | knobFrameCount |
| std::map< std::pair< unsigned char, unsigned char >, unsigned char > | knobPrevValue |
| std::map< std::pair< unsigned char, unsigned char >, unsigned char > | knobState |
| std::chrono::steady_clock::time_point | last_graphics_progress_emit {} |
| uint64_t | last_graphics_progress_frame = 0 |
| int | last_progress_percent = -1 |
| std::chrono::steady_clock::time_point | last_video_progress_emit {} |
| std::chrono::steady_clock::time_point | lastFrameTime = std::chrono::steady_clock::now() |
| std::string | lastMidiButton |
| std::chrono::steady_clock::time_point | lastMidiButtonTime |
| ShaderLibrary | library {&audio_engine.analyzer()} |
| std::chrono::steady_clock::time_point | media_timeline_start_time {} |
| bool | media_timeline_started = false |
| std::vector< MidiCode > | midiCodes |
| RtMidiIn * | midiIn = nullptr |
| bool | midiOpen = false |
| glm::vec3 | modelCenterOffset = glm::vec3(0.0f) |
| float | modelRenderScale = 1.0f |
| float | modelRotX = 0.0f |
| float | modelRotY = 0.0f |
| float | modelRotZ = 0.0f |
| float | modelSize = 1.0f |
| std::atomic< bool > | muxComplete {false} |
| std::thread | muxThread |
| bool | no_drop_mode = false |
| std::string | ofilename |
| bool | oscillateScale = false |
| int | pass_target_height = 0 |
| int | pass_target_width = 0 |
| GLuint | passFBO [2] = {0, 0} |
| GLuint | passTexture [2] = {0, 0} |
| GLuint | pboIds [2] = {0, 0} |
| int | pboIndex = 0 |
| int | pboNextIndex = 1 |
| std::string | png_video_dir |
| std::atomic< uint64_t > | png_video_frame_counter {0} |
| bool | png_video_mode = false |
| std::string | prefix_path |
| GLuint | preOverlayFBO = 0 |
| FBO whose color attachment is preOverlayTexture; used to save/restore fboTexture around the overlay+writer step. | |
| GLuint | preOverlayTexture = 0 |
| Snapshot of fboTexture taken before drawing the watermark/display-filter overlay, used to restore the un-watermarked image after the writer readback so the next frame's crossfade snapshot does not pick up the overlay. | |
| std::condition_variable | queueCondVar |
| std::mutex | queueMutex |
| int | raw_snapshot_state = 0 |
| bool | recording_pbo_primed = false |
| uint64_t | recording_pbo_timeline_frame [2] = {0, 0} |
| bool | recording_pbo_uses_timeline_clock [2] = {false, false} |
| bool | repeat = false |
| std::atomic< bool > | running {false} |
| bool | shaderLocked = false |
| bool | silent_mode = false |
| std::optional< cv::Size > | sizec |
| std::optional< cv::Size > | sizev |
| std::atomic< bool > | skip_audio_mux_on_exit {false} |
| SnapshotThreadPool | snapshot_pool {2} |
| int | snapshot_state = 0 |
| std::atomic< uint64_t > | snapshotOffset {0} |
| bool | source_frame_ready = false |
| bool | spectrum_scale_by_sense = false |
| When true, scale spectrum 1D buffer by audio sensitivity. | |
| SpectrumHistory | spectrumHistory {audio_engine.analyzer()} |
| Runtime-sized FFT history array. | |
| SpectrumTexture | spectrumTex {audio_engine.analyzer()} |
| 1D FFT magnitude texture for shaders. | |
| gl::GLSprite | sprite |
| TextureUploader | tex_uploader |
| bool | texture_cache = false |
| bool | texture_cache_array = false |
| int | tiff_snapshot_state = 0 |
| double | totalFrames = 0 |
| bool | use_ffmpeg_reader = false |
| bool | use_shader_cache_flag = true |
| bool | use_yuv = false |
| bool | viewRotationActive = false |
| int | waterFontSize = 12 |
| int | watermark_b = 150 |
| Watermark color blue. | |
| int | watermark_g = 0 |
| Watermark color green. | |
| int | watermark_r = 255 |
| Watermark color red. | |
| std::string | watermark_text = "LostSideDead.biz" |
| Active watermark text (overridden by –use-watermark). | |
| bool | waveActive = false |
| int | win_h = 0 |
| int | win_w = 0 |
| Writer | writer |
| std::atomic< bool > | writerRunning {false} |
| std::thread | writerThread |
Core rendering object—drives the capture → filter → shade → record pipeline.
Inherits gl::GLObject (libmx2) so it can be hosted inside a GLWindow. Manages:
ACMX2 uses four concurrency domains. The diagram below shows data flow and the synchronisation primitives that connect them.
* * ┌─────────────────────┐ * │ Capture Thread │ (camera mode only) * │ cap.read(frame) │ * │ cv::flip → push │ * │ │ * │ captureQueue │ std::queue<cv::Mat>, max 4 entries * │ captureQueueMutex │ protects the queue * │ captureQueueCondVar│ signals new frame available * │ captureRunning │ std::atomic<bool> for shutdown * └────────┬────────────┘ * │ * │ (main thread pops from captureQueue) * ▼ * ┌─────────────────────────────────────────────────────────────┐ * │ Main / GL Thread │ * │ │ * │ draw() ──── 1. Read frame from captureQueue (camera) or │ * │ │ cap.read() (video file) or clone (image) │ * │ │ 2. GPU-filter (CUDA kernels, TextureUploader) │ * │ │ 3. Upload to GL texture │ * │ │ 4. Render through ShaderLibrary (FBO) │ * │ │ 5. 3D model compositing (if enabled) │ * │ │ 6. PBO async readback (double-buffered) │ * │ │ 7. Push FrameData into frameQueue │ * │ └──── 8. Draw overlay (FPS, timer, shader name) │ * │ │ * │ frameQueue std::queue<FrameData> │ * │ queueMutex protects the queue │ * │ queueCondVar signals new frame / backpressure wait │ * │ • camera mode: drops oldest if >30 frames │ * │ • file mode: waits until queue <30 frames │ * └──────────────┬──────────────────────────────────────────────┘ * │ * │ (writer thread pops from frameQueue) * ▼ * ┌─────────────────────────────────┐ * │ Writer Thread │ * │ Dequeue FrameData │ * │ • If isSnapshot: dispatch to │ * │ SnapshotThreadPool (async │ * │ PNG write via enqueue()) │ * │ • Else: writer.write() / │ * │ writer.write_at_pts() │ * │ │ * │ writerRunning atomic<bool> │ * │ Starts only after the first │ * │ valid source frame is ready │ * └────────┬────────────────────────┘ * │ * │ (on shutdown, if audio was recorded) * ▼ * ┌─────────────────────────────────┐ * │ Mux Thread │ * │ beginMuxing() launches this │ * │ 1. Join capture + writer │ * │ 2. Close the Writer │ * │ 3. runMuxSync(): ffmpeg mux │ * │ audio WAV + video MP4 │ * │ 4. Set muxComplete = true │ * │ │ * │ isMuxing atomic<bool> │ * │ muxComplete atomic<bool> │ * └─────────────────────────────────┘ * * **Synchronisation summary:** * - `captureQueueMutex` + `captureQueueCondVar` guard the camera queue. * Max size = 4; oldest frame is dropped when full (non-blocking producer). * - `queueMutex` + `queueCondVar` guard the writer queue. * In file mode the main thread *waits* if the queue exceeds 30 frames * (back-pressure). In camera mode it drops the oldest frame instead. * - `running`, `captureRunning`, `writerRunning` are `std::atomic<bool>` * flags tested every iteration to coordinate graceful shutdown. * - `isMuxing` and `muxComplete` coordinate the post-recording audio * mux step; the main draw loop shows a "Muxing audio…" overlay while * the mux thread runs ffmpeg. * - The SnapshotThreadPool is orthogonal—its own internal mutex/condvar * manage the PNG-writing worker threads. Tasks are fire-and-forget * from the writer thread's perspective. * *
Definition at line 6554 of file ACMX2/acmx.cpp.
|
inline |
Construct the rendering object from parsed CLI arguments.
Copies capture parameters, opens the audio subsystem (optional), initialises GPU filter state (CUDA malloc for pointer/filter lists), sets up the shader pass list, loads the MIDI map file, and applies the playlist / duration settings. No OpenGL calls are made here because the GL context is not yet current—those are deferred to load().
| args | Parsed command-line arguments. |
Definition at line 7572 of file ACMX2/acmx.cpp.
References MXArguments::audio_file, MXArguments::audio_input, audio_input_device, MXArguments::audio_output, audio_output_device, audio_record_file, MXArguments::audio_warm_rate, audio_warmup_rate, cache_delay, camera_index, copy_audio, crf, display_filter, encode_opts, filename, flib, flip_output, fps, frame_cache, frame_rotation, full, generate_interval, generate_mode, gpu_cuda_device, graphic, no_drop_mode, ofilename, png_video_mode, prefix_path, MXArguments::record_audio_file, repeat, silent_mode, sizec, sizev, texture_cache, texture_cache_array, use_shader_cache_flag, watermark_b, MXArguments::watermark_b, watermark_g, MXArguments::watermark_g, watermark_r, MXArguments::watermark_r, and MXArguments::watermark_text.
Referenced by MainWindow::initCommon().
|
inlineoverride |
Destroy the rendering object: stop threads, release GPU resources.
Destruction order:
Definition at line 8573 of file ACMX2/acmx.cpp.
References audio_engine, audio_is_enabled, camera_texture, cap, captureFBO, CHECK_CUDA, SpectrumHistory::cleanup(), SpectrumTexture::cleanup(), TextureUploader::cleanup(), cleanupMidi(), acmx2::audio::AudioEngine::close(), crossfadeFBO, crossfadePrevTexture, crossfadeTexture, d_filterList, d_ptrList, depthBuffer, fboTexture, file_audio_close(), file_audio_mode, frame_cache, frameQueue, gpu_frame_buffer, FrameData::height, acmx2::audio::AudioRecorder::is_recording(), isMuxing, FrameData::isSnapshot, muxThread, needsFileAudioMux(), needsMux(), pass_target_height, pass_target_width, passFBO, passTexture, pboIds, pboNextIndex, FrameData::pixels, png_video_mode, preOverlayFBO, preOverlayTexture, queueCondVar, queueMutex, acmx2::audio::AudioEngine::recorder(), recording_pbo_primed, recording_pbo_timeline_frame, recording_pbo_uses_timeline_clock, runFileAudioMuxSync(), runMuxSync(), skip_audio_mux_on_exit, spectrumHistory, spectrumTex, acmx2::audio::AudioRecorder::stop(), stopCaptureThread(), stopWriterThread(), tex_uploader, texture_cache, FrameData::timelineFrame, FrameData::usesTimelineClock, FrameData::width, win_h, win_w, and writer.
|
inline |
Definition at line 7832 of file ACMX2/acmx.cpp.
References playlist_indices, and playlist_tree.
|
inline |
Definition at line 11161 of file ACMX2/acmx.cpp.
References getOutputFileSizeBytes(), png_video_mode, and writer.
|
inline |
Append the current encoded output size to a silent progress line.
Definition at line 11192 of file ACMX2/acmx.cpp.
References getOutputFileSizeBytes().
Referenced by emitSilentGraphicsProgress(), and emitSilentVideoProgress().
|
inline |
Render the crossfade blend for the current frame.
Computes a linear alpha from elapsed time and crossfadeDuration, then draws a full-screen quad into crossfadeFBO using the crossfadeShader. The shader mixes crossfadePrevTexture (the old frame) with currentTexture (the new frame) via the fade_alpha uniform. When the transition completes (crossfadeAlpha >= 1.0), crossfadeActive is set to false.
| win | The GL window (provides viewport dimensions). |
| currentTexture | The texture containing the newly rendered frame. |
Definition at line 8509 of file ACMX2/acmx.cpp.
References crossfadeActive, crossfadeAlpha, crossfadeDuration, crossfadeFBO, crossfadePrevTexture, crossfadeShaderIndex, crossfadeShaders, crossfadeStartTime, and sprite.
|
inline |
Pick a random entry from the active playlist and apply it.
Used by autopilot mode. Mirrors the right-arrow advance logic but selects a uniformly random index. No-op unless playlist mode is active and at least one entry exists.
| win | Active window (used for crossfade animation). |
Definition at line 8345 of file ACMX2/acmx.cpp.
References autopilot_rng, beginCrossfade(), cube, is3d_enabled, library, maybeRandomizeAutopilotCrossfade(), playlist_enabled, playlist_index, playlist_indices, playlist_tree, shader_pass_enabled, shader_pass_list, shaderLocked, sprite, and updateShaderNameCache().
|
inline |
Advance to the next entry in the active playlist (wrapping).
Used by sequential autopilot mode. Steps playlist_index forward by one and wraps to zero when the end is reached, applying the same crossfade and shader-pass updates as autopilotRandomSwitch.
| win | Active window (used for crossfade animation). |
Definition at line 8398 of file ACMX2/acmx.cpp.
References beginCrossfade(), cube, is3d_enabled, library, maybeRandomizeAutopilotCrossfade(), playlist_enabled, playlist_index, playlist_indices, playlist_tree, shader_pass_enabled, shader_pass_list, shaderLocked, sprite, and updateShaderNameCache().
|
inline |
Start a crossfade transition from the current frame.
Snapshots the current capture FBO contents into crossfadePrevTexture, resets crossfadeAlpha to zero, and records the start time so that applyCrossfade() can linearly interpolate over crossfadeDuration seconds.
| win | The GL window whose dimensions define the framebuffer size. |
Definition at line 8484 of file ACMX2/acmx.cpp.
References captureFBO, crossfadeActive, crossfadeAlpha, crossfadePrevTexture, crossfadeStartTime, and ensureCrossfadeFBO().
Referenced by autopilotRandomSwitch(), autopilotSequentialAdvance(), event(), generateRandomMultipass(), generateRandomMultipassLong(), and generateRandomMultipassShort().
|
inlineprivate |
Launch the asynchronous audio-mux thread and show a progress overlay.
Signals both capture and writer threads to stop, then spawns a new muxThread that:
While isMuxing is true, draw() renders a "Muxing audio…" overlay and skips normal frame processing. When muxComplete becomes true, draw() joins the mux thread and quits the window.
| win | GL window for the overlay display. |
Definition at line 12596 of file ACMX2/acmx.cpp.
References audio_engine, audio_file_path, audio_is_enabled, audio_record_file, captureQueueCondVar, captureRunning, captureThread, copy_audio, file_audio_mode, filename, fps, acmx2::audio::AudioRecorder::is_recording(), isMuxing, muxComplete, muxThread, ofilename, png_video_dir, png_video_frame_counter, png_video_mode, queueCondVar, acmx2::audio::AudioEngine::recorder(), repeat, runFileAudioMuxSync(), runMuxSync(), acmx2::audio::AudioRecorder::stop(), transfer_audio(), writer, writerRunning, and writerThread.
Referenced by draw().
|
inline |
Bind history textures required by a cache-aware pass.
Definition at line 7451 of file ACMX2/acmx.cpp.
References ShaderLibrary::cacheSize(), frame_cache, FrameCache::historyTexture(), ShaderLibrary::isCache2D(), FrameCache::isFull(), library, texture_cache, texture_cache_array, and FrameCache::textureAt().
Referenced by runComputePass().
|
inlineprivate |
Close the MIDI input port and free the RtMidiIn instance.
Definition at line 7132 of file ACMX2/acmx.cpp.
References midiIn, and midiOpen.
Referenced by ~ACView().
|
inline |
One-time conversion of existing GL resources from SDR (8-bit) to HDR (16-bit) formats.
Called the first time a video is detected as HDR — after load() / setupCaptureFBO() have already allocated SDR-format textures. Re-specifies the existing texture objects so no IDs change and no callers break.
camera_texture : GL_RGBA16 (PQ/HLG-encoded source)fboTexture : GL_RGBA16F (linear BT.2020 intermediate)crossfadeTexture : GL_RGBA16F (if already created)crossfadePrevTexture : GL_RGBA16F (if already created)passTexture[0..1] : deferred; allocated on demand by the shader-pass branch, which checks input_is_hdr and chooses the correct internal format at that time.Definition at line 7490 of file ACMX2/acmx.cpp.
References camera_texture, crossfadePrevTexture, crossfadeTexture, ensureHdrResources(), fboTexture, hdr_upload_tex_h, hdr_upload_tex_w, input_is_hdr, and passTexture.
Referenced by load().
|
inlineoverridevirtual |
Called every frame: capture, GPU-filter, shade, composite, record, display overlay.
This is the main rendering loop body. On each invocation:
| win | Pointer to the hosting GLWindow. |
Definition at line 9498 of file ACMX2/acmx.cpp.
References beginMuxing(), cache_delay, cache_warmup_frames, camera_texture, cap, captureQueue, captureQueueMutex, CHECK_CUDA, d_filterList, d_ptrList, decoded_video_frame_count, duration_limit, emitSilentGraphicsProgress(), emitSilentVideoProgress(), ffmpeg_reader, file_audio_has_output_clock(), file_audio_mode, file_audio_playback_time(), filename, finished, fps, frame_cache, frames_proc, fshader, fshader3d, generate_mode, gpu_alpha, gpu_alpha_dir, gpu_filter_enabled, gpu_filters, gpu_filtersChanged, gpu_frame_buffer, gpu_frame_dir, gpu_frame_index, gpu_square_size, graphic, graphic_frame, ac_dnn::hardenedAlphaMask(), hdr_frame_mat, hdr_linear_video_fbo, input_is_hdr, is3d_enabled, isFrozen, isMuxing, ac_dnn::isolateBody(), isPaused, lastFrameTime, library, max_size_limit_bytes, max_size_limit_mb, media_timeline_start_time, media_timeline_started, mux_time_f, muxComplete, muxDummyTex, muxOverlayShader, muxOverlaySprite, muxThread, needsFileAudioMux(), needsMux(), needsTransferAudio(), newFrame, no_drop_mode, ofilename, overlayFont, png_video_mode, pollMidi(), recording_pbo_primed, repeat, rotate_frame(), runHdrDecodePass(), running, shader_pass_enabled, shader_pass_list, silent_mode, skip_audio_mux_on_exit, tex_uploader, texture_cache, texture_cache_array, TextureUploader::textureID, updateTexture(), uploadHdrFrame(), use_ffmpeg_reader, writer, and writerRunning.
|
inlineprivate |
Draw the MIDI status overlay (active indicator, knob bars, last button).
Shows a green "MIDI Active" header, a bar graph for each mapped knob with its current value and direction label, and the last pressed button name with a 2-second fade-out.
| win | GL window (text rendering context). |
| font | Font for overlay text. |
| startY | Y-coordinate to begin drawing. |
Definition at line 7153 of file ACMX2/acmx.cpp.
References knobState, lastMidiButton, lastMidiButtonTime, midiCodes, midiKeyName(), and midiOpen.
|
inline |
Emit bounded progress updates for duration-limited headless graphics rendering.
Reports after approximately one second of output frames or 500 ms of wall time, whichever happens first. The duration limit provides the expected frame count and allows a final 100% update.
| complete | Force the final 100% progress update. |
Definition at line 11089 of file ACMX2/acmx.cpp.
References appendSilentProgressFileSize(), duration_limit, fps, frame_counter, graphic, last_graphics_progress_emit, last_graphics_progress_frame, silent_mode, and writer.
Referenced by draw().
|
inline |
Emit progress for headless video rendering.
When a duration limit is active, its frame boundary becomes the progress total if it occurs before source EOF. This makes a capped silent render finish at 100% instead of stopping partway through the input video's progress range.
| complete | Force the final 100% progress update. |
Definition at line 11034 of file ACMX2/acmx.cpp.
References appendSilentProgressFileSize(), duration_limit, filename, fps, frame_counter, frames_proc, last_progress_percent, last_video_progress_emit, png_video_frame_counter, png_video_mode, repeat, silent_mode, totalFrames, and writer.
Referenced by draw().
|
inline |
Lazily create the crossfade FBO and its two textures.
Allocates a framebuffer object (crossfadeFBO) with an RGBA colour attachment (crossfadeTexture) and a second texture (crossfadePrevTexture) used to store the previous frame. Subsequent calls are no-ops once the FBO has been created.
| width | Framebuffer width in pixels. |
| height | Framebuffer height in pixels. |
| mx::Exception | if the framebuffer is incomplete. |
Definition at line 8446 of file ACMX2/acmx.cpp.
References crossfadeFBO, crossfadePrevTexture, crossfadeTexture, and input_is_hdr.
Referenced by beginCrossfade().
|
inline |
Lazily allocate the HDR decode/encode textures, FBOs and shader programs.
Idempotent.
| w | Target width (matches shader pass width). |
| h | Target height. |
Definition at line 7238 of file ACMX2/acmx.cpp.
References display_flip_shader, hdr_decode_shader, hdr_encode_shader, hdr_encoded_fbo, hdr_encoded_texture, hdr_linear_video_fbo, hdr_linear_video_texture, hdr_resource_h, hdr_resource_w, input_is_hdr, kDisplayFragPassthrough, kDisplayVertFlip, kHdrDecodeFrag, kHdrEncodeFrag, and kHdrVertPassthrough.
Referenced by convertResourcesToHdr().
|
inline |
Allocate the shared fragment/compute ping-pong targets on demand.
Definition at line 7419 of file ACMX2/acmx.cpp.
References pass_target_height, pass_target_width, passFBO, and passTexture.
|
inlineoverridevirtual |
Handle SDL keyboard events (shader navigation, mode toggles, etc.).
Key bindings (SDL_KEYUP):
Key bindings (SDL_KEYDOWN):
| win | Hosting GLWindow. |
| e | The SDL event to process. |
Definition at line 11253 of file ACMX2/acmx.cpp.
References ac_gpu::AC_FILTER_MAX, acmx2::audio::AudioEngine::analyzer(), audio_engine, autopilot_counter, autopilot_enabled, autopilot_frames, autopilot_interval_frames, autopilot_random_crossfade, autopilot_random_interval, autopilot_random_timeout, autopilot_sequential, beginCrossfade(), cameraDistance, counter_disabled, crossfadeShaderIndex, crossfadeShaderNames, crossfadeShaders, cube, enableWatermark, filename, ac_gpu::filters, flib, generateRandomMultipass(), generateRandomMultipassLong(), generateRandomMultipassShort(), gpu_current_filter_index, gpu_filter_enabled, gpu_filters, gpu_filtersChanged, graphic, hdr_snapshot_state, is3d_enabled, isFrozen, isPaused, library, ac_gpu::Filter::name, oscillateScale, playlist_enabled, playlist_index, playlist_indices, playlist_tree, random_multipass_mode, raw_snapshot_state, requestStopNoMux(), resetAutopilotInterval(), saved_pass_enabled, saved_pass_enabled_before_random, saved_pass_list, saved_pass_list_before_random, saved_shader_index_before_random, acmx2::audio::AudioAnalyzer::sensitivity(), acmx2::audio::AudioAnalyzer::set_sensitivity(), shader_pass_enabled, shader_pass_list, shaderLocked, snapshot_state, spectrum_scale_by_sense, sprite, tiff_snapshot_state, updateShaderNameCache(), viewRotationActive, and waveActive.
Referenced by injectKey().
|
inlineprivate |
Read any remaining pixels from both PBOs and enqueue them.
Called during destruction to ensure the last two frames that were in-flight via double-buffered PBO readback are not lost. Each PBO is mapped, its contents copied and vertically flipped, then pushed into the writer queue.
| win | GL window (provides width/height). |
Definition at line 11872 of file ACMX2/acmx.cpp.
References frameQueue, FrameData::height, FrameData::isSnapshot, pboIds, FrameData::pixels, queueCondVar, queueMutex, and FrameData::width.
|
inline |
Definition at line 8246 of file ACMX2/acmx.cpp.
References beginCrossfade(), cube, is3d_enabled, library, shader_pass_enabled, shader_pass_list, sprite, and updateShaderNameCache().
Referenced by event().
|
inline |
Definition at line 8300 of file ACMX2/acmx.cpp.
References beginCrossfade(), cube, is3d_enabled, library, shader_pass_enabled, shader_pass_list, sprite, and updateShaderNameCache().
Referenced by event().
|
inline |
Definition at line 8274 of file ACMX2/acmx.cpp.
References beginCrossfade(), cube, is3d_enabled, library, shader_pass_enabled, shader_pass_list, sprite, and updateShaderNameCache().
Referenced by event().
|
inline |
Return the current frame count (writer count or display count).
Definition at line 11209 of file ACMX2/acmx.cpp.
References frame_counter, png_video_frame_counter, png_video_mode, and writer.
|
inline |
Definition at line 11174 of file ACMX2/acmx.cpp.
References ofilename.
Referenced by appendRecordingTitleSuffix(), and appendSilentProgressFileSize().
|
inline |
Format the current session time as HH:MM:SS.
When a writer is open the time is based on the number of frames actually written (at the configured FPS). For video file input, a percentage prefix is prepended.
Definition at line 11134 of file ACMX2/acmx.cpp.
References filename, fps, frame_counter, totalFrames, and writer.
|
inline |
HDR readback: run the encode pass and read 16-bit PQ-encoded RGB pixels back into out.
Output size is 8*w*h bytes (uint16_t per channel, RGBA).
| src_linear_tex | Texture holding the final linear BT.2020 result (typically fboTexture after the shader chain). |
| w,h | Frame dimensions. |
| out | Output byte vector, resized to 8*w*h. |
Definition at line 7550 of file ACMX2/acmx.cpp.
References hdr_encoded_texture, and runHdrEncodePass().
|
inlineprivate |
Open a MIDI input port and load the key→action mapping file.
Creates an RtMidiIn instance, opens the given device port (or port 0 as fallback), then parses the mapping file line by line. Each line maps a key1:key2 pair to a MIDI triplet {b0 b1 b2}, where key2 != 0 denotes a continuous knob (key1 = CW direction, key2 = CCW direction).
| mapFile | Path to the .midi_cfg mapping file. |
| deviceIndex | MIDI input port index (-1 for default / port 0). |
Definition at line 6792 of file ACMX2/acmx.cpp.
|
inlineprivate |
Synthesise an SDL_KEYUP event and dispatch it through event().
| key | The SDL_Keycode to inject. |
| win | The GL window that receives the event. |
Definition at line 6975 of file ACMX2/acmx.cpp.
References event().
Referenced by pollMidi().
|
inlineoverridevirtual |
Called once by the GLWindow to initialise capture, shaders, FBOs, and recording.
Performs the full OpenGL-dependent setup:
| win | Pointer to the hosting GLWindow. |
Definition at line 8764 of file ACMX2/acmx.cpp.
References cache_warmup_frames, camera_index, camera_texture, cap, CHECK_CUDA, convertResourcesToHdr(), crossfadeShaderIndex, crossfadeShaderNames, crossfadeShaders, cube, displayFPS, encode_opts, ffmpeg_reader, filename, flib, fps, fpsFrameCount, fpsLastTime, frame_cache, frame_counter, fshader, fshader3d, full, generate_dir, generate_interval, generate_mode, gpu_cuda_device, gpu_filter_enabled, gpu_filters, graphic, graphic_frame, hdr_upload_tex_h, hdr_upload_tex_w, TextureUploader::init(), input_hdr_trc, input_is_hdr, is3d_enabled, kHdrVertPassthrough, kMuxOverlayFrag, library, m_file, modelCenterOffset, modelRenderScale, modelSize, muxDummyTex, muxOverlayShader, muxOverlaySprite, no_drop_mode, ofilename, overlayFont, pboIds, playlist_file, playlist_indices, playlist_tree, png_video_dir, png_video_mode, print_open_gl_uniform_limits(), rotation_swaps_dimensions(), running, sessionStartTime, setupCaptureFBO(), ACView::PlaylistNode::shader_indices, shaderIndexForFile(), silent_mode, sizec, sizev, sortedShaderLibraryEntries(), sprite, startCaptureThread(), startWriterThread(), tex_uploader, texture_cache, texture_cache_array, TextureUploader::textureID, totalFrames, updateShaderNameCache(), use_ffmpeg_reader, use_shader_cache_flag, use_yuv, waterFont, waterFontSize, and writer.
|
inlineprivate |
Create a new GL texture from a cv::Mat (BGR → RGBA upload).
Generates a texture, converts the frame from BGR to RGBA, and uploads via glTexImage2D. Used to initialise the 8 cache textures with blank frames at startup.
| frame | Input cv::Mat (BGR, 8-bit). |
| mx::Exception | on any GL error. |
Definition at line 11977 of file ACMX2/acmx.cpp.
|
inline |
Definition at line 7842 of file ACMX2/acmx.cpp.
References autopilot_random_crossfade, autopilot_rng, crossfadeShaderIndex, and crossfadeShaders.
Referenced by autopilotRandomSwitch(), and autopilotSequentialAdvance().
|
inlinestaticprivate |
Map a virtual key code to a human-readable short name.
Virtual codes 262–267 are arrow/page keys, 32–87 are ASCII, and 500–513 are ACMX2 virtual codes for time/speed/rotation knob actions.
| code | Virtual key code from the MIDI map file. |
Definition at line 6627 of file ACMX2/acmx.cpp.
Referenced by drawMidiOverlay(), and pollMidi().
|
inlineprivate |
Convert an ACMX2 virtual key code to an SDL_Keycode.
Direct keyboard codes (e.g. 262 → SDLK_RIGHT) are mapped; virtual knob codes 504–513 return SDLK_UNKNOWN because they are handled directly in pollMidi().
| code | Virtual key code from the MIDI map. |
Definition at line 6853 of file ACMX2/acmx.cpp.
Referenced by pollMidi().
|
inline |
Definition at line 7222 of file ACMX2/acmx.cpp.
References needsFileAudioMux(), needsMux(), needsTransferAudio(), and skip_audio_mux_on_exit.
|
inlineprivate |
Check whether the output video needs file-audio muxing.
true when file_audio_mode is active, recording was explicitly requested (used as mux opt-in), and an output file is set.Definition at line 12389 of file ACMX2/acmx.cpp.
References audio_file_path, audio_record_file, file_audio_mode, and ofilename.
Referenced by draw(), needsAsyncShutdown(), and ~ACView().
|
inlineprivate |
Determine if recorded-audio mux should run at shutdown.
Returns true only when recorded audio mode is enabled, an output file is set, and either recording is still active or the recorded WAV file already exists.
Definition at line 12374 of file ACMX2/acmx.cpp.
References audio_engine, audio_is_enabled, audio_record_file, file_audio_mode, ofilename, and acmx2::audio::AudioEngine::recorder().
Referenced by draw(), needsAsyncShutdown(), and ~ACView().
|
inlineprivate |
Determine if source-track audio copy should run at shutdown.
This applies to non-repeating video-file input with --copy-audio.
Definition at line 12387 of file ACMX2/acmx.cpp.
References copy_audio, filename, repeat, and writer.
Referenced by draw(), and needsAsyncShutdown().
|
inlineprivate |
Drain all pending MIDI messages and dispatch mapped actions.
Called at the top of every draw() frame. Button presses fire immediately via injectKey(); continuous knobs update knobState and are rate-limited by a velocity-sensitive frame-skip counter. Knob distance from centre (64) controls speed: far = every frame, near-centre = every ~16 frames. Pitch/Yaw/Roll knobs use delta from the previous value to determine direction.
| win | GL window for injecting key events. |
Definition at line 6995 of file ACMX2/acmx.cpp.
References cameraRotationSpeed, ShaderLibrary::decTimeSpeed(), ShaderLibrary::incTimeSpeed(), injectKey(), knobFrameCount, knobPrevValue, knobState, lastMidiButton, lastMidiButtonTime, library, midiCodes, midiIn, midiKeyName(), midiKeyToSDL(), midiOpen, modelRenderScale, modelRotX, modelRotY, modelRotZ, and ShaderLibrary::setMidiSlider().
Referenced by draw().
|
inline |
Definition at line 7217 of file ACMX2/acmx.cpp.
References running.
|
inline |
Definition at line 7218 of file ACMX2/acmx.cpp.
References running, and skip_audio_mux_on_exit.
Referenced by event().
|
inlineprivate |
Reset the startup envelope used to tame initial audio intensity.
Definition at line 6574 of file ACMX2/acmx.cpp.
References audio_warmup_envelope, and audio_warmup_last_tick.
Referenced by startMediaTimelineIfReady().
|
inline |
Definition at line 7821 of file ACMX2/acmx.cpp.
References autopilot_frames, autopilot_interval_frames, autopilot_random_interval, autopilot_random_timeout, and autopilot_rng.
Referenced by event().
|
inline |
Definition at line 9424 of file ACMX2/acmx.cpp.
References Clockwise90, Counterclockwise90, frame_rotation, input_is_hdr, and None.
Referenced by draw().
|
inline |
Definition at line 9422 of file ACMX2/acmx.cpp.
References Clockwise90, Counterclockwise90, and frame_rotation.
Referenced by load().
|
inline |
Definition at line 7467 of file ACMX2/acmx.cpp.
References bindPassHistoryTextures(), ShaderLibrary::dispatchCompute2D(), and library.
|
inlineprivate |
Run ffmpeg synchronously to mux the audio file into the output video.
Copies the video stream from the output file and encodes the audio file track as AAC 192 kbps. Output is always limited to the shorter stream. The video timeline is also capped to the original source-video duration when that duration is known, preventing a longer audio file or repeated/queued tail frame from extending the result. The result is written to a temporary file which replaces the original on success.
Definition at line 12502 of file ACMX2/acmx.cpp.
References audio_file_path, audio_repeat_mode, file_audio_mode, file_audio_source_paths(), filename, fps, ofilename, totalFrames, and writer.
Referenced by beginMuxing(), and ~ACView().
|
inline |
Run the PQ/HLG -> linear BT.2020 decode pass, sampling camera_texture and writing into hdr_linear_video_texture.
The sprite quad is re-used so the pixel coverage matches the rest of the pipeline. After this call, user shaders should sample hdr_linear_video_texture (via sampleSourceTextureForHdr()).
Definition at line 7323 of file ACMX2/acmx.cpp.
References camera_texture, hdr_decode_shader, hdr_linear_video_fbo, input_hdr_trc, input_is_hdr, and sprite.
Referenced by draw().
|
inline |
Run the linear BT.2020 -> PQ/HLG encode pass from src_tex into hdr_encoded_texture.
Call this just before the PBO readback.
Definition at line 7357 of file ACMX2/acmx.cpp.
References hdr_encode_shader, hdr_encoded_fbo, input_hdr_trc, input_is_hdr, and sprite.
Referenced by hdrReadback().
|
inlineprivate |
Run ffmpeg synchronously to mux the recorded audio WAV into the video MP4.
Builds an ffmpeg command line that copies the video stream, encodes the audio as AAC 192 kbps, and trims to the video duration. The output is written to a temporary file which replaces the original on success.
Called either from the mux thread (beginMuxing) or directly from the destructor when no mux thread was launched.
Definition at line 12411 of file ACMX2/acmx.cpp.
References audio_engine, audio_is_enabled, audio_record_file, filename, fps, graphic, no_drop_mode, ofilename, acmx2::audio::AudioEngine::recorder(), acmx2::audio::AudioRecorder::stop(), and writer.
Referenced by beginMuxing(), and ~ACView().
|
inlineprivate |
Create the off-screen FBO used for capture/recording.
Allocates a GL_RGBA colour texture and a depth renderbuffer, both sized to the requested dimensions, and attaches them to a new framebuffer. The capture FBO is the target of all shader rendering; its colour attachment (fboTexture) is then blitted to the default framebuffer and read back via PBOs.
| width | FBO width in pixels. |
| height | FBO height in pixels. |
| mx::Exception | if the FBO completeness check fails. |
Definition at line 11920 of file ACMX2/acmx.cpp.
References captureFBO, depthBuffer, fboTexture, preOverlayFBO, preOverlayTexture, win_h, and win_w.
Referenced by load().
|
inlineprivate |
Start WAV audio capture if recording is configured and not already active.
Called when the first valid source frame starts the shared media timeline so captured audio and encoded video have the same origin.
Definition at line 12333 of file ACMX2/acmx.cpp.
References acmx2::audio::AudioEngine::analyzer(), audio_engine, audio_is_enabled, audio_record_file, file_audio_mode, acmx2::audio::AudioEngine::input_channels(), acmx2::audio::AudioEngine::recorder(), and acmx2::audio::AudioAnalyzer::sample_rate().
Referenced by startMediaTimelineIfReady().
|
inlineprivate |
Start the background camera capture thread (camera mode only).
Spawns a std::thread that continuously calls cap.read() and pushes the flipped frame into captureQueue. The queue is capped at 4 entries; when full the oldest frame is dropped so the capture thread never blocks. The main thread pops from this queue inside draw() under captureQueueMutex.
The thread exits when captureRunning is set to false or a read failure occurs.
Definition at line 12057 of file ACMX2/acmx.cpp.
References cap, captureQueue, captureQueueCondVar, captureQueueMutex, captureRunning, captureThread, and running.
Referenced by load().
|
inlineprivate |
Start playback and recording timing on the first valid source frame.
Writer setup, shader compilation, and camera startup can all render before an input frame exists. This one-shot gate prevents those draws from advancing file audio or entering the video writer.
Definition at line 12351 of file ACMX2/acmx.cpp.
References frames_proc, media_timeline_start_time, media_timeline_started, resetAudioWarmupEnvelope(), source_frame_ready, and startAudioRecordingIfNeeded().
|
inlineprivate |
Start the background writer thread (video recording + snapshots).
Spawns a std::thread that dequeues FrameData from frameQueue and either:
The thread blocks on queueCondVar when the queue is empty. It exits when writerRunning is set to false and the queue is drained.
Definition at line 12135 of file ACMX2/acmx.cpp.
References SnapshotThreadPool::enqueue(), filename, frameQueue, generate_all_frames, generate_dir, generate_interval, generate_mode, generate_saved_counter, graphic, FrameData::hdrTrc, FrameData::height, FrameData::isHdr, FrameData::isRawSnapshot, FrameData::isSnapshot, FrameData::isTiffSnapshot, FrameData::isWebPSnapshot, FrameData::pixels, png_video_dir, png_video_frame_counter, png_video_mode, prefix_path, queueCondVar, queueMutex, snapshot_pool, snapshotOffset, FrameData::timelineFrame, FrameData::usesTimelineClock, FrameData::width, writer, writerRunning, and writerThread.
Referenced by load().
|
inlineprivate |
Signal the capture thread to stop and wait for it to join.
Sets captureRunning = false, wakes the condition variable (in case the thread is waiting), and joins the thread.
Definition at line 12111 of file ACMX2/acmx.cpp.
References captureQueueCondVar, captureRunning, and captureThread.
Referenced by ~ACView().
|
inlineprivate |
Stop the writer thread, close the Writer, and handle audio transfer.
Sets writerRunning = false, wakes the condition variable, joins the writer thread, then closes the Writer (which flushes the MP4 container trailer). Logs the total duration and frame count. If copy_audio is set and a video file was the input, the audio track is copied from the input to the output via transfer_audio(). Any active audio recording is stopped.
Definition at line 12656 of file ACMX2/acmx.cpp.
References audio_engine, audio_is_enabled, copy_audio, filename, fps, generate_dir, generate_mode, generate_saved_counter, acmx2::audio::AudioRecorder::is_recording(), ofilename, png_video_dir, png_video_frame_counter, png_video_mode, queueCondVar, acmx2::audio::AudioEngine::recorder(), repeat, skip_audio_mux_on_exit, acmx2::audio::AudioRecorder::stop(), transfer_audio(), writer, writerRunning, and writerThread.
Referenced by ~ACView().
|
inlineprivate |
Advance and return the startup warmup envelope in [0,1].
Definition at line 6580 of file ACMX2/acmx.cpp.
References audio_is_enabled, audio_warmup_envelope, audio_warmup_last_tick, and audio_warmup_rate.
|
inline |
Refresh the cached shader name string for the HUD overlay.
Called whenever the active shader or pass list changes so that the overlay does not need to rebuild the string every frame.
Definition at line 8334 of file ACMX2/acmx.cpp.
References cached_shader_name, library, shader_pass_enabled, and shader_pass_list.
Referenced by autopilotRandomSwitch(), autopilotSequentialAdvance(), event(), generateRandomMultipass(), generateRandomMultipassLong(), generateRandomMultipassShort(), and load().
|
inlineprivate |
Update an existing GL texture with new cv::Mat data (BGR → RGBA).
Uses glTexSubImage2D when dimensions match (fast path) or falls back to glTexImage2D when the frame size has changed (reallocates the texture storage).
| texture | GL texture ID to update. |
| frame | New frame (BGR, 8-bit). |
Definition at line 12013 of file ACMX2/acmx.cpp.
Referenced by draw().
|
inlineprivate |
Update a GL texture with pre-converted RGBA data (no colour conversion).
Faster than updateTexture() when the frame is already RGBA. Does not handle size changes—caller must ensure dimensions match.
| texture | GL texture ID. |
| frame | cv::Mat in RGBA format. |
Definition at line 12037 of file ACMX2/acmx.cpp.
|
inline |
Upload a 16-bit-per-channel RGBA frame (from FFMpegVideoReader::readHdr()) into camera_texture.
The texture must have been allocated as GL_RGBA16 (done during HDR resource init).
Definition at line 7392 of file ACMX2/acmx.cpp.
References camera_texture, hdr_upload_tex_h, and hdr_upload_tex_w.
Referenced by draw().
|
private |
Allocated history-array layer count.
Definition at line 6563 of file ACMX2/acmx.cpp.
|
private |
Definition at line 6560 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), event(), needsMux(), runMuxSync(), startAudioRecordingIfNeeded(), stopWriterThread(), and ~ACView().
|
private |
Path to the audio file used for file_audio_mode.
Definition at line 6569 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), needsFileAudioMux(), and runFileAudioMuxSync().
|
private |
Definition at line 6557 of file ACMX2/acmx.cpp.
Referenced by ACView().
|
private |
Definition at line 6556 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), needsMux(), runMuxSync(), startAudioRecordingIfNeeded(), stopWriterThread(), updateAudioWarmupEnvelope(), and ~ACView().
|
private |
Definition at line 6558 of file ACMX2/acmx.cpp.
Referenced by ACView().
|
private |
Definition at line 6559 of file ACMX2/acmx.cpp.
Referenced by ACView(), beginMuxing(), needsFileAudioMux(), needsMux(), runMuxSync(), and startAudioRecordingIfNeeded().
|
private |
When true, restart file audio when its samples are exhausted.
Definition at line 6571 of file ACMX2/acmx.cpp.
Referenced by runFileAudioMuxSync().
|
private |
When true, stop playback when file audio samples are exhausted.
Definition at line 6570 of file ACMX2/acmx.cpp.
|
private |
Startup fade for audio-driven uniforms/textures.
Definition at line 6564 of file ACMX2/acmx.cpp.
Referenced by resetAudioWarmupEnvelope(), and updateAudioWarmupEnvelope().
|
private |
Definition at line 6566 of file ACMX2/acmx.cpp.
Referenced by resetAudioWarmupEnvelope(), and updateAudioWarmupEnvelope().
|
private |
Warmup envelope slope in 1/sec (higher = faster ramp).
Definition at line 6565 of file ACMX2/acmx.cpp.
Referenced by ACView(), and updateAudioWarmupEnvelope().
| int ACView::autopilot_counter = 0 |
Frames elapsed since last autopilot switch.
Definition at line 7808 of file ACMX2/acmx.cpp.
Referenced by event().
| bool ACView::autopilot_enabled = false |
Toggle autopilot via SDLK_j when playlist is enabled.
Definition at line 7806 of file ACMX2/acmx.cpp.
Referenced by event().
| int ACView::autopilot_frames = 0 |
Frames between random switches in autopilot mode (0 = unset).
Definition at line 7805 of file ACMX2/acmx.cpp.
Referenced by event(), and resetAutopilotInterval().
| int ACView::autopilot_interval_frames = 0 |
Active interval currently used by autopilot tick.
Definition at line 7811 of file ACMX2/acmx.cpp.
Referenced by event(), and resetAutopilotInterval().
| bool ACView::autopilot_random_crossfade = false |
When true, autopilot picks a random crossfade shader on each switch.
Definition at line 7812 of file ACMX2/acmx.cpp.
Referenced by event(), and maybeRandomizeAutopilotCrossfade().
| bool ACView::autopilot_random_interval = false |
When true, choose a new interval from [4, autopilot_random_timeout] after each switch.
Definition at line 7809 of file ACMX2/acmx.cpp.
Referenced by event(), and resetAutopilotInterval().
| int ACView::autopilot_random_timeout = 0 |
Inclusive upper bound for random autopilot interval.
Definition at line 7810 of file ACMX2/acmx.cpp.
Referenced by event(), and resetAutopilotInterval().
| std::mt19937 ACView::autopilot_rng {std::random_device{}()} |
Definition at line 7813 of file ACMX2/acmx.cpp.
Referenced by autopilotRandomSwitch(), maybeRandomizeAutopilotCrossfade(), and resetAutopilotInterval().
| bool ACView::autopilot_sequential = false |
When true, autopilot advances through the playlist in order instead of randomly (toggle via SDLK_y).
Definition at line 7807 of file ACMX2/acmx.cpp.
Referenced by event().
|
private |
Definition at line 11799 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11800 of file ACMX2/acmx.cpp.
| std::string ACView::cached_shader_name |
Definition at line 7794 of file ACMX2/acmx.cpp.
Referenced by updateShaderNameCache().
|
private |
Definition at line 11722 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11744 of file ACMX2/acmx.cpp.
Referenced by convertResourcesToHdr(), draw(), load(), runHdrDecodePass(), uploadHdrFrame(), and ~ACView().
|
private |
Definition at line 11821 of file ACMX2/acmx.cpp.
Referenced by event().
|
private |
Definition at line 11816 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11817 of file ACMX2/acmx.cpp.
Referenced by pollMidi().
|
private |
Definition at line 11815 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11739 of file ACMX2/acmx.cpp.
Referenced by draw(), load(), startCaptureThread(), and ~ACView().
|
private |
Definition at line 11745 of file ACMX2/acmx.cpp.
Referenced by beginCrossfade(), setupCaptureFBO(), and ~ACView().
|
private |
Definition at line 11792 of file ACMX2/acmx.cpp.
Referenced by draw(), and startCaptureThread().
|
private |
Definition at line 11794 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), startCaptureThread(), and stopCaptureThread().
|
private |
Definition at line 11793 of file ACMX2/acmx.cpp.
Referenced by draw(), and startCaptureThread().
|
private |
Definition at line 11786 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), startCaptureThread(), and stopCaptureThread().
|
private |
Definition at line 11791 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), startCaptureThread(), and stopCaptureThread().
|
private |
Definition at line 11810 of file ACMX2/acmx.cpp.
Referenced by ACView(), beginMuxing(), needsTransferAudio(), and stopWriterThread().
| bool ACView::counter_disabled = false |
Definition at line 8555 of file ACMX2/acmx.cpp.
Referenced by event().
|
private |
Definition at line 11718 of file ACMX2/acmx.cpp.
Referenced by ACView().
|
private |
True while a crossfade transition is in progress.
Definition at line 11781 of file ACMX2/acmx.cpp.
Referenced by applyCrossfade(), and beginCrossfade().
|
private |
Current blend factor (0 = old frame, 1 = new frame).
Definition at line 11780 of file ACMX2/acmx.cpp.
Referenced by applyCrossfade(), and beginCrossfade().
|
private |
Duration of the crossfade transition in seconds.
Definition at line 11782 of file ACMX2/acmx.cpp.
Referenced by applyCrossfade().
|
private |
FBO used for the crossfade compositing pass.
Definition at line 11754 of file ACMX2/acmx.cpp.
Referenced by applyCrossfade(), ensureCrossfadeFBO(), and ~ACView().
|
private |
Snapshot of the previous frame used as the blend source.
Definition at line 11756 of file ACMX2/acmx.cpp.
Referenced by applyCrossfade(), beginCrossfade(), convertResourcesToHdr(), ensureCrossfadeFBO(), and ~ACView().
|
private |
Active index into crossfadeShaders.
Definition at line 11779 of file ACMX2/acmx.cpp.
Referenced by applyCrossfade(), event(), load(), and maybeRandomizeAutopilotCrossfade().
|
private |
Display names matching crossfadeShaders by index.
Definition at line 11778 of file ACMX2/acmx.cpp.
|
private |
Available crossfade transition shaders (cycle with [ and ]).
Definition at line 11777 of file ACMX2/acmx.cpp.
Referenced by applyCrossfade(), event(), load(), and maybeRandomizeAutopilotCrossfade().
|
private |
Wall-clock time the current crossfade began.
Definition at line 11783 of file ACMX2/acmx.cpp.
Referenced by applyCrossfade(), and beginCrossfade().
|
private |
Colour attachment of crossfadeFBO (blended output).
Definition at line 11755 of file ACMX2/acmx.cpp.
Referenced by convertResourcesToHdr(), ensureCrossfadeFBO(), and ~ACView().
| mx::Model ACView::cube |
Definition at line 8742 of file ACMX2/acmx.cpp.
Referenced by autopilotRandomSwitch(), autopilotSequentialAdvance(), event(), generateRandomMultipass(), generateRandomMultipassLong(), generateRandomMultipassShort(), and load().
| ac_gpu::GPUFilter* ACView::d_filterList = nullptr |
Definition at line 7785 of file ACMX2/acmx.cpp.
| unsigned char** ACView::d_ptrList = nullptr |
Definition at line 7784 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11808 of file ACMX2/acmx.cpp.
Referenced by draw().
|
private |
Definition at line 11749 of file ACMX2/acmx.cpp.
Referenced by setupCaptureFBO(), and ~ACView().
|
private |
Definition at line 11850 of file ACMX2/acmx.cpp.
Referenced by ACView().
|
private |
Display shader with optional Y-flip for windowed output.
Definition at line 11775 of file ACMX2/acmx.cpp.
Referenced by ensureHdrResources().
| double ACView::displayFPS = 0.0 |
Definition at line 8552 of file ACMX2/acmx.cpp.
Referenced by load().
| double ACView::duration_limit = 0.0 |
Definition at line 7816 of file ACMX2/acmx.cpp.
Referenced by draw(), emitSilentGraphicsProgress(), and emitSilentVideoProgress().
|
private |
Definition at line 11849 of file ACMX2/acmx.cpp.
Referenced by event().
|
private |
Definition at line 11719 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11746 of file ACMX2/acmx.cpp.
Referenced by convertResourcesToHdr(), setupCaptureFBO(), and ~ACView().
|
private |
Definition at line 11740 of file ACMX2/acmx.cpp.
|
private |
True when audio comes from a file instead of RtAudio.
Definition at line 6568 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), draw(), needsFileAudioMux(), needsMux(), runFileAudioMuxSync(), startAudioRecordingIfNeeded(), and ~ACView().
|
private |
Definition at line 11721 of file ACMX2/acmx.cpp.
Referenced by ACView(), beginMuxing(), draw(), emitSilentVideoProgress(), event(), getTimeString(), load(), needsTransferAudio(), runFileAudioMuxSync(), runMuxSync(), startWriterThread(), and stopWriterThread().
|
private |
Definition at line 11809 of file ACMX2/acmx.cpp.
Referenced by draw().
|
private |
Definition at line 11723 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11838 of file ACMX2/acmx.cpp.
Referenced by ACView().
|
private |
Definition at line 11731 of file ACMX2/acmx.cpp.
Referenced by ACView(), beginMuxing(), draw(), emitSilentGraphicsProgress(), emitSilentVideoProgress(), getTimeString(), load(), runFileAudioMuxSync(), runMuxSync(), and stopWriterThread().
| int ACView::fpsFrameCount = 0 |
Definition at line 8553 of file ACMX2/acmx.cpp.
Referenced by load().
| std::chrono::steady_clock::time_point ACView::fpsLastTime |
Definition at line 8554 of file ACMX2/acmx.cpp.
Referenced by load().
|
private |
Definition at line 11796 of file ACMX2/acmx.cpp.
Referenced by ACView(), bindPassHistoryTextures(), draw(), load(), and ~ACView().
|
private |
Definition at line 11717 of file ACMX2/acmx.cpp.
Referenced by emitSilentGraphicsProgress(), emitSilentVideoProgress(), getFrameCount(), getTimeString(), and load().
|
private |
Definition at line 11839 of file ACMX2/acmx.cpp.
Referenced by ACView(), rotate_frame(), and rotation_swaps_dimensions().
|
private |
Definition at line 11788 of file ACMX2/acmx.cpp.
Referenced by flushPBOs(), startWriterThread(), and ~ACView().
|
private |
Definition at line 11858 of file ACMX2/acmx.cpp.
| size_t ACView::frames_proc = 0 |
Definition at line 7817 of file ACMX2/acmx.cpp.
Referenced by draw(), emitSilentVideoProgress(), and startMediaTimelineIfReady().
| gl::ShaderProgram ACView::fshader |
Definition at line 8743 of file ACMX2/acmx.cpp.
| gl::ShaderProgram ACView::fshader3d |
Definition at line 8743 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11733 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11846 of file ACMX2/acmx.cpp.
Referenced by startWriterThread().
|
private |
Definition at line 11845 of file ACMX2/acmx.cpp.
Referenced by load(), startWriterThread(), and stopWriterThread().
|
private |
Definition at line 11844 of file ACMX2/acmx.cpp.
Referenced by ACView(), load(), and startWriterThread().
|
private |
Definition at line 11843 of file ACMX2/acmx.cpp.
Referenced by ACView(), draw(), load(), startWriterThread(), and stopWriterThread().
|
private |
Definition at line 11847 of file ACMX2/acmx.cpp.
Referenced by startWriterThread(), and stopWriterThread().
| float ACView::gpu_alpha = 1.0f |
Definition at line 7787 of file ACMX2/acmx.cpp.
Referenced by draw().
| int ACView::gpu_alpha_dir = 1 |
Definition at line 7788 of file ACMX2/acmx.cpp.
Referenced by draw().
|
private |
Definition at line 11829 of file ACMX2/acmx.cpp.
| int ACView::gpu_current_filter_index = 0 |
Definition at line 7775 of file ACMX2/acmx.cpp.
Referenced by event().
| bool ACView::gpu_filter_enabled = false |
Definition at line 7773 of file ACMX2/acmx.cpp.
| std::vector<ac_gpu::Filter> ACView::gpu_filters |
Definition at line 7774 of file ACMX2/acmx.cpp.
| bool ACView::gpu_filtersChanged = true |
Definition at line 7786 of file ACMX2/acmx.cpp.
| std::unique_ptr<ac_gpu::DynamicFrameBuffer> ACView::gpu_frame_buffer |
Definition at line 7776 of file ACMX2/acmx.cpp.
| int ACView::gpu_frame_dir = 1 |
Definition at line 7791 of file ACMX2/acmx.cpp.
Referenced by draw().
| int ACView::gpu_frame_index = 0 |
Definition at line 7790 of file ACMX2/acmx.cpp.
Referenced by draw().
| int ACView::gpu_square_size = 8 |
Definition at line 7789 of file ACMX2/acmx.cpp.
Referenced by draw().
| cv::Mat ACView::gpuFilteredFrame |
Definition at line 7783 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11721 of file ACMX2/acmx.cpp.
Referenced by ACView(), draw(), emitSilentGraphicsProgress(), event(), load(), runMuxSync(), and startWriterThread().
|
private |
Definition at line 11742 of file ACMX2/acmx.cpp.
|
private |
PQ/HLG -> linear BT.2020 fullscreen pass.
Definition at line 11773 of file ACMX2/acmx.cpp.
Referenced by ensureHdrResources(), and runHdrDecodePass().
|
private |
Linear BT.2020 -> PQ (or HLG) fullscreen pass.
Definition at line 11774 of file ACMX2/acmx.cpp.
Referenced by ensureHdrResources(), and runHdrEncodePass().
|
private |
FBO writing into hdr_encoded_texture.
Definition at line 11772 of file ACMX2/acmx.cpp.
Referenced by ensureHdrResources(), and runHdrEncodePass().
|
private |
GL_RGBA16: final PQ-re-encoded output for readback.
Definition at line 11771 of file ACMX2/acmx.cpp.
Referenced by ensureHdrResources(), and hdrReadback().
|
private |
Scratch CV_16UC4 RGBA frame for HDR decode.
Definition at line 11776 of file ACMX2/acmx.cpp.
Referenced by draw().
|
private |
FBO writing into hdr_linear_video_texture.
Definition at line 11770 of file ACMX2/acmx.cpp.
Referenced by draw(), ensureHdrResources(), and runHdrDecodePass().
|
private |
GL_RGBA16F: PQ/HLG-decoded linear BT.2020 video.
Definition at line 11769 of file ACMX2/acmx.cpp.
Referenced by ensureHdrResources().
|
private |
Height of HDR intermediate/encoded textures.
Definition at line 11768 of file ACMX2/acmx.cpp.
Referenced by ensureHdrResources().
|
private |
Width of HDR intermediate/encoded textures.
Definition at line 11767 of file ACMX2/acmx.cpp.
Referenced by ensureHdrResources().
|
private |
Definition at line 11735 of file ACMX2/acmx.cpp.
Referenced by event().
|
private |
Current GL size of camera_texture in HDR upload mode.
Definition at line 11766 of file ACMX2/acmx.cpp.
Referenced by convertResourcesToHdr(), load(), and uploadHdrFrame().
|
private |
Current GL size of camera_texture in HDR upload mode.
Definition at line 11765 of file ACMX2/acmx.cpp.
Referenced by convertResourcesToHdr(), load(), and uploadHdrFrame().
|
private |
AVColorTransferCharacteristic (PQ/HLG/BT2020).
Definition at line 11764 of file ACMX2/acmx.cpp.
Referenced by load(), runHdrDecodePass(), and runHdrEncodePass().
|
private |
Active HDR pipeline for this input.
Definition at line 11763 of file ACMX2/acmx.cpp.
Referenced by convertResourcesToHdr(), draw(), ensureCrossfadeFBO(), ensureHdrResources(), load(), rotate_frame(), runHdrDecodePass(), and runHdrEncodePass().
| bool ACView::is3d_enabled = false |
Definition at line 7757 of file ACMX2/acmx.cpp.
Referenced by autopilotRandomSwitch(), autopilotSequentialAdvance(), draw(), event(), generateRandomMultipass(), generateRandomMultipassLong(), generateRandomMultipassShort(), and load().
|
private |
Definition at line 7203 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11812 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), draw(), and ~ACView().
|
private |
Definition at line 7202 of file ACMX2/acmx.cpp.
|
private |
Definition at line 6612 of file ACMX2/acmx.cpp.
Referenced by pollMidi().
|
private |
Definition at line 6610 of file ACMX2/acmx.cpp.
Referenced by pollMidi().
|
private |
Definition at line 6608 of file ACMX2/acmx.cpp.
Referenced by drawMidiOverlay(), and pollMidi().
|
private |
Definition at line 11805 of file ACMX2/acmx.cpp.
Referenced by emitSilentGraphicsProgress().
|
private |
Definition at line 11804 of file ACMX2/acmx.cpp.
Referenced by emitSilentGraphicsProgress().
|
private |
Definition at line 11848 of file ACMX2/acmx.cpp.
Referenced by emitSilentVideoProgress().
|
private |
Definition at line 11806 of file ACMX2/acmx.cpp.
Referenced by emitSilentVideoProgress().
|
private |
Definition at line 11795 of file ACMX2/acmx.cpp.
Referenced by draw().
|
private |
Definition at line 6614 of file ACMX2/acmx.cpp.
Referenced by drawMidiOverlay(), and pollMidi().
|
private |
Definition at line 6615 of file ACMX2/acmx.cpp.
Referenced by drawMidiOverlay(), and pollMidi().
|
private |
Definition at line 11726 of file ACMX2/acmx.cpp.
Referenced by autopilotRandomSwitch(), autopilotSequentialAdvance(), bindPassHistoryTextures(), draw(), event(), generateRandomMultipass(), generateRandomMultipassLong(), generateRandomMultipassShort(), load(), pollMidi(), runComputePass(), and updateShaderNameCache().
| std::string ACView::m_file |
Definition at line 8744 of file ACMX2/acmx.cpp.
Referenced by load().
| double ACView::max_size_limit_bytes = 0.0 |
Definition at line 7819 of file ACMX2/acmx.cpp.
Referenced by draw().
| double ACView::max_size_limit_mb = 0.0 |
Definition at line 7818 of file ACMX2/acmx.cpp.
Referenced by draw().
|
private |
Definition at line 11803 of file ACMX2/acmx.cpp.
Referenced by draw(), and startMediaTimelineIfReady().
|
private |
Definition at line 11802 of file ACMX2/acmx.cpp.
Referenced by draw(), and startMediaTimelineIfReady().
|
private |
Definition at line 6606 of file ACMX2/acmx.cpp.
Referenced by drawMidiOverlay(), initMidi(), and pollMidi().
|
private |
Definition at line 6599 of file ACMX2/acmx.cpp.
Referenced by cleanupMidi(), initMidi(), and pollMidi().
|
private |
Definition at line 6600 of file ACMX2/acmx.cpp.
Referenced by cleanupMidi(), drawMidiOverlay(), initMidi(), and pollMidi().
|
private |
Definition at line 11824 of file ACMX2/acmx.cpp.
Referenced by load().
|
private |
Definition at line 11823 of file ACMX2/acmx.cpp.
Referenced by load(), and pollMidi().
|
private |
Definition at line 11825 of file ACMX2/acmx.cpp.
Referenced by pollMidi().
|
private |
Definition at line 11826 of file ACMX2/acmx.cpp.
Referenced by pollMidi().
|
private |
Definition at line 11827 of file ACMX2/acmx.cpp.
Referenced by pollMidi().
|
private |
Definition at line 11822 of file ACMX2/acmx.cpp.
Referenced by load().
| float ACView::movementSpeed = 0.1f |
Definition at line 9474 of file ACMX2/acmx.cpp.
| float ACView::mux_time_f = 0.0f |
Definition at line 8550 of file ACMX2/acmx.cpp.
Referenced by draw().
|
private |
Definition at line 11813 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), and draw().
| GLuint ACView::muxDummyTex = 0 |
Definition at line 8549 of file ACMX2/acmx.cpp.
| gl::ShaderProgram ACView::muxOverlayShader |
Definition at line 8547 of file ACMX2/acmx.cpp.
| gl::GLSprite ACView::muxOverlaySprite |
Definition at line 8548 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11814 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), draw(), and ~ACView().
| cv::Mat ACView::newFrame |
Definition at line 9420 of file ACMX2/acmx.cpp.
Referenced by draw().
|
private |
Definition at line 11831 of file ACMX2/acmx.cpp.
Referenced by ACView(), draw(), load(), and runMuxSync().
|
private |
Definition at line 11721 of file ACMX2/acmx.cpp.
Referenced by ACView(), beginMuxing(), draw(), getOutputFileSizeBytes(), load(), needsFileAudioMux(), needsMux(), runFileAudioMuxSync(), runMuxSync(), and stopWriterThread().
|
private |
Definition at line 11819 of file ACMX2/acmx.cpp.
Referenced by event().
| mx::Font ACView::overlayFont |
Definition at line 8545 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11753 of file ACMX2/acmx.cpp.
Referenced by ensurePassTargets(), and ~ACView().
|
private |
Definition at line 11752 of file ACMX2/acmx.cpp.
Referenced by ensurePassTargets(), and ~ACView().
|
private |
Definition at line 11750 of file ACMX2/acmx.cpp.
Referenced by ensurePassTargets(), and ~ACView().
|
private |
Definition at line 11751 of file ACMX2/acmx.cpp.
Referenced by convertResourcesToHdr(), ensurePassTargets(), and ~ACView().
|
private |
Definition at line 7205 of file ACMX2/acmx.cpp.
Referenced by flushPBOs(), load(), and ~ACView().
|
private |
Definition at line 7209 of file ACMX2/acmx.cpp.
|
private |
Definition at line 7210 of file ACMX2/acmx.cpp.
Referenced by ~ACView().
| bool ACView::playlist_enabled = false |
Definition at line 7803 of file ACMX2/acmx.cpp.
Referenced by autopilotRandomSwitch(), autopilotSequentialAdvance(), and event().
| std::string ACView::playlist_file |
Definition at line 7804 of file ACMX2/acmx.cpp.
Referenced by load().
| int ACView::playlist_index = 0 |
Definition at line 7802 of file ACMX2/acmx.cpp.
Referenced by autopilotRandomSwitch(), autopilotSequentialAdvance(), and event().
| std::vector<int> ACView::playlist_indices |
Definition at line 7801 of file ACMX2/acmx.cpp.
Referenced by activePlaylistSize(), autopilotRandomSwitch(), autopilotSequentialAdvance(), event(), and load().
| std::vector<PlaylistNode> ACView::playlist_tree |
Definition at line 7800 of file ACMX2/acmx.cpp.
Referenced by activePlaylistSize(), autopilotRandomSwitch(), autopilotSequentialAdvance(), event(), and load().
|
private |
Definition at line 11841 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), load(), startWriterThread(), and stopWriterThread().
|
private |
Definition at line 11842 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), emitSilentVideoProgress(), getFrameCount(), startWriterThread(), and stopWriterThread().
|
private |
Definition at line 11840 of file ACMX2/acmx.cpp.
Referenced by ACView(), appendRecordingTitleSuffix(), beginMuxing(), draw(), emitSilentVideoProgress(), getFrameCount(), load(), startWriterThread(), stopWriterThread(), and ~ACView().
|
private |
Definition at line 11720 of file ACMX2/acmx.cpp.
Referenced by ACView(), and startWriterThread().
|
private |
FBO whose color attachment is preOverlayTexture; used to save/restore fboTexture around the overlay+writer step.
Definition at line 11747 of file ACMX2/acmx.cpp.
Referenced by setupCaptureFBO(), and ~ACView().
|
private |
Snapshot of fboTexture taken before drawing the watermark/display-filter overlay, used to restore the un-watermarked image after the writer readback so the next frame's crossfade snapshot does not pick up the overlay.
Definition at line 11748 of file ACMX2/acmx.cpp.
Referenced by setupCaptureFBO(), and ~ACView().
|
private |
Definition at line 11790 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), flushPBOs(), startWriterThread(), stopWriterThread(), and ~ACView().
|
private |
Definition at line 11789 of file ACMX2/acmx.cpp.
Referenced by flushPBOs(), startWriterThread(), and ~ACView().
| bool ACView::random_multipass_mode = false |
Definition at line 7853 of file ACMX2/acmx.cpp.
Referenced by event().
|
private |
Definition at line 11736 of file ACMX2/acmx.cpp.
Referenced by event().
|
private |
Definition at line 11807 of file ACMX2/acmx.cpp.
|
private |
Definition at line 7212 of file ACMX2/acmx.cpp.
Referenced by ~ACView().
|
private |
Definition at line 7211 of file ACMX2/acmx.cpp.
Referenced by ~ACView().
|
private |
Definition at line 11732 of file ACMX2/acmx.cpp.
Referenced by ACView(), beginMuxing(), draw(), emitSilentVideoProgress(), needsTransferAudio(), and stopWriterThread().
|
private |
Definition at line 11785 of file ACMX2/acmx.cpp.
Referenced by draw(), load(), requestStop(), requestStopNoMux(), and startCaptureThread().
| bool ACView::saved_pass_enabled = false |
Definition at line 7815 of file ACMX2/acmx.cpp.
Referenced by event().
| bool ACView::saved_pass_enabled_before_random = false |
Definition at line 7855 of file ACMX2/acmx.cpp.
Referenced by event().
| std::vector<int> ACView::saved_pass_list |
Definition at line 7814 of file ACMX2/acmx.cpp.
Referenced by event().
| std::vector<int> ACView::saved_pass_list_before_random |
Definition at line 7854 of file ACMX2/acmx.cpp.
Referenced by event().
| size_t ACView::saved_shader_index_before_random = 0 |
Definition at line 7856 of file ACMX2/acmx.cpp.
Referenced by event().
| std::chrono::steady_clock::time_point ACView::sessionStartTime |
Definition at line 8551 of file ACMX2/acmx.cpp.
Referenced by load().
| bool ACView::shader_pass_enabled = false |
Definition at line 7793 of file ACMX2/acmx.cpp.
Referenced by autopilotRandomSwitch(), autopilotSequentialAdvance(), draw(), event(), generateRandomMultipass(), generateRandomMultipassLong(), generateRandomMultipassShort(), and updateShaderNameCache().
| std::vector<int> ACView::shader_pass_list |
Definition at line 7792 of file ACMX2/acmx.cpp.
Referenced by autopilotRandomSwitch(), autopilotSequentialAdvance(), draw(), event(), generateRandomMultipass(), generateRandomMultipassLong(), generateRandomMultipassShort(), and updateShaderNameCache().
|
private |
Definition at line 7204 of file ACMX2/acmx.cpp.
Referenced by autopilotRandomSwitch(), autopilotSequentialAdvance(), and event().
|
private |
Definition at line 11830 of file ACMX2/acmx.cpp.
Referenced by ACView(), draw(), emitSilentGraphicsProgress(), emitSilentVideoProgress(), and load().
|
private |
Definition at line 11724 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11724 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11811 of file ACMX2/acmx.cpp.
Referenced by draw(), needsAsyncShutdown(), requestStopNoMux(), stopWriterThread(), and ~ACView().
|
private |
Definition at line 7213 of file ACMX2/acmx.cpp.
Referenced by startWriterThread().
|
private |
Definition at line 11734 of file ACMX2/acmx.cpp.
Referenced by event().
|
private |
Definition at line 11828 of file ACMX2/acmx.cpp.
Referenced by startWriterThread().
|
private |
Definition at line 11801 of file ACMX2/acmx.cpp.
Referenced by startMediaTimelineIfReady().
|
private |
When true, scale spectrum 1D buffer by audio sensitivity.
Definition at line 6567 of file ACMX2/acmx.cpp.
Referenced by event().
|
private |
Runtime-sized FFT history array.
Definition at line 6562 of file ACMX2/acmx.cpp.
Referenced by ~ACView().
|
private |
1D FFT magnitude texture for shaders.
Definition at line 6561 of file ACMX2/acmx.cpp.
Referenced by ~ACView().
|
private |
Definition at line 11743 of file ACMX2/acmx.cpp.
Referenced by applyCrossfade(), autopilotRandomSwitch(), autopilotSequentialAdvance(), event(), generateRandomMultipass(), generateRandomMultipassLong(), generateRandomMultipassShort(), load(), runHdrDecodePass(), and runHdrEncodePass().
|
private |
Definition at line 7214 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11797 of file ACMX2/acmx.cpp.
Referenced by ACView(), bindPassHistoryTextures(), draw(), load(), and ~ACView().
|
private |
Definition at line 11798 of file ACMX2/acmx.cpp.
Referenced by ACView(), bindPassHistoryTextures(), draw(), and load().
|
private |
Definition at line 11737 of file ACMX2/acmx.cpp.
Referenced by event().
|
private |
Definition at line 11738 of file ACMX2/acmx.cpp.
Referenced by emitSilentVideoProgress(), getTimeString(), load(), and runFileAudioMuxSync().
|
private |
Definition at line 11741 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11835 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11837 of file ACMX2/acmx.cpp.
Referenced by load().
|
private |
Definition at line 11818 of file ACMX2/acmx.cpp.
Referenced by event().
| mx::Font ACView::waterFont |
Definition at line 8546 of file ACMX2/acmx.cpp.
Referenced by load().
|
private |
Definition at line 11851 of file ACMX2/acmx.cpp.
Referenced by load().
|
private |
|
private |
|
private |
|
private |
Active watermark text (overridden by –use-watermark).
Definition at line 11852 of file ACMX2/acmx.cpp.
|
private |
Definition at line 11820 of file ACMX2/acmx.cpp.
Referenced by event().
|
private |
Definition at line 11860 of file ACMX2/acmx.cpp.
Referenced by setupCaptureFBO(), and ~ACView().
|
private |
Definition at line 11859 of file ACMX2/acmx.cpp.
Referenced by setupCaptureFBO(), and ~ACView().
|
private |
Definition at line 11730 of file ACMX2/acmx.cpp.
Referenced by appendRecordingTitleSuffix(), beginMuxing(), draw(), emitSilentGraphicsProgress(), emitSilentVideoProgress(), getFrameCount(), getTimeString(), load(), needsTransferAudio(), runFileAudioMuxSync(), runMuxSync(), startWriterThread(), stopWriterThread(), and ~ACView().
|
private |
Definition at line 11787 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), draw(), startWriterThread(), and stopWriterThread().
|
private |
Definition at line 11784 of file ACMX2/acmx.cpp.
Referenced by beginMuxing(), startWriterThread(), and stopWriterThread().