UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
types.h File Reference

This file contains definition of some common audio types. More...

#include <cstdint>
#include "../types.h"
#include <string>
#include <ostream>
#include <memory>
#include <tuple>
#include <vector>
Include dependency graph for types.h:

Go to the source code of this file.

Classes

struct  audio_channel
 Audio channel is a non-owning view on audio_frame2 isolating one channel. More...
 
struct  audio_desc
 
struct  audio_frame
 struct used to comunicate with audio capture/playback device More...
 
class  audio_frame2
 
struct  audio_frame2::channel
 

Macros

#define AUDIO_FRAME_DISPOSE(frame)
 

Typedefs

typedef struct audio_frame audio_frame
 struct used to comunicate with audio capture/playback device
 

Enumerations

enum  { MAX_AUD_CH_COUNT = 1 << 10 , MAX_AUD_SAMPLE_RATE = 1 << 24 }
 
enum  audio_codec_t {
  AC_NONE , AC_PCM , AC_ALAW , AC_MULAW ,
  AC_SPEEX , AC_OPUS , AC_G722 , AC_MP3 ,
  AC_AAC , AC_FLAC , AC_COUNT
}
 

Functions

std::ostream & operator<< (std::ostream &os, const audio_desc &desc)
 

Detailed Description

This file contains definition of some common audio types.

Author
Martin Pulec pulec.nosp@m.@ces.nosp@m.net.c.nosp@m.z

Definition in file types.h.

Macro Definition Documentation

◆ AUDIO_FRAME_DISPOSE

#define AUDIO_FRAME_DISPOSE ( frame)
Value:
if ((frame) && (frame)->dispose) \
(frame)->dispose(frame)
struct video_frame * frame

Definition at line 117 of file types.h.

117#define AUDIO_FRAME_DISPOSE(frame) if ((frame) && (frame)->dispose) \
118 (frame)->dispose(frame)

Referenced by capture_thread(), hd_rum_decompress::state_transcoder_decompress::frame_arrived(), ug_input_state::frame_arrived(), and vidcap_ug_input_done().

Typedef Documentation

◆ audio_frame

typedef struct audio_frame audio_frame

struct used to comunicate with audio capture/playback device

Always hold uncompressed (PCM) packed interleaved signed data.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

packet format maximal allowed values defined in: http://www.sitola.cz/files/4K-packet-format.pdf

Enumerator
MAX_AUD_CH_COUNT 
MAX_AUD_SAMPLE_RATE 

Definition at line 67 of file types.h.

67 {
68 MAX_AUD_CH_COUNT = 1 << 10,
69 MAX_AUD_SAMPLE_RATE = 1 << 24,
70};
@ MAX_AUD_CH_COUNT
Definition types.h:68
@ MAX_AUD_SAMPLE_RATE
Definition types.h:69

◆ audio_codec_t

Enumerator
AC_NONE 
AC_PCM 
AC_ALAW 
AC_MULAW 
AC_SPEEX 
AC_OPUS 
AC_G722 
AC_MP3 
AC_AAC 
AC_FLAC 
AC_COUNT 

Definition at line 51 of file types.h.

51 {
52 AC_NONE,
53 AC_PCM,
54 AC_ALAW,
57 AC_OPUS,
58 AC_G722,
59 AC_MP3,
60 AC_AAC,
61 AC_FLAC,
audio_codec_t
Definition types.h:51
@ AC_G722
Definition types.h:58
@ AC_AAC
Definition types.h:60
@ AC_OPUS
Definition types.h:57
@ AC_FLAC
Definition types.h:61
@ AC_MULAW
Definition types.h:55
@ AC_SPEEX
Definition types.h:56
@ AC_MP3
Definition types.h:59
@ AC_COUNT
Definition types.h:62
@ AC_PCM
Definition types.h:53
@ AC_ALAW
Definition types.h:54
@ AC_NONE
Definition types.h:52

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream & os,
const audio_desc & desc )

Definition at line 1215 of file audio.cpp.

1216{
1217 os << desc.ch_count << " channel" << (desc.ch_count > 1 ? "s" : "") << ", " << desc.bps << " Bps, " << desc.sample_rate << " Hz, codec: " << get_name_to_audio_codec(desc.codec);
1218 return os;
1219}
struct video_desc desc
const char * get_name_to_audio_codec(audio_codec_t codec)
Definition codec.cpp:450

References desc, and get_name_to_audio_codec().

Here is the call graph for this function: