Group PJMEDIA_TYPES

group PJMEDIA_TYPES

Basic PJMEDIA types and operations.

Defines

PJMEDIA_TP_PROTO_HAS_FLAG(TP_PROTO, FLAGS)

Macro helper for checking if a transport protocol contains specific transport and profile flags.

PJMEDIA_TP_PROTO_TRIM_FLAG(TP_PROTO, FLAGS)

Macro helper for excluding specific flags in transport protocol.

PJMEDIA_FOURCC(C1, C2, C3, C4)

Macro for packing format from a four character code, similar to FOURCC.

Typedefs

typedef struct pjmedia_endpt pjmedia_endpt

Opaque declaration of media endpoint.

typedef struct pjmedia_stream pjmedia_stream

Enums

enum pjmedia_type

Top most media type. See also pjmedia_type_name().

Values:

PJMEDIA_TYPE_NONE

Type is not specified.

PJMEDIA_TYPE_AUDIO

The media is audio

PJMEDIA_TYPE_VIDEO

The media is video.

PJMEDIA_TYPE_APPLICATION

The media is application.

PJMEDIA_TYPE_UNKNOWN

The media type is unknown or unsupported.

enum pjmedia_tp_proto

Media transport protocol and profile.

Values:

PJMEDIA_TP_PROTO_NONE = 0

No transport type

PJMEDIA_TP_PROTO_UNKNOWN = (1 << 0)

Transport unknown

PJMEDIA_TP_PROTO_UDP = (1 << 1)

UDP transport

PJMEDIA_TP_PROTO_RTP = (1 << 2)

RTP transport

PJMEDIA_TP_PROTO_DTLS = (1 << 3)

DTLS transport

PJMEDIA_TP_PROFILE_RTCP_FB = (1 << 13)

RTCP Feedback profile

PJMEDIA_TP_PROFILE_SRTP = (1 << 14)

Secure RTP profile

PJMEDIA_TP_PROFILE_AVP = (1 << 15)

Audio/video profile

PJMEDIA_TP_PROTO_RTP_AVP = (PJMEDIA_TP_PROTO_RTP | PJMEDIA_TP_PROFILE_AVP)

RTP using A/V profile

PJMEDIA_TP_PROTO_RTP_SAVP = (PJMEDIA_TP_PROTO_RTP_AVP | PJMEDIA_TP_PROFILE_SRTP)

Secure RTP using A/V profile

PJMEDIA_TP_PROTO_DTLS_SRTP = (PJMEDIA_TP_PROTO_DTLS | PJMEDIA_TP_PROTO_RTP_SAVP)

Secure RTP using A/V profile and DTLS-SRTP keying

PJMEDIA_TP_PROTO_RTP_AVPF = (PJMEDIA_TP_PROTO_RTP_AVP | PJMEDIA_TP_PROFILE_RTCP_FB)

RTP using A/V and RTCP feedback profile

PJMEDIA_TP_PROTO_RTP_SAVPF = (PJMEDIA_TP_PROTO_RTP_SAVP | PJMEDIA_TP_PROFILE_RTCP_FB)

Secure RTP using A/V and RTCP feedback profile

PJMEDIA_TP_PROTO_DTLS_SRTPF = (PJMEDIA_TP_PROTO_DTLS_SRTP | PJMEDIA_TP_PROFILE_RTCP_FB)

Secure RTP using A/V and RTCP feedback profile and DTLS-SRTP keying

enum pjmedia_dir

Media direction.

Values:

PJMEDIA_DIR_NONE = 0

None

PJMEDIA_DIR_ENCODING = 1

Encoding (outgoing to network) stream, also known as capture

PJMEDIA_DIR_CAPTURE = PJMEDIA_DIR_ENCODING

Same as encoding direction.

PJMEDIA_DIR_DECODING = 2

Decoding (incoming from network) stream, also known as playback.

PJMEDIA_DIR_PLAYBACK = PJMEDIA_DIR_DECODING

Same as decoding.

PJMEDIA_DIR_RENDER = PJMEDIA_DIR_DECODING

Same as decoding.

PJMEDIA_DIR_ENCODING_DECODING = 3

Incoming and outgoing stream, same as PJMEDIA_DIR_CAPTURE_PLAYBACK

PJMEDIA_DIR_CAPTURE_PLAYBACK = PJMEDIA_DIR_ENCODING_DECODING

Same as ENCODING_DECODING

PJMEDIA_DIR_CAPTURE_RENDER = PJMEDIA_DIR_ENCODING_DECODING

Same as ENCODING_DECODING

enum pjmedia_coord_base

Enumeration for picture coordinate base.

Values:

PJMEDIA_COORD_BASE_LEFT_TOP

This specifies that the pixel [0, 0] location is at the left-top position.

PJMEDIA_COORD_BASE_LEFT_BOTTOM

This specifies that the pixel [0, 0] location is at the left-bottom position.

enum pjmedia_orient

Enumeration for video/picture orientation.

Values:

PJMEDIA_ORIENT_UNKNOWN

Unknown orientation.

PJMEDIA_ORIENT_NATURAL

Natural orientation, i.e. the original orientation video will be displayed/captured without rotation.

PJMEDIA_ORIENT_ROTATE_90DEG

Specifies that the video/picture needs to be rotated 90 degrees from its natural orientation in clockwise direction from the user’s perspective. Note that for devices with back cameras (which faces away from the user), the video will actually need to be rotated 270 degrees clockwise instead.

PJMEDIA_ORIENT_ROTATE_180DEG

Specifies that the video/picture needs to be rotated 180 degrees from its natural orientation.

PJMEDIA_ORIENT_ROTATE_270DEG

Specifies that the video/picture needs to be rotated 270 degrees from its natural orientation in clockwise direction from the user’s perspective. Note that for devices with back cameras (which faces away from the user), the video will actually need to be rotated 90 degrees clockwise instead.

Functions

const char *pjmedia_type_name(pjmedia_type t)

Utility function to return the string name for a pjmedia_type.

Return

String.

Parameters
  • t: The media type.

pjmedia_type pjmedia_get_type(const pj_str_t *name)

Utility function to return the media type for a media name string.

Return

media type.

Parameters
  • name: The media name string.

const char *pjmedia_fourcc_name(pj_uint32_t sig, char buf[])

A utility function to convert fourcc type of value to four letters string.

Return

The string.

Parameters
  • sig: The fourcc value.

  • buf: Buffer to store the string, which MUST be at least five bytes long.

struct pjmedia_ratio
#include <types.h>

This structure is used to represent rational numbers.

struct pjmedia_coord
#include <types.h>

This structure represent a coordinate.

struct pjmedia_rect_size
#include <types.h>

This structure represents rectangle size.

struct pjmedia_rect
#include <types.h>

This structure describes a rectangle.