Skip to content
Snippets Groups Projects
Commit c7d9a5cd authored by edgomez's avatar edgomez Committed by Jean-Baptiste Kempf
Browse files

dshow: try to improve multithreading code for RAW sample grabbing


# 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>
parent 0dd04d07
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment