OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 @Override public void run() { | 288 @Override public void run() { |
289 startPreviewOnCameraThread(width, height, framerate); | 289 startPreviewOnCameraThread(width, height, framerate); |
290 } | 290 } |
291 }); | 291 }); |
292 } | 292 } |
293 | 293 |
294 public synchronized List<CaptureFormat> getSupportedFormats() { | 294 public synchronized List<CaptureFormat> getSupportedFormats() { |
295 return supportedFormats.get(id); | 295 return supportedFormats.get(id); |
296 } | 296 } |
297 | 297 |
| 298 // Return a list of timestamps for the frames that have been sent out, but not
returned yet. |
| 299 // Useful for logging and testing. |
| 300 public String pendingFramesTimeStamps() { |
| 301 return videoBuffers.pendingFramesTimeStamps(); |
| 302 } |
| 303 |
298 private VideoCapturerAndroid() { | 304 private VideoCapturerAndroid() { |
299 Log.d(TAG, "VideoCapturerAndroid"); | 305 Log.d(TAG, "VideoCapturerAndroid"); |
300 } | 306 } |
301 | 307 |
302 // Called by native code. | 308 // Called by native code. |
303 // Enumerates resolution and frame rates for all cameras to be able to switch | 309 // Enumerates resolution and frame rates for all cameras to be able to switch |
304 // cameras. Initializes local variables for the camera named |deviceName| and | 310 // cameras. Initializes local variables for the camera named |deviceName| and |
305 // starts a thread to be used for capturing. | 311 // starts a thread to be used for capturing. |
306 // If deviceName is empty, the first available device is used in order to be | 312 // If deviceName is empty, the first available device is used in order to be |
307 // compatible with the generic VideoCapturer class. | 313 // compatible with the generic VideoCapturer class. |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 } | 1003 } |
998 | 1004 |
999 private native void nativeCapturerStarted(long nativeCapturer, | 1005 private native void nativeCapturerStarted(long nativeCapturer, |
1000 boolean success); | 1006 boolean success); |
1001 private native void nativeOnFrameCaptured(long nativeCapturer, | 1007 private native void nativeOnFrameCaptured(long nativeCapturer, |
1002 byte[] data, int length, int width, int height, int rotation, long timeS
tamp); | 1008 byte[] data, int length, int width, int height, int rotation, long timeS
tamp); |
1003 private native void nativeOnOutputFormatRequest(long nativeCapturer, | 1009 private native void nativeOnOutputFormatRequest(long nativeCapturer, |
1004 int width, int height, int fps); | 1010 int width, int height, int fps); |
1005 } | 1011 } |
1006 } | 1012 } |
OLD | NEW |