text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_suffix|> context.config.Program context.config.Arguments openDefault) .With(Verb = (context.config.Verb |> Option.defaultValue null)) .With(WorkingDirectory = (context.config.WorkingDirectory |> Option.defaultValue "")) .With(UserName = (context.config.UserName |> O...
fim
CaptnCodr/Fli
fsharp
<|fim_suffix|> | Maximized | Minimized | Normal type ExecConfig = { Program: string Arguments: Arguments option Input: string option Output: Outputs option WorkingDirectory: string option Verb: string option UserName: string opti...
fim
CaptnCodr/Fli
fsharp
namespace Fli open Domain open Helpers module Cli = let shell (shell: Shells) (config: Config) : ShellContext = { config = { config.ShellConfig with Shell = shell } } let command (command: string) (context: ShellContext) = { context with config.Comman...
fim
CaptnCodr/Fli
fsharp
namespace Fli module Extensions = open System.Diagnostics type ProcessStartInfo with member x.With() = x <|endoftext|>
fim
CaptnCodr/Fli
fsharp
<|fim_suffix|>ofNativeInt (gcHandle.AddrOfPinnedObject()), unsureString.Length ) secureString.MakeReadOnly() secureString finally gcHandle.Free() let toOption = function | null | "" -> None | s -> Some ...
fim
CaptnCodr/Fli
fsharp
namespace Fli module Output = /// Gets `Id` from `Output`. let toId (output: Output) = output.Id /// Prints `Id` from `Output`. let printId = toId >> printfn "%i" /// Gets `Text` from `Output`. let toText (output: Output) = output.Text |> Option.defaultValue "" /// Prints `Text` from `...
fim
CaptnCodr/Fli
fsharp
module Fli.Tests.ExecContext.ExecCommandConfigureUnixTests open NUnit.Framework open FsUnit open Fli open System open System.Collections.Generic open System.Text [<Test>] [<Platform("Linux,Unix,MacOsX")>] let ``Check FileName in ProcessStartInfo Exec program`` () = cli { Exec "bash" } |> Command.buildProcess |> _...
fim
CaptnCodr/Fli
fsharp
<|fim_prefix|>module Fli.Tests.ExecContext.ExecCommandConfigureWindowsTests open NUnit.Framework open FsUnit open Fli open System open System.Collections.Generic open System.Text [<Test>] [<Platform("Win")>] let ``Check FileName in ProcessStartInfo Exec program`` () = cli { Exec "cmd.exe" } |> Command.buildP...
fim
CaptnCodr/Fli
fsharp
<|fim_prefix|>module Fli.Tests.ExecContext.ExecCommandExecuteLinuxTests open NUnit.Framework open FsUnit open Fli open System open System.Text [<Test>] [<Platform("Linux,Unix,MacOsX")>] let ``Hello World with executing program`` () = cli { Exec "bash" Arguments "-c \"echo Hello<|fim_suffix|>ut |> ...
fim
CaptnCodr/Fli
fsharp
<|fim_prefix|><|fim_suffix|> |> ignore [<Test>] [<Platform("Win")>] let ``Hello World with executing program async`` () = async { let! output = cli { Exec "cmd.exe" Arguments "/C echo Hello World!" } |> Command.executeAsync output...
fim
CaptnCodr/Fli
fsharp
<|fim_suffix|> Exec "cmd.exe" Arguments( seq { "/C" "echo" "Hello World!" } ) } |> Command.toString |> should equal "cmd.exe /C echo Hello World!" <|fim_prefix|>module Fli.Tests.ExecContext.ExecCommandToStringTest...
fim
CaptnCodr/Fli
fsharp
<|fim_suffix|>nfig for executing program`` () = cli { Exec "cmd.exe" WorkingDirectory @"C:\Users" Username "admin" } |> _.config.UserName.Value |> should equal "admin" [<Test>] let ``Check credentials config for executing program with NetworkCredentials`` () = cli { ...
fim
CaptnCodr/Fli
fsharp
<|fim_suffix|>")) |> should be True [<Test>] [<Platform("Linux,Unix,MacOsX")>] let ``Check StandardOutputEncoding & StandardErrorEncoding with setting Encoding`` () = let config = cli { Shell BASH Encoding Encoding.UTF8 } |> Command.buildProcess config.StandardO...
fim
CaptnCodr/Fli
fsharp
<|fim_prefix|>module Fli.Tests.ShellContext.ShellCommandConfigureWindowsTests open Fli open NUnit.Framework open FsUnit open System.Collections.Generic open System.Text [<Test>] [<Platform("Win")>] let ``Check FileName in ProcessStartInfo with CMD Shell`` () = cli { Shell CMD } |> Command.buildProcess |...
fim
CaptnCodr/Fli
fsharp
<|fim_suffix|>put "echo Test" } |> Command.execute |> Output.toText |> should equal "Hello World!" [<Test>] [<Platform("Linux,Unix,MacOsX")>] let ``Hello World with BASH async`` () = async { let! output = cli { Shell BASH Command "echo Hello World...
fim
CaptnCodr/Fli
fsharp
<|fim_prefix|>module Fli.Tests.ShellContext.ShellCommandExecuteWindowsTests open System.Threading open NUnit.Framework open FsUnit open Fli open System open System.IO open System.Text open System.Diagnostics [<Test>] [<Platform("Win")>] let ``Hello World with CMD`` () = let operation = cli { ...
fim
CaptnCodr/Fli
fsharp
<|fim_prefix|>module Fli.Tests.ShellContext.ShellCommandToSt<|fim_suffix|> |> Command.toString |> should equal "pwsh -Command Write-Host Hello World!" [<Test>] [<Platform("Linux,Unix,MacOsX")>] let ``BASH command toString returns full line`` () = cli { Shell BASH Command "echo Hello World!...
fim
CaptnCodr/Fli
fsharp
<|fim_suffix|>lo World!" } |> Command.toString |> should equal "powershell.exe -Command Write-Host Hello World!" [<Test>] [<Platform("Win")>] let ``PWSH command toString returns full line`` () = cli { Shell PWSH Command "Write-Host Hello World!" } |> Command.toString |> shou...
fim
CaptnCodr/Fli
fsharp
module Fli.Tests.ShellContext.ShellConfigTests open NUnit.Framework open FsUnit open Fli [<Test>] let ``Check Shell config with CMD`` () = cli { Shell CMD } |> _.config.Shell |> should equal CMD [<Test>] let ``Check Command config`` () = cli { Shell PS Command "echo test" } |> _.conf...
fim
CaptnCodr/Fli
fsharp
<|fim_suffix|>(orientationUtils != null) { orientationUtils.backToProtVideo(); } if (GSYVideoManager.backFromWindowFull(AudioDetailPlayer.this)) { return; } finish(); } }); } @Override ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.os.Build; import android.os.Bundle; import android.transition.Explode; import android.view.View; import android.view.Window; import androidx.activity.OnBackPressedCallbac...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>tionChanged 方法是用于触发屏幕旋转的 */ @Override public void onConfigurationChanged(@NonNull Configuration newConfig) { super.onConfigurationChanged(newConfig); //如果旋转了就全屏 if (isPlay && !isPause) { binding.danmakuPlayer.onConfigurationChanged(this, newConfig, orientat...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import com.example.gsyvideoplayer.databinding.ActivityDetailAdPlayerBinding; import com.example.gsyvideoplayer.utils.DemoVideoUrls; import com.shuyu.gsyvideoplayer.GSYBaseActivityDetai...
fim
CarGuo/GSYVideoPlayer
java
package com.example.gsyvideoplayer; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import com.example.gsyvideoplayer.utils.DemoVideoUrls; import com.shuyu.gsyvideoplayer.GSYBaseADActivityDetail; import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder; import com.shuyu.gsyvi...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.Manifest; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.res.Configuration; import android.graphics.Bitmap; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.w...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>} private GSYVideoPlayer getCurPlay() { if (binding.detailPlayer.getFullWindowPlayer() != null) { return binding.detailPlayer.getFullWindowPlayer(); } return binding.detailPlayer; } private void startDownload() { if (url == null || !url.startsWith...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>u.gsyvideoplayer.video.base.GSYVideoPlayer; import com.zhy.http.okhttp.OkHttpUtils; import com.zhy.http.okhttp.request.RequestCall; import java.util.HashMap; import java.util.Map; import okhttp3.Call; import tv.danmaku.ijk.media.exo2.Exo2PlayerManager; public class DetailDownloadPlayer extends AppComp...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|> //给予z变化 Matrix.setRotateM(transform, 0, 360 * percentage / 100, 0.0f, 0, 1.0f); break; case 4: Matrix.setRotateM(transform, 0, 360, 0.0f, 0, 1.0f); break; } //设置渲染transform ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideopla<|fim_suffix|>.com/cw_145225549855002", "标题4")); binding.detailPlayer.setUp(urls, true, 0); //增加封面 ImageView imageView = new ImageView(this); imageView.setScaleType(ImageView.ScaleType.CENTER_CROP); imageView.setImageResource(R.mipmap...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|> } catch (IOException e) { e.printStackTrace(); } mCoverMedia = null; } } /** * orientationUtils 和 detailPlayer.onConfigurationChanged 方法是用于触发屏幕旋转的 */ @Override public void onConfigurationChanged(@NonNull Configuration newConfig) ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>ew v) { //直接横屏 // ------- !!!如果不需要旋转屏幕,可以不调用!!!------- // 不需要屏幕旋转,还需要设置 setNeedOrientationUtils(false) orientationUtils.resolveByClick(); //第一个true是否需要隐藏actionbar,第二个true是否需要隐藏statusbar binding.detailPlayer.st...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import static androidx.media3.common.PlaybackException.*; import android.app.Activity; import android.content.DialogInterface; import android.content.Intent; import android.content.res.Configuration; import android.net.Uri; import android.os.Build; import android.os....
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.Manifest; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.res.Configuration; import android.graphics.Bitmap; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import androi...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|> void onClick(View v) { startActivity(new Intent(EmptyActivity.this, EmptyActivity.class)); } }); } } <|fim_prefix|>package com.example.gsyvideoplayer; import android.content.Intent; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; impor...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>()) { return; } finish(); } }); } } <|fim_prefix|>package com.example.gsyvideoplayer; import android.os.Build; import androidx.fragment.app.FragmentTransaction; import androidx.appcompat.app.AppCompatActivity; import android.os.B...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import androidx.annotation.Nullable; import androidx.media3.datasource.DataSink; import androidx.media3.datasource.DataSource; import androidx.media3.datasource.TransferListener; import androidx.media3.exoplayer.source.MediaSource; import androidx.multidex.MultiDexAppl...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.content.DialogInterface; import android.content.res.Configuration; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.RelativeLayout; import androidx.activity.OnBackPr...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import com.example.gsyvideoplayer.databinding.ActivityKeepLastFrameDemoBinding; import com.example.gsyvideoplayer.utils.DemoVideoUrls; import com.example.gsyvideoplayer.video.KeepLast...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>oPlayer.getFullscreenButton().setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { resolveFullBtn(holder.gsyVideoPlayer); } }); holder.adVideoPlayer.getFullscreenButton().setOnCli...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>ickStartIcon(url, objects); if (holder.adVideoPlayer.getGSYVideoManager().listener() != null) { holder.adVideoPlayer.getGSYVideoManager().listener().onAutoCompletion(); } } @Override public voi...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.os.Build; import android.os.Bundle; import androidx.activity.OnBackPressedCallback; import an<|fim_suffix|>p.Entry<String, CustomManager> customManagerEntry : map.entrySet()) { CustomManager customManager = customManagerEntry.get...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|> //如果是小窗口就不需要处理 if (!smallVideoHelper.isSmall()) { //小窗口 int size = CommonUtil.dip2px(ListVideo2Activity.this, 150); smallVideoHelper.showSmallVideo(new Point(size, size), fal...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>@Override public void handleOnBackPressed() { //为了支持重力旋转 onBackPressAdapter(); if (GSYVideoManager.backFromWindowFull(ListVideoActivity.this)) { return; } finish(); } }); ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>ivity: JumpUtils.goToSubtitleDetailPlayer(this); break; case R.id.detail_audio_activity: JumpUtils.goToDetailAudioActivity(this); break; case R.id.view_pager2_activity: JumpUtils.goToViewPager2Activity(...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.annotation.TargetApi; import android.content.pm.ActivityInfo; import android.os.Build; import android.os.Bundle; import android.os.Handler; import androidx.activity.OnBackPressedCallback; import androidx.appcompat.app.AppCompatActivity; import androidx....
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|> getWindow().getSharedElementEnterTransition(); if (transition != null) { transition.addListener(new OnTransitionListener(){ @Override public void onTransitionEnd(Transition transition) { super.onTransitionEnd(transition); ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>ner(new OnTransitionListener(){ @Override public void onTransitionEnd(Transition transition) { super.onTransitionEnd(transition); binding.videoPlayer.startPlayLogic(); transition.removeListener(this); ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.annotation.TargetApi; import android.content.pm.ActivityInfo; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.transition.Transition; import android.view.KeyEvent; import android.view.View; import android.widge...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.graphics.Point; import android.os.Build; import android.os.Bundle; import android.transition.Explode; import android.view.View; import android.view.Window; import android.widget.FrameLayout; import androidx.activity.OnBackPressedCallback; import android...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.graphics.Point; import android.os.Build; import android.os.Bundle; import android.transition.Explode; import android.view.View; import android.view.Window; import android.widget.FrameLayout; import androidx.activity.OnBackPressedCallback; import android...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.os.Build; import android.os.Bundle; import android.transition.Explode; import android.view.View; import android.view.Window; import androidx.activity.OnBackPressedCallback; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActi...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.content.res.Configuration; import android.graphics.Point; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import androidx.activity.OnBackPressedCallback; import androidx.annotation.NonNull; import androidx.appcompat....
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.media.MediaPlayer; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.util.Log; import android.view.View; import android.widget.ImageView; import androidx.activity.OnBackPressedCallback; import androidx.appcomp...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer; import android.graphics.Color; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import com.example.gsyvideoplayer.databinding.ActivityDetailSubtit...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>pterPosition(position); if (viewHolder != null) { RecyclerItemNormalHolder recyclerItemNormalHolder = (RecyclerItemNormalHolder) viewHolder; recyclerItemNormalHolder.getPlayer().startPlayLogic(); } } }, 50); } ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|> } @Override protected void onDestroy() { super.onDestroy(); GSYVideoManager.releaseAllVideos(); } private void resolveData() { for (int i = 0; i < 19; i++) { VideoModel videoModel = new VideoModel(); dataList.add(videoModel); } ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|> //增加title binding.webPlayer.getTitleTextView().setVisibility(View.GONE); binding.webPlayer.getBackButton().setVisibility(View.GONE); } } <|fim_prefix|>package com.example.gsyvideoplayer; import android.graphics.Point; import android.os.Bundle; import androidx.core.widget.NestedS...
fim
CarGuo/GSYVideoPlayer
java
package com.example.gsyvideoplayer; import android.content.Intent; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.provider.Settings; import androidx.annotation.RequiresApi; import androidx.appcompat.app.AppCompatActivity; import android.view.View; import android.view.animatio...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.adapter; import android.graphics.Color; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable<|fim_suffix|>uView != null) { mDanmakuView.invalidateDanmaku(danmaku, false); } ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import com.example.gsyvideoplayer.R; import com.example.gsyvideoplayer.model.VideoModel; import com....
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>ts); isFull = false; GSYVideoManager.instance().setNeedMute(true); if (getListNeedAutoLand()) { ListNormalAdapter.this.onQuitFullscreen(); } } @Override public void onEnterFullscreen(St...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|> } @Override public Object getItem(int position) { return null; } @Override public long getItemId(int position) { return 0; } @Override public View getView(final int position, View convertView, ViewGroup parent) { final ViewHolder holder; ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>emDataList = data; notifyDataSetChanged(); } public GSYVideoHelper getVideoHelper() { return smallVideoHelper; } public void setVideoHelper(GSYVideoHelper smallVideoHelper, GSYVideoHelper.GSYVideoHelperBuilder gsySmallVideoHelperBuilder) { this.smallVideoHelper = ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|> import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.example.gsyvideoplayer.R; import com.example.gsyvideoplayer.holder.RecyclerItemNormalHolder; import com.example.gsyvideoplayer.model.VideoModel; import java.util.List; /** * Created by guoshuyu on 2017/1...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.example.gsyvideoplayer.R; import com....
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.example.gsyvideoplayer.R; import com....
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>Texture2, vTextureCoord);\n" + " vec4 whiteColor = vec4(1.0);\n" + " gl_FragColor = whiteColor - (whiteColor - c2) / c1;\n" + "}\n"; return shader; } }<|fim_prefix|>package com.example.gsyvideoplayer.effect; import and...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.effect; import android.graphics.Bitmap; import android.opengl.GLSurfaceView; import com.shuyu.gsyvideoplayer.render.view.GSYVideoGLView.ShaderInterface; /** * 水印效果 */ public class BitmapIconEffect implements ShaderInterface { private final static int NEVER_SET...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.effect; import android.annotation.SuppressLint; import android.graphics.Bitmap; import android.opengl.GLES20; import android.opengl.GLUtils; i<|fim_suffix|> deleteBitmapProgram(); return; } mFilterInputTextureUniform2 = GLES20.glGetUniformL...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.exa<|fim_suffix|>class GSYVideoGLViewCustomRender2 extends GSYVideoGLViewSimpleRender { public GSYVideoGLViewCustomRender2() { super(); } @Override public void onDrawFrame(GL10 glUnused) { super.onDrawFrame(glUnused); if (mReleased || getProgram() == 0...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.effect; import android.annotation.SuppressLint; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.opengl.GLES20; import android.opengl.GLUtils; import com.shuyu.gsyvideoplayer.render.glrender.GSYVideoGLViewSimpleRender; import javax...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.effect; import android.annotation.SuppressLint; import android.opengl.GLES20; import android.opengl.Matrix; import com.shuyu.gsyvideoplayer.render.effect.NoEffect; import com.shuyu.gsyvideoplayer.render.glrender.GSYVideoGLViewSimpleRender; import java.nio.ByteBuffer; ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>/* * Copyright (C) 2012 CyberAgent * * Licensed under the Apache License, Version 2.0 (<|fim_suffix|>t com.shuyu.gsyvideoplayer.render.view.GSYVideoGLView; /** * 马赛克效果 * Created by guoshuyu on 2017/09/20. */ public class PixelationEffect implements GSYVideoGLView.ShaderInterface { private floa...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>r.setRotateViewAuto(false); binding.detailPlayer.setAutoFullWithSize(true); binding.detailPlayer.setLockLand(false); binding.detailPlayer.setShowFullAnimation(false); binding.detailPlayer.setNeedLockFull(true); binding.detailPlayer.setVideoAllCallBack(this); ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.exo; import android.app.AlertDialog; import android.content.DialogInterface; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.view.View; import android.widget.ImageView; import android.widget.Toast; import androidx.activity....
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.exo; import android.content.Context; import android.net.Uri; import android.os.Handler; import android.os.Looper; import androidx.media3.common.C; import androidx.media3.common.Format; import androidx.media3.common.Player; import androidx.media3.common.TrackSelectionOv...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.exo; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.text.TextUtils; import android.util.AttributeSet; import android.view.Surface; import android.view.SurfaceView; impor...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.exo; import com.shuyu.gsyvideoplayer.model.GSYModel; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * Created by guoshuyu on 2018/5/16. * 自定义列表数据model */ public class GSYExoModel extends GSYModel { List<Strin...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.exo; import android.content.Context; import android.media.AudioManager; import android.os.Build; import android.os.Message; import android.view.Surface; import android.view.SurfaceControl; import android.view.SurfaceView; import androidx.annotation.RequiresApi; import ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.exo; import android.annotation.SuppressLint; import android.app.Activity; import android.content.Context; import android.os.Message; import android.view.Surface; import android.view.View; import android.view.ViewGroup; import android.view.Window; import com.shuyu.gsyvi...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|> } }); // Create a trust manager that does not validate certificate chains final TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { @Override public void checkClientTrusted(ja...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.exosubtitle; import android.app.AlertDialog; import android.content.res.Configuration; import android.graphics.Color; import android.os.Bundle; import android.view.Gravity; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; im...
fim
CarGuo/GSYVideoPlayer
java
package com.example.gsyvideoplayer.exosubtitle; import androidx.media3.common.Player; import com.shuyu.gsyvideoplayer.model.GSYModel; import java.io.File; import java.util.Map; /** * Created by guoshuyu on 2018/5/16. * 自定义列表数据model */ public class GSYExoSubTitleModel extends GSYModel { private String subTi...
fim
CarGuo/GSYVideoPlayer
java
package com.example.gsyvideoplayer.exosubtitle; import android.content.Context; import android.os.Handler; import android.os.Looper; import tv.danmaku.ijk.media.exo2.IjkExo2MediaPlayer; import tv.danmaku.ijk.media.exo2.demo.EventLogger; import androidx.media3.common.Player; import androidx.media3.common.TrackSelecti...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.exosubtitle; import android.content.Context; import android.media.AudioManager; import android.net.TrafficStats; import android.net.Uri; import android.os.Message; import android.view.Surface; import androidx.annotation.Nullable; import androidx.media3.common.Player; i...
fim
CarGuo/GSYVideoPlayer
java
package com.example.gsyvideoplayer.exosubtitle; import android.annotation.SuppressLint; import android.app.Activity; import android.content.Context; import android.os.Message; import android.view.View; import android.view.ViewGroup; import android.view.Window; import com.shuyu.gsyvideoplayer.GSYVideoBaseManager; impo...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.exosubtitle; import android.app.Activity; import android.content.Context; import android.graphics.Point; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import androidx.media3.common.Player; ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.LinearLayoutManager; import ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>yclerItemBaseHolder extends RecyclerView.ViewHolder { RecyclerView.Adapter recyclerBaseAdapter; public RecyclerItemBaseHolder(View itemView) { super(itemView); } public RecyclerView.Adapter getRecyclerBaseAdapter() { return recyclerBaseAdapter; } public void set...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|> { @Override public void onClick(View v) { resolveFullBtn(gsyVideoPlayer); } }); gsyVideoPlayer.loadCoverImageBy(R.mipmap.xxx2, R.mipmap.xxx2); } /** * 全屏幕按键处理 */ private void resolveFullBtn(final StandardGSYVideoP...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>加title gsyVideoPlayer.getTitleTextView().setVisibility(View.GONE); //设置返回键 gsyVideoPlayer.getBackButton().setVisibility(View.GONE); //设置全屏按键功能 gsyVideoPlayer.getFullscreenButton().setOnClickListener(new View.OnClickListener() { ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.holder; import android.content.Context; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; import com.example.gsyvideoplayer.R; import com.example.gsyvideoplayer.model.VideoModel; import com.example.gsyvideoplayer.utils.DemoVi...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>age_demo_text); } public void setText(String text) { textView.setText(text); } } <|fim_prefix|>package com.example.gsyvideoplayer.holder; import android.content.Context; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; import android....
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.listener; import com.google.android.material.appbar.AppBarLayout; import com.shuyu.gsyvideoplayer.utils.Debuger; public abstract class AppBarStateChangeListener implements<|fim_suffix|>te != State.IDLE) { onStateChanged(appBarLayout, State.IDLE); ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.listener; import android.annotation.TargetApi; import android.os.Build; import android.transition.Transition; /** * 重载了过渡动画的方法 * Created by shuyu on 2016/8/15. */ @TargetApi(Build.VERSION_CODES.KITKAT) public class OnTransitionListener implements Transition.Transit...
fim
CarGuo/GSYVideoPlayer
java
<|fim_suffix|>Override public void onClickBlank(String url, Object... objects) { } //点击了全屏播放中的空白区域,objects[0]是title,object[1]是当前所处播放器(全屏或非全屏) @Override public void onClickBlankFullscreen(String url, Object... objects) { } @Override public void onComplete(String url, Object... objects...
fim
CarGuo/GSYVideoPlayer
java
package com.example.gsyvideoplayer.mediacodec; import android.content.Context; import android.view.ViewGroup; import com.example.gsyvideoplayer.view.CustomTextureSurface; import com.shuyu.gsyvideoplayer.render.GSYRenderView; import com.shuyu.gsyvideoplayer.render.glrender.GSYVideoGLViewBaseRender; import com.shuyu.gs...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.mediacodec; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Matrix; import android.graphics.SurfaceTexture; import android.util.AttributeSet; import android.view.Surface; import android.view.TextureView; import android.view.View; ...
fim
CarGuo/GSYVideoPlayer
java
<|fim_prefix|>package com.example.gsyvideoplayer.mediacodec; import android.content.Context; import android.util.AttributeSet; import an<|fim_suffix|>text context, Boolean fullFlag) { super(context, fullFlag); } public MediaCodecVideo(Context context) { super(context); } public MediaC...
fim
CarGuo/GSYVideoPlayer
java