makepad_platform/os/windows/
windows_decoding.rs1use {
2    crate::{
3        cx::Cx,
4        decoding_api::{CxDecodingApi, VideoDecodingInputFn},
5        makepad_live_id::LiveId,
6    },
7    std::{
8        collections::HashMap,
9        sync::{Arc, Mutex},
10    },
11};
12
13#[derive(Default)]
14pub struct CxWindowsDecoding {
15    pub video_decoding_input_cb: HashMap<LiveId, Arc<Mutex<Option<VideoDecodingInputFn>>>>,
16}
17
18impl Cx {}
19
20impl CxDecodingApi for Cx {
21    fn video_decoding_input_box(&mut self, video_id: LiveId, f: VideoDecodingInputFn) {
22        let callback = Arc::new(Mutex::new(Some(f)));
23        self.os
24            .decoding
25            .video_decoding_input_cb
26            .insert(video_id, callback);
27    }
28}