Dean Lee
1e67fc25f1
replay: add qcam and YUV flags ( #22788 )
...
* common flags
* cleanup
* remove double semicolon
* camera
* apply reviews
old-commit-hash: fb8ba34f31
4 years ago
Dean Lee
526cfdd0fb
replay: print colored text ( #22771 )
...
old-commit-hash: 09858f7f6f
4 years ago
Dean Lee
993aa64067
replay: fix hanging on exit if stream thread has not been started yet ( #22770 )
...
old-commit-hash: 6f78cc77fc
4 years ago
Dean Lee
a031b938b0
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
old-commit-hash: 2b4a477fbc
4 years ago
Dean Lee
af7c9ccf6f
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>
old-commit-hash: d70e49dca5
4 years ago
Dean Lee
6e0853986f
replay: use an enum for flags ( #22635 )
...
* enum flags
* continue
* remove yuv flag for now
old-commit-hash: af7dba9250
4 years ago
Dean Lee
c35975072e
replay: improve seeking, queuing segments ( #22625 )
...
* improve seeking, queuing segments
* cleanup,init current_segment_ to 0
* use isSegmentLoaded
* remove to isSegmentMerged
old-commit-hash: 317deeae84
4 years ago
Dean Lee
3542dfeacd
replay: fix replay looping ( #22618 )
...
old-commit-hash: 702fc5850c
4 years ago
Dean Lee
ea6ee497e5
replay: parse route string, replay from the specified segment ( #22503 )
...
* parse segment name
* return 0
* update regexp
* with |
* dd
* use struct
* move to class Route
* refactor loadFromLoacal
* simplify loadFromJson
* cleanup load from server
* const ref
old-commit-hash: 107ed35d1e
4 years ago
Dean Lee
ed5bd9719b
replay/camera: publish each camera in a separate thread ( #22591 )
...
* publish frames in a seperate thread for each camera
* cleanup
* cleanup
* prefetch next frame
* cleanup
old-commit-hash: 4678903a61
4 years ago
Dean Lee
e7aa4f16e5
replay: improve segment downloading ( #22504 )
...
* improve segment downloading
dd
* continue
* log retrying
* check aborting_ in loop
* std::endl
* log download information
* cleanup
* continue
* dd
* move download to seperate funciton
* simplify logging
* continue
* guard ts
* cleanup
* typo
old-commit-hash: 8d1d0c2cd7
4 years ago
Dean Lee
26d7db6649
replay: just load one segment to start replaying ( #22598 )
...
old-commit-hash: ccc07db1ee
4 years ago
Dean Lee
5afb4b9731
replay: start streaming after segment loaded ( #22575 )
...
* start streaming after segment loaded
dd
* loop from beginning if reaches the end
* isSegmentLoaded
* one loop
* move to ctor
* delete stream_thread_ on exit
* pause streaming while testing seek
* Revert "one loop"
This reverts commit f029cd118f7ac876dee1dbf2b91478403211ad47.
* test:dummy stream thread
* cleanup
* start thread after vipcserver
old-commit-hash: f6de10b55a
4 years ago
Dean Lee
f5335bd42d
replay: refactor Route and Segment ( #22531 )
...
* new functions
* fix wrong call to qUrl::isLocalFile
* cleanup
* keep extension in cached files
* cleanup
* simplify segment
* delete thread
* add output
* pre-decompress
* remove suffix
* revert remove suffix
* 1 connection for log file
* cleanup
* segment may not be continuous,use map
* don't emit finish if aborting_
* use QFuture and thread pool
* cleanup
* fix segfault in LoadFromLocal
* cleanup
* handle segment failed to load
* output info
* continue error handling
* Remove redundant testSeekTo
* cleanup
* always return true
* keep time is ok now
change to 1s
write 1 byte at the end of the sparse file
* log loading segment
* merge #22476
* Update selfdrive/ui/replay/logreader.cc
* correct connect
* pub message in function
* typo
* Update selfdrive/ui/replay/replay.cc
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: acc52ece20
4 years ago
Dean Lee
06a1dd7598
c++ replay: support local routes ( #22288 )
...
* support local route
* kind of works
* works
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 43a846843f
4 years ago
Adeeb Shihadeh
6472b5b6c9
replay: support old, pre-pandaStates routes ( #22525 )
...
* replay: support old, pre-pandaStates routes
* cleanup
old-commit-hash: f1fcf17c4c
4 years ago
Dean Lee
f0d16395b7
replay: get EncoderIndex from capnp::AnyStruct ( #22518 )
...
* get EncoderIndex from capnp::AnyStruct
* const
old-commit-hash: c801c65b9d
4 years ago
Dean Lee
0f49ecbff7
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
old-commit-hash: 5527736df6
4 years ago
Greg Hogan
95843a6754
replay: print current time when paused ( #22468 )
...
old-commit-hash: 188b634222
4 years ago
Dean Lee
7d67bfa606
repaly: stop publish socket on multiple publishers error ( #22449 )
...
old-commit-hash: f7cf4be995
4 years ago
Dean Lee
11014ca940
replay: cleanup output ( #22434 )
...
old-commit-hash: b5988d5601
4 years ago
Dean Lee
3df339e1ed
replay: refresh segment window after current segment is changed by seek ( #22436 )
...
old-commit-hash: 60b0c43c90
4 years ago
Dean Lee
7b3200362b
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
old-commit-hash: 2253cba98b
4 years ago
Dean Lee
a8c5acb884
c++ replay: publish all frames in CameraServer ( #22378 )
...
* cameraserver
* support yuv
* init camera server in start()
* trigger ci
old-commit-hash: 1eb79d7a59
4 years ago
Dean Lee
2dc5a00e3d
c++ replay: get socket name from capnp::Schema ( #22367 )
...
* get socket name from canp::Schema
* use vector
old-commit-hash: fd801c454a
4 years ago
Dean Lee
66ca3985c9
replay : move utility functions into separate file ( #22414 )
...
* move functions into util
* read bz2 into stream
* pre-decompress log in the download thread
* cleanup logreader
* cache sha256 path
* use readBZ2file in test_logger
* Revert "cache sha256 path"
This reverts commit 60459d3ea09a2c80f4560cf95b1ce7d6af59f06d.
* use macro
* use ostringstream
* cleanup readBZ2File
* move precise_nano_sleep into util
old-commit-hash: d28b98c602
4 years ago
Dean Lee
430e9808b3
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.
old-commit-hash: fa8ddd992d
4 years ago
Willem Melching
04e5fdb931
replay: send frames based on encodeIdx packet ( #22361 )
...
* send frames based on encodeIdx
* use start of frame time if set
* also use end of frame if set
* fix timestamp for encode packets
* handle all cameras
* add comment
* add twice
old-commit-hash: 6881688af2
4 years ago
Dean Lee
e5d79759ff
c++ replay: more accurate sleep ( #22348 )
...
* precise sleep
* cleanup
* continue
old-commit-hash: 318a8ba854
4 years ago
Dean Lee
48e07756a2
c++ replay: improve seeking&updating events ( #22319 )
...
* improve seeking
* qDebug
* cleanup
* wait on cv
robust
* Trailing underscores for member variables
* group log variables
* small cleanup,remove unnecess std::atomic
* remove debug output
* fix seek problem
* add comment
* better lambda
* faster seek.don't block stream thread if segment already loaded
* remove assert
old-commit-hash: a548d4b5b8
4 years ago
Dean Lee
9fae8b50f3
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
old-commit-hash: 4e6ff308a8
4 years ago
Dean Lee
bac9a01cb2
load d/e camera by command line flags ( #22341 )
...
old-commit-hash: e888a7e939
4 years ago
Dean Lee
e2332a0275
replay: pause/resume using spacebar ( #22278 )
...
* pause/resume using spacebar
* Update selfdrive/ui/replay/replay.cc
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: ec67d2b8f5
4 years ago
Dean Lee
5be69694ba
replay improvements ( #22203 )
...
* refactor replay
* cleanup
small cleanup
* merge 22239
* cleanup
* add optional argument for start time
* small cleaup
old-commit-hash: 50ae7dd6a9
4 years ago
Dean Lee
969f992d59
replay: remove array subscript ( #22268 )
...
old-commit-hash: cb49ceabf0
4 years ago
Adeeb Shihadeh
cfed62dd36
replay: add nice arg parser ( #22264 )
...
* replay: add nice arg parser
* demo
* cleanup
old-commit-hash: f49e7629ee
4 years ago
Dean Lee
303cb411b4
replay: thread-safe seek ( #22228 )
...
old-commit-hash: f5aa3a30c9
4 years ago
Dean Lee
1e1c4fcd83
fix Replay::mergeEvents: use std::end() ( #22215 )
...
old-commit-hash: a89bdb6a05
4 years ago
Dean Lee
1fd8466af0
replay: unlock mutex before sleep ( #22213 )
...
old-commit-hash: 365e8bfd93
4 years ago
Dean Lee
b8c56b5b75
replay: fix bugs in merging events ( #22205 )
...
old-commit-hash: eb4a28af11
4 years ago
Dean Lee
7100381a02
replay: thread safe merge & free logs ( #22196 )
...
old-commit-hash: a1a0201069
4 years ago
Dean Lee
1d5ca75029
FrameReader: do not depend on Qtunit tests ( #21379 )
...
* add timeout and test case
* remove useless comment
* reduce to 1s
* fix gotframe fail when Duplicate POC in a sequence
* cleanup
* remove space
* fix
old-commit-hash: 81a128cd76
4 years ago
ambientocclusion
488f3b2624
Fixed build issues on macOS ( #22075 )
...
* Fixed deprecated enum value
* Changed to build Qt replay on macOS
old-commit-hash: ed271911c2
4 years ago
Dean Lee
ceb40d8384
api: use API_HOST env variable everywhere ( #21814 )
...
* api base url to global constant
* update api/__init__.py
old-commit-hash: 543e019f71
4 years ago
Dean Lee
9d12eb4d3a
HttpRequest: don't send request in ctor ( #21665 )
...
old-commit-hash: c24227c3ab
4 years ago
Dean Lee
701ee27c91
HttpRequest: move http cache to RequestRepeater ( #21228 )
...
* move cache from HttpRequest to RequestRepeater
* apply review
old-commit-hash: 9ebfc2ba8d
4 years ago
Adeeb Shihadeh
2d047aae7e
nicer replay prints
...
old-commit-hash: 060b5caf1b
4 years ago
Dean Lee
d852c98d52
Refactor C++ LogReader ( #21152 )
...
* refactor logreader
* fix include order
* apply review
* remove typedefs
* remove include timing.h
* no parent
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 8c202d1bb4
4 years ago
Dean Lee
7fb038fcf8
refactor FrameReader ( #21141 )
...
* refactor FrameReader
* continue
* move that
* small cleanup
* little more
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 67fe3feb09
4 years ago
Dean Lee
7b253433f2
Refactor FrameReader ( #21002 )
...
* Refactor FrameReader
* decodeThread
* delete frame
* remove joined
* continue
* less diff
* robust cv wait
* cache fist 15 frames
* notify_all
* rename variables
* need call avformat_find_stream_info before dump_format
* get width&height from codec
* use std::string
* delete in removeSegment
* use std::mutex in lockmgr_cb
* fix wrong min/max
* no get in process
* cleanup
* always notify decodeThread to do prefetch
old-commit-hash: 5540dcae78
4 years ago