Commit Graph

144 Commits

Author SHA1 Message Date
Dean Lee 3863a88356 tools/replay: replace deprecated usleep(0) with std::this_thread::yield (#23544)
* use std::this_thread::yield()

* use yield in cameraServer::waitFinish

* rename waitFinish to waitForSent
2022-05-12 15:11:04 +02:00
Anton Rudomanenko 3bfe4a691c fix the problem with replay routes locally (#24350)
fix: fix the problem with replay routes locally

Co-authored-by: Anton Rudomaneko <anton.rudomanenko@nami.ru>
2022-05-12 14:58:35 +02:00
Joost Wooning 43f43b1c64 UI: use YUV stream instead of RGB (#24317)
* UI: use YUV stream instead of RGB

* cleanup

* cleanup
2022-04-25 21:07:08 +02:00
Adeeb Shihadeh 13e1c0b339 Revert "UI: remove RGB buffer usage (#24298)"
This reverts commit b9907e86b2.
2022-04-24 11:56:30 -07:00
Joost Wooning b9907e86b2 UI: remove RGB buffer usage (#24298)
* ui: use yuv buffer

* cleanup

* fix watch3

* replay always send yuv

* fix drawing of path

* fix onroad test

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-04-22 12:55:37 -07:00
Willem Melching b379fca0ae route.cc: include <array> 2022-04-06 07:34:11 -07:00
Willem Melching 34a8a5ea76 api.cc: expose error type in requestDone signal (#24064)
* put error in requestDone

* only check in tools
2022-03-30 12:12:33 +02:00
Cameron Clough 602cbfcba0 replay: fix wrong format code in print (#24006) 2022-03-20 16:53:42 -07:00
Gijs Koning 57b6fdc17a Rename RGB vision streams to match YUV streams (#23961)
* Renaming VISION_STREAM_RGB_.. to match yuv names like VISION_STREAM_ROAD
VISION_STREAM_RGB_BACK -> VISION_STREAM_RGB_ROAD
VISION_STREAM_RGB_FRONT -> VISION_STREAM_RGB_DRIVER

* little more

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-14 14:03:54 -07:00
Willem Melching dc7de79dc9 replay: use VideoToolbox HW decoder on Mac (#23832)
* replay: support VideoToolbox HW decoding

* rename flag

* remove debug assert
2022-02-23 13:52:50 +01:00
Willem Melching df88280e0f replay: use QCoreApplication (#23831) 2022-02-23 13:34:31 +01:00
Willem Melching 724bab8ef3 Update raw_logger/framereader to new new ffmpeg api (#23799)
* Update raw_logger/framereader to new new ffmpeg api

* Can be removed now

* Handled by avcodec_free_context

* handle EAGAIN and clean up
2022-02-21 16:39:32 +01:00
Dean Lee 786152f0f1 remove trailing whitespaces (#23716) 2022-02-06 10:42:41 -08:00
Jonathan Frey a39e635b5c replay: fix pause key doc (#23697) 2022-02-03 09:59:07 -08:00
Dean Lee fa3a787e9a replay: fix wrong logging for local route (#23652) 2022-01-28 12:03:19 -08:00
Dean Lee 520c99a050 replay: add test case for local route (#23650)
* add test for local route

* retry download on network error

* sleep 500ms before retry

* read 100 frames

* read more segments from route

* add REQUIRE
2022-01-28 12:02:29 -08:00
Dean Lee 2f91441382 replay: cleanup functions (#23655)
* cleanup function seek

* cleanup signals&slots

* use false

* add comment back
2022-01-28 12:02:11 -08:00
Dean Lee a901104a96 log error on avcodec_receive_frame (#23649) 2022-01-27 19:35:18 -08:00
Dean Lee 3ca8e3653b replay: ncurses GUI (#23608)
* initial version

* print all message's in ncurses window

* show download progress bar

* move all to class ConsoleUI

* timeline

* improve timeline&stats

* fix logMessage

* add warning indicator

* continue

* cleanup

* cast type to int

* simplify seekToFlag

* more

* <=

* handle enter

* add box to logging window

* fix multiple threads problem

* fix concurrency issues

* draw indicator

* many improvements

* more

* fix multipe threads logging

* stop replay before exit

* use lambda instead of std::bind

* cleanup

* small cleanup

* use carFingerPrint

* don't emit signal in replay::stream

* merge car_events into timeline

* cleanup DonloadStats

* cleanup

* rename carname to carFingerprint

* improve alert

* add comments

* add help functions

templete function

* handle term resize

* display replaying status

* rename to INSTANT

* helper function pauseReplay

* more

* cleanup

use rDebug

* no template

* less colors

* remove function mv_add_str

* use BORDER_SIZE

* tune colors

* add spaces

* apply reviews

use /
2022-01-27 13:17:41 -08:00
Dean Lee 86d730774d replay: handle abort in getRemoteFileSize (#23427) 2022-01-06 15:56:14 +01:00
Cameron Clough 64caee88eb replay: add missing import for std::optional (#23416) 2022-01-05 09:19:51 -08:00
Dean Lee d2948f250b replay: Add next engagement / disengagement jump capabilities (#23248)
* seek engament/disengament in qlogs

* cleanup

* cleanup

* little more

* add output

* remove qinfo

* fix typo

* do nothing if tm less than current mono time

* const

* short variable name

* lgtm
2022-01-04 16:02:04 +01:00
Dean Lee 937a0df57b replay/logreader: handle abort in load (#23321)
* handle abort

* handle abort in decompressBZ2
2022-01-04 12:06:23 +01:00
Dean Lee 8dd8b1905b replay tests: retry on network failure (#23383) 2022-01-03 20:10:57 -08:00
Dean Lee 1e309a51f5 replay: add flag to disable video (#23353) 2022-01-02 11:54:49 -08:00
Dean Lee 58a363e07d replay/segment: pass member function pointer to QtConcurrent::run (#23312) 2021-12-28 11:38:31 +01:00
Dean Lee de6126ba06 replay: add flag REPLAY_FLAG_FULL_SPEED to play at full speed (#23324)
* add flag REPLAY_FLAG_FULL_SPEED

* use hasFlag
2021-12-28 11:37:33 +01:00
Dean Lee 21fc9d5375 replay/util: initialize curl at startup (#23314) 2021-12-27 13:22:42 -08:00
Dean Lee c9da1403bc replay: fix segfault or hanging on quit (#23323) 2021-12-27 13:02:18 -08:00
Dean Lee 94e435cede replay/camera: use existing YUV_BUFFER_COUNT (#23297) 2021-12-22 20:36:16 -08:00
George Hotz 16dd7ce1fe build for mac (#23048) 2021-12-18 22:00:09 -08:00
Dean Lee 768cfdb92a framereader: use the same alignement as visionbuf (#23208)
* aligned rgb buffer

* fix yuv stride
2021-12-15 16:19:07 -08:00
Dean Lee 8a84263c2d replay: use std::unique_ptr to manage memory, reuse events buffer. (#23049)
* reuse events buffer

* Trigger Build
2021-12-13 15:22:31 +01:00
Dean Lee 348d2d2b0d rename yuv streams (#23071)
* rename yuv streams

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-29 18:14:59 -08:00
Dean Lee dbec761941 logreader: support reading from corrupt log (#23050)
* catch exception outside loop

* print decompress error

* add test case for corrupt log

* fix decompressbz2 stuck if log is corrupt

* recovered from corrupt data

* add output

* ass space

* std::endl

* override load(), load from buffer

* override FrameReader::load to load from the buffer

* replace NULL with nullptr

* fix test case for corrupt log

* Trigger Build

* check bzerror too

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-29 14:10:24 +01:00
Dean Lee 296c4076a2 framereader: refactor seeking (#22926)
* refactor seeking

* ckeck packets.empty()

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-29 12:09:14 +01:00
Dean Lee 3fd0264960 refactor httprequest: emit single signals (#23039)
* refactor httprequest

* Trigger Build
2021-11-29 11:19:08 +01:00
Dean Lee f5e4867864 replay: refactor http download (#23052)
* refactor http download

* use chunk_size instead of parts

testcase:set chunksize to 5mb

* use template

space

* cleanup

* remove unused include

* check buffer overfllow

* simplify print download speed
2021-11-29 11:13:30 +01:00
Dean Lee a449b856ca framereader: fix crash after fallback to cpu decoding (#23055) 2021-11-28 13:29:40 -08:00
Dean Lee 5ae5174509 framereader: replace swscale with libyuv, reduce cpu usage by half (#22992)
* use libyuv

* cleanup
2021-11-26 14:41:14 +01:00
Dean Lee 1d2dfab81c replay: add test to check dcam and ecam (#22993) 2021-11-20 18:56:27 -08:00
Dean Lee 9cb46cc4a1 logreader: fix memory leak in Event (#22987) 2021-11-20 11:12:52 +01:00
Dean Lee ddea21e648 replay: fix swsscale crash on nv12->yuv conversion (#22961) 2021-11-17 20:04:45 -08:00
Dean Lee dc8e23c94b framereader: remove memory copy overhead for AVIO (#22894)
* no memory copy

* merge master

better
2021-11-17 13:25:40 +01:00
Dean Lee 20d3cf1fcb framereader: support hardware decoding (#22906)
* support hardware accelerated video decoding

* support cuda only

* print decode info

* add yuv flag back

* fix height

* default is cuda

* fallback to CPU decoding

fix memory leak&cleanup

add output
2021-11-17 11:17:59 +01:00
Dean Lee c0b9c1f3af framereader: remove deprecated ffmpeg functions (#22895) 2021-11-13 11:55:04 -08:00
Dean Lee fb8ba34f31 replay: add qcam and YUV flags (#22788)
* common flags

* cleanup

* remove double semicolon

* camera

* apply reviews
2021-11-09 14:08:24 -08:00
Dean Lee ff33ca3413 util: remove function to_hex (#22792) 2021-11-04 16:18:01 +01:00
Mayfield 5246f0231e enable wshadow (#22756)
* enable wshadow (#22714)

* fix replay

* more build fixes

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-02 17:08:53 +01:00
Dean Lee 79651b6c49 replay: fix qcam download error (#22777)
* fix qcam download error

* test loading qlog/qcamera
2021-11-02 11:24:59 +01:00