Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
cc6a6a91
Commit
cc6a6a91
authored
17 years ago
by
Emmanuel Milou
Browse files
Options
Downloads
Patches
Plain Diff
Codecs topo defined in global.h
parent
553f5a89
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/audio/codecDescriptor.cpp
+9
-8
9 additions, 8 deletions
src/audio/codecDescriptor.cpp
src/global.h
+3
-0
3 additions, 0 deletions
src/global.h
with
12 additions
and
8 deletions
src/audio/codecDescriptor.cpp
+
9
−
8
View file @
cc6a6a91
...
...
@@ -39,7 +39,7 @@ CodecDescriptor::~CodecDescriptor()
void
CodecDescriptor
::
deleteHandlePointer
(
void
)
{
_debug
(
"Destroy codecs handles
\n
"
);
//
_debug("Destroy codecs handles\n");
int
i
;
for
(
i
=
0
;
i
<
_CodecInMemory
.
size
()
;
i
++
)
{
...
...
@@ -62,6 +62,7 @@ CodecDescriptor::init()
int
i
;
for
(
i
=
0
;
i
<
_nbCodecs
;
i
++
)
{
_CodecsMap
[(
CodecType
)
CodecDynamicList
[
i
]
->
getPayload
()]
=
CodecDynamicList
[
i
];
_debug
(
"%s
\n
"
,
CodecDynamicList
[
i
]
->
getCodecName
().
c_str
());
}
}
...
...
@@ -207,7 +208,7 @@ CodecDescriptor::scanCodecDirectory( void )
else
{
if
(
seemsValid
(
tmp
)
)
{
_debug
(
"Codec : %s
\n
"
,
tmp
.
c_str
());
//
_debug("Codec : %s\n", tmp.c_str());
audioCodec
=
loadCodec
(
codecDir
.
append
(
tmp
)
);
codecs
.
push_back
(
audioCodec
);
codecDir
=
CODECS_DIR
;
...
...
@@ -253,7 +254,7 @@ CodecDescriptor::unloadCodec( CodecHandlePointer p )
dlclose
(
p
.
second
);
}
AudioCodec
*
AudioCodec
*
CodecDescriptor
::
getFirstCodecAvailable
(
void
)
{
CodecsMap
::
iterator
iter
=
_CodecsMap
.
begin
();
...
...
@@ -262,15 +263,15 @@ CodecDescriptor::getFirstCodecAvailable( void )
else
return
NULL
;
}
bool
bool
CodecDescriptor
::
seemsValid
(
std
::
string
lib
)
{
// The name of the shared library seems valid <==> it looks like libcodec_xxx.so
// We check this
std
::
string
begin
=
"libcodec_"
;
std
::
string
end
=
".so"
;
std
::
string
begin
=
SFL_CODEC_VALID_PREFIX
;
std
::
string
end
=
SFL_CODEC_VALID_EXTEN
;
if
(
lib
.
substr
(
0
,
begin
.
length
())
==
begin
)
if
(
lib
.
substr
(
lib
.
length
()
-
end
.
length
()
,
end
.
length
()
)
==
end
)
return
true
;
...
...
This diff is collapsed.
Click to expand it.
src/global.h
+
3
−
0
View file @
cc6a6a91
...
...
@@ -83,6 +83,9 @@ typedef short int16;
#define PCM_SURROUND71 "plug:surround71"
#define PCM_IEC958 "plug:iec958"
#define SFL_CODEC_VALID_PREFIX "libcodec_"
#define SFL_CODEC_VALID_EXTEN ".so"
#define SFL_PCM_BOTH 0x0021
#define SFL_PCM_PLAYBACK 0x0022
#define SFL_PCM_CAPTURE 0x0023
...
...
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