String mimeType = null;
// we look for an encoder with same name and add mime_type of this
AVOutputFormat avOutputFormat = AVFORMAT.guess_format(avInputFormat.name, null,null);
if (avOutputFormat != null && avOutputFormat.mime_type != null && avOutputFormat.mime_type.length() > 0) {
mimeType = avOutputFormat.mime_type;
mimeTypes.put(mimeType, new ContentDescriptor(ContentDescriptor.mimeTypeToPackageName(mimeType)));
logger.log(Level.FINEST, i + ". " + avInputFormat.long_name + " : " + mimeType);
}
String[] additionalMimeTypes = (String[])additionalFormatMimeTypes.get(avInputFormat.name);
if (additionalMimeTypes != null) {
if (additionalMimeTypes == NOT_SUPPORTED_FORMAT) {
logger.log(Level.FINE, "Ignoring input format: " + avInputFormat.name + " (" + avInputFormat.long_name + ")");
} else {
for (int j = 0; j < additionalMimeTypes.length; j++) {
mimeType = additionalMimeTypes[j];
mimeTypes.put(mimeType, new ContentDescriptor(ContentDescriptor.mimeTypeToPackageName(mimeType)));
logger.log(Level.FINEST, i + ". " + avInputFormat.long_name + " : " + additionalMimeTypes[j]);
}
}
}
if (mimeType == null && additionalMimeTypes == null){
mimeType = "ffmpeg/"+avInputFormat.name;
mimeTypes.put(mimeType, new ContentDescriptor(ContentDescriptor.mimeTypeToPackageName(mimeType)));
}
i++;
if (avInputFormat.next != null /*&& avInputFormat.next.isValid()*/) {
avInputFormat = new AVInputFormat(avInputFormat.next);
}else{