Searched defs:fd (Results 51 - 75 of 163) sorted by relevance

1234567

/frameworks/base/media/java/android/media/
H A DSoundPool.java145 ParcelFileDescriptor fd = ParcelFileDescriptor.open(f, ParcelFileDescriptor.MODE_READ_ONLY);
146 if (fd != null) {
147 id = _load(fd.getFileDescriptor(), 0, f.length(), priority);
148 //Log.v(TAG, "close fd");
149 fd.close();
179 //Log.v(TAG, "close fd");
200 throw new AndroidRuntimeException("no length for fd");
215 * @param fd a FileDescriptor object
222 public int load(FileDescriptor fd, long offset, long length, int priority) { argument
223 return _load(fd, offse
228 _load(FileDescriptor fd, long offset, long length, int priority) argument
[all...]
/frameworks/base/media/libdrm/mobile2/src/util/ustl-1.0/
H A Dofstream.h20 /// \brief A string stream that writes to an fd. Implements cout and cerr.
34 inline int fd (void) const { return (m_File.fd()); } function in class:ustl::ofstream
49 /// \brief A string stream that reads from an fd. Implements cin.
62 inline int fd (void) const { return (m_File.fd()); } function in class:ustl::ifstream
/frameworks/base/media/libmedia/
H A DIMediaPlayerService.cpp79 virtual sp<IMediaPlayer> create(pid_t pid, const sp<IMediaPlayerClient>& client, int fd, int64_t offset, int64_t length) argument
85 data.writeFileDescriptor(fd);
104 virtual sp<IMemory> decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) argument
108 data.writeFileDescriptor(fd);
155 int fd = dup(data.readFileDescriptor()); local
158 sp<IMediaPlayer> player = create(pid, client, fd, offset, length);
177 int fd = dup(data.readFileDescriptor()); local
183 sp<IMemory> player = decode(fd, offset, length, &sampleRate, &numChannels, &format);
H A Dmediametadataretriever.cpp110 status_t MediaMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t length) argument
112 LOGV("setDataSource(%d, %lld, %lld)", fd, offset, length);
117 if (fd < 0 || offset < 0 || length < 0) {
121 return mRetriever->setDataSource(fd, offset, length);
/frameworks/base/media/libmediaplayerservice/
H A DMetadataRetrieverClient.cpp57 extern player_type getPlayerType(int fd, int64_t offset, int64_t length);
77 status_t MetadataRetrieverClient::dump(int fd, const Vector<String16>& args) const argument
85 write(fd, result.string(), result.size());
86 write(fd, "\n", 1);
158 status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t length) argument
160 LOGV("setDataSource fd=%d, offset=%lld, length=%lld", fd, offset, length);
163 int ret = fstat(fd, &sb);
165 LOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno));
176 ::close(fd);
[all...]
H A DStagefrightPlayer.cpp45 status_t StagefrightPlayer::setDataSource(int fd, int64_t offset, int64_t length) { argument
46 LOGV("setDataSource(%d, %lld, %lld)", fd, offset, length);
49 mPlayer = new MediaPlayerImpl(dup(fd), offset, length);
/frameworks/base/services/jni/
H A Dcom_android_server_SensorService.cpp88 jobject fd = env->NewObject(gFileDescriptorOffsets.mClass, local
90 env->SetIntField(fd, gFileDescriptorOffsets.mDescriptor, handle->data[i]);
93 gParcelFileDescriptorOffsets.mConstructor, fd);
/frameworks/base/tools/localize/
H A Dfile_utils.cpp125 int fd; local
128 fd = open(filename.c_str(), O_RDONLY);
129 if (fd == -1) {
134 while ((amt = read(fd, buf, sizeof(buf)-1)) > 0) {
138 close(fd);
164 int fd = open(filename.c_str(), O_RDWR | O_CREAT | O_TRUNC, 0666); local
165 if (fd < 0) {
171 ssize_t amt = write(fd, text.c_str(), text.length());
173 close(fd);
/frameworks/base/cmds/runtime/
H A Dmain_runtime.cpp233 int fd = open("/dev/null", O_RDWR, 0); local
234 if (fd < 0) {
237 dup2(fd, 0);
238 dup2(fd, 1);
239 dup2(fd, 2);
240 close(fd);
257 int fd; local
262 fd = open("/dev/alarm", O_RDWR);
263 if(fd < 0) {
267 res = ioctl(fd, ANDROID_ALARM_GET_TIM
[all...]
/frameworks/base/core/java/android/app/
H A DService.java505 * @param fd The raw file descriptor that the dump is being sent to.
510 protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) { argument
/frameworks/base/core/java/android/bluetooth/
H A DBluetoothSocket.java109 * @param fd fd to use for connected socket, or -1 for a new socket
118 /*package*/ BluetoothSocket(int type, int fd, boolean auth, boolean encrypt, argument
120 if (type == BluetoothSocket.TYPE_RFCOMM && uuid == null && fd == -1) {
141 if (fd == -1) {
144 initSocketFromFdNative(fd);
155 * @param fd fd to use for connected socket, or -1 for a new socket
163 private BluetoothSocket(int type, int fd, boolean auth, boolean encrypt, String address, argument
165 this(type, fd, aut
324 initSocketFromFdNative(int fd) argument
[all...]
/frameworks/base/core/java/android/content/pm/
H A DRegisteredServicesCache.java120 public void dump(FileDescriptor fd, PrintWriter fout, String[] args) { argument
/frameworks/base/core/java/android/content/res/
H A DAssetFileDescriptor.java50 * @param fd The underlying file descriptor.
56 public AssetFileDescriptor(ParcelFileDescriptor fd, long startOffset, argument
62 mFd = fd;
187 public AutoCloseInputStream(AssetFileDescriptor fd) throws IOException { argument
188 super(fd.getParcelFileDescriptor());
189 super.skip(fd.getStartOffset());
190 mRemaining = (int)fd.getLength();
291 public AutoCloseMemoryFileInputStream(ParcelFileDescriptor fd, int length) argument
293 super(fd.getFileDescriptor());
294 mParcelFd = fd;
349 AutoCloseOutputStream(AssetFileDescriptor fd) argument
[all...]
/frameworks/base/core/java/android/inputmethodservice/
H A DIInputMethodWrapper.java157 @Override protected void dump(FileDescriptor fd, PrintWriter fout, String[] args) { argument
169 fd, fout, args, latch));
/frameworks/base/core/java/android/os/
H A DBinder.java196 ParcelFileDescriptor fd = data.readFileDescriptor();
198 if (fd != null) {
200 dump(fd.getFileDescriptor(), args);
203 fd.close();
217 public void dump(FileDescriptor fd, String[] args) { argument
218 FileOutputStream fout = new FileOutputStream(fd);
221 dump(fd, pw, args);
230 * @param fd The raw file descriptor that the dump is being sent to.
235 protected void dump(FileDescriptor fd, PrintWriter fout, String[] args) { argument
316 public void dump(FileDescriptor fd, Strin argument
[all...]
H A DMemoryFile.java46 private static native int native_mmap(FileDescriptor fd, int length, int mode) argument
49 private static native void native_close(FileDescriptor fd); argument
50 private static native int native_read(FileDescriptor fd, int address, byte[] buffer, argument
52 private static native void native_write(FileDescriptor fd, int address, byte[] buffer, argument
54 private static native void native_pin(FileDescriptor fd, boolean pin) throws IOException; argument
55 private static native int native_get_mapped_size(FileDescriptor fd) throws IOException; argument
82 * @param fd File descriptor for an existing memory file, as returned by
87 * @throws NullPointerException if <code>fd</code> is null.
88 * @throws IOException If <code>fd</code> does not refer to an existing memory file,
94 public MemoryFile(FileDescriptor fd, in argument
302 isMemoryFile(FileDescriptor fd) argument
315 getMappedSize(FileDescriptor fd) argument
[all...]
/frameworks/base/core/jni/
H A Dandroid_bluetooth_BluetoothSocket.cpp67 static void initSocketFromFdNative(JNIEnv *env, jobject obj, jint fd) { argument
71 struct asocket *s = asocket_init(fd);
90 int fd; local
101 fd = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
104 fd = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_SCO);
107 fd = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP);
114 if (fd < 0) {
138 if (setsockopt(fd, SOL_RFCOMM, RFCOMM_LM, &lm, sizeof(lm))) {
147 if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof(sndbuf))) {
154 LOGV("...fd
312 int fd; local
509 int fd = s->fd; local
[all...]
H A Dandroid_os_FileUtils.cpp127 int fd = open(pathStr, O_RDONLY); local
128 if (fd >= 0) {
129 result = ioctl(fd, VFAT_IOCTL_GET_VOLUME_ID);
130 close(fd);
H A Dcom_android_internal_os_ZygoteInit.cpp111 int fd; local
114 fd = jniGetFDFromFileDescriptor(env, in);
121 err = dup2(fd, STDIN_FILENO);
124 fd = jniGetFDFromFileDescriptor(env, out);
131 err = dup2(fd, STDOUT_FILENO);
134 fd = jniGetFDFromFileDescriptor(env, errfd);
141 err = dup2(fd, STDERR_FILENO);
148 int fd; local
151 fd = jniGetFDFromFileDescriptor(env, descriptor);
158 err = close(fd);
170 int fd; local
283 int fd = jniGetFDFromFileDescriptor(env, fdObj); local
313 int fd = jniGetFDFromFileDescriptor(env, fdObj); local
324 com_android_internal_os_ZygoteInit_createFileDescriptor( JNIEnv *env, jobject clazz, jint fd) argument
[all...]
/frameworks/base/graphics/java/android/graphics/
H A DBitmapFactory.java523 * @param fd The file descriptor containing the bitmap data to decode
532 public static Bitmap decodeFileDescriptor(FileDescriptor fd, Rect outPadding, Options opts) { argument
534 if (MemoryFile.isMemoryFile(fd)) {
535 int mappedlength = MemoryFile.getMappedSize(fd);
536 MemoryFile file = new MemoryFile(fd, mappedlength, "r");
545 Bitmap bm = nativeDecodeFileDescriptor(fd, outPadding, opts);
554 * @param fd The file descriptor containing the bitmap data to decode
557 public static Bitmap decodeFileDescriptor(FileDescriptor fd) { argument
558 return decodeFileDescriptor(fd, null, null);
563 private static native Bitmap nativeDecodeFileDescriptor(FileDescriptor fd, argument
[all...]
/frameworks/base/libs/audioflinger/
H A DAudioDumpInterface.cpp368 status_t AudioStreamOutDump::dump(int fd, const Vector<String16>& args) argument
370 if (mFinalStream != 0 ) return mFinalStream->dump(fd, args);
506 status_t AudioStreamInDump::dump(int fd, const Vector<String16>& args) argument
508 if (mFinalStream != 0 ) return mFinalStream->dump(fd, args);
H A DAudioHardwareGeneric.cpp164 status_t AudioHardwareGeneric::dumpInternals(int fd, const Vector<String16>& args) argument
172 ::write(fd, result.string(), result.size());
176 status_t AudioHardwareGeneric::dump(int fd, const Vector<String16>& args) argument
178 dumpInternals(fd, args);
180 mInput->dump(fd, args);
183 mOutput->dump(fd, args);
192 int fd,
222 mFd = fd;
243 status_t AudioStreamOutGeneric::dump(int fd, const Vector<String16>& args) argument
264 ::write(fd, resul
190 set( AudioHardwareGeneric *hw, int fd, uint32_t devices, int *pFormat, uint32_t *pChannels, uint32_t *pRate) argument
304 set( AudioHardwareGeneric *hw, int fd, uint32_t devices, int *pFormat, uint32_t *pChannels, uint32_t *pRate, AudioSystem::audio_in_acoustics acoustics) argument
351 dump(int fd, const Vector<String16>& args) argument
[all...]
/frameworks/base/libs/binder/
H A DBinder.cpp130 status_t BBinder::dump(int fd, const Vector<String16>& args) argument
193 int fd = data.readFileDescriptor(); local
199 return dump(fd, args);
H A DBpBinder.cpp145 status_t BpBinder::dump(int fd, const Vector<String16>& args) argument
149 send.writeFileDescriptor(fd);
H A DProcessState.cpp329 int fd = open("/dev/binder", O_RDWR); local
330 if (fd >= 0) {
331 fcntl(fd, F_SETFD, FD_CLOEXEC);
334 status_t result = ioctl(fd, BINDER_VERSION, &vers);
341 close(fd);
342 fd = -1;
346 close(fd);
347 fd = -1;
351 result = ioctl(fd, BINDER_SET_MAX_THREADS, &maxThreads);
360 return fd;
[all...]

Completed in 510 milliseconds

1234567