Package edsdk.utils.CanonConstants

Examples of edsdk.utils.CanonConstants.EdsError.description()


                    final NativeLongByReference number = new NativeLongByReference( new NativeLong( bufferSize ) );
                    EdsError err = CanonUtils.toEdsError( CanonCamera.EDSDK.EdsGetPropertySize( camera.getEdsCamera(), new NativeLong( i ), new NativeLong( 0 ), type, number ) );
                    if ( !err.equals( EdsError.EDS_ERR_PROPERTIES_UNAVAILABLE ) ) {
                        System.out.println( i + " (0x" +
                                            Integer.toHexString( i ) + "): " +
                                            err.description() );
                    }
                    if ( err == EdsError.EDS_ERR_OK ) {
                        final int size = (int) number.getValue().longValue();
                        final EdsDataType edsType = EdsDataType.enumOfValue( type.get( 0 ) );
                        if ( size > -1 ) {
View Full Code Here


    public static void check( final int result ) {
        if ( result != EdSdkLibrary.EDS_ERR_OK ) {
            final EdsError err = CanonUtils.toEdsError( result );
            System.err.println( "Error " + err.value() + ": " + err.name() +
                                " - " + err.description() );
        }
    }

    public static void debug( final EdsBaseRef.ByReference ... obj ) {
        System.out.println( "----------------" );
View Full Code Here

    private static void dispatchMessages() {
        // Do some initializing
        final EdsError err = CanonUtils.toEdsError( CanonCamera.EDSDK.EdsInitializeSDK() );
        if ( err != EdsError.EDS_ERR_OK ) {
            System.err.println( "EDSDK failed to initialize, most likely you won't be able to speak to your camera (ERROR: " +
                                err.description() + " )" );
        }

        final MSG msg = new MSG();

        CanonCommand<?> cmd = null;
View Full Code Here

        }

        throw new IllegalArgumentException( "An error occurred while getting " +
                                            property.name() + " data (error " +
                                            err.value() + ": " + err.name() +
                                            " - " + err.description() + ")" );
    }

    /**
     * see {@link CanonUtils#getPropertyType(EdsBaseRef, EdsPropertyID, long)}
     * @param ref
View Full Code Here

                                            property.name() +
                                            " data (error " +
                                            err.value() +
                                            ": " +
                                            err.name() +
                                            " - " + err.description() + ")" );
    }

    public static EdsError setCapacity( final EdsCameraRef ref ) {
        return CanonUtils.setCapacity( ref, Integer.MAX_VALUE );
    }
View Full Code Here

            System.err.println( "Could not start live view (set image mode) (error " +
                                err.value() +
                                ": " +
                                err.name() +
                                " - " +
                                err.description() + ")" );
            return false;
        }

        number = new NativeLongByReference( new NativeLong( EdsEvfOutputDevice.kEdsEvfOutputDevice_PC.value() ) );
        data = number.getPointer();
View Full Code Here

            System.err.println( "Could not start live view (set output device) (error " +
                                err.value() +
                                ": " +
                                err.name() +
                                " - " +
                                err.description() + ")" );
            return false;
        }

        return true;
    }
View Full Code Here

            System.err.println( "Failed to download live view image, memory stream could not be created (error " +
                                err.value() +
                                ": " +
                                err.name() +
                                " - " +
                                err.description() + ")" );
            CanonUtils.release( imageRef, streamRef );
            return null;
        }

        err = CanonUtils.toEdsError( CanonCamera.EDSDK.EdsCreateEvfImageRef( new EdsStreamRef( streamRef.getPointer().getPointer( 0 ) ), imageRef ) );
View Full Code Here

            System.err.println( "Failed to download live view image, image ref could not be created (error " +
                                err.value() +
                                ": " +
                                err.name() +
                                " - " +
                                err.description() + ")" );
            CanonUtils.release( imageRef, streamRef );
            return null;
        }

        // Now try to follow the guidelines from
View Full Code Here

                System.err.println( "Failed to download live view image, failed to read stream length (error " +
                                    err.value() +
                                    ": " +
                                    err.name() +
                                    " - " +
                                    err.description() + ")" );
                CanonUtils.release( imageRef, streamRef );
                return null;
            }

            final PointerByReference ref = new PointerByReference();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.