| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
AudioRoutingFilter Class Reference

A QIODevice filter that applies audio routing to a raw PCM stream. More...

`#include <rtp_audio_routing_filter.h>`

Inheritance diagram for AudioRoutingFilter:

## Public Member Functions
| AudioRoutingFilter (QIODevice *input, bool stereo_required, AudioRouting audio_routing)
| Construct an AudioRoutingFilter.
| ~AudioRoutingFilter ()
| Destroy the filter. The upstream device is not closed or deleted.
void | close () override
| Close this filter device.
qint64 | size () const override
| Return the total byte size of the audio stream.
qint64 | pos () const override
| Return the current read position within the stream.
bool | seek (qint64 off) override
| Seek to an absolute byte offset in the stream.

## Protected Member Functions
qint64 | readData (char *data, qint64 maxSize) override
| Read and route up to `maxSize` bytes from the upstream device.
qint64 | writeData (const char *data, qint64 maxSize) override
| Not supported — this filter is read-only.

## Detailed Description

A QIODevice filter that applies audio routing to a raw PCM stream.

## Constructor & Destructor Documentation

## ◆ AudioRoutingFilter()

AudioRoutingFilter::AudioRoutingFilter | ( | QIODevice * | input,
|  | bool | stereo_required,
|  | AudioRouting | audio_routing )
| explicit

Construct an AudioRoutingFilter.

Parameters

  input | The upstream PCM device to read raw audio from. Must outlive this filter. The filter does not take ownership of the pointer.
  stereo_required | true if the downstream audio output expects interleaved stereo (two-channel) PCM; false if it expects mono (single-channel) PCM. This controls how the routing transformation maps input samples to output samples.
  audio_routing | The initial mute state and channel assignment to apply to the stream.

## Member Function Documentation

## ◆ pos()

qint64 AudioRoutingFilter::pos | ( |  | ) | const
| override

Return the current read position within the stream.

Returns
  The current byte offset from the start of the stream.

## ◆ readData()

qint64 AudioRoutingFilter::readData | ( | char * | data,
|  | qint64 | maxSize )
| override protected

Read and route up to `maxSize` bytes from the upstream device.

Parameters

  data | Output buffer to write transformed PCM into.
  maxSize | Maximum number of bytes to write into `data`.

Returns
  The number of bytes written, or -1 on error.

## ◆ seek()

bool AudioRoutingFilter::seek | ( | qint64 | off | ) |
| override

Seek to an absolute byte offset in the stream.

Parameters

  off | The target byte offset from the start of the stream.

Returns
  true if the upstream device accepted the seek; false otherwise.

## ◆ size()

qint64 AudioRoutingFilter::size | ( |  | ) | const
| override

Return the total byte size of the audio stream.

Returns
  The number of bytes available in the upstream device, or -1 if the size is not known.

## ◆ writeData()

qint64 AudioRoutingFilter::writeData | ( | const char * | data,
|  | qint64 | maxSize )
| override protected

Not supported — this filter is read-only.

Parameters

  data | Ignored.
  maxSize | Ignored.

Returns
  -1 unconditionally.

The documentation for this class was generated from the following files:

- /builds/wireshark/wireshark/ui/qt/utils/rtp_audio_routing_filter.h
- /builds/wireshark/wireshark/ui/qt/utils/rtp_audio_routing_filter.cpp