64 Commits

Author SHA1 Message Date
John Bradley
a5e0462a88 deps-libff: set master clock sync type based on default stream 2015-03-19 14:40:24 -05:00
John Bradley
6e42f38386 deps-libff: Add master/slave deferred clock methods
Enables clocks to wait if the main sync clock has not been started yet.  An example of this is a video stream (video/audio) being synced to the video clock.  If an audio frame gets produced before the video clock has started it will wait.
2015-03-19 14:40:19 -05:00
John Bradley
5b3190593c deps-libff: Add reference counting to clock
Add referencing counting to determine when to release a clock Due to no fixed ownership of clocks (packets, frames, decoders and  refresh thread all may own a clock at some point).
2015-03-19 11:56:00 -05:00
kc5nra
164cbeeede deps-libff: Add atomic long inc/dec functions 2015-03-19 11:56:00 -05:00
John Bradley
47783f26c7 deps-libff: Abort timer thread instead of cancelling 2015-03-19 11:56:00 -05:00
John Bradley
7a4a5e3fad deps-libff: Move timer callback outside of lock 2015-03-19 11:55:51 -05:00
John Bradley
d9fe44f021 deps-libff: Only sleep if the timed wait didn't expire 2015-03-19 11:55:43 -05:00
John Bradley
de574e99e3 deps-libff: Fix bug where rel time was used instead of abs
The bug was undetected because it accidentally fell into an error case that slept the correct amount of time.  pthread_cond_timedwait takes an absolute time in the future to wait until.  The value we were passing was always in the past so it was immediately failing with a TIMEDOUT error code.
2015-03-19 11:55:23 -05:00
John Bradley
2b3d82aeac deps-libff: Add flag whether a decoder is hardware accelerated
This lets the decoder make decisions based on whether it is a hardware decoder or not.  Specifically, hardware decoders are more strict as to which frames can be dropped in an h264 stream.
2015-03-19 11:54:53 -05:00
John Bradley
b91a98ed44 deps-libff: Refactor AVPacket into ff_packet
This also replaces AVPacketList with ff_packet_list.
2015-03-19 11:54:51 -05:00
John Bradley
a7e81d6f3f deps-libff: (unsigned char *) -> (uint8_t *) cast fix 2015-03-19 11:53:13 -05:00
John Bradley
361522198e deps-libff: Workaround to PNG multithreaded bug in ffmpeg
FFMpeg has an issue where png decoding will not correctly
begin until its optimal-thread-detection finishes in
multi-threaded mode. This unfortunately is after decoding
has begun.
2015-03-10 12:55:53 -05:00
John Bradley
b3fddc9f53 obs-ffmpeg: Support interrupt callbacks for both av input styles 2015-03-10 12:47:08 -05:00
kc5nra
5d6a4e5172 deps-libff: Add libff library to deps
This library wraps the ffmpeg library and adds some utility
functions and types.
2015-03-09 21:22:32 -05:00