Commit Graph

22 Commits (5246f0231e6bfa572c0dd89c60e538910817faa2)

Author SHA1 Message Date
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 09858f7f6f
replay: print colored text (#22771) 2021-11-02 11:24:45 +01:00
Dean Lee 2b4a477fbc
replay: improve segment download and merge (#22654)
* no-cache mode

* fix test cases build error

* space

* don't create cache dir in no-cache mode

* fix errors in test cases

* no_local_cache_

* set the number of connections by chunk_size

* use size_t instead of int64_t

* add test case for no-cache mode

* rename variables

* fix SIGSEGV

* cleanup

* faster decompressBZ2

* always decompress bz2

* add test cases

* prepare for python interface

* fix test cases build error

* continue

* camera_replay: cache remote file

* protected inheritance

* single option name

* TODO

* test_case for LogReader&FrameReader

* fix wrong require

* test case for FileReader

* cleanup test

* test:fix wrong filename

* check cached file's checksum

* fix mkdir permissions err

cleanup filereader

* remove initialize libav network libraries.

dd

* abort all loading if one failed

* cleanup tests

* use threadpool to limit concurrent downloads

* cache more segments

* merge 3 segments for replay

* one segment uses about 100M of memory

* use segments_need_merge.size()

* shutdown

* fix stuck if exit replay  before keyboard thread started

* load one segment at a time

* small cleanup

* cleanup filereader

* space

* tiny cleanup

* merge master

* cleanup test cases

* use util:create_directories

* cleanup framereader
2021-11-01 11:55:56 +01:00
Dean Lee d70e49dca5
replay: build on devices (#22632)
* there is no QThread::create on device

* add files to files_common

* modify SConscript

* no memory_resouce on device

* #define HAS_MEMORY_RESOURCE

* fix hangs on shutdown

* build on device with the --extra flag

* delete later

* setup -> extras

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-29 12:21:57 +02:00
Dean Lee af7dba9250
replay: use an enum for flags (#22635)
* enum flags

* continue

* remove yuv flag for now
2021-10-22 23:28:53 -07:00
Dean Lee 43a846843f
c++ replay: support local routes (#22288)
* support local route

* kind of works

* works

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-12 00:51:22 -07:00
Dean Lee 5527736df6
replay: simplify seek&merge (#22463)
* simplify seek&merge

* update test cases

update test cases

* cleanup test cases

* new function currentSeconds

* add TODO

* thread safe publishFrame

* cleanup

* fix 'at x S' not printed if seek back to old time

* exit replay if failed to load route

* move out setCurrentSegment from if statement

* cleanup

* use std::find

* const variables
2021-10-07 17:32:16 +02:00
Dean Lee 2253cba98b
c++ replay: graceful shutdown (#22280)
* graceful shutdown

* reset termios

* continue

* call clear in dctor

* unpause

* delete vipc_server

* relase context

* notify_one

* merge master

* merge master

* print vipc stop listen before shutdown down
2021-10-04 18:00:49 +02:00
Dean Lee fa8ddd992d
c++ replay: more robust seek (#22375)
* skip invalid segment

* test seek

* fix wrong cur_mono_time when route_start_ts is 0

* don't notify stream thread if current segment not merged

* continue merge next segment if current is invalid

* cleanup seekTo

* continue

* fix seek cross-boundary

* new demo route has 11 segments

* continue

* fix cross-boundary

* cleanup & better test cases

cleanup

remoe &

typo

update comment

* update test

* reserve space for new_events

* parallel sorting

* usleep(0)

* Revert "parallel sorting"

This reverts commit d7d1b42f49944aef0b6ca2962e45a7f5318a1152.
2021-10-04 15:00:57 +02:00
Adeeb Shihadeh dd67dc6b34
update demo route (#22381) 2021-09-29 18:51:30 -07:00
Dean Lee 4e6ff308a8
c++ replay: chunking and concurrent downloads (#22308)
* download segment files by chunks in multiple threads

* remove easy_handl on aborting

* add test cases

* better error handling

* update test

* cleanup

* add CURLGlobalInitializer

* check http code

* finish
2021-09-28 12:24:48 +02:00
Dean Lee e888a7e939
load d/e camera by command line flags (#22341) 2021-09-28 11:25:18 +02:00
Dean Lee ec67d2b8f5
replay: pause/resume using spacebar (#22278)
* pause/resume using spacebar

* Update selfdrive/ui/replay/replay.cc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-09-19 14:47:17 -07:00
Dean Lee 50ae7dd6a9
replay improvements (#22203)
* refactor replay

* cleanup

small cleanup

* merge 22239

* cleanup

* add optional argument for start time

* small cleaup
2021-09-19 12:24:28 -07:00
Dean Lee 8eb92a98ba
replay: don't splits empty strings (#22271) 2021-09-18 22:40:36 -07:00
Adeeb Shihadeh f49e7629ee
replay: add nice arg parser (#22264)
* replay: add nice arg parser

* demo

* cleanup
2021-09-17 00:33:23 -07:00
Dean Lee f5aa3a30c9
replay: thread-safe seek (#22228) 2021-09-16 23:45:46 -07:00
George Hotz 8d554abbf7 demo route note in replay 2021-09-14 13:53:49 -07:00
iejMac f0d0b82b8d
Replay: seeking functionality (#20763) 2021-05-15 17:06:30 -07:00
Dean Lee 7222d0f20d
Cleanup selfdrive/ includes (#20822)
* cleanup include path

* continue

* format includes

* fix testraw.cc

* remove include path from SConstruct

* regroup

* rebase master

* almost done

* apply review

* rename FileReader.xx to filereader.xx

* rename Unlogger.x->unlogger.x

* rename FrameReader.xx -> framereader.xx

* apply reviews

* ui.h

* continue

* fix framebuffer.cc build error:mv util.h up

* full path to msm_media_info

* fix qcom2 camerad

Co-authored-by: Comma Device <device@comma.ai>
2021-05-08 22:15:17 -07:00
Dean Lee 81491dc57f
c++ cleanup: standardize file extensions to .cc and .h (#20800)
* c++ cleanup: standardize file extensions to .cc and .h

* cleanup files_common
2021-05-03 11:53:11 +02:00
iejMac 19d962cdf3
qt replay (#20602)
* initial commit, works

* remove nui

* working again

* visionipc

* cleanup

* cleanup

* moving VisionIpcServer to Unlogger class

* works

* tab cleanup

* headless mode

* headless mode works

* working headless mode

* gitignore update

* small unlogger refactor

* refactor param in UIState

* works, very slow, hacks

* cleanup

* works

* cleanup

* cleanup

* unused

* works for whole route

* nicer

* a little nicer

* different threshold

* maintains 1 segment window

* works with public api

* comments

* networkTimer works

* cleanup

* unified HttpRequest

* tabs

* tabs

* comments'

* gitignore

* gitignore

* only on PC

* same line else

* no changes in home.cc

* scons

* update scons

* works

* revert mainc.c

* revert home

* else

* just api + problem with api send

* works

* include cleanup

* general json fail

* whitespace

* remove active

* adding request repeater

* removing comments

* tabs

* update comment

* cereal

* fix

* trailing new lines

* grammar

* if whitespace

* indentation

* Update selfdrive/ui/SConscript

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update selfdrive/ui/qt/request_repeater.cc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* works

* sort by dir

* no blockSignal

* replay is now QOBject

* cant take const char

* rename inner it

* get width and height from frame readeR

* resolve TODO

* seek in next pr

* spaces

* ui stuff

* fix CI

* remove comments

* no repalce

* trim segment fix

* remove seek from stream

* no cache key

* final changes'

* fix

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-04-24 00:59:09 -07:00