class Format
Defined at line 28 of file ../../src/media/audio/lib/format2/format.h
Format wraps a `fuchsia.audio.Format` FIDL table.
Public Methods
void Format (const Format & )
Defined at line 71 of file ../../src/media/audio/lib/format2/format.h
Format & operator= (const Format & )
Defined at line 72 of file ../../src/media/audio/lib/format2/format.h
bool operator!= (const Format & rhs)
Defined at line 75 of file ../../src/media/audio/lib/format2/format.h
fuchsia_audio::SampleType sample_type ()
Defined at line 87 of file ../../src/media/audio/lib/format2/format.h
int64_t channels ()
Defined at line 88 of file ../../src/media/audio/lib/format2/format.h
int64_t frames_per_second ()
Defined at line 89 of file ../../src/media/audio/lib/format2/format.h
int64_t bytes_per_frame ()
Defined at line 91 of file ../../src/media/audio/lib/format2/format.h
int64_t bytes_per_sample ()
Defined at line 92 of file ../../src/media/audio/lib/format2/format.h
int32_t valid_bits_per_sample ()
Defined at line 93 of file ../../src/media/audio/lib/format2/format.h
const media::TimelineRate & frames_per_ns ()
Returns the frame rate as ratio of frames per nanoseconds.
Defined at line 96 of file ../../src/media/audio/lib/format2/format.h
const media::TimelineRate & frac_frames_per_ns ()
Defined at line 97 of file ../../src/media/audio/lib/format2/format.h
fpromise::result<Format, std::string> Create (fuchsia_audio::wire::Format msg)
Creates a Format from a wire FIDL object, a natural FIDL object, or an inline struct. The wire
types are passed by value because they're either a simple pointer (for FIDL tables) or a small
struct (for FIDL structs). The natural types are passed by reference because cloning those
types always involves an allocation, even for FIDL structs.
Returns an error if the struct contains invalid parameters.
Defined at line 106 of file ../../src/media/audio/lib/format2/format.cc
fpromise::result<Format, std::string> Create (const fuchsia_audio::Format & msg)
Defined at line 124 of file ../../src/media/audio/lib/format2/format.cc
fpromise::result<Format, std::string> Create (fuchsia_hardware_audio::wire::Format msg)
Defined at line 142 of file ../../src/media/audio/lib/format2/format.cc
fpromise::result<Format, std::string> Create (fuchsia_hardware_audio::wire::PcmFormat msg)
Defined at line 149 of file ../../src/media/audio/lib/format2/format.cc
fpromise::result<Format, std::string> Create (const fuchsia_hardware_audio::Format & msg)
Defined at line 171 of file ../../src/media/audio/lib/format2/format.cc
fpromise::result<Format, std::string> Create (const fuchsia_hardware_audio::PcmFormat & msg)
Defined at line 178 of file ../../src/media/audio/lib/format2/format.cc
fpromise::result<Format, std::string> Create (Args args)
Defined at line 188 of file ../../src/media/audio/lib/format2/format.cc
Format CreateOrDie (fuchsia_audio::wire::Format msg)
Creates a Format from a wire FIDL object, a natural FIDL object, or an inline struct.
Crashes if the the struct contains invalid parameters.
Defined at line 214 of file ../../src/media/audio/lib/format2/format.cc
Format CreateOrDie (const fuchsia_audio::Format & msg)
Defined at line 222 of file ../../src/media/audio/lib/format2/format.cc
Format CreateOrDie (Args args)
Defined at line 230 of file ../../src/media/audio/lib/format2/format.cc
fpromise::result<Format, std::string> CreateLegacy (fuchsia_mediastreams::AudioFormat msg)
TODO(https://fxbug.dev/42066204): Remove when fuchsia.audio.effects has migrated to the new
types.
Defined at line 238 of file ../../src/media/audio/lib/format2/format.cc
fpromise::result<Format, std::string> CreateLegacy (fuchsia_mediastreams::wire::AudioFormat msg)
Defined at line 253 of file ../../src/media/audio/lib/format2/format.cc
Format CreateLegacyOrDie (fuchsia_mediastreams::AudioFormat msg)
Defined at line 269 of file ../../src/media/audio/lib/format2/format.cc
Format CreateLegacyOrDie (fuchsia_mediastreams::wire::AudioFormat msg)
Defined at line 277 of file ../../src/media/audio/lib/format2/format.cc
fpromise::result<Format, std::string> CreateLegacy (fuchsia_media::AudioStreamType msg)
TODO(https://fxbug.dev/42066782): Remove when audio_core/v2 is deleted.
Defined at line 285 of file ../../src/media/audio/lib/format2/format.cc
fpromise::result<Format, std::string> CreateLegacy (fuchsia_media::wire::AudioStreamType msg)
Defined at line 300 of file ../../src/media/audio/lib/format2/format.cc
Format CreateLegacyOrDie (fuchsia_media::AudioStreamType msg)
Defined at line 316 of file ../../src/media/audio/lib/format2/format.cc
Format CreateLegacyOrDie (fuchsia_media::wire::AudioStreamType msg)
Defined at line 324 of file ../../src/media/audio/lib/format2/format.cc
bool operator== (const Format & rhs)
Defined at line 364 of file ../../src/media/audio/lib/format2/format.cc
fuchsia_audio::wire::Format ToWireFidl (fidl::AnyArena & arena)
Defined at line 370 of file ../../src/media/audio/lib/format2/format.cc
fuchsia_audio::Format ToNaturalFidl ()
Defined at line 378 of file ../../src/media/audio/lib/format2/format.cc
fuchsia_hardware_audio::wire::Format ToHardwareWireFidl (fidl::AnyArena & arena)
Defined at line 386 of file ../../src/media/audio/lib/format2/format.cc
fuchsia_hardware_audio::Format ToHardwareNaturalFidl ()
Defined at line 398 of file ../../src/media/audio/lib/format2/format.cc
fuchsia_media::wire::AudioStreamType ToLegacyMediaWireFidl ()
TODO(https://fxbug.dev/42066782): Remove when audio_core/v2 is deleted.
Defined at line 410 of file ../../src/media/audio/lib/format2/format.cc
fuchsia_mediastreams::wire::AudioFormat ToLegacyMediastreamsWireFidl ()
TODO(https://fxbug.dev/42066204): Remove when fuchsia.audio.effects has migrated to the new
types.
Defined at line 436 of file ../../src/media/audio/lib/format2/format.cc
int64_t integer_frames_per (zx::duration duration, media::TimelineRate::RoundingMode rounding_mode)
Computes the number of integral frames for the given duration.
Rounds up by default.
Defined at line 463 of file ../../src/media/audio/lib/format2/format.cc
Fixed frac_frames_per (zx::duration duration, media::TimelineRate::RoundingMode rounding_mode)
Computes the number of fractional frames for the given duration.
Rounds up by default.
Defined at line 467 of file ../../src/media/audio/lib/format2/format.cc
int64_t bytes_per (zx::duration duration, media::TimelineRate::RoundingMode rounding_mode)
Computes the number of bytes for the given duration.
Rounds up by default.
Defined at line 471 of file ../../src/media/audio/lib/format2/format.cc
zx::duration duration_per (Fixed frames, media::TimelineRate::RoundingMode rounding_mode)
Computes the duration that covers the given number of fractional frames.
Rounds up by default.
Defined at line 475 of file ../../src/media/audio/lib/format2/format.cc