It's great for beginners. Then it turns into a mess.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Method extension code | |
*/ | |
fun <T1, T2> Collection<T1>.combine(other: Iterable<T2>): List<Pair<T1, T2>> { | |
return combine(other, {thisItem: T1, otherItem: T2 -> Pair(thisItem, otherItem) }) | |
} | |
fun <T1, T2, R> Collection<T1>.combine(other: Iterable<T2>, transformer: (thisItem: T1, otherItem:T2) -> R): List<R> { | |
return this.flatMap { thisItem -> other.map { otherItem -> transformer(thisItem, otherItem) }} |
Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.
Here's an example video I made
brew install ffmpeg --with-libvidstab