Isaac Connor
a76128e9c4
include monitor->Importance when logging failed camera connects
2022-01-01 18:56:13 -05:00
Isaac Connor
96b4af6255
Enable multi-threading on decode
2021-11-17 14:43:13 -05:00
Isaac Connor
ac375bc623
fix errant =
2021-09-27 11:03:29 -04:00
Isaac Connor
202d95fc5a
handle AV_HWDEVICE_TYPE_MMAL not being defined
2021-09-27 10:58:16 -04:00
Isaac Connor
aae967e895
Add mmal device/pix fmt type
2021-09-23 16:39:35 -04:00
Isaac Connor
30fa641186
initialize video_first_pts and when setting it need to specify microseconds otherwise we get nanoseconds. White space.
2021-09-21 14:29:05 -04:00
Peter Keresztes Schmidt
d69afc9672
misc: Convert time(nullptr) calls to std::chrono
2021-06-13 23:22:51 +02:00
Peter Keresztes Schmidt
2d71743372
FFmpeg: Remove code paths required only by 2.8 and older
...
With Xenial support dropped we require FFmpeg 3.2 and newer.
2021-06-05 20:40:12 +02:00
Peter Keresztes Schmidt
0625f6ca1c
Misc: Cleanup some includes
2021-06-05 15:08:38 +02:00
Peter Keresztes Schmidt
762476ec76
Build: Promote libswscale to a required dependency
...
FFmpeg is an integral component of ZM. Promote the appropriate libraries to required dependencies.
This reduces the possible build configurations greatly and thus maintenance burden.
2021-06-05 14:27:31 +02:00
Peter Keresztes Schmidt
7d15396833
Build: Promote libavformat to a required dependency
...
FFmpeg is an integral component of ZM. Promote the appropriate libraries to required dependencies.
This reduces the possible build configurations greatly and thus maintenance burden.
2021-06-05 14:25:27 +02:00
Isaac Connor
cca30661d7
remove invalid debug
2021-06-04 17:42:00 -04:00
Isaac Connor
205c488741
spacing
2021-06-04 15:01:57 -04:00
Peter Keresztes Schmidt
5d93555d9f
Crypto: Use new hashing API
2021-05-30 22:56:21 +02:00
Peter Keresztes Schmidt
d413f3c78f
FfmpegCamera/Videostore: Disable hwaccel for ffmpeg found in Debian Stretch
...
The av_hwdevice_* API is not complete in 3.2. Enable hwaccel from 3.4 onwards.
2021-05-24 23:20:30 +02:00
Isaac Connor
2cf6ad8089
Switch ZMPacket * to a shared_ptr<ZMPacket>. This is so that in LockedPacket we can unlock and then notify and be confident that packet_ won't have been deleted. Change ZMPacket->timestamp to be a timeval instead of timeval *. This might not have been necessary but I like it. No longer cuse the ZMPacket object to wrap the shared image buffers and timestamps. Use a vector for image_buffers.
2021-05-08 21:14:20 -04:00
Peter Keresztes Schmidt
68bedfe48f
Fix logging format string mismatches
...
* Remove SZFMTD format macro and use %zu instead for size_t. %zu is understood by every compiler nowadays.
2021-04-30 00:26:24 +02:00
Isaac Connor
b62e8f7a81
mFormatContextPtr doesn't need to be a class member
2021-04-20 13:58:23 -04:00
Isaac Connor
7970bfd3d8
Implement a 10 second timeout in ffmpeg_camera. read_frame can block forever otherwise
2021-04-17 12:50:26 -04:00
Isaac Connor
f077ec6145
Take first PTS into account when calculating last pts for figuring out which input to use.
2021-04-11 16:35:16 -04:00
Isaac Connor
594cebbcb1
Increase debugging level of input choice
2021-04-11 13:23:21 -04:00
Isaac Connor
526b44b377
fix crash by using the correct FormatContext when dumping stream info
2021-04-11 12:44:59 -04:00
Peter Keresztes Schmidt
545f0dbb96
utils: cleanup Base64Encode
2021-04-04 00:39:40 +02:00
Isaac Connor
8fa989f8e9
Increase debug level of input selection
2021-03-16 20:07:06 -04:00
Isaac Connor
5f476df194
Fix invalid read when no mAudioStream
2021-03-04 13:35:39 -05:00
Isaac Connor
253ed928ec
Fix using wrong stream to set codec_type
2021-03-03 15:24:11 -05:00
Isaac Connor
eaaf04420a
Keep track of stream last_pts. So we can at least try to sync streams
2021-03-03 12:45:05 -05:00
Isaac Connor
b87d859f72
Set the packet's stream_index to the packetqueue stream. Rename get_ functions to get
2021-03-03 12:06:34 -05:00
Isaac Connor
4cc1da8b89
Add SecondFormatContext and open it using an FFmpeg_Input
2021-03-03 09:55:57 -05:00
Isaac Connor
95fe689d58
WIP, rabbit hole too deep
2021-03-03 09:55:57 -05:00
Isaac Connor
a81e3d6e19
Set zm_packet.pts scaled to AV_TIME_BASE_Q.
2021-03-01 16:47:18 -05:00
Peter Keresztes Schmidt
f43507dce0
Use the power of smart pointers to manage Monitor instances
2021-02-07 21:20:45 +01:00
Isaac Connor
e5f39e78c6
Merge pull request #3133 from Carbenium/dump-packet
...
ffmpeg: exit dumpPacket early if debug logging is not enabled
2021-02-07 10:40:58 -05:00
Peter Keresztes Schmidt
938676b129
ffmpeg: exit dumpPacket early if debug logging is not enabled
2021-02-07 11:58:17 +01:00
Isaac Connor
7f99635763
Fix xenial builds. Fixes #3130
2021-02-05 12:30:51 -05:00
Peter Keresztes Schmidt
0dbc39ee25
Cleanup and reorganize includes
...
With this commit a unified structure for includes is introduced.
The general rules:
* Only include what you need
* Include wherever possible in the cpp and forward-declare in the header
The includes are sorted in a local to global fashion. This means for the include order:
0. If cpp file: The corresponding h file and an empty line
1. Includes from the project sorted alphabetically
2. System/library includes sorted alphabetically
3. Conditional includes
2021-02-04 18:02:01 +01:00
Isaac Connor
5f7f066a4f
Better to alloc context with codec
2021-01-29 14:03:48 -05:00
Isaac Connor
335c1b1404
populate mVideoStream and mAudioStream so we don't allocate new ones later
2021-01-28 10:45:39 -05:00
Isaac Connor
7ff38a3a5c
Remove unused code from FFmpegCamera
2021-01-28 10:11:26 -05:00
Isaac Connor
bbba0f679b
Don't need to set timebase. Continue supporting old ffmpeg
2021-01-27 11:48:32 -05:00
Isaac Connor
c94e2c0f13
cleanup
2021-01-22 19:24:27 -05:00
Isaac Connor
736b14327e
allocate our own CodecContext for decoding. Reusing the existing one doesn't work for hwaccel. Add hwaccel flags to let it use Constrained Baseline for Baseline profile streams. Try without specified device if hwdevice_ctx_create fails.
2021-01-08 15:48:01 -05:00
Isaac Connor
f729034e9f
improve hwaccel support
2021-01-07 15:11:46 -05:00
Isaac Connor
d6bbc9bbbb
Set codec_type in ffmpeg_camera instead of in monitor
2020-12-27 11:56:44 -05:00
Isaac Connor
8d52baeee2
Merge branch 'master' into rtsp_server
...
Cleanup Analysis a bit. We can't skip packets just because they are audio. Clean up the state machine transitions a bit to make them a little more readable.
Change logic of PrimeCapture, success MUST return 1. 0 means no error but also no success.
Debugging and braces improvements in local_camera.
2020-12-17 10:16:54 -05:00
Isaac Connor
7b1ca0e66d
Use the new DecodingEnabled function
2020-12-10 14:05:57 -05:00
Isaac Connor
c65e63798d
Don't do decode when in RECORD OR NODECT and passthrough and no jpegs
2020-12-10 13:47:30 -05:00
Isaac Connor
f3f0a6baff
remove debug
2020-10-26 18:48:43 -04:00
Isaac Connor
1173f618ec
turn off negative pts detection... I have cameras that generate them all the time, they might actually be valid
2020-10-08 15:50:52 -04:00
Isaac Connor
a39a656373
Merge branch 'master' into zma_to_thread
2020-09-29 11:02:40 -04:00