Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interspersed simple blocks and block groups #137

Open
dvc94ch opened this issue Jun 25, 2023 · 5 comments
Open

interspersed simple blocks and block groups #137

dvc94ch opened this issue Jun 25, 2023 · 5 comments

Comments

@dvc94ch
Copy link

dvc94ch commented Jun 25, 2023

seems like it's valid to intersperse these, but the parser tries to parse simple blocks and then block groups. also wondering why the parser was built using so many macros. seems hard to understand/maintain.

@lu-zero
Copy link
Member

lu-zero commented Jun 28, 2023

Because it was originally written when nom itself was only a set of very clever and convoluted macros. If you want to convert some to functions you are very welcome to contribute :)

Do you have a sample file? @robUx4 is it valid to intersperse?

@robUx4
Copy link

robUx4 commented Jun 30, 2023

You can mix SimpleBlock and BlockGroup, yes. Even for the same track. One common case is to use SimpleBlock for the whole (audio) track, except for the last frame when you want to set the duration and so you need a BlockGroup.

@dvc94ch
Copy link
Author

dvc94ch commented Jun 30, 2023

I think the muxer/demuxer traits might just get in my way more than they help, as I'm mainly interested in handling webm files. I built a prototype derive macro for reading/writing webm files using webm-iterable to handle the ebml, but that will likely change in the future as the iterator api doesn't really help when it comes to determining cluster or segment offsets for cues/seek-heads.

I'm still considering if the codec traits are a potentially useful abstraction for software encoders/decoders, but if I have a pipeline (pipewire -> vaapi -> webm) for example, instead of sending packets I probably want to send a linux dmabuf fd instead. I'm guessing there is an equivalent on other platforms.

@lu-zero
Copy link
Member

lu-zero commented Jun 30, 2023

In theory you may wrap a dmabuf in a FrameBuffer, but Packet as it is assumes you are copying to its own storage, Ideally one could extend it similarly.

@dvc94ch
Copy link
Author

dvc94ch commented Jun 30, 2023

I'm thinking I'll build a fixed function pipeline first, which will hopefully produce high quality components for pipewire, vaapi, webm, dash and then see later if/how they can be integrated into rust-av if I ever get around to adding support for more platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants