Kickflip / kickflip-android-sdk

Kickflip Android SDK - Live Video Streaming to the Cloud
https://kickflip.io
Apache License 2.0
658 stars 212 forks source link

Is the C source code open? #49

Open yulf opened 9 years ago

yulf commented 9 years ago

Hi, I found you have used ffmpeg to mix the audio and video, Is the C source code open? Where can I get it?

chrisballinger commented 9 years ago

ffmpeg.org?

On Sat, Sep 19, 2015 at 4:58 AM, yulf notifications@github.com wrote:

Hi, I found you have used ffmpeg to mix the audio and video, Is the C source code open? Where can I get it?

— Reply to this email directly or view it on GitHub https://github.com/Kickflip/kickflip-android-sdk/issues/49.

yulf commented 9 years ago

The author must have modified some codes to satisfy the application. This is the key.

chrisballinger commented 9 years ago

No, the FFmpeg sources are unmodified. The JNI bridge is open source.

On Mon, Sep 21, 2015 at 6:41 PM, yulf notifications@github.com wrote:

The author must have modified some codes to satisfy the application. This is the key.

— Reply to this email directly or view it on GitHub https://github.com/Kickflip/kickflip-android-sdk/issues/49#issuecomment-142156608 .

yulf commented 9 years ago

Where can I download the JNI bridge codes?

chrisballinger commented 9 years ago

https://github.com/Kickflip/kickflip-android-sdk/blob/master/sdk/src/main/java/net/openwatch/ffmpegwrapper/FFmpegWrapper.java

Cant seem to find the .c file, but it's somewhere.

yulf commented 9 years ago

Did the author release the C source code ? I can not find them.

Arlem commented 9 years ago

The FFmpeg wrapper can be found here: https://github.com/OpenWatch/FFmpegWrapper-Android/tree/master/FFmpegWrapper/jni

But, if you want to make changes to that code, you have to build the library with ndk-build.sh

EDIT: the compiled and built .so library goes here: https://github.com/Kickflip/kickflip-android-sdk/tree/master/sdk/src/main/jniLibs

Pay attention to match library/architecture

yulf commented 9 years ago

In https://github.com/Kickflip/kickflip-android-sdk/blob/master/sdk/src/main/java/net/openwatch/ffmpegwrapper/FFmpegWrapper.java, there are functions as follow: public native void setAVOptions(AVOptions jOpts); public native void prepareAVFormatContext(String jOutputPath); public native void writeAVPacketFromEncodedData(ByteBuffer jData, int jIsVideo, int jOffset, int jSize, int jFlags, long jPts); public native void finalizeAVFormatContext();

But, In https://github.com/OpenWatch/FFmpegWrapper-Android/blob/master/FFmpegWrapper/jni/FFmpegWrapper.c, I can not find corresponding C implementations.

Arlem commented 9 years ago

prepareAVFormatContext -> https://github.com/OpenWatch/FFmpegWrapper-Android/blob/master/FFmpegWrapper/jni/FFmpegWrapper.c#L302 setAVOptions -> https://github.com/OpenWatch/FFmpegWrapper-Android/blob/master/FFmpegWrapper/jni/FFmpegWrapper.c#L345 writeAVPacketFromEncodedData -> https://github.com/OpenWatch/FFmpegWrapper-Android/blob/master/FFmpegWrapper/jni/FFmpegWrapper.c#L374 finalizeAVFormatContext -> https://github.com/OpenWatch/FFmpegWrapper-Android/blob/master/FFmpegWrapper/jni/FFmpegWrapper.c#L432