Skip to content
  • edgomez's avatar
    dshow: try to improve multithreading code for RAW sample grabbing · c7d9a5cd
    edgomez authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
    
    
    # HG changeset patch
    # User Edouard Gomez <ed.gomez@free.fr>
    # Date 1224021637 -7200
    # Node ID 0c4727aa17ba532172cae4aded7d16d70ea4ea53
    # Parent  8e7c3f94407dc1500438237ac6bf3d484bfba742
    dshow: try to improve multithreading code for RAW sample grabbing
    
    This patch tries to address two theoritical problems:
     - The filter capturepin should not lock p_sys->lock. By chance, win32 mt
       locking is recursive by default.
        - Do not lock again, this makes things clearer for poor POSIX coders like
          me.
     - The current code does not try to push samples as fast as it receives them.
       This is caused by the arbitrary msleep call which can differ sample delivery
       with up to 10ms delay. Moreover, only a single sample at a time was processed
       either for audio or for video.
        - Use MT condition instead of sleep so no artificial delay is introduced in
          the delivery chain.
        - Process all available samples at once.
    
    Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
    c7d9a5cd