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 { ...@@ -352,6 +352,17 @@ public class LibVLC {
return options.toArray(new String[options.size()]); 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() { public String getSubtitlesEncoding() {
return subtitlesEncoding; return subtitlesEncoding;
} }
......
...@@ -62,6 +62,9 @@ public class Media { ...@@ -62,6 +62,9 @@ public class Media {
public final static int TYPE_AUDIO = 1; public final static int TYPE_AUDIO = 1;
public final static int TYPE_GROUP = 2; 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 */ /** Metadata from libvlc_media */
protected String mTitle; protected String mTitle;
private String mArtist; private String mArtist;
...@@ -117,6 +120,7 @@ public class Media { ...@@ -117,6 +120,7 @@ public class Media {
private int mHeight = 0; private int mHeight = 0;
private Bitmap mPicture; private Bitmap mPicture;
private boolean mIsPictureParsed; private boolean mIsPictureParsed;
private int mFlags = 0;
/** /**
* Create a new Media * Create a new Media
...@@ -393,4 +397,14 @@ public class Media { ...@@ -393,4 +397,14 @@ public class Media {
public String getArtworkURL() { public String getArtworkURL() {
return mArtworkURL; 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