tethr
Version:
Controlls USB-connected cameras, webcam, and smartphone camera from browser
190 lines (189 loc) • 4.62 kB
TypeScript
export declare enum OpCode {
Undefined = 4096,
GetDeviceInfo = 4097,
OpenSession = 4098,
CloseSession = 4099,
GetStorageIDs = 4100,
GetStorageInfo = 4101,
GetNumObjects = 4102,
GetObjectHandles = 4103,
GetObjectInfo = 4104,
GetObject = 4105,
GetThumb = 4106,
DeleteObject = 4107,
SendObjectInfo = 4108,
SendObject = 4109,
InitiateCapture = 4110,
FormatStore = 4111,
ResetDevice = 4112,
SelfTest = 4113,
SetObjectProtection = 4114,
PowerDown = 4115,
GetDevicePropDesc = 4116,
GetDevicePropValue = 4117,
SetDevicePropValue = 4118,
ResetDevicePropValue = 4119,
TerminateOpenCapture = 4120,
MoveObject = 4121,
CopyObject = 4122,
GetPartialObject = 4123,
InitiateOpenCapture = 4124
}
export declare enum ResCode {
Undefined = 8192,
OK = 8193,
GeneralError = 8194,
SessionNotOpen = 8195,
InvalidTransactionID = 8196,
OperationNotSupported = 8197,
ParameterNotSupported = 8198,
IncompleteTransfer = 8199,
InvalidStorageID = 8200,
InvalidObjectHandle = 8201,
DevicePropNotSupported = 8202,
InvalidObjectFormatCode = 8203,
StoreFull = 8204,
ObjectWriteProtected = 8205,
StoreReadOnly = 8206,
AccessDenied = 8207,
NoThumbnailPresent = 8208,
SelfTestFailed = 8209,
PartialDeletion = 8210,
StoreNotAvailable = 8211,
SpecificationByFormatUnsupported = 8212,
NoValidObjectInfo = 8213,
InvalidCodeFormat = 8214,
UnknownVendorCode = 8215,
CaptureAlreadyTerminated = 8216,
DeviceBusy = 8217,
InvalidParentObject = 8218,
InvalidDevicePropFormat = 8219,
InvalidDevicePropValue = 8220,
InvalidParameter = 8221,
SessionAlreadyOpen = 8222,
TransactionCancelled = 8223,
SpecificationOfDestinationUnsupported = 8224
}
export declare enum EventCode {
Undefined = 16384,
CancelTransaction = 16385,
ObjectAdded = 16386,
ObjectRemoved = 16387,
StoreAdded = 16388,
StoreRemoved = 16389,
DevicePropChanged = 16390,
ObjectInfoChanged = 16391,
DeviceInfoChanged = 16392,
RequestObjectTransfer = 16393,
StoreFull = 16394,
DeviceReset = 16395,
StorageInfoChanged = 16396,
CaptureComplete = 16397,
UnreportedStatus = 16398
}
export declare enum ObjectFormatCode {
Undefined = 12288,
Association = 12289,
Script = 12290,
Executable = 12291,
Text = 12292,
Html = 12293,
Dpof = 12294,
Aiff = 12295,
Wav = 12296,
MP3 = 12297,
AVI = 12298,
MPEG = 12299,
ASF = 12300,
Jpeg = 14337,
TiffEp = 14338,
FlashPix = 14339,
Bmp = 14340,
Ciff = 14341,
GIF = 14343,
JFIF = 14344,
PCD = 14345,
PICT = 14346,
PNG = 14347,
TIFF = 14349,
TiffIt = 14350,
Jp2 = 14351,
Jpx = 14352,
QuickTime = 12301
}
export declare enum DevicePropCode {
Undefined = 20480,
BatteryLevel = 20481,
FunctionalMode = 20482,
ImageSize = 20483,
CompressionSetting = 20484,
WhiteBalance = 20485,
RGBGain = 20486,
FNumber = 20487,
FocalLength = 20488,
FocusDistance = 20489,
FocusMode = 20490,
ExposureMeteringMode = 20491,
FlashMode = 20492,
ExposureTime = 20493,
ExposureProgramMode = 20494,
ExposureIndex = 20495,
ExposureBiasCompensation = 20496,
DateTime = 20497,
CaptureDelay = 20498,
StillCaptureMode = 20499,
Contrast = 20500,
Sharpness = 20501,
DigitalZoom = 20502,
ColorMode = 20503,
BurstNumber = 20504,
BurstInterval = 20505,
TimelapseNumber = 20506,
TimelapseInterval = 20507,
FocusMeteringMode = 20508,
UploadURL = 20509,
Artist = 20510,
CopyrightInfo = 20511
}
export declare enum DatatypeCode {
Undef = 0,
Int8 = 1,
Uint8 = 2,
Int16 = 3,
Uint16 = 4,
Int32 = 5,
Uint32 = 6,
Int64 = 7,
Uint64 = 8,
Int128 = 9,
Uint128 = 10,
Int8Array = 16385,
Uint8Array = 16386,
Int16Array = 16387,
Uint16Array = 16388,
Int32Array = 16389,
Uint32Array = 16390,
Int64Array = 16391,
Uint64Array = 16392,
Int128Array = 16393,
Uint128Array = 16394,
String = 65535
}
export declare enum PTPStorageTypeCode {
Undefined = 0,
FixedROM = 1,
RemovableROM = 2,
FixedRAM = 3,
RemovableRAM = 4
}
export declare enum PTPFilesystemTypeCode {
Undefined = 0,
GenericFlat = 1,
GenericHierarchical = 2,
DCF = 3
}
export declare enum PTPAccessCapabilityCode {
ReadWrite = 0,
ReadOnlyWithoutObjectDeletion = 1,
ReadOnlyWithObjectDeletion = 2
}