1
/* $Id: format.h 4785 2014-03-10 09:01:18Z nanang $ */
3
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
#ifndef __PJMEDIA_FORMAT_H__
21
#define __PJMEDIA_FORMAT_H__
24
* @file pjmedia/format.h Media format
27
#include <pjmedia/types.h>
30
* @defgroup PJMEDIA_FORMAT Media format
31
* @ingroup PJMEDIA_TYPES
39
* Macro for packing format from a four character code, similar to FOURCC.
40
* This macro is used for building the constants in pjmedia_format_id
43
#define PJMEDIA_FORMAT_PACK(C1, C2, C3, C4) PJMEDIA_FOURCC(C1, C2, C3, C4)
46
* This enumeration uniquely identify audio sample and/or video pixel formats.
47
* Some well known formats are listed here. The format ids are built by
48
* combining four character codes, similar to FOURCC. The format id is
49
* extensible, as application may define and use format ids not declared
50
* on this enumeration.
52
* This format id along with other information will fully describe the media
53
* in #pjmedia_format structure.
55
typedef enum pjmedia_format_id
61
/** 16bit signed integer linear PCM audio */
62
PJMEDIA_FORMAT_L16 = 0,
64
/** Alias for PJMEDIA_FORMAT_L16 */
65
PJMEDIA_FORMAT_PCM = PJMEDIA_FORMAT_L16,
68
PJMEDIA_FORMAT_PCMA = PJMEDIA_FORMAT_PACK('A', 'L', 'A', 'W'),
70
/** Alias for PJMEDIA_FORMAT_PCMA */
71
PJMEDIA_FORMAT_ALAW = PJMEDIA_FORMAT_PCMA,
74
PJMEDIA_FORMAT_PCMU = PJMEDIA_FORMAT_PACK('u', 'L', 'A', 'W'),
76
/** Aliaw for PJMEDIA_FORMAT_PCMU */
77
PJMEDIA_FORMAT_ULAW = PJMEDIA_FORMAT_PCMU,
80
PJMEDIA_FORMAT_AMR = PJMEDIA_FORMAT_PACK(' ', 'A', 'M', 'R'),
83
PJMEDIA_FORMAT_G729 = PJMEDIA_FORMAT_PACK('G', '7', '2', '9'),
85
/** Internet Low Bit-Rate Codec (ILBC) */
86
PJMEDIA_FORMAT_ILBC = PJMEDIA_FORMAT_PACK('I', 'L', 'B', 'C'),
95
PJMEDIA_FORMAT_RGB24 = PJMEDIA_FORMAT_PACK('R', 'G', 'B', '3'),
98
* 32bit RGB with alpha channel
100
PJMEDIA_FORMAT_RGBA = PJMEDIA_FORMAT_PACK('R', 'G', 'B', 'A'),
101
PJMEDIA_FORMAT_BGRA = PJMEDIA_FORMAT_PACK('B', 'G', 'R', 'A'),
104
* Alias for PJMEDIA_FORMAT_RGBA
106
PJMEDIA_FORMAT_RGB32 = PJMEDIA_FORMAT_RGBA,
109
* Device Independent Bitmap, alias for 24 bit RGB
111
PJMEDIA_FORMAT_DIB = PJMEDIA_FORMAT_PACK('D', 'I', 'B', ' '),
114
* This is planar 4:4:4/24bpp RGB format, the data can be treated as
115
* three planes of color components, where the first plane contains
116
* only the G samples, the second plane contains only the B samples,
117
* and the third plane contains only the R samples.
119
PJMEDIA_FORMAT_GBRP = PJMEDIA_FORMAT_PACK('G', 'B', 'R', 'P'),
122
* This is a packed 4:4:4/32bpp format, where each pixel is encoded as
123
* four consecutive bytes, arranged in the following sequence: V0, U0,
125
* http://msdn.microsoft.com/en-us/library/dd206750%28v=VS.85%29.aspx#ayuv
127
PJMEDIA_FORMAT_AYUV = PJMEDIA_FORMAT_PACK('A', 'Y', 'U', 'V'),
130
* This is packed 4:2:2/16bpp YUV format, the data can be treated as
131
* an array of unsigned char values, where the first byte contains
132
* the first Y sample, the second byte contains the first U (Cb) sample,
133
* the third byte contains the second Y sample, and the fourth byte
134
* contains the first V (Cr) sample, and so forth. Source:
135
* http://msdn.microsoft.com/en-us/library/dd206750%28v=VS.85%29.aspx#yuy2
137
PJMEDIA_FORMAT_YUY2 = PJMEDIA_FORMAT_PACK('Y', 'U', 'Y', '2'),
140
* This format is the same as the YUY2 format except the byte order is
141
* reversed -- that is, the chroma and luma bytes are flipped. If the
142
* image is addressed as an array of two little-endian WORD values, the
143
* first WORD contains U in the LSBs and Y0 in the MSBs, and the second
144
* WORD contains V in the LSBs and Y1 in the MSBs. Source:
145
* http://msdn.microsoft.com/en-us/library/dd206750%28v=VS.85%29.aspx#uyvy
147
PJMEDIA_FORMAT_UYVY = PJMEDIA_FORMAT_PACK('U', 'Y', 'V', 'Y'),
150
* This format is the same as the YUY2 and UYVY format except the byte
151
* order is reversed -- that is, the chroma and luma bytes are flipped.
152
* If the image is addressed as an array of two little-endian WORD values,
153
* the first WORD contains Y0 in the LSBs and V in the MSBs, and the second
154
* WORD contains Y1 in the LSBs and U in the MSBs.
156
PJMEDIA_FORMAT_YVYU = PJMEDIA_FORMAT_PACK('Y', 'V', 'Y', 'U'),
159
* This is planar 4:2:0/12bpp YUV format, the data can be treated as
160
* three planes of color components, where the first plane contains
161
* only the Y samples, the second plane contains only the U (Cb) samples,
162
* and the third plane contains only the V (Cr) sample.
164
PJMEDIA_FORMAT_I420 = PJMEDIA_FORMAT_PACK('I', '4', '2', '0'),
167
* IYUV is alias for I420.
169
PJMEDIA_FORMAT_IYUV = PJMEDIA_FORMAT_I420,
172
* This is planar 4:2:0/12bpp YUV format, similar to I420 or IYUV but
173
* the U (Cb) and V (Cr) planes order is switched, i.e: the second plane
174
* contains the V (Cb) samples and the third plane contains the V (Cr)
177
PJMEDIA_FORMAT_YV12 = PJMEDIA_FORMAT_PACK('Y', 'V', '1', '2'),
180
* This is planar 4:2:2/16bpp YUV format, the data can be treated as
181
* three planes of color components, where the first plane contains
182
* only the Y samples, the second plane contains only the U (Cb) samples,
183
* and the third plane contains only the V (Cr) sample.
185
PJMEDIA_FORMAT_I422 = PJMEDIA_FORMAT_PACK('I', '4', '2', '2'),
188
* The JPEG version of planar 4:2:0/12bpp YUV format.
190
PJMEDIA_FORMAT_I420JPEG = PJMEDIA_FORMAT_PACK('J', '4', '2', '0'),
193
* The JPEG version of planar 4:2:2/16bpp YUV format.
195
PJMEDIA_FORMAT_I422JPEG = PJMEDIA_FORMAT_PACK('J', '4', '2', '2'),
198
* Encoded video formats
201
PJMEDIA_FORMAT_H261 = PJMEDIA_FORMAT_PACK('H', '2', '6', '1'),
202
PJMEDIA_FORMAT_H263 = PJMEDIA_FORMAT_PACK('H', '2', '6', '3'),
203
PJMEDIA_FORMAT_H263P = PJMEDIA_FORMAT_PACK('P', '2', '6', '3'),
204
PJMEDIA_FORMAT_H264 = PJMEDIA_FORMAT_PACK('H', '2', '6', '4'),
206
PJMEDIA_FORMAT_MJPEG = PJMEDIA_FORMAT_PACK('M', 'J', 'P', 'G'),
207
PJMEDIA_FORMAT_MPEG1VIDEO = PJMEDIA_FORMAT_PACK('M', 'P', '1', 'V'),
208
PJMEDIA_FORMAT_MPEG2VIDEO = PJMEDIA_FORMAT_PACK('M', 'P', '2', 'V'),
209
PJMEDIA_FORMAT_MPEG4 = PJMEDIA_FORMAT_PACK('M', 'P', 'G', '4'),
214
* This enumeration specifies what type of detail is included in a
215
* #pjmedia_format structure.
217
typedef enum pjmedia_format_detail_type
219
/** Format detail is not specified. */
220
PJMEDIA_FORMAT_DETAIL_NONE,
222
/** Audio format detail. */
223
PJMEDIA_FORMAT_DETAIL_AUDIO,
225
/** Video format detail. */
226
PJMEDIA_FORMAT_DETAIL_VIDEO,
228
/** Number of format detail type that has been defined. */
229
PJMEDIA_FORMAT_DETAIL_MAX
231
} pjmedia_format_detail_type;
234
* This structure is put in \a detail field of #pjmedia_format to describe
235
* detail information about an audio media.
237
typedef struct pjmedia_audio_format_detail
239
unsigned clock_rate; /**< Audio clock rate in samples or Hz. */
240
unsigned channel_count; /**< Number of channels. */
241
unsigned frame_time_usec;/**< Frame interval, in microseconds. */
242
unsigned bits_per_sample;/**< Number of bits per sample. */
243
pj_uint32_t avg_bps; /**< Average bitrate */
244
pj_uint32_t max_bps; /**< Maximum bitrate */
245
} pjmedia_audio_format_detail;
248
* This structure is put in \a detail field of #pjmedia_format to describe
249
* detail information about a video media.
251
* Additional information about a video format can also be retrieved by
252
* calling #pjmedia_get_video_format_info().
254
typedef struct pjmedia_video_format_detail
256
pjmedia_rect_size size; /**< Video size (width, height) */
257
pjmedia_ratio fps; /**< Number of frames per second. */
258
pj_uint32_t avg_bps;/**< Average bitrate. */
259
pj_uint32_t max_bps;/**< Maximum bitrate. */
260
} pjmedia_video_format_detail;
263
* This macro declares the size of the detail section in #pjmedia_format
264
* to be reserved for user defined detail.
266
#ifndef PJMEDIA_FORMAT_DETAIL_USER_SIZE
267
# define PJMEDIA_FORMAT_DETAIL_USER_SIZE 1
271
* This structure contains all the information needed to completely describe
274
typedef struct pjmedia_format
277
* The format id that specifies the audio sample or video pixel format.
278
* Some well known formats ids are declared in pjmedia_format_id
281
* @see pjmedia_format_id
286
* The top-most type of the media, as an information.
291
* The type of detail structure in the \a detail pointer.
293
pjmedia_format_detail_type detail_type;
296
* Detail section to describe the media.
301
* Detail section for audio format.
303
pjmedia_audio_format_detail aud;
306
* Detail section for video format.
308
pjmedia_video_format_detail vid;
311
* Reserved area for user-defined format detail.
313
char user[PJMEDIA_FORMAT_DETAIL_USER_SIZE];
319
* This enumeration describes video color model. It mostly serves as
322
typedef enum pjmedia_color_model
324
/** The color model is unknown or unspecified. */
325
PJMEDIA_COLOR_MODEL_NONE,
327
/** RGB color model. */
328
PJMEDIA_COLOR_MODEL_RGB,
330
/** YUV color model. */
331
PJMEDIA_COLOR_MODEL_YUV
332
} pjmedia_color_model;
335
* This structure holds information to apply a specific video format
336
* against size and buffer information, and get additional information
337
* from it. To do that, application fills up the input fields of this
338
* structure, and give this structure to \a apply_fmt() function
339
* of #pjmedia_video_format_info structure.
341
typedef struct pjmedia_video_apply_fmt_param
346
* [IN] The image size. This field is mandatory, and has to be set
347
* correctly prior to calling \a apply_fmt() function.
349
pjmedia_rect_size size;
352
* [IN] Pointer to the buffer that holds the frame. The \a apply_fmt()
353
* function uses this pointer to calculate the pointer for each video
354
* planes of the media. This field is optional -- however, the
355
* \a apply_fmt() would still fill up the \a planes[] array with the
356
* correct pointer even though the buffer is set to NULL. This could be
357
* useful to calculate the size (in bytes) of each plane.
364
* [OUT] The size (in bytes) required of the buffer to hold the video
365
* frame of the particular frame size (width, height).
367
pj_size_t framebytes;
370
* [OUT] Array of strides value (in bytes) for each video plane.
372
int strides[PJMEDIA_MAX_VIDEO_PLANES];
375
* [OUT] Array of pointers to each of the video planes. The values are
376
* calculated from the \a buffer field.
378
pj_uint8_t *planes[PJMEDIA_MAX_VIDEO_PLANES];
381
* [OUT] Array of video plane sizes.
383
pj_size_t plane_bytes[PJMEDIA_MAX_VIDEO_PLANES];
385
} pjmedia_video_apply_fmt_param;
388
* This structure holds information to describe a video format. Application
389
* can retrieve this structure by calling #pjmedia_get_video_format_info()
392
typedef struct pjmedia_video_format_info
395
* The unique format ID of the media. Well known format ids are declared
396
* in pjmedia_format_id enumeration.
401
* Null terminated string containing short identification about the
407
* Information about the color model of this video format.
409
pjmedia_color_model color_model;
412
* Number of bits needed to store one pixel of this video format.
417
* Number of video planes that this format uses. Value 1 indicates
418
* packed format, while value greater than 1 indicates planar format.
420
pj_uint8_t plane_cnt;
423
* Pointer to function to apply this format against size and buffer
424
* information in pjmedia_video_apply_fmt_param argument. Application
425
* uses this function to obtain various information such as the
426
* memory size of a frame buffer, strides value of the image, the
427
* location of the planes, and so on. See pjmedia_video_apply_fmt_param
428
* for additional information.
430
* @param vfi The video format info.
431
* @param vafp The parameters to investigate.
433
* @return PJ_SUCCESS if the function has calculated the
434
* information in \a vafp successfully.
436
pj_status_t (*apply_fmt)(const struct pjmedia_video_format_info *vfi,
437
pjmedia_video_apply_fmt_param *vafp);
439
} pjmedia_video_format_info;
442
/*****************************************************************************
447
* General utility routine to calculate samples per frame value from clock
448
* rate, ptime (in usec), and channel count. Application should use this
449
* macro whenever possible due to possible overflow in the math calculation.
451
* @param clock_rate Clock rate.
452
* @param usec_ptime Frame interval, in microsecond.
453
* @param channel_count Number of channels.
455
* @return The samples per frame value.
457
PJ_INLINE(unsigned) PJMEDIA_SPF(unsigned clock_rate, unsigned usec_ptime,
458
unsigned channel_count)
461
return ((unsigned)((pj_uint64_t)usec_ptime * \
462
clock_rate * channel_count / 1000000));
463
#elif PJ_HAS_FLOATING_POINT
464
return ((unsigned)(1.0*usec_ptime * clock_rate * channel_count / 1000000));
466
return ((unsigned)(usec_ptime / 1000L * clock_rate * \
467
channel_count / 1000));
472
* Variant of #PJMEDIA_SPF() which takes frame rate instead of ptime.
474
PJ_INLINE(unsigned) PJMEDIA_SPF2(unsigned clock_rate, const pjmedia_ratio *fr,
475
unsigned channel_count)
478
return ((unsigned)((pj_uint64_t)clock_rate * fr->denum \
479
/ fr->num / channel_count));
480
#elif PJ_HAS_FLOATING_POINT
481
return ((unsigned)(1.0* clock_rate * fr->denum / fr->num /channel_count));
483
return ((unsigned)(1L * clock_rate * fr->denum / fr->num / channel_count));
489
* Utility routine to calculate frame size (in bytes) from bitrate and frame
490
* interval values. Application should use this macro whenever possible due
491
* to possible overflow in the math calculation.
493
* @param bps The bitrate of the stream.
494
* @param usec_ptime Frame interval, in microsecond.
496
* @return Frame size in bytes.
498
PJ_INLINE(unsigned) PJMEDIA_FSZ(unsigned bps, unsigned usec_ptime)
501
return ((unsigned)((pj_uint64_t)bps * usec_ptime / PJ_UINT64(8000000)));
502
#elif PJ_HAS_FLOATING_POINT
503
return ((unsigned)(1.0 * bps * usec_ptime / 8000000.0));
505
return ((unsigned)(bps / 8L * usec_ptime / 1000000));
510
* General utility routine to calculate ptime value from frame rate.
511
* Application should use this macro whenever possible due to possible
512
* overflow in the math calculation.
514
* @param frame_rate Frame rate
516
* @return The ptime value (in usec).
518
PJ_INLINE(unsigned) PJMEDIA_PTIME(const pjmedia_ratio *frame_rate)
521
return ((unsigned)((pj_uint64_t)1000000 * \
522
frame_rate->denum / frame_rate->num));
523
#elif PJ_HAS_FLOATING_POINT
524
return ((unsigned)(1000000.0 * frame_rate->denum /
527
return ((unsigned)((1000L * frame_rate->denum /
528
frame_rate->num) * 1000));
533
* Utility to retrieve samples_per_frame value from
534
* pjmedia_audio_format_detail.
536
* @param pafd Pointer to pjmedia_audio_format_detail
537
* @return Samples per frame
539
PJ_INLINE(unsigned) PJMEDIA_AFD_SPF(const pjmedia_audio_format_detail *pafd)
541
return PJMEDIA_SPF(pafd->clock_rate, pafd->frame_time_usec,
542
pafd->channel_count);
546
* Utility to retrieve average frame size from pjmedia_audio_format_detail.
547
* The average frame size is derived from the average bitrate of the audio
550
* @param afd Pointer to pjmedia_audio_format_detail
551
* @return Average frame size.
553
PJ_INLINE(unsigned) PJMEDIA_AFD_AVG_FSZ(const pjmedia_audio_format_detail *afd)
555
return PJMEDIA_FSZ(afd->avg_bps, afd->frame_time_usec);
559
* Utility to retrieve maximum frame size from pjmedia_audio_format_detail.
560
* The maximum frame size is derived from the maximum bitrate of the audio
563
* @param afd Pointer to pjmedia_audio_format_detail
564
* @return Average frame size.
566
PJ_INLINE(unsigned) PJMEDIA_AFD_MAX_FSZ(const pjmedia_audio_format_detail *afd)
568
return PJMEDIA_FSZ(afd->max_bps, afd->frame_time_usec);
573
* Initialize the format as audio format with the specified parameters.
575
* @param fmt The format to be initialized.
576
* @param fmt_id Format ID. See #pjmedia_format_id
577
* @param clock_rate Audio clock rate.
578
* @param channel_count Number of channels.
579
* @param bits_per_sample Number of bits per sample.
580
* @param frame_time_usec Frame interval, in microsecond.
581
* @param avg_bps Average bitrate.
582
* @param max_bps Maximum bitrate.
584
PJ_INLINE(void) pjmedia_format_init_audio(pjmedia_format *fmt,
587
unsigned channel_count,
588
unsigned bits_per_sample,
589
unsigned frame_time_usec,
593
/* This function is inlined to avoid build problem due to circular
594
* dependency, i.e: this function is part of pjmedia and is needed
595
* by pjmedia-audiodev, while pjmedia depends on pjmedia-audiodev.
599
fmt->type = PJMEDIA_TYPE_AUDIO;
600
fmt->detail_type = PJMEDIA_FORMAT_DETAIL_AUDIO;
602
fmt->det.aud.clock_rate = clock_rate;
603
fmt->det.aud.channel_count = channel_count;
604
fmt->det.aud.bits_per_sample = bits_per_sample;
605
fmt->det.aud.frame_time_usec = frame_time_usec;
606
fmt->det.aud.avg_bps = avg_bps;
607
fmt->det.aud.max_bps = max_bps;
612
* Initialize the format as video format with the specified parameters.
613
* A format manager should have been created, as this function will need
614
* to consult to a format manager in order to fill in detailed
615
* information about the format.
617
* @param fmt The format to be initialised.
618
* @param fmt_id Format ID. See #pjmedia_format_id
619
* @param width Image width.
620
* @param height Image heigth.
621
* @param fps_num FPS numerator.
622
* @param fps_denum FPS denumerator.
623
* @param avg_bps Average bitrate.
624
* @param max_bps Maximum bitrate.
626
PJ_DECL(void) pjmedia_format_init_video(pjmedia_format *fmt,
634
* Copy format to another.
636
* @param dst The destination format.
637
* @param src The source format.
639
* @return Pointer to destination format.
641
PJ_DECL(pjmedia_format*) pjmedia_format_copy(pjmedia_format *dst,
642
const pjmedia_format *src);
645
* Check if the format contains audio format, and retrieve the audio format
646
* detail in the format.
648
* @param fmt The format structure.
649
* @param assert_valid If this is set to non-zero, an assertion will be
650
* raised if the detail type is not audio or if the
651
* the detail is NULL.
653
* @return The instance of audio format detail in the format
654
* structure, or NULL if the format doesn't contain
657
PJ_DECL(pjmedia_audio_format_detail*)
658
pjmedia_format_get_audio_format_detail(const pjmedia_format *fmt,
659
pj_bool_t assert_valid);
662
* Check if the format contains video format, and retrieve the video format
663
* detail in the format.
665
* @param fmt The format structure.
666
* @param assert_valid If this is set to non-zero, an assertion will be
667
* raised if the detail type is not video or if the
668
* the detail is NULL.
670
* @return The instance of video format detail in the format
671
* structure, or NULL if the format doesn't contain
674
PJ_DECL(pjmedia_video_format_detail*)
675
pjmedia_format_get_video_format_detail(const pjmedia_format *fmt,
676
pj_bool_t assert_valid);
678
/*****************************************************************************
683
* Opaque data type for video format manager. The video format manager manages
684
* the repository of video formats that the framework recognises. Typically it
685
* is a singleton instance, although application may instantiate more than one
686
* instances of this if required.
688
typedef struct pjmedia_video_format_mgr pjmedia_video_format_mgr;
692
* Create a new video format manager instance. This will also set the pointer
693
* to the singleton instance if the value is still NULL.
695
* @param pool The pool to allocate memory.
696
* @param max_fmt Maximum number of formats to accommodate.
697
* @param options Option flags. Must be zero for now.
698
* @param p_mgr Pointer to hold the created instance.
700
* @return PJ_SUCCESS on success, or the appripriate error value.
703
pjmedia_video_format_mgr_create(pj_pool_t *pool,
706
pjmedia_video_format_mgr **p_mgr);
709
* Get the singleton instance of the video format manager.
711
* @return The instance.
713
PJ_DECL(pjmedia_video_format_mgr*) pjmedia_video_format_mgr_instance(void);
716
* Manually assign a specific video manager instance as the singleton
717
* instance. Normally this is not needed if only one instance is ever
718
* going to be created, as the library automatically assign the singleton
721
* @param mgr The instance to be used as the singleton instance.
722
* Application may specify NULL to clear the singleton
723
* singleton instance.
726
pjmedia_video_format_mgr_set_instance(pjmedia_video_format_mgr *mgr);
729
* Retrieve a video format info for the specified format id.
731
* @param mgr The video format manager. Specify NULL to use
732
* the singleton instance (however, a video format
733
* manager still must have been created prior to
734
* calling this function).
735
* @param id The format id which format info is to be
738
* @return The video format info.
740
PJ_DECL(const pjmedia_video_format_info*)
741
pjmedia_get_video_format_info(pjmedia_video_format_mgr *mgr,
745
* Register a new video format to the framework. By default, built-in
746
* formats will be registered automatically to the format manager when
747
* it is created (note: built-in formats are ones which format id is
748
* listed in pjmedia_format_id enumeration). This function allows
749
* application to use user defined format id by registering that format
750
* into the framework.
752
* @param mgr The video format manager. Specify NULL to use
753
* the singleton instance (however, a video format
754
* manager still must have been created prior to
755
* calling this function).
756
* @param vfi The video format info to be registered. This
757
* structure must remain valid until the format
758
* manager is destroyed.
760
* @return PJ_SUCCESS on success, or the appripriate error value.
763
pjmedia_register_video_format_info(pjmedia_video_format_mgr *mgr,
764
pjmedia_video_format_info *vfi);
767
* Destroy a video format manager. If the manager happens to be the singleton
768
* instance, the singleton instance will be set to NULL.
770
* @param mgr The video format manager. Specify NULL to use
771
* the singleton instance (however, a video format
772
* manager still must have been created prior to
773
* calling this function).
775
PJ_DECL(void) pjmedia_video_format_mgr_destroy(pjmedia_video_format_mgr *mgr);
783
#endif /* __PJMEDIA_FORMAT_H__ */