package com.letv.component.player.fourd.videoview;

import android.content.Context;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnBufferingUpdateListener;
import android.media.MediaPlayer.OnCompletionListener;
import android.media.MediaPlayer.OnErrorListener;
import android.media.MediaPlayer.OnInfoListener;
import android.media.MediaPlayer.OnPreparedListener;
import android.media.MediaPlayer.OnSeekCompleteListener;
import android.media.MediaPlayer.OnVideoSizeChangedListener;
import android.net.Uri;
import android.opengl.GLSurfaceView;
import android.opengl.GLSurfaceView.Renderer;
import android.os.Handler;
import android.util.AttributeSet;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceHolder.Callback;
import android.view.View;
import android.view.View.MeasureSpec;
import android.widget.MediaController;
import android.widget.RelativeLayout.LayoutParams;
import com.immersion.hapticmediasdk.HapticContentSDK;
import com.immersion.hapticmediasdk.HapticContentSDKFactory;
import com.letv.component.player.Interface.OnMediaStateTimeListener;
import com.letv.component.player.Interface.OnMediaStateTimeListener.MeidaStateType;
import com.letv.component.player.Interface.OnVideoViewStateChangeListener;
import com.letv.component.player.core.LetvMediaPlayerManager;
import com.letv.component.player.core.PlayUrl;
import com.letv.component.player.core.PlayUrl.StreamType;
import com.letv.component.player.fourd.LetvMediaPlayerControl4D;
import com.letv.component.player.http.HttpRequestManager;
import com.letv.component.player.utils.LogTag;
import com.letv.component.player.utils.Tools;
import com.letv.core.constant.LetvConstant;
import com.letv.core.messagebus.config.LeMessageIds;
import com.media.ffmpeg.FFMpegPlayer;
import com.media.ffmpeg.FFMpegPlayer.GLRenderControler;
import com.media.ffmpeg.FFMpegPlayer.OnAdNumberListener;
import com.media.ffmpeg.FFMpegPlayer.OnBlockListener;
import com.media.ffmpeg.FFMpegPlayer.OnDisplayListener;
import com.media.ffmpeg.FFMpegPlayer.OnHardDecodeErrorListner;
import com.media.ffmpeg.FFMpegPlayer.OnSuccessListener;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

public class VideoViewH264m3u8_4D extends GLSurfaceView implements LetvMediaPlayerControl4D {
    private static final int AUDIO_SIZE = 1600;
    public static final int DEFAULT = 0;
    private static int FIRST_SYNC_UPDATE_TIME_MS = 200;
    private static int HAPTICS_RESYNC_INTERVAL_MS = LeMessageIds.MSG_FLOAT_BALL_REQUEST_DATA;
    public static final int HAPTIC_ERROR = -1;
    public static final int HAPTIC_INITIALIZED = 1;
    public static final int HAPTIC_UNINITIALIZED = 0;
    private static final String INACCESSIBLE_URL = "INACCESSIBLE_URL";
    private static int INITIAL_RESYNC_INTERVAL_MS = 100;
    private static final String INVALID = "INVALID";
    private static final String MALFORMED_URL = "MALFORMED_URL";
    private static int MEDIA_PREPARE_INTERVAL_MS = 20;
    public static final int MUTED = 1;
    public static final int PAUSED = 2;
    public static final int PAUSED_BUFFERRING_FINISHED = 4;
    public static final int PAUSED_DUE_TO_BUFFERING = 3;
    private static final String PERMISSION_DENIED = "PERMISSION_DENIED";
    private static final int PICTURE_SIZE = 90;
    public static final int PLAYING = 1;
    private s