> **Experimental**
>
> `@aws-cdk/aws-mediaconnect-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# SourceCdi

Configuration for CDI.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/flow-source-configuration.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0-alpha.0/packages/@aws-cdk/aws-mediaconnect-alpha/lib/flow-source-configuration.ts#L326)

## Example

```ts
declare const stack: Stack;
declare const role: iam.IRole;
declare const securityGroup: ec2.ISecurityGroup;
declare const subnet: ec2.ISubnet;

const efaInterface = VpcInterface.define({
  vpcInterfaceName: 'efa-interface',
  role: role,
  securityGroups: [securityGroup],
  subnet: subnet,
  networkInterfaceType: NetworkInterface.EFA,  // Required for CDI
});

const videoStream = MediaStream.video({
  mediaStreamId: 1,
  mediaStreamName: 'video',
  videoFormat: MediaVideoFormat.HD_1080P,
  fmtp: {
    exactFramerate: Framerate.FPS_29_97,
    par: PixelAspectRatio.SQUARE,
  },
});

const flow = new Flow(stack, 'MyCdiFlow', {
  flowSize: FlowSize.LARGE_4X,  // Required for CDI and JPEG XS
  vpcInterfaces: [efaInterface],
  mediaStreams: [videoStream],
  source: SourceConfiguration.cdi({
    flowSourceName: 'cdi-source',
    vpcInterface: efaInterface,
    port: 5000,
    maxSyncBuffer: 100,
    mediaStreamSourceConfigurations: [{
      encoding: Encoding.RAW,
      mediaStream: videoStream,
    }],
  }),
});
```

## Properties

- `flowSourceName`: string — The name of the source.

  **Default:** a name is generated automatically

- `maxSyncBuffer`: number (required) — The size of the buffer (in ms) to use to sync incoming source data.

  Required by the MediaConnect service for CDI sources.

- `mediaStreamSourceConfigurations`: [MediaStreamSourceConfigurationCdi](/cdk/api/v2/docs/@aws-cdk_aws-mediaconnect-alpha.MediaStreamSourceConfigurationCdi.html)[] (required) — The media stream that is associated with the source, and the parameters for that association.

- `port`: number (required) — The port that the flow will be listening on for incoming content.

- `vpcInterface`: [VpcInterfaceConfig](/cdk/api/v2/docs/@aws-cdk_aws-mediaconnect-alpha.VpcInterfaceConfig.html) (required) — The VPC interface attachment to use for this bridge source.
