I'm currently developing a high-level wrapper for FFMPEG at

https://github.com/nordlow/justd/blob/master/tests/t_ffmpeg.d

My question now becomes how to most easily wrap the iteration over streams at

https://github.com/nordlow/justd/blob/master/tests/t_ffmpeg.d#L150

https://github.com/nordlow/justd/blob/master/tests/t_ffmpeg.d#L152

in a nice D-style range interface.

Do I have to allocate a new D array and copy the `AVStream*` elements into that or is there a convenience wrapper for constructing a lazy range from a C style Array-pointer plus array-length?

Note that the elements of the C array are pointers to structs, in this case instances of `AVStream`. This, of course, complicates the matter with regard to GC-safety.

Comments on that please :)

Reply via email to