# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/saki/android-sdks/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

-keepclasseswithmembernames class * {
    native <methods>;
	*** mNativePtr;
	*** mNativeValue;
	*** mContext;
}

-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

-keep public class com.serenegiant.usb.uac.UACClient {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public class com.serenegiant.media.Encoder {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public class com.serenegiant.media.VideoEncoder {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public class com.serenegiant.media.VideoMuxer {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public class com.serenegiant.usb.uvc.Utils {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public interface com.serenegiant.camera.ICamera { *; }
-keep public interface com.serenegiant.camera.ICameraControl { *; }
-keep public interface com.serenegiant.camera.IFrameCallback { *; }

-keep public interface com.serenegiant.usb.uvc.IButtonCallback { *; }
-keep public interface com.serenegiant.usb.uvc.IStatusCallback { *; }
-keep public interface com.serenegiant.usb.uvc.IUVCCamera { *; }

-keep public class com.serenegiant.usb.uvc.IPipeline {*;}
-dontnote com.serenegiant.usb.uvc.IPipeline

-keep public class com.serenegiant.usb.uvc.ConvertPipeline {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public class com.serenegiant.usb.uvc.DistributePipeline {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public class com.serenegiant.usb.uvc.FrameCallbackPipeline {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public class com.serenegiant.usb.uvc.FrameSavePipeline {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public class com.serenegiant.usb.uvc.NativeCallbackPipeline {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public class com.serenegiant.usb.uvc.PreviewPipeline {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public class com.serenegiant.usb.uvc.SimpleBufferedPipeline {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public class com.serenegiant.usb.uvc.UVCPipeline {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public class com.serenegiant.usb.uvc.PipelineSource {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public class com.serenegiant.usb.uvc.PtsCalcPipeline {
    native <methods>;
	public *;
	protected *;
	private *;
}

-keep public class com.serenegiant.camera.FuncMaxMinDef {
	public *;
	protected *;
	private *;
}

##---------------Begin: proguard configuration for Gson  ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature

# For using GSON @Expose annotation
-keepattributes *Annotation*

# Gson specific classes
-keep class sun.misc.Unsafe
-keep class sun.misc.Unsafe.**
-dontnote sun.misc.Unsafe
#-keep class com.google.gson.stream.** { *; }

-keep class com.serenegiant.camera.Size
-keep class com.serenegiant.camera.Size { *; }

-keep public class com.serenegiant.aandusb.R
-keep public class com.serenegiant.aandusb.R.**
-keep public class com.serenegiant.aandusb.R.*$*
-keep public class com.serenegiant.aandusb.R.$**
-keep public class com.serenegiant.usb.R
-keep public class com.serenegiant.usb.R.**
-keep public class com.serenegiant.usb.R.*$*
-keep public class com.serenegiant.usb.R.$**

-keep public class com.serenegiant.uvcplugin.DeviceDetector {
    native <methods>;
	public *;
}

-keep public class com.serenegiant.uvcplugin.UVCHolder {
    native <methods>;
	public *;
}

-keep public class com.serenegiant.androidutils.AndroidUtils {
    native <methods>;
	public *;
}
