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

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

Best Java code snippets using org.videolan.libvlc.Media.getTrackCount (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

parseCounter++;
if ((media.getDuration() == 0 || (media.getTrackCount() != 0
    && TextUtils.isEmpty(media.getTrack(0).codec)))
    && fileURI.endsWith(".mod")) {
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: ymcao/YaPlayer

mLength = media.getDuration();
for (int i = 0; i < media.getTrackCount(); ++i) {
  final Media.Track track = media.getTrack(i);
  if (track == null)
org.videolan.libvlcMediagetTrackCount

Javadoc

Get the Track count.

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
  • getTrack
    Get a Track The Track can be casted to AudioTrack, VideoTrack or SubtitleTrack in function of the Tr
  • getTracks
  • isReleased
  • nativeAddOption
  • nativeAddSlave
  • nativeAddOption,
  • nativeAddSlave,
  • nativeClearSlaves,
  • nativeGetDuration,
  • nativeGetMeta,
  • nativeGetMrl,
  • nativeGetSlaves,
  • nativeGetState,
  • nativeGetTracks

Popular in Java

  • Updating database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • getResourceAsStream (ClassLoader)
  • runOnUiThread (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Reference (javax.naming)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Table (org.hibernate.mapping)
    A relational table
  • Top PhpStorm plugins
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