// File: OtherCrashOverride[P]xu4enc/./M2M.h
// Function: M2M::ApplyInputSettings()
void ApplyInputSettings()
	{
		// Apply capture settings
		v4l2_format format = { 0 };
		format.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
		format.fmt.pix_mp.width = width;
		format.fmt.pix_mp.height = height;
		format.fmt.pix_mp.pixelformat = V4L2_PIX_FMT_NV12M;
		format.fmt.pix_mp.num_planes = 2;

		int io = ioctl(mfc_fd, VIDIOC_S_FMT, &format);
		if (io < 0)
		{
			throw Exception("VIDIOC_S_FMT failed.");
		}

		fprintf(stderr, "v4l2_format: width=%d, height=%d, pixelformat=0x%x\n",
			format.fmt.pix.width, format.fmt.pix.height, format.fmt.pix.pixelformat);


		v4l2_streamparm streamParm = { 0 };
		streamParm.type = format.type;
		streamParm.parm.capture.timeperframe.numerator = 1;
		streamParm.parm.capture.timeperframe.denominator = fps;

		io = ioctl(mfc_fd, VIDIOC_S_PARM, &streamParm);
		if (io < 0)
		{
			throw Exception("VIDIOC_S_PARM failed.");
		}

		fprintf(stderr, "capture.timeperframe: numerator=%d, denominator=%d\n",
			streamParm.parm.capture.timeperframe.numerator,
			streamParm.parm.capture.timeperframe.denominator);


		SetProfile();

		SetBitrate(bitrate);
		
		SetGroupOfPictures(gop);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq -0xd8(%rbp), %rdi
xorl %esi, %esi
movl $0xd0, %edx
callq 0x20b0
movq -0x1c0(%rbp), %rax
movl $0xa, -0xd8(%rbp)
movl 0xc(%rax), %ecx
movl %ecx, -0xd0(%rbp)
movl 0x10(%rax), %ecx
movl %ecx, -0xcc(%rbp)
movl $0x32314d4e, -0xc8(%rbp) # imm = 0x32314D4E
movb $0x2, -0x1c(%rbp)
movl 0x8(%rax), %edi
movl $0xc0d05605, %esi       # imm = 0xC0D05605
leaq -0xd8(%rbp), %rdx
movb $0x0, %al
callq 0x2120
movl %eax, -0xdc(%rbp)
cmpl $0x0, -0xdc(%rbp)
jge 0x37b5
movl $0x8, %edi
callq 0x2090
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1c8(%rbp)
leaq 0x3bb7(%rip), %rsi      # 0x7328
callq 0x28c0
jmp 0x3778
movq -0x1c8(%rbp), %rdi
leaq 0x75ea(%rip), %rsi      # 0xad70
leaq -0xe6d(%rip), %rdx      # 0x2920
callq 0x21b0
movq -0x1c8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
callq 0x20c0
jmp 0x38f4
movq 0x7824(%rip), %rax      # 0xafe0
movq (%rax), %rdi
movl -0xd0(%rbp), %edx
movl -0xcc(%rbp), %ecx
movl -0xc8(%rbp), %r8d
leaq 0x3b64(%rip), %rsi      # 0x733d
movb $0x0, %al
callq 0x2130
leaq -0x1b8(%rbp), %rdi
xorl %esi, %esi
movl $0xcc, %edx
callq 0x20b0
movq -0x1c0(%rbp), %rax
movl -0xd8(%rbp), %ecx
movl %ecx, -0x1b8(%rbp)
movl $0x1, -0x1ac(%rbp)
movl 0x14(%rax), %ecx
movl %ecx, -0x1a8(%rbp)
movl 0x8(%rax), %edi
movl $0xc0cc5616, %esi       # imm = 0xC0CC5616
leaq -0x1b8(%rbp), %rdx
movb $0x0, %al
callq 0x2120
movl %eax, -0xdc(%rbp)
cmpl $0x0, -0xdc(%rbp)
jge 0x389d
movl $0x8, %edi
callq 0x2090
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1d0(%rbp)
leaq 0x3b15(%rip), %rsi      # 0x7371
callq 0x28c0
jmp 0x3863
movq -0x1d0(%rbp), %rdi
leaq 0x74ff(%rip), %rsi      # 0xad70
leaq -0xf58(%rip), %rdx      # 0x2920
callq 0x21b0
movq -0x1d0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
callq 0x20c0
jmp 0x38f4
movq 0x773c(%rip), %rax      # 0xafe0
movq (%rax), %rdi
movl -0x1ac(%rbp), %edx
movl -0x1a8(%rbp), %ecx
leaq 0x3acd(%rip), %rsi      # 0x7387
movb $0x0, %al
callq 0x2130
movq -0x1c0(%rbp), %rdi
callq 0x4c30
movq -0x1c0(%rbp), %rdi
movl 0x18(%rdi), %esi
callq 0x4d20
movq -0x1c0(%rbp), %rdi
movl 0x1c(%rdi), %esi
callq 0x4e20
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq -0xe8(%rbp), %rdi
callq 0x21c0