BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJMEDIA Reference

format.h File Reference

Media format. More...

Data Structures

struct  pjmedia_audio_format_detail
 
struct  pjmedia_video_format_detail
 
struct  pjmedia_format
 
struct  pjmedia_video_apply_fmt_param
 
struct  pjmedia_video_format_info
 

Macros

#define PJMEDIA_FORMAT_PACK(C1, C2, C3, C4)   PJMEDIA_FOURCC(C1, C2, C3, C4)
 
#define PJMEDIA_FORMAT_DETAIL_USER_SIZE   1
 

Typedefs

typedef struct pjmedia_video_format_mgr pjmedia_video_format_mgr
 

Enumerations

enum  pjmedia_format_id {
  PJMEDIA_FORMAT_L16 = 0 ,
  PJMEDIA_FORMAT_PCM = PJMEDIA_FORMAT_L16 ,
  PJMEDIA_FORMAT_PCMA = PJMEDIA_FOURCC( 'A' , 'L' , 'A' , 'W' ) ,
  PJMEDIA_FORMAT_ALAW = PJMEDIA_FORMAT_PCMA ,
  PJMEDIA_FORMAT_PCMU = PJMEDIA_FOURCC( 'u' , 'L' , 'A' , 'W' ) ,
  PJMEDIA_FORMAT_ULAW = PJMEDIA_FORMAT_PCMU ,
  PJMEDIA_FORMAT_AMR = PJMEDIA_FOURCC( ' ' , 'A' , 'M' , 'R' ) ,
  PJMEDIA_FORMAT_G729 = PJMEDIA_FOURCC( 'G' , '7' , '2' , '9' ) ,
  PJMEDIA_FORMAT_ILBC = PJMEDIA_FOURCC( 'I' , 'L' , 'B' , 'C' ) ,
  PJMEDIA_FORMAT_RGB24 = PJMEDIA_FOURCC( 'R' , 'G' , 'B' , '3' ) ,
  PJMEDIA_FORMAT_RGBA = PJMEDIA_FOURCC( 'R' , 'G' , 'B' , 'A' ) ,
  PJMEDIA_FORMAT_BGRA = PJMEDIA_FOURCC( 'B' , 'G' , 'R' , 'A' ) ,
  PJMEDIA_FORMAT_RGB32 = PJMEDIA_FORMAT_RGBA ,
  PJMEDIA_FORMAT_DIB = PJMEDIA_FOURCC( 'D' , 'I' , 'B' , ' ' ) ,
  PJMEDIA_FORMAT_GBRP = PJMEDIA_FOURCC( 'G' , 'B' , 'R' , 'P' ) ,
  PJMEDIA_FORMAT_AYUV = PJMEDIA_FOURCC( 'A' , 'Y' , 'U' , 'V' ) ,
  PJMEDIA_FORMAT_YUY2 = PJMEDIA_FOURCC( 'Y' , 'U' , 'Y' , '2' ) ,
  PJMEDIA_FORMAT_UYVY = PJMEDIA_FOURCC( 'U' , 'Y' , 'V' , 'Y' ) ,
  PJMEDIA_FORMAT_YVYU = PJMEDIA_FOURCC( 'Y' , 'V' , 'Y' , 'U' ) ,
  PJMEDIA_FORMAT_I420 = PJMEDIA_FOURCC( 'I' , '4' , '2' , '0' ) ,
  PJMEDIA_FORMAT_IYUV = PJMEDIA_FORMAT_I420 ,
  PJMEDIA_FORMAT_YV12 = PJMEDIA_FOURCC( 'Y' , 'V' , '1' , '2' ) ,
  PJMEDIA_FORMAT_NV12 = PJMEDIA_FOURCC( 'N' , 'V' , '1' , '2' ) ,
  PJMEDIA_FORMAT_NV21 = PJMEDIA_FOURCC( 'N' , 'V' , '2' , '1' ) ,
  PJMEDIA_FORMAT_I422 = PJMEDIA_FOURCC( 'I' , '4' , '2' , '2' ) ,
  PJMEDIA_FORMAT_I420JPEG = PJMEDIA_FOURCC( 'J' , '4' , '2' , '0' ) ,
  PJMEDIA_FORMAT_I422JPEG = PJMEDIA_FOURCC( 'J' , '4' , '2' , '2' ) ,
  PJMEDIA_FORMAT_H261 = PJMEDIA_FOURCC( 'H' , '2' , '6' , '1' ) ,
  PJMEDIA_FORMAT_H263 = PJMEDIA_FOURCC( 'H' , '2' , '6' , '3' ) ,
  PJMEDIA_FORMAT_H263P = PJMEDIA_FOURCC( 'P' , '2' , '6' , '3' ) ,
  PJMEDIA_FORMAT_H264 = PJMEDIA_FOURCC( 'H' , '2' , '6' , '4' ) ,
  PJMEDIA_FORMAT_VP8 = PJMEDIA_FOURCC( 'V' , 'P' , '8' , '0' ) ,
  PJMEDIA_FORMAT_VP9 = PJMEDIA_FOURCC( 'V' , 'P' , '9' , '0' ) ,
  PJMEDIA_FORMAT_MJPEG = PJMEDIA_FOURCC( 'M' , 'J' , 'P' , 'G' ) ,
  PJMEDIA_FORMAT_MPEG1VIDEO = PJMEDIA_FOURCC( 'M' , 'P' , '1' , 'V' ) ,
  PJMEDIA_FORMAT_MPEG2VIDEO = PJMEDIA_FOURCC( 'M' , 'P' , '2' , 'V' ) ,
  PJMEDIA_FORMAT_MPEG4 = PJMEDIA_FOURCC( 'M' , 'P' , 'G' , '4' ) ,
  PJMEDIA_FORMAT_INVALID = 0xFFFFFFF
}
 
enum  pjmedia_format_detail_type {
  PJMEDIA_FORMAT_DETAIL_NONE ,
  PJMEDIA_FORMAT_DETAIL_AUDIO ,
  PJMEDIA_FORMAT_DETAIL_VIDEO ,
  PJMEDIA_FORMAT_DETAIL_MAX
}
 
enum  pjmedia_color_model {
  PJMEDIA_COLOR_MODEL_NONE ,
  PJMEDIA_COLOR_MODEL_RGB ,
  PJMEDIA_COLOR_MODEL_YUV
}
 

Functions

unsigned PJMEDIA_SPF (unsigned clock_rate, unsigned usec_ptime, unsigned channel_count)
 
unsigned PJMEDIA_SPF2 (unsigned clock_rate, const pjmedia_ratio *fr, unsigned channel_count)
 
unsigned PJMEDIA_FSZ (unsigned bps, unsigned usec_ptime)
 
unsigned PJMEDIA_PTIME (const pjmedia_ratio *frame_rate)
 
unsigned PJMEDIA_AFD_SPF (const pjmedia_audio_format_detail *pafd)
 
unsigned PJMEDIA_AFD_AVG_FSZ (const pjmedia_audio_format_detail *afd)
 
unsigned PJMEDIA_AFD_MAX_FSZ (const pjmedia_audio_format_detail *afd)
 
void pjmedia_format_init_audio (pjmedia_format *fmt, pj_uint32_t fmt_id, unsigned clock_rate, unsigned channel_count, unsigned bits_per_sample, unsigned frame_time_usec, pj_uint32_t avg_bps, pj_uint32_t max_bps)
 
void pjmedia_format_init_video (pjmedia_format *fmt, pj_uint32_t fmt_id, unsigned width, unsigned height, unsigned fps_num, unsigned fps_denum)
 
pjmedia_formatpjmedia_format_copy (pjmedia_format *dst, const pjmedia_format *src)
 
pjmedia_audio_format_detailpjmedia_format_get_audio_format_detail (const pjmedia_format *fmt, pj_bool_t assert_valid)
 
pjmedia_video_format_detailpjmedia_format_get_video_format_detail (const pjmedia_format *fmt, pj_bool_t assert_valid)
 
pj_status_t pjmedia_video_format_mgr_create (pj_pool_t *pool, unsigned max_fmt, unsigned options, pjmedia_video_format_mgr **p_mgr)
 
pjmedia_video_format_mgrpjmedia_video_format_mgr_instance (void)
 
void pjmedia_video_format_mgr_set_instance (pjmedia_video_format_mgr *mgr)
 
const pjmedia_video_format_infopjmedia_get_video_format_info (pjmedia_video_format_mgr *mgr, pj_uint32_t id)
 
pj_status_t pjmedia_register_video_format_info (pjmedia_video_format_mgr *mgr, pjmedia_video_format_info *vfi)
 
void pjmedia_video_format_mgr_destroy (pjmedia_video_format_mgr *mgr)
 
pj_status_t pjmedia_video_format_fill_black (const pjmedia_format *fmt, void *buf, pj_size_t buf_size)
 

Detailed Description

Media format

 


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