BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJMEDIA Reference

Basic PJMEDIA types and operations. More...

Modules

 Media format
 Media format.
 
 Media frame
 Frame.
 

Data Structures

struct  pjmedia_ratio
 
struct  pjmedia_coord
 
struct  pjmedia_rect_size
 
struct  pjmedia_rect
 

Macros

#define PJMEDIA_TP_PROTO_HAS_FLAG(TP_PROTO, FLAGS)   (((TP_PROTO) & (FLAGS)) == (FLAGS))
 
#define PJMEDIA_TP_PROTO_TRIM_FLAG(TP_PROTO, FLAGS)   ((TP_PROTO) &= ~(FLAGS))
 
#define PJMEDIA_FOURCC(C1, C2, C3, C4)   ( C4<<24 | C3<<16 | C2<<8 | C1 )
 

Typedefs

typedef struct pjmedia_endpt pjmedia_endpt
 
typedef struct pjmedia_stream pjmedia_stream
 

Enumerations

enum  pjmedia_type {
  PJMEDIA_TYPE_NONE,
  PJMEDIA_TYPE_AUDIO,
  PJMEDIA_TYPE_VIDEO,
  PJMEDIA_TYPE_APPLICATION,
  PJMEDIA_TYPE_UNKNOWN
}
 
enum  pjmedia_tp_proto {
  PJMEDIA_TP_PROTO_NONE = 0,
  PJMEDIA_TP_PROTO_UNKNOWN = (1 << 0),
  PJMEDIA_TP_PROTO_UDP = (1 << 1),
  PJMEDIA_TP_PROTO_RTP = (1 << 2),
  PJMEDIA_TP_PROTO_DTLS = (1 << 3),
  PJMEDIA_TP_PROFILE_RTCP_FB = (1 << 13),
  PJMEDIA_TP_PROFILE_SRTP = (1 << 14),
  PJMEDIA_TP_PROFILE_AVP = (1 << 15),
  PJMEDIA_TP_PROTO_RTP_AVP,
  PJMEDIA_TP_PROTO_RTP_SAVP,
  PJMEDIA_TP_PROTO_DTLS_SRTP,
  PJMEDIA_TP_PROTO_RTP_AVPF,
  PJMEDIA_TP_PROTO_RTP_SAVPF,
  PJMEDIA_TP_PROTO_DTLS_SRTPF
}
 
enum  pjmedia_dir {
  PJMEDIA_DIR_NONE = 0,
  PJMEDIA_DIR_ENCODING = 1,
  PJMEDIA_DIR_CAPTURE = PJMEDIA_DIR_ENCODING,
  PJMEDIA_DIR_DECODING = 2,
  PJMEDIA_DIR_PLAYBACK = PJMEDIA_DIR_DECODING,
  PJMEDIA_DIR_RENDER = PJMEDIA_DIR_DECODING,
  PJMEDIA_DIR_ENCODING_DECODING = 3,
  PJMEDIA_DIR_CAPTURE_PLAYBACK = PJMEDIA_DIR_ENCODING_DECODING,
  PJMEDIA_DIR_CAPTURE_RENDER = PJMEDIA_DIR_ENCODING_DECODING
}
 
enum  pjmedia_coord_base {
  PJMEDIA_COORD_BASE_LEFT_TOP,
  PJMEDIA_COORD_BASE_LEFT_BOTTOM
}
 
enum  pjmedia_orient {
  PJMEDIA_ORIENT_UNKNOWN,
  PJMEDIA_ORIENT_NATURAL,
  PJMEDIA_ORIENT_ROTATE_90DEG,
  PJMEDIA_ORIENT_ROTATE_180DEG,
  PJMEDIA_ORIENT_ROTATE_270DEG
}
 

Functions

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

Detailed Description

Macro Definition Documentation

#define PJMEDIA_TP_PROTO_HAS_FLAG (   TP_PROTO,
  FLAGS 
)    (((TP_PROTO) & (FLAGS)) == (FLAGS))

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

#define PJMEDIA_TP_PROTO_TRIM_FLAG (   TP_PROTO,
  FLAGS 
)    ((TP_PROTO) &= ~(FLAGS))

Macro helper for excluding specific flags in transport protocol.

#define PJMEDIA_FOURCC (   C1,
  C2,
  C3,
  C4 
)    ( C4<<24 | C3<<16 | C2<<8 | C1 )

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

Typedef Documentation

typedef struct pjmedia_endpt pjmedia_endpt

Opaque declaration of media endpoint.

Enumeration Type Documentation

Top most media type. See also pjmedia_type_name().

Enumerator
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.

Media transport protocol and profile.

Enumerator
PJMEDIA_TP_PROTO_NONE 

No transport type

PJMEDIA_TP_PROTO_UNKNOWN 

Transport unknown

PJMEDIA_TP_PROTO_UDP 

UDP transport

PJMEDIA_TP_PROTO_RTP 

RTP transport

PJMEDIA_TP_PROTO_DTLS 

DTLS transport

PJMEDIA_TP_PROFILE_RTCP_FB 

RTCP Feedback profile

PJMEDIA_TP_PROFILE_SRTP 

Secure RTP profile

PJMEDIA_TP_PROFILE_AVP 

Audio/video profile

PJMEDIA_TP_PROTO_RTP_AVP 

RTP using A/V profile

PJMEDIA_TP_PROTO_RTP_SAVP 

Secure RTP using A/V profile

PJMEDIA_TP_PROTO_DTLS_SRTP 

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

PJMEDIA_TP_PROTO_RTP_AVPF 

RTP using A/V and RTCP feedback profile

PJMEDIA_TP_PROTO_RTP_SAVPF 

Secure RTP using A/V and RTCP feedback profile

PJMEDIA_TP_PROTO_DTLS_SRTPF 

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

Media direction.

Enumerator
PJMEDIA_DIR_NONE 

None

PJMEDIA_DIR_ENCODING 

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

PJMEDIA_DIR_CAPTURE 

Same as encoding direction.

PJMEDIA_DIR_DECODING 

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

PJMEDIA_DIR_PLAYBACK 

Same as decoding.

PJMEDIA_DIR_RENDER 

Same as decoding.

PJMEDIA_DIR_ENCODING_DECODING 

Incoming and outgoing stream, same as PJMEDIA_DIR_CAPTURE_PLAYBACK

PJMEDIA_DIR_CAPTURE_PLAYBACK 

Same as ENCODING_DECODING

PJMEDIA_DIR_CAPTURE_RENDER 

Same as ENCODING_DECODING

Enumeration for picture coordinate base.

Enumerator
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.

Enumeration for video/picture orientation.

Enumerator
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.

Function Documentation

const char* pjmedia_type_name ( pjmedia_type  t)

Utility function to return the string name for a pjmedia_type.

Parameters
tThe media type.
Returns
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.

Parameters
sigThe fourcc value.
bufBuffer to store the string, which MUST be at least five bytes long.
Returns
The string.

Referenced by pjmedia_sig_name().

 


PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.