David Wendt
c86360a10b
core: `Video`s attached to a `NetStream` get their bitmap size and data from the attached `NetStream`.
2023-06-30 16:14:28 -06:00
David Wendt
9e318fc8e8
core: Process basic FLV video data tags and funnel them to the video backend.
...
This works a bit differently from SWF videos, we do not retain decoded video frames or valid seek points indefinitely. This assumes code interacting with `NetStream` is at least mildly aware of how a video codec is supposed to work and what the performance implications of that are.
2023-06-30 16:14:28 -06:00
David Wendt
3d5156b90d
core: Update the stream offset after each tag is processed.
...
The `preload_offset` is only ever moved forward, of course.
2023-06-30 16:14:28 -06:00
David Wendt
3410d9fcf8
core: Process `onMetaData` to get our stream definition with.
...
We use `preload_offset` to avoid processing the same metadata multiple times.
2023-06-30 16:14:28 -06:00
David Wendt
286acddfea
core: Introduce the notion of a separate preload step.
...
We don't actually process tags out of order, we're just tracking what tags have already been processed. FLV embeds critical video metadata in a ScriptData tag that we need to pull data out of and process.
2023-06-30 16:14:28 -06:00
David Wendt
bc9fd3613e
core: Add stub FLV processing
2023-06-30 16:14:28 -06:00
David Wendt
c00cd0537c
tests: Add tests for AVM1 and AVM2 host FLV players.
2023-06-30 16:14:28 -06:00
David Wendt
ea9c5ae830
flv: Break `io::Error` into kind and string at construction time to avoid having to do so when cloning.
2023-06-30 16:14:28 -06:00
David Wendt
0f176484ea
flv: Refactor tag parsing to use error codes instead of `None`.
2023-06-30 16:14:28 -06:00
David Wendt
e4b76ac149
flv: Sound format bits are ALSO specified backwards!
2023-06-30 16:14:28 -06:00
David Wendt
c61b27a41b
flv: Codec ID and frame type are specified backwards
2023-06-30 16:14:28 -06:00
David Wendt
4b81d65dc5
flv: Hitting the end of the script data block is treated like the variable terminator.
...
Add a test case with real FLV data to enforce this.
2023-06-30 16:14:28 -06:00
David Wendt
4f831b4351
flv: Script data blocks appear to start with a trash byte `0x02`
2023-06-30 16:14:28 -06:00
David Wendt
6358d3162b
flv: The type flag bits in the FLV spec are written backwards.
2023-06-30 16:14:28 -06:00
David Wendt
eed1ab492d
flv: All relevant output data types need to be public.
2023-06-30 16:14:28 -06:00
David Wendt
0c145253b6
flv: `Tag` fields should be public.
2023-06-30 16:14:28 -06:00
David Wendt
b2dd4d8305
flv: Add `Clone` to `Tag` and `Header`.
...
Some types also get `Copy` by virtue of being plain data with no pointers.
2023-06-30 16:14:28 -06:00
David Wendt
8fd80cd173
flv: `Tag` should be public as well.
2023-06-30 16:14:28 -06:00
David Wendt
d23378dd80
flv: `Header::parse` should always leave the stream reader in a reasonable position
2023-06-30 16:14:28 -06:00
David Wendt
20d33df458
flv: Add `skip_back` method for reverse tag parsing
2023-06-30 16:14:28 -06:00
David Wendt
7bf28074c0
flv: `parse` now consumes the back pointer.
...
We also guarantee that when parsing fails we leave the reader where it is to allow reading later.
2023-06-30 16:14:28 -06:00
David Wendt
3e2a5eb43b
flv: Impl `Seek` for `FlvReader`
2023-06-30 16:14:28 -06:00
David Wendt
0edfecfea0
flv: Allow breaking a Reader down into parts or building one up from parts.
2023-06-30 16:14:28 -06:00
David Wendt
4d829768a1
tests: Add integration tests for full tag parsing
2023-06-30 16:14:28 -06:00
David Wendt
e50ee7c139
chore: errant &
2023-06-30 16:14:28 -06:00
David Wendt
f115326f3e
flv: Implement Script Data parsing.
...
Yes, FLVs support embedded ActionScript data. Who knew?!
2023-06-30 16:14:28 -06:00
David Wendt
65583a7173
flv: Add video tag parsing support
2023-06-30 16:14:28 -06:00
David Wendt
43aa4abe0e
flv: Check for the AAC sequence header byte.
...
Note that we don't actually parse the sequence header yet.
2023-06-30 16:14:28 -06:00
David Wendt
f998ec20e8
flv: Implement `AudioData` parsing
2023-06-30 16:14:28 -06:00
David Wendt
9cbc371a6a
flv: Implement header parsing.
2023-06-30 16:14:28 -06:00
David Wendt
5b93a9e316
flv: Add new crate for FLV (de)muxing
2023-06-30 16:14:28 -06:00
Fancy2209
8f0a43f9d9
Add prependRotation, copyRowTo and copyRowFrom ( #11698 )
...
Co-authored-by: Aaron Hill <aa1ronham@gmail.com>
2023-06-30 14:31:08 -04:00
Aaron Hill
1c151a86d6
avm2: Stub isXMLName
2023-06-29 15:51:39 -04:00
Nathan Adams
a5915a9bdb
swf: Make Color Copy
2023-06-29 20:32:36 +02:00
Lord-McSweeney
04747f86b6
avm2: Stub AVM1Movie
2023-06-29 12:05:01 -04:00
EmperorBale
e846d035e5
avm2: Use `method_name` as last resort if available in stack trace
2023-06-29 11:49:48 -04:00
Aaron Hill
9b8a8c9974
avm2: Correctly re-use objects in XML/XMLList call handlers and ctors
...
`XML(someXMLObj)` and `XMLList(someXMLList)` perform the
normal cast behavior (returning the same object), instead
of creating a new object like other arguments do.
This also applies to `new XMLList(someXMLObj)`
and `XML(singleElemXMLList)`
2023-06-28 21:16:05 -04:00
Crowdin Bot
1430e98851
chore: Update translations from Crowdin
2023-06-28 23:19:47 +02:00
Nathan Adams
97ad60e66a
wgpu: Pad out the BlurUniforms
2023-06-28 22:42:31 +02:00
Nathan Adams
7e96a2fdad
wgpu: Blur size is whole kernel width, minus one and half it for the shader
2023-06-28 22:42:31 +02:00
Nathan Adams
b90bebc65d
wgpu: Blur filter is fallible, if nothing happened then just blit
2023-06-28 22:42:31 +02:00
Nathan Adams
c0e932422f
wgpu: Change blur to 2-pass separable box blur, multiplied by quality
2023-06-28 22:42:31 +02:00
Nathan Adams
447cd2a5f6
wgpu: Move create_filter_vertices to FilterSource::vertices
2023-06-28 22:42:31 +02:00
Nathan Adams
fd0d414d02
wgpu: Add FilterSource::for_entire_texture convenience method
2023-06-28 22:42:31 +02:00
Nathan Adams
1096d7d35e
wgpu: Create a FilterSource for common arg set, and removed need for #[allow(clippy::too_many_arguments)]
2023-06-28 22:42:31 +02:00
Nathan Adams
7f4d855de9
wgpu: Move Surface::apply_filter to Filters::apply, removing need for a surface at all
2023-06-28 22:42:31 +02:00
Nathan Adams
7c751d6be8
wgpu: Implement Default for TexturePool
2023-06-28 22:42:31 +02:00
Nathan Adams
4f6bac7840
wgpu: Refactor out filters into their own files
2023-06-28 22:42:31 +02:00
Aaron Hill
ad8457b54d
wgpu: Remove 'TextureWrapper.format' field
...
We can already get the foramt from the wgpu::Texture
2023-06-28 16:26:19 -04:00
Aaron Hill
54dd160897
wgpu: Remove 'width' and 'height' fields from Texture
...
This is already stored in wgpu::Texture
2023-06-28 13:00:49 -04:00