Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
130
Issues
130
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-daemon
Commits
b38b204b
Commit
b38b204b
authored
Dec 18, 2018
by
Adrien Béraud
Committed by
Philippe Gorley
Dec 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
media: fix compilation warnings
Change-Id: I17acc6e9d3c8c0db3978d09b2d3606c7d7b28904
parent
6a36015c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
10 deletions
+11
-10
src/client/videomanager.cpp
src/client/videomanager.cpp
+1
-1
src/media/audio/audio_input.cpp
src/media/audio/audio_input.cpp
+0
-2
src/media/audio/jack/jacklayer.cpp
src/media/audio/jack/jacklayer.cpp
+1
-1
src/media/audio/ringbuffer.cpp
src/media/audio/ringbuffer.cpp
+3
-3
src/media/audio/ringbufferpool.cpp
src/media/audio/ringbufferpool.cpp
+0
-1
src/media/media_filter.cpp
src/media/media_filter.cpp
+6
-2
No files found.
src/client/videomanager.cpp
View file @
b38b204b
...
@@ -362,7 +362,7 @@ startLocalRecorder(const bool& audioOnly, const std::string& filepath)
...
@@ -362,7 +362,7 @@ startLocalRecorder(const bool& audioOnly, const std::string& filepath)
try
{
try
{
ring
::
LocalRecorderManager
::
instance
().
insertRecorder
(
path
,
std
::
move
(
rec
));
ring
::
LocalRecorderManager
::
instance
().
insertRecorder
(
path
,
std
::
move
(
rec
));
}
catch
(
std
::
invalid_argument
)
{
}
catch
(
const
std
::
invalid_argument
&
)
{
return
""
;
return
""
;
}
}
...
...
src/media/audio/audio_input.cpp
View file @
b38b204b
...
@@ -120,8 +120,6 @@ AudioInput::readFromFile()
...
@@ -120,8 +120,6 @@ AudioInput::readFromFile()
auto
frame
=
std
::
make_unique
<
AudioFrame
>
();
auto
frame
=
std
::
make_unique
<
AudioFrame
>
();
const
auto
ret
=
decoder_
->
decode
(
*
frame
);
const
auto
ret
=
decoder_
->
decode
(
*
frame
);
const
auto
inFmt
=
AudioFormat
((
unsigned
)
frame
->
pointer
()
->
sample_rate
,
(
unsigned
)
frame
->
pointer
()
->
channels
,
(
AVSampleFormat
)
frame
->
pointer
()
->
format
);
switch
(
ret
)
{
switch
(
ret
)
{
case
MediaDecoder
::
Status
::
ReadError
:
case
MediaDecoder
::
Status
::
ReadError
:
case
MediaDecoder
::
Status
::
DecodeError
:
case
MediaDecoder
::
Status
::
DecodeError
:
...
...
src/media/audio/jack/jacklayer.cpp
View file @
b38b204b
...
@@ -231,7 +231,7 @@ JackLayer::JackLayer(const AudioPreference &p) :
...
@@ -231,7 +231,7 @@ JackLayer::JackLayer(const AudioPreference &p) :
const
auto
playRate
=
jack_get_sample_rate
(
playbackClient_
);
const
auto
playRate
=
jack_get_sample_rate
(
playbackClient_
);
const
auto
captureRate
=
jack_get_sample_rate
(
captureClient_
);
const
auto
captureRate
=
jack_get_sample_rate
(
captureClient_
);
audioInputFormat_
=
{
captureRate
,
in_ringbuffers_
.
size
()};
audioInputFormat_
=
{
captureRate
,
(
unsigned
)
in_ringbuffers_
.
size
()};
hardwareFormatAvailable
(
AudioFormat
(
playRate
,
out_ringbuffers_
.
size
()));
hardwareFormatAvailable
(
AudioFormat
(
playRate
,
out_ringbuffers_
.
size
()));
hardwareInputFormatAvailable
(
audioInputFormat_
);
hardwareInputFormatAvailable
(
audioInputFormat_
);
jack_on_shutdown
(
playbackClient_
,
onShutdown
,
this
);
jack_on_shutdown
(
playbackClient_
,
onShutdown
,
this
);
...
...
src/media/audio/ringbuffer.cpp
View file @
b38b204b
...
@@ -39,13 +39,13 @@ namespace ring {
...
@@ -39,13 +39,13 @@ namespace ring {
// corresponds to 160 ms (about 5 rtp packets)
// corresponds to 160 ms (about 5 rtp packets)
static
const
size_t
MIN_BUFFER_SIZE
=
1024
;
static
const
size_t
MIN_BUFFER_SIZE
=
1024
;
RingBuffer
::
RingBuffer
(
const
std
::
string
&
rbuf_id
,
size_t
size
,
AudioFormat
format
)
RingBuffer
::
RingBuffer
(
const
std
::
string
&
rbuf_id
,
size_t
/*size*/
,
AudioFormat
format
)
:
id
(
rbuf_id
)
:
id
(
rbuf_id
)
,
endPos_
(
0
)
,
endPos_
(
0
)
,
format_
(
format
)
,
lock_
()
,
lock_
()
,
not_empty_
()
,
not_empty_
()
,
readoffsets_
()
,
readoffsets_
()
,
format_
(
format
)
,
resizer_
(
format_
,
format_
.
sample_rate
/
50
,
[
this
](
std
::
shared_ptr
<
AudioFrame
>&&
frame
){
,
resizer_
(
format_
,
format_
.
sample_rate
/
50
,
[
this
](
std
::
shared_ptr
<
AudioFrame
>&&
frame
){
putToBuffer
(
std
::
move
(
frame
));
putToBuffer
(
std
::
move
(
frame
));
})
})
...
@@ -121,7 +121,7 @@ RingBuffer::createReadOffset(const std::string &call_id)
...
@@ -121,7 +121,7 @@ RingBuffer::createReadOffset(const std::string &call_id)
{
{
std
::
lock_guard
<
std
::
mutex
>
l
(
lock_
);
std
::
lock_guard
<
std
::
mutex
>
l
(
lock_
);
if
(
!
hasThisReadOffset
(
call_id
))
if
(
!
hasThisReadOffset
(
call_id
))
readoffsets_
.
emplace
(
call_id
,
ReadOffset
{
endPos_
});
readoffsets_
.
emplace
(
call_id
,
ReadOffset
{
endPos_
,
{}
});
}
}
...
...
src/media/audio/ringbufferpool.cpp
View file @
b38b204b
...
@@ -271,7 +271,6 @@ RingBufferPool::getData(const std::string& call_id)
...
@@ -271,7 +271,6 @@ RingBufferPool::getData(const std::string& call_id)
if
(
bindings
->
size
()
==
1
)
if
(
bindings
->
size
()
==
1
)
return
(
*
bindings
->
cbegin
())
->
get
(
call_id
);
return
(
*
bindings
->
cbegin
())
->
get
(
call_id
);
size_t
size
=
0
;
auto
mixBuffer
=
std
::
make_unique
<
AudioFrame
>
(
internalAudioFormat_
);
auto
mixBuffer
=
std
::
make_unique
<
AudioFrame
>
(
internalAudioFormat_
);
for
(
const
auto
&
rbuf
:
*
bindings
)
{
for
(
const
auto
&
rbuf
:
*
bindings
)
{
if
(
auto
b
=
rbuf
->
get
(
call_id
))
{
if
(
auto
b
=
rbuf
->
get
(
call_id
))
{
...
...
src/media/media_filter.cpp
View file @
b38b204b
...
@@ -216,8 +216,12 @@ MediaFilter::readOutput()
...
@@ -216,8 +216,12 @@ MediaFilter::readOutput()
void
void
MediaFilter
::
flush
()
MediaFilter
::
flush
()
{
{
for
(
size_t
i
=
0
;
i
<
inputs_
.
size
();
++
i
)
for
(
size_t
i
=
0
;
i
<
inputs_
.
size
();
++
i
)
{
av_buffersrc_add_frame_flags
(
inputs_
[
i
],
nullptr
,
0
);
int
ret
=
av_buffersrc_add_frame_flags
(
inputs_
[
i
],
nullptr
,
0
);
if
(
ret
<
0
)
{
RING_ERR
()
<<
"Failed to flush filter '"
<<
inputParams_
[
i
].
name
<<
"': "
<<
libav_utils
::
getError
(
ret
);
}
}
}
}
int
int
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment