瀏覽代碼

update documentation

Taner Sener 7 年之前
父節點
當前提交
e56364ac30

+ 3 - 5
.gitignore

@@ -1,9 +1,7 @@
+.idea/
 .DS_Store
 .dart_tool/
-
-.packages
 .pub/
-pubspec.lock
-
 build/
-/.idea/
+pubspec.lock
+.packages

+ 0 - 0
LICENSE.LGPLv3 → LICENSE


+ 6 - 0
android/src/main/java/com/arthenica/flutter/ffmpeg/FlutterFFmpegExecuteAsyncArgumentsTask.java

@@ -29,6 +29,12 @@ import java.util.List;
 
 import io.flutter.plugin.common.MethodChannel;
 
+/**
+ * Asynchronous task which performs {@link FFmpeg#execute(String[])} method invocations.
+ *
+ * @author Taner Sener
+ * @since 0.1.0
+ */
 public class FlutterFFmpegExecuteAsyncArgumentsTask extends AsyncTask<String, Integer, Integer> {
 
     private final MethodChannel.Result result;

+ 6 - 0
android/src/main/java/com/arthenica/flutter/ffmpeg/FlutterFFmpegExecuteAsyncCommandTask.java

@@ -26,6 +26,12 @@ import com.arthenica.mobileffmpeg.FFmpeg;
 
 import io.flutter.plugin.common.MethodChannel;
 
+/**
+ * Asynchronous task which performs {@link FFmpeg#execute(String, String)} method invocations.
+ *
+ * @author Taner Sener
+ * @since 0.1.0
+ */
 public class FlutterFFmpegExecuteAsyncCommandTask extends AsyncTask<String, Integer, Integer> {
 
     private String delimiter;

+ 6 - 0
android/src/main/java/com/arthenica/flutter/ffmpeg/FlutterFFmpegGetMediaInformationAsyncTask.java

@@ -27,6 +27,12 @@ import com.arthenica.mobileffmpeg.MediaInformation;
 
 import io.flutter.plugin.common.MethodChannel;
 
+/**
+ * Asynchronous task which performs {@link FFmpeg#getMediaInformation(String, Long)} method invocations.
+ *
+ * @author Taner Sener
+ * @since 0.1.0
+ */
 public class FlutterFFmpegGetMediaInformationAsyncTask extends AsyncTask<String, Integer, MediaInformation> {
 
     private Integer timeout;

+ 2 - 1
android/src/main/java/com/arthenica/flutter/ffmpeg/FlutterFFmpegPlugin.java

@@ -48,9 +48,10 @@ import io.flutter.plugin.common.MethodChannel.Result;
 import io.flutter.plugin.common.PluginRegistry.Registrar;
 
 /**
- * <p>Main class of Flutter FFmpeg Plugin.
+ * <h3>Flutter FFmpeg Plugin</h3>
  *
  * @author Taner Sener
+ * @since 0.1.0
  */
 public class FlutterFFmpegPlugin implements MethodCallHandler, EventChannel.StreamHandler {
     public static final String LIBRARY_NAME = "flutter-ffmpeg";

+ 3 - 0
ios/Classes/FlutterFFmpegPlugin.h

@@ -20,5 +20,8 @@
 #import <Flutter/Flutter.h>
 #import <mobileffmpeg/MobileFFmpegConfig.h>
 
+/**
+ * Flutter FFmpeg Plugin
+ */
 @interface FlutterFFmpegPlugin : NSObject<FlutterPlugin,FlutterStreamHandler,LogDelegate,StatisticsDelegate>
 @end

+ 3 - 0
ios/Classes/FlutterFfmpegPlugin.m

@@ -46,6 +46,9 @@ static NSString *const KEY_STAT_VIDEO_FPS = @"videoFps";
 static NSString *const EVENT_LOG = @"FlutterFFmpegLogCallback";
 static NSString *const EVENT_STAT = @"FlutterFFmpegStatisticsCallback";
 
+/**
+ * Flutter FFmpeg Plugin
+ */
 @implementation FlutterFFmpegPlugin {
     FlutterEventSink _eventSink;
 }

+ 1 - 1
ios/flutter_ffmpeg.podspec

@@ -6,7 +6,7 @@ Pod::Spec.new do |s|
   s.homepage         = 'https://github.com/tanersener/flutter-ffmpeg'
 
   s.author           = { 'Taner Sener' => 'tanersener@gmail.com' }
-  s.license          = { :file => '../LICENSE.LGPLv3.txt' }
+  s.license          = { :file => '../LICENSE' }
 
   s.requires_arc     = true
   s.ios.deployment_target = '9.3'

+ 57 - 0
tool/release.sh

@@ -0,0 +1,57 @@
+#!/bin/bash
+
+TOOL_DIR="`pwd`"
+
+create_package() {
+    local PACKAGE_NAME="flutter_ffmpeg_$1"
+
+    local PACKAGE_PATH="${TOOL_DIR}/../packages/${PACKAGE_NAME}"
+
+    if [[ -d ${PACKAGE_PATH} ]]; then
+        echo "error: package ${PACKAGE_NAME} exists"
+        exit 1
+    fi
+
+    mkdir -p ${PACKAGE_PATH}
+
+    # 1. COPY ANDROID
+    mkdir -p ${PACKAGE_PATH}/android
+    cp -r ${TOOL_DIR}/../android/src ${PACKAGE_PATH}/android
+    cp ${TOOL_DIR}/../android/.gitignore ${PACKAGE_PATH}/android
+    cp ${TOOL_DIR}/../android/build.gradle ${PACKAGE_PATH}/android
+    cp ${TOOL_DIR}/../android/gradle.properties ${PACKAGE_PATH}/android
+    cp ${TOOL_DIR}/../android/settings.gradle ${PACKAGE_PATH}/android
+
+    # 2. COPY IOS
+    cp -r ${TOOL_DIR}/../ios ${PACKAGE_PATH}
+
+    # 3. COPY lib
+    cp -r ${TOOL_DIR}/../lib ${PACKAGE_PATH}
+
+    # 4. COPY
+    cp ${TOOL_DIR}/../.gitignore ${PACKAGE_PATH}
+    cp ${TOOL_DIR}/../.metadata ${PACKAGE_PATH}
+    cp ${TOOL_DIR}/../pubspec.yaml ${PACKAGE_PATH}
+
+    # 5. COPY LICENSE
+    if [[ $1 == *gpl ]]; then
+        cp ${TOOL_DIR}/../LICENSE.GPLv3 ${PACKAGE_PATH}/LICENSE
+    else
+        cp ${TOOL_DIR}/../LICENSE ${PACKAGE_PATH}/LICENSE
+    fi
+
+    # 6. UPDATE DEPENDENCIES
+    sed -i .tmp "s/mobile-ffmpeg-https/mobile-ffmpeg-$1/g" ${PACKAGE_PATH}/android/build.gradle
+    sed -i .tmp "s/mobile-ffmpeg-https/mobile-ffmpeg-$1/g"  ${PACKAGE_PATH}/ios/flutter_ffmpeg.podspec
+    rm -f ${PACKAGE_PATH}/ios/flutter_ffmpeg.podspec.tmp
+    rm -f ${PACKAGE_PATH}/android/build.gradle.tmp
+}
+
+create_package 'min'
+create_package 'min-gpl'
+create_package 'https'
+create_package 'https-gpl'
+create_package 'audio'
+create_package 'video'
+create_package 'full'
+create_package 'full-gpl'