All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.mmauro94.mkvtoolnix_wrapper.extract.MkvExtractAttachmentExtractionMode.kt Maven / Gradle / Ivy

Go to download

An easy to use light kotlin-jvm wrapper for most common mkvmerge and mkvpropedit CLI commands

The newest version!
package com.github.mmauro94.mkvtoolnix_wrapper.extract

import com.github.mmauro94.mkvtoolnix_wrapper.*
import java.io.File

class MkvExtractAttachmentExtractionMode : MkvExtractExtractionMode {

    val tracks: MutableList> = ArrayList()

    fun addAttachment(attachment: MkvToolnixAttachment, file: File) {
        addAttachmentId(attachment.id, file)
    }

    fun addAttachmentId(attachmentId: Long, file: File) {
        tracks.add(attachmentId to file)
    }

    override fun commandArgs(): List = ArrayList().apply {
        add("attachments")
        tracks.forEach {(id,file)->
            add("$id:${file.absolutePath}")
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy