RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
232 stars 28 forks source link

Memory unloading issue and memory leak issue in AVPro 2.6.5 #1360

Closed ciperpugazhenthi closed 1 year ago

ciperpugazhenthi commented 1 year ago

Please DO NOT LINK / ATTACH YOUR PROJECT FILES HERE

We are trying to integrate an AR module as an library package into native Application from unity. We use the AVPro for playing a video from URL. The beginning all the datas are been loaded and set in the scene, URL is loaded and media player is enabled and URL passed everything runs fine in the beginning stage when we are unloading the unity scene i.e going back to native app interface all memory is not being released but when using unity Video player component and all dynamically loaded memories are released and i can get back the memory. We have tried to destroy the avpro mediaplayer and other avpro references from scene no improvements still the memory leak issue is not solved. Tried closing the mediaplayer, stopping the media player and i have used EndOpenChunkedVideoFromBuffer() to release the video buffer memory i believe. i have attached the code snippet of unloading avpro below you can check..We face the issue in iOS only in all iOS versions. Trying to release the cached video url using RemoveMediaFromCache(url) but nullreference is throwing. Kindly help us to solve this memory leak issue thank in advance

Your Setup (please complete the following information):

To Reproduce

  1. Try to unload the module and check for memory leak
  2. Call functions from avpro to release memory caches

Screenshots Method used to clear the AVPro media player references Clear all media reference

The below screen shot is will show the memory usage graph when using unity video player Unity VideoPLayer

The below screen shot is will show the memory usage graph when using AVPro Media Player using AVPro MediaPlayer

By screen shot comparison Unity Video player releases more memory than AVPro Media player

Please DO NOT LINK / ATTACH YOUR PROJECT FILES HERE

Instead email the link to us unitysupport@renderheads.com

Ste-RH commented 1 year ago

Please provide all the information requested @ciperpugazhenthi

ciperpugazhenthi commented 1 year ago

Yeah just now updated the issue @Ste-RH

MorrisRH commented 1 year ago

Are you using the media caching API? See the documentation here. If not then RemoveMediaFromCache will not be helpful to you.

There are some memory related fixes going in for another issue with version 2.6.6 which we will be releasing shortly. Please update to this version when it's available and let us know if you're still seeing the problem.

Chris-RH commented 1 year ago

Version 2.6.6 is now out. Please let us know if this has not resolved your issue.

Chris-RH commented 1 year ago

Have you tried the above and also updated to version 2.6.6?

ciperpugazhenthi commented 1 year ago

@MorrisRH and @Chris-RH Yes i have updated by Current AVPro package with new 2.6.6 i which it was throwing an error and i'm unable to use it

MorrisRH commented 1 year ago

@ciperpugazhenthi please provide details of the error otherwise there is nothing further we can do

Chris-RH commented 1 year ago

Closed due to lack of information. Please reopen if you can provide further information.