Android Open Source - Demo-YouTuBe-Android Format






From Project

Back to project page Demo-YouTuBe-Android.

License

The source code is released under:

Apache License

If you think the Android project Demo-YouTuBe-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 com.lqg.youtube.support.player;
//from w w  w.  jav  a 2 s  .c o m
/**
 * Represents a format in the "fmt_list" parameter
 * Currently, only id is used
 */
public class Format {

    protected int mId;

    /**
     * Construct this object from one of the strings in the "fmt_list" parameter
     *
     * @param pFormatString one of the comma separated strings in the "fmt_list" parameter
     */
    public Format(String pFormatString) {
        String lFormatVars[] = pFormatString.split("/");
        mId = Integer.parseInt(lFormatVars[0]);
    }

    /**
     * Construct this object using a format id
     *
     * @param pId id of this format
     */
    public Format(int pId) {
        this.mId = pId;
    }

    /**
     * Retrieve the id of this format
     *
     * @return the id
     */
    public int getId() {
        return mId;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object pObject) {
        if (!(pObject instanceof Format)) {
            return false;
        }
        return ((Format) pObject).mId == mId;
    }
}




Java Source Code List

com.lqg.youtube.support.GlobalApplication.java
com.lqg.youtube.support.http.Search.java
com.lqg.youtube.support.player.Format.java
com.lqg.youtube.support.player.UrlParser.java
com.lqg.youtube.support.player.VideoId.java
com.lqg.youtube.support.player.VideoStream.java
com.lqg.youtube.support.util.ImageLoaderUtil.java
com.lqg.youtube.support.util.LogUtil.java
com.lqg.youtube.support.util.SearchSetting.java
com.lqg.youtube.ui.play.PlayVideoUsingVideoViewActivity.java
com.lqg.youtube.ui.play.PlayVideoUsingYouTuBeActivity.java
com.lqg.youtube.ui.search.MainActivity.java
com.lqg.youtube.ui.search.SearchFragment.java
com.lqg.youtube.ui.search.SearchResultAdapter.java
com.lqg.youtube.ui.search.SearchSetingFragment.java