Skip to content

Commit

Permalink
ffmpeg可以运行,但是重复执行会崩溃
Browse files Browse the repository at this point in the history
  • Loading branch information
nightq committed Jun 27, 2014
0 parents commit fa39407
Show file tree
Hide file tree
Showing 52 changed files with 18,490 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
54 changes: 54 additions & 0 deletions .cproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?>

<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="com.android.toolchain.gcc.184087803">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.android.toolchain.gcc.184087803" moduleId="org.eclipse.cdt.core.settings" name="Default">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.android.toolchain.gcc.184087803" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="com.android.toolchain.gcc.184087803.1398701252" name="/" resourcePath="">
<toolChain id="com.android.toolchain.gcc.736290872" name="com.android.toolchain.gcc" nonInternalBuilderId="com.android.builder" superClass="com.android.toolchain.gcc">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="com.android.targetPlatform.497398094" isAbstract="false" superClass="com.android.targetPlatform"/>
<builder arguments="NDK_DEBUG=1" autoBuildTarget="" buildPath="${workspace_loc:/FFmpegCommand/Default}" id="com.android.builder.784254406" incrementalBuildTarget="" name="Android Builder" superClass="com.android.builder"/>
<tool id="com.android.gcc.compiler.1030930326" name="Android GCC Compiler" superClass="com.android.gcc.compiler">
<inputType id="com.android.gcc.inputType.2085157312" superClass="com.android.gcc.inputType"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="jni"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="scannerConfiguration"/>
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="FFmpegCommand.null.2072200156" name="FFmpegCommand"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="com.android.toolchain.gcc.184087803;com.android.toolchain.gcc.184087803.1398701252;com.android.gcc.compiler.1030930326;com.android.gcc.inputType.2085157312">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.android.AndroidPerProjectProfile"/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="refreshScope" versionNumber="1">
<resource resourceType="PROJECT" workspacePath="/FFmpegCommand"/>
</storageModule>
</cproject>
10 changes: 10 additions & 0 deletions .externalToolBuilders/commandndk.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/FFmpegCommand/libs&quot; type=&quot;2&quot;/&gt;&#10;&lt;/resources&gt;}"/>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/FFmpegCommand/jni&quot; type=&quot;2&quot;/&gt;&#10;&lt;/resources&gt;}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/Users/Nightq/Documents/android-ndk/ndk-build"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,clean"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/FFmpegCommand}"/>
</launchConfiguration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.eclipse.cdt.managedbuilder.core.genmakebuilder"/>
<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS">
<mapEntry key="?children?" value="?name?=outputEntries\|?children?=?name?=entry\\\\\\\|\\\|?name?=entry\\\\\\\|\\\|\||"/>
<mapEntry key="?name?" value=""/>
<mapEntry key="org.eclipse.cdt.make.core.append_environment" value="true"/>
<mapEntry key="org.eclipse.cdt.make.core.autoBuildTarget" value=""/>
<mapEntry key="org.eclipse.cdt.make.core.buildArguments" value=""/>
<mapEntry key="org.eclipse.cdt.make.core.buildCommand" value="ndk-build"/>
<mapEntry key="org.eclipse.cdt.make.core.buildLocation" value="${workspace_loc:/FFmpegCommand/Default}"/>
<mapEntry key="org.eclipse.cdt.make.core.cleanBuildTarget" value="clean"/>
<mapEntry key="org.eclipse.cdt.make.core.contents" value="org.eclipse.cdt.make.core.activeConfigSettings"/>
<mapEntry key="org.eclipse.cdt.make.core.enableAutoBuild" value="false"/>
<mapEntry key="org.eclipse.cdt.make.core.enableCleanBuild" value="true"/>
<mapEntry key="org.eclipse.cdt.make.core.enableFullBuild" value="true"/>
<mapEntry key="org.eclipse.cdt.make.core.fullBuildTarget" value=""/>
<mapEntry key="org.eclipse.cdt.make.core.stopOnError" value="true"/>
<mapEntry key="org.eclipse.cdt.make.core.useDefaultBuildCmd" value="true"/>
</mapAttribute>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
</launchConfiguration>
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Mac OS
.DS_Store

# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
obj/
libs/armeabi/
gen/
build/
.gradle/

# Local configuration file (sdk path, etc)
local.properties
.settings/org.eclipse.ltk.core.refactoring.prefs

# Intellij IDEA
.idea
*.iml

res/values/com_crashlytics_export_strings.xml
assets/crashlytics-build.properties
62 changes: 62 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>FFmpegCommand</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/org.eclipse.cdt.managedbuilder.core.genmakebuilder.launch</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/commandndk.launch</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding//jni/ffmpeg.c=UTF-8
29 changes: 29 additions & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ffmpegcommand"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >

<activity
android:name="nightq.ffmpeg.commang.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>

</manifest>
Empty file added Default/jni/subdir.mk
Empty file.
12 changes: 12 additions & 0 deletions Default/sources.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################

CPP_SRCS :=
C_SRCS :=
OBJS :=

# Every subdirectory with source files must be described here
SUBDIRS := \
jni \

Binary file added assets/ffmpeg
Binary file not shown.
6 changes: 6 additions & 0 deletions gen/com/example/ffmpegcommand/BuildConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** Automatically generated file. DO NOT MODIFY */
package com.example.ffmpegcommand;

public final class BuildConfig {
public final static boolean DEBUG = true;
}
56 changes: 56 additions & 0 deletions gen/com/example/ffmpegcommand/R.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/

package com.example.ffmpegcommand;

public final class R {
public static final class attr {
}
public static final class drawable {
public static final int ic_launcher=0x7f020000;
}
public static final class id {
public static final int button=0x7f060001;
public static final int editText=0x7f060000;
public static final int scrollView1=0x7f060002;
public static final int textView=0x7f060003;
}
public static final class layout {
public static final int main=0x7f030000;
}
public static final class string {
public static final int app_name=0x7f040000;
}
public static final class style {
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
API 11 theme customizations can go here.
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
API 14 theme customizations can go here.
*/
public static final int AppBaseTheme=0x7f050000;
/** Application theme.
All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f050001;
}
}
Binary file added ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions jni/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := ffmpeg
LOCAL_SRC_FILES := ffmpeg.c cmdutils.c ffmpeg_opt.c ffmpeg_filter.c
LOCAL_LDLIBS := -llog -ljnigraphics -lz
LOCAL_C_INCLUDES := config.h ffmpeg.h cmdutils.h cmdutils_common_opts.h libavutil/*.h libavformat/*.h compat/*.h libavresample/*.h libpostproc/*.h libavcodec/*.h libavdevice/*.h libavfilter/*.h libavswscale/*.h
LOCAL_SHARED_LIBRARIES := libavformat libavcodec libswscale libavutil libswresample libavfilter libavdevice
include $(BUILD_SHARED_LIBRARY)
$(call import-module,ffmpeg/android/arm)
3 changes: 3 additions & 0 deletions jni/Application.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
APP_ABI := armeabi
#APP_ABI := armeabi-v7a
APP_PLATFORM := android-10
Loading

0 comments on commit fa39407

Please sign in to comment.