Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
e3cb27d3
Commit
e3cb27d3
authored
9 years ago
by
Matt Jordan
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "format: Register format-attribute module with cached formats." into 13
parents
6c10d30d
d8d39913
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main/format.c
+20
-2
20 additions, 2 deletions
main/format.c
with
20 additions
and
2 deletions
main/format.c
+
20
−
2
View file @
e3cb27d3
...
@@ -302,6 +302,14 @@ const void *ast_format_attribute_get(const struct ast_format *format, const char
...
@@ -302,6 +302,14 @@ const void *ast_format_attribute_get(const struct ast_format *format, const char
{
{
const
struct
ast_format_interface
*
interface
=
format
->
interface
;
const
struct
ast_format_interface
*
interface
=
format
->
interface
;
if
(
!
interface
)
{
struct
format_interface
*
format_interface
=
ao2_find
(
interfaces
,
format
->
codec
->
name
,
OBJ_SEARCH_KEY
);
if
(
format_interface
)
{
interface
=
format_interface
->
interface
;
ao2_ref
(
format_interface
,
-
1
);
}
}
if
(
!
interface
||
!
interface
->
format_attribute_get
)
{
if
(
!
interface
||
!
interface
->
format_attribute_get
)
{
return
NULL
;
return
NULL
;
}
}
...
@@ -330,11 +338,21 @@ struct ast_format *ast_format_parse_sdp_fmtp(const struct ast_format *format, co
...
@@ -330,11 +338,21 @@ struct ast_format *ast_format_parse_sdp_fmtp(const struct ast_format *format, co
void
ast_format_generate_sdp_fmtp
(
const
struct
ast_format
*
format
,
unsigned
int
payload
,
struct
ast_str
**
str
)
void
ast_format_generate_sdp_fmtp
(
const
struct
ast_format
*
format
,
unsigned
int
payload
,
struct
ast_str
**
str
)
{
{
if
(
!
format
->
interface
||
!
format
->
interface
->
format_generate_sdp_fmtp
)
{
const
struct
ast_format_interface
*
interface
=
format
->
interface
;
if
(
!
interface
)
{
struct
format_interface
*
format_interface
=
ao2_find
(
interfaces
,
format
->
codec
->
name
,
OBJ_SEARCH_KEY
);
if
(
format_interface
)
{
interface
=
format_interface
->
interface
;
ao2_ref
(
format_interface
,
-
1
);
}
}
if
(
!
interface
||
!
interface
->
format_generate_sdp_fmtp
)
{
return
;
return
;
}
}
format
->
interface
->
format_generate_sdp_fmtp
(
format
,
payload
,
str
);
interface
->
format_generate_sdp_fmtp
(
format
,
payload
,
str
);
}
}
struct
ast_codec
*
ast_format_get_codec
(
const
struct
ast_format
*
format
)
struct
ast_codec
*
ast_format_get_codec
(
const
struct
ast_format
*
format
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment