Ok.
could it be related to the order in which modules get loaded in asterisk?
also can you please suggest some way to pass this information somehow from
codec_xyz.c to ref_format_attr_xyz.c?
because I believe codec_opus.so does this sort of thing.

On Wed, 28 Aug 2019 at 15:28, Joshua C. Colp <jc...@digium.com> wrote:

> On Tue, Aug 27, 2019, at 7:41 AM, Mohit Dhiman wrote:
> > Hi,
> > I am trying to pass default data from codec_xyz.c to
> res_format_attr_xyz.c
> >
> > what I did:
> >  * main/codec_builtin.c: ast_codec_builtin_init: made a call to
> > CODEC_REGISTER_AND_CACHE(xyz)
> >  * codecs/codec_xyz.c: load_module: get the codec. xyz_codec =
> > ast_codec_get()
> >  * codecs/codec_xyz.c: load_module: format =
> > ast_format_create_named("xyz", xyz_codec)
> >  * codecs/codec_xyz.c: load_module: initialized struct xyz_attr in
> > variable attr
> >  * codecs/codec_xyz.c: load_module:
> > ast_format_set_attribute_data(format, attr);
> >  * codecs/codec_xyz.c: load_module: ast_format_cache_set(format);
> >
> > problem is that attribute_data in callback format_generate_sdp_fmtp of
> > res_format_attr_xyz.c is NULL
> > and not what was initialized in codec/codec_xyz.c
>
> You'd need to follow the complete path to determine where it gets lost. As
> it is, that's not a use case I think any have used (that is initializing
> and setting attributes on the cached format).
>
> --
> Joshua C. Colp
> Digium - A Sangoma Company | Senior Software Developer
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
> Check us out at: www.digium.com & www.asterisk.org
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to