Skip to content

Add different image formats #3

@yuripourre

Description

@yuripourre

Java side:

class FakeCam {
  public static final int V4L2_PIX_FMT_YUV420 = 1;
  public static final int V4L2_PIX_FMT_RGB24 = 2;
}

C side:

#define FMT_YUV420 1
#define FMT_RGB24 2

JNIEXPORT jint JNICALL Java_com_harium_hci_fakecam_FakeCam_open(JNIEnv* env, jobject obj, jstring device, jint width, jint height, jint format) {
  switch(format) {
    case V4L2_PIX_FMT_YUV420:
      format = V4L2_PIX_FMT_YUV420;
    break;
    ....
  }
  initWithFormat(..., format);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions