ACMX 2.139.0
Dual-Backend Real-Time GPU Video Synthesis
Loading...
Searching...
No Matches
ACView Class Reference

Core rendering object—drives the capture → filter → shade → record pipeline. More...

Inheritance diagram for ACView:

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

Detailed Description

Core rendering object—drives the capture → filter → shade → record pipeline.

Inherits gl::GLObject (libmx2) so it can be hosted inside a GLWindow. Manages:

  • Video/camera/image capture (OpenCV, with a dedicated capture thread).
  • GPU filtering via CUDA kernels (ac_gpu).
  • GLSL shader application (ShaderLibrary), including multipass chains.
  • 3D model rendering with camera controls (GLM).
  • PBO-based async frame readback for recording and snapshots.
  • Audio reactivity (RtAudio) and MIDI controller input (RtMidi).
  • On-screen overlay (FPS, timer, shader name, MIDI status).

Threading Model

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.

Constructor & Destructor Documentation

◆ ACView()

ACView::ACView ( const MXArguments & args)
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().

Parameters
argsParsed 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().

◆ ~ACView()

ACView::~ACView ( )
inlineoverride

Destroy the rendering object: stop threads, release GPU resources.

Destruction order:

  1. Clean up MIDI (if enabled).
  2. Release TextureUploader (CUDA↔OpenGL PBO).
  3. Free CUDA filter arrays.
  4. Stop the capture thread (join).
  5. Flush any remaining PBO frames into the writer queue.
  6. Stop the writer thread (join), close the Writer, mux audio if applicable.
  7. Join the mux thread if it was started.
  8. Close the audio subsystem.
  9. Delete PBOs, FBOs, textures, depth buffer. 10.Release the VideoCapture.

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.

Member Function Documentation

◆ activePlaylistSize()

int ACView::activePlaylistSize ( ) const
inline

Definition at line 7832 of file ACMX2/acmx.cpp.

References playlist_indices, and playlist_tree.

◆ appendRecordingTitleSuffix()

void ACView::appendRecordingTitleSuffix ( std::ostringstream & stream)
inline

Definition at line 11161 of file ACMX2/acmx.cpp.

References getOutputFileSizeBytes(), png_video_mode, and writer.

◆ appendSilentProgressFileSize()

void ACView::appendSilentProgressFileSize ( std::ostream & stream) const
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().

◆ applyCrossfade()

void ACView::applyCrossfade ( gl::GLWindow * win,
GLuint currentTexture )
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.

Parameters
winThe GL window (provides viewport dimensions).
currentTextureThe 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.

◆ autopilotRandomSwitch()

void ACView::autopilotRandomSwitch ( gl::GLWindow * win)
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.

Parameters
winActive 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().

◆ autopilotSequentialAdvance()

void ACView::autopilotSequentialAdvance ( gl::GLWindow * win)
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.

Parameters
winActive 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().

◆ beginCrossfade()

void ACView::beginCrossfade ( gl::GLWindow * win)
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.

Parameters
winThe 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().

◆ beginMuxing()

void ACView::beginMuxing ( gl::GLWindow * win)
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:

  1. Joins the capture and writer threads.
  2. Closes the Writer (flushes the MP4 trailer).
  3. Calls runMuxSync() to invoke ffmpeg.
  4. Sets muxComplete = true.

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.

Parameters
winGL 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().

◆ bindPassHistoryTextures()

void ACView::bindPassHistoryTextures ( size_t shader_index)
inline

◆ cleanupMidi()

void ACView::cleanupMidi ( )
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().

◆ convertResourcesToHdr()

void ACView::convertResourcesToHdr ( int w,
int h )
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.
  • HDR decode/encode programs + linear/encoded textures: allocated via ensureHdrResources().

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().

◆ draw()

virtual void ACView::draw ( gl::GLWindow * win)
inlineoverridevirtual

Called every frame: capture, GPU-filter, shade, composite, record, display overlay.

This is the main rendering loop body. On each invocation:

  1. Rate-limit to the configured FPS.
  2. Poll MIDI (if enabled).
  3. If muxing, draw the overlay and return early.
  4. Check the duration limit.
  5. Read a new frame: from capture queue (camera), cap.read() (video), or clone (image).
  6. Apply GPU CUDA filters (if enabled) via TextureUploader / launch_filter(), otherwise upload via glTexSubImage2D.
  7. Bind the capture FBO, activate the shader, upload uniforms.
  8. Render in 2D (sprite quad) or 3D (model with camera/wave), including multi-pass chains through ping-pong FBOs.
  9. Blit the FBO result to the default framebuffer.
  10. PBO double-buffered readback into FrameData, push to writer queue.
  11. Draw the HUD overlay (shader name, FPS, timer).
  12. Update the window title with progress info.
Parameters
winPointer 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.

◆ drawMidiOverlay()

void ACView::drawMidiOverlay ( gl::GLWindow * win,
mx::Font & font,
int startY )
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.

Parameters
winGL window (text rendering context).
fontFont for overlay text.
startYY-coordinate to begin drawing.

Definition at line 7153 of file ACMX2/acmx.cpp.

References knobState, lastMidiButton, lastMidiButtonTime, midiCodes, midiKeyName(), and midiOpen.

◆ emitSilentGraphicsProgress()

void ACView::emitSilentGraphicsProgress ( bool complete)
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.

Parameters
completeForce 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().

◆ emitSilentVideoProgress()

void ACView::emitSilentVideoProgress ( bool complete)
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.

Parameters
completeForce 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().

◆ ensureCrossfadeFBO()

void ACView::ensureCrossfadeFBO ( int width,
int height )
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.

Parameters
widthFramebuffer width in pixels.
heightFramebuffer height in pixels.
Exceptions
mx::Exceptionif the framebuffer is incomplete.

Definition at line 8446 of file ACMX2/acmx.cpp.

References crossfadeFBO, crossfadePrevTexture, crossfadeTexture, and input_is_hdr.

Referenced by beginCrossfade().

◆ ensureHdrResources()

void ACView::ensureHdrResources ( int w,
int h )
inline

Lazily allocate the HDR decode/encode textures, FBOs and shader programs.

Idempotent.

Parameters
wTarget width (matches shader pass width).
hTarget 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().

◆ ensurePassTargets()

void ACView::ensurePassTargets ( gl::GLWindow * win)
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.

◆ event()

virtual void ACView::event ( gl::GLWindow * win,
SDL_Event & e )
inlineoverridevirtual

Handle SDL keyboard events (shader navigation, mode toggles, etc.).

Key bindings (SDL_KEYUP):

  • Up/Down: Crossfade to the previous/next shader (or playlist entry if playlist mode is enabled).
  • Shift+Up/Down: In playlist or autopilot mode, change the post-multipass shader without altering the current playlist position.
  • Left/Right: Previous/next GPU CUDA filter.
  • Space: Toggle shader bypass.
  • P: Toggle playlist mode or pause video.
  • L: Freeze frame (stop updating texture but keep time advancing).
  • Z: Take a PNG snapshot (8-bit non-HDR readback when HDR input is active).
  • 5: Take an HDR PNG snapshot (HDR mode only).
  • T: Toggle active time. Q: Toggle audio time. Home: Toggle audio delta.
  • V: Toggle view rotation (3D). O: Oscillation. C: Wave.
  • X: Reset camera. Ctrl+X: Quit immediately without audio mux/transfer.
  • N: Toggle random autopilot crossfade. 1: Camera movement speed up (3D). 2: Camera movement speed down (3D).
  • 3: Toggle 2D/3D mode. M: Toggle multi-pass. E: Watermark.
  • R: Toggle random multipass mode (generates 1-5 random shader chain).
  • G: Generate new random shader chain (while in random multipass mode).
  • H: Generate long random shader chain up to 10 (while in random multipass mode).
  • F: Generate short random shader pair of 2 (while in random multipass mode).
  • F9: Toggle HUD overlay visibility.

Key bindings (SDL_KEYDOWN):

  • U/I: Manual time step forward/backward.
  • Insert/Delete: Audio sensitivity +/-.
  • End: Toggle spectrum sensitivity scaling on/off.
  • Page Up/Down: Time speed (handled in draw() via key-state polling).
Parameters
winHosting GLWindow.
eThe 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().

◆ flushPBOs()

void ACView::flushPBOs ( gl::GLWindow * win)
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.

Parameters
winGL 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.

◆ generateRandomMultipass()

void ACView::generateRandomMultipass ( gl::GLWindow * win)
inline

◆ generateRandomMultipassLong()

void ACView::generateRandomMultipassLong ( gl::GLWindow * win)
inline

◆ generateRandomMultipassShort()

void ACView::generateRandomMultipassShort ( gl::GLWindow * win)
inline

◆ getFrameCount()

int64_t ACView::getFrameCount ( )
inline

Return the current frame count (writer count or display count).

Returns
Number of frames written if recording, else the display counter.

Definition at line 11209 of file ACMX2/acmx.cpp.

References frame_counter, png_video_frame_counter, png_video_mode, and writer.

◆ getOutputFileSizeBytes()

std::optional< uintmax_t > ACView::getOutputFileSizeBytes ( ) const
inline

Definition at line 11174 of file ACMX2/acmx.cpp.

References ofilename.

Referenced by appendRecordingTitleSuffix(), and appendSilentProgressFileSize().

◆ getTimeString()

std::string ACView::getTimeString ( )
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.

Returns
Formatted time string for display.

Definition at line 11134 of file ACMX2/acmx.cpp.

References filename, fps, frame_counter, totalFrames, and writer.

◆ hdrReadback()

void ACView::hdrReadback ( GLuint src_linear_tex,
int w,
int h,
std::vector< unsigned char > & out )
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).

Parameters
src_linear_texTexture holding the final linear BT.2020 result (typically fboTexture after the shader chain).
w,hFrame dimensions.
outOutput byte vector, resized to 8*w*h.

Definition at line 7550 of file ACMX2/acmx.cpp.

References hdr_encoded_texture, and runHdrEncodePass().

◆ initMidi()

void ACView::initMidi ( const std::string & mapFile,
int deviceIndex )
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).

Parameters
mapFilePath to the .midi_cfg mapping file.
deviceIndexMIDI input port index (-1 for default / port 0).

Definition at line 6792 of file ACMX2/acmx.cpp.

References midiCodes, midiIn, and midiOpen.

◆ injectKey()

void ACView::injectKey ( SDL_Keycode key,
gl::GLWindow * win )
inlineprivate

Synthesise an SDL_KEYUP event and dispatch it through event().

Parameters
keyThe SDL_Keycode to inject.
winThe GL window that receives the event.

Definition at line 6975 of file ACMX2/acmx.cpp.

References event().

Referenced by pollMidi().

◆ load()

virtual void ACView::load ( gl::GLWindow * win)
inlineoverridevirtual

Called once by the GLWindow to initialise capture, shaders, FBOs, and recording.

Performs the full OpenGL-dependent setup:

  1. Set the CUDA device.
  2. Load fonts.
  3. Open the input source (image file, camera, or video file); set resolution, FPS, and window size.
  4. Open the output Writer (FFmpeg pipe) if -o was specified.
  5. Load and compile the shader library (from cache if available).
  6. Load the 3D model (if –enable-3d).
  7. Initialise framebuffer shader, texture cache, sprites.
  8. Set up the capture FBO and double-buffered PBOs.
  9. Start the writer thread (always) and the capture thread (camera mode only).
Parameters
winPointer 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.

◆ loadTexture()

GLuint ACView::loadTexture ( cv::Mat & frame)
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.

Parameters
frameInput cv::Mat (BGR, 8-bit).
Returns
Newly created GL texture ID.
Exceptions
mx::Exceptionon any GL error.

Definition at line 11977 of file ACMX2/acmx.cpp.

◆ maybeRandomizeAutopilotCrossfade()

void ACView::maybeRandomizeAutopilotCrossfade ( )
inline

◆ midiKeyName()

const char * ACView::midiKeyName ( int code)
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.

Parameters
codeVirtual key code from the MIDI map file.
Returns
Short label string (e.g. "Right", "SpdUp", "PitchDn").

Definition at line 6627 of file ACMX2/acmx.cpp.

Referenced by drawMidiOverlay(), and pollMidi().

◆ midiKeyToSDL()

SDL_Keycode ACView::midiKeyToSDL ( int code)
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().

Parameters
codeVirtual key code from the MIDI map.
Returns
Corresponding SDL_Keycode, or SDLK_UNKNOWN.

Definition at line 6853 of file ACMX2/acmx.cpp.

Referenced by pollMidi().

◆ needsAsyncShutdown()

bool ACView::needsAsyncShutdown ( )
inline

◆ needsFileAudioMux()

bool ACView::needsFileAudioMux ( )
inlineprivate

Check whether the output video needs file-audio muxing.

Returns
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().

◆ needsMux()

bool ACView::needsMux ( )
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().

◆ needsTransferAudio()

bool ACView::needsTransferAudio ( )
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().

◆ pollMidi()

void ACView::pollMidi ( gl::GLWindow * win)
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.

Parameters
winGL 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().

◆ requestStop()

void ACView::requestStop ( )
inline

Definition at line 7217 of file ACMX2/acmx.cpp.

References running.

◆ requestStopNoMux()

void ACView::requestStopNoMux ( )
inline

Definition at line 7218 of file ACMX2/acmx.cpp.

References running, and skip_audio_mux_on_exit.

Referenced by event().

◆ resetAudioWarmupEnvelope()

void ACView::resetAudioWarmupEnvelope ( )
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().

◆ resetAutopilotInterval()

void ACView::resetAutopilotInterval ( )
inline

◆ rotate_frame()

void ACView::rotate_frame ( cv::Mat & frame)
inline

Definition at line 9424 of file ACMX2/acmx.cpp.

References Clockwise90, Counterclockwise90, frame_rotation, input_is_hdr, and None.

Referenced by draw().

◆ rotation_swaps_dimensions()

bool ACView::rotation_swaps_dimensions ( ) const
inline

Definition at line 9422 of file ACMX2/acmx.cpp.

References Clockwise90, Counterclockwise90, and frame_rotation.

Referenced by load().

◆ runComputePass()

bool ACView::runComputePass ( gl::GLWindow * win,
size_t shader_index,
GLuint input_texture,
GLuint output_texture )
inline

◆ runFileAudioMuxSync()

void ACView::runFileAudioMuxSync ( )
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().

◆ runHdrDecodePass()

void ACView::runHdrDecodePass ( int w,
int h )
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().

◆ runHdrEncodePass()

void ACView::runHdrEncodePass ( GLuint src_tex,
int w,
int h )
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().

◆ runMuxSync()

void ACView::runMuxSync ( )
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().

◆ setupCaptureFBO()

void ACView::setupCaptureFBO ( int width,
int height )
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.

Parameters
widthFBO width in pixels.
heightFBO height in pixels.
Exceptions
mx::Exceptionif 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().

◆ startAudioRecordingIfNeeded()

void ACView::startAudioRecordingIfNeeded ( )
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().

◆ startCaptureThread()

void ACView::startCaptureThread ( )
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.

See also
stopCaptureThread()

Definition at line 12057 of file ACMX2/acmx.cpp.

References cap, captureQueue, captureQueueCondVar, captureQueueMutex, captureRunning, captureThread, and running.

Referenced by load().

◆ startMediaTimelineIfReady()

void ACView::startMediaTimelineIfReady ( )
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().

◆ startWriterThread()

void ACView::startWriterThread ( )
inlineprivate

Start the background writer thread (video recording + snapshots).

Spawns a std::thread that dequeues FrameData from frameQueue and either:

  • Dispatches snapshot frames to the SnapshotThreadPool for async PNG writing.
  • Passes video frames to writer.write() for sequential output or writer.write_at_pts() for clock-synchronised output.

The thread blocks on queueCondVar when the queue is empty. It exits when writerRunning is set to false and the queue is drained.

See also
stopWriterThread()

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().

◆ stopCaptureThread()

void ACView::stopCaptureThread ( )
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().

◆ stopWriterThread()

void ACView::stopWriterThread ( )
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().

◆ updateAudioWarmupEnvelope()

float ACView::updateAudioWarmupEnvelope ( )
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.

◆ updateShaderNameCache()

void ACView::updateShaderNameCache ( )
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().

◆ updateTexture()

void ACView::updateTexture ( GLuint texture,
cv::Mat & frame )
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).

Parameters
textureGL texture ID to update.
frameNew frame (BGR, 8-bit).

Definition at line 12013 of file ACMX2/acmx.cpp.

Referenced by draw().

◆ updateTextureRGBA()

void ACView::updateTextureRGBA ( GLuint texture,
cv::Mat & frame )
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.

Parameters
textureGL texture ID.
framecv::Mat in RGBA format.

Definition at line 12037 of file ACMX2/acmx.cpp.

◆ uploadHdrFrame()

void ACView::uploadHdrFrame ( const cv::Mat & rgba16)
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().

Member Data Documentation

◆ audio_buffer_count

int ACView::audio_buffer_count = 0
private

Allocated history-array layer count.

Definition at line 6563 of file ACMX2/acmx.cpp.

◆ audio_engine

◆ audio_file_path

std::string ACView::audio_file_path
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().

◆ audio_input_device

int ACView::audio_input_device
private

Definition at line 6557 of file ACMX2/acmx.cpp.

Referenced by ACView().

◆ audio_is_enabled

bool ACView::audio_is_enabled = false
private

◆ audio_output_device

int ACView::audio_output_device
private

Definition at line 6558 of file ACMX2/acmx.cpp.

Referenced by ACView().

◆ audio_record_file

std::string ACView::audio_record_file
private

◆ audio_repeat_mode

bool ACView::audio_repeat_mode = false
private

When true, restart file audio when its samples are exhausted.

Definition at line 6571 of file ACMX2/acmx.cpp.

Referenced by runFileAudioMuxSync().

◆ audio_trunc_mode

bool ACView::audio_trunc_mode = false
private

When true, stop playback when file audio samples are exhausted.

Definition at line 6570 of file ACMX2/acmx.cpp.

◆ audio_warmup_envelope

float ACView::audio_warmup_envelope = 0.0f
private

Startup fade for audio-driven uniforms/textures.

Definition at line 6564 of file ACMX2/acmx.cpp.

Referenced by resetAudioWarmupEnvelope(), and updateAudioWarmupEnvelope().

◆ audio_warmup_last_tick

std::chrono::steady_clock::time_point ACView::audio_warmup_last_tick = std::chrono::steady_clock::now()
private

Definition at line 6566 of file ACMX2/acmx.cpp.

Referenced by resetAudioWarmupEnvelope(), and updateAudioWarmupEnvelope().

◆ audio_warmup_rate

float ACView::audio_warmup_rate = 0.5f
private

Warmup envelope slope in 1/sec (higher = faster ramp).

Definition at line 6565 of file ACMX2/acmx.cpp.

Referenced by ACView(), and updateAudioWarmupEnvelope().

◆ autopilot_counter

int ACView::autopilot_counter = 0

Frames elapsed since last autopilot switch.

Definition at line 7808 of file ACMX2/acmx.cpp.

Referenced by event().

◆ autopilot_enabled

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().

◆ autopilot_frames

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().

◆ autopilot_interval_frames

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().

◆ autopilot_random_crossfade

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().

◆ autopilot_random_interval

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().

◆ autopilot_random_timeout

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().

◆ autopilot_rng

std::mt19937 ACView::autopilot_rng {std::random_device{}()}

◆ autopilot_sequential

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().

◆ cache_delay

int ACView::cache_delay = 1
private

Definition at line 11799 of file ACMX2/acmx.cpp.

Referenced by ACView(), and draw().

◆ cache_warmup_frames

int ACView::cache_warmup_frames = 0
private

Definition at line 11800 of file ACMX2/acmx.cpp.

Referenced by draw(), and load().

◆ cached_shader_name

std::string ACView::cached_shader_name

Definition at line 7794 of file ACMX2/acmx.cpp.

Referenced by updateShaderNameCache().

◆ camera_index

int ACView::camera_index = 0
private

Definition at line 11722 of file ACMX2/acmx.cpp.

Referenced by ACView(), and load().

◆ camera_texture

GLuint ACView::camera_texture = 0
private

◆ cameraDistance

float ACView::cameraDistance = 0.0f
private

Definition at line 11821 of file ACMX2/acmx.cpp.

Referenced by event().

◆ cameraPitch

float ACView::cameraPitch = 0.0f
private

Definition at line 11816 of file ACMX2/acmx.cpp.

◆ cameraRotationSpeed

float ACView::cameraRotationSpeed = 5.0f
private

Definition at line 11817 of file ACMX2/acmx.cpp.

Referenced by pollMidi().

◆ cameraYaw

float ACView::cameraYaw = 270.0f
private

Definition at line 11815 of file ACMX2/acmx.cpp.

◆ cap

cv::VideoCapture ACView::cap
private

Definition at line 11739 of file ACMX2/acmx.cpp.

Referenced by draw(), load(), startCaptureThread(), and ~ACView().

◆ captureFBO

GLuint ACView::captureFBO = 0
private

Definition at line 11745 of file ACMX2/acmx.cpp.

Referenced by beginCrossfade(), setupCaptureFBO(), and ~ACView().

◆ captureQueue

std::queue<cv::Mat> ACView::captureQueue
private

Definition at line 11792 of file ACMX2/acmx.cpp.

Referenced by draw(), and startCaptureThread().

◆ captureQueueCondVar

std::condition_variable ACView::captureQueueCondVar
private

Definition at line 11794 of file ACMX2/acmx.cpp.

Referenced by beginMuxing(), startCaptureThread(), and stopCaptureThread().

◆ captureQueueMutex

std::mutex ACView::captureQueueMutex
private

Definition at line 11793 of file ACMX2/acmx.cpp.

Referenced by draw(), and startCaptureThread().

◆ captureRunning

std::atomic<bool> ACView::captureRunning {false}
private

Definition at line 11786 of file ACMX2/acmx.cpp.

Referenced by beginMuxing(), startCaptureThread(), and stopCaptureThread().

◆ captureThread

std::thread ACView::captureThread
private

Definition at line 11791 of file ACMX2/acmx.cpp.

Referenced by beginMuxing(), startCaptureThread(), and stopCaptureThread().

◆ copy_audio

std::atomic<bool> ACView::copy_audio {false}
private

Definition at line 11810 of file ACMX2/acmx.cpp.

Referenced by ACView(), beginMuxing(), needsTransferAudio(), and stopWriterThread().

◆ counter_disabled

bool ACView::counter_disabled = false

Definition at line 8555 of file ACMX2/acmx.cpp.

Referenced by event().

◆ crf

std::string ACView::crf = "23"
private

Definition at line 11718 of file ACMX2/acmx.cpp.

Referenced by ACView().

◆ crossfadeActive

bool ACView::crossfadeActive = false
private

True while a crossfade transition is in progress.

Definition at line 11781 of file ACMX2/acmx.cpp.

Referenced by applyCrossfade(), and beginCrossfade().

◆ crossfadeAlpha

float ACView::crossfadeAlpha = 1.0f
private

Current blend factor (0 = old frame, 1 = new frame).

Definition at line 11780 of file ACMX2/acmx.cpp.

Referenced by applyCrossfade(), and beginCrossfade().

◆ crossfadeDuration

float ACView::crossfadeDuration = 0.5f
private

Duration of the crossfade transition in seconds.

Definition at line 11782 of file ACMX2/acmx.cpp.

Referenced by applyCrossfade().

◆ crossfadeFBO

GLuint ACView::crossfadeFBO = 0
private

FBO used for the crossfade compositing pass.

Definition at line 11754 of file ACMX2/acmx.cpp.

Referenced by applyCrossfade(), ensureCrossfadeFBO(), and ~ACView().

◆ crossfadePrevTexture

GLuint ACView::crossfadePrevTexture = 0
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().

◆ crossfadeShaderIndex

int ACView::crossfadeShaderIndex = 0
private

Active index into crossfadeShaders.

Definition at line 11779 of file ACMX2/acmx.cpp.

Referenced by applyCrossfade(), event(), load(), and maybeRandomizeAutopilotCrossfade().

◆ crossfadeShaderNames

std::vector<std::string> ACView::crossfadeShaderNames
private

Display names matching crossfadeShaders by index.

Definition at line 11778 of file ACMX2/acmx.cpp.

Referenced by event(), and load().

◆ crossfadeShaders

std::vector<gl::ShaderProgram> ACView::crossfadeShaders
private

Available crossfade transition shaders (cycle with [ and ]).

Definition at line 11777 of file ACMX2/acmx.cpp.

Referenced by applyCrossfade(), event(), load(), and maybeRandomizeAutopilotCrossfade().

◆ crossfadeStartTime

std::chrono::steady_clock::time_point ACView::crossfadeStartTime
private

Wall-clock time the current crossfade began.

Definition at line 11783 of file ACMX2/acmx.cpp.

Referenced by applyCrossfade(), and beginCrossfade().

◆ crossfadeTexture

GLuint ACView::crossfadeTexture = 0
private

Colour attachment of crossfadeFBO (blended output).

Definition at line 11755 of file ACMX2/acmx.cpp.

Referenced by convertResourcesToHdr(), ensureCrossfadeFBO(), and ~ACView().

◆ cube

◆ d_filterList

ac_gpu::GPUFilter* ACView::d_filterList = nullptr

Definition at line 7785 of file ACMX2/acmx.cpp.

Referenced by draw(), and ~ACView().

◆ d_ptrList

unsigned char** ACView::d_ptrList = nullptr

Definition at line 7784 of file ACMX2/acmx.cpp.

Referenced by draw(), and ~ACView().

◆ decoded_video_frame_count

uint64_t ACView::decoded_video_frame_count = 0
private

Definition at line 11808 of file ACMX2/acmx.cpp.

Referenced by draw().

◆ depthBuffer

GLuint ACView::depthBuffer = 0
private

Definition at line 11749 of file ACMX2/acmx.cpp.

Referenced by setupCaptureFBO(), and ~ACView().

◆ display_filter

bool ACView::display_filter = false
private

Definition at line 11850 of file ACMX2/acmx.cpp.

Referenced by ACView().

◆ display_flip_shader

gl::ShaderProgram ACView::display_flip_shader
private

Display shader with optional Y-flip for windowed output.

Definition at line 11775 of file ACMX2/acmx.cpp.

Referenced by ensureHdrResources().

◆ displayFPS

double ACView::displayFPS = 0.0

Definition at line 8552 of file ACMX2/acmx.cpp.

Referenced by load().

◆ duration_limit

double ACView::duration_limit = 0.0

Definition at line 7816 of file ACMX2/acmx.cpp.

Referenced by draw(), emitSilentGraphicsProgress(), and emitSilentVideoProgress().

◆ enableWatermark

bool ACView::enableWatermark = false
private

Definition at line 11849 of file ACMX2/acmx.cpp.

Referenced by event().

◆ encode_opts

EncodeOptions ACView::encode_opts {}
private

Definition at line 11719 of file ACMX2/acmx.cpp.

Referenced by ACView(), and load().

◆ fboTexture

GLuint ACView::fboTexture = 0
private

Definition at line 11746 of file ACMX2/acmx.cpp.

Referenced by convertResourcesToHdr(), setupCaptureFBO(), and ~ACView().

◆ ffmpeg_reader

FFMpegVideoReader ACView::ffmpeg_reader
private

Definition at line 11740 of file ACMX2/acmx.cpp.

Referenced by draw(), and load().

◆ file_audio_mode

bool ACView::file_audio_mode = false
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().

◆ filename

◆ finished

std::atomic<bool> ACView::finished {false}
private

Definition at line 11809 of file ACMX2/acmx.cpp.

Referenced by draw().

◆ flib

std::tuple<int, std::string, int> ACView::flib
private

Definition at line 11723 of file ACMX2/acmx.cpp.

Referenced by ACView(), event(), and load().

◆ flip_output

bool ACView::flip_output = false
private

Definition at line 11838 of file ACMX2/acmx.cpp.

Referenced by ACView().

◆ fps

◆ fpsFrameCount

int ACView::fpsFrameCount = 0

Definition at line 8553 of file ACMX2/acmx.cpp.

Referenced by load().

◆ fpsLastTime

std::chrono::steady_clock::time_point ACView::fpsLastTime

Definition at line 8554 of file ACMX2/acmx.cpp.

Referenced by load().

◆ frame_cache

FrameCache ACView::frame_cache
private

Definition at line 11796 of file ACMX2/acmx.cpp.

Referenced by ACView(), bindPassHistoryTextures(), draw(), load(), and ~ACView().

◆ frame_counter

unsigned int ACView::frame_counter = 0
private

◆ frame_rotation

FrameRotation ACView::frame_rotation = FrameRotation::None
private

Definition at line 11839 of file ACMX2/acmx.cpp.

Referenced by ACView(), rotate_frame(), and rotation_swaps_dimensions().

◆ frameQueue

std::queue<FrameData> ACView::frameQueue
private

Definition at line 11788 of file ACMX2/acmx.cpp.

Referenced by flushPBOs(), startWriterThread(), and ~ACView().

◆ frames_dropped

std::atomic<uint64_t> ACView::frames_dropped {0}
private

Definition at line 11858 of file ACMX2/acmx.cpp.

◆ frames_proc

size_t ACView::frames_proc = 0

Definition at line 7817 of file ACMX2/acmx.cpp.

Referenced by draw(), emitSilentVideoProgress(), and startMediaTimelineIfReady().

◆ fshader

gl::ShaderProgram ACView::fshader

Definition at line 8743 of file ACMX2/acmx.cpp.

Referenced by draw(), and load().

◆ fshader3d

gl::ShaderProgram ACView::fshader3d

Definition at line 8743 of file ACMX2/acmx.cpp.

Referenced by draw(), and load().

◆ full

bool ACView::full = false
private

Definition at line 11733 of file ACMX2/acmx.cpp.

Referenced by ACView(), and load().

◆ generate_all_frames

std::atomic<uint64_t> ACView::generate_all_frames {0}
private

Definition at line 11846 of file ACMX2/acmx.cpp.

Referenced by startWriterThread().

◆ generate_dir

std::string ACView::generate_dir
private

Definition at line 11845 of file ACMX2/acmx.cpp.

Referenced by load(), startWriterThread(), and stopWriterThread().

◆ generate_interval

int ACView::generate_interval = 0
private

Definition at line 11844 of file ACMX2/acmx.cpp.

Referenced by ACView(), load(), and startWriterThread().

◆ generate_mode

bool ACView::generate_mode = false
private

Definition at line 11843 of file ACMX2/acmx.cpp.

Referenced by ACView(), draw(), load(), startWriterThread(), and stopWriterThread().

◆ generate_saved_counter

std::atomic<uint64_t> ACView::generate_saved_counter {0}
private

Definition at line 11847 of file ACMX2/acmx.cpp.

Referenced by startWriterThread(), and stopWriterThread().

◆ gpu_alpha

float ACView::gpu_alpha = 1.0f

Definition at line 7787 of file ACMX2/acmx.cpp.

Referenced by draw().

◆ gpu_alpha_dir

int ACView::gpu_alpha_dir = 1

Definition at line 7788 of file ACMX2/acmx.cpp.

Referenced by draw().

◆ gpu_cuda_device

int ACView::gpu_cuda_device = 0
private

Definition at line 11829 of file ACMX2/acmx.cpp.

Referenced by ACView(), and load().

◆ gpu_current_filter_index

int ACView::gpu_current_filter_index = 0

Definition at line 7775 of file ACMX2/acmx.cpp.

Referenced by event().

◆ gpu_filter_enabled

bool ACView::gpu_filter_enabled = false

Definition at line 7773 of file ACMX2/acmx.cpp.

Referenced by draw(), event(), and load().

◆ gpu_filters

std::vector<ac_gpu::Filter> ACView::gpu_filters

Definition at line 7774 of file ACMX2/acmx.cpp.

Referenced by draw(), event(), and load().

◆ gpu_filtersChanged

bool ACView::gpu_filtersChanged = true

Definition at line 7786 of file ACMX2/acmx.cpp.

Referenced by draw(), and event().

◆ gpu_frame_buffer

std::unique_ptr<ac_gpu::DynamicFrameBuffer> ACView::gpu_frame_buffer

Definition at line 7776 of file ACMX2/acmx.cpp.

Referenced by draw(), and ~ACView().

◆ gpu_frame_dir

int ACView::gpu_frame_dir = 1

Definition at line 7791 of file ACMX2/acmx.cpp.

Referenced by draw().

◆ gpu_frame_index

int ACView::gpu_frame_index = 0

Definition at line 7790 of file ACMX2/acmx.cpp.

Referenced by draw().

◆ gpu_square_size

int ACView::gpu_square_size = 8

Definition at line 7789 of file ACMX2/acmx.cpp.

Referenced by draw().

◆ gpuFilteredFrame

cv::Mat ACView::gpuFilteredFrame

Definition at line 7783 of file ACMX2/acmx.cpp.

◆ graphic

std::string ACView::graphic
private

◆ graphic_frame

cv::Mat ACView::graphic_frame
private

Definition at line 11742 of file ACMX2/acmx.cpp.

Referenced by draw(), and load().

◆ hdr_decode_shader

gl::ShaderProgram ACView::hdr_decode_shader
private

PQ/HLG -> linear BT.2020 fullscreen pass.

Definition at line 11773 of file ACMX2/acmx.cpp.

Referenced by ensureHdrResources(), and runHdrDecodePass().

◆ hdr_encode_shader

gl::ShaderProgram ACView::hdr_encode_shader
private

Linear BT.2020 -> PQ (or HLG) fullscreen pass.

Definition at line 11774 of file ACMX2/acmx.cpp.

Referenced by ensureHdrResources(), and runHdrEncodePass().

◆ hdr_encoded_fbo

GLuint ACView::hdr_encoded_fbo = 0
private

FBO writing into hdr_encoded_texture.

Definition at line 11772 of file ACMX2/acmx.cpp.

Referenced by ensureHdrResources(), and runHdrEncodePass().

◆ hdr_encoded_texture

GLuint ACView::hdr_encoded_texture = 0
private

GL_RGBA16: final PQ-re-encoded output for readback.

Definition at line 11771 of file ACMX2/acmx.cpp.

Referenced by ensureHdrResources(), and hdrReadback().

◆ hdr_frame_mat

cv::Mat ACView::hdr_frame_mat
private

Scratch CV_16UC4 RGBA frame for HDR decode.

Definition at line 11776 of file ACMX2/acmx.cpp.

Referenced by draw().

◆ hdr_linear_video_fbo

GLuint ACView::hdr_linear_video_fbo = 0
private

FBO writing into hdr_linear_video_texture.

Definition at line 11770 of file ACMX2/acmx.cpp.

Referenced by draw(), ensureHdrResources(), and runHdrDecodePass().

◆ hdr_linear_video_texture

GLuint ACView::hdr_linear_video_texture = 0
private

GL_RGBA16F: PQ/HLG-decoded linear BT.2020 video.

Definition at line 11769 of file ACMX2/acmx.cpp.

Referenced by ensureHdrResources().

◆ hdr_resource_h

int ACView::hdr_resource_h = 0
private

Height of HDR intermediate/encoded textures.

Definition at line 11768 of file ACMX2/acmx.cpp.

Referenced by ensureHdrResources().

◆ hdr_resource_w

int ACView::hdr_resource_w = 0
private

Width of HDR intermediate/encoded textures.

Definition at line 11767 of file ACMX2/acmx.cpp.

Referenced by ensureHdrResources().

◆ hdr_snapshot_state

int ACView::hdr_snapshot_state = 0
private

Definition at line 11735 of file ACMX2/acmx.cpp.

Referenced by event().

◆ hdr_upload_tex_h

int ACView::hdr_upload_tex_h = 0
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().

◆ hdr_upload_tex_w

int ACView::hdr_upload_tex_w = 0
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().

◆ input_hdr_trc

int ACView::input_hdr_trc = 0
private

AVColorTransferCharacteristic (PQ/HLG/BT2020).

Definition at line 11764 of file ACMX2/acmx.cpp.

Referenced by load(), runHdrDecodePass(), and runHdrEncodePass().

◆ input_is_hdr

bool ACView::input_is_hdr = false
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().

◆ is3d_enabled

◆ isFrozen

bool ACView::isFrozen = false
private

Definition at line 7203 of file ACMX2/acmx.cpp.

Referenced by draw(), and event().

◆ isMuxing

std::atomic<bool> ACView::isMuxing {false}
private

Definition at line 11812 of file ACMX2/acmx.cpp.

Referenced by beginMuxing(), draw(), and ~ACView().

◆ isPaused

bool ACView::isPaused = false
private

Definition at line 7202 of file ACMX2/acmx.cpp.

Referenced by draw(), and event().

◆ knobFrameCount

std::map<std::pair<unsigned char, unsigned char>, int> ACView::knobFrameCount
private

Definition at line 6612 of file ACMX2/acmx.cpp.

Referenced by pollMidi().

◆ knobPrevValue

std::map<std::pair<unsigned char, unsigned char>, unsigned char> ACView::knobPrevValue
private

Definition at line 6610 of file ACMX2/acmx.cpp.

Referenced by pollMidi().

◆ knobState

std::map<std::pair<unsigned char, unsigned char>, unsigned char> ACView::knobState
private

Definition at line 6608 of file ACMX2/acmx.cpp.

Referenced by drawMidiOverlay(), and pollMidi().

◆ last_graphics_progress_emit

std::chrono::steady_clock::time_point ACView::last_graphics_progress_emit {}
private

Definition at line 11805 of file ACMX2/acmx.cpp.

Referenced by emitSilentGraphicsProgress().

◆ last_graphics_progress_frame

uint64_t ACView::last_graphics_progress_frame = 0
private

Definition at line 11804 of file ACMX2/acmx.cpp.

Referenced by emitSilentGraphicsProgress().

◆ last_progress_percent

int ACView::last_progress_percent = -1
private

Definition at line 11848 of file ACMX2/acmx.cpp.

Referenced by emitSilentVideoProgress().

◆ last_video_progress_emit

std::chrono::steady_clock::time_point ACView::last_video_progress_emit {}
private

Definition at line 11806 of file ACMX2/acmx.cpp.

Referenced by emitSilentVideoProgress().

◆ lastFrameTime

std::chrono::steady_clock::time_point ACView::lastFrameTime = std::chrono::steady_clock::now()
private

Definition at line 11795 of file ACMX2/acmx.cpp.

Referenced by draw().

◆ lastMidiButton

std::string ACView::lastMidiButton
private

Definition at line 6614 of file ACMX2/acmx.cpp.

Referenced by drawMidiOverlay(), and pollMidi().

◆ lastMidiButtonTime

std::chrono::steady_clock::time_point ACView::lastMidiButtonTime
private

Definition at line 6615 of file ACMX2/acmx.cpp.

Referenced by drawMidiOverlay(), and pollMidi().

◆ library

◆ m_file

std::string ACView::m_file

Definition at line 8744 of file ACMX2/acmx.cpp.

Referenced by load().

◆ max_size_limit_bytes

double ACView::max_size_limit_bytes = 0.0

Definition at line 7819 of file ACMX2/acmx.cpp.

Referenced by draw().

◆ max_size_limit_mb

double ACView::max_size_limit_mb = 0.0

Definition at line 7818 of file ACMX2/acmx.cpp.

Referenced by draw().

◆ media_timeline_start_time

std::chrono::steady_clock::time_point ACView::media_timeline_start_time {}
private

Definition at line 11803 of file ACMX2/acmx.cpp.

Referenced by draw(), and startMediaTimelineIfReady().

◆ media_timeline_started

bool ACView::media_timeline_started = false
private

Definition at line 11802 of file ACMX2/acmx.cpp.

Referenced by draw(), and startMediaTimelineIfReady().

◆ midiCodes

std::vector<MidiCode> ACView::midiCodes
private

Definition at line 6606 of file ACMX2/acmx.cpp.

Referenced by drawMidiOverlay(), initMidi(), and pollMidi().

◆ midiIn

RtMidiIn* ACView::midiIn = nullptr
private

Definition at line 6599 of file ACMX2/acmx.cpp.

Referenced by cleanupMidi(), initMidi(), and pollMidi().

◆ midiOpen

bool ACView::midiOpen = false
private

Definition at line 6600 of file ACMX2/acmx.cpp.

Referenced by cleanupMidi(), drawMidiOverlay(), initMidi(), and pollMidi().

◆ modelCenterOffset

glm::vec3 ACView::modelCenterOffset = glm::vec3(0.0f)
private

Definition at line 11824 of file ACMX2/acmx.cpp.

Referenced by load().

◆ modelRenderScale

float ACView::modelRenderScale = 1.0f
private

Definition at line 11823 of file ACMX2/acmx.cpp.

Referenced by load(), and pollMidi().

◆ modelRotX

float ACView::modelRotX = 0.0f
private

Definition at line 11825 of file ACMX2/acmx.cpp.

Referenced by pollMidi().

◆ modelRotY

float ACView::modelRotY = 0.0f
private

Definition at line 11826 of file ACMX2/acmx.cpp.

Referenced by pollMidi().

◆ modelRotZ

float ACView::modelRotZ = 0.0f
private

Definition at line 11827 of file ACMX2/acmx.cpp.

Referenced by pollMidi().

◆ modelSize

float ACView::modelSize = 1.0f
private

Definition at line 11822 of file ACMX2/acmx.cpp.

Referenced by load().

◆ movementSpeed

float ACView::movementSpeed = 0.1f

Definition at line 9474 of file ACMX2/acmx.cpp.

◆ mux_time_f

float ACView::mux_time_f = 0.0f

Definition at line 8550 of file ACMX2/acmx.cpp.

Referenced by draw().

◆ muxComplete

std::atomic<bool> ACView::muxComplete {false}
private

Definition at line 11813 of file ACMX2/acmx.cpp.

Referenced by beginMuxing(), and draw().

◆ muxDummyTex

GLuint ACView::muxDummyTex = 0

Definition at line 8549 of file ACMX2/acmx.cpp.

Referenced by draw(), and load().

◆ muxOverlayShader

gl::ShaderProgram ACView::muxOverlayShader

Definition at line 8547 of file ACMX2/acmx.cpp.

Referenced by draw(), and load().

◆ muxOverlaySprite

gl::GLSprite ACView::muxOverlaySprite

Definition at line 8548 of file ACMX2/acmx.cpp.

Referenced by draw(), and load().

◆ muxThread

std::thread ACView::muxThread
private

Definition at line 11814 of file ACMX2/acmx.cpp.

Referenced by beginMuxing(), draw(), and ~ACView().

◆ newFrame

cv::Mat ACView::newFrame

Definition at line 9420 of file ACMX2/acmx.cpp.

Referenced by draw().

◆ no_drop_mode

bool ACView::no_drop_mode = false
private

Definition at line 11831 of file ACMX2/acmx.cpp.

Referenced by ACView(), draw(), load(), and runMuxSync().

◆ ofilename

std::string ACView::ofilename
private

◆ oscillateScale

bool ACView::oscillateScale = false
private

Definition at line 11819 of file ACMX2/acmx.cpp.

Referenced by event().

◆ overlayFont

mx::Font ACView::overlayFont

Definition at line 8545 of file ACMX2/acmx.cpp.

Referenced by draw(), and load().

◆ pass_target_height

int ACView::pass_target_height = 0
private

Definition at line 11753 of file ACMX2/acmx.cpp.

Referenced by ensurePassTargets(), and ~ACView().

◆ pass_target_width

int ACView::pass_target_width = 0
private

Definition at line 11752 of file ACMX2/acmx.cpp.

Referenced by ensurePassTargets(), and ~ACView().

◆ passFBO

GLuint ACView::passFBO[2] = {0, 0}
private

Definition at line 11750 of file ACMX2/acmx.cpp.

Referenced by ensurePassTargets(), and ~ACView().

◆ passTexture

GLuint ACView::passTexture[2] = {0, 0}
private

Definition at line 11751 of file ACMX2/acmx.cpp.

Referenced by convertResourcesToHdr(), ensurePassTargets(), and ~ACView().

◆ pboIds

GLuint ACView::pboIds[2] = {0, 0}
private

Definition at line 7205 of file ACMX2/acmx.cpp.

Referenced by flushPBOs(), load(), and ~ACView().

◆ pboIndex

int ACView::pboIndex = 0
private

Definition at line 7209 of file ACMX2/acmx.cpp.

◆ pboNextIndex

int ACView::pboNextIndex = 1
private

Definition at line 7210 of file ACMX2/acmx.cpp.

Referenced by ~ACView().

◆ playlist_enabled

bool ACView::playlist_enabled = false

Definition at line 7803 of file ACMX2/acmx.cpp.

Referenced by autopilotRandomSwitch(), autopilotSequentialAdvance(), and event().

◆ playlist_file

std::string ACView::playlist_file

Definition at line 7804 of file ACMX2/acmx.cpp.

Referenced by load().

◆ playlist_index

int ACView::playlist_index = 0

Definition at line 7802 of file ACMX2/acmx.cpp.

Referenced by autopilotRandomSwitch(), autopilotSequentialAdvance(), and event().

◆ playlist_indices

std::vector<int> ACView::playlist_indices

◆ playlist_tree

std::vector<PlaylistNode> ACView::playlist_tree

◆ png_video_dir

std::string ACView::png_video_dir
private

Definition at line 11841 of file ACMX2/acmx.cpp.

Referenced by beginMuxing(), load(), startWriterThread(), and stopWriterThread().

◆ png_video_frame_counter

std::atomic<uint64_t> ACView::png_video_frame_counter {0}
private

◆ png_video_mode

bool ACView::png_video_mode = false
private

◆ prefix_path

std::string ACView::prefix_path
private

Definition at line 11720 of file ACMX2/acmx.cpp.

Referenced by ACView(), and startWriterThread().

◆ preOverlayFBO

GLuint ACView::preOverlayFBO = 0
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().

◆ preOverlayTexture

GLuint ACView::preOverlayTexture = 0
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().

◆ queueCondVar

std::condition_variable ACView::queueCondVar
private

◆ queueMutex

std::mutex ACView::queueMutex
private

Definition at line 11789 of file ACMX2/acmx.cpp.

Referenced by flushPBOs(), startWriterThread(), and ~ACView().

◆ random_multipass_mode

bool ACView::random_multipass_mode = false

Definition at line 7853 of file ACMX2/acmx.cpp.

Referenced by event().

◆ raw_snapshot_state

int ACView::raw_snapshot_state = 0
private

Definition at line 11736 of file ACMX2/acmx.cpp.

Referenced by event().

◆ recording_pbo_primed

bool ACView::recording_pbo_primed = false
private

Definition at line 11807 of file ACMX2/acmx.cpp.

Referenced by draw(), and ~ACView().

◆ recording_pbo_timeline_frame

uint64_t ACView::recording_pbo_timeline_frame[2] = {0, 0}
private

Definition at line 7212 of file ACMX2/acmx.cpp.

Referenced by ~ACView().

◆ recording_pbo_uses_timeline_clock

bool ACView::recording_pbo_uses_timeline_clock[2] = {false, false}
private

Definition at line 7211 of file ACMX2/acmx.cpp.

Referenced by ~ACView().

◆ repeat

bool ACView::repeat = false
private

◆ running

std::atomic<bool> ACView::running {false}
private

Definition at line 11785 of file ACMX2/acmx.cpp.

Referenced by draw(), load(), requestStop(), requestStopNoMux(), and startCaptureThread().

◆ saved_pass_enabled

bool ACView::saved_pass_enabled = false

Definition at line 7815 of file ACMX2/acmx.cpp.

Referenced by event().

◆ saved_pass_enabled_before_random

bool ACView::saved_pass_enabled_before_random = false

Definition at line 7855 of file ACMX2/acmx.cpp.

Referenced by event().

◆ saved_pass_list

std::vector<int> ACView::saved_pass_list

Definition at line 7814 of file ACMX2/acmx.cpp.

Referenced by event().

◆ saved_pass_list_before_random

std::vector<int> ACView::saved_pass_list_before_random

Definition at line 7854 of file ACMX2/acmx.cpp.

Referenced by event().

◆ saved_shader_index_before_random

size_t ACView::saved_shader_index_before_random = 0

Definition at line 7856 of file ACMX2/acmx.cpp.

Referenced by event().

◆ sessionStartTime

std::chrono::steady_clock::time_point ACView::sessionStartTime

Definition at line 8551 of file ACMX2/acmx.cpp.

Referenced by load().

◆ shader_pass_enabled

◆ shader_pass_list

◆ shaderLocked

bool ACView::shaderLocked = false
private

Definition at line 7204 of file ACMX2/acmx.cpp.

Referenced by autopilotRandomSwitch(), autopilotSequentialAdvance(), and event().

◆ silent_mode

bool ACView::silent_mode = false
private

◆ sizec

std::optional<cv::Size> ACView::sizec
private

Definition at line 11724 of file ACMX2/acmx.cpp.

Referenced by ACView(), and load().

◆ sizev

std::optional<cv::Size> ACView::sizev
private

Definition at line 11724 of file ACMX2/acmx.cpp.

Referenced by ACView(), and load().

◆ skip_audio_mux_on_exit

std::atomic<bool> ACView::skip_audio_mux_on_exit {false}
private

◆ snapshot_pool

SnapshotThreadPool ACView::snapshot_pool {2}
private

Definition at line 7213 of file ACMX2/acmx.cpp.

Referenced by startWriterThread().

◆ snapshot_state

int ACView::snapshot_state = 0
private

Definition at line 11734 of file ACMX2/acmx.cpp.

Referenced by event().

◆ snapshotOffset

std::atomic<uint64_t> ACView::snapshotOffset {0}
private

Definition at line 11828 of file ACMX2/acmx.cpp.

Referenced by startWriterThread().

◆ source_frame_ready

bool ACView::source_frame_ready = false
private

Definition at line 11801 of file ACMX2/acmx.cpp.

Referenced by startMediaTimelineIfReady().

◆ spectrum_scale_by_sense

bool ACView::spectrum_scale_by_sense = false
private

When true, scale spectrum 1D buffer by audio sensitivity.

Definition at line 6567 of file ACMX2/acmx.cpp.

Referenced by event().

◆ spectrumHistory

SpectrumHistory ACView::spectrumHistory {audio_engine.analyzer()}
private

Runtime-sized FFT history array.

Definition at line 6562 of file ACMX2/acmx.cpp.

Referenced by ~ACView().

◆ spectrumTex

SpectrumTexture ACView::spectrumTex {audio_engine.analyzer()}
private

1D FFT magnitude texture for shaders.

Definition at line 6561 of file ACMX2/acmx.cpp.

Referenced by ~ACView().

◆ sprite

◆ tex_uploader

TextureUploader ACView::tex_uploader
private

Definition at line 7214 of file ACMX2/acmx.cpp.

Referenced by draw(), load(), and ~ACView().

◆ texture_cache

bool ACView::texture_cache = false
private

Definition at line 11797 of file ACMX2/acmx.cpp.

Referenced by ACView(), bindPassHistoryTextures(), draw(), load(), and ~ACView().

◆ texture_cache_array

bool ACView::texture_cache_array = false
private

Definition at line 11798 of file ACMX2/acmx.cpp.

Referenced by ACView(), bindPassHistoryTextures(), draw(), and load().

◆ tiff_snapshot_state

int ACView::tiff_snapshot_state = 0
private

Definition at line 11737 of file ACMX2/acmx.cpp.

Referenced by event().

◆ totalFrames

double ACView::totalFrames = 0
private

◆ use_ffmpeg_reader

bool ACView::use_ffmpeg_reader = false
private

Definition at line 11741 of file ACMX2/acmx.cpp.

Referenced by draw(), and load().

◆ use_shader_cache_flag

bool ACView::use_shader_cache_flag = true
private

Definition at line 11835 of file ACMX2/acmx.cpp.

Referenced by ACView(), and load().

◆ use_yuv

bool ACView::use_yuv = false
private

Definition at line 11837 of file ACMX2/acmx.cpp.

Referenced by load().

◆ viewRotationActive

bool ACView::viewRotationActive = false
private

Definition at line 11818 of file ACMX2/acmx.cpp.

Referenced by event().

◆ waterFont

mx::Font ACView::waterFont

Definition at line 8546 of file ACMX2/acmx.cpp.

Referenced by load().

◆ waterFontSize

int ACView::waterFontSize = 12
private

Definition at line 11851 of file ACMX2/acmx.cpp.

Referenced by load().

◆ watermark_b

int ACView::watermark_b = 150
private

Watermark color blue.

Definition at line 11855 of file ACMX2/acmx.cpp.

Referenced by ACView().

◆ watermark_g

int ACView::watermark_g = 0
private

Watermark color green.

Definition at line 11854 of file ACMX2/acmx.cpp.

Referenced by ACView().

◆ watermark_r

int ACView::watermark_r = 255
private

Watermark color red.

Definition at line 11853 of file ACMX2/acmx.cpp.

Referenced by ACView().

◆ watermark_text

std::string ACView::watermark_text = "LostSideDead.biz"
private

Active watermark text (overridden by –use-watermark).

Definition at line 11852 of file ACMX2/acmx.cpp.

◆ waveActive

bool ACView::waveActive = false
private

Definition at line 11820 of file ACMX2/acmx.cpp.

Referenced by event().

◆ win_h

int ACView::win_h = 0
private

Definition at line 11860 of file ACMX2/acmx.cpp.

Referenced by setupCaptureFBO(), and ~ACView().

◆ win_w

int ACView::win_w = 0
private

Definition at line 11859 of file ACMX2/acmx.cpp.

Referenced by setupCaptureFBO(), and ~ACView().

◆ writer

◆ writerRunning

std::atomic<bool> ACView::writerRunning {false}
private

Definition at line 11787 of file ACMX2/acmx.cpp.

Referenced by beginMuxing(), draw(), startWriterThread(), and stopWriterThread().

◆ writerThread

std::thread ACView::writerThread
private

Definition at line 11784 of file ACMX2/acmx.cpp.

Referenced by beginMuxing(), startWriterThread(), and stopWriterThread().


The documentation for this class was generated from the following file: