[MM] Fix flickering when playing video.
Previously, Player deletes |tbm_surface| when next frame is delivered.
But occationally, it causes frame drops and crashs
because |tbm_surface| is released before the gpu does not finish to handle it.
This patch introduces |MediaPacketManager|
to hold media_packets which wraps tbm_surface and CleanUp regularly.
Also supplying APIs to let Renderer explicitly release the |tbm_surface|s
by indexing the |media_packet|s using |tbm_surface_h| as the key.
(Renderer only knows tbm_surface.)
CleanUp is introduced to prevent media_packet(tbm_surface) leaks
even Renderer does not request to release.
Theoritically CleanUp should do nothing because Renderer invoke
Release() for all |tbm_surface|s afer rendering so that
implementation is focused on optimizing Release() rather than CleanUp().
Bug: http://165.213.149.170/jira/browse/TSAM-653
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=15255
Reviewed by: sns.park
Change-Id: I9a1e3b0710da0072b3459818690d16e5c43d6fd3
Signed-off-by: msu.koo <msu.koo@samsung.com>