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
6127958c
"README.md" did not exist on "0cb9fb1ac0b2538af9535ee1f0158dbce48b816c"
Commit
6127958c
authored
16 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
use timer set at framesize (#1143)
parent
e540a7cc
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-common/src/audio/audiortp.cpp
+3
-9
3 additions, 9 deletions
sflphone-common/src/audio/audiortp.cpp
sflphone-common/src/audio/codecs/vorbiscodec.cpp
+0
-118
0 additions, 118 deletions
sflphone-common/src/audio/codecs/vorbiscodec.cpp
with
3 additions
and
127 deletions
sflphone-common/src/audio/audiortp.cpp
+
3
−
9
View file @
6127958c
...
...
@@ -574,8 +574,7 @@ AudioRtpRTX::run () {
int
timestamp
=
0
;
// for mic
int
countTime
=
0
;
// for receive
// TimerPort::setTimer(_layerFrameSize);
TimerPort
::
setTimer
(
5
);
TimerPort
::
setTimer
(
_layerFrameSize
);
audiolayer
->
startStream
();
_start
.
post
();
...
...
@@ -613,13 +612,8 @@ AudioRtpRTX::run () {
_ca
->
recAudio
.
recData
(
micData
,
_nSamplesMic
);
}
// Thread::sleep(TimerPort::getTimer());
// TimerPort::incTimer(_layerFrameSize); // 'frameSize' ms
// Thread::sleep(TimerPort::getTimer());
// TimerPort::incTimer(5); // 'frameSize' ms
usleep
(
50
);
Thread
::
sleep
(
TimerPort
::
getTimer
());
TimerPort
::
incTimer
(
_layerFrameSize
);
// 'frameSize' ms
}
...
...
This diff is collapsed.
Click to expand it.
sflphone-common/src/audio/codecs/vorbiscodec.cpp
deleted
100644 → 0
+
0
−
118
View file @
e540a7cc
/*
* Copyright (C) 2007-2009 Savoir-Faire Linux inc.
* Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include
"audiocodec.h"
#include
<cstdio>
#include
<math.h>
#include
<vorbis/vorbis.h>
#include
<vorbis/codec.h>
#include
<vorbis/vorbisenc.h>
class
Vorbis
:
public
AudioCodec
{
public:
Vorbis
(
int
payload
=
0
)
:
AudioCodec
(
payload
,
"vorbis"
),
_ogg_stream_state
(),
_ogg_packet
(),
_vorbis_info
(),
_vorbis_comment
(),
_vorbis_dsp_state
(),
_vorbis_block
()
{
_clockRate
=
8000
;
_channel
=
1
;
_bitrate
=
0
;
_bandwidth
=
0
;
initVorbis
();
}
Vorbis
(
const
Vorbis
&
);
Vorbis
&
operator
=
(
const
Vorbis
&
);
void
initVorbis
()
{
// init the encoder
vorbis_info_init
(
&
_vorbis_info
);
vorbis_encode_init_vbr
(
&
_vorbis_info
,
0.5
);
vorbis_comment_init
(
&
_vorbis_comment
);
vorbis_analysis_init
(
&
_vorbis_dsp_state
,
&
_vorbis_info
);
// random number for ogg serial number
srand
(
time
(
NULL
));
}
~
Vorbis
()
{
terminateVorbis
();
}
void
terminateVorbis
()
{
vorbis_block_clear
(
&
_vorbis_block
);
vorbis_dsp_clear
(
&
_vorbis_dsp_state
);
vorbis_comment_clear
(
&
_vorbis_comment
);
vorbis_info_clear
(
&
_vorbis_info
);
}
virtual
int
codecDecode
(
short
*
dst
,
unsigned
char
*
src
,
unsigned
int
size
)
{
return
1
;
}
virtual
int
codecEncode
(
unsigned
char
*
dst
,
short
*
src
,
unsigned
int
size
)
{
return
1
;
}
private
:
// ogg-vorbis specific variables
ogg_sync_state
oy
;
ogg_stream_state
_ogg_stream_state
;
ogg_packet
_ogg_packet
;
vorbis_info
_vorbis_info
;
vorbis_comment
_vorbis_comment
;
vorbis_dsp_state
_vorbis_dsp_state
;
vorbis_block
_vorbis_block
;
};
// the class factories
extern
"C"
AudioCodec
*
create
()
{
return
new
Vorbis
(
117
);
}
extern
"C"
void
destroy
(
AudioCodec
*
a
)
{
delete
a
;
}
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