Including winsock2.h or windows.h without WIN32_LEAN_AND_MEAN cause
bzlib.h to parse as nonsense, due to an instance of #define char small
in rpcndr.h.
See:
https://stackoverflow.com/a/27794577
Signed-off-by: L. E. Segovia <amy@amyspark.me>
Signed-off-by: Martin Storsjö <martin@martin.st>
Up until now, we had a PacketList structure which is actually
a PacketListEntry; a proper PacketList did not exist
and all the related functions just passed pointers to pointers
to the head and tail elements around. All these pointers were
actually consecutive elements of their containing structs,
i.e. the users already treated them as if they were a struct.
So add a proper PacketList struct and rename the current PacketList
to PacketListEntry; also make the functions use this structure
instead of the pair of pointers.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
fix regression introduced in 911ba8417e.
Removal of WINAPI decoration from function signatures caused crashed
when using dshow on x86.
Fixes#9568
Signed-off-by: Diederick Niehorster <dcnieho@gmail.com>
Reviewed-by: Roger Pack <rogerdpack2@gmail.com>
The dshow avdevice ignores timestamps for video frames provided by the
DirectShow device, instead using wallclock time, apparently because the
implementer of this code had a device that provided unreliable
timestamps. Me (and others) would like to use the device's timestamps.
The new use_video_device_timestamps option for dshow device enables them
to do so. Since the majority of video devices out there probably provide
fine timestamps, this patch sets the default to using the device
timestamps, which means best fidelity timestamps are used by default.
Using the new option, the user can switch this off and revert to the old
behavior, so a fall back remains available in case the device provides
broken timestamps.
add use_video_device_timestamps to docs.
Closes: #8620
Signed-off-by: Diederick Niehorster <dcnieho@gmail.com>
Reviewed-by: Roger Pack <rogerdpack2@gmail.com>
The next pointer is kept at the end for backwards compatability until the
major bump, when it should ideally be moved at the front.
Signed-off-by: James Almer <jamrial@gmail.com>
actually have both video and audio output pins, so make the audio pins
accessible by video source name.
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Ensures that the header include order is such that winsock2.h is always
included before windows.h or that windows.h does not include winsock.h.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Handling DirectShow events prevents infinite loops when there is an error in
the graph, such as a device being disconnected. This makes it possible for
dshow to return an error to the caller and run the cleanup code.
Based on patch by Don Moir <donmoir@comcast.net>.
Move the NO_DSHOW_STRSAFE macro definition in front of the dshow.h
system header inclusion.
This excludes the usage of the STRSAFE functions consistently.
Further background on this can be found in the commit message of
revision 05ee0db1 where the #define was initially introduced.
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
WINBOOL is MinGW-specific, and since both MSVC and MinGW
have BOOL, use that instead.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>