# null

# MediaGetMediaType

[Valid for](../../../Shared/FeatureAvailability.md): CANoe DE • CANoe4SW DE

## Function Syntax

```plaintext
long MediaGetMediaType(dword sourceReaderHandle, dword streamIndex);
```

## Description

Gets the media type for a source reader.

## Parameters

* **sourceReaderHandle**: The source reader handle.
* **dwStreamIndex**: The stream to query. The value can be any of the following:
  * **0–0xFFFFFFFB**: The zero-based index of a stream.
  * **SOURCE\_READER\_FIRST\_VIDEO\_STREAM (0xFFFFFFFC)**: The first video stream.
  * **SOURCE\_READER\_FIRST\_AUDIO\_STREAM (0xFFFFFFFD)**: The first audio stream.

## Return Values

* **0**: The function failed. Call [MediaGetLastError](CAPLfunctionMediaGetLastError.md) to get a more specific error code.
* **≠0**: Media type handle

## Example

—

[See Also](javascript:void\(0\);)
