Merge "EmulatedFakeCamera2: Implement basic dump()"
This commit is contained in:
committed by
Android (Google) Code Review
commit
c4ae6ea167
@@ -455,6 +455,20 @@ int EmulatedFakeCamera2::getVendorTagType(uint32_t tag) {
|
||||
/** Shutdown and debug methods */
|
||||
|
||||
int EmulatedFakeCamera2::dump(int fd) {
|
||||
String8 result;
|
||||
|
||||
result.appendFormat(" Camera HAL device: EmulatedFakeCamera2\n");
|
||||
result.appendFormat(" Streams:\n");
|
||||
for (size_t i = 0; i < mStreams.size(); i++) {
|
||||
int id = mStreams.keyAt(i);
|
||||
const Stream& s = mStreams.valueAt(i);
|
||||
result.appendFormat(
|
||||
" Stream %d: %d x %d, format 0x%x, stride %d\n",
|
||||
id, s.width, s.height, s.format, s.stride);
|
||||
}
|
||||
|
||||
write(fd, result.string(), result.size());
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "fake-pipeline2/JpegCompressor.h"
|
||||
#include <utils/Condition.h>
|
||||
#include <utils/KeyedVector.h>
|
||||
#include <utils/String8.h>
|
||||
#include <utils/String16.h>
|
||||
#include <utils/Thread.h>
|
||||
|
||||
namespace android {
|
||||
|
||||
@@ -41,7 +41,6 @@ struct StreamBuffer {
|
||||
typedef Vector<StreamBuffer> Buffers;
|
||||
|
||||
struct Stream {
|
||||
uint32_t id;
|
||||
const camera2_stream_ops_t *ops;
|
||||
uint32_t width, height;
|
||||
uint32_t format;
|
||||
|
||||
Reference in New Issue
Block a user