Android Open Source - glvideoplayer-android Video Info






From Project

Back to project page glvideoplayer-android.

License

The source code is released under:

Apache License

If you think the Android project glvideoplayer-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package net.binzume.android.nicovideo;
//from w w  w  .j  a  v  a 2 s . c  om
import java.util.List;


public class VideoInfo {
  public final String videoId;
  public String title;
  public String description;
  public String thumbnailUrl;
  public List<String> tags;

  public String firstRetrive;
  public String lengthStr;

  public int viewCount = -1;
  public int mylistCount = -1;
  public int commentCount = -1;

  public VideoInfo(String videoId, String title) {
    this.videoId = videoId;
    this.title = title;
  }

  public static VideoInfo unserialize(String str) {
    String s[] = str.split("\\*", 10);
    if ("1".equals(s[0])) {
      s = str.split("\\*", 9);
      if (s.length != 9) {
        return null;
      }
    } else if ("2".equals(s[0])) {
      if (s.length != 10) {
        return null;
      }
    }

    VideoInfo videoInfo = new VideoInfo(s[1], s[s.length - 1]);

    videoInfo.thumbnailUrl = s[3];
    videoInfo.viewCount = Integer.parseInt(s[4]);
    videoInfo.mylistCount = Integer.parseInt(s[5]);
    videoInfo.commentCount = Integer.parseInt(s[6]);
    videoInfo.firstRetrive = s[7];
    if (s.length > 9) {
      videoInfo.lengthStr = s[8];
    }
    return videoInfo;
  }

  public String toString() {
    return "2*" + videoId + "**" + thumbnailUrl + "*" + viewCount + "*" + mylistCount + "*" + commentCount + "*"
        + firstRetrive + "*" + lengthStr + "*" + title;
  }

  /* (non-Javadoc)
   * @see java.lang.Object#equals(java.lang.Object)
   */
  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (!(obj instanceof VideoInfo))
      return false;
    VideoInfo other = (VideoInfo) obj;
    if (videoId == null) {
      if (other.videoId != null)
        return false;
    } else if (!videoId.equals(other.videoId))
      return false;
    return true;
  }
}




Java Source Code List

net.binzume.android.glvideoplayer.DeviceCameraPlane.java
net.binzume.android.glvideoplayer.FBOTexture.java
net.binzume.android.glvideoplayer.GLShaderProgram.java
net.binzume.android.glvideoplayer.GLVideoRenderer.java
net.binzume.android.glvideoplayer.MainActivity.java
net.binzume.android.glvideoplayer.MediaPlayerPlane.java
net.binzume.android.glvideoplayer.NicoCommentPlane.java
net.binzume.android.glvideoplayer.OESTexture.java
net.binzume.android.glvideoplayer.TextureFactory.java
net.binzume.android.glvideoplayer.Texture.java
net.binzume.android.glvideoplayer.VideoSurfaceView.java
net.binzume.android.nicoplayer.player.CommentController.java
net.binzume.android.nicoplayer.player.CommentLoadTask.java
net.binzume.android.nicoplayer.player.CommentSlot.java
net.binzume.android.nicovideo.ChannelCategoryInfo.java
net.binzume.android.nicovideo.ChannelInfo.java
net.binzume.android.nicovideo.Comment.java
net.binzume.android.nicovideo.MyList.java
net.binzume.android.nicovideo.NicoSession.java
net.binzume.android.nicovideo.ThreadInfo.java
net.binzume.android.nicovideo.VideoFileInfo.java
net.binzume.android.nicovideo.VideoInfo.java
net.binzume.android.nicovideo.util.HtmlUtil.java
net.binzume.android.nicovideo.util.HttpClient.java
net.binzume.android.nicovideo.webapi.ChannelAPI.java
net.binzume.android.nicovideo.webapi.CommentAPI.java
net.binzume.android.nicovideo.webapi.Constants.java
net.binzume.android.nicovideo.webapi.FriendListAPI.java
net.binzume.android.nicovideo.webapi.LoginAPI.java
net.binzume.android.nicovideo.webapi.MyListAPI.java
net.binzume.android.nicovideo.webapi.NotLoginException.java
net.binzume.android.nicovideo.webapi.PaymentRequiredException.java
net.binzume.android.nicovideo.webapi.VideoAPI.java
net.binzume.android.nicovideo.webapi.VideoRssParser.java
net.binzume.android.nicovideo.webapi.VideoSearchAPI.java
net.binzume.android.nicovideo.webapi.WatchItemAPI.java
net.binzume.android.nicovideo.webapi.WebApiException.java