impement android.media.MediaCodec using libavcodec

The current implementation requires a VA-API driver and a Wayland
compositor with YUV-buffer support. GNOME supports YUV-buffers
since the recent version 45 release
This commit is contained in:
Julian Winkler
2023-10-08 16:09:27 +02:00
parent 23c0b006ef
commit b340032e9f
13 changed files with 834 additions and 13 deletions

View File

@@ -0,0 +1,42 @@
package android.media;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Map;
public class MediaFormat {
private Map<String, Object> map = new HashMap<>();
public void setString(String key, String value) {
map.put(key, value);
}
public void setInteger(String key, int value) {
map.put(key, value);
}
public void setByteBuffer(String key, ByteBuffer value) {
map.put(key, value);
}
public void setFloat(String key, float value) {
map.put(key, value);
}
public ByteBuffer getByteBuffer(String name) {
return (ByteBuffer) map.get(name);
}
public int getInteger(String name) {
return (int) map.get(name);
}
public boolean containsKey(String name) {
return map.containsKey(name);
}
public String toString() {
return map.toString();
}
}