我不知道在这里问这个问题是否合适。如果没有,请提前告知我。
最近我正在研究FFmpeg for Android。一切都很好,但它的尺寸太大,所以我决定缩小尺寸。
我想我应该首先启用一些我可能使用的编码器。 Android上有哪些常见的编码器和解码?
另外,我可以使用package mypackage
import org.junit.Assert
import org.junit.Rule
import org.junit.Test
import org.neo4j.driver.internal.value.NullValue
import org.neo4j.driver.v1.Config
import org.neo4j.driver.v1.GraphDatabase
import org.neo4j.harness.junit.Neo4jRule
import java.io.File
import java.net.URI
class PropertyParserTest {
// this rule starts a Neo4j instance
@Rule
@JvmField
var neo4j: Neo4jRule = Neo4jRule()
// This is the procedure/function to test
.withProcedure(Mypackage::class.java)
@Test
@Throws(Throwable::class)
fun shouldSetTheNameCorrectly() {
GraphDatabase.driver(neo4j.boltURI(), Config.build().withoutEncryption().toConfig()).use({ driver ->
driver.session().use({ session ->
// Given
val path: String = File("src/test/resources/test_rdf__1.ttl").getAbsolutePath()
val testFile = File(path)
val urlTestFile: URI = testFile.toURI()
session.run("CALL mypackage.import('${urlTestFile}')")
// When
val result = session.run("MATCH (n) WHERE n:Person RETURN n.name as name")
// Then
var rec = result.next()
Assert.assertEquals("Manuel, Niklaus (Niclaus)", rec.get("name").asString())
rec = result?.next()
Assert.assertEquals("Fischli / Weiss", rec.get("name").asString())
rec = result?.next()
Assert.assertEquals("Hodler, Ferdinand", rec.get("name").asString())
})
})
}
@Test
@Throws(Throwable::class)
fun shouldSetTheAlternateNameCorrectly() {
GraphDatabase.driver(neo4j?.boltURI(), Config.build().withoutEncryption().toConfig()).use({ driver ->
driver.session().use({ session ->
// Given
val path: String = File("src/test/resources/test_rdf_2.ttl").absolutePath
val testFile = File(path)
val urlTestFile: URI = testFile.toURI()
session.run("CALL mypackage.import('${urlTestFile}')")
// When
val result = session.run("MATCH (n) WHERE n:Person RETURN n.name as name, n.alternate_names as alternate_names")
// Then
var rec = result.next()
Assert.assertEquals("Holbein, Hans", rec.get("name").asString())
var alternateNames = rec.get("alternate_names").asList()
Assert.assertEquals(9, alternateNames.size)
Assert.assertEquals("Holpenius, Joannes", alternateNames[0])
Assert.assertEquals("Olpenius, Hans", alternateNames[8])
rec = result.next()
Assert.assertEquals("Manuel, Niklaus (Niclaus)", rec.get("name").asString())
alternateNames = rec.get("alternate_names").asList()
Assert.assertEquals(8, alternateNames.size)
rec = result.next()
Assert.assertEquals("Fischli / Weiss", rec.get("name").asString())
Assert.assertTrue(rec.get("alternate_names") is NullValue)
rec = result.next()
Assert.assertEquals("Hodler, Ferdinand", rec.get("name").asString())
Assert.assertTrue(rec.get("alternate_names") is NullValue)
rec = result.next()
Assert.assertEquals("Holbein", rec.get("name").asString())
alternateNames = rec.get("alternate_names").asList()
Assert.assertEquals(3, alternateNames.size)
})
})
}
}
来显示所有可用的编码。
答案 0 :(得分:1)
正如Alex在评论中所说,支持将因设备而异,但Android确实为给定版本指定了最小集合: