BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJMEDIA Reference

pjmedia_vid_codec_factory_op Struct Reference

#include <vid_codec.h>

Data Fields

pj_status_t(* test_alloc )(pjmedia_vid_codec_factory *factory, const pjmedia_vid_codec_info *info)
 
pj_status_t(* default_attr )(pjmedia_vid_codec_factory *factory, const pjmedia_vid_codec_info *info, pjmedia_vid_codec_param *attr)
 
pj_status_t(* enum_info )(pjmedia_vid_codec_factory *factory, unsigned *count, pjmedia_vid_codec_info codecs[])
 
pj_status_t(* alloc_codec )(pjmedia_vid_codec_factory *factory, const pjmedia_vid_codec_info *info, pjmedia_vid_codec **p_codec)
 
pj_status_t(* dealloc_codec )(pjmedia_vid_codec_factory *factory, pjmedia_vid_codec *codec)
 

Detailed Description

This structure describes operations that must be supported by codec factories.

Field Documentation

◆ test_alloc

pj_status_t(* pjmedia_vid_codec_factory_op::test_alloc) (pjmedia_vid_codec_factory *factory, const pjmedia_vid_codec_info *info)

Check whether the factory can create codec with the specified codec info.

Parameters
factoryThe codec factory.
infoThe codec info.
Returns
PJ_SUCCESS if this factory is able to create an instance of codec with the specified info.

◆ default_attr

pj_status_t(* pjmedia_vid_codec_factory_op::default_attr) (pjmedia_vid_codec_factory *factory, const pjmedia_vid_codec_info *info, pjmedia_vid_codec_param *attr)

Create default attributes for the specified codec ID. This function can be called by application to get the capability of the codec.

Parameters
factoryThe codec factory.
infoThe codec info.
attrThe attribute to be initialized.
Returns
PJ_SUCCESS if success.

◆ enum_info

pj_status_t(* pjmedia_vid_codec_factory_op::enum_info) (pjmedia_vid_codec_factory *factory, unsigned *count, pjmedia_vid_codec_info codecs[])

Enumerate supported codecs that can be created using this factory.

Parameters
factoryThe codec factory.
countOn input, specifies the number of elements in the array. On output, the value will be set to the number of elements that have been initialized by this function.
infoThe codec info array, which contents will be initialized upon return.
Returns
PJ_SUCCESS on success.

◆ alloc_codec

pj_status_t(* pjmedia_vid_codec_factory_op::alloc_codec) (pjmedia_vid_codec_factory *factory, const pjmedia_vid_codec_info *info, pjmedia_vid_codec **p_codec)

Create one instance of the codec with the specified codec info.

Parameters
factoryThe codec factory.
infoThe codec info.
p_codecPointer to receive the codec instance.
Returns
PJ_SUCCESS on success.

◆ dealloc_codec

pj_status_t(* pjmedia_vid_codec_factory_op::dealloc_codec) (pjmedia_vid_codec_factory *factory, pjmedia_vid_codec *codec)

This function is called by codec manager to return a particular instance of codec back to the codec factory.

Parameters
factoryThe codec factory.
codecThe codec instance to be returned.
Returns
PJ_SUCCESS on success.

The documentation for this struct was generated from the following file:

 


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