Commit 02ce18e5 authored by Thomas Guillem's avatar Thomas Guillem
Browse files

libvlc/Media: add noVideo and noHWAccel flags

parent f81819ff
......@@ -352,6 +352,17 @@ public class LibVLC {
return options.toArray(new String[options.size()]);
}
public String[] getMediaOptions(Media media) {
boolean noHardwareAcceleration = false;
boolean noVideo = false;
if (media != null) {
final int flags = media.getFlags();
noHardwareAcceleration = (flags & Media.FLAG_NO_HWACCEL) != 0;
noVideo = (flags & Media.FLAG_NO_VIDEO) != 0;
}
return getMediaOptions(noHardwareAcceleration, noVideo);
}
public String getSubtitlesEncoding() {
return subtitlesEncoding;
}
......
......@@ -62,6 +62,9 @@ public class Media {
public final static int TYPE_AUDIO = 1;
public final static int TYPE_GROUP = 2;
public final static int FLAG_NO_VIDEO = 0x01;
public final static int FLAG_NO_HWACCEL = 0x02;
/** Metadata from libvlc_media */
protected String mTitle;
private String mArtist;
......@@ -117,6 +120,7 @@ public class Media {
private int mHeight = 0;
private Bitmap mPicture;
private boolean mIsPictureParsed;
private int mFlags = 0;
/**
* Create a new Media
......@@ -393,4 +397,14 @@ public class Media {
public String getArtworkURL() {
return mArtworkURL;
}
public void addFlags(int flags) {
mFlags |= flags;
}
public void setFlags(int flags) {
mFlags = flags;
}
public int getFlags() {
return mFlags;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment