Can´t manage to create custom Infrared RAW Codes

Hi!

I'm new to the infrared World, and I'm using "Ken Shirriff" Library "IRremote".

I have successfully created a small code to send and receive infrared signals between 2 Arduinos.
My problem is I need to send custom codes using irsend.sendRaw(RawArray, ArrayLength, 38).

Lets say I want to send this HEX: A12345
From that I can create the binary: 101000010010001101000101

I know that from the Binary I can create the Raw codes, but that's where I'm stuck.
I have already chosen my "0", "1", and "space" values, respectively "500", "1000" and "500", so:
Binary 1 = Raw code {500, 1000}
Binary 0 = Raw code {500, 500}

With that I can create the array:
RawArray[48] = {500, 1000, 500, 500, 500, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 500, 1000, 500, 500, 500, 500, 500, 1000, 500, 500, 500, 500, 500, 500, 500, 1000, 500, 1000, 500, 500, 500, 1000, 500, 500, 500, 500, 500, 500, 500, 1000, 500, 500, 500, 1000,}

Now, I'm missing the starter values from my Array, that are supposed to give the "settings" of my transmission.
I find so many different explanations, that go on completely different approaches that I'm completely lost at this point.

Can someone explain me how to calculate those values?

Here is an example of adding a custom protocol:

Since you already made up your MARK and SPACE values you just need to make up some header values.
#define PANASONIC_HDR_MARK 3502
#define PANASONIC_HDR_SPACE 1750
#define PANASONIC_BIT_MARK 502
#define PANASONIC_ONE_SPACE 1244
#define PANASONIC_ZERO_SPACE 370