Recherche avancée

Médias (0)

Mot : - Tags -/optimisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (112)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (12802)

  • ffmpeg converting RTSP to HLS stops working after hours

    28 juin 2019, par lin wang

    I’m using ffmpeg to convert RTSP stream to HLS, here is the command :

    ffmpeg -rtsp_transport tcp -i rtsp ://address/9012120.smil -vcodec copy -acodec copy -fflags +genpts -f hls -hls_wrap 5 -hls_list_size 2 -hls_time 3 /dev/shm/live/1/v.m3u8

    It worked properly at the beginning, but after hours(sometimes 8 hours sometimes less),it just stopped updating .ts files but the ffmpeg process was still running, so the hls stream just stuck.
    Check the log, no error log at the moment of the converting stopping,but before that there were some warning logs as below :

    [hls @ 0x57602c0] Non-monotonous DTS in output stream 0:1 ; previous : 5957536600,
    current : 2744367719 ; changing to 5957536601. This may result in incorrect timestamps in the output file.

    Any idea how to fix this ?

  • Rust Win32 FFI : User-mode data execution prevention (DEP) violation

    28 avril 2022, par TheElix

    I'm trying to pass a ID3D11Device instance from Rust to a C FFI Library (FFMPEG).

    


    I made this sample code :

    


    pub fn create_d3d11_device(&amp;mut self, device: &amp;mut Box, context: &amp;mut Box) {&#xA;            let av_device : Box<avbufferref> = self.alloc(HwDeviceType::D3d11va);&#xA;            unsafe {&#xA;                let device_context = Box::from_raw(av_device.data as *mut AVHWDeviceContext);&#xA;                let mut d3d11_device_context = Box::from_raw(device_context.hwctx as *mut AVD3D11VADeviceContext);&#xA;                d3d11_device_context.device = device.as_mut() as *mut _;&#xA;                d3d11_device_context.device_context = context.as_mut() as *mut _;&#xA;                let avp = Box::into_raw(av_device);&#xA;                av_hwdevice_ctx_init(avp);&#xA;                self.av_hwdevice = Some(Box::from_raw(avp));&#xA;            }&#xA;        }&#xA;</avbufferref>

    &#xA;

    On the Rust side the Device does work, but on the C side, when FFMEPG calls ID3D11DeviceContext_QueryInterface the app crashes with the following error : Exception 0xc0000005 encountered at address 0x7ff9fb99ad38: User-mode data execution prevention (DEP) violation at location 0x7ff9fb99ad38

    &#xA;

    The address is actually the pointer for the lpVtbl of QueryInterface, like seen here :

    &#xA;

    The disassembly of the address also looks correct (this is done on an another debugging session) :

    &#xA;

    (lldb) disassemble --start-address 0x00007ffffdf3ad38&#xA;    0x7ffffdf3ad38: addb   %ah, 0x7ffffd(%rdi,%riz,8)&#xA;    0x7ffffdf3ad3f: addb   %al, (%rax)&#xA;    0x7ffffdf3ad41: movabsl -0x591fffff80000219, %eax&#xA;    0x7ffffdf3ad4a: outl   %eax, $0xfd&#xA;

    &#xA;

    Do you have any pointer to debug this further ?

    &#xA;

    EDIT : I made a Minimal Reproducion Sample. Interestingly this does not causes a DEP Violation, but simply a Segfault.

    &#xA;

    On the C side :

    &#xA;

    int test_ffi(ID3D11Device *device){&#xA;    ID3D11DeviceContext *context;&#xA;    device->lpVtbl->GetImmediateContext(device, &amp;context);&#xA;    if (!context) return 1;&#xA;    return 0;&#xA;}&#xA;

    &#xA;

    On the Rust side :

    &#xA;

    unsafe fn main_rust(){&#xA;    let mut device = None;&#xA;    let mut device_context = None;&#xA;    let _ = match windows::Win32::Graphics::Direct3D11::D3D11CreateDevice(None, D3D_DRIVER_TYPE_HARDWARE, OtherHinstance::default(), D3D11_CREATE_DEVICE_DEBUG, &amp;[], D3D11_SDK_VERSION, &amp;mut device, std::ptr::null_mut(), &amp;mut device_context) {&#xA;        Ok(e) => e,&#xA;        Err(e) => panic!("Creation Failed: {}", e)&#xA;    };&#xA;    let mut device = match device {&#xA;        Some(e) => e,&#xA;        None => panic!("Creation Failed2")&#xA;    };&#xA;    let mut f2 : ID3D11Device = transmute_copy(&amp;device); //Transmuting the WinAPI into a bindgen ID3D11Device&#xA;    test_ffi(&amp;mut f2);&#xA;}&#xA;

    &#xA;

    The bindgen build.rs :

    &#xA;

    extern crate bindgen;&#xA;&#xA;use std::env;&#xA;use std::path::PathBuf;&#xA;&#xA;fn main() {&#xA;    // Tell cargo to tell rustc to link the system bzip2&#xA;    // shared library.&#xA;    println!("cargo:rustc-link-lib=ffi_demoLIB");&#xA;    println!("cargo:rustc-link-lib=d3d11");&#xA;&#xA;    // Tell cargo to invalidate the built crate whenever the wrapper changes&#xA;    println!("cargo:rerun-if-changed=library.h");&#xA;&#xA;    // The bindgen::Builder is the main entry point&#xA;    // to bindgen, and lets you build up options for&#xA;    // the resulting bindings.&#xA;    let bindings = bindgen::Builder::default()&#xA;        // The input header we would like to generate&#xA;        // bindings for.&#xA;        .header("library.h")&#xA;        // Tell cargo to invalidate the built crate whenever any of the&#xA;        // included header files changed.&#xA;        .parse_callbacks(Box::new(bindgen::CargoCallbacks))&#xA;        .blacklist_type("_IMAGE_TLS_DIRECTORY64")&#xA;        .blacklist_type("IMAGE_TLS_DIRECTORY64")&#xA;        .blacklist_type("PIMAGE_TLS_DIRECTORY64")&#xA;        .blacklist_type("IMAGE_TLS_DIRECTORY")&#xA;        .blacklist_type("PIMAGE_TLS_DIRECTORY")&#xA;        // Finish the builder and generate the bindings.&#xA;        .generate()&#xA;        // Unwrap the Result and panic on failure.&#xA;        .expect("Unable to generate bindings");&#xA;&#xA;    // Write the bindings to the $OUT_DIR/bindings.rs file.&#xA;    let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());&#xA;    bindings&#xA;        .write_to_file(out_path.join("bindings.rs"))&#xA;        .expect("Couldn&#x27;t write bindings!");&#xA;}&#xA;

    &#xA;

    The Complete Repo can be found over here : https://github.com/TheElixZammuto/demo-ffi

    &#xA;

  • imc : add required padding for GetBitContext buffer

    8 juin 2015, par Janne Grunau
    imc : add required padding for GetBitContext buffer
    

    Fixes stack buffer overflow errors detected by address sanitizer in
    fate-imc.

    CC : libav-stable@libav.org

    • [DH] libavcodec/imc.c