├── .classpath
├── .project
├── AndroidManifest.xml
├── bin
├── AndroidManifest.xml
├── classes
│ └── com
│ │ ├── ccs
│ │ ├── converter
│ │ │ ├── Convert2Movie.class
│ │ │ ├── FFmpegFrameRecorder.class
│ │ │ ├── Frame.class
│ │ │ ├── FrameGrabber$Array.class
│ │ │ ├── FrameGrabber$Exception.class
│ │ │ ├── FrameGrabber$ImageMode.class
│ │ │ ├── FrameGrabber$PropertyEditor.class
│ │ │ ├── FrameGrabber.class
│ │ │ ├── FrameRecorder$Exception.class
│ │ │ ├── FrameRecorder.class
│ │ │ ├── avcodec$AVBitStreamFilter$Close.class
│ │ │ ├── avcodec$AVBitStreamFilter$Filter.class
│ │ │ ├── avcodec$AVBitStreamFilter.class
│ │ │ ├── avcodec$AVBitStreamFilterContext.class
│ │ │ ├── avcodec$AVCodec.class
│ │ │ ├── avcodec$AVCodecContext$Draw_horiz_band.class
│ │ │ ├── avcodec$AVCodecContext$Execute$Func.class
│ │ │ ├── avcodec$AVCodecContext$Execute.class
│ │ │ ├── avcodec$AVCodecContext$Execute2$Func2.class
│ │ │ ├── avcodec$AVCodecContext$Execute2.class
│ │ │ ├── avcodec$AVCodecContext$Get_buffer.class
│ │ │ ├── avcodec$AVCodecContext$Get_format.class
│ │ │ ├── avcodec$AVCodecContext$Reget_buffer.class
│ │ │ ├── avcodec$AVCodecContext$Release_buffer.class
│ │ │ ├── avcodec$AVCodecContext$Rtp_callback.class
│ │ │ ├── avcodec$AVCodecContext.class
│ │ │ ├── avcodec$AVCodecDefault.class
│ │ │ ├── avcodec$AVCodecInternal.class
│ │ │ ├── avcodec$AVCodecParser$Parser_close.class
│ │ │ ├── avcodec$AVCodecParser$Parser_init.class
│ │ │ ├── avcodec$AVCodecParser$Parser_parse.class
│ │ │ ├── avcodec$AVCodecParser$Split.class
│ │ │ ├── avcodec$AVCodecParser.class
│ │ │ ├── avcodec$AVCodecParserContext.class
│ │ │ ├── avcodec$AVFrame.class
│ │ │ ├── avcodec$AVHWAccel$Decode_slice.class
│ │ │ ├── avcodec$AVHWAccel$End_frame.class
│ │ │ ├── avcodec$AVHWAccel$Start_frame.class
│ │ │ ├── avcodec$AVHWAccel.class
│ │ │ ├── avcodec$AVPacket$Destruct.class
│ │ │ ├── avcodec$AVPacket.class
│ │ │ ├── avcodec$AVPanScan.class
│ │ │ ├── avcodec$AVPicture.class
│ │ │ ├── avcodec$AVProfile.class
│ │ │ ├── avcodec$AVResampleContext.class
│ │ │ ├── avcodec$AVSubtitle.class
│ │ │ ├── avcodec$AVSubtitleRect.class
│ │ │ ├── avcodec$Cb.class
│ │ │ ├── avcodec$RcOverride.class
│ │ │ ├── avcodec$ReSampleContext.class
│ │ │ ├── avcodec.class
│ │ │ ├── avdevice.class
│ │ │ ├── avfilter$AVABufferSinkParams.class
│ │ │ ├── avfilter$AVBufferSinkParams.class
│ │ │ ├── avfilter$AVFilter$Process_command.class
│ │ │ ├── avfilter$AVFilter$Query_formats.class
│ │ │ ├── avfilter$AVFilter$Uninit.class
│ │ │ ├── avfilter$AVFilter.class
│ │ │ ├── avfilter$AVFilterBuffer$Free.class
│ │ │ ├── avfilter$AVFilterBuffer.class
│ │ │ ├── avfilter$AVFilterBufferRef.class
│ │ │ ├── avfilter$AVFilterBufferRefAudioProps.class
│ │ │ ├── avfilter$AVFilterBufferRefVideoProps.class
│ │ │ ├── avfilter$AVFilterChannelLayouts.class
│ │ │ ├── avfilter$AVFilterCommand.class
│ │ │ ├── avfilter$AVFilterContext.class
│ │ │ ├── avfilter$AVFilterFormats.class
│ │ │ ├── avfilter$AVFilterGraph.class
│ │ │ ├── avfilter$AVFilterInOut.class
│ │ │ ├── avfilter$AVFilterLink.class
│ │ │ ├── avfilter$AVFilterPad$Config_props.class
│ │ │ ├── avfilter$AVFilterPad$Draw_slice.class
│ │ │ ├── avfilter$AVFilterPad$End_frame.class
│ │ │ ├── avfilter$AVFilterPad$Get_audio_buffer.class
│ │ │ ├── avfilter$AVFilterPad$Get_video_buffer.class
│ │ │ ├── avfilter$AVFilterPad$Poll_frame.class
│ │ │ ├── avfilter$AVFilterPad$Request_frame.class
│ │ │ ├── avfilter$AVFilterPad$Start_frame.class
│ │ │ ├── avfilter$AVFilterPad.class
│ │ │ ├── avfilter$AVFilterPool.class
│ │ │ ├── avfilter.class
│ │ │ ├── avformat$AVChapter.class
│ │ │ ├── avformat$AVCodecTag.class
│ │ │ ├── avformat$AVFormatContext.class
│ │ │ ├── avformat$AVFrac.class
│ │ │ ├── avformat$AVIOContext$Read_packet.class
│ │ │ ├── avformat$AVIOContext$Read_pause.class
│ │ │ ├── avformat$AVIOContext$Read_seek.class
│ │ │ ├── avformat$AVIOContext$Seek.class
│ │ │ ├── avformat$AVIOContext$Update_checksum.class
│ │ │ ├── avformat$AVIOContext$Write_packet.class
│ │ │ ├── avformat$AVIOContext.class
│ │ │ ├── avformat$AVIOInterruptCB$Callback.class
│ │ │ ├── avformat$AVIOInterruptCB.class
│ │ │ ├── avformat$AVIndexEntry.class
│ │ │ ├── avformat$AVInputFormat.class
│ │ │ ├── avformat$AVOutputFormat.class
│ │ │ ├── avformat$AVProbeData.class
│ │ │ ├── avformat$AVProgram.class
│ │ │ ├── avformat$AVStream.class
│ │ │ ├── avformat.class
│ │ │ ├── avutil$AVClass$Child_class_next.class
│ │ │ ├── avutil$AVClass$Child_next.class
│ │ │ ├── avutil$AVClass$Item_name.class
│ │ │ ├── avutil$AVClass.class
│ │ │ ├── avutil$AVDictionary.class
│ │ │ ├── avutil$AVDictionaryEntry.class
│ │ │ ├── avutil$AVOption.class
│ │ │ ├── avutil$AVRational.class
│ │ │ ├── avutil$LogCallback.class
│ │ │ └── avutil.class
│ │ └── pics2flix
│ │ │ ├── FFmpegFrameRecorder.class
│ │ │ ├── FacePreview.class
│ │ │ ├── FaceView.class
│ │ │ ├── FileBrowser$DISPLAYMODE.class
│ │ │ ├── FileBrowser.class
│ │ │ ├── Images2Movie$RepetitiveUpdater.class
│ │ │ ├── Images2Movie.class
│ │ │ └── Preview.class
│ │ └── tipu
│ │ └── ffmpeg
│ │ ├── BuildConfig.class
│ │ ├── R$attr.class
│ │ ├── R$drawable.class
│ │ ├── R$string.class
│ │ ├── R$style.class
│ │ └── R.class
└── jarlist.cache
├── gen
└── com
│ └── tipu
│ └── ffmpeg
│ ├── BuildConfig.java
│ └── R.java
├── libs
├── android-support-v4.jar
├── armeabi
│ ├── libavcodec.so
│ ├── libavdevice.so
│ ├── libavfilter.so
│ ├── libavformat.so
│ ├── libavutil.so
│ ├── libjniARToolKitPlus.so
│ ├── libjniavcodec.so
│ ├── libjniavdevice.so
│ ├── libjniavfilter.so
│ ├── libjniavformat.so
│ ├── libjniavutil.so
│ ├── libjnicvkernels.so
│ ├── libjniopencv_calib3d.so
│ ├── libjniopencv_contrib.so
│ ├── libjniopencv_core.so
│ ├── libjniopencv_features2d.so
│ ├── libjniopencv_flann.so
│ ├── libjniopencv_highgui.so
│ ├── libjniopencv_imgproc.so
│ ├── libjniopencv_legacy.so
│ ├── libjniopencv_ml.so
│ ├── libjniopencv_objdetect.so
│ ├── libjniopencv_video.so
│ ├── libjnipostproc.so
│ ├── libjniswscale.so
│ ├── libopencv_calib3d.so
│ ├── libopencv_contrib.so
│ ├── libopencv_core.so
│ ├── libopencv_features2d.so
│ ├── libopencv_flann.so
│ ├── libopencv_gpu.so
│ ├── libopencv_highgui.so
│ ├── libopencv_imgproc.so
│ ├── libopencv_legacy.so
│ ├── libopencv_ml.so
│ ├── libopencv_objdetect.so
│ ├── libopencv_video.so
│ ├── libpostproc.so
│ └── libswscale.so
└── javacv.jar
├── proguard-project.txt
├── project.properties
├── res
├── drawable-hdpi
│ ├── ic_action_search.png
│ └── ic_launcher.png
├── drawable-mdpi
│ ├── ic_action_search.png
│ └── ic_launcher.png
├── drawable-xhdpi
│ ├── ic_action_search.png
│ └── ic_launcher.png
├── values-v11
│ └── styles.xml
├── values-v14
│ └── styles.xml
└── values
│ ├── strings.xml
│ └── styles.xml
└── src
└── com
└── ccs
├── converter
├── Convert2Movie.java
├── FFmpegFrameRecorder.java
├── Frame.java
├── FrameGrabber.java
├── FrameRecorder.java
├── avcodec.java
├── avdevice.java
├── avfilter.java
├── avformat.java
└── avutil.java
└── pics2flix
├── FFmpegFrameRecorder.java
├── FacePreview.java
├── FileBrowser.java
└── Images2Movie.java
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | AA_ffmpeg
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/bin/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/Convert2Movie.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/Convert2Movie.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/FFmpegFrameRecorder.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/FFmpegFrameRecorder.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/Frame.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/Frame.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/FrameGrabber$Array.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/FrameGrabber$Array.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/FrameGrabber$Exception.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/FrameGrabber$Exception.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/FrameGrabber$ImageMode.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/FrameGrabber$ImageMode.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/FrameGrabber$PropertyEditor.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/FrameGrabber$PropertyEditor.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/FrameGrabber.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/FrameGrabber.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/FrameRecorder$Exception.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/FrameRecorder$Exception.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/FrameRecorder.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/FrameRecorder.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVBitStreamFilter$Close.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVBitStreamFilter$Close.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVBitStreamFilter$Filter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVBitStreamFilter$Filter.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVBitStreamFilter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVBitStreamFilter.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVBitStreamFilterContext.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVBitStreamFilterContext.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodec.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodec.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Draw_horiz_band.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Draw_horiz_band.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Execute$Func.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Execute$Func.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Execute.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Execute.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Execute2$Func2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Execute2$Func2.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Execute2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Execute2.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Get_buffer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Get_buffer.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Get_format.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Get_format.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Reget_buffer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Reget_buffer.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Release_buffer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Release_buffer.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Rtp_callback.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecContext$Rtp_callback.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecContext.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecContext.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecDefault.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecDefault.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecInternal.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecInternal.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecParser$Parser_close.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecParser$Parser_close.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecParser$Parser_init.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecParser$Parser_init.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecParser$Parser_parse.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecParser$Parser_parse.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecParser$Split.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecParser$Split.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecParser.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecParser.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVCodecParserContext.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVCodecParserContext.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVFrame.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVFrame.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVHWAccel$Decode_slice.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVHWAccel$Decode_slice.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVHWAccel$End_frame.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVHWAccel$End_frame.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVHWAccel$Start_frame.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVHWAccel$Start_frame.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVHWAccel.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVHWAccel.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVPacket$Destruct.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVPacket$Destruct.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVPacket.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVPacket.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVPanScan.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVPanScan.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVPicture.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVPicture.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVProfile.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVProfile.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVResampleContext.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVResampleContext.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVSubtitle.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVSubtitle.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$AVSubtitleRect.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$AVSubtitleRect.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$Cb.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$Cb.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$RcOverride.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$RcOverride.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec$ReSampleContext.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec$ReSampleContext.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avcodec.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avcodec.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avdevice.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avdevice.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVABufferSinkParams.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVABufferSinkParams.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVBufferSinkParams.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVBufferSinkParams.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilter$Process_command.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilter$Process_command.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilter$Query_formats.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilter$Query_formats.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilter$Uninit.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilter$Uninit.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilter.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterBuffer$Free.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterBuffer$Free.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterBuffer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterBuffer.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterBufferRef.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterBufferRef.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterBufferRefAudioProps.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterBufferRefAudioProps.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterBufferRefVideoProps.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterBufferRefVideoProps.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterChannelLayouts.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterChannelLayouts.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterCommand.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterCommand.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterContext.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterContext.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterFormats.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterFormats.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterGraph.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterGraph.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterInOut.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterInOut.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterLink.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterLink.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterPad$Config_props.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterPad$Config_props.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterPad$Draw_slice.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterPad$Draw_slice.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterPad$End_frame.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterPad$End_frame.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterPad$Get_audio_buffer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterPad$Get_audio_buffer.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterPad$Get_video_buffer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterPad$Get_video_buffer.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterPad$Poll_frame.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterPad$Poll_frame.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterPad$Request_frame.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterPad$Request_frame.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterPad$Start_frame.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterPad$Start_frame.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterPad.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterPad.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter$AVFilterPool.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter$AVFilterPool.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avfilter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avfilter.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVChapter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVChapter.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVCodecTag.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVCodecTag.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVFormatContext.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVFormatContext.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVFrac.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVFrac.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVIOContext$Read_packet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVIOContext$Read_packet.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVIOContext$Read_pause.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVIOContext$Read_pause.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVIOContext$Read_seek.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVIOContext$Read_seek.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVIOContext$Seek.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVIOContext$Seek.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVIOContext$Update_checksum.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVIOContext$Update_checksum.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVIOContext$Write_packet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVIOContext$Write_packet.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVIOContext.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVIOContext.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVIOInterruptCB$Callback.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVIOInterruptCB$Callback.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVIOInterruptCB.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVIOInterruptCB.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVIndexEntry.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVIndexEntry.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVInputFormat.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVInputFormat.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVOutputFormat.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVOutputFormat.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVProbeData.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVProbeData.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVProgram.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVProgram.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat$AVStream.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat$AVStream.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avformat.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avformat.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avutil$AVClass$Child_class_next.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avutil$AVClass$Child_class_next.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avutil$AVClass$Child_next.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avutil$AVClass$Child_next.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avutil$AVClass$Item_name.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avutil$AVClass$Item_name.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avutil$AVClass.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avutil$AVClass.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avutil$AVDictionary.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avutil$AVDictionary.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avutil$AVDictionaryEntry.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avutil$AVDictionaryEntry.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avutil$AVOption.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avutil$AVOption.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avutil$AVRational.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avutil$AVRational.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avutil$LogCallback.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avutil$LogCallback.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/converter/avutil.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/converter/avutil.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/pics2flix/FFmpegFrameRecorder.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/pics2flix/FFmpegFrameRecorder.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/pics2flix/FacePreview.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/pics2flix/FacePreview.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/pics2flix/FaceView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/pics2flix/FaceView.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/pics2flix/FileBrowser$DISPLAYMODE.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/pics2flix/FileBrowser$DISPLAYMODE.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/pics2flix/FileBrowser.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/pics2flix/FileBrowser.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/pics2flix/Images2Movie$RepetitiveUpdater.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/pics2flix/Images2Movie$RepetitiveUpdater.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/pics2flix/Images2Movie.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/pics2flix/Images2Movie.class
--------------------------------------------------------------------------------
/bin/classes/com/ccs/pics2flix/Preview.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/ccs/pics2flix/Preview.class
--------------------------------------------------------------------------------
/bin/classes/com/tipu/ffmpeg/BuildConfig.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/tipu/ffmpeg/BuildConfig.class
--------------------------------------------------------------------------------
/bin/classes/com/tipu/ffmpeg/R$attr.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/tipu/ffmpeg/R$attr.class
--------------------------------------------------------------------------------
/bin/classes/com/tipu/ffmpeg/R$drawable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/tipu/ffmpeg/R$drawable.class
--------------------------------------------------------------------------------
/bin/classes/com/tipu/ffmpeg/R$string.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/tipu/ffmpeg/R$string.class
--------------------------------------------------------------------------------
/bin/classes/com/tipu/ffmpeg/R$style.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/tipu/ffmpeg/R$style.class
--------------------------------------------------------------------------------
/bin/classes/com/tipu/ffmpeg/R.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/bin/classes/com/tipu/ffmpeg/R.class
--------------------------------------------------------------------------------
/bin/jarlist.cache:
--------------------------------------------------------------------------------
1 | # cache for current jar dependecy. DO NOT EDIT.
2 | # format is
3 | # Encoding is UTF-8
4 |
--------------------------------------------------------------------------------
/gen/com/tipu/ffmpeg/BuildConfig.java:
--------------------------------------------------------------------------------
1 | /** Automatically generated file. DO NOT MODIFY */
2 | package com.tipu.ffmpeg;
3 |
4 | public final class BuildConfig {
5 | public final static boolean DEBUG = true;
6 | }
--------------------------------------------------------------------------------
/gen/com/tipu/ffmpeg/R.java:
--------------------------------------------------------------------------------
1 | /* AUTO-GENERATED FILE. DO NOT MODIFY.
2 | *
3 | * This class was automatically generated by the
4 | * aapt tool from the resource data it found. It
5 | * should not be modified by hand.
6 | */
7 |
8 | package com.tipu.ffmpeg;
9 |
10 | public final class R {
11 | public static final class attr {
12 | }
13 | public static final class drawable {
14 | public static final int ic_action_search=0x7f020000;
15 | public static final int ic_launcher=0x7f020001;
16 | }
17 | public static final class string {
18 | public static final int app_name=0x7f030000;
19 | }
20 | public static final class style {
21 | public static final int AppTheme=0x7f040000;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/libs/armeabi/libavcodec.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libavcodec.so
--------------------------------------------------------------------------------
/libs/armeabi/libavdevice.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libavdevice.so
--------------------------------------------------------------------------------
/libs/armeabi/libavfilter.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libavfilter.so
--------------------------------------------------------------------------------
/libs/armeabi/libavformat.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libavformat.so
--------------------------------------------------------------------------------
/libs/armeabi/libavutil.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libavutil.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniARToolKitPlus.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniARToolKitPlus.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniavcodec.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniavcodec.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniavdevice.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniavdevice.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniavfilter.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniavfilter.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniavformat.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniavformat.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniavutil.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniavutil.so
--------------------------------------------------------------------------------
/libs/armeabi/libjnicvkernels.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjnicvkernels.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniopencv_calib3d.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniopencv_calib3d.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniopencv_contrib.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniopencv_contrib.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniopencv_core.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniopencv_core.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniopencv_features2d.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniopencv_features2d.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniopencv_flann.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniopencv_flann.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniopencv_highgui.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniopencv_highgui.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniopencv_imgproc.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniopencv_imgproc.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniopencv_legacy.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniopencv_legacy.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniopencv_ml.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniopencv_ml.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniopencv_objdetect.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniopencv_objdetect.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniopencv_video.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniopencv_video.so
--------------------------------------------------------------------------------
/libs/armeabi/libjnipostproc.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjnipostproc.so
--------------------------------------------------------------------------------
/libs/armeabi/libjniswscale.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libjniswscale.so
--------------------------------------------------------------------------------
/libs/armeabi/libopencv_calib3d.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libopencv_calib3d.so
--------------------------------------------------------------------------------
/libs/armeabi/libopencv_contrib.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libopencv_contrib.so
--------------------------------------------------------------------------------
/libs/armeabi/libopencv_core.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libopencv_core.so
--------------------------------------------------------------------------------
/libs/armeabi/libopencv_features2d.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libopencv_features2d.so
--------------------------------------------------------------------------------
/libs/armeabi/libopencv_flann.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libopencv_flann.so
--------------------------------------------------------------------------------
/libs/armeabi/libopencv_gpu.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libopencv_gpu.so
--------------------------------------------------------------------------------
/libs/armeabi/libopencv_highgui.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libopencv_highgui.so
--------------------------------------------------------------------------------
/libs/armeabi/libopencv_imgproc.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libopencv_imgproc.so
--------------------------------------------------------------------------------
/libs/armeabi/libopencv_legacy.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libopencv_legacy.so
--------------------------------------------------------------------------------
/libs/armeabi/libopencv_ml.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libopencv_ml.so
--------------------------------------------------------------------------------
/libs/armeabi/libopencv_objdetect.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libopencv_objdetect.so
--------------------------------------------------------------------------------
/libs/armeabi/libopencv_video.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libopencv_video.so
--------------------------------------------------------------------------------
/libs/armeabi/libpostproc.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libpostproc.so
--------------------------------------------------------------------------------
/libs/armeabi/libswscale.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/armeabi/libswscale.so
--------------------------------------------------------------------------------
/libs/javacv.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/libs/javacv.jar
--------------------------------------------------------------------------------
/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-15
15 |
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/res/drawable-hdpi/ic_action_search.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/res/drawable-mdpi/ic_action_search.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/res/drawable-xhdpi/ic_action_search.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tipusarowar/AA_ffmpeg/52eb25e36505027a076fc58bcb2fd25e4b11d1e2/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AA_ffmpeg
3 |
4 |
--------------------------------------------------------------------------------
/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/com/ccs/converter/Convert2Movie.java:
--------------------------------------------------------------------------------
1 | package com.ccs.converter;
2 |
3 | import android.app.Activity;
4 | import android.app.ProgressDialog;
5 | import android.content.Intent;
6 | import android.os.Bundle;
7 | import android.os.Environment;
8 | import android.os.Handler;
9 | import android.util.Log;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.View.OnClickListener;
13 | import android.view.ViewGroup.LayoutParams;
14 | import android.view.Window;
15 | import android.webkit.WebView;
16 | import android.webkit.WebViewDatabase;
17 | import android.widget.ImageView;
18 | import android.widget.TextView;
19 | import com.google.ads.Ad;
20 | import com.google.ads.AdListener;
21 | import com.google.ads.AdRequest;
22 | import com.google.ads.AdRequest.ErrorCode;
23 | import com.google.ads.AdView;
24 | import com.googlecode.javacv.FFmpegFrameRecorder;
25 | import com.googlecode.javacv.FrameRecorder;
26 | import com.googlecode.javacv.cpp.opencv_core;
27 | import com.googlecode.javacv.cpp.opencv_core.IplImage;
28 | import com.googlecode.javacv.cpp.opencv_highgui;
29 | import com.googlecode.javacv.cpp.opencv_imgproc;
30 | import java.io.File;
31 | import java.util.Arrays;
32 |
33 | public class Convert2Movie extends Activity
34 | implements View.OnClickListener, AdListener
35 | {
36 | static final String CAMERA_PIC_DIR = "/DCIM/CCFiles/Project01/";
37 | static final String SD_DIR = Environment.getExternalStorageDirectory().getAbsolutePath();
38 | private static final String TAG = "Convert to Movie";
39 | static final String VID_DIR = "/DCIM/CCVideos/";
40 | static final String VID_DIR2 = "/DCIM/myVideos/";
41 | boolean adBased = false;
42 | AdView adView;
43 | opencv_core.IplImage colorImage;
44 | ProgressDialog dialog;
45 | File directory;
46 | File[] files;
47 | int fps;
48 | int height;
49 | opencv_core.IplImage image_small;
50 | String imgDir;
51 | int increment;
52 | private LayoutInflater mInflater = null;
53 | int max;
54 | String movieFileNamePath;
55 | String movieName;
56 | View overlayAds;
57 | int position;
58 | View progressBar;
59 | Handler progressHandler;
60 | AdRequest request;
61 | TextView statusText;
62 | boolean useTimeStampName = true;
63 | String vidDir;
64 | String vidDir2;
65 | int width;
66 |
67 | public void getList(File paramFile)
68 | {
69 | this.progressBar.setVisibility(0);
70 | this.imgDir = paramFile.toString();
71 | this.vidDir = (SD_DIR + "/DCIM/CCVideos/");
72 | this.vidDir2 = (SD_DIR + "/DCIM/myVideos/");
73 | File localFile = new File(this.imgDir);
74 | String[] arrayOfString2;
75 | String str;
76 | if (localFile.isDirectory())
77 | {
78 | this.files = localFile.listFiles();
79 | Arrays.sort(this.files);
80 | this.max = this.files.length;
81 | String[] arrayOfString1 = this.files[0].toString().split("/");
82 | arrayOfString2 = arrayOfString1[(arrayOfString1.length - 1)].toString().split(".jpg")[0].toString().split("_");
83 | str = arrayOfString1[5];
84 | if (!this.useTimeStampName)
85 | break label338;
86 | }
87 | label338: for (this.movieFileNamePath = (this.vidDir + str + "/" + "vid_" + arrayOfString2[0] + arrayOfString2[1] + "_" + arrayOfString2[2] + arrayOfString2[3] + arrayOfString2[4] + ".3gp"); ; this.movieFileNamePath = (this.vidDir2 + this.movieName + ".3gp"))
88 | {
89 | this.dialog = new ProgressDialog(this);
90 | this.dialog.setCancelable(false);
91 | this.dialog.setMessage("Creating Movie...");
92 | this.dialog.setProgressStyle(1);
93 | this.dialog.setProgress(0);
94 | this.dialog.setMax(this.max);
95 | this.dialog.show();
96 | this.progressHandler = new Convert2Movie.2(this);
97 | this.progressBar.setVisibility(4);
98 | new Convert2Movie.3(this).start();
99 | return;
100 | }
101 | }
102 |
103 | public void onBackPressed()
104 | {
105 | }
106 |
107 | public void onClick(View paramView)
108 | {
109 | }
110 |
111 | public void onCreate(Bundle paramBundle)
112 | {
113 | super.onCreate(paramBundle);
114 | requestWindowFeature(1);
115 | getWindow().setFormat(-3);
116 | getWindow().setFlags(1024, 1024);
117 | setContentView(2130903044);
118 | this.statusText = ((TextView)findViewById(2131165192));
119 | this.statusText.setText(2131099666);
120 | this.mInflater = LayoutInflater.from(this);
121 | this.progressBar = this.mInflater.inflate(2130903057, null);
122 | addContentView(this.progressBar, new ViewGroup.LayoutParams(-1, -1));
123 | this.progressBar.setVisibility(0);
124 | this.progressBar.bringToFront();
125 | ((ImageView)findViewById(2131165206)).setOnClickListener(new Convert2Movie.1(this));
126 | Intent localIntent = getIntent();
127 | this.directory = new File(localIntent.getStringExtra("directory"));
128 | this.useTimeStampName = localIntent.getBooleanExtra("useTimeStampName", true);
129 | this.movieName = localIntent.getStringExtra("moviename");
130 | this.width = localIntent.getIntExtra("width", 640);
131 | this.height = localIntent.getIntExtra("height", 480);
132 | this.fps = localIntent.getIntExtra("fps", 10);
133 | this.adBased = localIntent.getBooleanExtra("adbased", false);
134 | this.mInflater = LayoutInflater.from(this);
135 | this.overlayAds = this.mInflater.inflate(2130903042, null);
136 | addContentView(this.overlayAds, new ViewGroup.LayoutParams(-1, -1));
137 | if (this.adBased)
138 | {
139 | new WebView(this).clearCache(true);
140 | if (WebViewDatabase.getInstance(this) != null)
141 | {
142 | this.overlayAds.setVisibility(0);
143 | this.adView = ((AdView)findViewById(2131165191));
144 | this.adView.setAdListener(this);
145 | }
146 | }
147 | while (true)
148 | {
149 | try
150 | {
151 | this.adView.loadAd(new AdRequest());
152 | getList(this.directory);
153 | return;
154 | }
155 | catch (NullPointerException localNullPointerException)
156 | {
157 | this.adView.setBackgroundResource(2130837509);
158 | this.adBased = false;
159 | continue;
160 | }
161 | this.overlayAds.setVisibility(4);
162 | }
163 | }
164 |
165 | public void onDismissScreen(Ad paramAd)
166 | {
167 | }
168 |
169 | public void onFailedToReceiveAd(Ad paramAd, AdRequest.ErrorCode paramErrorCode)
170 | {
171 | if (this.adView != null)
172 | this.adView.setBackgroundResource(2130837509);
173 | }
174 |
175 | public void onLeaveApplication(Ad paramAd)
176 | {
177 | }
178 |
179 | public void onPause()
180 | {
181 | super.onPause();
182 | }
183 |
184 | public void onPresentScreen(Ad paramAd)
185 | {
186 | }
187 |
188 | public void onReceiveAd(Ad paramAd)
189 | {
190 | }
191 |
192 | public void onResume()
193 | {
194 | super.onResume();
195 | }
196 |
197 | public void writeMovie(File[] paramArrayOfFile, String paramString)
198 | {
199 | FFmpegFrameRecorder localFFmpegFrameRecorder = new FFmpegFrameRecorder(paramString, this.width, this.height);
200 | localFFmpegFrameRecorder.setFrameRate(this.fps);
201 | localFFmpegFrameRecorder.setCodecID(13);
202 | localFFmpegFrameRecorder.setFormat("3gp");
203 | localFFmpegFrameRecorder.setPixelFormat(0);
204 | try
205 | {
206 | localFFmpegFrameRecorder.start();
207 | this.increment = 0;
208 | int i = paramArrayOfFile.length;
209 | j = 0;
210 | if (j < i);
211 | }
212 | catch (Exception localException1)
213 | {
214 | try
215 | {
216 | int j;
217 | while (true)
218 | {
219 | localFFmpegFrameRecorder.stop();
220 | localFFmpegFrameRecorder.release();
221 | if (this.adBased)
222 | this.adView.stopLoading();
223 | Intent localIntent = getIntent();
224 | localIntent.putExtra("moviefilename", this.movieFileNamePath);
225 | setResult(52, localIntent);
226 | System.gc();
227 | finish();
228 | return;
229 | localException1 = localException1;
230 | Log.e("Convert to Movie", localException1.toString());
231 | }
232 | this.colorImage = opencv_highgui.cvLoadImage(paramArrayOfFile[j].toString(), 1);
233 | if (this.colorImage == null)
234 | Log.e("Convert to Movie", "Color Image is NULL!");
235 | this.image_small = opencv_core.cvCreateImage(opencv_core.cvSize(640, 480), this.colorImage.depth(), this.colorImage.nChannels());
236 | if (this.image_small == null)
237 | Log.e("Convert to Movie", "Image Small is NULL!");
238 | opencv_imgproc.cvResize(this.colorImage, this.image_small, 1);
239 | if (localFFmpegFrameRecorder != null);
240 | while (true)
241 | {
242 | try
243 | {
244 | localFFmpegFrameRecorder.record(this.image_small);
245 | this.increment = (1 + this.increment);
246 | this.progressHandler.post(new Convert2Movie.4(this));
247 | opencv_core.cvReleaseImage(this.colorImage);
248 | opencv_core.cvReleaseImage(this.image_small);
249 | j++;
250 | }
251 | catch (Exception localException2)
252 | {
253 | Log.e("Convert to Movie", localException2.toString());
254 | continue;
255 | }
256 | Log.e("Convert to Movie", "Can not write frame, No writer!");
257 | }
258 | }
259 | catch (Exception localException3)
260 | {
261 | while (true)
262 | Log.e("Convert to Movie", localException3.toString());
263 | }
264 | }
265 | }
266 | }
--------------------------------------------------------------------------------
/src/com/ccs/converter/FFmpegFrameRecorder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009,2010,2011,2012 Samuel Audet
3 | *
4 | * This file is part of JavaCV.
5 | *
6 | * JavaCV is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 2 of the License, or
9 | * (at your option) any later version (subject to the "Classpath" exception
10 | * as provided in the LICENSE.txt file that accompanied this code).
11 | *
12 | * JavaCV is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with JavaCV. If not, see .
19 | *
20 | *
21 | * Based on the output-example.c file included in FFmpeg 0.6.5
22 | * as well as on the decoding_encoding.c file included in FFmpeg 0.11.1,
23 | * which are covered by the following copyright notice:
24 | *
25 | * Libavformat API example: Output a media file in any supported
26 | * libavformat format. The default codecs are used.
27 | *
28 | * Copyright (c) 2001,2003 Fabrice Bellard
29 | *
30 | * Permission is hereby granted, free of charge, to any person obtaining a copy
31 | * of this software and associated documentation files (the "Software"), to deal
32 | * in the Software without restriction, including without limitation the rights
33 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34 | * copies of the Software, and to permit persons to whom the Software is
35 | * furnished to do so, subject to the following conditions:
36 | *
37 | * The above copyright notice and this permission notice shall be included in
38 | * all copies or substantial portions of the Software.
39 | *
40 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
43 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
46 | * THE SOFTWARE.
47 | */
48 |
49 | package com.googlecode.javacv;
50 |
51 | import com.googlecode.javacpp.BytePointer;
52 | import com.googlecode.javacpp.Loader;
53 | import com.googlecode.javacpp.PointerPointer;
54 | import java.io.File;
55 | import java.nio.Buffer;
56 | import java.nio.ByteBuffer;
57 | import java.nio.DoubleBuffer;
58 | import java.nio.FloatBuffer;
59 | import java.nio.IntBuffer;
60 | import java.nio.ShortBuffer;
61 |
62 | import static com.googlecode.javacv.cpp.avcodec.*;
63 | import static com.googlecode.javacv.cpp.avformat.*;
64 | import static com.googlecode.javacv.cpp.avutil.*;
65 | import static com.googlecode.javacv.cpp.opencv_core.*;
66 | import static com.googlecode.javacv.cpp.swscale.*;
67 |
68 | /**
69 | *
70 | * @author Samuel Audet
71 | */
72 | public class FFmpegFrameRecorder extends FrameRecorder {
73 |
74 | private static Exception loadingException = null;
75 | public static void tryLoad() throws Exception {
76 | if (loadingException != null) {
77 | throw loadingException;
78 | } else {
79 | try {
80 | Loader.load(com.googlecode.javacv.cpp.avutil.class);
81 | Loader.load(com.googlecode.javacv.cpp.avcodec.class);
82 | Loader.load(com.googlecode.javacv.cpp.avformat.class);
83 | Loader.load(com.googlecode.javacv.cpp.swscale.class);
84 | } catch (Throwable t) {
85 | if (t instanceof Exception) {
86 | throw loadingException = (Exception)t;
87 | } else {
88 | throw loadingException = new Exception("Failed to load " + FFmpegFrameRecorder.class, t);
89 | }
90 | }
91 | }
92 | }
93 |
94 | public FFmpegFrameRecorder(File file, int audioChannels) {
95 | this(file, 0, 0, audioChannels);
96 | }
97 | public FFmpegFrameRecorder(String filename, int audioChannels) {
98 | this(filename, 0, 0, audioChannels);
99 | }
100 | public FFmpegFrameRecorder(File file, int imageWidth, int imageHeight) {
101 | this(file, imageWidth, imageHeight, 0);
102 | }
103 | public FFmpegFrameRecorder(String filename, int imageWidth, int imageHeight) {
104 | this(filename, imageWidth, imageHeight, 0);
105 | }
106 | public FFmpegFrameRecorder(File file, int imageWidth, int imageHeight, int audioChannels) {
107 | this(file.getAbsolutePath(), imageWidth, imageHeight);
108 | }
109 | public FFmpegFrameRecorder(String filename, int imageWidth, int imageHeight, int audioChannels) {
110 | /* initialize libavcodec, and register all codecs and formats */
111 | av_register_all();
112 |
113 | this.filename = filename;
114 | this.imageWidth = imageWidth;
115 | this.imageHeight = imageHeight;
116 | this.audioChannels = audioChannels;
117 |
118 | this.pixelFormat = PIX_FMT_NONE;
119 | this.videoCodec = CODEC_ID_NONE;
120 | this.videoBitrate = 400000;
121 | this.frameRate = 30;
122 |
123 | this.sampleFormat = AV_SAMPLE_FMT_S16;
124 | this.audioCodec = CODEC_ID_NONE;
125 | this.audioBitrate = 64000;
126 | this.sampleRate = 44100;
127 |
128 | this.pkt = new AVPacket();
129 | }
130 | public void release() throws Exception {
131 | /* close each codec */
132 | if (video_c != null) {
133 | avcodec_close(video_c);
134 | video_c = null;
135 | }
136 | if (audio_c != null) {
137 | avcodec_close(audio_c);
138 | audio_c = null;
139 | }
140 | if (picture_buf != null) {
141 | av_free(picture_buf);
142 | picture_buf = null;
143 | }
144 | if (picture != null) {
145 | av_free(picture);
146 | picture = null;
147 | }
148 | if (tmp_picture != null) {
149 | av_free(tmp_picture);
150 | tmp_picture = null;
151 | }
152 | if (video_outbuf != null) {
153 | av_free(video_outbuf);
154 | video_outbuf = null;
155 | }
156 | if (frame != null) {
157 | av_free(frame);
158 | frame = null;
159 | }
160 | if (samplesPointer != null) {
161 | av_free(samplesPointer);
162 | samplesPointer = null;
163 | samplesBuffer = null;
164 | }
165 | if (audio_outbuf != null) {
166 | av_free(audio_outbuf);
167 | audio_outbuf = null;
168 | }
169 | video_st = null;
170 | audio_st = null;
171 |
172 | if (oc != null) {
173 | /* free the streams */
174 | int nb_streams = oc.nb_streams();
175 | for(int i = 0; i < nb_streams; i++) {
176 | av_free(oc.streams(i).codec());
177 | av_free(oc.streams(i));
178 | }
179 |
180 | /* free the stream */
181 | av_free(oc);
182 | oc = null;
183 | }
184 | }
185 | @Override protected void finalize() throws Throwable {
186 | super.finalize();
187 | release();
188 | }
189 |
190 | private String filename;
191 | private AVFrame picture, tmp_picture;
192 | private BytePointer picture_buf;
193 | private BytePointer video_outbuf;
194 | private int video_outbuf_size;
195 | private AVFrame frame;
196 | private BytePointer samplesPointer;
197 | private ByteBuffer samplesBuffer;
198 | private BytePointer audio_outbuf;
199 | private int audio_outbuf_size;
200 | private int audio_input_frame_size;
201 | private AVOutputFormat oformat;
202 | private AVFormatContext oc;
203 | private AVCodec video_codec, audio_codec;
204 | private AVCodecContext video_c, audio_c;
205 | private AVStream video_st, audio_st;
206 | private SwsContext img_convert_ctx;
207 | private AVPacket pkt;
208 | private int[] got_packet;
209 |
210 | public void start() throws Exception {
211 | picture = null;
212 | tmp_picture = null;
213 | picture_buf = null;
214 | frame = null;
215 | video_outbuf = null;
216 | audio_outbuf = null;
217 | oc = null;
218 | video_c = null;
219 | audio_c = null;
220 | video_st = null;
221 | audio_st = null;
222 | got_packet = new int[1];
223 |
224 | /* auto detect the output format from the name. */
225 | String format_name = format == null || format.length() == 0 ? null : format;
226 | oformat = av_guess_format(format_name, filename, null);
227 | if (oformat == null) {
228 | throw new Exception("Could not find suitable output format");
229 | }
230 | format_name = oformat.name().getString();
231 |
232 | /* allocate the output media context */
233 | oc = avformat_alloc_context();
234 | if (oc == null) {
235 | throw new Exception("Could not allocate format context");
236 | }
237 |
238 | oc.oformat(oformat);
239 | oc.filename(filename);
240 |
241 | /* add the audio and video streams using the format codecs
242 | and initialize the codecs */
243 |
244 | if (imageWidth > 0 && imageHeight > 0) {
245 | if (videoCodec != CODEC_ID_NONE) {
246 | oformat.video_codec(videoCodec);
247 | } else if ("mp4".equals(format_name)) {
248 | oformat.video_codec(CODEC_ID_MPEG4);
249 | } else if ("3gp".equals(format_name)) {
250 | oformat.video_codec(CODEC_ID_H263);
251 | } else if ("avi".equals(format_name)) {
252 | oformat.video_codec(CODEC_ID_HUFFYUV);
253 | }
254 |
255 | /* find the video encoder */
256 | video_codec = avcodec_find_encoder(oformat.video_codec());
257 | if (video_codec == null) {
258 | release();
259 | throw new Exception("Video codec not found");
260 | }
261 |
262 | /* add a video output stream */
263 | video_st = avformat_new_stream(oc, video_codec);
264 | if (video_st == null) {
265 | release();
266 | throw new Exception("Could not allocate video stream");
267 | }
268 | video_c = video_st.codec();
269 | video_c.codec_id(oformat.video_codec());
270 | video_c.codec_type(AVMEDIA_TYPE_VIDEO);
271 |
272 | /* put sample parameters */
273 | video_c.bit_rate(videoBitrate);
274 | /* resolution must be a multiple of two, but round up to 16 as often required */
275 | video_c.width((imageWidth + 15) / 16 * 16);
276 | video_c.height(imageHeight);
277 | /* time base: this is the fundamental unit of time (in seconds) in terms
278 | of which frame timestamps are represented. for fixed-fps content,
279 | timebase should be 1/framerate and timestamp increments should be
280 | identically 1. */
281 | video_c.time_base(av_d2q(1 / frameRate, 1001000));
282 | video_c.gop_size(12); /* emit one intra frame every twelve frames at most */
283 |
284 | if (pixelFormat != PIX_FMT_NONE) {
285 | video_c.pix_fmt(pixelFormat);
286 | } else if (video_c.codec_id() == CODEC_ID_RAWVIDEO || video_c.codec_id() == CODEC_ID_PNG ||
287 | video_c.codec_id() == CODEC_ID_HUFFYUV || video_c.codec_id() == CODEC_ID_FFV1) {
288 | video_c.pix_fmt(PIX_FMT_RGB32); // appropriate for common lossless formats
289 | } else {
290 | video_c.pix_fmt(PIX_FMT_YUV420P); // lossy, but works with about everything
291 | }
292 |
293 | if (video_c.codec_id() == CODEC_ID_MPEG2VIDEO) {
294 | /* just for testing, we also add B frames */
295 | video_c.max_b_frames(2);
296 | } else if (video_c.codec_id() == CODEC_ID_MPEG1VIDEO) {
297 | /* Needed to avoid using macroblocks in which some coeffs overflow.
298 | This does not happen with normal video, it just happens here as
299 | the motion of the chroma plane does not match the luma plane. */
300 | video_c.mb_decision(2);
301 | } else if (video_c.codec_id() == CODEC_ID_H263) {
302 | // H.263 does not support any other resolution than the following
303 | if (imageWidth <= 128 && imageHeight <= 96) {
304 | video_c.width(128).height(96);
305 | } else if (imageWidth <= 176 && imageHeight <= 144) {
306 | video_c.width(176).height(144);
307 | } else if (imageWidth <= 352 && imageHeight <= 288) {
308 | video_c.width(352).height(288);
309 | } else if (imageWidth <= 704 && imageHeight <= 576) {
310 | video_c.width(704).height(576);
311 | } else {
312 | video_c.width(1408).height(1152);
313 | }
314 | } else if (video_c.codec_id() == CODEC_ID_H264) {
315 | // use constrained baseline to produce content that plays back on anything,
316 | // without any significant tradeoffs for most use cases
317 | video_c.profile(AVCodecContext.FF_PROFILE_H264_CONSTRAINED_BASELINE);
318 | av_opt_set(video_c.priv_data(), "profile", "baseline", 0);
319 | av_opt_set(video_c.priv_data(), "preset", "medium", 0);
320 | }
321 |
322 | // some formats want stream headers to be separate
323 | if ((oformat.flags() & AVFMT_GLOBALHEADER) != 0) {
324 | video_c.flags(video_c.flags() | CODEC_FLAG_GLOBAL_HEADER);
325 | }
326 | }
327 |
328 | /*
329 | * add an audio output stream
330 | */
331 | if (audioChannels > 0) {
332 | if (audioCodec != CODEC_ID_NONE) {
333 | oformat.audio_codec(audioCodec);
334 | }
335 |
336 | /* find the audio encoder */
337 | audio_codec = avcodec_find_encoder(oformat.audio_codec());
338 | if (audio_codec == null) {
339 | release();
340 | throw new Exception("Audio codec not found");
341 | }
342 |
343 | audio_st = avformat_new_stream(oc, audio_codec);
344 | if (audio_st == null) {
345 | release();
346 | throw new Exception("Could not allocate audio stream");
347 | }
348 | audio_c = audio_st.codec();
349 | audio_c.codec_id(oformat.audio_codec());
350 | audio_c.codec_type(AVMEDIA_TYPE_AUDIO);
351 |
352 | /* put sample parameters */
353 | audio_c.bit_rate(audioBitrate);
354 | audio_c.sample_rate(sampleRate);
355 | audio_c.channels(audioChannels);
356 | audio_c.sample_fmt(sampleFormat);
357 | audio_c.time_base().num(1).den(sampleRate);
358 | switch (audio_c.sample_fmt()) {
359 | case AV_SAMPLE_FMT_U8: audio_c.bits_per_raw_sample(8); break;
360 | case AV_SAMPLE_FMT_S16: audio_c.bits_per_raw_sample(16); break;
361 | case AV_SAMPLE_FMT_S32: audio_c.bits_per_raw_sample(32); break;
362 | case AV_SAMPLE_FMT_FLT: audio_c.bits_per_raw_sample(32); break;
363 | case AV_SAMPLE_FMT_DBL: audio_c.bits_per_raw_sample(64); break;
364 | default: assert false;
365 | }
366 |
367 | // some formats want stream headers to be separate
368 | if ((oformat.flags() & AVFMT_GLOBALHEADER) != 0) {
369 | audio_c.flags(audio_c.flags() | CODEC_FLAG_GLOBAL_HEADER);
370 | }
371 | }
372 |
373 | av_dump_format(oc, 0, filename, 1);
374 |
375 | /* now that all the parameters are set, we can open the audio and
376 | video codecs and allocate the necessary encode buffers */
377 | if (video_st != null) {
378 | /* open the codec */
379 | if (avcodec_open2(video_c, video_codec, null) < 0) {
380 | release();
381 | throw new Exception("Could not open video codec");
382 | }
383 |
384 | video_outbuf = null;
385 | if ((oformat.flags() & AVFMT_RAWPICTURE) == 0) {
386 | /* allocate output buffer */
387 | /* XXX: API change will be done */
388 | /* buffers passed into lav* can be allocated any way you prefer,
389 | as long as they're aligned enough for the architecture, and
390 | they're freed appropriately (such as using av_free for buffers
391 | allocated with av_malloc) */
392 | video_outbuf_size = Math.max(256 * 1024, 8 * video_c.width() * video_c.height()); // a la ffmpeg.c
393 | video_outbuf = new BytePointer(av_malloc(video_outbuf_size));
394 | }
395 |
396 | /* allocate the encoded raw picture */
397 | picture = avcodec_alloc_frame();
398 | if (picture == null) {
399 | release();
400 | throw new Exception("Could not allocate picture");
401 | }
402 | picture.pts(0); // magic required by libx264
403 |
404 | int size = avpicture_get_size(video_c.pix_fmt(), video_c.width(), video_c.height());
405 | picture_buf = new BytePointer(av_malloc(size));
406 | if (picture_buf == null) {
407 | release();
408 | throw new Exception("Could not allocate picture buffer");
409 | }
410 |
411 | /* if the output format is not equal to the image format, then a temporary
412 | picture is needed too. It is then converted to the required output format */
413 | tmp_picture = avcodec_alloc_frame();
414 | if (tmp_picture == null) {
415 | release();
416 | throw new Exception("Could not allocate temporary picture");
417 | }
418 | }
419 |
420 | if (audio_st != null) {
421 | /* open the codec */
422 | if (avcodec_open2(audio_c, audio_codec, null) < 0) {
423 | release();
424 | throw new Exception("Could not open audio codec");
425 | }
426 |
427 | audio_outbuf_size = 256 * 1024;
428 | audio_outbuf = new BytePointer(av_malloc(audio_outbuf_size));
429 |
430 | /* ugly hack for PCM codecs (will be removed ASAP with new PCM
431 | support to compute the input frame size in samples */
432 | if (audio_c.frame_size() <= 1) {
433 | audio_outbuf_size = FF_MIN_BUFFER_SIZE;
434 | audio_input_frame_size = audio_outbuf_size / audio_c.channels();
435 | switch (audio_c.codec_id()) {
436 | case CODEC_ID_PCM_S16LE:
437 | case CODEC_ID_PCM_S16BE:
438 | case CODEC_ID_PCM_U16LE:
439 | case CODEC_ID_PCM_U16BE:
440 | audio_input_frame_size >>= 1;
441 | break;
442 | default:
443 | break;
444 | }
445 | } else {
446 | audio_input_frame_size = audio_c.frame_size();
447 | }
448 | //int bufferSize = audio_input_frame_size * audio_c.bits_per_raw_sample()/8 * audio_c.channels();
449 | int bufferSize = av_samples_get_buffer_size(null, audio_c.channels(), audio_input_frame_size, sampleFormat, 1);
450 | samplesPointer = new BytePointer(av_malloc(bufferSize));
451 | samplesBuffer = samplesPointer.capacity(bufferSize).asBuffer();
452 |
453 | /* allocate the audio frame */
454 | frame = avcodec_alloc_frame();
455 | if (frame == null) {
456 | release();
457 | throw new Exception("Could not allocate audio frame");
458 | }
459 | }
460 |
461 | /* open the output file, if needed */
462 | if ((oformat.flags() & AVFMT_NOFILE) == 0) {
463 | AVIOContext pb = new AVIOContext(null);
464 | if (avio_open(pb, filename, AVIO_FLAG_WRITE) < 0) {
465 | release();
466 | throw new Exception("Could not open '" + filename + "'");
467 | }
468 | oc.pb(pb);
469 | }
470 |
471 | /* write the stream header, if any */
472 | avformat_write_header(oc, null);
473 | }
474 |
475 | public void stop() throws Exception {
476 | if (oc != null) {
477 | /* write the trailer, if any */
478 | av_write_trailer(oc);
479 |
480 | if ((oformat.flags() & AVFMT_NOFILE) == 0) {
481 | /* close the output file */
482 | avio_close(oc.pb());
483 | }
484 | }
485 | release();
486 | }
487 |
488 | public void record(IplImage image) throws Exception {
489 | record(image, PIX_FMT_NONE);
490 | }
491 | public void record(IplImage image, int pixelFormat) throws Exception {
492 | if (video_st == null) {
493 | throw new Exception("No video output stream (Is imageWidth > 0 && imageHeight > 0 and has start() been called?)");
494 | }
495 | int ret;
496 |
497 | if (image == null) {
498 | /* no more frame to compress. The codec has a latency of a few
499 | frames if using B frames, so we get the last frames by
500 | passing the same picture again */
501 | } else {
502 | int width = image.width();
503 | int height = image.height();
504 | int step = image.widthStep();
505 | BytePointer data = image.imageData();
506 |
507 | if (pixelFormat == PIX_FMT_NONE) {
508 | int depth = image.depth();
509 | int channels = image.nChannels();
510 | if ((depth == IPL_DEPTH_8U || depth == IPL_DEPTH_8S) && channels == 3) {
511 | pixelFormat = PIX_FMT_BGR24;
512 | } else if ((depth == IPL_DEPTH_8U || depth == IPL_DEPTH_8S) && channels == 1) {
513 | pixelFormat = PIX_FMT_GRAY8;
514 | } else if ((depth == IPL_DEPTH_16U || depth == IPL_DEPTH_16S) && channels == 1) {
515 | pixelFormat = AV_HAVE_BIGENDIAN() ? PIX_FMT_GRAY16BE : PIX_FMT_GRAY16LE;
516 | } else if ((depth == IPL_DEPTH_8U || depth == IPL_DEPTH_8S) && channels == 4) {
517 | pixelFormat = PIX_FMT_RGBA;
518 | } else if ((depth == IPL_DEPTH_8U || depth == IPL_DEPTH_8S) && channels == 2) {
519 | pixelFormat = PIX_FMT_NV21; // Android's camera capture format
520 | step = width;
521 | } else {
522 | throw new Exception("Could not guess pixel format of image: depth=" + depth + ", channels=" + channels);
523 | }
524 | }
525 |
526 | if (video_c.pix_fmt() != pixelFormat || video_c.width() != width || video_c.height() != height) {
527 | /* convert to the codec pixel format if needed */
528 | img_convert_ctx = sws_getCachedContext(img_convert_ctx, width, height, pixelFormat,
529 | video_c.width(), video_c.height(), video_c.pix_fmt(), SWS_BILINEAR, null, null, null);
530 | if (img_convert_ctx == null) {
531 | throw new Exception("Cannot initialize the conversion context");
532 | }
533 | avpicture_fill(tmp_picture, data, pixelFormat, width, height);
534 | avpicture_fill(picture, picture_buf, video_c.pix_fmt(), video_c.width(), video_c.height());
535 | tmp_picture.linesize(0, step);
536 | sws_scale(img_convert_ctx, new PointerPointer(tmp_picture), tmp_picture.linesize(),
537 | 0, video_c.height(), new PointerPointer(picture), picture.linesize());
538 | } else {
539 | avpicture_fill(picture, data, pixelFormat, width, height);
540 | picture.linesize(0, step);
541 | }
542 | }
543 |
544 | if ((oformat.flags() & AVFMT_RAWPICTURE) != 0) {
545 | /* raw video case. The API may change slightly in the future for that? */
546 | av_init_packet(pkt);
547 | pkt.flags(pkt.flags() | AV_PKT_FLAG_KEY);
548 | pkt.stream_index(video_st.index());
549 | pkt.data(new BytePointer(picture));
550 | pkt.size(Loader.sizeof(AVPicture.class));
551 |
552 | if (audio_st != null) {
553 | ret = av_interleaved_write_frame(oc, pkt);
554 | } else {
555 | ret = av_write_frame(oc, pkt);
556 | }
557 | } else {
558 | /* encode the image */
559 | av_init_packet(pkt);
560 | pkt.data(video_outbuf);
561 | pkt.size(video_outbuf_size);
562 | ret = avcodec_encode_video2(video_c, pkt, picture, got_packet);
563 | /* if zero size, it means the image was buffered */
564 | if (got_packet[0] != 0) {
565 | if (pkt.pts() != AV_NOPTS_VALUE) {
566 | pkt.pts(av_rescale_q(pkt.pts(), video_c.time_base(), video_st.time_base()));
567 | }
568 | if (pkt.dts() != AV_NOPTS_VALUE) {
569 | pkt.dts(av_rescale_q(pkt.dts(), video_c.time_base(), video_st.time_base()));
570 | }
571 | pkt.stream_index(video_st.index());
572 |
573 | /* write the compressed frame in the media file */
574 | if (audio_st != null) {
575 | ret = av_interleaved_write_frame(oc, pkt);
576 | } else {
577 | ret = av_write_frame(oc, pkt);
578 | }
579 | }
580 | picture.pts(picture.pts() + 1); // magic required by libx264
581 | }
582 | if (ret != 0) {
583 | throw new Exception("Error while writing video frame");
584 | }
585 | }
586 |
587 | @Override public void record(Buffer samples) throws Exception {
588 | if (audio_st == null) {
589 | throw new Exception("No audio output stream (Is audioChannels > 0 and has start() been called?)");
590 | }
591 | int ret;
592 |
593 | while (samples.hasRemaining()) {
594 | if (samples instanceof ByteBuffer) {
595 | ByteBuffer b = (ByteBuffer)samples;
596 | while (samplesBuffer.hasRemaining() && b.hasRemaining()) {
597 | samplesBuffer.put(b.get());
598 | }
599 | } else if (samples instanceof ShortBuffer) {
600 | ShortBuffer b = (ShortBuffer)samples;
601 | while (samplesBuffer.hasRemaining() && b.hasRemaining()) {
602 | samplesBuffer.putShort(b.get());
603 | }
604 | } else if (samples instanceof IntBuffer) {
605 | IntBuffer b = (IntBuffer)samples;
606 | while (samplesBuffer.hasRemaining() && b.hasRemaining()) {
607 | samplesBuffer.putInt(b.get());
608 | }
609 | } else if (samples instanceof FloatBuffer) {
610 | FloatBuffer b = (FloatBuffer)samples;
611 | while (samplesBuffer.hasRemaining() && b.hasRemaining()) {
612 | samplesBuffer.putFloat(b.get());
613 | }
614 | } else if (samples instanceof DoubleBuffer) {
615 | DoubleBuffer b = (DoubleBuffer)samples;
616 | while (samplesBuffer.hasRemaining() && b.hasRemaining()) {
617 | samplesBuffer.putDouble(b.get());
618 | }
619 | } else {
620 | assert false;
621 | }
622 | if (!samplesBuffer.hasRemaining()) {
623 | samplesBuffer.clear();
624 |
625 | frame.nb_samples(audio_input_frame_size);
626 | avcodec_fill_audio_frame(frame, audioChannels, sampleFormat, samplesPointer, samplesPointer.capacity(), 0);
627 |
628 | av_init_packet(pkt);
629 | pkt.data(audio_outbuf);
630 | pkt.size(audio_outbuf_size);
631 | ret = avcodec_encode_audio2(audio_c, pkt, frame, got_packet);
632 | if (got_packet[0] != 0) {
633 | if (pkt.pts() != AV_NOPTS_VALUE) {
634 | pkt.pts(av_rescale_q(pkt.pts(), audio_c.time_base(), audio_c.time_base()));
635 | }
636 | if (pkt.dts() != AV_NOPTS_VALUE) {
637 | pkt.dts(av_rescale_q(pkt.dts(), audio_c.time_base(), audio_c.time_base()));
638 | }
639 | pkt.flags(pkt.flags() | AV_PKT_FLAG_KEY);
640 | pkt.stream_index(audio_st.index());
641 |
642 | /* write the compressed frame in the media file */
643 | if (video_st != null) {
644 | ret = av_interleaved_write_frame(oc, pkt);
645 | } else {
646 | ret = av_write_frame(oc, pkt);
647 | }
648 | }
649 | if (ret != 0) {
650 | throw new Exception("Error while writing audio frame");
651 | }
652 | }
653 | }
654 | }
655 | }
656 |
--------------------------------------------------------------------------------
/src/com/ccs/converter/Frame.java:
--------------------------------------------------------------------------------
1 | package com.googlecode.javacv;
2 |
3 | import com.googlecode.javacv.cpp.opencv_core.IplImage;
4 | import java.nio.ByteBuffer;
5 |
6 | /**
7 | *
8 | * @author Samuel Audet
9 | */
10 | public class Frame {
11 | public IplImage image; // for video frame
12 | public ByteBuffer samples; // for audio frame
13 | }
14 |
--------------------------------------------------------------------------------
/src/com/ccs/converter/FrameGrabber.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009,2010,2011,2012 Samuel Audet
3 | *
4 | * This file is part of JavaCV.
5 | *
6 | * JavaCV is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 2 of the License, or
9 | * (at your option) any later version (subject to the "Classpath" exception
10 | * as provided in the LICENSE.txt file that accompanied this code).
11 | *
12 | * JavaCV is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with JavaCV. If not, see .
19 | */
20 |
21 | package com.googlecode.javacv;
22 |
23 | import java.beans.PropertyEditorSupport;
24 | import java.io.File;
25 | import java.lang.reflect.InvocationTargetException;
26 | import java.nio.ByteBuffer;
27 | import java.util.Arrays;
28 | import java.util.LinkedList;
29 | import java.util.List;
30 | import java.util.concurrent.Callable;
31 | import java.util.concurrent.ExecutionException;
32 | import java.util.concurrent.ExecutorService;
33 | import java.util.concurrent.Executors;
34 | import java.util.concurrent.Future;
35 |
36 | import static com.googlecode.javacv.cpp.opencv_core.*;
37 |
38 | /**
39 | *
40 | * @author Samuel Audet
41 | */
42 | public abstract class FrameGrabber {
43 |
44 | public static final List list = new LinkedList(Arrays.asList(new String[] {
45 | "DC1394", "FlyCapture", "OpenKinect", "PS3Eye", "VideoInput", "OpenCV", "FFmpeg" }));
46 | public static void init() {
47 | for (String name : list) {
48 | try {
49 | Class extends FrameGrabber> c = get(name);
50 | c.getMethod("tryLoad").invoke(null);
51 | } catch (Throwable t) { }
52 | }
53 | }
54 | public static Class extends FrameGrabber> getDefault() {
55 | // select first frame grabber that can load and that may have some cameras..
56 | for (String name : list) {
57 | try {
58 | Class extends FrameGrabber> c = get(name);
59 | c.getMethod("tryLoad").invoke(null);
60 | boolean mayContainCameras = false;
61 | try {
62 | String[] s = (String[])c.getMethod("getDeviceDescriptions").invoke(null);
63 | if (s.length > 0) {
64 | mayContainCameras = true;
65 | }
66 | } catch (Throwable t) {
67 | if (t.getCause() instanceof UnsupportedOperationException) {
68 | mayContainCameras = true;
69 | }
70 | }
71 | if (mayContainCameras) {
72 | return c;
73 | }
74 | } catch (Throwable t) { }
75 | }
76 | return null;
77 | }
78 | public static Class extends FrameGrabber> get(String className) throws Exception {
79 | className = FrameGrabber.class.getPackage().getName() + "." + className;
80 | try {
81 | return Class.forName(className).asSubclass(FrameGrabber.class);
82 | } catch (ClassNotFoundException e) {
83 | String className2 = className + "FrameGrabber";
84 | try {
85 | return Class.forName(className2).asSubclass(FrameGrabber.class);
86 | } catch (ClassNotFoundException ex) {
87 | throw new Exception("Could not get FrameGrabber class for " + className + " or " + className2, e);
88 | }
89 | }
90 | }
91 |
92 | public static FrameGrabber create(Class extends FrameGrabber> c, Class p, Object o) throws Exception {
93 | Throwable cause = null;
94 | try {
95 | return c.getConstructor(p).newInstance(o);
96 | } catch (InstantiationException ex) {
97 | cause = ex;
98 | } catch (IllegalAccessException ex) {
99 | cause = ex;
100 | } catch (IllegalArgumentException ex) {
101 | cause = ex;
102 | } catch (NoSuchMethodException ex) {
103 | cause = ex;
104 | } catch (InvocationTargetException ex) {
105 | cause = ex.getCause();
106 | }
107 | throw new Exception("Could not create new " + c.getSimpleName() + "(" + o + ")", cause);
108 | }
109 |
110 | public static FrameGrabber createDefault(File deviceFile) throws Exception {
111 | return create(getDefault(), File.class, deviceFile);
112 | }
113 | public static FrameGrabber createDefault(String devicePath) throws Exception {
114 | return create(getDefault(), String.class, devicePath);
115 | }
116 | public static FrameGrabber createDefault(int deviceNumber) throws Exception {
117 | try {
118 | return create(getDefault(), int.class, deviceNumber);
119 | } catch (Exception ex) {
120 | return create(getDefault(), Integer.class, deviceNumber);
121 | }
122 | }
123 |
124 | public static FrameGrabber create(String className, File deviceFile) throws Exception {
125 | return create(get(className), File.class, deviceFile);
126 | }
127 | public static FrameGrabber create(String className, String devicePath) throws Exception {
128 | return create(get(className), String.class, devicePath);
129 | }
130 | public static FrameGrabber create(String className, int deviceNumber) throws Exception {
131 | try {
132 | return create(get(className), int.class, deviceNumber);
133 | } catch (Exception ex) {
134 | return create(get(className), Integer.class, deviceNumber);
135 | }
136 | }
137 |
138 | public static class PropertyEditor extends PropertyEditorSupport {
139 | @Override public String getAsText() {
140 | Class c = (Class)getValue();
141 | return c == null ? "null" : c.getSimpleName().split("FrameGrabber")[0];
142 | }
143 | @Override public void setAsText(String s) {
144 | if (s == null) {
145 | setValue(null);
146 | }
147 | try {
148 | setValue(get(s));
149 | } catch (Exception ex) {
150 | throw new IllegalArgumentException(ex);
151 | }
152 | }
153 | @Override public String[] getTags() {
154 | return list.toArray(new String[list.size()]);
155 | }
156 | }
157 |
158 |
159 | public static enum ImageMode {
160 | COLOR, GRAY, RAW
161 | }
162 |
163 | public static final long
164 | SENSOR_PATTERN_RGGB = 0,
165 | SENSOR_PATTERN_GBRG = (1L << 32),
166 | SENSOR_PATTERN_GRBG = 1,
167 | SENSOR_PATTERN_BGGR = (1L << 32) | 1;
168 |
169 | protected String format = null;
170 | protected int imageWidth = 0, imageHeight = 0, audioChannels = 0;
171 | protected ImageMode imageMode = ImageMode.COLOR;
172 | protected long sensorPattern = -1L;
173 | protected int pixelFormat = -1;
174 | protected double frameRate = 0;
175 | protected int sampleFormat, sampleRate;
176 | protected boolean triggerMode = false;
177 | protected int bpp = 0;
178 | protected int timeout = 10000;
179 | protected int numBuffers = 4;
180 | protected double gamma = 0.0;
181 | protected boolean deinterlace = false;
182 | protected int frameNumber = 0;
183 | protected long timestamp = 0;
184 |
185 | public String getFormat() {
186 | return format;
187 | }
188 | public void setFormat(String format) {
189 | this.format = format;
190 | }
191 |
192 | public int getImageWidth() {
193 | return imageWidth;
194 | }
195 | public void setImageWidth(int imageWidth) {
196 | this.imageWidth = imageWidth;
197 | }
198 |
199 | public int getImageHeight() {
200 | return imageHeight;
201 | }
202 | public void setImageHeight(int imageHeight) {
203 | this.imageHeight = imageHeight;
204 | }
205 |
206 | public int getAudioChannels() {
207 | return audioChannels;
208 | }
209 | public void setAudioChannels(int audioChannels) {
210 | this.audioChannels = audioChannels;
211 | }
212 |
213 | public ImageMode getImageMode() {
214 | return imageMode;
215 | }
216 | public void setImageMode(ImageMode imageMode) {
217 | this.imageMode = imageMode;
218 | }
219 |
220 | public long getSensorPattern() {
221 | return sensorPattern;
222 | }
223 | public void setSensorPattern(long sensorPattern) {
224 | this.sensorPattern = sensorPattern;
225 | }
226 |
227 | public int getPixelFormat() {
228 | return pixelFormat;
229 | }
230 | public void setPixelFormat(int pixelFormat) {
231 | this.pixelFormat = pixelFormat;
232 | }
233 |
234 | public double getFrameRate() {
235 | return frameRate;
236 | }
237 | public void setFrameRate(double frameRate) {
238 | this.frameRate = frameRate;
239 | }
240 |
241 | public int getSampleFormat() {
242 | return sampleFormat;
243 | }
244 | public void setSampleFormat(int sampleFormat) {
245 | this.sampleFormat = sampleFormat;
246 | }
247 |
248 | public int getSampleRate() {
249 | return sampleRate;
250 | }
251 | public void setSampleRate(int sampleRate) {
252 | this.sampleRate = sampleRate;
253 | }
254 |
255 | public boolean isTriggerMode() {
256 | return triggerMode;
257 | }
258 | public void setTriggerMode(boolean triggerMode) {
259 | this.triggerMode = triggerMode;
260 | }
261 |
262 | public int getBitsPerPixel() {
263 | return bpp;
264 | }
265 | public void setBitsPerPixel(int bitsPerPixel) {
266 | this.bpp = bitsPerPixel;
267 | }
268 |
269 | public int getTimeout() {
270 | return timeout;
271 | }
272 | public void setTimeout(int timeout) {
273 | this.timeout = timeout;
274 | }
275 |
276 | public int getNumBuffers() {
277 | return numBuffers;
278 | }
279 | public void setNumBuffers(int numBuffers) {
280 | this.numBuffers = numBuffers;
281 | }
282 |
283 | public double getGamma() {
284 | return gamma;
285 | }
286 | public void setGamma(double gamma) {
287 | this.gamma = gamma;
288 | }
289 |
290 | public boolean isDeinterlace() {
291 | return deinterlace;
292 | }
293 | public void setDeinterlace(boolean deinterlace) {
294 | this.deinterlace = deinterlace;
295 | }
296 |
297 | public int getFrameNumber() {
298 | return frameNumber;
299 | }
300 | public void setFrameNumber(int frameNumber) throws Exception {
301 | this.frameNumber = frameNumber;
302 | }
303 |
304 | public long getTimestamp() {
305 | return timestamp;
306 | }
307 | public void setTimestamp(long timestamp) throws Exception {
308 | this.timestamp = timestamp;
309 | }
310 |
311 | public int getLengthInFrames() {
312 | return 0;
313 | }
314 | public long getLengthInTime() {
315 | return 0;
316 | }
317 |
318 | public static class Exception extends java.lang.Exception {
319 | public Exception(String message) { super(message); }
320 | public Exception(String message, Throwable cause) { super(message, cause); }
321 | }
322 |
323 | public abstract void start() throws Exception;
324 | public abstract void stop() throws Exception;
325 | public abstract void trigger() throws Exception;
326 | public abstract IplImage grab() throws Exception;
327 | public Frame grabFrame() throws Exception {
328 | throw new UnsupportedOperationException("This FrameGrabber does not support audio.");
329 | }
330 | public abstract void release() throws Exception;
331 |
332 | public void restart() throws Exception {
333 | stop();
334 | start();
335 | }
336 | public void flush() throws Exception {
337 | for (int i = 0; i < numBuffers+1; i++) {
338 | grab();
339 | }
340 | }
341 |
342 | private ExecutorService executor = Executors.newSingleThreadExecutor();
343 | private Future future = null;
344 | private IplImage delayedImage = null;
345 | private long delayedTime = 0;
346 | public void delayedGrab(final long delayTime) {
347 | delayedImage = null;
348 | delayedTime = 0;
349 | final long start = System.nanoTime()/1000;
350 | if (future != null && !future.isDone()) {
351 | return;
352 | }
353 | future = executor.submit(new Callable() { public Void call() throws Exception {
354 | do {
355 | delayedImage = grab();
356 | delayedTime = System.nanoTime()/1000 - start;
357 | } while (delayedTime < delayTime);
358 | return null;
359 | }});
360 | }
361 | public long getDelayedTime() throws InterruptedException, ExecutionException {
362 | if (future == null) {
363 | return 0;
364 | }
365 | future.get();
366 | return delayedTime;
367 | }
368 | public IplImage getDelayedImage() throws InterruptedException, ExecutionException {
369 | if (future == null) {
370 | return null;
371 | }
372 | future.get();
373 | return delayedImage;
374 | }
375 |
376 | public static class Array {
377 | // declared protected to force users to use createArray(), which
378 | // can be overridden without changing the calling code...
379 | protected Array(FrameGrabber[] frameGrabbers) {
380 | setFrameGrabbers(frameGrabbers);
381 | }
382 |
383 | private IplImage[] grabbedImages = null;
384 | private long[] latencies = null;
385 | private long[] bestLatencies = null;
386 | private long lastNewestTimestamp = 0;
387 | private long bestInterval = Long.MAX_VALUE;
388 |
389 | protected FrameGrabber[] frameGrabbers = null;
390 | public FrameGrabber[] getFrameGrabbers() {
391 | return frameGrabbers;
392 | }
393 | public void setFrameGrabbers(FrameGrabber[] frameGrabbers) {
394 | this.frameGrabbers = frameGrabbers;
395 | grabbedImages = new IplImage[frameGrabbers.length];
396 | latencies = new long[frameGrabbers.length];
397 | bestLatencies = null;
398 | lastNewestTimestamp = 0;
399 | }
400 | public int size() {
401 | return frameGrabbers.length;
402 | }
403 |
404 | public void start() throws Exception {
405 | for (FrameGrabber f : frameGrabbers) {
406 | f.start();
407 | }
408 | }
409 | public void stop() throws Exception {
410 | for (FrameGrabber f : frameGrabbers) {
411 | f.stop();
412 | }
413 | }
414 | // should be overriden to implement a broadcast trigger...
415 | public void trigger() throws Exception {
416 | for (FrameGrabber f : frameGrabbers) {
417 | if (f.isTriggerMode()) {
418 | f.trigger();
419 | }
420 | }
421 | }
422 | // should be overriden to implement a broadcast grab...
423 | public IplImage[] grab() throws Exception {
424 | if (frameGrabbers.length == 1) {
425 | grabbedImages[0] = frameGrabbers[0].grab();
426 | return grabbedImages;
427 | }
428 |
429 | // assume we sometimes get perfectly synchronized images,
430 | // so save the best latencies we find as the perfectly
431 | // synchronized case, so we know what to aim for in
432 | // cases of missing/dropped frames ...
433 | long newestTimestamp = 0;
434 | for (int i = 0; i < frameGrabbers.length; i++) {
435 | grabbedImages[i] = frameGrabbers[i].grab();
436 | if (grabbedImages[i] != null) {
437 | newestTimestamp = Math.max(newestTimestamp, frameGrabbers[i].getTimestamp());
438 | }
439 | }
440 | for (int i = 0; i < frameGrabbers.length; i++) {
441 | if (grabbedImages[i] != null) {
442 | latencies[i] = newestTimestamp-frameGrabbers[i].getTimestamp();
443 | }
444 | }
445 | if (bestLatencies == null) {
446 | bestLatencies = Arrays.copyOf(latencies, latencies.length);
447 | } else {
448 | int sum1 = 0, sum2 = 0;
449 | for (int i = 0; i < frameGrabbers.length; i++) {
450 | sum1 += latencies[i];
451 | sum2 += bestLatencies[i];
452 | }
453 | if (sum1 < sum2) {
454 | bestLatencies = Arrays.copyOf(latencies, latencies.length);
455 | }
456 | }
457 |
458 | // we cannot have latencies higher than the time between frames..
459 | // or something too close to it anyway... 90% is good?
460 | bestInterval = Math.min(bestInterval, newestTimestamp-lastNewestTimestamp);
461 | for (int i = 0; i < bestLatencies.length; i++) {
462 | bestLatencies[i] = Math.min(bestLatencies[i], bestInterval*9/10);
463 | }
464 |
465 | // try to synchronize by attempting to land within 10% of
466 | // the bestLatencies looking up to 2 frames ahead ...
467 | for (int j = 0; j < 2; j++) {
468 | for (int i = 0; i < frameGrabbers.length; i++) {
469 | if (frameGrabbers[i].isTriggerMode() || grabbedImages[i] == null) {
470 | continue;
471 | }
472 | int latency = (int)(newestTimestamp - frameGrabbers[i].getTimestamp());
473 | while (latency-bestLatencies[i] > 0.1*bestLatencies[i]) {
474 | grabbedImages[i] = frameGrabbers[i].grab();
475 | if (grabbedImages[i] == null) {
476 | break;
477 | }
478 | latency = (int)(newestTimestamp - frameGrabbers[i].getTimestamp());
479 | if (latency < 0) {
480 | // woops, a camera seems to have dropped a frame somewhere...
481 | // bump up the newestTimestamp
482 | newestTimestamp = frameGrabbers[i].getTimestamp();
483 | break;
484 | }
485 | }
486 | }
487 | }
488 |
489 | //for (int i = 0; i < frameGrabbers.length; i++) {
490 | // long latency = newestTimestamp - grabbedImages[i].getTimestamp();
491 | // System.out.print(bestLatencies[i] + " " + latency + " ");
492 | //}
493 | //System.out.println(" " + bestInterval);
494 |
495 | lastNewestTimestamp = newestTimestamp;
496 |
497 | return grabbedImages;
498 | }
499 | public void release() throws Exception {
500 | for (FrameGrabber f : frameGrabbers) {
501 | f.release();
502 | }
503 | }
504 | }
505 |
506 | public Array createArray(FrameGrabber[] frameGrabbers) {
507 | return new Array(frameGrabbers);
508 | }
509 | }
510 |
--------------------------------------------------------------------------------
/src/com/ccs/converter/FrameRecorder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009,2010,2011,2012 Samuel Audet
3 | *
4 | * This file is part of JavaCV.
5 | *
6 | * JavaCV is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 2 of the License, or
9 | * (at your option) any later version (subject to the "Classpath" exception
10 | * as provided in the LICENSE.txt file that accompanied this code).
11 | *
12 | * JavaCV is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with JavaCV. If not, see .
19 | */
20 |
21 | package com.googlecode.javacv;
22 |
23 | import java.io.File;
24 | import java.lang.reflect.InvocationTargetException;
25 | import java.nio.Buffer;
26 | import java.util.Arrays;
27 | import java.util.LinkedList;
28 | import java.util.List;
29 |
30 | import static com.googlecode.javacv.cpp.opencv_core.*;
31 |
32 | /**
33 | *
34 | * @author Samuel Audet
35 | */
36 | public abstract class FrameRecorder {
37 |
38 | public static final List list = new LinkedList(Arrays.asList(new String[] { "FFmpeg", "OpenCV" }));
39 | public static void init() {
40 | for (String name : list) {
41 | try {
42 | Class extends FrameRecorder> c = get(name);
43 | c.getMethod("tryLoad").invoke(null);
44 | } catch (Throwable t) { }
45 | }
46 | }
47 | public static Class extends FrameRecorder> getDefault() {
48 | // select first frame recorder that can load..
49 | for (String name : list) {
50 | try {
51 | Class extends FrameRecorder> c = get(name);
52 | c.getMethod("tryLoad").invoke(null);
53 | return c;
54 | } catch (Throwable t) { }
55 | }
56 | return null;
57 | }
58 | public static Class extends FrameRecorder> get(String className) throws Exception {
59 | className = FrameRecorder.class.getPackage().getName() + "." + className;
60 | try {
61 | return Class.forName(className).asSubclass(FrameRecorder.class);
62 | } catch (ClassNotFoundException e) {
63 | String className2 = className + "FrameRecorder";
64 | try {
65 | return Class.forName(className2).asSubclass(FrameRecorder.class);
66 | } catch (ClassNotFoundException ex) {
67 | throw new Exception("Could not get FrameRecorder class for " + className + " or " + className2, e);
68 | }
69 | }
70 | }
71 |
72 | public static FrameRecorder create(Class extends FrameRecorder> c, Class p, Object o, int w, int h) throws Exception {
73 | Throwable cause = null;
74 | try {
75 | return c.getConstructor(p, int.class, int.class).newInstance(o, w, h);
76 | } catch (InstantiationException ex) {
77 | cause = ex;
78 | } catch (IllegalAccessException ex) {
79 | cause = ex;
80 | } catch (IllegalArgumentException ex) {
81 | cause = ex;
82 | } catch (NoSuchMethodException ex) {
83 | cause = ex;
84 | } catch (InvocationTargetException ex) {
85 | cause = ex.getCause();
86 | }
87 | throw new Exception("Could not create new " + c.getSimpleName() + "(" + o + ", " + w + ", " + h + ")", cause);
88 | }
89 |
90 | public static FrameRecorder createDefault(File file, int width, int height) throws Exception {
91 | return create(getDefault(), File.class, file, width, height);
92 | }
93 | public static FrameRecorder createDefault(String filename, int width, int height) throws Exception {
94 | return create(getDefault(), String.class, filename, width, height);
95 | }
96 |
97 | public static FrameRecorder create(String className, File file, int width, int height) throws Exception {
98 | return create(get(className), File.class, file, width, height);
99 | }
100 | public static FrameRecorder create(String className, String filename, int width, int height) throws Exception {
101 | return create(get(className), String.class, filename, width, height);
102 | }
103 |
104 | protected String format;
105 | protected int imageWidth, imageHeight, audioChannels;
106 | protected int pixelFormat, videoCodec, videoBitrate;
107 | protected double frameRate;
108 | protected int sampleFormat, audioCodec, audioBitrate, sampleRate;
109 |
110 | public String getFormat() {
111 | return format;
112 | }
113 | public void setFormat(String format) {
114 | this.format = format;
115 | }
116 |
117 | public int getImageWidth() {
118 | return imageWidth;
119 | }
120 | public void setImageWidth(int imageWidth) {
121 | this.imageWidth = imageWidth;
122 | }
123 |
124 | public int getImageHeight() {
125 | return imageHeight;
126 | }
127 | public void setImageHeight(int imageHeight) {
128 | this.imageHeight = imageHeight;
129 | }
130 |
131 | public int getAudioChannels() {
132 | return audioChannels;
133 | }
134 | public void setAudioChannels(int audioChannels) {
135 | this.audioChannels = audioChannels;
136 | }
137 |
138 | public int getPixelFormat() {
139 | return pixelFormat;
140 | }
141 | public void setPixelFormat(int pixelFormat) {
142 | this.pixelFormat = pixelFormat;
143 | }
144 |
145 | public int getVideoCodec() {
146 | return videoCodec;
147 | }
148 | public void setVideoCodec(int videoCodec) {
149 | this.videoCodec = videoCodec;
150 | }
151 |
152 | public int getVideoBitrate() {
153 | return videoBitrate;
154 | }
155 | public void setVideoBitrate(int videoBitrate) {
156 | this.videoBitrate = videoBitrate;
157 | }
158 |
159 | public double getFrameRate() {
160 | return frameRate;
161 | }
162 | public void setFrameRate(double frameRate) {
163 | this.frameRate = frameRate;
164 | }
165 |
166 | public int getSampleFormat() {
167 | return sampleFormat;
168 | }
169 | public void setSampleFormat(int sampleFormat) {
170 | this.sampleFormat = sampleFormat;
171 | }
172 |
173 | public int getAudioCodec() {
174 | return audioCodec;
175 | }
176 | public void setAudioCodec(int audioCodec) {
177 | this.audioCodec = audioCodec;
178 | }
179 |
180 | public int getAudioBitrate() {
181 | return audioBitrate;
182 | }
183 | public void setAudioBitrate(int audioBitrate) {
184 | this.audioBitrate = audioBitrate;
185 | }
186 |
187 | public int getSampleRate() {
188 | return sampleRate;
189 | }
190 | public void setSampleRate(int sampleRate) {
191 | this.sampleRate = sampleRate;
192 | }
193 |
194 | public static class Exception extends java.lang.Exception {
195 | public Exception(String message) { super(message); }
196 | public Exception(String message, Throwable cause) { super(message, cause); }
197 | }
198 |
199 | public abstract void start() throws Exception;
200 | public abstract void stop() throws Exception;
201 | public abstract void record(IplImage image) throws Exception;
202 | public void record(Buffer samples) throws Exception {
203 | throw new UnsupportedOperationException("This FrameRecorder does not support audio.");
204 | }
205 | public void record(Frame frame) throws Exception {
206 | if (frame == null || (frame.image == null && frame.samples == null)) {
207 | record((IplImage)null);
208 | } else {
209 | if (frame.image != null) {
210 | record(frame.image);
211 | }
212 | if (frame.samples != null) {
213 | record(frame.samples);
214 | }
215 | }
216 | }
217 | public abstract void release() throws Exception;
218 | }
219 |
--------------------------------------------------------------------------------
/src/com/ccs/converter/avdevice.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010,2011,2012 Samuel Audet
3 | *
4 | * This file is part of JavaCV.
5 | *
6 | * JavaCV is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 2 of the License, or
9 | * (at your option) any later version (subject to the "Classpath" exception
10 | * as provided in the LICENSE.txt file that accompanied this code).
11 | *
12 | * JavaCV is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with JavaCV. If not, see .
19 | *
20 | *
21 | * This file was derived from avdevice.h include file from
22 | * FFmpeg 0.11.1, which are covered by the following copyright notice:
23 | *
24 | * This file is part of FFmpeg.
25 | *
26 | * FFmpeg is free software; you can redistribute it and/or
27 | * modify it under the terms of the GNU Lesser General Public
28 | * License as published by the Free Software Foundation; either
29 | * version 2.1 of the License, or (at your option) any later version.
30 | *
31 | * FFmpeg is distributed in the hope that it will be useful,
32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
34 | * Lesser General Public License for more details.
35 | *
36 | * You should have received a copy of the GNU Lesser General Public
37 | * License along with FFmpeg; if not, write to the Free Software
38 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
39 | */
40 |
41 | package com.googlecode.javacv.cpp;
42 |
43 | import com.googlecode.javacpp.annotation.Cast;
44 | import com.googlecode.javacpp.annotation.Platform;
45 | import com.googlecode.javacpp.annotation.Properties;
46 |
47 | import static com.googlecode.javacpp.Loader.*;
48 | import static com.googlecode.javacv.cpp.avutil.*;
49 |
50 | /**
51 | *
52 | * @author Samuel Audet
53 | */
54 | @Properties({
55 | @Platform(define="__STDC_CONSTANT_MACROS", cinclude="",
56 | includepath=genericIncludepath, linkpath=genericLinkpath, link={"avdevice@.54", "avfilter@.2",
57 | "swscale@.2", "swresample@.0", "postproc@.52", "avformat@.54", "avcodec@.54", "avutil@.51"}),
58 | @Platform(value="windows", includepath=windowsIncludepath, linkpath=windowsLinkpath,
59 | preloadpath=windowsPreloadpath, preload="avdevice-54"),
60 | @Platform(value="android", includepath=androidIncludepath, linkpath=androidLinkpath) })
61 | public class avdevice {
62 | static { load(avfilter.class); load(); }
63 |
64 | /**
65 | * @file
66 | * @ingroup lavd
67 | * Main libavdevice API header
68 | */
69 |
70 | /**
71 | * @defgroup lavd Special devices muxing/demuxing library
72 | * @{
73 | * Libavdevice is a complementary library to @ref libavf "libavformat". It
74 | * provides various "special" platform-specific muxers and demuxers, e.g. for
75 | * grabbing devices, audio capture and playback etc. As a consequence, the
76 | * (de)muxers in libavdevice are of the AVFMT_NOFILE type (they use their own
77 | * I/O functions). The filename passed to avformat_open_input() often does not
78 | * refer to an actually existing file, but has some special device-specific
79 | * meaning - e.g. for the x11grab device it is the display name.
80 | *
81 | * To use libavdevice, simply call avdevice_register_all() to register all
82 | * compiled muxers and demuxers. They all use standard libavformat API.
83 | * @}
84 | */
85 |
86 | public static final int LIBAVDEVICE_VERSION_MAJOR = 54;
87 | public static final int LIBAVDEVICE_VERSION_MINOR = 0;
88 | public static final int LIBAVDEVICE_VERSION_MICRO = 100;
89 |
90 | public static final int LIBAVDEVICE_VERSION_INT = AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR,
91 | LIBAVDEVICE_VERSION_MINOR,
92 | LIBAVDEVICE_VERSION_MICRO);
93 | public static final String LIBAVDEVICE_VERSION = AV_VERSION(LIBAVDEVICE_VERSION_MAJOR,
94 | LIBAVDEVICE_VERSION_MINOR,
95 | LIBAVDEVICE_VERSION_MICRO);
96 | public static final int LIBAVDEVICE_BUILD = LIBAVDEVICE_VERSION_INT;
97 |
98 | /**
99 | * Return the LIBAVDEVICE_VERSION_INT constant.
100 | */
101 | public static native @Cast("unsigned") int avdevice_version();
102 |
103 | /**
104 | * Return the libavdevice build-time configuration.
105 | */
106 | public static native String avdevice_configuration();
107 |
108 | /**
109 | * Return the libavdevice license.
110 | */
111 | public static native String avdevice_license();
112 |
113 | /**
114 | * Initialize libavdevice and register all the input and output devices.
115 | * @warning This function is not thread safe.
116 | */
117 | public static native void avdevice_register_all();
118 | }
119 |
--------------------------------------------------------------------------------
/src/com/ccs/pics2flix/FFmpegFrameRecorder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009,2010,2011,2012 Samuel Audet
3 | *
4 | * This file is part of JavaCV.
5 | *
6 | * JavaCV is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 2 of the License, or
9 | * (at your option) any later version (subject to the "Classpath" exception
10 | * as provided in the LICENSE.txt file that accompanied this code).
11 | *
12 | * JavaCV is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with JavaCV. If not, see .
19 | *
20 | *
21 | * Based on the output-example.c file included in FFmpeg 0.6.5
22 | * as well as on the decoding_encoding.c file included in FFmpeg 0.11.1,
23 | * which are covered by the following copyright notice:
24 | *
25 | * Libavformat API example: Output a media file in any supported
26 | * libavformat format. The default codecs are used.
27 | *
28 | * Copyright (c) 2001,2003 Fabrice Bellard
29 | *
30 | * Permission is hereby granted, free of charge, to any person obtaining a copy
31 | * of this software and associated documentation files (the "Software"), to deal
32 | * in the Software without restriction, including without limitation the rights
33 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34 | * copies of the Software, and to permit persons to whom the Software is
35 | * furnished to do so, subject to the following conditions:
36 | *
37 | * The above copyright notice and this permission notice shall be included in
38 | * all copies or substantial portions of the Software.
39 | *
40 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
43 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
46 | * THE SOFTWARE.
47 | */
48 |
49 | package com.googlecode.javacv;
50 |
51 | import com.googlecode.javacpp.BytePointer;
52 | import com.googlecode.javacpp.DoublePointer;
53 | import com.googlecode.javacpp.FloatPointer;
54 | import com.googlecode.javacpp.IntPointer;
55 | import com.googlecode.javacpp.Loader;
56 | import com.googlecode.javacpp.Pointer;
57 | import com.googlecode.javacpp.PointerPointer;
58 | import com.googlecode.javacpp.ShortPointer;
59 | import java.io.File;
60 | import java.nio.Buffer;
61 | import java.nio.ByteBuffer;
62 | import java.nio.DoubleBuffer;
63 | import java.nio.FloatBuffer;
64 | import java.nio.IntBuffer;
65 | import java.nio.ShortBuffer;
66 |
67 | import static com.googlecode.javacv.cpp.avcodec.*;
68 | import static com.googlecode.javacv.cpp.avformat.*;
69 | import static com.googlecode.javacv.cpp.avutil.*;
70 | import static com.googlecode.javacv.cpp.opencv_core.*;
71 | import static com.googlecode.javacv.cpp.swresample.*;
72 | import static com.googlecode.javacv.cpp.swscale.*;
73 |
74 | /**
75 | *
76 | * @author Samuel Audet
77 | */
78 | public class FFmpegFrameRecorder extends FrameRecorder {
79 |
80 | private static Exception loadingException = null;
81 | public static void tryLoad() throws Exception {
82 | if (loadingException != null) {
83 | throw loadingException;
84 | } else {
85 | try {
86 | Loader.load(com.googlecode.javacv.cpp.avutil.class);
87 | Loader.load(com.googlecode.javacv.cpp.avcodec.class);
88 | Loader.load(com.googlecode.javacv.cpp.avformat.class);
89 | Loader.load(com.googlecode.javacv.cpp.swscale.class);
90 | } catch (Throwable t) {
91 | if (t instanceof Exception) {
92 | throw loadingException = (Exception)t;
93 | } else {
94 | throw loadingException = new Exception("Failed to load " + FFmpegFrameRecorder.class, t);
95 | }
96 | }
97 | }
98 | }
99 |
100 | public FFmpegFrameRecorder(File file, int audioChannels) {
101 | this(file, 0, 0, audioChannels);
102 | }
103 | public FFmpegFrameRecorder(String filename, int audioChannels) {
104 | this(filename, 0, 0, audioChannels);
105 | }
106 | public FFmpegFrameRecorder(File file, int imageWidth, int imageHeight) {
107 | this(file, imageWidth, imageHeight, 0);
108 | }
109 | public FFmpegFrameRecorder(String filename, int imageWidth, int imageHeight) {
110 | this(filename, imageWidth, imageHeight, 0);
111 | }
112 | public FFmpegFrameRecorder(File file, int imageWidth, int imageHeight, int audioChannels) {
113 | this(file.getAbsolutePath(), imageWidth, imageHeight);
114 | }
115 | public FFmpegFrameRecorder(String filename, int imageWidth, int imageHeight, int audioChannels) {
116 | /* initialize libavcodec, and register all codecs and formats */
117 | av_register_all();
118 | avformat_network_init();
119 |
120 | this.filename = filename;
121 | this.imageWidth = imageWidth;
122 | this.imageHeight = imageHeight;
123 | this.audioChannels = audioChannels;
124 |
125 | this.pixelFormat = PIX_FMT_NONE;
126 | this.videoCodec = CODEC_ID_NONE;
127 | this.videoBitrate = 400000;
128 | this.frameRate = 30;
129 |
130 | this.sampleFormat = AV_SAMPLE_FMT_NONE;
131 | this.audioCodec = CODEC_ID_NONE;
132 | this.audioBitrate = 64000;
133 | this.sampleRate = 44100;
134 |
135 | this.interleaved = true;
136 |
137 | this.video_pkt = new AVPacket();
138 | this.audio_pkt = new AVPacket();
139 | }
140 | public void release() throws Exception {
141 | /* close each codec */
142 | if (video_c != null) {
143 | avcodec_close(video_c);
144 | video_c = null;
145 | }
146 | if (audio_c != null) {
147 | avcodec_close(audio_c);
148 | audio_c = null;
149 | }
150 | if (picture_buf != null) {
151 | av_free(picture_buf);
152 | picture_buf = null;
153 | }
154 | if (picture != null) {
155 | av_free(picture);
156 | picture = null;
157 | }
158 | if (tmp_picture != null) {
159 | av_free(tmp_picture);
160 | tmp_picture = null;
161 | }
162 | if (video_outbuf != null) {
163 | av_free(video_outbuf);
164 | video_outbuf = null;
165 | }
166 | if (frame != null) {
167 | av_free(frame);
168 | frame = null;
169 | }
170 | if (samples_out != null) {
171 | av_free(samples_out);
172 | samples_out = null;
173 | }
174 | if (audio_outbuf != null) {
175 | av_free(audio_outbuf);
176 | audio_outbuf = null;
177 | }
178 | video_st = null;
179 | audio_st = null;
180 |
181 | if (oc != null) {
182 | /* free the streams */
183 | int nb_streams = oc.nb_streams();
184 | for(int i = 0; i < nb_streams; i++) {
185 | av_free(oc.streams(i).codec());
186 | av_free(oc.streams(i));
187 | }
188 |
189 | /* free the stream */
190 | av_free(oc);
191 | oc = null;
192 | }
193 |
194 | if (img_convert_ctx != null) {
195 | sws_freeContext(img_convert_ctx);
196 | img_convert_ctx = null;
197 | }
198 |
199 | if (samples_convert_ctx != null) {
200 | swr_free(samples_convert_ctx);
201 | samples_convert_ctx = null;
202 | }
203 | }
204 | @Override protected void finalize() throws Throwable {
205 | super.finalize();
206 | release();
207 | }
208 |
209 | private String filename;
210 | private AVFrame picture, tmp_picture;
211 | private BytePointer picture_buf;
212 | private BytePointer video_outbuf;
213 | private int video_outbuf_size;
214 | private AVFrame frame;
215 | private Pointer samples_in;
216 | private BytePointer samples_out;
217 | private BytePointer audio_outbuf;
218 | private int audio_outbuf_size;
219 | private int audio_input_frame_size;
220 | private AVOutputFormat oformat;
221 | private AVFormatContext oc;
222 | private AVCodec video_codec, audio_codec;
223 | private AVCodecContext video_c, audio_c;
224 | private AVStream video_st, audio_st;
225 | private SwsContext img_convert_ctx;
226 | private SwrContext samples_convert_ctx;
227 | private AVPacket video_pkt, audio_pkt;
228 | private int[] got_video_packet, got_audio_packet;
229 |
230 | @Override public int getFrameNumber() {
231 | return picture == null ? super.getFrameNumber() : (int)picture.pts();
232 | }
233 | @Override public void setFrameNumber(int frameNumber) {
234 | if (picture == null) { super.setFrameNumber(frameNumber); } else { picture.pts(frameNumber); }
235 | }
236 |
237 | // best guess for timestamp in microseconds...
238 | @Override public long getTimestamp() {
239 | return Math.round(getFrameNumber() * 1000000L / getFrameRate());
240 | }
241 | @Override public void setTimestamp(long timestamp) {
242 | setFrameNumber((int)Math.round(timestamp * getFrameRate() / 1000000L));
243 | }
244 |
245 | public void start() throws Exception {
246 | int ret;
247 | picture = null;
248 | tmp_picture = null;
249 | picture_buf = null;
250 | frame = null;
251 | video_outbuf = null;
252 | audio_outbuf = null;
253 | oc = null;
254 | video_c = null;
255 | audio_c = null;
256 | video_st = null;
257 | audio_st = null;
258 | got_video_packet = new int[1];
259 | got_audio_packet = new int[1];
260 |
261 | /* auto detect the output format from the name. */
262 | String format_name = format == null || format.length() == 0 ? null : format;
263 | if ((oformat = av_guess_format(format_name, filename, null)) == null) {
264 | throw new Exception("av_guess_format() error: Could not guess output format for \"" + filename + "\" and " + format + " format.");
265 | }
266 | format_name = oformat.name().getString();
267 |
268 | /* allocate the output media context */
269 | if ((oc = avformat_alloc_context()) == null) {
270 | throw new Exception("avformat_alloc_context() error: Could not allocate format context");
271 | }
272 |
273 | oc.oformat(oformat);
274 | oc.filename(filename);
275 |
276 | /* add the audio and video streams using the format codecs
277 | and initialize the codecs */
278 |
279 | if (imageWidth > 0 && imageHeight > 0) {
280 | if (videoCodec != CODEC_ID_NONE) {
281 | oformat.video_codec(videoCodec);
282 | } else if ("flv".equals(format_name)) {
283 | oformat.video_codec(CODEC_ID_FLV1);
284 | } else if ("mp4".equals(format_name)) {
285 | oformat.video_codec(CODEC_ID_MPEG4);
286 | } else if ("3gp".equals(format_name)) {
287 | oformat.video_codec(CODEC_ID_H263);
288 | } else if ("avi".equals(format_name)) {
289 | oformat.video_codec(CODEC_ID_HUFFYUV);
290 | }
291 |
292 | /* find the video encoder */
293 | if ((video_codec = avcodec_find_encoder(oformat.video_codec())) == null) {
294 | release();
295 | throw new Exception("avcodec_find_encoder() error: Video codec not found.");
296 | }
297 |
298 | /* add a video output stream */
299 | if ((video_st = avformat_new_stream(oc, video_codec)) == null) {
300 | release();
301 | throw new Exception("avformat_new_stream() error: Could not allocate video stream.");
302 | }
303 | video_c = video_st.codec();
304 | video_c.codec_id(oformat.video_codec());
305 | video_c.codec_type(AVMEDIA_TYPE_VIDEO);
306 |
307 | /* put sample parameters */
308 | video_c.bit_rate(videoBitrate);
309 | /* resolution must be a multiple of two, but round up to 16 as often required */
310 | video_c.width((imageWidth + 15) / 16 * 16);
311 | video_c.height(imageHeight);
312 | /* time base: this is the fundamental unit of time (in seconds) in terms
313 | of which frame timestamps are represented. for fixed-fps content,
314 | timebase should be 1/framerate and timestamp increments should be
315 | identically 1. */
316 | video_c.time_base(av_d2q(1 / frameRate, 1001000));
317 | video_c.gop_size(12); /* emit one intra frame every twelve frames at most */
318 |
319 | if (pixelFormat != PIX_FMT_NONE) {
320 | video_c.pix_fmt(pixelFormat);
321 | } else if (video_c.codec_id() == CODEC_ID_RAWVIDEO || video_c.codec_id() == CODEC_ID_PNG ||
322 | video_c.codec_id() == CODEC_ID_HUFFYUV || video_c.codec_id() == CODEC_ID_FFV1) {
323 | video_c.pix_fmt(PIX_FMT_RGB32); // appropriate for common lossless formats
324 | } else {
325 | video_c.pix_fmt(PIX_FMT_YUV420P); // lossy, but works with about everything
326 | }
327 |
328 | if (video_c.codec_id() == CODEC_ID_MPEG2VIDEO) {
329 | /* just for testing, we also add B frames */
330 | video_c.max_b_frames(2);
331 | } else if (video_c.codec_id() == CODEC_ID_MPEG1VIDEO) {
332 | /* Needed to avoid using macroblocks in which some coeffs overflow.
333 | This does not happen with normal video, it just happens here as
334 | the motion of the chroma plane does not match the luma plane. */
335 | video_c.mb_decision(2);
336 | } else if (video_c.codec_id() == CODEC_ID_H263) {
337 | // H.263 does not support any other resolution than the following
338 | if (imageWidth <= 128 && imageHeight <= 96) {
339 | video_c.width(128).height(96);
340 | } else if (imageWidth <= 176 && imageHeight <= 144) {
341 | video_c.width(176).height(144);
342 | } else if (imageWidth <= 352 && imageHeight <= 288) {
343 | video_c.width(352).height(288);
344 | } else if (imageWidth <= 704 && imageHeight <= 576) {
345 | video_c.width(704).height(576);
346 | } else {
347 | video_c.width(1408).height(1152);
348 | }
349 | } else if (video_c.codec_id() == CODEC_ID_H264) {
350 | // default to constrained baseline to produce content that plays back on anything,
351 | // without any significant tradeoffs for most use cases
352 | video_c.profile(AVCodecContext.FF_PROFILE_H264_CONSTRAINED_BASELINE);
353 | av_opt_set(video_c.priv_data(), "profile", profile != null && profile.length() > 0 ? profile : "baseline", 0);
354 | av_opt_set(video_c.priv_data(), "preset", preset != null && preset .length() > 0 ? preset : "medium", 0);
355 | }
356 |
357 | // some formats want stream headers to be separate
358 | if ((oformat.flags() & AVFMT_GLOBALHEADER) != 0) {
359 | video_c.flags(video_c.flags() | CODEC_FLAG_GLOBAL_HEADER);
360 | }
361 |
362 | if ((video_codec.capabilities() & CODEC_CAP_EXPERIMENTAL) != 0) {
363 | video_c.strict_std_compliance(AVCodecContext.FF_COMPLIANCE_EXPERIMENTAL);
364 | }
365 | }
366 |
367 | /*
368 | * add an audio output stream
369 | */
370 | if (audioChannels > 0) {
371 | if (audioCodec != CODEC_ID_NONE) {
372 | oformat.audio_codec(audioCodec);
373 | } else if ("flv".equals(format_name) || "mp4".equals(format_name) || "3gp".equals(format_name)) {
374 | oformat.audio_codec(CODEC_ID_AAC);
375 | } else if ("avi".equals(format_name)) {
376 | oformat.audio_codec(CODEC_ID_PCM_S16LE);
377 | }
378 |
379 | /* find the audio encoder */
380 | if ((audio_codec = avcodec_find_encoder(oformat.audio_codec())) == null) {
381 | release();
382 | throw new Exception("avcodec_find_encoder() error: Audio codec not found.");
383 | }
384 |
385 | if ((audio_st = avformat_new_stream(oc, audio_codec)) == null) {
386 | release();
387 | throw new Exception("avformat_new_stream() error: Could not allocate audio stream.");
388 | }
389 | audio_c = audio_st.codec();
390 | audio_c.codec_id(oformat.audio_codec());
391 | audio_c.codec_type(AVMEDIA_TYPE_AUDIO);
392 |
393 | /* put sample parameters */
394 | audio_c.bit_rate(audioBitrate);
395 | audio_c.sample_rate(sampleRate);
396 | audio_c.channels(audioChannels);
397 | audio_c.channel_layout(av_get_default_channel_layout(audioChannels));
398 | if (sampleFormat != AV_SAMPLE_FMT_NONE) {
399 | audio_c.sample_fmt(sampleFormat);
400 | } else if (audio_c.codec_id() == CODEC_ID_AAC &&
401 | (audio_codec.capabilities() & CODEC_CAP_EXPERIMENTAL) != 0) {
402 | audio_c.sample_fmt(AV_SAMPLE_FMT_FLT);
403 | } else {
404 | audio_c.sample_fmt(AV_SAMPLE_FMT_S16);
405 | }
406 | audio_c.time_base().num(1).den(sampleRate);
407 | switch (audio_c.sample_fmt()) {
408 | case AV_SAMPLE_FMT_U8: audio_c.bits_per_raw_sample(8); break;
409 | case AV_SAMPLE_FMT_S16: audio_c.bits_per_raw_sample(16); break;
410 | case AV_SAMPLE_FMT_S32: audio_c.bits_per_raw_sample(32); break;
411 | case AV_SAMPLE_FMT_FLT: audio_c.bits_per_raw_sample(32); break;
412 | case AV_SAMPLE_FMT_DBL: audio_c.bits_per_raw_sample(64); break;
413 | default: assert false;
414 | }
415 |
416 | // some formats want stream headers to be separate
417 | if ((oformat.flags() & AVFMT_GLOBALHEADER) != 0) {
418 | audio_c.flags(audio_c.flags() | CODEC_FLAG_GLOBAL_HEADER);
419 | }
420 |
421 | if ((audio_codec.capabilities() & CODEC_CAP_EXPERIMENTAL) != 0) {
422 | audio_c.strict_std_compliance(AVCodecContext.FF_COMPLIANCE_EXPERIMENTAL);
423 | }
424 | }
425 |
426 | av_dump_format(oc, 0, filename, 1);
427 |
428 | /* now that all the parameters are set, we can open the audio and
429 | video codecs and allocate the necessary encode buffers */
430 | if (video_st != null) {
431 | /* open the codec */
432 | if ((ret = avcodec_open2(video_c, video_codec, null)) < 0) {
433 | release();
434 | throw new Exception("avcodec_open2() error " + ret + ": Could not open video codec.");
435 | }
436 |
437 | video_outbuf = null;
438 | if ((oformat.flags() & AVFMT_RAWPICTURE) == 0) {
439 | /* allocate output buffer */
440 | /* XXX: API change will be done */
441 | /* buffers passed into lav* can be allocated any way you prefer,
442 | as long as they're aligned enough for the architecture, and
443 | they're freed appropriately (such as using av_free for buffers
444 | allocated with av_malloc) */
445 | video_outbuf_size = Math.max(256 * 1024, 8 * video_c.width() * video_c.height()); // a la ffmpeg.c
446 | video_outbuf = new BytePointer(av_malloc(video_outbuf_size));
447 | }
448 |
449 | /* allocate the encoded raw picture */
450 | if ((picture = avcodec_alloc_frame()) == null) {
451 | release();
452 | throw new Exception("avcodec_alloc_frame() error: Could not allocate picture.");
453 | }
454 | picture.pts(0); // magic required by libx264
455 |
456 | int size = avpicture_get_size(video_c.pix_fmt(), video_c.width(), video_c.height());
457 | if ((picture_buf = new BytePointer(av_malloc(size))).isNull()) {
458 | release();
459 | throw new Exception("av_malloc() error: Could not allocate picture buffer.");
460 | }
461 |
462 | /* if the output format is not equal to the image format, then a temporary
463 | picture is needed too. It is then converted to the required output format */
464 | if ((tmp_picture = avcodec_alloc_frame()) == null) {
465 | release();
466 | throw new Exception("avcodec_alloc_frame() error: Could not allocate temporary picture.");
467 | }
468 | }
469 |
470 | if (audio_st != null) {
471 | /* open the codec */
472 | if ((ret = avcodec_open2(audio_c, audio_codec, null)) < 0) {
473 | release();
474 | throw new Exception("avcodec_open2() error " + ret + ": Could not open audio codec.");
475 | }
476 |
477 | audio_outbuf_size = 256 * 1024;
478 | audio_outbuf = new BytePointer(av_malloc(audio_outbuf_size));
479 |
480 | /* ugly hack for PCM codecs (will be removed ASAP with new PCM
481 | support to compute the input frame size in samples */
482 | if (audio_c.frame_size() <= 1) {
483 | audio_outbuf_size = FF_MIN_BUFFER_SIZE;
484 | audio_input_frame_size = audio_outbuf_size / audio_c.channels();
485 | switch (audio_c.codec_id()) {
486 | case CODEC_ID_PCM_S16LE:
487 | case CODEC_ID_PCM_S16BE:
488 | case CODEC_ID_PCM_U16LE:
489 | case CODEC_ID_PCM_U16BE:
490 | audio_input_frame_size >>= 1;
491 | break;
492 | default:
493 | break;
494 | }
495 | } else {
496 | audio_input_frame_size = audio_c.frame_size();
497 | }
498 | //int bufferSize = audio_input_frame_size * audio_c.bits_per_raw_sample()/8 * audio_c.channels();
499 | int bufferSize = av_samples_get_buffer_size(null, audio_c.channels(), audio_input_frame_size, audio_c.sample_fmt(), 1);
500 | samples_out = new BytePointer(av_malloc(bufferSize)).capacity(bufferSize);
501 |
502 | /* allocate the audio frame */
503 | if ((frame = avcodec_alloc_frame()) == null) {
504 | release();
505 | throw new Exception("avcodec_alloc_frame() error: Could not allocate audio frame.");
506 | }
507 | }
508 |
509 | /* open the output file, if needed */
510 | if ((oformat.flags() & AVFMT_NOFILE) == 0) {
511 | AVIOContext pb = new AVIOContext(null);
512 | if ((ret = avio_open(pb, filename, AVIO_FLAG_WRITE)) < 0) {
513 | release();
514 | throw new Exception("avio_open error() error " + ret + ": Could not open '" + filename + "'");
515 | }
516 | oc.pb(pb);
517 | }
518 |
519 | /* write the stream header, if any */
520 | avformat_write_header(oc, null);
521 | }
522 |
523 | public void stop() throws Exception {
524 | if (oc != null) {
525 | /* write the trailer, if any */
526 | av_write_trailer(oc);
527 |
528 | if ((oformat.flags() & AVFMT_NOFILE) == 0) {
529 | /* close the output file */
530 | avio_close(oc.pb());
531 | }
532 | }
533 | release();
534 | }
535 |
536 | public void record(IplImage image) throws Exception {
537 | record(image, PIX_FMT_NONE);
538 | }
539 | public void record(IplImage image, int pixelFormat) throws Exception {
540 | if (video_st == null) {
541 | throw new Exception("No video output stream (Is imageWidth > 0 && imageHeight > 0 and has start() been called?)");
542 | }
543 | int ret;
544 |
545 | if (image == null) {
546 | /* no more frame to compress. The codec has a latency of a few
547 | frames if using B frames, so we get the last frames by
548 | passing the same picture again */
549 | } else {
550 | int width = image.width();
551 | int height = image.height();
552 | int step = image.widthStep();
553 | BytePointer data = image.imageData();
554 |
555 | if (pixelFormat == PIX_FMT_NONE) {
556 | int depth = image.depth();
557 | int channels = image.nChannels();
558 | if ((depth == IPL_DEPTH_8U || depth == IPL_DEPTH_8S) && channels == 3) {
559 | pixelFormat = PIX_FMT_BGR24;
560 | } else if ((depth == IPL_DEPTH_8U || depth == IPL_DEPTH_8S) && channels == 1) {
561 | pixelFormat = PIX_FMT_GRAY8;
562 | } else if ((depth == IPL_DEPTH_16U || depth == IPL_DEPTH_16S) && channels == 1) {
563 | pixelFormat = AV_HAVE_BIGENDIAN() ? PIX_FMT_GRAY16BE : PIX_FMT_GRAY16LE;
564 | } else if ((depth == IPL_DEPTH_8U || depth == IPL_DEPTH_8S) && channels == 4) {
565 | pixelFormat = PIX_FMT_RGBA;
566 | } else if ((depth == IPL_DEPTH_8U || depth == IPL_DEPTH_8S) && channels == 2) {
567 | pixelFormat = PIX_FMT_NV21; // Android's camera capture format
568 | step = width;
569 | } else {
570 | throw new Exception("Could not guess pixel format of image: depth=" + depth + ", channels=" + channels);
571 | }
572 | }
573 |
574 | if (video_c.pix_fmt() != pixelFormat || video_c.width() != width || video_c.height() != height) {
575 | /* convert to the codec pixel format if needed */
576 | img_convert_ctx = sws_getCachedContext(img_convert_ctx, width, height, pixelFormat,
577 | video_c.width(), video_c.height(), video_c.pix_fmt(), SWS_BILINEAR, null, null, null);
578 | if (img_convert_ctx == null) {
579 | throw new Exception("sws_getCachedContext() error: Cannot initialize the conversion context.");
580 | }
581 | avpicture_fill(tmp_picture, data, pixelFormat, width, height);
582 | avpicture_fill(picture, picture_buf, video_c.pix_fmt(), video_c.width(), video_c.height());
583 | tmp_picture.linesize(0, step);
584 | sws_scale(img_convert_ctx, new PointerPointer(tmp_picture), tmp_picture.linesize(),
585 | 0, height, new PointerPointer(picture), picture.linesize());
586 | } else {
587 | avpicture_fill(picture, data, pixelFormat, width, height);
588 | picture.linesize(0, step);
589 | }
590 | }
591 |
592 | if ((oformat.flags() & AVFMT_RAWPICTURE) != 0) {
593 | /* raw video case. The API may change slightly in the future for that? */
594 | av_init_packet(video_pkt);
595 | video_pkt.flags(video_pkt.flags() | AV_PKT_FLAG_KEY);
596 | video_pkt.stream_index(video_st.index());
597 | video_pkt.data(new BytePointer(picture));
598 | video_pkt.size(Loader.sizeof(AVPicture.class));
599 | } else {
600 | /* encode the image */
601 | av_init_packet(video_pkt);
602 | video_pkt.data(video_outbuf);
603 | video_pkt.size(video_outbuf_size);
604 | if ((ret = avcodec_encode_video2(video_c, video_pkt, picture, got_video_packet)) < 0) {
605 | throw new Exception("avcodec_encode_video2() error " + ret + ": Could not encode video packet.");
606 | }
607 | picture.pts(picture.pts() + 1); // magic required by libx264
608 |
609 | /* if zero size, it means the image was buffered */
610 | if (got_video_packet[0] != 0) {
611 | if (video_pkt.pts() != AV_NOPTS_VALUE) {
612 | video_pkt.pts(av_rescale_q(video_pkt.pts(), video_c.time_base(), video_st.time_base()));
613 | }
614 | if (video_pkt.dts() != AV_NOPTS_VALUE) {
615 | video_pkt.dts(av_rescale_q(video_pkt.dts(), video_c.time_base(), video_st.time_base()));
616 | }
617 | video_pkt.stream_index(video_st.index());
618 | } else {
619 | return;
620 | }
621 | }
622 |
623 | synchronized (oc) {
624 | /* write the compressed frame in the media file */
625 | if (interleaved && audio_st != null) {
626 | if ((ret = av_interleaved_write_frame(oc, video_pkt)) < 0) {
627 | throw new Exception("av_interleaved_write_frame() error " + ret + " while writing interleaved video frame.");
628 | }
629 | } else {
630 | if ((ret = av_write_frame(oc, video_pkt)) < 0) {
631 | throw new Exception("av_write_frame() error " + ret + " while writing video frame.");
632 | }
633 | }
634 | }
635 | }
636 |
637 | @Override public void record(Buffer samples) throws Exception {
638 | if (audio_st == null) {
639 | throw new Exception("No audio output stream (Is audioChannels > 0 and has start() been called?)");
640 | }
641 | int ret;
642 |
643 | int inputSize = samples.limit() - samples.position();
644 | int inputFormat = AV_SAMPLE_FMT_NONE;
645 | int inputDepth = 0;
646 | int outputDepth = av_get_bytes_per_sample(audio_c.sample_fmt());
647 | if (samples instanceof ByteBuffer) {
648 | ByteBuffer b = (ByteBuffer)samples;
649 | inputFormat = AV_SAMPLE_FMT_U8;
650 | inputDepth = 1;
651 | if (samples_in instanceof BytePointer && samples_in.capacity() >= inputSize && b.hasArray()) {
652 | ((BytePointer)samples_in).position(0).put(b.array(), b.position(), inputSize);
653 | } else {
654 | samples_in = new BytePointer(b);
655 | }
656 | } else if (samples instanceof ShortBuffer) {
657 | ShortBuffer b = (ShortBuffer)samples;
658 | inputFormat = AV_SAMPLE_FMT_S16;
659 | inputDepth = 2;
660 | if (samples_in instanceof ShortPointer && samples_in.capacity() >= inputSize && b.hasArray()) {
661 | ((ShortPointer)samples_in).position(0).put(b.array(), samples.position(), inputSize);
662 | } else {
663 | samples_in = new ShortPointer(b);
664 | }
665 | } else if (samples instanceof IntBuffer) {
666 | IntBuffer b = (IntBuffer)samples;
667 | inputFormat = AV_SAMPLE_FMT_S32;
668 | inputDepth = 4;
669 | if (samples_in instanceof IntPointer && samples_in.capacity() >= inputSize && b.hasArray()) {
670 | ((IntPointer)samples_in).position(0).put(b.array(), samples.position(), inputSize);
671 | } else {
672 | samples_in = new IntPointer(b);
673 | }
674 | } else if (samples instanceof FloatBuffer) {
675 | FloatBuffer b = (FloatBuffer)samples;
676 | inputFormat = AV_SAMPLE_FMT_FLT;
677 | inputDepth = 4;
678 | if (samples_in instanceof FloatPointer && samples_in.capacity() >= inputSize && b.hasArray()) {
679 | ((FloatPointer)samples_in).position(0).put(b.array(), b.position(), inputSize);
680 | } else {
681 | samples_in = new FloatPointer(b);
682 | }
683 | } else if (samples instanceof DoubleBuffer) {
684 | DoubleBuffer b = (DoubleBuffer)samples;
685 | inputFormat = AV_SAMPLE_FMT_DBL;
686 | inputDepth = 8;
687 | if (samples_in instanceof DoublePointer && samples_in.capacity() >= inputSize && b.hasArray()) {
688 | ((DoublePointer)samples_in).position(0).put(b.array(), b.position(), inputSize);
689 | } else {
690 | samples_in = new DoublePointer(b);
691 | }
692 | } else {
693 | throw new Exception("Audio samples Buffer has unsupported type: " + samples);
694 | }
695 |
696 | if (samples_convert_ctx == null) {
697 | samples_convert_ctx = swr_alloc_set_opts(null,
698 | audio_c.channel_layout(), audio_c.sample_fmt(), audio_c.sample_rate(),
699 | audio_c.channel_layout(), inputFormat, audio_c.sample_rate(), 0, null);
700 | if (samples_convert_ctx == null) {
701 | throw new Exception("swr_alloc_set_opts() error: Cannot allocate the conversion context.");
702 | } else if ((ret = swr_init(samples_convert_ctx)) < 0) {
703 | throw new Exception("swr_init() error " + ret + ": Cannot initialize the conversion context.");
704 | }
705 | }
706 |
707 | BytePointer samples_in_bytes = new BytePointer(samples_in).
708 | position(samples_in.position() * inputDepth).
709 | limit((samples_in.position() + inputSize) * inputDepth);
710 | while (samples_in_bytes.position() < samples_in_bytes.limit()) {
711 | int inputCount = (samples_in_bytes.limit() - samples_in_bytes.position()) / (audioChannels * inputDepth);
712 | int outputCount = (samples_out.limit() - samples_out.position()) / (audioChannels * outputDepth);
713 | int count = Math.min(inputCount, outputCount);
714 | if ((ret = swr_convert(samples_convert_ctx, samples_out, count, samples_in_bytes, count)) < 0) {
715 | throw new Exception("swr_convert() error " + ret + ": Cannot convert audio samples.");
716 | }
717 | samples_in_bytes.position(samples_in_bytes.position() + ret * audioChannels * inputDepth);
718 | samples_out.position(samples_out.position() + ret * audioChannels * outputDepth);
719 |
720 | if (samples_out.position() >= samples_out.limit()) {
721 | samples_out.position(0);
722 | frame.nb_samples(audio_input_frame_size);
723 | avcodec_fill_audio_frame(frame, audio_c.channels(), audio_c.sample_fmt(), samples_out, samples_out.limit(), 0);
724 |
725 | av_init_packet(audio_pkt);
726 | audio_pkt.data(audio_outbuf);
727 | audio_pkt.size(audio_outbuf_size);
728 | if ((ret = avcodec_encode_audio2(audio_c, audio_pkt, frame, got_audio_packet)) < 0) {
729 | throw new Exception("avcodec_encode_audio2() error " + ret + ": Could not encode audio packet.");
730 | }
731 | if (got_audio_packet[0] != 0) {
732 | if (audio_pkt.pts() != AV_NOPTS_VALUE) {
733 | audio_pkt.pts(av_rescale_q(audio_pkt.pts(), audio_c.time_base(), audio_c.time_base()));
734 | }
735 | if (audio_pkt.dts() != AV_NOPTS_VALUE) {
736 | audio_pkt.dts(av_rescale_q(audio_pkt.dts(), audio_c.time_base(), audio_c.time_base()));
737 | }
738 | audio_pkt.flags(audio_pkt.flags() | AV_PKT_FLAG_KEY);
739 | audio_pkt.stream_index(audio_st.index());
740 |
741 | /* write the compressed frame in the media file */
742 | synchronized (oc) {
743 | if (interleaved && video_st != null) {
744 | if ((ret = av_interleaved_write_frame(oc, audio_pkt)) < 0) {
745 | throw new Exception("av_interleaved_write_frame() error " + ret + " while writing interleaved audio frame.");
746 | }
747 | } else {
748 | if ((ret = av_write_frame(oc, audio_pkt)) < 0) {
749 | throw new Exception("av_write_frame() error " + ret + " while writing audio frame.");
750 | }
751 | }
752 | }
753 | }
754 | }
755 | }
756 | }
757 | }
758 |
--------------------------------------------------------------------------------
/src/com/ccs/pics2flix/FacePreview.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010,2011,2012 Samuel Audet
3 | *
4 | * FacePreview - A fusion of OpenCV's facedetect and Android's CameraPreview samples,
5 | * with JavaCV + JavaCPP as the glue in between.
6 | *
7 | * This file was based on CameraPreview.java that came with the Samples for
8 | * Android SDK API 8, revision 1 and contained the following copyright notice:
9 | *
10 | * Copyright (C) 2007 The Android Open Source Project
11 | *
12 | * Licensed under the Apache License, Version 2.0 (the "License");
13 | * you may not use this file except in compliance with the License.
14 | * You may obtain a copy of the License at
15 | *
16 | * http://www.apache.org/licenses/LICENSE-2.0
17 | *
18 | * Unless required by applicable law or agreed to in writing, software
19 | * distributed under the License is distributed on an "AS IS" BASIS,
20 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 | * See the License for the specific language governing permissions and
22 | * limitations under the License.
23 | *
24 | *
25 | * IMPORTANT - Make sure the AndroidManifest.xml file looks like this:
26 | *
27 | *
28 | *
32 | *
33 | *
34 | *
35 | *
36 | *
40 | *
41 | *
42 | *
43 | *
44 | *
45 | *
46 | *
47 | */
48 |
49 | package com.ccs.pics2flix;
50 |
51 | import android.app.Activity;
52 | import android.app.AlertDialog;
53 | import android.content.Context;
54 | import android.graphics.Canvas;
55 | import android.graphics.Color;
56 | import android.graphics.ImageFormat;
57 | import android.graphics.Paint;
58 | import android.hardware.Camera;
59 | import android.hardware.Camera.Size;
60 | import android.os.Bundle;
61 | import android.view.SurfaceHolder;
62 | import android.view.SurfaceView;
63 | import android.view.View;
64 | import android.view.Window;
65 | import android.view.WindowManager;
66 | import android.widget.FrameLayout;
67 | import java.io.File;
68 | import java.io.IOException;
69 | import java.nio.ByteBuffer;
70 | import java.util.List;
71 | import com.googlecode.javacpp.Loader;
72 | import com.googlecode.javacv.cpp.opencv_objdetect;
73 |
74 | import static com.googlecode.javacv.cpp.opencv_core.*;
75 | import static com.googlecode.javacv.cpp.opencv_imgproc.*;
76 | import static com.googlecode.javacv.cpp.opencv_objdetect.*;
77 | import static com.googlecode.javacv.cpp.opencv_highgui.*;
78 |
79 | // ----------------------------------------------------------------------
80 |
81 | public class FacePreview extends Activity {
82 | private FrameLayout layout;
83 | private FaceView faceView;
84 | private Preview mPreview;
85 |
86 | @Override
87 | protected void onCreate(Bundle savedInstanceState) {
88 | // Hide the window title.
89 | requestWindowFeature(Window.FEATURE_NO_TITLE);
90 |
91 | super.onCreate(savedInstanceState);
92 |
93 | getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
94 |
95 | // Create our Preview view and set it as the content of our activity.
96 | try {
97 | layout = new FrameLayout(this);
98 | faceView = new FaceView(this);
99 | mPreview = new Preview(this, faceView);
100 | layout.addView(mPreview);
101 | layout.addView(faceView);
102 | setContentView(layout);
103 | } catch (IOException e) {
104 | e.printStackTrace();
105 | new AlertDialog.Builder(this).setMessage(e.getMessage()).create().show();
106 | }
107 | }
108 | }
109 |
110 | // ----------------------------------------------------------------------
111 |
112 | class FaceView extends View implements Camera.PreviewCallback {
113 | public static final int SUBSAMPLING_FACTOR = 4;
114 |
115 | private IplImage grayImage;
116 | private CvHaarClassifierCascade classifier;
117 | private CvMemStorage storage;
118 | private CvSeq faces;
119 |
120 | public FaceView(FacePreview context) throws IOException {
121 | super(context);
122 |
123 | // Load the classifier file from Java resources.
124 | File classifierFile = Loader.extractResource(getClass(),
125 | "/com/googlecode/javacv/facepreview/haarcascade_frontalface_alt.xml",
126 | context.getCacheDir(), "classifier", ".xml");
127 | if (classifierFile == null || classifierFile.length() <= 0) {
128 | throw new IOException("Could not extract the classifier file from Java resource.");
129 | }
130 |
131 | // Preload the opencv_objdetect module to work around a known bug.
132 | Loader.load(opencv_objdetect.class);
133 | classifier = new CvHaarClassifierCascade(cvLoad(classifierFile.getAbsolutePath()));
134 | classifierFile.delete();
135 | if (classifier.isNull()) {
136 | throw new IOException("Could not load the classifier file.");
137 | }
138 | storage = CvMemStorage.create();
139 | }
140 |
141 | public void onPreviewFrame(final byte[] data, final Camera camera) {
142 | try {
143 | Camera.Size size = camera.getParameters().getPreviewSize();
144 | processImage(data, size.width, size.height);
145 | camera.addCallbackBuffer(data);
146 | } catch (RuntimeException e) {
147 | // The camera has probably just been released, ignore.
148 | }
149 | }
150 |
151 | protected void processImage(byte[] data, int width, int height) {
152 | // First, downsample our image and convert it into a grayscale IplImage
153 | int f = SUBSAMPLING_FACTOR;
154 | if (grayImage == null || grayImage.width() != width/f || grayImage.height() != height/f) {
155 | grayImage = IplImage.create(width/f, height/f, IPL_DEPTH_8U, 1);
156 | }
157 | int imageWidth = grayImage.width();
158 | int imageHeight = grayImage.height();
159 | int dataStride = f*width;
160 | int imageStride = grayImage.widthStep();
161 | ByteBuffer imageBuffer = grayImage.getByteBuffer();
162 | for (int y = 0; y < imageHeight; y++) {
163 | int dataLine = y*dataStride;
164 | int imageLine = y*imageStride;
165 | for (int x = 0; x < imageWidth; x++) {
166 | imageBuffer.put(imageLine + x, data[dataLine + f*x]);
167 | }
168 | }
169 |
170 | cvClearMemStorage(storage);
171 | faces = cvHaarDetectObjects(grayImage, classifier, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);
172 | postInvalidate();
173 | }
174 |
175 | @Override
176 | protected void onDraw(Canvas canvas) {
177 | Paint paint = new Paint();
178 | paint.setColor(Color.RED);
179 | paint.setTextSize(20);
180 |
181 | String s = "FacePreview - This side up.";
182 | float textWidth = paint.measureText(s);
183 | canvas.drawText(s, (getWidth()-textWidth)/2, 20, paint);
184 |
185 | if (faces != null) {
186 | paint.setStrokeWidth(2);
187 | paint.setStyle(Paint.Style.STROKE);
188 | float scaleX = (float)getWidth()/grayImage.width();
189 | float scaleY = (float)getHeight()/grayImage.height();
190 | int total = faces.total();
191 | for (int i = 0; i < total; i++) {
192 | CvRect r = new CvRect(cvGetSeqElem(faces, i));
193 | int x = r.x(), y = r.y(), w = r.width(), h = r.height();
194 | canvas.drawRect(x*scaleX, y*scaleY, (x+w)*scaleX, (y+h)*scaleY, paint);
195 | }
196 | }
197 | }
198 | }
199 |
200 | // ----------------------------------------------------------------------
201 |
202 | class Preview extends SurfaceView implements SurfaceHolder.Callback {
203 | SurfaceHolder mHolder;
204 | Camera mCamera;
205 | Camera.PreviewCallback previewCallback;
206 |
207 | Preview(Context context, Camera.PreviewCallback previewCallback) {
208 | super(context);
209 | this.previewCallback = previewCallback;
210 |
211 | // Install a SurfaceHolder.Callback so we get notified when the
212 | // underlying surface is created and destroyed.
213 | mHolder = getHolder();
214 | mHolder.addCallback(this);
215 | mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
216 | }
217 |
218 | public void surfaceCreated(SurfaceHolder holder) {
219 | // The Surface has been created, acquire the camera and tell it where
220 | // to draw.
221 | mCamera = Camera.open();
222 | try {
223 | mCamera.setPreviewDisplay(holder);
224 | } catch (IOException exception) {
225 | mCamera.release();
226 | mCamera = null;
227 | // TODO: add more exception handling logic here
228 | }
229 | }
230 |
231 | public void surfaceDestroyed(SurfaceHolder holder) {
232 | // Surface will be destroyed when we return, so stop the preview.
233 | // Because the CameraDevice object is not a shared resource, it's very
234 | // important to release it when the activity is paused.
235 | mCamera.stopPreview();
236 | mCamera.release();
237 | mCamera = null;
238 | }
239 |
240 |
241 | private Size getOptimalPreviewSize(List sizes, int w, int h) {
242 | final double ASPECT_TOLERANCE = 0.05;
243 | double targetRatio = (double) w / h;
244 | if (sizes == null) return null;
245 |
246 | Size optimalSize = null;
247 | double minDiff = Double.MAX_VALUE;
248 |
249 | int targetHeight = h;
250 |
251 | // Try to find an size match aspect ratio and size
252 | for (Size size : sizes) {
253 | double ratio = (double) size.width / size.height;
254 | if (Math.abs(ratio - targetRatio) > ASPECT_TOLERANCE) continue;
255 | if (Math.abs(size.height - targetHeight) < minDiff) {
256 | optimalSize = size;
257 | minDiff = Math.abs(size.height - targetHeight);
258 | }
259 | }
260 |
261 | // Cannot find the one match the aspect ratio, ignore the requirement
262 | if (optimalSize == null) {
263 | minDiff = Double.MAX_VALUE;
264 | for (Size size : sizes) {
265 | if (Math.abs(size.height - targetHeight) < minDiff) {
266 | optimalSize = size;
267 | minDiff = Math.abs(size.height - targetHeight);
268 | }
269 | }
270 | }
271 | return optimalSize;
272 | }
273 |
274 | public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
275 | // Now that the size is known, set up the camera parameters and begin
276 | // the preview.
277 | Camera.Parameters parameters = mCamera.getParameters();
278 |
279 | List sizes = parameters.getSupportedPreviewSizes();
280 | Size optimalSize = getOptimalPreviewSize(sizes, w, h);
281 | parameters.setPreviewSize(optimalSize.width, optimalSize.height);
282 |
283 | mCamera.setParameters(parameters);
284 | if (previewCallback != null) {
285 | mCamera.setPreviewCallbackWithBuffer(previewCallback);
286 | Camera.Size size = parameters.getPreviewSize();
287 | byte[] data = new byte[size.width*size.height*
288 | ImageFormat.getBitsPerPixel(parameters.getPreviewFormat())/8];
289 | mCamera.addCallbackBuffer(data);
290 | }
291 | mCamera.startPreview();
292 | }
293 |
294 | }
295 |
--------------------------------------------------------------------------------
/src/com/ccs/pics2flix/FileBrowser.java:
--------------------------------------------------------------------------------
1 | package com.ccs.pics2flix;
2 |
3 | import android.app.AlertDialog;
4 | import android.app.AlertDialog.Builder;
5 | import android.app.Dialog;
6 | import android.app.ListActivity;
7 | import android.content.DialogInterface;
8 | import android.content.DialogInterface.OnClickListener;
9 | import android.content.Intent;
10 | import android.content.res.Resources;
11 | import android.graphics.drawable.Drawable;
12 | import android.os.Bundle;
13 | import android.util.Log;
14 | import android.view.View;
15 | import android.widget.AdapterView;
16 | import android.widget.AdapterView.OnItemLongClickListener;
17 | import android.widget.ListView;
18 | import android.widget.Toast;
19 | import com.ControlledCapture.FilePlayer;
20 | import java.io.File;
21 | import java.util.ArrayList;
22 | import java.util.Collections;
23 | import java.util.List;
24 |
25 | public class FileBrowser extends ListActivity
26 | {
27 | private static final int DIALOG_DELETE = 2;
28 | private static final int FILE_DIALOG = 1;
29 | private static final int NON_JPEG = 4;
30 | private static final int NO_FILES = 3;
31 | private static final int NUM_IMGS = 5;
32 | protected static final int SUB_ACTIVITY_REQUEST_CODE = 1337;
33 | File aDirectory;
34 | boolean adBased = false;
35 | File clickedFile;
36 | private File currentDirectory = new File("/mnt/sdcard/DCIM");
37 | File currentFile;
38 | private List directoryEntries = new ArrayList();
39 | private final DISPLAYMODE displayMode = DISPLAYMODE.RELATIVE;
40 | File[] fileList;
41 | IconifiedTextListAdapter iconedList;
42 | boolean isFreeVersion = false;
43 | ListView list;
44 | int numberJpegs;
45 | int position;
46 | File rootFile;
47 | boolean useTimeStampName = false;
48 |
49 | private void browseTo(File paramFile)
50 | {
51 | if (this.displayMode == DISPLAYMODE.RELATIVE)
52 | setTitle("Long Press Folder to Select");
53 | if (paramFile.isDirectory())
54 | {
55 | this.currentDirectory = paramFile;
56 | fill(paramFile.listFiles());
57 | }
58 | }
59 |
60 | private void browseToRoot()
61 | {
62 | this.rootFile = new File("/mnt/sdcard/DCIM/");
63 | browseTo(this.rootFile);
64 | }
65 |
66 | private boolean checkEndsWithInStringArray(String paramString, String[] paramArrayOfString)
67 | {
68 | int i = paramArrayOfString.length;
69 | for (int j = 0; ; j++)
70 | {
71 | if (j >= i);
72 | for (int k = 0; ; k = 1)
73 | {
74 | return k;
75 | if (!paramString.endsWith(paramArrayOfString[j]))
76 | break;
77 | }
78 | }
79 | }
80 |
81 | public static boolean deleteDir(File paramFile)
82 | {
83 | File[] arrayOfFile;
84 | int i;
85 | if (paramFile.isDirectory())
86 | {
87 | arrayOfFile = paramFile.listFiles();
88 | i = 0;
89 | if (i < arrayOfFile.length);
90 | }
91 | for (boolean bool = paramFile.delete(); ; bool = false)
92 | {
93 | return bool;
94 | if (arrayOfFile[i].isDirectory())
95 | deleteDir(arrayOfFile[i]);
96 | while (true)
97 | {
98 | i++;
99 | break;
100 | arrayOfFile[i].delete();
101 | }
102 | }
103 | }
104 |
105 | private void fill(File[] paramArrayOfFile)
106 | {
107 | this.directoryEntries.clear();
108 | if (this.currentDirectory.compareTo(this.rootFile) != 0)
109 | {
110 | Log.e("File Browser", "Image Directory is: " + this.rootFile.toString());
111 | this.directoryEntries.add(new IconifiedText(getString(2131099699), getResources().getDrawable(2130837537)));
112 | }
113 | Drawable localDrawable = null;
114 | int i = paramArrayOfFile.length;
115 | int j = 0;
116 | if (j >= i)
117 | {
118 | Collections.sort(this.directoryEntries);
119 | this.list = getListView();
120 | this.list.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener()
121 | {
122 | public boolean onItemLongClick(AdapterView> paramAdapterView, View paramView, int paramInt, long paramLong)
123 | {
124 | FileBrowser.this.position = paramInt;
125 | FileBrowser.this.onLongListItemClick(paramView, FileBrowser.this.position, paramLong);
126 | return false;
127 | }
128 | });
129 | IconifiedTextListAdapter localIconifiedTextListAdapter = new IconifiedTextListAdapter(this);
130 | localIconifiedTextListAdapter.setListItems(this.directoryEntries);
131 | setListAdapter(localIconifiedTextListAdapter);
132 | return;
133 | }
134 | File localFile = paramArrayOfFile[j];
135 | if (localFile.isDirectory())
136 | {
137 | localDrawable = getResources().getDrawable(2130837513);
138 | label177: switch ($SWITCH_TABLE$com$ccs$pics2flix$FileBrowser$DISPLAYMODE()[this.displayMode.ordinal()])
139 | {
140 | default:
141 | case 1:
142 | case 2:
143 | }
144 | }
145 | while (true)
146 | {
147 | j++;
148 | break;
149 | if (!checkEndsWithInStringArray(localFile.getName(), getResources().getStringArray(2131296256)))
150 | break label177;
151 | localDrawable = getResources().getDrawable(2130837519);
152 | break label177;
153 | this.directoryEntries.add(new IconifiedText(localFile.getPath(), localDrawable));
154 | continue;
155 | int k = this.currentDirectory.getAbsolutePath().length();
156 | this.directoryEntries.add(new IconifiedText(localFile.getAbsolutePath().substring(k), localDrawable));
157 | }
158 | }
159 |
160 | private void upOneLevel()
161 | {
162 | if (this.currentDirectory.getParent() != null)
163 | browseTo(this.currentDirectory.getParentFile());
164 | }
165 |
166 | public void onBackPressed()
167 | {
168 | if (this.currentDirectory.compareTo(this.rootFile) != 0)
169 | upOneLevel();
170 | while (true)
171 | {
172 | return;
173 | finish();
174 | }
175 | }
176 |
177 | public void onCreate(Bundle paramBundle)
178 | {
179 | super.onCreate(paramBundle);
180 | Intent localIntent = getIntent();
181 | this.adBased = localIntent.getBooleanExtra("adbased", false);
182 | this.isFreeVersion = localIntent.getBooleanExtra("isFreeVersion", this.isFreeVersion);
183 | this.useTimeStampName = localIntent.getBooleanExtra("useTimeStampName", this.useTimeStampName);
184 | browseToRoot();
185 | setSelection(0);
186 | }
187 |
188 | public Dialog onCreateDialog(int paramInt)
189 | {
190 | AlertDialog localAlertDialog;
191 | switch (paramInt)
192 | {
193 | default:
194 | localAlertDialog = null;
195 | case 1:
196 | case 5:
197 | case 3:
198 | case 4:
199 | case 2:
200 | }
201 | while (true)
202 | {
203 | return localAlertDialog;
204 | CharSequence[] arrayOfCharSequence = new CharSequence[3];
205 | arrayOfCharSequence[0] = "Yes, use this folder";
206 | arrayOfCharSequence[1] = "No, choose a different folder";
207 | arrayOfCharSequence[2] = "Review Images with Image Player";
208 | localAlertDialog = new AlertDialog.Builder(this).setTitle("Use this folder?").setItems(arrayOfCharSequence, new DialogInterface.OnClickListener()
209 | {
210 | public void onClick(DialogInterface paramDialogInterface, int paramInt)
211 | {
212 | if (paramInt == 0)
213 | {
214 | Intent localIntent2 = FileBrowser.this.getIntent();
215 | localIntent2.putExtra("selectedFolder", FileBrowser.this.clickedFile.toString());
216 | localIntent2.putExtra("numberJpegs", FileBrowser.this.numberJpegs);
217 | FileBrowser.this.setResult(-1, localIntent2);
218 | paramDialogInterface.dismiss();
219 | FileBrowser.this.showDialog(5);
220 | }
221 | if (paramInt == 1)
222 | paramDialogInterface.dismiss();
223 | if (paramInt == 2)
224 | {
225 | Intent localIntent1 = new Intent(FileBrowser.this, FilePlayer.class);
226 | localIntent1.putExtra("directory", FileBrowser.this.clickedFile.toString());
227 | localIntent1.putExtra("adbased", FileBrowser.this.adBased);
228 | localIntent1.putExtra("isFreeVersion", FileBrowser.this.isFreeVersion);
229 | localIntent1.putExtra("useTimeStampName", FileBrowser.this.useTimeStampName);
230 | FileBrowser.this.startActivityForResult(localIntent1, 0);
231 | }
232 | }
233 | }).create();
234 | continue;
235 | String str = "The Folder selected, contains " + this.numberJpegs + " image files which will be used for your new movie.";
236 | localAlertDialog = new AlertDialog.Builder(this).setTitle("Selected Folder Information").setIcon(17301659).setMessage(str).setNegativeButton("OK", new DialogInterface.OnClickListener()
237 | {
238 | public void onClick(DialogInterface paramDialogInterface, int paramInt)
239 | {
240 | paramDialogInterface.dismiss();
241 | FileBrowser.this.finish();
242 | }
243 | }).create();
244 | continue;
245 | localAlertDialog = new AlertDialog.Builder(this).setTitle("Can not use this folder!").setIcon(17301543).setMessage("Movie maker can not process an empty folder.").setNegativeButton("OK", new DialogInterface.OnClickListener()
246 | {
247 | public void onClick(DialogInterface paramDialogInterface, int paramInt)
248 | {
249 | paramDialogInterface.dismiss();
250 | }
251 | }).create();
252 | continue;
253 | localAlertDialog = new AlertDialog.Builder(this).setTitle("Can not use this folder!").setIcon(17301543).setMessage("Movie maker can only process folders that contain .jpg files.").setNegativeButton("OK", new DialogInterface.OnClickListener()
254 | {
255 | public void onClick(DialogInterface paramDialogInterface, int paramInt)
256 | {
257 | paramDialogInterface.dismiss();
258 | }
259 | }).create();
260 | continue;
261 | localAlertDialog = new AlertDialog.Builder(this).setTitle(getString(2131099669) + " Project named " + this.clickedFile + "?").setIcon(17301543).setNegativeButton("Cancel", new DialogInterface.OnClickListener()
262 | {
263 | public void onClick(DialogInterface paramDialogInterface, int paramInt)
264 | {
265 | paramDialogInterface.dismiss();
266 | }
267 | }).setPositiveButton("OK", new DialogInterface.OnClickListener()
268 | {
269 | public void onClick(DialogInterface paramDialogInterface, int paramInt)
270 | {
271 | String str = FileBrowser.this.clickedFile.toString().split("\t")[0];
272 | File localFile = new File(FileBrowser.this.currentDirectory + File.separator + str);
273 | if ((localFile.isDirectory()) && (Boolean.valueOf(FileBrowser.deleteDir(localFile)).booleanValue()))
274 | Toast.makeText(FileBrowser.this, "Project has been deleted", 0).show();
275 | FileBrowser.this.iconedList.removeItem(FileBrowser.this.position);
276 | FileBrowser.this.iconedList.notifyDataSetChanged();
277 | paramDialogInterface.dismiss();
278 | FileBrowser.this.fill(FileBrowser.this.aDirectory.listFiles());
279 | }
280 | }).create();
281 | }
282 | }
283 |
284 | protected void onListItemClick(ListView paramListView, View paramView, int paramInt, long paramLong)
285 | {
286 | super.onListItemClick(paramListView, paramView, paramInt, paramLong);
287 | if (((IconifiedText)this.directoryEntries.get(paramInt)).getText().equals(getString(2131099699)))
288 | upOneLevel();
289 | label171:
290 | while (true)
291 | {
292 | return;
293 | File localFile = null;
294 | switch ($SWITCH_TABLE$com$ccs$pics2flix$FileBrowser$DISPLAYMODE()[this.displayMode.ordinal()])
295 | {
296 | default:
297 | case 2:
298 | case 1:
299 | }
300 | while (true)
301 | {
302 | if (localFile == null)
303 | break label171;
304 | browseTo(localFile);
305 | break;
306 | localFile = new File(this.currentDirectory.getAbsolutePath() + ((IconifiedText)this.directoryEntries.get(paramInt)).getText());
307 | continue;
308 | localFile = new File(((IconifiedText)this.directoryEntries.get(paramInt)).getText());
309 | }
310 | }
311 | }
312 |
313 | protected void onLongListItemClick(View paramView, int paramInt, long paramLong)
314 | {
315 | this.clickedFile = new File(this.currentDirectory.getAbsolutePath() + ((IconifiedText)this.directoryEntries.get(this.position)).getText());
316 | Log.e("Browser", "Item longListItemClick: " + this.clickedFile);
317 | int i;
318 | if (this.clickedFile.isDirectory())
319 | {
320 | this.numberJpegs = 0;
321 | this.fileList = this.clickedFile.listFiles();
322 | i = 0;
323 | if (i < this.fileList.length)
324 | break label150;
325 | if (this.numberJpegs != this.fileList.length)
326 | break label193;
327 | if (this.fileList.length != 0)
328 | break label185;
329 | showDialog(3);
330 | }
331 | while (true)
332 | {
333 | return;
334 | label150: if (this.fileList[i].toString().contains(".jpg"))
335 | this.numberJpegs = (1 + this.numberJpegs);
336 | i++;
337 | break;
338 | label185: showDialog(1);
339 | continue;
340 | label193: showDialog(4);
341 | }
342 | }
343 |
344 | private static enum DISPLAYMODE
345 | {
346 | static
347 | {
348 | DISPLAYMODE[] arrayOfDISPLAYMODE = new DISPLAYMODE[2];
349 | arrayOfDISPLAYMODE[0] = ABSOLUTE;
350 | arrayOfDISPLAYMODE[1] = RELATIVE;
351 | ENUM$VALUES = arrayOfDISPLAYMODE;
352 | }
353 | }
354 | }
--------------------------------------------------------------------------------
/src/com/ccs/pics2flix/Images2Movie.java:
--------------------------------------------------------------------------------
1 | package com.ccs.pics2flix;
2 |
3 | import android.app.Activity;
4 | import android.app.AlertDialog;
5 | import android.app.AlertDialog.Builder;
6 | import android.app.Dialog;
7 | import android.content.DialogInterface;
8 | import android.content.DialogInterface.OnClickListener;
9 | import android.content.Intent;
10 | import android.net.Uri;
11 | import android.os.Bundle;
12 | import android.os.Environment;
13 | import android.os.Handler;
14 | import android.text.Editable;
15 | import android.text.SpannableString;
16 | import android.text.method.LinkMovementMethod;
17 | import android.text.util.Linkify;
18 | import android.view.KeyEvent;
19 | import android.view.LayoutInflater;
20 | import android.view.Menu;
21 | import android.view.MenuInflater;
22 | import android.view.MenuItem;
23 | import android.view.MotionEvent;
24 | import android.view.View;
25 | import android.view.View.OnClickListener;
26 | import android.view.View.OnKeyListener;
27 | import android.view.View.OnLongClickListener;
28 | import android.view.View.OnTouchListener;
29 | import android.view.ViewGroup.LayoutParams;
30 | import android.view.Window;
31 | import android.view.inputmethod.InputMethodManager;
32 | import android.widget.Button;
33 | import android.widget.EditText;
34 | import android.widget.ImageView;
35 | import android.widget.RadioButton;
36 | import android.widget.RadioGroup;
37 | import android.widget.TextView;
38 | import android.widget.TextView.OnEditorActionListener;
39 | import com.ControlledCapture.FilePlayer;
40 | import com.ControlledCapture.ListFiles;
41 | import com.ControlledCapture.VideoPlayer;
42 | import com.ccs.converter.Convert2Movie;
43 | import java.io.File;
44 | import java.text.DecimalFormat;
45 | import java.text.NumberFormat;
46 | import java.util.regex.Pattern;
47 |
48 | public class Images2Movie extends Activity
49 | implements View.OnTouchListener
50 | {
51 | private static final int BAD_CHARS = 1;
52 | static final String CAMERA_VID_DIR = "/DCIM/myVideos/";
53 | private static final int FOLDER_NOT_SET = 6;
54 | private static final int FORM_NOT_COMPLETE = 2;
55 | private static int MAXIMUM = 0;
56 | private static int MINIMUM = 0;
57 | private static final int MOVIE_NOT_MADE = 5;
58 | private static final int MOVIE_SHORT = 4;
59 | private static final int PAID_AP_FPS = 8;
60 | private static final int PAID_AP_MOVIE_NAME = 7;
61 | private static final int PAID_AP_RES = 9;
62 | private static final int PLAY_MOVIE = 3;
63 | static final String SD_DIR = Environment.getExternalStorageDirectory().getAbsolutePath();
64 | Button FPSNumHolder;
65 | TextView FPSsetting;
66 | RadioButton HiRes;
67 | TextView ImageFolderText;
68 | Button MakeMovieButton;
69 | TextView MovieFilenameText;
70 | RadioButton NormRes;
71 | Button SetFPSButton;
72 | Button SetImgFolderButton;
73 | Button SetMovieNameButton;
74 | TextView TextFPSsetting;
75 | boolean adBased = false;
76 | private boolean autoDecrement = false;
77 | private boolean autoIncrement = false;
78 | Button decrementFPS;
79 | boolean folderIsSet = false;
80 | int fps = 10;
81 | boolean fpsIsSet = false;
82 | View fpsView;
83 | int height = 480;
84 | String imageFiles;
85 | Button incrementFPS;
86 | boolean isFreeVersion = false;
87 | double length;
88 | private LayoutInflater mInflater = null;
89 | String movieFileName;
90 | String movieLength;
91 | String movieName = "NewMovie";
92 | Editable movieNameStg;
93 | EditText movieNameTxt;
94 | View movieNameView;
95 | boolean movieWasMade = false;
96 | boolean nameIsSet = false;
97 | int numberJpegs;
98 | private Handler repeatUpdateHandler = new Handler();
99 | RadioGroup resolution;
100 | boolean settingFPS = false;
101 | boolean settingName = false;
102 | boolean useTimeStampName = false;
103 | int width = 640;
104 |
105 | static
106 | {
107 | MINIMUM = 1;
108 | MAXIMUM = 30;
109 | }
110 |
111 | private void convert2movie()
112 | {
113 | switch (this.resolution.getCheckedRadioButtonId())
114 | {
115 | default:
116 | case 2131165222:
117 | case 2131165223:
118 | }
119 | while (true)
120 | {
121 | Intent localIntent = new Intent(this, Convert2Movie.class);
122 | localIntent.putExtra("directory", this.imageFiles);
123 | localIntent.putExtra("useTimeStampName", this.useTimeStampName);
124 | localIntent.putExtra("moviename", this.movieName);
125 | localIntent.putExtra("width", this.width);
126 | localIntent.putExtra("height", this.height);
127 | localIntent.putExtra("fps", this.fps);
128 | localIntent.putExtra("adbased", this.adBased);
129 | startActivityForResult(localIntent, 0);
130 | return;
131 | this.width = 640;
132 | this.height = 480;
133 | continue;
134 | this.width = 720;
135 | this.height = 480;
136 | }
137 | }
138 |
139 | private String getNewProjectString()
140 | {
141 | this.movieNameStg = this.movieNameTxt.getText();
142 | if (!Boolean.valueOf(this.movieNameStg.toString().matches("^[a-zA-Z0-9]+$")).booleanValue())
143 | {
144 | showDialog(1);
145 | this.movieNameTxt.setText("");
146 | this.movieNameTxt.requestFocus();
147 | this.movieNameTxt.setSelectAllOnFocus(true);
148 | }
149 | while (true)
150 | {
151 | return this.movieName;
152 | this.nameIsSet = true;
153 | this.settingName = false;
154 | this.movieNameTxt.setVisibility(8);
155 | this.SetImgFolderButton.setVisibility(0);
156 | this.SetMovieNameButton.setVisibility(0);
157 | this.SetFPSButton.setVisibility(0);
158 | this.FPSsetting.setVisibility(0);
159 | this.ImageFolderText.setVisibility(0);
160 | this.MovieFilenameText.setVisibility(0);
161 | this.NormRes.setVisibility(0);
162 | this.HiRes.setVisibility(0);
163 | this.MovieFilenameText.setText(this.movieNameStg);
164 | this.movieName = this.movieNameStg.toString();
165 | this.MakeMovieButton.setText("Make Movie");
166 | ((InputMethodManager)getSystemService("input_method")).hideSoftInputFromWindow(this.movieNameTxt.getWindowToken(), 0);
167 | }
168 | }
169 |
170 | private void startFileBrowser()
171 | {
172 | Intent localIntent = new Intent(this, FileBrowser.class);
173 | localIntent.putExtra("adbased", this.adBased);
174 | localIntent.putExtra("isFreeVersion", this.isFreeVersion);
175 | localIntent.putExtra("useTimeStampName", this.useTimeStampName);
176 | startActivityForResult(localIntent, 0);
177 | }
178 |
179 | public void decrement()
180 | {
181 | int i = Integer.parseInt((String)this.FPSNumHolder.getText());
182 | if (i > MINIMUM)
183 | {
184 | int j = i - 1;
185 | this.FPSNumHolder.setText(String.valueOf(j));
186 | this.TextFPSsetting.setText("Image will be shown for ~1/" + String.valueOf(j) + " sec(s) in movie");
187 | }
188 | }
189 |
190 | public void increment()
191 | {
192 | int i = Integer.parseInt((String)this.FPSNumHolder.getText());
193 | if (i < MAXIMUM)
194 | {
195 | int j = i + 1;
196 | this.FPSNumHolder.setText(String.valueOf(j));
197 | this.TextFPSsetting.setText("Image will be shown for ~1/" + String.valueOf(j) + " sec(s) in movie");
198 | }
199 | }
200 |
201 | protected void onActivityResult(int paramInt1, int paramInt2, Intent paramIntent)
202 | {
203 | super.onActivityResult(paramInt1, paramInt2, paramIntent);
204 | if ((paramInt1 == 0) && (paramInt2 == -1))
205 | {
206 | this.folderIsSet = true;
207 | String str = paramIntent.getExtras().getString("selectedFolder");
208 | this.numberJpegs = paramIntent.getIntExtra("numberJpegs", 10);
209 | this.movieFileName = paramIntent.getExtras().getString("clickedProject");
210 | if (this.movieFileName != null)
211 | {
212 | String[] arrayOfString = paramIntent.getExtras().getString("clickedProject").split("\t");
213 | this.movieFileName = (SD_DIR + "/DCIM/myVideos/" + arrayOfString[0]);
214 | this.movieWasMade = true;
215 | }
216 | if (str != null)
217 | {
218 | this.imageFiles = str;
219 | this.ImageFolderText.setText(this.imageFiles);
220 | }
221 | }
222 | while (true)
223 | {
224 | return;
225 | if (paramInt2 == 52)
226 | {
227 | this.movieFileName = paramIntent.getExtras().getString("moviefilename");
228 | this.movieWasMade = true;
229 | showDialog(3);
230 | continue;
231 | }
232 | }
233 | }
234 |
235 | public void onCreate(Bundle paramBundle)
236 | {
237 | super.onCreate(paramBundle);
238 | requestWindowFeature(1);
239 | getWindow().setFormat(-3);
240 | getWindow().setFlags(1024, 1024);
241 | setContentView(2130903053);
242 | this.SetImgFolderButton = ((Button)findViewById(2131165207));
243 | this.SetMovieNameButton = ((Button)findViewById(2131165208));
244 | this.SetFPSButton = ((Button)findViewById(2131165225));
245 | this.FPSsetting = ((TextView)findViewById(2131165226));
246 | this.MakeMovieButton = ((Button)findViewById(2131165228));
247 | this.ImageFolderText = ((TextView)findViewById(2131165192));
248 | this.MovieFilenameText = ((TextView)findViewById(2131165219));
249 | this.resolution = ((RadioGroup)findViewById(2131165221));
250 | this.NormRes = ((RadioButton)findViewById(2131165222));
251 | this.HiRes = ((RadioButton)findViewById(2131165223));
252 | this.mInflater = LayoutInflater.from(this);
253 | this.movieNameView = this.mInflater.inflate(2130903055, null);
254 | addContentView(this.movieNameView, new ViewGroup.LayoutParams(-1, -1));
255 | this.movieNameView.setOnTouchListener(this);
256 | this.movieNameTxt = ((EditText)findViewById(2131165202));
257 | this.movieNameTxt.setVisibility(8);
258 | this.mInflater = LayoutInflater.from(this);
259 | this.fpsView = this.mInflater.inflate(2130903052, null);
260 | addContentView(this.fpsView, new ViewGroup.LayoutParams(-1, -1));
261 | this.fpsView.setOnTouchListener(this);
262 | this.decrementFPS = ((Button)findViewById(2131165195));
263 | this.decrementFPS.setVisibility(8);
264 | this.FPSNumHolder = ((Button)findViewById(2131165196));
265 | this.FPSNumHolder.setVisibility(8);
266 | this.incrementFPS = ((Button)findViewById(2131165197));
267 | this.incrementFPS.setVisibility(8);
268 | this.TextFPSsetting = ((TextView)findViewById(2131165215));
269 | int i = Integer.parseInt((String)this.FPSNumHolder.getText());
270 | this.TextFPSsetting.setText("Image will be shown for ~1/" + String.valueOf(i) + " sec(s) in movie");
271 | this.TextFPSsetting.setVisibility(8);
272 | Intent localIntent = getIntent();
273 | this.adBased = localIntent.getBooleanExtra("adbased", false);
274 | this.isFreeVersion = localIntent.getBooleanExtra("isFreeVersion", this.isFreeVersion);
275 | if (this.isFreeVersion)
276 | {
277 | this.MovieFilenameText.setText(this.movieName);
278 | this.nameIsSet = true;
279 | this.fps = 5;
280 | this.FPSsetting.setText("5");
281 | this.fpsIsSet = true;
282 | }
283 | File localFile = new File(SD_DIR + "/DCIM/myVideos/");
284 | if (!localFile.isDirectory())
285 | localFile.mkdirs();
286 | this.SetImgFolderButton.setOnClickListener(new View.OnClickListener()
287 | {
288 | public void onClick(View paramView)
289 | {
290 | Images2Movie.this.startFileBrowser();
291 | }
292 | });
293 | this.NormRes.setOnClickListener(new View.OnClickListener()
294 | {
295 | public void onClick(View paramView)
296 | {
297 | if (Images2Movie.this.isFreeVersion)
298 | {
299 | Images2Movie.this.NormRes.setChecked(true);
300 | Images2Movie.this.HiRes.setChecked(false);
301 | Images2Movie.this.showDialog(9);
302 | }
303 | }
304 | });
305 | this.HiRes.setOnClickListener(new View.OnClickListener()
306 | {
307 | public void onClick(View paramView)
308 | {
309 | if (Images2Movie.this.isFreeVersion)
310 | {
311 | Images2Movie.this.NormRes.setChecked(true);
312 | Images2Movie.this.HiRes.setChecked(false);
313 | Images2Movie.this.showDialog(9);
314 | }
315 | }
316 | });
317 | this.SetMovieNameButton.setOnClickListener(new View.OnClickListener()
318 | {
319 | public void onClick(View paramView)
320 | {
321 | boolean bool;
322 | if (!Images2Movie.this.isFreeVersion)
323 | {
324 | Images2Movie localImages2Movie = Images2Movie.this;
325 | if (Images2Movie.this.settingName)
326 | {
327 | bool = false;
328 | localImages2Movie.settingName = bool;
329 | Images2Movie.this.movieNameTxt.setVisibility(0);
330 | Images2Movie.this.SetImgFolderButton.setVisibility(4);
331 | Images2Movie.this.SetMovieNameButton.setVisibility(4);
332 | Images2Movie.this.SetFPSButton.setVisibility(4);
333 | Images2Movie.this.FPSsetting.setVisibility(4);
334 | Images2Movie.this.ImageFolderText.setVisibility(4);
335 | Images2Movie.this.MovieFilenameText.setVisibility(4);
336 | Images2Movie.this.NormRes.setVisibility(4);
337 | Images2Movie.this.HiRes.setVisibility(4);
338 | Images2Movie.this.movieNameTxt.setSelectAllOnFocus(true);
339 | Images2Movie.this.MakeMovieButton.setText(" OK ");
340 | }
341 | }
342 | while (true)
343 | {
344 | return;
345 | bool = true;
346 | break;
347 | Images2Movie.this.showDialog(7);
348 | }
349 | }
350 | });
351 | this.SetFPSButton.setOnClickListener(new View.OnClickListener()
352 | {
353 | public void onClick(View paramView)
354 | {
355 | boolean bool;
356 | if (!Images2Movie.this.isFreeVersion)
357 | {
358 | Images2Movie localImages2Movie = Images2Movie.this;
359 | if (Images2Movie.this.settingFPS)
360 | {
361 | bool = false;
362 | localImages2Movie.settingFPS = bool;
363 | Images2Movie.this.decrementFPS.setVisibility(0);
364 | Images2Movie.this.FPSNumHolder.setVisibility(0);
365 | Images2Movie.this.incrementFPS.setVisibility(0);
366 | Images2Movie.this.TextFPSsetting.setVisibility(0);
367 | Images2Movie.this.SetImgFolderButton.setVisibility(4);
368 | Images2Movie.this.SetMovieNameButton.setVisibility(4);
369 | Images2Movie.this.SetFPSButton.setVisibility(4);
370 | Images2Movie.this.FPSsetting.setVisibility(4);
371 | Images2Movie.this.ImageFolderText.setVisibility(4);
372 | Images2Movie.this.MovieFilenameText.setVisibility(4);
373 | Images2Movie.this.NormRes.setVisibility(4);
374 | Images2Movie.this.HiRes.setVisibility(4);
375 | Images2Movie.this.movieNameTxt.setSelectAllOnFocus(true);
376 | Images2Movie.this.MakeMovieButton.setText(" OK ");
377 | }
378 | }
379 | while (true)
380 | {
381 | return;
382 | bool = true;
383 | break;
384 | Images2Movie.this.showDialog(8);
385 | }
386 | }
387 | });
388 | this.decrementFPS.setOnClickListener(new View.OnClickListener()
389 | {
390 | public void onClick(View paramView)
391 | {
392 | Images2Movie.this.decrement();
393 | }
394 | });
395 | this.decrementFPS.setOnLongClickListener(new View.OnLongClickListener()
396 | {
397 | public boolean onLongClick(View paramView)
398 | {
399 | Images2Movie.this.autoDecrement = true;
400 | Images2Movie.this.repeatUpdateHandler.post(new Images2Movie.RepetitiveUpdater(Images2Movie.this, null));
401 | return false;
402 | }
403 | });
404 | this.decrementFPS.setOnTouchListener(new View.OnTouchListener()
405 | {
406 | public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
407 | {
408 | if ((paramMotionEvent.getAction() == 1) && (Images2Movie.this.autoDecrement))
409 | Images2Movie.this.autoDecrement = false;
410 | return false;
411 | }
412 | });
413 | this.incrementFPS.setOnClickListener(new View.OnClickListener()
414 | {
415 | public void onClick(View paramView)
416 | {
417 | Images2Movie.this.increment();
418 | }
419 | });
420 | this.incrementFPS.setOnLongClickListener(new View.OnLongClickListener()
421 | {
422 | public boolean onLongClick(View paramView)
423 | {
424 | Images2Movie.this.autoIncrement = true;
425 | Images2Movie.this.repeatUpdateHandler.post(new Images2Movie.RepetitiveUpdater(Images2Movie.this, null));
426 | return false;
427 | }
428 | });
429 | this.incrementFPS.setOnTouchListener(new View.OnTouchListener()
430 | {
431 | public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
432 | {
433 | if ((paramMotionEvent.getAction() == 1) && (Images2Movie.this.autoIncrement))
434 | Images2Movie.this.autoIncrement = false;
435 | return false;
436 | }
437 | });
438 | this.MakeMovieButton.setOnClickListener(new View.OnClickListener()
439 | {
440 | public void onClick(View paramView)
441 | {
442 | if ((Images2Movie.this.settingName) && (!Images2Movie.this.settingFPS))
443 | Images2Movie.this.getNewProjectString();
444 | while (true)
445 | {
446 | return;
447 | if ((Images2Movie.this.settingFPS) && (!Images2Movie.this.settingName))
448 | {
449 | Images2Movie.this.settingFPS = false;
450 | Images2Movie.this.fpsIsSet = true;
451 | Images2Movie.this.decrementFPS.setVisibility(8);
452 | Images2Movie.this.FPSNumHolder.setVisibility(8);
453 | Images2Movie.this.incrementFPS.setVisibility(8);
454 | Images2Movie.this.TextFPSsetting.setVisibility(8);
455 | Images2Movie.this.SetImgFolderButton.setVisibility(0);
456 | Images2Movie.this.SetMovieNameButton.setVisibility(0);
457 | Images2Movie.this.SetFPSButton.setVisibility(0);
458 | Images2Movie.this.FPSsetting.setVisibility(0);
459 | Images2Movie.this.ImageFolderText.setVisibility(0);
460 | Images2Movie.this.MovieFilenameText.setVisibility(0);
461 | Images2Movie.this.NormRes.setVisibility(0);
462 | Images2Movie.this.HiRes.setVisibility(0);
463 | Images2Movie.this.MakeMovieButton.setText("Make Movie");
464 | String str = (String)Images2Movie.this.FPSNumHolder.getText();
465 | Images2Movie.this.fps = Integer.parseInt(str);
466 | Images2Movie.this.FPSsetting.setText(str);
467 | continue;
468 | }
469 | if ((Images2Movie.this.folderIsSet) && (Images2Movie.this.nameIsSet) && (Images2Movie.this.fpsIsSet))
470 | {
471 | Images2Movie.this.length = (Images2Movie.this.numberJpegs / Images2Movie.this.fps);
472 | DecimalFormat localDecimalFormat = new DecimalFormat("#0.00");
473 | Images2Movie.this.movieLength = localDecimalFormat.format(Images2Movie.this.length);
474 | if (Images2Movie.this.length < 1.0D)
475 | {
476 | Images2Movie.this.showDialog(4);
477 | continue;
478 | }
479 | new Images2Movie.12.1(this).start();
480 | continue;
481 | }
482 | Images2Movie.this.showDialog(2);
483 | }
484 | }
485 | });
486 | if (this.movieNameTxt.isShown())
487 | {
488 | this.movieNameTxt.setSelectAllOnFocus(true);
489 | this.movieNameTxt.setOnKeyListener(new View.OnKeyListener()
490 | {
491 | public boolean onKey(View paramView, int paramInt, KeyEvent paramKeyEvent)
492 | {
493 | switch (paramInt)
494 | {
495 | default:
496 | case 66:
497 | }
498 | for (int i = 0; ; i = 1)
499 | {
500 | return i;
501 | Images2Movie.this.getNewProjectString();
502 | }
503 | }
504 | });
505 | this.movieNameTxt.setOnEditorActionListener(new TextView.OnEditorActionListener()
506 | {
507 | public boolean onEditorAction(TextView paramTextView, int paramInt, KeyEvent paramKeyEvent)
508 | {
509 | if (paramInt == 6)
510 | Images2Movie.this.getNewProjectString();
511 | for (int i = 1; ; i = 0)
512 | return i;
513 | }
514 | });
515 | }
516 | ((ImageView)findViewById(2131165193)).setOnClickListener(new View.OnClickListener()
517 | {
518 | public void onClick(View paramView)
519 | {
520 | Intent localIntent = new Intent();
521 | localIntent.setAction("android.intent.action.VIEW");
522 | localIntent.addCategory("android.intent.category.BROWSABLE");
523 | if (Images2Movie.this.isFreeVersion)
524 | localIntent.setData(Uri.parse("market://details?id=com.ccs.pics2flix.Pro"));
525 | while (true)
526 | {
527 | Images2Movie.this.startActivity(localIntent);
528 | return;
529 | localIntent.setData(Uri.parse("market://search?q=pub:Controlled Capture Systems, LLC"));
530 | }
531 | }
532 | });
533 | }
534 |
535 | public Dialog onCreateDialog(int paramInt)
536 | {
537 | AlertDialog localAlertDialog;
538 | switch (paramInt)
539 | {
540 | default:
541 | localAlertDialog = null;
542 | case 7:
543 | case 8:
544 | case 9:
545 | case 1:
546 | case 2:
547 | case 5:
548 | case 6:
549 | case 3:
550 | case 4:
551 | }
552 | while (true)
553 | {
554 | return localAlertDialog;
555 | TextView localTextView3 = new TextView(this);
556 | SpannableString localSpannableString3 = new SpannableString("This feature is only available on our Pro applications which are available\n\n on the Controlled Capture Systems, LLC Android Market page \n\nFor your testing of this application, the Free version automatically names your movie 'NewMovie'.");
557 | Linkify.addLinks(localSpannableString3, Pattern.compile("Controlled Capture Systems, LLC"), "https://market.android.com/search?q=pub:");
558 | localTextView3.setText(localSpannableString3);
559 | localTextView3.setMovementMethod(LinkMovementMethod.getInstance());
560 | localTextView3.setLinkTextColor(-16711681);
561 | localAlertDialog = new AlertDialog.Builder(this).setTitle("Feature Disabled").setCancelable(true).setIcon(17301659).setPositiveButton(2131099689, null).setView(localTextView3).create();
562 | continue;
563 | TextView localTextView2 = new TextView(this);
564 | SpannableString localSpannableString2 = new SpannableString("This feature is only available on our Pro applications which are available\n\n on the Controlled Capture Systems, LLC Android Market page \n\nFor your testing of this application, the Free version automatically sets the FPS to 5 frames per second.");
565 | Linkify.addLinks(localSpannableString2, Pattern.compile("Controlled Capture Systems, LLC"), "https://market.android.com/search?q=pub:");
566 | localTextView2.setText(localSpannableString2);
567 | localTextView2.setMovementMethod(LinkMovementMethod.getInstance());
568 | localTextView2.setLinkTextColor(-16711681);
569 | localAlertDialog = new AlertDialog.Builder(this).setTitle("Feature Disabled").setCancelable(true).setIcon(17301659).setPositiveButton(2131099689, null).setView(localTextView2).create();
570 | continue;
571 | TextView localTextView1 = new TextView(this);
572 | SpannableString localSpannableString1 = new SpannableString("This feature is only available on our Pro applications which are available\n\n on the Controlled Capture Systems, LLC Android Market page \n\nFor your testing of this application, the Free version automatically sets the resolution at 640 x 480");
573 | Linkify.addLinks(localSpannableString1, Pattern.compile("Controlled Capture Systems, LLC"), "https://market.android.com/search?q=pub:");
574 | localTextView1.setText(localSpannableString1);
575 | localTextView1.setMovementMethod(LinkMovementMethod.getInstance());
576 | localTextView1.setLinkTextColor(-16711681);
577 | localAlertDialog = new AlertDialog.Builder(this).setTitle("Feature Disabled").setCancelable(true).setIcon(17301659).setPositiveButton(2131099689, null).setView(localTextView1).create();
578 | continue;
579 | localAlertDialog = new AlertDialog.Builder(this).setTitle("Please use only Letters or Numbers for your Movie names!").setIcon(17301543).setNegativeButton("OK", new DialogInterface.OnClickListener()
580 | {
581 | public void onClick(DialogInterface paramDialogInterface, int paramInt)
582 | {
583 | paramDialogInterface.dismiss();
584 | }
585 | }).create();
586 | continue;
587 | localAlertDialog = new AlertDialog.Builder(this).setTitle("Error, one of the necessary items is not set!").setIcon(17301543).setMessage("Please ensure Image Folder, Movie Filename, and Frames Per Sec (FPS) are set before trying to make movie.").setNegativeButton("OK", new DialogInterface.OnClickListener()
588 | {
589 | public void onClick(DialogInterface paramDialogInterface, int paramInt)
590 | {
591 | paramDialogInterface.dismiss();
592 | }
593 | }).create();
594 | continue;
595 | localAlertDialog = new AlertDialog.Builder(this).setTitle("No Movie to Play!").setIcon(17301543).setMessage("You must create a movie to play one!").setNegativeButton("OK", new DialogInterface.OnClickListener()
596 | {
597 | public void onClick(DialogInterface paramDialogInterface, int paramInt)
598 | {
599 | paramDialogInterface.dismiss();
600 | }
601 | }).create();
602 | continue;
603 | localAlertDialog = new AlertDialog.Builder(this).setTitle("Image Folder Not Set!").setIcon(17301543).setMessage("You must Set Image Folder before you can play one!").setNegativeButton("OK", new DialogInterface.OnClickListener()
604 | {
605 | public void onClick(DialogInterface paramDialogInterface, int paramInt)
606 | {
607 | paramDialogInterface.dismiss();
608 | }
609 | }).create();
610 | continue;
611 | localAlertDialog = new AlertDialog.Builder(this).setTitle("Would you like to watch your new movie?").setIcon(17301543).setNegativeButton("No", new DialogInterface.OnClickListener()
612 | {
613 | public void onClick(DialogInterface paramDialogInterface, int paramInt)
614 | {
615 | paramDialogInterface.dismiss();
616 | }
617 | }).setPositiveButton("Yes", new DialogInterface.OnClickListener()
618 | {
619 | public void onClick(DialogInterface paramDialogInterface, int paramInt)
620 | {
621 | paramDialogInterface.dismiss();
622 | Intent localIntent = new Intent(Images2Movie.this, VideoPlayer.class);
623 | localIntent.putExtra("directory", Images2Movie.this.movieFileName);
624 | localIntent.putExtra("fromCCS", false);
625 | localIntent.putExtra("adbased", false);
626 | Images2Movie.this.startActivityForResult(localIntent, 0);
627 | }
628 | }).create();
629 | continue;
630 | localAlertDialog = new AlertDialog.Builder(this).setTitle("Your New Movie will be too short to be playable!").setIcon(17301543).setMessage("Your movie is only " + this.movieLength + " secs long. Please take more images or set Frames Per Sec (FPS) to a lower number!").setNegativeButton("OK", new DialogInterface.OnClickListener()
631 | {
632 | public void onClick(DialogInterface paramDialogInterface, int paramInt)
633 | {
634 | paramDialogInterface.cancel();
635 | }
636 | }).create();
637 | }
638 | }
639 |
640 | public boolean onCreateOptionsMenu(Menu paramMenu)
641 | {
642 | getMenuInflater().inflate(2130903050, paramMenu);
643 | return true;
644 | }
645 |
646 | public boolean onOptionsItemSelected(MenuItem paramMenuItem)
647 | {
648 | switch (paramMenuItem.getItemId())
649 | {
650 | default:
651 | case 2131165211:
652 | case 2131165212:
653 | case 2131165213:
654 | }
655 | while (true)
656 | {
657 | return true;
658 | if (this.folderIsSet)
659 | {
660 | Intent localIntent3 = new Intent(this, FilePlayer.class);
661 | localIntent3.putExtra("directory", this.imageFiles);
662 | localIntent3.putExtra("adbased", false);
663 | localIntent3.putExtra("isFreeVersion", this.isFreeVersion);
664 | localIntent3.putExtra("useTimeStampName", this.useTimeStampName);
665 | startActivityForResult(localIntent3, 0);
666 | continue;
667 | }
668 | showDialog(6);
669 | continue;
670 | if (this.movieWasMade)
671 | {
672 | Intent localIntent2 = new Intent(this, VideoPlayer.class);
673 | localIntent2.putExtra("directory", this.movieFileName);
674 | localIntent2.putExtra("fromCCS", false);
675 | localIntent2.putExtra("adbased", false);
676 | startActivityForResult(localIntent2, 0);
677 | continue;
678 | }
679 | showDialog(5);
680 | continue;
681 | String str = SD_DIR + "/DCIM/myVideos/";
682 | Intent localIntent1 = new Intent(this, ListFiles.class);
683 | localIntent1.putExtra("directory", str);
684 | localIntent1.putExtra("videoenabled", true);
685 | localIntent1.putExtra("fromImgs2Movie", true);
686 | startActivityForResult(localIntent1, 0);
687 | }
688 | }
689 |
690 | public void onPrepareDialog(int paramInt, Dialog paramDialog)
691 | {
692 | switch (paramInt)
693 | {
694 | default:
695 | case 4:
696 | }
697 | while (true)
698 | {
699 | return;
700 | this.length = (this.numberJpegs / this.fps);
701 | this.movieLength = new DecimalFormat("#0.00").format(this.length);
702 | ((AlertDialog)paramDialog).setMessage("Your movie is only " + this.movieLength + " secs long. Please take more images or set Frames Per Sec (FPS) to a lower number!");
703 | }
704 | }
705 |
706 | public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
707 | {
708 | return false;
709 | }
710 |
711 | private class RepetitiveUpdater
712 | implements Runnable
713 | {
714 | private static final long REPEAT_DELAY;
715 |
716 | private RepetitiveUpdater()
717 | {
718 | }
719 |
720 | public void run()
721 | {
722 | if (Images2Movie.this.autoIncrement)
723 | {
724 | Images2Movie.this.increment();
725 | Images2Movie.this.repeatUpdateHandler.postDelayed(new RepetitiveUpdater(Images2Movie.this), 0L);
726 | }
727 | while (true)
728 | {
729 | return;
730 | if (Images2Movie.this.autoDecrement)
731 | {
732 | Images2Movie.this.decrement();
733 | Images2Movie.this.repeatUpdateHandler.postDelayed(new RepetitiveUpdater(Images2Movie.this), 0L);
734 | continue;
735 | }
736 | }
737 | }
738 | }
739 | }
--------------------------------------------------------------------------------