congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Media.setHWDecoderEnabled
Code IndexAdd Tabnine to your IDE (free)

How to use
setHWDecoderEnabled
method
in
org.videolan.libvlc.Media

Best Java code snippets using org.videolan.libvlc.Media.setHWDecoderEnabled (Showing top 9 results out of 315)

origin: mrmaffen/vlc-android-sdk

/**
 * Enable HWDecoder options if not already set
 */
protected void setDefaultMediaPlayerOptions() {
  boolean codecOptionSet;
  synchronized (this) {
    codecOptionSet = mCodecOptionSet;
    mCodecOptionSet = true;
  }
  if (!codecOptionSet)
    setHWDecoderEnabled(true, false);
}
origin: Shirlman/YiPlayer

/**
 * Enable HWDecoder options if not already set
 */
protected void setDefaultMediaPlayerOptions() {
  boolean codecOptionSet;
  synchronized (this) {
    codecOptionSet = mCodecOptionSet;
    mCodecOptionSet = true;
  }
  if (!codecOptionSet)
    setHWDecoderEnabled(true, false);
}
origin: ymcao/YaPlayer

/**
 * Enable HWDecoder options if not already set
 */
protected void setDefaultMediaPlayerOptions() {
  boolean codecOptionSet;
  synchronized (this) {
    codecOptionSet = mCodecOptionSet;
    mCodecOptionSet = true;
  }
  if (!codecOptionSet)
    setHWDecoderEnabled(true, false);
}
origin: wobiancao/RtspServerAndVlcPlay

/**
 * Enable HWDecoder options if not already set
 */
protected void setDefaultMediaPlayerOptions() {
  boolean codecOptionSet;
  synchronized (this) {
    codecOptionSet = mCodecOptionSet;
    mCodecOptionSet = true;
  }
  if (!codecOptionSet)
    setHWDecoderEnabled(true, false);
}
origin: pedroSG94/vlc-example-streamplayer

/**
 * Enable HWDecoder options if not already set
 */
protected void setDefaultMediaPlayerOptions() {
  boolean codecOptionSet;
  synchronized (this) {
    codecOptionSet = mCodecOptionSet;
    mCodecOptionSet = true;
  }
  if (!codecOptionSet)
    setHWDecoderEnabled(true, false);
}
origin: ymcao/YaPlayer

public static void setMediaOptions(Media media, Context context, int flags) {
  boolean noHardwareAcceleration = (flags & MediaWrapper.MEDIA_NO_HWACCEL) != 0;
  boolean noVideo = (flags & MediaWrapper.MEDIA_VIDEO) == 0;
  final boolean paused = (flags & MediaWrapper.MEDIA_PAUSED) != 0;
  int hardwareAcceleration = HW_ACCELERATION_DISABLED;
  if (!noHardwareAcceleration) {
    try {
      final SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context);
      hardwareAcceleration = Integer.parseInt(pref.getString("hardware_acceleration", "-1"));
    } catch (NumberFormatException ignored) {
    }
  }
  if (hardwareAcceleration == HW_ACCELERATION_DISABLED)
    media.setHWDecoderEnabled(false, false);
  else if (hardwareAcceleration == HW_ACCELERATION_FULL || hardwareAcceleration == HW_ACCELERATION_DECODING) {
    media.setHWDecoderEnabled(true, true);
    if (hardwareAcceleration == HW_ACCELERATION_DECODING) {
      media.addOption(":no-mediacodec-dr");
      media.addOption(":no-omxil-dr");
    }
  } /* else automatic: use default options */
  if (noVideo)
    media.addOption(":no-video");
  if (paused)
    media.addOption(":start-paused");
}
origin: ymcao/YaPlayer

final Media media = new Media(libVLC, Uri.parse(path));
if (Build.VERSION.SDK_INT <= KITKAT) {
  media.setHWDecoderEnabled(false, false);
final Media media = new Media(libVLC, path);
if (Build.VERSION.SDK_INT <= KITKAT) {
  media.setHWDecoderEnabled(false, false);
origin: mengzhidaren/RecyclerViewVideoDemo

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  libVLC = VLCInstance.get(getContext());
  mediaPlayer = new MediaPlayer(libVLC);
  Media media = new Media(libVLC, Uri.parse(path));
  media.setHWDecoderEnabled(false, false);
  media.parseAsync(Media.Parse.FetchNetwork, 10 * 1000);
  mediaPlayer.setMedia(media);
  mediaPlayer.setEventListener(new MediaPlayer.EventListener() {
    @Override
    public void onEvent(MediaPlayer.Event event) {
      switch (event.type) {
        case MediaPlayer.Event.Opening:
          Log.i(tag, "Event Opening");
          break;
        case MediaPlayer.Event.Buffering:
          Log.i(tag, "Event Buffering=" + event.getBuffering());
          break;
        case MediaPlayer.Event.Stopped:
          Log.i(tag, "Event Stopped");
          break;
      }
    }
  });
  mediaPlayer.getVLCVout().addCallback(this);
}
origin: pedroSG94/vlc-example-streamplayer

media.setHWDecoderEnabled(true, false);
player = new MediaPlayer(vlcInstance);
player.setMedia(media);
org.videolan.libvlcMediasetHWDecoderEnabled

Javadoc

Add or remove hw acceleration media options

Popular methods of Media

  • <init>
  • addOption
    Add an option to this Media. This Media should be alive (not released).
  • release
  • parse
    Parse the media synchronously with a flag. This Media should be alive (not released).
  • parseAsync
    Parse the media asynchronously with a flag. This Media should be alive (not released). To track when
  • getMediaCodecModule
  • getTrack
    Get a Track The Track can be casted to AudioTrack, VideoTrack or SubtitleTrack in function of the Tr
  • getTrackCount
    Get the Track count.
  • getTracks
  • isReleased
  • nativeAddOption
  • nativeAddSlave
  • nativeAddOption,
  • nativeAddSlave,
  • nativeClearSlaves,
  • nativeGetDuration,
  • nativeGetMeta,
  • nativeGetMrl,
  • nativeGetSlaves,
  • nativeGetState,
  • nativeGetTracks

Popular in Java

  • Running tasks concurrently on multiple threads
  • getApplicationContext (Context)
  • setScale (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now