|
|
@ -12,15 +12,28 @@ import com.otaliastudios.cameraview.filters.Filter; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* A preview that support GL filters defined through the {@link Filter} interface. |
|
|
|
* A preview that support GL filters defined through the {@link Filter} interface. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* The preview has the responsibility of calling {@link Filter#setPreviewingViewSize(int, int)} |
|
|
|
|
|
|
|
* whenever the preview size changes and as soon as the filter is applied. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public abstract class FilterCameraPreview<T extends View, Output> extends CameraPreview<T, Output> { |
|
|
|
public abstract class FilterCameraPreview<T extends View, Output> extends CameraPreview<T, Output> { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("WeakerAccess") |
|
|
|
public FilterCameraPreview(@NonNull Context context, @NonNull ViewGroup parent) { |
|
|
|
public FilterCameraPreview(@NonNull Context context, @NonNull ViewGroup parent) { |
|
|
|
super(context, parent); |
|
|
|
super(context, parent); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Sets a new filter. |
|
|
|
|
|
|
|
* @param filter new filter |
|
|
|
|
|
|
|
*/ |
|
|
|
public abstract void setFilter(@NonNull Filter filter); |
|
|
|
public abstract void setFilter(@NonNull Filter filter); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Returns the currently used filter. |
|
|
|
|
|
|
|
* @return currently used filter |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@SuppressWarnings("unused") |
|
|
|
@NonNull |
|
|
|
@NonNull |
|
|
|
public abstract Filter getCurrentFilter(); |
|
|
|
public abstract Filter getCurrentFilter(); |
|
|
|
} |
|
|
|
} |
|
|
|