From 672226aff2a557c8803994e1577bae665855f1c1 Mon Sep 17 00:00:00 2001 From: Sheraz Khilji Date: Wed, 8 Apr 2020 14:01:05 +0200 Subject: [PATCH 1/3] Removed Unneeded files and updated readme.md --- .gitignore | 2 +- README.md | 12 ++++++----- app/.DS_Store | Bin 6148 -> 0 bytes app/src/.DS_Store | Bin 6148 -> 0 bytes app/src/main/.DS_Store | Bin 6148 -> 0 bytes app/src/main/AndroidManifest.xml | 7 +----- app/src/main/assets/.DS_Store | Bin 6148 -> 0 bytes .../sample/controller/VideoController.kt | 2 -- .../sample/view/AssetsGalleryActivity.kt | 13 +++++++----- app/src/main/res/layout/activity_gallery.xml | 20 ++++++++++++++++++ build.gradle | 2 +- gradle.properties | 1 + gradle/wrapper/gradle-wrapper.properties | 4 ++-- screenshot/library_demo.gif | Bin 0 -> 4571190 bytes videffects/build.gradle | 2 +- 15 files changed, 42 insertions(+), 23 deletions(-) delete mode 100644 app/.DS_Store delete mode 100644 app/src/.DS_Store delete mode 100644 app/src/main/.DS_Store delete mode 100644 app/src/main/assets/.DS_Store create mode 100644 app/src/main/res/layout/activity_gallery.xml create mode 100644 gradle.properties create mode 100644 screenshot/library_demo.gif diff --git a/.gitignore b/.gitignore index e5895a4..53544f2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ ### JetBrains template # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - +**/.DS_Store # User-specific stuff: .idea/workspace.xml .idea/tasks.xml diff --git a/README.md b/README.md index 28a1283..d8c8ac0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-VidEffects-green.svg?style=true)](https://android-arsenal.com/details/1/4029) This is an Android library which can be used to apply different Filters/Effects on videos. It uses vertexShaders and fragmentShaders to apply effects on `GLSurfaceView`. It uses `MediaPlayer` instance for playing videos on `GlSurfaceView`. See the sample app in order to see a working demo. +![Img](https://github.com/krazykira/VidEffects/blob/master/videffects/screenshot/library_demo.gif) ## Supported Effects @@ -34,8 +35,8 @@ The following list of effects are currently avaialble and can be applied using V ## Limitations The effects applied using this library are temporary. What that means is that the orignal video doesn't change. Effects are only applied during video playback and once the video ends the effects end with it. In the future, i am aiming to apply permanant effect to videos. You guys are welcome to help out using PRs. -
For now, if you are really desperate and want to apply effects then you can use [FFmpeg](https://ffmpeg.org/) to apply effects on videos. Details about how to do that can be seen on this [wiki page](https://github.com/krazykira/VidEffects/wiki/Permanent-video-effects) -Saving video available only for Filters and requires Android 23 min api version. +
For now, if you are really desperate and want to apply effects then you can use [FFmpeg](https://ffmpeg.org/) to apply effects on videos. Details about how to do that can be seen on this [wiki page](https://github.com/krazykira/VidEffects/wiki/Permanent-video-effects) +Saving video available only for Filters and requires Android 23 min api version. For more information check the file [VideoController](https://github.com/krazykira/VidEffects/blob/master/app/src/main/java/com/videffects/sample/controller/VideoController.kt). ## How to use it - Add the following code to your project's `build.gradle` file @@ -50,7 +51,7 @@ Saving video available only for Filters and requires Android 23 min api version. ```sh dependencies { // Gradle path for VidEffects - compile 'com.sherazkhilji.videffects:videffects:1.0.2' + compile 'com.sherazkhilji.videffects:videffects:1.1.0' } ``` @@ -105,7 +106,8 @@ dependencies { ``` -- Incase of any confusion, checkout the [SamplePlayerActivity](https://github.com/krazykira/VidEffects/blob/master/app/src/main/java/com/videffects/sample/SamplePlayerActivity.java) for a complete example on how to apply different `Effects` on your videos. +- Incase of any confusion, check the file [SamplePlayerActivity](https://github.com/krazykira/VidEffects/blob/master/app/src/main/java/com/videffects/sample/view/SamplePlayerActivity.java) for a complete example on how to apply different `Effects` on your videos. +- For Advance implementation and saving Filters, check the file [VideoActivity](https://github.com/krazykira/VidEffects/blob/master/app/src/main/java/com/videffects/sample/view/VideoActivity.kt) ## See it in working @@ -147,7 +149,7 @@ Developed by License ======= - Copyright 2016 Sheraz Ahmad Khilji + Copyright 2020 Sheraz Ahmad Khilji Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/app/.DS_Store b/app/.DS_Store deleted file mode 100644 index ff2448a2aeba83e8b6128f39af78fa5bbb422a67..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}(1u5S~o}Y|>WEp%NT@sni3i5|tLD3du_8fmkHQo1IOW@)1d_moLsg-fX!e_({bo1*oOr!NBszn*P1GbJ3D;Puqq)QMxb_9B zxXdz8m^l(UrF1t{M^U=K=EVP~fWCJt6jBeL*L3UtsR$$bXYn5X>aQ_GL`xLW0L+wP zd#9(&KXc5dH%!cZOns~qqpmw!Csya`s+5C!G{^dVH!B+Ey(l%`;WFx_NnW&CSE5p_ zEiJD|*^rHAjs4(64TB;q26-p!f7QKDVQ~_fRuGvKWMIvMq6*&>)yuJ#(3QuZEm&@zj-$v*X8QV_V(`K z>DiCb&+)HwTnbF!Ph;%4!wFmKf0X@36Fp5ty*0KwB!@5kuH=7RPAI~xj`=-9C*fP(x+ z6YO+wNp5dlxH!GndhkQIHq9$7PD>D&tr%Rr6|cdKA@At`=sPSeA_LS5ZA%v`V8Z{v*LI?#VER-;OBQ#I?MGDR{29&hMUZO9e zL`Qh01zG+-1GINVaV1jXAt|Dh2Xq^o0FglEz-LuNIXQ~c zhVIsNCvCLNI)R-~s-#M1mHA$8W3{&At!%9Hm%QHkdKLEaTEAaXa|^Ytz4Pn4``$zU z@yYIm#D{8R#^C^-VGIkr4O(fU(@XdU@q;)i$K;L0*5gv%NsX&`5U5g=I=OAr5=6x5RTeRsy znm1z|_h#uj6zLid>6vgLeTzIY1I)lj2B`OgROtTS{ki`)K|C-6%)n?eAd5S}P93$m zyY)+zbk};&b0`VL5dbBpjm_(#CdzymYzrwqIU(nebM diff --git a/app/src/main/.DS_Store b/app/src/main/.DS_Store deleted file mode 100644 index fa50e056b0bbad01affae034afbfdccd66f1701d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK&2G~`5S~p!x(Px=qEdVG1&Kq25>aTS3dw|W=mDvcD>$^MwXvZ_uD6Pv1_(jE z@DT6@JPJ?H$D!Z;P&El4^@314W6gfEvomY$H`cC~h(v!F_lP<~B%vB>Ei}IoJ+5_5 zYR=OH3NweIlwx{LA?0(??D!uU(6zfmPf)Lz26VB0DZQbD3M%P7y{99}wleiP%2b35 z{kd#F@BK6ai>QgJ7kCn66f?2k{}vmKieoqLkLWl{i?Z826}5WfMsq>Rwrt;OzX}f3 zC@8~nSoFieuI_DzHcb3QF^@qI`Z*_fjvf_=`*1E7CJeo{ea_MgG@z%l7hmYe=lh0qxl1bpR zH*(wIFZc#yijb3FkY_4?3%|~3&^yp|Lg6$~VhLjxNv)$OD8fwCmzgMZS(pK4fEl<9 z18(z@H!qXKvCIH7a4i_n`-2D7=sT<|nymwkxdH$ia2tWGe-3qy=g@apS;PoL*i@iR z74C{5Y&!g&i}M{;7Hv8Scli+R&BEPKgn2vW_e?km-y*ln05dSnK;3pb`uuXyAq!_@@k<0eD=5y8r+H diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 6e289bc..9325b16 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -21,12 +21,7 @@ android:name="com.videffects.sample.view.SamplePlayerActivity" android:configChanges="orientation|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation" android:label="@string/app_name" - android:screenOrientation="landscape"> - - - - - + android:screenOrientation="landscape" /> =3D1=6I0a!V=%h>qqIg@T$70Foetba0Un)YtG2`~qLVw^6}(ZK51G zNQVH~l6Usuxy{Y4&M^QP-cR>|0e~J|v9rOZ#dKYL$vQr>PL%wN5|`M;4Q4o8ijIlj zsDPf`Chl;NPi^7+PReRBE~_!uc{${T`1AQUb3~4)v_1#7d|b#7l&b?KqwFj{3!*Pv(Rp1@)(_$$A diff --git a/app/src/main/java/com/videffects/sample/controller/VideoController.kt b/app/src/main/java/com/videffects/sample/controller/VideoController.kt index 06a49ca..a8c9d6a 100644 --- a/app/src/main/java/com/videffects/sample/controller/VideoController.kt +++ b/app/src/main/java/com/videffects/sample/controller/VideoController.kt @@ -2,12 +2,10 @@ package com.videffects.sample.controller import android.content.res.AssetFileDescriptor import android.media.MediaPlayer -import android.media.MediaPlayer.MEDIA_ERROR_UNKNOWN import android.os.Build import android.os.Environment import android.util.Log import android.widget.SeekBar -import android.widget.Toast import androidx.annotation.RequiresApi import com.sherazkhilji.videffects.filter.AutoFixFilter import com.sherazkhilji.videffects.filter.GrainFilter diff --git a/app/src/main/java/com/videffects/sample/view/AssetsGalleryActivity.kt b/app/src/main/java/com/videffects/sample/view/AssetsGalleryActivity.kt index c2a21d0..cb63816 100644 --- a/app/src/main/java/com/videffects/sample/view/AssetsGalleryActivity.kt +++ b/app/src/main/java/com/videffects/sample/view/AssetsGalleryActivity.kt @@ -1,6 +1,7 @@ package com.videffects.sample.view import android.app.Activity +import android.content.Intent import android.graphics.Rect import android.graphics.drawable.Drawable import android.os.Bundle @@ -11,24 +12,26 @@ import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView.ItemDecoration +import com.sherazkhilji.sample.R import com.videffects.sample.model.AssetsGalleryModel import com.videffects.sample.model.screenHeight import com.videffects.sample.model.screenWidth import com.videffects.sample.model.toPx +import kotlinx.android.synthetic.main.activity_gallery.* class AssetsGalleryActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - val recyclerView = RecyclerView(this) - recyclerView.layoutParams = ViewGroup.LayoutParams( - ViewGroup.LayoutParams.MATCH_PARENT, - ViewGroup.LayoutParams.MATCH_PARENT) + setContentView(R.layout.activity_gallery) recyclerView.layoutManager = GridLayoutManager(this, SPAN_COUNT) recyclerView.adapter = PreviewAdapter(AssetsGalleryModel(this)) recyclerView.addItemDecoration(SpacesItemDecoration()) - setContentView(recyclerView) + + buttonSamplePlayer.setOnClickListener { + startActivity(Intent(this, SamplePlayerActivity::class.java)) + } } private class PreviewAdapter(private val model: AssetsGalleryModel) : RecyclerView.Adapter() { diff --git a/app/src/main/res/layout/activity_gallery.xml b/app/src/main/res/layout/activity_gallery.xml new file mode 100644 index 0000000..441a04f --- /dev/null +++ b/app/src/main/res/layout/activity_gallery.xml @@ -0,0 +1,20 @@ + + + + + +