ImMathanR / mp4parser

Automatically exported from code.google.com/p/mp4parser
0 stars 0 forks source link

High memory use in H264TrackImpl. Use a MappedByteBuffer where possible. #67

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have attached a patch in the form of an SVN diff. It includes a changes to 
getSamples() on the Track interface:

    List<Sample> getSamples();

Performance tests of the attached patch reduce memory use significantly. Note 
that it has not been tested extensively. It will also require minor changes to 
any applications that call getSamples(), i.e., to get the ByteBuffer, use:

getSamples().get(0).getByteBuffer()

I hope this can be incorporated into the main code base.

A.

Original issue reported on code.google.com by antonmar...@gmail.com on 10 Aug 2013 at 4:48

GoogleCodeExporter commented 8 years ago
I have not included any changes to test code or related project code, but these 
fixes should be fairly simple.

Original comment by antonmar...@gmail.com on 10 Aug 2013 at 4:53

GoogleCodeExporter commented 8 years ago
OK, that was missing some files. Give this one a go.

Original comment by antonmar...@gmail.com on 22 Aug 2013 at 9:52

Attachments:

GoogleCodeExporter commented 8 years ago
I tried this one, OutOfMemoryException is gone. Looks very good!

Sebastian, Anton, can this be incorporated into the main code base?

Original comment by pkapus...@gmail.com on 26 Aug 2013 at 3:52

GoogleCodeExporter commented 8 years ago
There is a quite sophisticated memory map algo in place so this is no longer an 
issue

Original comment by Sebastian.Annies on 19 Jun 2014 at 3:46