Tabnine Logo
Media.getTrack
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: mrmaffen/vlc-android-sdk

/**
 * Get the current video track
 */
public Media.VideoTrack getCurrentVideoTrack() {
  if (getVideoTrack() == -1)
    return null;
  final int trackCount = mMedia.getTrackCount();
  for (int i = 0; i < trackCount; ++i) {
    final Media.Track  track = mMedia.getTrack(i);
    if (track.type == Media.Track.Type.Video)
      return (Media.VideoTrack) track;
  }
  return null;
}
origin: pedroSG94/vlc-example-streamplayer

/**
 * Get the current video track
 */
public Media.VideoTrack getCurrentVideoTrack() {
  if (getVideoTrack() == -1)
    return null;
  final int trackCount = mMedia.getTrackCount();
  for (int i = 0; i < trackCount; ++i) {
    final Media.Track  track = mMedia.getTrack(i);
    if (track.type == Media.Track.Type.Video)
      return (Media.VideoTrack) track;
  }
  return null;
}
origin: wobiancao/RtspServerAndVlcPlay

/**
 * Get the current video track
 */
public Media.VideoTrack getCurrentVideoTrack() {
  if (getVideoTrack() == -1)
    return null;
  final int trackCount = mMedia.getTrackCount();
  for (int i = 0; i < trackCount; ++i) {
    final Media.Track  track = mMedia.getTrack(i);
    if (track.type == Media.Track.Type.Video)
      return (Media.VideoTrack) track;
  }
  return null;
}
origin: tomahawk-player/tomahawk-android

private void init(Media media) {
  mType = TYPE_ALL;
  if (media != null) {
    if (media.isParsed()) {
      mLength = media.getDuration();
      for (int i = 0; i < media.getTrackCount(); ++i) {
        final Media.Track track = media.getTrack(i);
        if (track == null)
          continue;
        if (track.type == Media.Track.Type.Video) {
          final Media.VideoTrack videoTrack = (VideoTrack) track;
          mType = TYPE_VIDEO;
          mWidth = videoTrack.width;
          mHeight = videoTrack.height;
        } else if (mType == TYPE_ALL && track.type == Media.Track.Type.Audio){
          mType = TYPE_AUDIO;
        }
      }
    }
    updateMeta(media);
    if (mType == TYPE_ALL && media.getType() == Media.Type.Directory)
      mType = TYPE_DIR;
  }
  defineType();
}
origin: tomahawk-player/tomahawk-android

  && TextUtils.isEmpty(media.getTrack(0).codec)))
  && fileURI.endsWith(".mod")) {
Log.d(TAG, "File skipped: " + fileURI);
origin: ymcao/YaPlayer

final Media.Track track = media.getTrack(i);
if (track == null)
  continue;
org.videolan.libvlcMediagetTrack

Javadoc

Get a Track The Track can be casted to AudioTrack, VideoTrack or SubtitleTrack in function of the Track.Type.

Popular methods of Media

  • <init>
  • addOption
    Add an option to this Media. This Media should be alive (not released).
  • release
  • setHWDecoderEnabled
    Add or remove hw acceleration media options
  • 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
  • getTrackCount
    Get the Track count.
  • getTracks
  • isReleased
  • nativeAddOption
  • nativeAddSlave
  • nativeAddOption,
  • nativeAddSlave,
  • nativeClearSlaves,
  • nativeGetDuration,
  • nativeGetMeta,
  • nativeGetMrl,
  • nativeGetSlaves,
  • nativeGetState,
  • nativeGetTracks

Popular in Java

  • Parsing JSON documents to java classes using gson
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Menu (java.awt)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for WebStorm
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