/** @return {@code get(BytePointer.class, i).getString(charsetName)} * @see BytePointer#getString(String) */ public String getString(long i, String charsetName) throws UnsupportedEncodingException { BytePointer p = (BytePointer)get((Class<P>)BytePointer.class, i); return p != null ? p.getString(charsetName) : null; }
/** @return {@code get(BytePointer.class, i).getString()} * @see BytePointer#getString() */ public String getString(long i) { BytePointer p = (BytePointer)get((Class<P>)BytePointer.class, i); return p != null ? p.getString() : null; } /** @return {@code get(BytePointer.class, i).getString(charsetName)}
private String getWebcamNameForOs() { switch (OsUtils.getOS()) { case WIN: return videoInput.getDeviceName(address).getString(); case OSX: return "Webcam " + address; // XXX: any clues how to get webcam name on mac? case NIX: return vfile.getAbsolutePath(); default: throw new UnsupportedOperationException("Unsupported operating system"); } }
/** * Get the short name of this {@code Codec}. * * @return the short name of this {@code Codec}. */ public String getName() { if (avCodec == null) return null; return avCodec.name().getString(); }
protected static void checkCuda(int error) { if (error != cudaSuccess) { throw new RuntimeException("CUDA error = " + error + ": " + cudaGetErrorString(error).getString()); } }
protected static void checkCudnn(int status) { if (status != CUDNN_STATUS_SUCCESS) { throw new RuntimeException("cuDNN status = " + status + ": " + cudnnGetErrorString(status).getString()); } }
/** * Get the long name of this {@code Codec}. * * @return the long name of this {@code Codec}. */ public String getNameLong() { if (avCodec == null) return null; return avCodec.long_name().getString(); }
static String CameraInfo(CameraInfo pCamInfo) { return "\n*** CAMERA INFORMATION ***\n" + "Serial number - " + pCamInfo.serialNumber() + "\n" + "Camera model - " + pCamInfo.modelName().getString() + "\n" + "Camera vendor - " + pCamInfo.vendorName().getString() + "\n" + "Sensor - " + pCamInfo.sensorInfo().getString() + "\n" + "Resolution - " + pCamInfo.sensorResolution().getString() + "\n" + "Firmware version - " + pCamInfo.firmwareVersion().getString() + "\n" + "Firmware build time - " + pCamInfo.firmwareBuildTime().getString() + "\n"; }
@Override public String identify () { if (isAvailable()) { return "Tesseract OCR, version " + TessBaseAPI.Version().getString(); } else { return OCR.NO_OCR; } }
public String getString() { String s = clang_EvalResult_getAsStr(this).getString(); clang_EvalResult_dispose(this); return s; } }
/** * Get the format of the specified source. * * @return format of the media source. */ public String getInputFormat() { return formatContext == null ? format : formatContext.iformat().name().getString(); }
public String getString() { String s = clang_getCString(this).getString(); clang_disposeString(this); return s; } public native @Const Pointer data(); public native CXString data(Pointer data);
public static String[] getDeviceDescriptions() throws FrameGrabber.Exception { tryLoad(); String[] desc = new String[freenect2Context.enumerateDevices()]; for (int i = 0; i < desc.length; i++) { desc[i] = freenect2Context.getDeviceSerialNumber(i).getString(); } return desc; }
@Override public String getFormat() { if (oc == null) { return super.getFormat(); } else { return oc.iformat().name().getString(); } }
public static String[] getDeviceDescriptions() throws Exception { tryLoad(); int count = videoInput.listDevices(); String[] descriptions = new String[count]; for (int i = 0; i < descriptions.length; i++) { descriptions[i] = videoInput.getDeviceName(i).getString(); } return descriptions; }
import org.bytedeco.javacpp.*; public class Main { public static void main(String[] args) { Message.S_MESSAGE_STRUCT my_struct = new Message.S_MESSAGE_STRUCT(); IntPointer i1 = new IntPointer(1).put(1); BytePointer c1 = new BytePointer(128); my_struct.i1(i1); my_struct.c1(c1); my_struct.len(c1.capacity()); Message.t_func(my_struct); System.out.println(c1.getString()); } }
public static String[] getDeviceDescriptions() throws FrameGrabber.Exception { tryLoad(); String[] desc = new String[context.get_device_count()]; for (int i = 0; i < desc.length; i++) { desc[i] = context.get_device(i).get_name().getString(); } return desc; }
@Override public String getAudioMetadata(String key) { if (audio_st == null) { return super.getAudioMetadata(key); } AVDictionaryEntry entry = av_dict_get(audio_st.metadata(), key, null, 0); return entry == null || entry.value() == null ? null : entry.value().getString(); }
@Override public String getMetadata(String key) { if (oc == null) { return super.getMetadata(key); } AVDictionaryEntry entry = av_dict_get(oc.metadata(), key, null, 0); return entry == null || entry.value() == null ? null : entry.value().getString(); }
@Override public String getVideoMetadata(String key) { if (video_st == null) { return super.getVideoMetadata(key); } AVDictionaryEntry entry = av_dict_get(video_st.metadata(), key, null, 0); return entry == null || entry.value() == null ? null : entry.value().getString(); }