public static long editedToMedia ( TrakBox trak , long editedTv , int movieTimescale ) { if ( trak . getEdits ( ) == null ) return editedTv ; long accum = 0 ; for ( Edit edit : trak . getEdits ( ) ) { long duration = trak . rescale ( edit . getDuration ( ) , movieTimescale ) ; if ( accum + duration > editedTv ) { return edit . getMediaTime ( ) + editedTv - accum ; } accum += duration ; } return accum ; }
Converts edited timevalue to media timevalue