#Region Project Attributes
#ApplicationLabel: mp4composer
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim composer As mp4composer
Private busy As Boolean = False
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
End Sub
Sub activity_click
If busy=False Then
busy=True
If File.Exists(File.DirDefaultExternal,"small.mp4")=False Then
File.Copy(File.DirAssets,"small.mp4",File.DirDefaultExternal,"small.mp4")
End If
composer.Initialize("comp",File.Combine(File.DirDefaultExternal,"small.mp4"),File.Combine(File.DirDefaultExternal,"smalledited.mp4"))
' composer.Rotation=180
' composer.setSize(640 , 640)
composer.ApplyGlInvertFilter
composer.ApplyGlWatermarkFilter(LoadBitmap(File.DirAssets,"baicon.png"),composer.POSITION_RIGHT_BOTTOM)
composer.Start
End If
End Sub
Sub comp_onprogress(progress As Int)
Log(progress&" %")
End Sub
Sub comp_oncompleted
Log("Completed")
busy=False
End Sub
Sub comp_oncanceled
Log("Cancelled")
busy=False
End Sub
Sub comp_onfailed(err As String)
busy=False
Log("error : "&err)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub