Android Open Source - remoteyourcam-usb Camera






From Project

Back to project page remoteyourcam-usb.

License

The source code is released under:

Apache License

If you think the Android project remoteyourcam-usb listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/**
 * Copyright 2013 Nils Assbeck, Guersel Ayaz and Michael Zoech
 */*from ww w .j av a 2s  .  c om*/
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.remoteyourcam.usb.ptp;

import java.io.File;
import java.util.List;

import android.graphics.Bitmap;

import com.remoteyourcam.usb.ptp.model.LiveViewData;
import com.remoteyourcam.usb.ptp.model.ObjectInfo;

public interface Camera {

    public static class Property {
        public static final int ShutterSpeed = 1;
        public static final int ApertureValue = 2;
        public static final int IsoSpeed = 3;
        public static final int Whitebalance = 4;
        public static final int ShootingMode = 5;
        public static final int BatteryLevel = 6;
        public static final int AvailableShots = 7;
        public static final int ColorTemperature = 8;
        public static final int FocusMode = 9;
        public static final int PictureStyle = 10;
        public static final int ExposureMeteringMode = 11;
        public static final int FocusMeteringMode = 12;
        public static final int CurrentFocusPoint = 13;
        public static final int CurrentExposureIndicator = 14;
        public static final int FocusPoints = 15;
        public static final int ExposureCompensation = 16;
    }

    public static class DriveLens {
        public static final int Near = 1;
        public static final int Far = 2;
        public static final int Soft = 1;
        public static final int Medium = 2;
        public static final int Hard = 3;
    }

    public interface CameraListener {

        void onCameraStarted(Camera camera);

        void onCameraStopped(Camera camera);

        void onNoCameraFound();

        void onError(String message);

        void onPropertyChanged(int property, int value);

        void onPropertyStateChanged(int property, boolean enabled);

        void onPropertyDescChanged(int property, int[] values);

        void onLiveViewStarted();

        void onLiveViewData(LiveViewData data);

        void onLiveViewStopped();

        void onCapturedPictureReceived(int objectHandle, String filename, Bitmap thumbnail, Bitmap bitmap);

        void onBulbStarted();

        void onBulbExposureTime(int seconds);

        void onBulbStopped();

        void onFocusStarted();

        void onFocusEnded(boolean hasFocused);

        void onFocusPointsChanged();

        void onObjectAdded(int handle, int format);
    }

    // callbacks aren't on UI thread
    public interface WorkerListener {
        void onWorkerStarted();

        void onWorkerEnded();
    }

    // callbacks aren't on UI thread
    public interface StorageInfoListener {
        void onStorageFound(int handle, String label);

        void onAllStoragesFound();

        void onImageHandlesRetrieved(int[] handles);
    }

    public interface RetrieveImageInfoListener {
        void onImageInfoRetrieved(int objectHandle, ObjectInfo objectInfo, Bitmap thumbnail);
    }

    public interface RetrieveImageListener {
        void onImageRetrieved(int objectHandle, Bitmap image);
    }

    void setWorkerListener(WorkerListener listener);

    void setCapturedPictureSampleSize(int sampleSize);

    String getDeviceName();

    boolean isSessionOpen();

    int getProperty(int property);

    boolean getPropertyEnabledState(int property);

    int[] getPropertyDesc(int property);

    void setProperty(int property, int value);

    String propertyToString(int property, int value);

    Integer propertyToIcon(int property, int value);

    String getBiggestPropertyValue(int property);

    void focus();

    boolean isAutoFocusSupported();

    void capture();

    boolean isLiveViewSupported();

    boolean isLiveViewAfAreaSupported();

    boolean isHistogramSupported();

    boolean isLiveViewOpen();

    void setLiveView(boolean enabled);

    void getLiveViewPicture(LiveViewData reuse);

    /**
     * Sets the center point of the auto focus frame in Live view.
     *
     * @param posx
     *            range 0.0 (left) - 1.0 (right)
     * @param posy
     *            range 0.0 (top) - 1.0 (bottom)
     */
    void setLiveViewAfArea(float posx, float posy);

    boolean isDriveLensSupported();

    void driveLens(int driveDirection, int pulses);

    boolean isSettingPropertyPossible(int property);

    void writeDebugInfo(File out);

    String getDeviceInfo();

    List<FocusPoint> getFocusPoints();

    void retrievePicture(int objectHandle);

    void retrieveStorages(StorageInfoListener listener);

    void retrieveImageHandles(StorageInfoListener listener, int storageId, int objectFormat);

    void retrieveImageInfo(RetrieveImageInfoListener listener, int objectHandle);

    void retrieveImage(RetrieveImageListener listener, int objectHandle);
}




Java Source Code List

com.remoteyourcam.usb.AbstractRycApplication.java
com.remoteyourcam.usb.AppConfig.java
com.remoteyourcam.usb.AppSettings.java
com.remoteyourcam.usb.GestureDetector.java
com.remoteyourcam.usb.MainActivity.java
com.remoteyourcam.usb.PictureView.java
com.remoteyourcam.usb.PropertyAdapter.java
com.remoteyourcam.usb.PropertyData.java
com.remoteyourcam.usb.PropertyDisplayer.java
com.remoteyourcam.usb.PropertyToggle.java
com.remoteyourcam.usb.RycApplication.java
com.remoteyourcam.usb.activities.AppSettingsActivity.java
com.remoteyourcam.usb.ptp.Camera.java
com.remoteyourcam.usb.ptp.EosCamera.java
com.remoteyourcam.usb.ptp.EosConstants.java
com.remoteyourcam.usb.ptp.FocusPoint.java
com.remoteyourcam.usb.ptp.NikonCamera.java
com.remoteyourcam.usb.ptp.PacketUtil.java
com.remoteyourcam.usb.ptp.PtpAction.java
com.remoteyourcam.usb.ptp.PtpCamera.java
com.remoteyourcam.usb.ptp.PtpConstants.java
com.remoteyourcam.usb.ptp.PtpPropertyHelper.java
com.remoteyourcam.usb.ptp.PtpService.java
com.remoteyourcam.usb.ptp.PtpUsbConnection.java
com.remoteyourcam.usb.ptp.PtpUsbService.java
com.remoteyourcam.usb.ptp.WorkerNotifier.java
com.remoteyourcam.usb.ptp.commands.CloseSessionCommand.java
com.remoteyourcam.usb.ptp.commands.Command.java
com.remoteyourcam.usb.ptp.commands.GetDeviceInfoCommand.java
com.remoteyourcam.usb.ptp.commands.GetDevicePropDescCommand.java
com.remoteyourcam.usb.ptp.commands.GetDevicePropValueCommand.java
com.remoteyourcam.usb.ptp.commands.GetObjectCommand.java
com.remoteyourcam.usb.ptp.commands.GetObjectHandlesCommand.java
com.remoteyourcam.usb.ptp.commands.GetObjectInfoCommand.java
com.remoteyourcam.usb.ptp.commands.GetStorageIdsCommand.java
com.remoteyourcam.usb.ptp.commands.GetStorageInfoCommand.java
com.remoteyourcam.usb.ptp.commands.GetStorageInfosAction.java
com.remoteyourcam.usb.ptp.commands.GetThumb.java
com.remoteyourcam.usb.ptp.commands.InitiateCaptureCommand.java
com.remoteyourcam.usb.ptp.commands.OpenSessionCommand.java
com.remoteyourcam.usb.ptp.commands.RetrieveAddedObjectInfoAction.java
com.remoteyourcam.usb.ptp.commands.RetrieveImageAction.java
com.remoteyourcam.usb.ptp.commands.RetrieveImageInfoAction.java
com.remoteyourcam.usb.ptp.commands.RetrievePictureAction.java
com.remoteyourcam.usb.ptp.commands.SetDevicePropValueCommand.java
com.remoteyourcam.usb.ptp.commands.SimpleCommand.java
com.remoteyourcam.usb.ptp.commands.eos.EosCommand.java
com.remoteyourcam.usb.ptp.commands.eos.EosEventCheckCommand.java
com.remoteyourcam.usb.ptp.commands.eos.EosGetLiveViewPictureCommand.java
com.remoteyourcam.usb.ptp.commands.eos.EosOpenSessionAction.java
com.remoteyourcam.usb.ptp.commands.eos.EosSetExtendedEventInfoCommand.java
com.remoteyourcam.usb.ptp.commands.eos.EosSetLiveViewAction.java
com.remoteyourcam.usb.ptp.commands.eos.EosSetPcModeCommand.java
com.remoteyourcam.usb.ptp.commands.eos.EosSetPropertyCommand.java
com.remoteyourcam.usb.ptp.commands.eos.EosTakePictureCommand.java
com.remoteyourcam.usb.ptp.commands.nikon.NikonAfDriveCommand.java
com.remoteyourcam.usb.ptp.commands.nikon.NikonAfDriveDeviceReadyCommand.java
com.remoteyourcam.usb.ptp.commands.nikon.NikonCloseSessionAction.java
com.remoteyourcam.usb.ptp.commands.nikon.NikonCommand.java
com.remoteyourcam.usb.ptp.commands.nikon.NikonEventCheckCommand.java
com.remoteyourcam.usb.ptp.commands.nikon.NikonGetLiveViewImageAction.java
com.remoteyourcam.usb.ptp.commands.nikon.NikonGetLiveViewImageCommand.java
com.remoteyourcam.usb.ptp.commands.nikon.NikonGetVendorPropCodesCommand.java
com.remoteyourcam.usb.ptp.commands.nikon.NikonOpenSessionAction.java
com.remoteyourcam.usb.ptp.commands.nikon.NikonStartLiveViewAction.java
com.remoteyourcam.usb.ptp.commands.nikon.NikonStopLiveViewAction.java
com.remoteyourcam.usb.ptp.model.DeviceInfo.java
com.remoteyourcam.usb.ptp.model.DevicePropDesc.java
com.remoteyourcam.usb.ptp.model.LiveViewData.java
com.remoteyourcam.usb.ptp.model.ObjectInfo.java
com.remoteyourcam.usb.ptp.model.StorageInfo.java
com.remoteyourcam.usb.util.DimenUtil.java
com.remoteyourcam.usb.util.NotificationIds.java
com.remoteyourcam.usb.util.PackageUtil.java
com.remoteyourcam.usb.view.AspectRatioImageView.java
com.remoteyourcam.usb.view.BaseFragment.java
com.remoteyourcam.usb.view.GalleryAdapter.java
com.remoteyourcam.usb.view.GalleryFragment.java
com.remoteyourcam.usb.view.PictureFragment.java
com.remoteyourcam.usb.view.SessionActivity.java
com.remoteyourcam.usb.view.SessionFragment.java
com.remoteyourcam.usb.view.SessionView.java
com.remoteyourcam.usb.view.StorageAdapter.java
com.remoteyourcam.usb.view.TabletSessionFragment.java
com.remoteyourcam.usb.view.ThumbnailAdapter.java
com.remoteyourcam.usb.view.WebViewDialogFragment.java