Nuke icon indicating copy to clipboard operation
Nuke copied to clipboard

Add dataTask that is similar to imageTask

Open larryonoff opened this issue 1 year ago • 2 comments

Hello!

Our application currently uses Nuke for image and video caching.

We want to add video streaming capabilities (video files are relatively small). We've implemented a solution that uses ImageTask.previews with a custom video decoder, which always decode partially downloaded. This solution uses ImageTask.previews.

However, I believe it would be better to have a dedicated feature similar to ImageTask.previews, like DataTask and DataTask.partialData, which would handle and report partially downloaded data along with its response.

Let me know if there's anything more specific you need help with!

larryonoff avatar May 20 '24 09:05 larryonoff

Hey,

We want to add video streaming capabilities (video files are relatively small). We've implemented a solution that uses ImageTask.previews with a custom video decoder, which always decode partially downloaded. This solution uses ImageTask.previews.

It is a perfectly acceptable solution. ImageResponse is designed to hold data, and it is used this way in other scenarios as well, for example, for rendering animated images.

However, I believe it would be better to have a dedicated feature similar to ImageTask.previews, like DataTask and DataTask.partialData,

I considered this, but the public API in Nuke is already so large that I decided to keep the data support to the bare minimum, intentionally so.

kean avatar May 26 '24 22:05 kean

I considered this, but the public API in Nuke is already so large that I decided to keep the data support to the bare minimum, intentionally so.

Ideally, it would be great if your library supported video streaming and large videos. :D

larryonoff avatar May 27 '24 09:05 larryonoff