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
3a2a4e94
Commit
3a2a4e94
authored
13 years ago
by
Rafaël Carré
Browse files
Options
Downloads
Patches
Plain Diff
codecs: link to libccrtp, don't use logger
parent
ea5ebde9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
daemon/src/audio/codecs/Makefile.am
+1
-0
1 addition, 0 deletions
daemon/src/audio/codecs/Makefile.am
daemon/src/audio/codecs/celtcodec.cpp
+11
-11
11 additions, 11 deletions
daemon/src/audio/codecs/celtcodec.cpp
daemon/src/audio/codecs/gsmcodec.cpp
+4
-4
4 additions, 4 deletions
daemon/src/audio/codecs/gsmcodec.cpp
with
16 additions
and
15 deletions
daemon/src/audio/codecs/Makefile.am
+
1
−
0
View file @
3a2a4e94
...
...
@@ -3,6 +3,7 @@ include $(top_srcdir)/globals.mak
noinst_LTLIBRARIES
=
libcodecdescriptor.la
libcodecdescriptor_la_SOURCES
=
audiocodecfactory.cpp audiocodec.cpp
libcodecdescriptor_la_LIBADD
=
$(
CCRTP_LIBS
)
if
BUILD_GSM
GSM_LIB
=
libcodec_gsm.so
...
...
This diff is collapsed.
Click to expand it.
daemon/src/audio/codecs/celtcodec.cpp
+
11
−
11
View file @
3a2a4e94
...
...
@@ -29,9 +29,9 @@
*/
#include
"audiocodec.h"
#include
"logger.h"
#include
<cstdio>
#include
<celt/celt.h>
#include
<stdexcept>
class
Celt
:
public
sfl
::
AudioCodec
...
...
@@ -53,39 +53,39 @@ class Celt : public sfl::AudioCodec
if
(
error
!=
CELT_OK
)
{
switch
(
error
)
{
case
CELT_BAD_ARG
:
_error
(
"Celt: An (or more) invalid argument (e.g. out of range)
\n
"
);
throw
std
::
runtime
_error
(
"Celt: An (or more) invalid argument (e.g. out of range)
\n
"
);
break
;
case
CELT_INVALID_MODE
:
_error
(
"Celt: The mode struct passed is invalid
\n
"
);
throw
std
::
runtime
_error
(
"Celt: The mode struct passed is invalid
\n
"
);
break
;
case
CELT_INTERNAL_ERROR
:
_error
(
"Celt: An internal error was detected
\n
"
);
throw
std
::
runtime
_error
(
"Celt: An internal error was detected
\n
"
);
break
;
case
CELT_CORRUPTED_DATA
:
_error
(
"Celt: The data passed (e.g. compressed data to decoder) is corrupted
\n
"
);
throw
std
::
runtime
_error
(
"Celt: The data passed (e.g. compressed data to decoder) is corrupted
\n
"
);
break
;
case
CELT_UNIMPLEMENTED
:
_error
(
"Celt: Invalid/unsupported request numbe
\n
"
);
throw
std
::
runtime
_error
(
"Celt: Invalid/unsupported request numbe
\n
"
);
break
;
case
CELT_INVALID_STATE
:
_error
(
"Celt: An encoder or decoder structure is invalid or already freed
\n
"
);
throw
std
::
runtime
_error
(
"Celt: An encoder or decoder structure is invalid or already freed
\n
"
);
break
;
case
CELT_ALLOC_FAIL
:
_error
(
"Celt: Memory allocation has failed
\n
"
);
throw
std
::
runtime
_error
(
"Celt: Memory allocation has failed
\n
"
);
break
;
default:
_error
(
"Celt: Unknown error
%d
\n
"
,
error
);
throw
std
::
runtime
_error
(
"Celt: Unknown error
"
);
}
}
if
(
_mode
==
NULL
)
_error
(
"Celt: Failed to create Celt mode"
);
throw
std
::
runtime
_error
(
"Celt: Failed to create Celt mode"
);
// bytes_per_packet = 1024;
// if (bytes_per_packet < 0 || bytes_per_packet > MAX_PACKET)
// {
// _error("bytes per packet must be between 0 and %d");
//
throw std::runtime
_error("bytes per packet must be between 0 and %d");
// }
// celt_mode_info(mode, CELT_GET_FRAME_SIZE, &frame_size);
...
...
This diff is collapsed.
Click to expand it.
daemon/src/audio/codecs/gsmcodec.cpp
+
4
−
4
View file @
3a2a4e94
...
...
@@ -31,8 +31,8 @@
#include
"audiocodec.h"
#include
"logger.h"
#include
<cassert>
#include
<stdexcept>
extern
"C"
{
#include
<gsm/gsm.h>
...
...
@@ -55,10 +55,10 @@ class Gsm : public sfl::AudioCodec
_hasDynamicPayload
=
false
;
if
(
!
(
_decode_gsmhandle
=
gsm_create
()))
_error
(
"ERROR: decode_gsm_create
\n
"
);
throw
std
::
runtime
_error
(
"ERROR: decode_gsm_create
\n
"
);
if
(
!
(
_encode_gsmhandle
=
gsm_create
()))
_error
(
"ERROR: encode_gsm_create
\n
"
);
throw
std
::
runtime
_error
(
"ERROR: encode_gsm_create
\n
"
);
}
Gsm
(
const
Gsm
&
);
...
...
@@ -75,7 +75,7 @@ class Gsm : public sfl::AudioCodec
(
void
)
buf_size
;
if
(
gsm_decode
(
_decode_gsmhandle
,
(
gsm_byte
*
)
src
,
(
gsm_signal
*
)
dst
)
<
0
)
_error
(
"ERROR: gsm_decode
\n
"
);
throw
std
::
runtime
_error
(
"ERROR: gsm_decode
\n
"
);
return
_frameSize
;
}
...
...
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