infos = manager.getRunningAppProcesses();
- for (ActivityManager.RunningAppProcessInfo info : infos) {
- if (info.pid == pid)
- return info.processName;
- }
- return "";
- }
-
- public static int getAppVersionCode(Context context) {
- int versioncode = 0;
- try {
- // ---get the package info---
- PackageManager pm = context.getPackageManager();
- PackageInfo pi = pm.getPackageInfo(context.getPackageName(), 0);
- versioncode = pi.versionCode;
- } catch (Exception e) {
- Log.e("VersionInfo", "Exception", e);
- }
- return versioncode;
- }
-
- public static void wrapTabIndicatorToTitle(TabLayout tabLayout, int externalMargin, int internalMargin) {
- View tabStrip = tabLayout.getChildAt(0);
- if (tabStrip instanceof ViewGroup) {
- ViewGroup tabStripGroup = (ViewGroup) tabStrip;
- int childCount = ((ViewGroup) tabStrip).getChildCount();
- for (int i = 0; i < childCount; i++) {
- View tabView = tabStripGroup.getChildAt(i);
- //set minimum width to 0 for instead for small texts, indicator is not wrapped as expected
- tabView.setMinimumWidth(0);
- // set padding to 0 for wrapping indicator as title
- tabView.setPadding(0, tabView.getPaddingTop(), 0, tabView.getPaddingBottom());
- // setting custom margin between tabs
- if (tabView.getLayoutParams() instanceof ViewGroup.MarginLayoutParams) {
- ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) tabView.getLayoutParams();
- if (i == 0) {
- // left
- setTabMargin(layoutParams, externalMargin, internalMargin);
- } else if (i == childCount - 1) {
- // right
- setTabMargin(layoutParams, internalMargin, externalMargin);
- } else {
- // internal
- setTabMargin(layoutParams, internalMargin, internalMargin);
- }
- }
- }
-
- tabLayout.requestLayout();
- }
- }
-
- private static void setTabMargin(ViewGroup.MarginLayoutParams layoutParams, int start, int end) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
- layoutParams.setMarginStart(start);
- layoutParams.setMarginEnd(end);
- } else {
- layoutParams.leftMargin = start;
- layoutParams.rightMargin = end;
- }
- }
-
- public static boolean savePhotoToSDCard(Bitmap photoBitmap, String path, String photoName) {
- boolean ret = false;
- File dir = new File(path);
- if (!dir.exists()) {
- dir.mkdirs();
- }
-
- File photoFile = new File(path, photoName + ".jpg");
- FileOutputStream fileOutputStream = null;
- try {
- fileOutputStream = new FileOutputStream(photoFile);
- if (photoBitmap != null) {
- if (photoBitmap.compress(Bitmap.CompressFormat.JPEG, 100, fileOutputStream)) {
- fileOutputStream.flush();
- ret = true;
- }
- }
- } catch (FileNotFoundException e) {
- photoFile.delete();
- e.printStackTrace();
- } catch (IOException e) {
- photoFile.delete();
- e.printStackTrace();
- } finally {
- try {
- fileOutputStream.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return ret;
- }
-
- public static AVOptions createAVOptions() {
- AVOptions options = new AVOptions();
- // the unit of timeout is ms
- options.setInteger(AVOptions.KEY_PREPARE_TIMEOUT, 10 * 1000);
- options.setInteger(AVOptions.KEY_LIVE_STREAMING, 0);
- // 1 -> hw codec enable, 0 -> disable [recommended]
- options.setInteger(AVOptions.KEY_MEDIACODEC, AVOptions.MEDIA_CODEC_SW_DECODE);
- options.setInteger(AVOptions.KEY_PREFER_FORMAT, AVOptions.PREFER_FORMAT_MP4);
- boolean disableLog = false;
- options.setInteger(AVOptions.KEY_LOG_LEVEL, disableLog ? 5 : 0);
- return options;
- }
-}
diff --git a/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/CircleImageView.java b/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/CircleImageView.java
deleted file mode 100644
index 7e02a25..0000000
--- a/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/CircleImageView.java
+++ /dev/null
@@ -1,76 +0,0 @@
-
-package com.qiniu.droid.niuplayer.widget;
-
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.BitmapShader;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Matrix;
-import android.graphics.Paint;
-import android.graphics.Rect;
-import android.graphics.Shader;
-import android.graphics.drawable.BitmapDrawable;
-import android.graphics.drawable.ColorDrawable;
-import android.graphics.drawable.Drawable;
-import android.support.annotation.Nullable;
-import android.util.AttributeSet;
-import android.support.v7.widget.AppCompatImageView;
-
-public class CircleImageView extends AppCompatImageView {
- public CircleImageView(Context context) {
- super(context);
- }
-
- public CircleImageView(Context context, @Nullable AttributeSet attrs) {
- super(context, attrs);
- }
-
- private Paint mPaintBitmap = new Paint(Paint.ANTI_ALIAS_FLAG);
- private Bitmap mRawBitmap;
- private BitmapShader mShader;
- private Matrix mMatrix = new Matrix();
-
- @Override
- protected void onDraw(Canvas canvas) {
- Bitmap rawBitmap = getBitmap(getDrawable());
- if (rawBitmap != null) {
- int viewWidth = getWidth();
- int viewHeight = getHeight();
- int viewMinSize = Math.min(viewWidth, viewHeight);
- float dstWidth = viewMinSize;
- float dstHeight = viewMinSize;
- if (mShader == null || !rawBitmap.equals(mRawBitmap)) {
- mRawBitmap = rawBitmap;
- mShader = new BitmapShader(mRawBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
- }
- if (mShader != null) {
- mMatrix.setScale(dstWidth / rawBitmap.getWidth(), dstHeight / rawBitmap.getHeight());
- mShader.setLocalMatrix(mMatrix);
- }
- mPaintBitmap.setShader(mShader);
- float radius = viewMinSize / 2.0f;
- canvas.drawCircle(radius, radius, radius, mPaintBitmap);
- } else {
- super.onDraw(canvas);
- }
- }
-
- private Bitmap getBitmap(Drawable drawable) {
- if (drawable instanceof BitmapDrawable) {
- return ((BitmapDrawable) drawable).getBitmap();
- } else if (drawable instanceof ColorDrawable) {
- Rect rect = drawable.getBounds();
- int width = rect.right - rect.left;
- int height = rect.bottom - rect.top;
- int color = ((ColorDrawable) drawable).getColor();
- Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(bitmap);
- canvas.drawARGB(Color.alpha(color), Color.red(color), Color.green(color), Color.blue(color));
- return bitmap;
- } else {
- return null;
- }
- }
-}
diff --git a/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/CommomDialog.java b/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/CommomDialog.java
deleted file mode 100644
index 5d7a282..0000000
--- a/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/CommomDialog.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package com.qiniu.droid.niuplayer.widget;
-
-import android.app.Activity;
-import android.app.Dialog;
-import android.os.Bundle;
-import android.text.TextUtils;
-import android.view.Display;
-import android.view.View;
-import android.view.WindowManager;
-import android.widget.EditText;
-import android.widget.TextView;
-
-import com.qiniu.droid.niuplayer.R;
-
-public class CommomDialog extends Dialog implements View.OnClickListener {
- private TextView mTitleTxt;
- private TextView mSubmitTxt;
- private TextView mCancelTxt;
- private EditText mEditText;
-
- private Activity mActivity;
- private OnCloseListener listener;
- private String positiveName;
- private String negativeName;
- private String title;
-
- public CommomDialog(Activity activity) {
- this(activity, R.style.dialog, null);
- }
-
- public CommomDialog(Activity activity, int themeResId, String content) {
- super(activity, themeResId);
- this.mActivity = activity;
- }
-
- public CommomDialog(Activity activity, int themeResId, String content, OnCloseListener listener) {
- super(activity, themeResId);
- this.mActivity = activity;
- this.listener = listener;
- }
-
- protected CommomDialog(Activity activity, boolean cancelable, OnCancelListener cancelListener) {
- super(activity, cancelable, cancelListener);
- this.mActivity = activity;
- }
-
- public String getEditString() {
- return mEditText.getText().toString();
- }
-
- public CommomDialog setTitle(String title) {
- this.title = title;
- return this;
- }
-
- public CommomDialog setPositiveButton(String name) {
- this.positiveName = name;
- return this;
- }
-
- public CommomDialog setNegativeButton(String name) {
- this.negativeName = name;
- return this;
- }
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.dialog_common);
- setCanceledOnTouchOutside(false);
- initView();
- }
-
- private void initView() {
- mTitleTxt = (TextView) findViewById(R.id.title);
- mSubmitTxt = (TextView) findViewById(R.id.submit);
- mSubmitTxt.setOnClickListener(this);
- mCancelTxt = (TextView) findViewById(R.id.cancel);
- mEditText = findViewById(R.id.edit_text);
- mCancelTxt.setOnClickListener(this);
-
- if (!TextUtils.isEmpty(positiveName)) {
- mSubmitTxt.setText(positiveName);
- }
-
- if (!TextUtils.isEmpty(negativeName)) {
- mCancelTxt.setText(negativeName);
- }
-
- if (!TextUtils.isEmpty(title)) {
- mTitleTxt.setText(title);
- }
-
- WindowManager windowManager = mActivity.getWindowManager();
- Display display = windowManager.getDefaultDisplay();
- WindowManager.LayoutParams lp = this.getWindow().getAttributes();
- lp.width = (int) (display.getWidth() * 0.75);
- this.getWindow().setAttributes(lp);
- }
-
- @Override
- public void onClick(View v) {
- switch (v.getId()) {
- case R.id.cancel:
- if (listener != null) {
- listener.onClick(this, false);
- }
- this.dismiss();
- break;
- case R.id.submit:
- if (listener != null) {
- listener.onClick(this, true);
- }
- break;
- }
- }
-
- public interface OnCloseListener {
- void onClick(Dialog dialog, boolean confirm);
- }
-}
\ No newline at end of file
diff --git a/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/GestureControllerListener.java b/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/GestureControllerListener.java
deleted file mode 100644
index f090bb8..0000000
--- a/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/GestureControllerListener.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package com.qiniu.droid.niuplayer.widget;
-
-
-import android.app.Activity;
-import android.content.Context;
-import android.media.AudioManager;
-import android.view.GestureDetector;
-import android.view.MotionEvent;
-import android.view.WindowManager;
-
-public class GestureControllerListener implements GestureDetector.OnGestureListener {
- private float mCurVolume;
- private Activity mActivity;
-
- public GestureControllerListener(Activity activity) {
- mActivity = activity;
- }
-
- @Override
- public boolean onDown(MotionEvent motionEvent) {
- return true;
- }
-
- @Override
- public void onShowPress(MotionEvent motionEvent) {
- }
-
- @Override
- public boolean onSingleTapUp(MotionEvent motionEvent) {
- return true;
- }
-
- @Override
- public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
- float touchX = e1.getX();
- WindowManager wm = (WindowManager) mActivity
- .getSystemService(Context.WINDOW_SERVICE);
- int width = wm.getDefaultDisplay().getWidth();
-
- final double FLING_MIN_DISTANCE = 0.5;
- final double FLING_MIN_VELOCITY = 0.5;
- if (e1.getY() - e2.getY() > FLING_MIN_DISTANCE
- && Math.abs(distanceY) > FLING_MIN_VELOCITY) {
- if (touchX > width / 2) {
- setVolume(0.1f);
- } else {
- setBrightness(10);
- }
- }
- if (e1.getY() - e2.getY() < FLING_MIN_DISTANCE
- && Math.abs(distanceY) > FLING_MIN_VELOCITY) {
- if (touchX > width / 2) {
- setVolume(-0.1f);
- } else {
- setBrightness(-10);
- }
- }
- return false;
- }
-
- @Override
- public void onLongPress(MotionEvent motionEvent) {
- }
-
- @Override
- public boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent1, float v, float v1) {
- return false;
- }
-
- public void setVolume(float volume) {
- AudioManager audioManager = (AudioManager) mActivity.getSystemService(Context.AUDIO_SERVICE);
- int maxVolume = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC); // 获取系统最大音量
-
- if (mCurVolume == 0) {
- mCurVolume = (float) (audioManager.getStreamVolume(AudioManager.STREAM_MUSIC));
- }
- mCurVolume += volume;
- if (mCurVolume > maxVolume) {
- mCurVolume = maxVolume;
- } else if (mCurVolume < 0) {
- mCurVolume = 0;
- }
- audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, (int) mCurVolume, 0);
- }
-
- public void setBrightness(float brightness) {
- WindowManager.LayoutParams lp = mActivity.getWindow().getAttributes();
- lp.screenBrightness = lp.screenBrightness + brightness / 255.0f;
- if (lp.screenBrightness > 1) {
- lp.screenBrightness = 1;
- } else if (lp.screenBrightness < 0.01) {
- lp.screenBrightness = (float) 0.01;
- }
- mActivity.getWindow().setAttributes(lp);
- }
-}
-
diff --git a/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/MediaController.java b/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/MediaController.java
deleted file mode 100644
index 24fec43..0000000
--- a/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/MediaController.java
+++ /dev/null
@@ -1,603 +0,0 @@
-package com.qiniu.droid.niuplayer.widget;
-
-import android.annotation.SuppressLint;
-import android.content.Context;
-import android.content.res.Resources;
-import android.graphics.Rect;
-import android.media.AudioManager;
-import android.os.Build;
-import android.os.Handler;
-import android.os.Message;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.KeyEvent;
-import android.view.LayoutInflater;
-import android.view.MotionEvent;
-import android.view.View;
-import android.widget.FrameLayout;
-import android.widget.ImageButton;
-import android.widget.PopupWindow;
-import android.widget.ProgressBar;
-import android.widget.SeekBar;
-import android.widget.TextView;
-
-import com.pili.pldroid.player.IMediaController;
-import com.qiniu.droid.niuplayer.R;
-
-import java.util.Locale;
-
-/**
- * You can write a custom MediaController instead of this class
- * A MediaController widget must implement all the interface defined by com.pili.pldroid.player.IMediaController
- */
-public class MediaController extends FrameLayout implements IMediaController {
-
- private static final String TAG = "PLMediaController";
- private IMediaController.MediaPlayerControl mPlayer;
- private Context mContext;
- private PopupWindow mWindow;
- private int mAnimStyle;
- private View mAnchor;
- private View mRoot;
- private ProgressBar mProgress;
- private TextView mEndTime, mCurrentTime;
- private long mDuration;
- private boolean mShowing;
- private boolean mDragging;
- private boolean mInstantSeeking = true;
- private static int sDefaultTimeout = 3000;
- private static final int SEEK_TO_POST_DELAY_MILLIS = 200;
-
- private static final int FADE_OUT = 1;
- private static final int SHOW_PROGRESS = 2;
- private boolean mFromXml = false;
- private ImageButton mPauseButton;
- private ImageButton mFfwdButton;
- private ImageButton mRewButton;
- private ImageButton mNextButton;
- private ImageButton mPrevButton;
-
- private boolean mUseFastForward;
-
- private static final int MEDIA_CONTROLLER_ID = Resources.getSystem().getIdentifier("media_controller", "layout", "android");
- private static final int PRV_BUTTON_ID = Resources.getSystem().getIdentifier("prev","id", "android");
- private static final int FFWD_BUTTON_ID = Resources.getSystem().getIdentifier("ffwd","id", "android");
- private static final int NEXT_BUTTON_ID = Resources.getSystem().getIdentifier("next","id", "android");
- private static final int REW_BUTTON_ID = Resources.getSystem().getIdentifier("rew","id", "android");
-
- private static int PAUSE_BUTTON_ID = Resources.getSystem().getIdentifier("pause","id", "android");
- private static int MEDIACONTROLLER_PROGRESS_ID = Resources.getSystem().getIdentifier("mediacontroller_progress","id", "android");
- private static int END_TIME_ID = Resources.getSystem().getIdentifier("time","id", "android");
- private static int CURRENT_TIME_ID = Resources.getSystem().getIdentifier("time_current","id", "android");
- private static int IC_MEDIA_PAUSE_ID = Resources.getSystem().getIdentifier("ic_media_pause","drawable", "android");
- private static int IC_MEDIA_PLAY_ID = Resources.getSystem().getIdentifier("ic_media_play","drawable", "android");
-
- private AudioManager mAM;
- private Runnable mLastSeekBarRunnable;
- private boolean mDisableProgress = false;
- private OnClickSpeedAdjustListener mOnClickSpeedAdjustListener;
-
- public interface OnClickSpeedAdjustListener {
- void onClickNormal();
- void onClickFaster();
- void onClickSlower();
- }
-
- public MediaController(Context context, AttributeSet attrs) {
- super(context, attrs);
- mRoot = this;
- mFromXml = true;
- initController(context);
- }
-
- public MediaController(Context context) {
- super(context);
- if (!mFromXml && initController(context))
- initFloatingWindow();
- }
-
- public MediaController(Context context, boolean useFastForward, boolean disableProgressBar) {
- this(context);
- mUseFastForward = useFastForward;
- mDisableProgress = disableProgressBar;
- }
-
- public MediaController(Context context, boolean useFastForward) {
- this(context);
- mUseFastForward = useFastForward;
- }
-
- public void refreshProgress() {
- mProgress.setProgress(1000);
- mCurrentTime.setText(generateTime(mDuration));
- }
-
- public void setOnClickSpeedAdjustListener(OnClickSpeedAdjustListener listener) {
- mOnClickSpeedAdjustListener = listener;
- }
-
- private boolean initController(Context context) {
- mUseFastForward = true;
- mContext = context.getApplicationContext();
- mAM = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
- return true;
- }
-
- @Override
- public void onFinishInflate() {
- if (mRoot != null)
- initControllerView(mRoot);
- super.onFinishInflate();
- }
-
- private void initFloatingWindow() {
- mWindow = new PopupWindow(mContext);
- mWindow.setFocusable(false);
- mWindow.setBackgroundDrawable(null);
- mWindow.setOutsideTouchable(true);
- mAnimStyle = android.R.style.Animation;
- }
-
- /**
- * Create the view that holds the widgets that control playback. Derived
- * classes can override this to create their own.
- *
- * @return The controller view.
- */
- protected View makeControllerView() {
- return ((LayoutInflater) mContext
- .getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(MEDIA_CONTROLLER_ID, this);
- }
-
- private void initControllerView(View v) {
- if (mFromXml){
- PAUSE_BUTTON_ID = R.id.controller_stop_play;
- MEDIACONTROLLER_PROGRESS_ID = R.id.controller_progress_bar;
- END_TIME_ID = R.id.controller_end_time;
- CURRENT_TIME_ID = R.id.controller_current_time;
- IC_MEDIA_PAUSE_ID = R.drawable.player_stop;
- IC_MEDIA_PLAY_ID = R.drawable.play_player;
- }
-
- // By default these are hidden.
- mPrevButton = (ImageButton) v.findViewById(PRV_BUTTON_ID);
- if (mPrevButton != null) {
- mPrevButton.setVisibility(View.GONE);
- }
- mNextButton = (ImageButton) v.findViewById(NEXT_BUTTON_ID);
- if (mNextButton != null) {
- mNextButton.setVisibility(View.GONE);
- }
-
- mFfwdButton = (ImageButton) v.findViewById(FFWD_BUTTON_ID);
- if (mFfwdButton != null) {
- mFfwdButton.setOnClickListener(mFfwdListener);
- if (!mFromXml) {
- mFfwdButton.setVisibility(mUseFastForward ? View.VISIBLE : View.GONE);
- }
- }
-
- mRewButton = (ImageButton) v.findViewById(REW_BUTTON_ID);
- if (mRewButton != null) {
- mRewButton.setOnClickListener(mRewListener);
- if (!mFromXml) {
- mRewButton.setVisibility(mUseFastForward ? View.VISIBLE : View.GONE);
- }
- }
- mPauseButton = (ImageButton) v.findViewById(PAUSE_BUTTON_ID);
- if (mPauseButton != null) {
- mPauseButton.requestFocus();
- mPauseButton.setOnClickListener(mPauseListener);
- }
-
- mProgress = (ProgressBar) v.findViewById(MEDIACONTROLLER_PROGRESS_ID);
- if (mProgress != null) {
- if (mProgress instanceof SeekBar) {
- SeekBar seeker = (SeekBar) mProgress;
- seeker.setOnSeekBarChangeListener(mSeekListener);
- seeker.setThumbOffset(1);
- }
- mProgress.setMax(1000);
- mProgress.setEnabled(!mDisableProgress);
- }
-
- mEndTime = (TextView) v.findViewById(END_TIME_ID);
- mCurrentTime = (TextView) v.findViewById(CURRENT_TIME_ID);
- }
-
- /**
- * Control the action when the seekbar dragged by user
- *
- * @param seekWhenDragging
- * True the media will seek periodically
- */
- public void setInstantSeeking(boolean seekWhenDragging) {
- mInstantSeeking = seekWhenDragging;
- }
-
- private void disableUnsupportedButtons() {
- try {
- if (mPauseButton != null && !mPlayer.canPause())
- mPauseButton.setEnabled(false);
- } catch (IncompatibleClassChangeError ex) {
- }
- }
-
- /**
- *
- * Change the animation style resource for this controller.
- *
- *
- *
- * If the controller is showing, calling this method will take effect only
- * the next time the controller is shown.
- *
- *
- * @param animationStyle
- * animation style to use when the controller appears and disappears.
- * Set to -1 for the default animation, 0 for no animation,
- * or a resource identifier for an explicit animation.
- *
- */
- public void setAnimationStyle(int animationStyle) {
- mAnimStyle = animationStyle;
- }
-
-
- public interface OnShownListener {
- public void onShown();
- }
-
- private OnShownListener mShownListener;
-
- public void setOnShownListener(OnShownListener l) {
- mShownListener = l;
- }
-
- public interface OnHiddenListener {
- public void onHidden();
- }
-
- private OnHiddenListener mHiddenListener;
-
- public void setOnHiddenListener(OnHiddenListener l) {
- mHiddenListener = l;
- }
-
- @SuppressLint("HandlerLeak")
- private Handler mHandler = new Handler() {
- @Override
- public void handleMessage(Message msg) {
- long pos;
- switch (msg.what) {
- case FADE_OUT:
- hide();
- break;
- case SHOW_PROGRESS:
- if (!mPlayer.isPlaying()) {
- return;
- }
- pos = setProgress();
- if (pos == -1) {
- return;
- }
- if (!mDragging && mShowing) {
- msg = obtainMessage(SHOW_PROGRESS);
- sendMessageDelayed(msg, 1000 - (pos % 1000));
- updatePausePlay();
- }
- break;
- }
- }
- };
-
- private long setProgress() {
- if (mPlayer == null || mDragging) {
- return 0;
- }
-
- long position = mPlayer.getCurrentPosition();
- long duration = mPlayer.getDuration();
- if (mProgress != null) {
- if (duration > 0) {
- long pos = 1000L * position / duration;
- mProgress.setProgress((int) pos);
- }
- int percent = mPlayer.getBufferPercentage();
- mProgress.setSecondaryProgress(percent * 10);
- }
-
- mDuration = duration;
-
- if (mEndTime != null)
- mEndTime.setText(generateTime(mDuration));
- if (mCurrentTime != null)
- mCurrentTime.setText(generateTime(position));
-
- return position;
- }
-
- private static String generateTime(long position) {
- int totalSeconds = (int) (position / 1000);
-
- int seconds = totalSeconds % 60;
- int minutes = (totalSeconds / 60) % 60;
- int hours = totalSeconds / 3600;
-
- if (hours > 0) {
- return String.format(Locale.US, "%02d:%02d:%02d", hours, minutes,
- seconds).toString();
- } else {
- return String.format(Locale.US, "%02d:%02d", minutes, seconds)
- .toString();
- }
- }
-
- @Override
- public boolean onTouchEvent(MotionEvent event) {
- show(sDefaultTimeout);
- return true;
- }
-
- @Override
- public boolean onTrackballEvent(MotionEvent ev) {
- show(sDefaultTimeout);
- return false;
- }
-
- @Override
- public boolean dispatchKeyEvent(KeyEvent event) {
- int keyCode = event.getKeyCode();
- if (event.getRepeatCount() == 0
- && (keyCode == KeyEvent.KEYCODE_HEADSETHOOK
- || keyCode == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE || keyCode == KeyEvent.KEYCODE_SPACE)) {
- doPauseResume();
- show(sDefaultTimeout);
- if (mPauseButton != null)
- mPauseButton.requestFocus();
- return true;
- } else if (keyCode == KeyEvent.KEYCODE_MEDIA_STOP) {
- if (mPlayer.isPlaying()) {
- mPlayer.pause();
- updatePausePlay();
- }
- return true;
- } else if (keyCode == KeyEvent.KEYCODE_BACK
- || keyCode == KeyEvent.KEYCODE_MENU) {
- hide();
- return true;
- } else {
- show(sDefaultTimeout);
- }
- return super.dispatchKeyEvent(event);
- }
-
- private OnClickListener mPauseListener = new OnClickListener() {
- public void onClick(View v) {
- if (mOnClickSpeedAdjustListener != null) {
- mOnClickSpeedAdjustListener.onClickNormal();
- }
- doPauseResume();
- show(sDefaultTimeout);
- }
- };
-
- private void updatePausePlay() {
- if (mRoot == null || mPauseButton == null)
- return;
-
- if (mPlayer.isPlaying())
- mPauseButton.setImageResource(IC_MEDIA_PAUSE_ID);
- else
- mPauseButton.setImageResource(IC_MEDIA_PLAY_ID);
- }
-
- private void doPauseResume() {
- if (mPlayer.isPlaying())
- mPlayer.pause();
- else
- mPlayer.start();
- updatePausePlay();
- }
-
- private SeekBar.OnSeekBarChangeListener mSeekListener = new SeekBar.OnSeekBarChangeListener() {
-
- public void onStartTrackingTouch(SeekBar bar) {
- mDragging = true;
- show(3600000);
- mHandler.removeMessages(SHOW_PROGRESS);
- if (mInstantSeeking)
- mAM.setStreamMute(AudioManager.STREAM_MUSIC, true);
- }
-
- public void onProgressChanged(SeekBar bar, int progress, boolean fromuser) {
- if (!fromuser) {
- return;
- }
-
-
- final long newposition = (long) (mDuration * progress) / 1000;
- String time = generateTime(newposition);
- if (mInstantSeeking) {
- mHandler.removeCallbacks(mLastSeekBarRunnable);
- mLastSeekBarRunnable = new Runnable() {
- @Override
- public void run() {
- mPlayer.seekTo(newposition);
- }
- };
- mHandler.postDelayed(mLastSeekBarRunnable, SEEK_TO_POST_DELAY_MILLIS);
- }
- if (mCurrentTime != null)
- mCurrentTime.setText(time);
- }
-
- public void onStopTrackingTouch(SeekBar bar) {
- if (!mInstantSeeking)
- mPlayer.seekTo(mDuration * bar.getProgress() / 1000);
-
- show(sDefaultTimeout);
- mHandler.removeMessages(SHOW_PROGRESS);
- mAM.setStreamMute(AudioManager.STREAM_MUSIC, false);
- mDragging = false;
- mHandler.sendEmptyMessageDelayed(SHOW_PROGRESS, 1000);
- }
- };
-
- private OnClickListener mRewListener = new OnClickListener() {
- public void onClick(View v) {
- if (mOnClickSpeedAdjustListener != null) {
- mOnClickSpeedAdjustListener.onClickSlower();
- }
- show(sDefaultTimeout);
- }
- };
-
- private OnClickListener mFfwdListener = new OnClickListener() {
- public void onClick(View v) {
- if (mOnClickSpeedAdjustListener != null) {
- mOnClickSpeedAdjustListener.onClickFaster();
- }
- show(sDefaultTimeout);
- }
- };
-
- /**
- * Set the view that acts as the anchor for the control view.
- *
- * - This can for example be a VideoView, or your Activity's main view.
- * - AudioPlayer has no anchor view, so the view parameter will be null.
- *
- * @param view
- * The view to which to anchor the controller when it is visible.
- */
- @Override
- public void setAnchorView(View view) {
- mAnchor = view;
- if (mAnchor == null) {
- sDefaultTimeout = 0; // show forever
- }
- if (!mFromXml) {
- removeAllViews();
- mRoot = makeControllerView();
- mWindow.setContentView(mRoot);
- mWindow.setWidth(LayoutParams.MATCH_PARENT);
- mWindow.setHeight(LayoutParams.WRAP_CONTENT);
- }
- initControllerView(mRoot);
- }
-
- @Override
- public void setMediaPlayer(MediaPlayerControl player) {
- mPlayer = player;
- updatePausePlay();
- }
-
- @Override
- public void show() {
- show(sDefaultTimeout);
- }
-
- /**
- * Show the controller on screen. It will go away automatically after
- * 'timeout' milliseconds of inactivity.
- *
- * @param timeout
- * The timeout in milliseconds. Use 0 to show the controller until hide() is called.
- */
- @Override
- public void show(int timeout) {
- if (!mShowing) {
- if (mAnchor != null && mAnchor.getWindowToken() != null) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
- mAnchor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
- }
- }
- if (mPauseButton != null)
- mPauseButton.requestFocus();
- disableUnsupportedButtons();
-
- if (mFromXml) {
- setVisibility(View.VISIBLE);
- } else {
- int[] location = new int[2];
-
- if (mAnchor != null) {
- mAnchor.getLocationOnScreen(location);
- Rect anchorRect = new Rect(location[0], location[1],
- location[0] + mAnchor.getWidth(), location[1]
- + mAnchor.getHeight());
-
- mWindow.setAnimationStyle(mAnimStyle);
- mRoot.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
- mWindow.showAsDropDown(mAnchor, 0, -mRoot.getMeasuredHeight());
- } else {
- Rect anchorRect = new Rect(location[0], location[1],
- location[0] + mRoot.getWidth(), location[1]
- + mRoot.getHeight());
-
- mWindow.setAnimationStyle(mAnimStyle);
- mWindow.showAtLocation(mRoot, Gravity.BOTTOM,
- anchorRect.left, 0);
- }
- }
- mShowing = true;
- if (mShownListener != null)
- mShownListener.onShown();
- }
- updatePausePlay();
- mHandler.sendEmptyMessage(SHOW_PROGRESS);
-
- if (timeout != 0) {
- mHandler.removeMessages(FADE_OUT);
- mHandler.sendMessageDelayed(mHandler.obtainMessage(FADE_OUT),
- timeout);
- }
- }
-
- @Override
- public boolean isShowing() {
- return mShowing;
- }
-
- @Override
- public void hide() {
- if (mShowing) {
- if (mAnchor != null) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
- //mAnchor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
- }
- }
- try {
- mHandler.removeMessages(SHOW_PROGRESS);
- if (mFromXml)
- setVisibility(View.GONE);
- else
- mWindow.dismiss();
- } catch (IllegalArgumentException ex) {
- Log.d(TAG, "MediaController already removed");
- }
- mShowing = false;
- if (mHiddenListener != null)
- mHiddenListener.onHidden();
- }
- }
-
- @Override
- public void setEnabled(boolean enabled) {
- if (mPauseButton != null) {
- mPauseButton.setEnabled(enabled);
- }
- if (mFfwdButton != null) {
- mFfwdButton.setEnabled(enabled);
- }
- if (mRewButton != null) {
- mRewButton.setEnabled(enabled);
- }
- if (mProgress != null && !mDisableProgress)
- mProgress.setEnabled(enabled);
- disableUnsupportedButtons();
- super.setEnabled(enabled);
- }
-}
diff --git a/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/PlayConfigView.java b/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/PlayConfigView.java
deleted file mode 100644
index bb46140..0000000
--- a/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/PlayConfigView.java
+++ /dev/null
@@ -1,198 +0,0 @@
-package com.qiniu.droid.niuplayer.widget;
-
-import android.content.Context;
-import android.support.annotation.Nullable;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.pili.pldroid.player.AVOptions;
-import com.pili.pldroid.player.widget.PLVideoTextureView;
-import com.qiniu.droid.niuplayer.R;
-import com.qiniu.droid.niuplayer.utils.Config;
-
-import static com.qiniu.droid.niuplayer.utils.Utils.createAVOptions;
-
-public class PlayConfigView extends LinearLayout implements View.OnClickListener {
- public static final String BACKSTAGE_PLAY_TAG = "backstage_play";
-
- private PLVideoTextureView mVideoView;
- private boolean mIsMirror;
- private boolean mIsCache;
- private boolean mIsBackstagePlay;
- private int mRotation;
- private TextView mCurSpeedText;
- private TextView mCurDisplayText;
- private TextView mCurSpeedTipText;
- private TextView mSaveTip;
-
- public PlayConfigView(Context context) {
- super(context);
- }
-
- public PlayConfigView(Context context, @Nullable AttributeSet attrs) {
- super(context, attrs);
- View view = LayoutInflater.from(context).inflate(R.layout.view_play_config, this);
- ImageView imageView = view.findViewById(R.id.close_image);
- imageView.setOnClickListener(this);
-
- ViewGroup viewGroup = view.findViewById(R.id.mirror_group);
- viewGroup.setOnClickListener(this);
-
- viewGroup = view.findViewById(R.id.rotate_group);
- viewGroup.setOnClickListener(this);
-
- viewGroup = view.findViewById(R.id.save_group);
- viewGroup.setOnClickListener(this);
-
- viewGroup = view.findViewById(R.id.backstage_group);
- viewGroup.setOnClickListener(this);
-
- mCurSpeedTipText = view.findViewById(R.id.speed_current_text);
-
- TextView textView = view.findViewById(R.id.render_default);
- textView.setOnClickListener(this);
-
- mCurDisplayText = view.findViewById(R.id.render_full);
- mCurDisplayText.setOnClickListener(this);
-
- textView = view.findViewById(R.id.render_16_9);
- textView.setOnClickListener(this);
-
- textView = view.findViewById(R.id.render_4_3);
- textView.setOnClickListener(this);
-
- textView = view.findViewById(R.id.speed_05);
- textView.setOnClickListener(this);
-
- textView = view.findViewById(R.id.speed_075);
- textView.setOnClickListener(this);
-
- mCurSpeedText = view.findViewById(R.id.speed_1);
- mCurSpeedText.setOnClickListener(this);
-
- textView = view.findViewById(R.id.speed_125);
- textView.setOnClickListener(this);
-
- textView = view.findViewById(R.id.speed_15);
- textView.setOnClickListener(this);
-
- mSaveTip = view.findViewById(R.id.save_tip);
- }
-
- public void setVideoView(PLVideoTextureView videoView) {
- if (videoView.equals(mVideoView)) {
- return;
- }
- mVideoView = videoView;
- resetConfig();
- }
-
- private void resetConfig() {
- mIsBackstagePlay = false;
- mIsCache = false;
- mIsMirror = false;
- mRotation = 0;
-
- setPlayDisplayMode(PLVideoTextureView.ASPECT_RATIO_PAVED_PARENT, R.id.render_full);
- setPlaySpeed(1f, R.id.speed_1);
- setVisibility(GONE);
- mVideoView.setMirror(mIsMirror);
- mVideoView.setRotation(mRotation);
- }
-
- @Override
- public void onClick(View view) {
- int viewId = view.getId();
- switch (viewId) {
- case R.id.mirror_group:
- mIsMirror = !mIsMirror;
- mVideoView.setMirror(mIsMirror);
- break;
- case R.id.rotate_group:
- mRotation += 90;
- mVideoView.setRotation(mRotation);
- break;
- case R.id.save_group:
- switchCacheEnable();
- break;
- case R.id.backstage_group:
- switchBackstagePlay();
- break;
- case R.id.render_default:
- setPlayDisplayMode(PLVideoTextureView.ASPECT_RATIO_ORIGIN, viewId);
- break;
- case R.id.render_full:
- setPlayDisplayMode(PLVideoTextureView.ASPECT_RATIO_PAVED_PARENT, viewId);
- break;
- case R.id.render_16_9:
- setPlayDisplayMode(PLVideoTextureView.ASPECT_RATIO_16_9, viewId);
- break;
- case R.id.render_4_3:
- setPlayDisplayMode(PLVideoTextureView.ASPECT_RATIO_4_3, viewId);
- break;
- case R.id.speed_05:
- setPlaySpeed(0.5f, viewId);
- break;
- case R.id.speed_075:
- setPlaySpeed(0.75f, viewId);
- break;
- case R.id.speed_1:
- setPlaySpeed(1f, viewId);
- break;
- case R.id.speed_125:
- setPlaySpeed(1.25f, viewId);
- break;
- case R.id.speed_15:
- setPlaySpeed(1.5f, viewId);
- break;
- case R.id.close_image:
- setVisibility(GONE);
- break;
- }
- }
-
- private void setPlayDisplayMode(int displayMode, int id) {
- if (mCurDisplayText != null) {
- mCurDisplayText.setTextColor(getResources().getColor(R.color.colorDefaultText));
- }
- mCurDisplayText = findViewById(id);
- mCurDisplayText.setTextColor(getResources().getColor(R.color.colorTextChoice));
- mVideoView.setDisplayAspectRatio(displayMode);
- }
-
- private void setPlaySpeed(float speed, int id) {
- if (mCurSpeedText != null) {
- mCurSpeedText.setTextColor(getResources().getColor(R.color.colorDefaultText));
- }
- mCurSpeedText = findViewById(id);
- mCurSpeedText.setTextColor(getResources().getColor(R.color.colorTextChoice));
- mVideoView.setPlaySpeed(speed);
- mCurSpeedTipText.setText(mCurSpeedText.getText());
- }
-
- private void switchCacheEnable() {
- mIsCache = !mIsCache;
- AVOptions options = createAVOptions();
- if (mIsCache) {
- options.setString(AVOptions.KEY_CACHE_DIR, Config.DEFAULT_CACHE_DIR_PATH);
- mSaveTip.setText("缓存已开");
- } else {
- mSaveTip.setText("本地缓存");
- }
- mVideoView.setAVOptions(options);
- }
-
- private void switchBackstagePlay() {
- mIsBackstagePlay = !mIsBackstagePlay;
- Object tag = mIsBackstagePlay ? BACKSTAGE_PLAY_TAG : null;
- String tip = mIsBackstagePlay ? "后台播放已经开启!" : "后台播放已经关闭!";
- mVideoView.setTag(tag);
- Toast.makeText(this.getContext(), tip, Toast.LENGTH_LONG).show();
- }
-}
diff --git a/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/ScrollEnableViewPager.java b/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/ScrollEnableViewPager.java
deleted file mode 100644
index 433d159..0000000
--- a/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/ScrollEnableViewPager.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.qiniu.droid.niuplayer.widget;
-
-import android.content.Context;
-import android.support.v4.view.ViewPager;
-import android.util.AttributeSet;
-import android.view.MotionEvent;
-
-
-public class ScrollEnableViewPager extends ViewPager {
- private boolean mScrollEnable = true;
-
- public ScrollEnableViewPager(Context context) {
- super(context);
- }
-
- public ScrollEnableViewPager(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- public void setScrollEnable(boolean scrollEnable) {
- mScrollEnable = scrollEnable;
- }
-
- @Override
- public boolean onTouchEvent(MotionEvent event) {
- return mScrollEnable && super.onTouchEvent(event);
- }
-
- @Override
- public boolean onInterceptTouchEvent(MotionEvent ev) {
- if (mScrollEnable) {
- return super.onInterceptTouchEvent(ev);
- } else {
- return false;
- }
- }
-}
\ No newline at end of file
diff --git a/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/UpgradeDialog.java b/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/UpgradeDialog.java
deleted file mode 100755
index 88e5f22..0000000
--- a/NiuDroidPlayer/app/src/main/java/com/qiniu/droid/niuplayer/widget/UpgradeDialog.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.qiniu.droid.niuplayer.widget;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.text.Html;
-import android.view.Display;
-import android.view.WindowManager;
-
-import com.qiniu.droid.niuplayer.R;
-import com.qiniu.droid.niuplayer.utils.DownloadService;
-
-public class UpgradeDialog {
-
- public static void show(final Context context, String content, final String downloadUrl) {
- if (isContextValid(context)) {
- AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.upgradeDialog);
- builder.setTitle("发现新版本");
- builder.setMessage(Html.fromHtml(content))
- .setPositiveButton("立刻下载", new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- goToDownload(context, downloadUrl);
- }
- })
- .setNegativeButton("以后再说", new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- }
- });
-
-
- AlertDialog dialog = builder.create();
- dialog.setCanceledOnTouchOutside(false);
- dialog.show();
-
- WindowManager m = ((Activity) context).getWindowManager();
- Display d = m.getDefaultDisplay();
- android.view.WindowManager.LayoutParams p = dialog.getWindow().getAttributes();
- p.width = (int) (d.getWidth() * 0.85);
- dialog.getWindow().setAttributes(p);
- }
- }
-
- private static boolean isContextValid(Context context) {
- return context instanceof Activity && !((Activity) context).isFinishing();
- }
-
-
- private static void goToDownload(Context context, String downloadUrl) {
- Intent intent = new Intent(context.getApplicationContext(), DownloadService.class);
- intent.putExtra("url", downloadUrl);
- context.startService(intent);
- }
-}
diff --git a/NiuDroidPlayer/app/src/main/jniLibs/arm64-v8a/libQPlayer.so b/NiuDroidPlayer/app/src/main/jniLibs/arm64-v8a/libQPlayer.so
deleted file mode 100644
index 6bd0281..0000000
Binary files a/NiuDroidPlayer/app/src/main/jniLibs/arm64-v8a/libQPlayer.so and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/jniLibs/arm64-v8a/libqcCodec.so b/NiuDroidPlayer/app/src/main/jniLibs/arm64-v8a/libqcCodec.so
deleted file mode 100644
index 4fbd182..0000000
Binary files a/NiuDroidPlayer/app/src/main/jniLibs/arm64-v8a/libqcCodec.so and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/jniLibs/arm64-v8a/libqcOpenSSL.so b/NiuDroidPlayer/app/src/main/jniLibs/arm64-v8a/libqcOpenSSL.so
deleted file mode 100755
index 706a507..0000000
Binary files a/NiuDroidPlayer/app/src/main/jniLibs/arm64-v8a/libqcOpenSSL.so and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/jniLibs/armeabi-v7a/libQPlayer.so b/NiuDroidPlayer/app/src/main/jniLibs/armeabi-v7a/libQPlayer.so
deleted file mode 100755
index e3ccf4c..0000000
Binary files a/NiuDroidPlayer/app/src/main/jniLibs/armeabi-v7a/libQPlayer.so and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/jniLibs/armeabi-v7a/libqcCodec.so b/NiuDroidPlayer/app/src/main/jniLibs/armeabi-v7a/libqcCodec.so
deleted file mode 100755
index b3b281d..0000000
Binary files a/NiuDroidPlayer/app/src/main/jniLibs/armeabi-v7a/libqcCodec.so and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/jniLibs/armeabi-v7a/libqcOpenSSL.so b/NiuDroidPlayer/app/src/main/jniLibs/armeabi-v7a/libqcOpenSSL.so
deleted file mode 100755
index 88ab3a3..0000000
Binary files a/NiuDroidPlayer/app/src/main/jniLibs/armeabi-v7a/libqcOpenSSL.so and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/jniLibs/armeabi/libQPlayer.so b/NiuDroidPlayer/app/src/main/jniLibs/armeabi/libQPlayer.so
deleted file mode 100644
index 1fb002b..0000000
Binary files a/NiuDroidPlayer/app/src/main/jniLibs/armeabi/libQPlayer.so and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/jniLibs/armeabi/libqcCodec.so b/NiuDroidPlayer/app/src/main/jniLibs/armeabi/libqcCodec.so
deleted file mode 100644
index 93732c5..0000000
Binary files a/NiuDroidPlayer/app/src/main/jniLibs/armeabi/libqcCodec.so and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/jniLibs/armeabi/libqcOpenSSL.so b/NiuDroidPlayer/app/src/main/jniLibs/armeabi/libqcOpenSSL.so
deleted file mode 100755
index 6a93a22..0000000
Binary files a/NiuDroidPlayer/app/src/main/jniLibs/armeabi/libqcOpenSSL.so and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/jniLibs/x86/libQPlayer.so b/NiuDroidPlayer/app/src/main/jniLibs/x86/libQPlayer.so
deleted file mode 100755
index a8b685a..0000000
Binary files a/NiuDroidPlayer/app/src/main/jniLibs/x86/libQPlayer.so and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/jniLibs/x86/libqcCodec.so b/NiuDroidPlayer/app/src/main/jniLibs/x86/libqcCodec.so
deleted file mode 100755
index 11b73b8..0000000
Binary files a/NiuDroidPlayer/app/src/main/jniLibs/x86/libqcCodec.so and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/jniLibs/x86/libqcOpenSSL.so b/NiuDroidPlayer/app/src/main/jniLibs/x86/libqcOpenSSL.so
deleted file mode 100755
index 3775b71..0000000
Binary files a/NiuDroidPlayer/app/src/main/jniLibs/x86/libqcOpenSSL.so and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-hdpi/thumbnail.png b/NiuDroidPlayer/app/src/main/res/drawable-hdpi/thumbnail.png
deleted file mode 100644
index 31f093b..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-hdpi/thumbnail.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xhdpi/full_screen.png b/NiuDroidPlayer/app/src/main/res/drawable-xhdpi/full_screen.png
deleted file mode 100644
index 0dc540f..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xhdpi/full_screen.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/back.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/back.png
deleted file mode 100644
index 52959fc..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/back.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/background_play.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/background_play.png
deleted file mode 100644
index 63af0f4..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/background_play.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/btn_brightness.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/btn_brightness.png
deleted file mode 100755
index 4439e68..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/btn_brightness.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/close.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/close.png
deleted file mode 100644
index 5e9a5ac..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/close.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/defualt_bg.xml b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/defualt_bg.xml
deleted file mode 100644
index d078e48..0000000
--- a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/defualt_bg.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/dialog_bg.xml b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/dialog_bg.xml
deleted file mode 100644
index 47f0c89..0000000
--- a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/dialog_bg.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/dialog_edit_bg.xml b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/dialog_edit_bg.xml
deleted file mode 100644
index 278c0cd..0000000
--- a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/dialog_edit_bg.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/face_icon.jpg b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/face_icon.jpg
deleted file mode 100644
index f6d90dd..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/face_icon.jpg and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/failure.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/failure.png
deleted file mode 100644
index 093d7b1..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/failure.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/go.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/go.png
deleted file mode 100644
index fca4df4..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/go.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/hks.jpg b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/hks.jpg
deleted file mode 100644
index 28a357f..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/hks.jpg and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/launch_image.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/launch_image.png
deleted file mode 100644
index 352e99d..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/launch_image.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/mirror_swtich.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/mirror_swtich.png
deleted file mode 100644
index 1b12c15..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/mirror_swtich.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/more.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/more.png
deleted file mode 100644
index 242809e..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/more.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/play.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/play.png
deleted file mode 100644
index 2132ab1..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/play.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/play_player.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/play_player.png
deleted file mode 100644
index 1848b86..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/play_player.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/player_back.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/player_back.png
deleted file mode 100644
index 5d0cf1c..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/player_back.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/player_close.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/player_close.png
deleted file mode 100644
index 9fa919f..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/player_close.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/player_stop.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/player_stop.png
deleted file mode 100644
index f59ee10..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/player_stop.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/rotate.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/rotate.png
deleted file mode 100644
index fc83e12..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/rotate.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/save.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/save.png
deleted file mode 100644
index 868e077..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/save.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/scan.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/scan.png
deleted file mode 100644
index f0aa717..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/scan.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/screen_short.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/screen_short.png
deleted file mode 100644
index b95c52a..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/screen_short.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/stop.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/stop.png
deleted file mode 100644
index 4729374..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/stop.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/tab_bottom_bg.xml b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/tab_bottom_bg.xml
deleted file mode 100644
index 3f4cf07..0000000
--- a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/tab_bottom_bg.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/top_title_bg.xml b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/top_title_bg.xml
deleted file mode 100644
index e89a31d..0000000
--- a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/top_title_bg.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/url.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/url.png
deleted file mode 100644
index d2df8dd..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/url.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/user.png b/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/user.png
deleted file mode 100644
index 79e4beb..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/drawable-xxhdpi/user.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/layout/activity_main.xml b/NiuDroidPlayer/app/src/main/res/layout/activity_main.xml
deleted file mode 100644
index e1b7dfb..0000000
--- a/NiuDroidPlayer/app/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/layout/activity_pl_video_texture.xml b/NiuDroidPlayer/app/src/main/res/layout/activity_pl_video_texture.xml
deleted file mode 100644
index 75e8ba8..0000000
--- a/NiuDroidPlayer/app/src/main/res/layout/activity_pl_video_texture.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/layout/activity_scan.xml b/NiuDroidPlayer/app/src/main/res/layout/activity_scan.xml
deleted file mode 100644
index 49864de..0000000
--- a/NiuDroidPlayer/app/src/main/res/layout/activity_scan.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/layout/dialog_common.xml b/NiuDroidPlayer/app/src/main/res/layout/dialog_common.xml
deleted file mode 100644
index fa920b5..0000000
--- a/NiuDroidPlayer/app/src/main/res/layout/dialog_common.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/NiuDroidPlayer/app/src/main/res/layout/fragment_full_screen_video.xml b/NiuDroidPlayer/app/src/main/res/layout/fragment_full_screen_video.xml
deleted file mode 100644
index 1571860..0000000
--- a/NiuDroidPlayer/app/src/main/res/layout/fragment_full_screen_video.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/layout/fragment_live_video_list.xml b/NiuDroidPlayer/app/src/main/res/layout/fragment_live_video_list.xml
deleted file mode 100644
index 5e46c36..0000000
--- a/NiuDroidPlayer/app/src/main/res/layout/fragment_live_video_list.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/layout/fragment_movie_list.xml b/NiuDroidPlayer/app/src/main/res/layout/fragment_movie_list.xml
deleted file mode 100644
index b44cb60..0000000
--- a/NiuDroidPlayer/app/src/main/res/layout/fragment_movie_list.xml
+++ /dev/null
@@ -1,175 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/layout/fragment_short_video_list.xml b/NiuDroidPlayer/app/src/main/res/layout/fragment_short_video_list.xml
deleted file mode 100644
index 7ec6456..0000000
--- a/NiuDroidPlayer/app/src/main/res/layout/fragment_short_video_list.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/layout/view_live_video.xml b/NiuDroidPlayer/app/src/main/res/layout/view_live_video.xml
deleted file mode 100644
index 87410e0..0000000
--- a/NiuDroidPlayer/app/src/main/res/layout/view_live_video.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
- ¬
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/layout/view_media_controller.xml b/NiuDroidPlayer/app/src/main/res/layout/view_media_controller.xml
deleted file mode 100644
index 2931f0d..0000000
--- a/NiuDroidPlayer/app/src/main/res/layout/view_media_controller.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/layout/view_movie_video.xml b/NiuDroidPlayer/app/src/main/res/layout/view_movie_video.xml
deleted file mode 100644
index 881511f..0000000
--- a/NiuDroidPlayer/app/src/main/res/layout/view_movie_video.xml
+++ /dev/null
@@ -1,161 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/layout/view_play_config.xml b/NiuDroidPlayer/app/src/main/res/layout/view_play_config.xml
deleted file mode 100644
index a6cd07c..0000000
--- a/NiuDroidPlayer/app/src/main/res/layout/view_play_config.xml
+++ /dev/null
@@ -1,276 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/layout/view_short_video.xml b/NiuDroidPlayer/app/src/main/res/layout/view_short_video.xml
deleted file mode 100644
index d6d3f42..0000000
--- a/NiuDroidPlayer/app/src/main/res/layout/view_short_video.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/mipmap-hdpi/ic_launcher.png b/NiuDroidPlayer/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index cde69bc..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/mipmap-mdpi/ic_launcher.png b/NiuDroidPlayer/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index c133a0c..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/NiuDroidPlayer/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index bfa42f0..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/NiuDroidPlayer/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 324e72c..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/NiuDroidPlayer/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index aee44e1..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/mipmap-xxxhdpi/player_icon.png b/NiuDroidPlayer/app/src/main/res/mipmap-xxxhdpi/player_icon.png
deleted file mode 100644
index 00811c8..0000000
Binary files a/NiuDroidPlayer/app/src/main/res/mipmap-xxxhdpi/player_icon.png and /dev/null differ
diff --git a/NiuDroidPlayer/app/src/main/res/values-v21/styles.xml b/NiuDroidPlayer/app/src/main/res/values-v21/styles.xml
deleted file mode 100644
index dbbdd40..0000000
--- a/NiuDroidPlayer/app/src/main/res/values-v21/styles.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/values-w820dp/dimens.xml b/NiuDroidPlayer/app/src/main/res/values-w820dp/dimens.xml
deleted file mode 100644
index b9bcbd3..0000000
--- a/NiuDroidPlayer/app/src/main/res/values-w820dp/dimens.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- 64dp
- 40dp
-
diff --git a/NiuDroidPlayer/app/src/main/res/values/colors.xml b/NiuDroidPlayer/app/src/main/res/values/colors.xml
deleted file mode 100644
index b17ad40..0000000
--- a/NiuDroidPlayer/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- #3F51B5
- #303F9F
- #FF4081
-
- #9B9B9B
- #cccccc
- #52ffffff
- #52a7fe
- #dfdfdf
- #dfdfdf
- #60000000
- #dff3f0
- #f4f4f4
-
diff --git a/NiuDroidPlayer/app/src/main/res/values/dimens.xml b/NiuDroidPlayer/app/src/main/res/values/dimens.xml
deleted file mode 100644
index 58fe034..0000000
--- a/NiuDroidPlayer/app/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- 16dp
- 16dp
- 16dp
- 40dp
-
diff --git a/NiuDroidPlayer/app/src/main/res/values/strings.xml b/NiuDroidPlayer/app/src/main/res/values/strings.xml
deleted file mode 100644
index be6e8e4..0000000
--- a/NiuDroidPlayer/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
- 牛播放器
-
- 二维码
- 相册
- 提示
- 取消
- 确定
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/values/styles.xml b/NiuDroidPlayer/app/src/main/res/values/styles.xml
deleted file mode 100644
index 89e27c4..0000000
--- a/NiuDroidPlayer/app/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/NiuDroidPlayer/app/src/main/res/xml/update_apk_paths.xml b/NiuDroidPlayer/app/src/main/res/xml/update_apk_paths.xml
deleted file mode 100755
index 5722381..0000000
--- a/NiuDroidPlayer/app/src/main/res/xml/update_apk_paths.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/NiuDroidPlayer/build.gradle b/NiuDroidPlayer/build.gradle
deleted file mode 100644
index 38a4253..0000000
--- a/NiuDroidPlayer/build.gradle
+++ /dev/null
@@ -1,25 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.0.1'
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- jcenter()
- google()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/NiuDroidPlayer/gradle.properties b/NiuDroidPlayer/gradle.properties
deleted file mode 100644
index 1d3591c..0000000
--- a/NiuDroidPlayer/gradle.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-# Project-wide Gradle settings.
-
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-# Default value: -Xmx10248m -XX:MaxPermSize=256m
-# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
-
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
\ No newline at end of file
diff --git a/NiuDroidPlayer/gradle/wrapper/gradle-wrapper.jar b/NiuDroidPlayer/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 13372ae..0000000
Binary files a/NiuDroidPlayer/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/NiuDroidPlayer/gradle/wrapper/gradle-wrapper.properties b/NiuDroidPlayer/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index c3f8a8f..0000000
--- a/NiuDroidPlayer/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jul 03 18:04:57 CST 2017
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-all.zip
\ No newline at end of file
diff --git a/NiuDroidPlayer/gradlew b/NiuDroidPlayer/gradlew
deleted file mode 100755
index 9d82f78..0000000
--- a/NiuDroidPlayer/gradlew
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
- echo "$*"
-}
-
-die ( ) {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
-esac
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/NiuDroidPlayer/gradlew.bat b/NiuDroidPlayer/gradlew.bat
deleted file mode 100644
index aec9973..0000000
--- a/NiuDroidPlayer/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/NiuDroidPlayer/settings.gradle b/NiuDroidPlayer/settings.gradle
deleted file mode 100644
index 9d495b3..0000000
--- a/NiuDroidPlayer/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-include ':app'
\ No newline at end of file
diff --git a/PLDroidPlayerDemo/app/build.gradle b/PLDroidPlayerDemo/app/build.gradle
index 3592d03..0f512e2 100644
--- a/PLDroidPlayerDemo/app/build.gradle
+++ b/PLDroidPlayerDemo/app/build.gradle
@@ -9,7 +9,7 @@ android {
minSdkVersion 14
targetSdkVersion 27
versionCode 12
- versionName "2.1.5"
+ versionName "2.1.6"
buildConfigField "long", "BUILD_TIMESTAMP", System.currentTimeMillis() + "L"
}
buildTypes {
@@ -27,7 +27,7 @@ android {
}
dependencies {
- implementation files('libs/pldroid-player-2.1.5.jar')
+ implementation files('libs/pldroid-player-2.1.6.jar')
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.0'
implementation 'com.journeyapps:zxing-android-embedded:3.0.2@aar'
diff --git a/PLDroidPlayerDemo/app/libs/pldroid-player-2.1.5.jar b/PLDroidPlayerDemo/app/libs/pldroid-player-2.1.5.jar
deleted file mode 100644
index 80771b6..0000000
Binary files a/PLDroidPlayerDemo/app/libs/pldroid-player-2.1.5.jar and /dev/null differ
diff --git a/PLDroidPlayerDemo/app/libs/pldroid-player-2.1.6.jar b/PLDroidPlayerDemo/app/libs/pldroid-player-2.1.6.jar
new file mode 100644
index 0000000..9d40208
Binary files /dev/null and b/PLDroidPlayerDemo/app/libs/pldroid-player-2.1.6.jar differ
diff --git a/PLDroidPlayerDemo/app/src/main/jniLibs/arm64-v8a/libQPlayer.so b/PLDroidPlayerDemo/app/src/main/jniLibs/arm64-v8a/libQPlayer.so
index 901f528..0b3dc91 100755
Binary files a/PLDroidPlayerDemo/app/src/main/jniLibs/arm64-v8a/libQPlayer.so and b/PLDroidPlayerDemo/app/src/main/jniLibs/arm64-v8a/libQPlayer.so differ
diff --git a/PLDroidPlayerDemo/app/src/main/jniLibs/arm64-v8a/libqcOpenSSL.so b/PLDroidPlayerDemo/app/src/main/jniLibs/arm64-v8a/libqcOpenSSL.so
old mode 100755
new mode 100644
diff --git a/PLDroidPlayerDemo/app/src/main/jniLibs/armeabi-v7a/libQPlayer.so b/PLDroidPlayerDemo/app/src/main/jniLibs/armeabi-v7a/libQPlayer.so
index 5a682f6..0a26762 100755
Binary files a/PLDroidPlayerDemo/app/src/main/jniLibs/armeabi-v7a/libQPlayer.so and b/PLDroidPlayerDemo/app/src/main/jniLibs/armeabi-v7a/libQPlayer.so differ
diff --git a/PLDroidPlayerDemo/app/src/main/jniLibs/armeabi/libQPlayer.so b/PLDroidPlayerDemo/app/src/main/jniLibs/armeabi/libQPlayer.so
index 5747e5d..0e16f03 100755
Binary files a/PLDroidPlayerDemo/app/src/main/jniLibs/armeabi/libQPlayer.so and b/PLDroidPlayerDemo/app/src/main/jniLibs/armeabi/libQPlayer.so differ
diff --git a/PLDroidPlayerDemo/app/src/main/jniLibs/armeabi/libqcOpenSSL.so b/PLDroidPlayerDemo/app/src/main/jniLibs/armeabi/libqcOpenSSL.so
old mode 100755
new mode 100644
diff --git a/PLDroidPlayerDemo/app/src/main/jniLibs/x86/libQPlayer.so b/PLDroidPlayerDemo/app/src/main/jniLibs/x86/libQPlayer.so
index eaa2845..cc247b4 100755
Binary files a/PLDroidPlayerDemo/app/src/main/jniLibs/x86/libQPlayer.so and b/PLDroidPlayerDemo/app/src/main/jniLibs/x86/libQPlayer.so differ
diff --git a/ReleaseNotes/release-notes-2.1.6.md b/ReleaseNotes/release-notes-2.1.6.md
new file mode 100644
index 0000000..8f3d000
--- /dev/null
+++ b/ReleaseNotes/release-notes-2.1.6.md
@@ -0,0 +1,31 @@
+# PLDroidPlayer Release Notes for 2.1.6
+
+本次更新:
+
+## 说明
+
+- 从 v2.0.0 版本开始,全面升级为七牛自研的播放器内核,拥有更优异的性能
+
+## 版本
+
+- 发布 pldroid-player-2.1.6.jar
+- 更新 libQPlayer.so
+
+## 优化
+
+- 优化了部分 HLS 播放流畅度
+- 优化了重连速度
+
+## 新增
+
+- 新增了 addCache、delCache 方法
+- 新增了 setIOCacheSize、addIOCache、delIOCache 方法
+- 新增了本地日志功能
+
+## 缺陷
+
+- 修复了部分场景下播放状态异常
+- 修复了播放时释放时偶现 ANR
+- 修复了 HLS 文件解析异常
+- 修复了部分场景下空指针、空对象异常
+
diff --git a/releases/arm64-v8a/libQPlayer.so b/releases/arm64-v8a/libQPlayer.so
index 901f528..0b3dc91 100755
Binary files a/releases/arm64-v8a/libQPlayer.so and b/releases/arm64-v8a/libQPlayer.so differ
diff --git a/releases/arm64-v8a/libqcOpenSSL.so b/releases/arm64-v8a/libqcOpenSSL.so
old mode 100755
new mode 100644
diff --git a/releases/armeabi-v7a/libQPlayer.so b/releases/armeabi-v7a/libQPlayer.so
index 5a682f6..0a26762 100755
Binary files a/releases/armeabi-v7a/libQPlayer.so and b/releases/armeabi-v7a/libQPlayer.so differ
diff --git a/releases/armeabi/libQPlayer.so b/releases/armeabi/libQPlayer.so
index 5747e5d..0e16f03 100755
Binary files a/releases/armeabi/libQPlayer.so and b/releases/armeabi/libQPlayer.so differ
diff --git a/releases/armeabi/libqcOpenSSL.so b/releases/armeabi/libqcOpenSSL.so
old mode 100755
new mode 100644
diff --git a/releases/pldroid-player-2.1.5.jar b/releases/pldroid-player-2.1.5.jar
deleted file mode 100644
index 80771b6..0000000
Binary files a/releases/pldroid-player-2.1.5.jar and /dev/null differ
diff --git a/releases/pldroid-player-2.1.6.jar b/releases/pldroid-player-2.1.6.jar
new file mode 100644
index 0000000..9d40208
Binary files /dev/null and b/releases/pldroid-player-2.1.6.jar differ
diff --git a/releases/x86/libQPlayer.so b/releases/x86/libQPlayer.so
index eaa2845..cc247b4 100755
Binary files a/releases/x86/libQPlayer.so and b/releases/x86/libQPlayer.so differ