11eda44d34
Migrate decoding to line-buffered reader
...
Migrate all usages of StreamReader in the context of decoding beatmaps,
storyboards or skins to the new LineBufferedReader.
2019-09-15 01:28:07 +02:00
7b1ff38df7
Implement line-buffered reader
...
Add a line-buffered reader decorator operating on StreamReader
instances. The decorator has two main operations - PeekLine(), which
allows to see the next line in the stream without consuming it,
ReadLine(), which consumes and returns the next line in the stream, and
ReadToEnd() which reads all the remaining text in the stream (including
the unconsumed peeked line). Peeking line-per-line uses an internal
queue of lines that have been read ahead from the underlying stream.
The addition of the line-buffered reader is a workaround solution to
a problem with decoding. At current selecting a decoder works by
irreversibly reading the first line from the stream and looking for
a magic string that indicates the type of decoder to use.
It might however be possible for a file to be valid in format, just
missing a header. In such a case a lack of a line-buffered reader makes
it impossible to reparse the content of that first line. Introducing it
will however allow to peek the first line for magic first.
- If magic is found in the first line, GetDecoder() will peek it and
use it to return the correct Decoder instance. Note that in the case
of JsonBeatmapDecoder the magic is the opening JSON object brace,
and therefore must not be consumed.
- If magic is not found, the fallback decoder will be able to consume
it using ReadLine() in Decode().
This commit additionally contains basic unit tests for the reader.
Suggested-by: Aergwyn <aergwyn@t-online.de >
2019-09-15 01:26:15 +02:00
2783ae62ef
Remove useless container
2019-09-14 06:34:57 +03:00
8ad782a82d
Fix RankingsHeader dropdown can be clickable when not visible
2019-09-14 06:16:25 +03:00
65aa7b2016
Recreate beatmap video on each consumption
...
Should not be shared over multiple usages
2019-09-14 00:07:06 +09:00
1b8d5decfa
Add beatmap video support ( #5908 )
...
Add beatmap video support
Co-authored-by: Dean Herbert <pe@ppy.sh >
2019-09-13 23:31:34 +09:00
2cd3657b5e
Merge branch 'master' into beatmap-video
2019-09-13 23:08:57 +09:00
624e5644a4
Change osu!catch key trigger to occur on frame before positional change
2019-09-13 23:06:35 +09:00
9e53c091a3
Merge pull request #6095 from peppy/fix-test-dummy-api
...
Fix incorrect DI usage of IAPIProvider in many tests
2019-09-13 22:22:07 +09:00
2379b665e3
Use InvalidOperationException
2019-09-13 22:15:11 +09:00
d385c35955
Apply suggestions from code review
...
Co-Authored-By: Salman Ahmed <slmanarendo1950@gmail.com >
2019-09-13 21:55:45 +09:00
9e742839ac
Use correct database migration
2019-09-13 13:57:55 +03:00
fb9b25b786
Merge remote-tracking branch 'refs/remotes/ppy/master' into beatmap-video
2019-09-13 13:48:14 +03:00
c13950fbbf
Remove custom db additions
2019-09-13 13:43:21 +03:00
437e121056
Merge remote-tracking branch 'refs/remotes/ppy/master' into beatmap-video
2019-09-13 13:39:58 +03:00
125b3fda6c
Merge branch 'master' into improve-catch-replay-frames
2019-09-13 19:23:15 +09:00
e1ed5dfa7d
Reset DrawableHitObject lifetimes on state change ( #6028 )
...
Reset DrawableHitObject lifetimes on state change
Co-authored-by: Dan Balasescu <smoogipoo@smgi.me >
2019-09-13 19:10:02 +09:00
614e68cdf9
Remove redundant BindTarget usage
2019-09-13 18:11:17 +09:00
031f0ee1e7
Consume ValueChanged and inline some pointless constants
2019-09-13 18:09:15 +09:00
1e4f3507ed
Fix layout not matching web
2019-09-13 18:07:52 +09:00
0cc21c9c74
Fix changelog overlay potentially adding children after disposal
2019-09-13 17:21:47 +09:00
7cb79dd760
Fix incorrect DI usage of IAPIProvider in many tests
2019-09-13 17:15:33 +09:00
6867b3c232
Update resources
2019-09-13 10:56:21 +03:00
cb98b07e33
Merge master with conflicts resolved
2019-09-13 10:45:01 +03:00
ffd205f470
Merge remote-tracking branch 'upstream/master' into pr/EVAST9919/6076
2019-09-13 16:25:30 +09:00
78e7be919f
Remove unnecessary container
2019-09-13 16:25:25 +09:00
c4f9be5913
Merge pull request #6093 from smoogipoo:fix-player-restart
...
Fix player not correctly restarting after an unpause
2019-09-13 16:09:41 +09:00
7818ecd71c
Forward ValueChangedEvent instead
2019-09-13 16:03:44 +09:00
a05ae2c1b2
Merge remote-tracking branch 'upstream/master' into pr/EVAST9919/6082
2019-09-13 15:53:11 +09:00
cf2f841b4d
Fix player not correctly exiting after an unpause
2019-09-13 15:42:58 +09:00
c66e963705
Make constructor private
2019-09-13 15:42:36 +09:00
dc8c7a5041
Add null check for safety
2019-09-13 15:27:42 +09:00
44947aa9ed
Make PopupDialog abstract
2019-09-13 15:27:29 +09:00
e2e87d5268
Merge branch 'master' into properly-fix-dialog-double-samples
2019-09-13 14:53:29 +09:00
5a72083c13
Merge remote-tracking branch 'refs/remotes/ppy/master' into rankings-title
2019-09-13 08:32:06 +03:00
43d7615734
Merge remote-tracking branch 'upstream/master' into rankings-scope-selector
2019-09-13 14:07:39 +09:00
0e679fb468
Use colour constant rather than opacity helper function
2019-09-13 14:06:19 +09:00
b917f29cfe
Make GradientLineTabControl abstract
2019-09-13 13:59:06 +09:00
3b82c6db49
Merge branch 'master' into leaderboard-mod-icons-spacing
2019-09-13 13:27:18 +09:00
2a8fa2f593
Refactor modsContainer on profile scores
2019-09-12 14:01:12 -07:00
99fc13b4d8
Update usage of the DismissableFlag
2019-09-12 19:34:58 +03:00
0142fcd07a
Merge remote-tracking branch 'refs/remotes/ppy/master' into rankings-title
2019-09-12 19:29:05 +03:00
b17d097a39
Simplify colour usage in GradientLine
2019-09-12 17:17:57 +03:00
4dd819c150
Merge remote-tracking branch 'refs/remotes/ppy/master' into rankings-scope-selector
2019-09-12 17:17:32 +03:00
cafb5105bc
Rename HeaderFlag to DismissableFlag
2019-09-12 16:44:15 +03:00
2cb084666b
Merge branch 'master' into rankings-scope-selector
2019-09-12 22:37:14 +09:00
5f77236c01
Merge branch 'master' into closable-flag
2019-09-12 22:27:34 +09:00
b81b162ee1
Update InitialLifetimeOffset comment
2019-09-12 19:30:27 +09:00
9fc60aeefc
Merge branch 'master' into reset-dho-lifetimes
2019-09-12 19:29:14 +09:00
f21e47d6d2
Move expire to DrawableHitObject
2019-09-12 19:29:08 +09:00