Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
e2c81aa9
Commit
e2c81aa9
authored
Nov 14, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v0.20.x'
parents
e4a14721
014f8cd6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
15 deletions
+57
-15
NEWS
NEWS
+5
-0
user.xml
doc/user.xml
+2
-2
VorbisEncoderPlugin.cxx
src/encoder/plugins/VorbisEncoderPlugin.cxx
+2
-2
CdioParanoiaInputPlugin.cxx
src/input/plugins/CdioParanoiaInputPlugin.cxx
+6
-1
FfmpegInputPlugin.cxx
src/input/plugins/FfmpegInputPlugin.cxx
+13
-2
FileInputPlugin.cxx
src/input/plugins/FileInputPlugin.cxx
+12
-2
SmbclientInputPlugin.cxx
src/input/plugins/SmbclientInputPlugin.cxx
+16
-6
HttpdOutputPlugin.cxx
src/output/plugins/httpd/HttpdOutputPlugin.cxx
+1
-0
No files found.
NEWS
View file @
e2c81aa9
...
@@ -17,14 +17,19 @@ ver 0.21 (not yet released)
...
@@ -17,14 +17,19 @@ ver 0.21 (not yet released)
ver 0.20.12 (not yet released)
ver 0.20.12 (not yet released)
* input
* input
- cdio_paranoia, ffmpeg, file, smbclient: reduce lock contention,
fixing lots of xrun problems
- curl: fix seeking
- curl: fix seeking
* decoder
* decoder
- ffmpeg: fix GCC 8 warning
- ffmpeg: fix GCC 8 warning
- vorbis: fix Tremor support
- vorbis: fix Tremor support
* player
* player
- log message when decoder is too slow
- log message when decoder is too slow
* encoder
- vorbis: default to quality 3
* output
* output
- fix hanging playback with soxr resampler
- fix hanging playback with soxr resampler
- httpd: flush encoder after tag; fixes corrupt Vorbis stream
ver 0.20.11 (2017/10/18)
ver 0.20.11 (2017/10/18)
* storage
* storage
...
...
doc/user.xml
View file @
e2c81aa9
...
@@ -3068,8 +3068,8 @@ run</programlisting>
...
@@ -3068,8 +3068,8 @@ run</programlisting>
</entry>
</entry>
<entry>
<entry>
Sets the quality for VBR. -1 is the lowest quality,
Sets the quality for VBR. -1 is the lowest quality,
10 is the highest quality.
Cannot be used with
10 is the highest quality.
Defaults to 3. Cannot
<varname>
bitrate
</varname>
.
be used with
<varname>
bitrate
</varname>
.
</entry>
</entry>
</row>
</row>
<row>
<row>
...
...
src/encoder/plugins/VorbisEncoderPlugin.cxx
View file @
e2c81aa9
...
@@ -62,7 +62,7 @@ private:
...
@@ -62,7 +62,7 @@ private:
};
};
class
PreparedVorbisEncoder
final
:
public
PreparedEncoder
{
class
PreparedVorbisEncoder
final
:
public
PreparedEncoder
{
float
quality
;
float
quality
=
3
;
int
bitrate
;
int
bitrate
;
public
:
public
:
...
@@ -97,7 +97,7 @@ PreparedVorbisEncoder::PreparedVorbisEncoder(const ConfigBlock &block)
...
@@ -97,7 +97,7 @@ PreparedVorbisEncoder::PreparedVorbisEncoder(const ConfigBlock &block)
value
=
block
.
GetBlockValue
(
"bitrate"
);
value
=
block
.
GetBlockValue
(
"bitrate"
);
if
(
value
==
nullptr
)
if
(
value
==
nullptr
)
throw
std
::
runtime_error
(
"neither bitrate nor quality defined"
)
;
return
;
quality
=
-
2.0
;
quality
=
-
2.0
;
...
...
src/input/plugins/CdioParanoiaInputPlugin.cxx
View file @
e2c81aa9
...
@@ -270,7 +270,10 @@ CdioParanoiaInputStream::Seek(offset_type new_offset)
...
@@ -270,7 +270,10 @@ CdioParanoiaInputStream::Seek(offset_type new_offset)
lsn_relofs
=
new_offset
/
CDIO_CD_FRAMESIZE_RAW
;
lsn_relofs
=
new_offset
/
CDIO_CD_FRAMESIZE_RAW
;
offset
=
new_offset
;
offset
=
new_offset
;
cdio_paranoia_seek
(
para
,
lsn_from
+
lsn_relofs
,
SEEK_SET
);
{
const
ScopeUnlock
unlock
(
mutex
);
cdio_paranoia_seek
(
para
,
lsn_from
+
lsn_relofs
,
SEEK_SET
);
}
}
}
size_t
size_t
...
@@ -292,6 +295,8 @@ CdioParanoiaInputStream::Read(void *ptr, size_t length)
...
@@ -292,6 +295,8 @@ CdioParanoiaInputStream::Read(void *ptr, size_t length)
//current sector was changed ?
//current sector was changed ?
if
(
lsn_relofs
!=
buffer_lsn
)
{
if
(
lsn_relofs
!=
buffer_lsn
)
{
const
ScopeUnlock
unlock
(
mutex
);
rbuf
=
cdio_paranoia_read
(
para
,
nullptr
);
rbuf
=
cdio_paranoia_read
(
para
,
nullptr
);
s_err
=
cdda_errors
(
drv
);
s_err
=
cdda_errors
(
drv
);
...
...
src/input/plugins/FfmpegInputPlugin.cxx
View file @
e2c81aa9
...
@@ -104,7 +104,13 @@ input_ffmpeg_open(const char *uri,
...
@@ -104,7 +104,13 @@ input_ffmpeg_open(const char *uri,
size_t
size_t
FfmpegInputStream
::
Read
(
void
*
ptr
,
size_t
read_size
)
FfmpegInputStream
::
Read
(
void
*
ptr
,
size_t
read_size
)
{
{
auto
result
=
avio_read
(
h
,
(
unsigned
char
*
)
ptr
,
read_size
);
int
result
;
{
const
ScopeUnlock
unlock
(
mutex
);
result
=
avio_read
(
h
,
(
unsigned
char
*
)
ptr
,
read_size
);
}
if
(
result
<=
0
)
{
if
(
result
<=
0
)
{
if
(
result
<
0
)
if
(
result
<
0
)
throw
MakeFfmpegError
(
result
,
"avio_read() failed"
);
throw
MakeFfmpegError
(
result
,
"avio_read() failed"
);
...
@@ -126,7 +132,12 @@ FfmpegInputStream::IsEOF() noexcept
...
@@ -126,7 +132,12 @@ FfmpegInputStream::IsEOF() noexcept
void
void
FfmpegInputStream
::
Seek
(
offset_type
new_offset
)
FfmpegInputStream
::
Seek
(
offset_type
new_offset
)
{
{
auto
result
=
avio_seek
(
h
,
new_offset
,
SEEK_SET
);
int64_t
result
;
{
const
ScopeUnlock
unlock
(
mutex
);
result
=
avio_seek
(
h
,
new_offset
,
SEEK_SET
);
}
if
(
result
<
0
)
if
(
result
<
0
)
throw
MakeFfmpegError
(
result
,
"avio_seek() failed"
);
throw
MakeFfmpegError
(
result
,
"avio_seek() failed"
);
...
...
src/input/plugins/FileInputPlugin.cxx
View file @
e2c81aa9
...
@@ -87,14 +87,24 @@ input_file_open(gcc_unused const char *filename,
...
@@ -87,14 +87,24 @@ input_file_open(gcc_unused const char *filename,
void
void
FileInputStream
::
Seek
(
offset_type
new_offset
)
FileInputStream
::
Seek
(
offset_type
new_offset
)
{
{
reader
.
Seek
((
off_t
)
new_offset
);
{
const
ScopeUnlock
unlock
(
mutex
);
reader
.
Seek
((
off_t
)
new_offset
);
}
offset
=
new_offset
;
offset
=
new_offset
;
}
}
size_t
size_t
FileInputStream
::
Read
(
void
*
ptr
,
size_t
read_size
)
FileInputStream
::
Read
(
void
*
ptr
,
size_t
read_size
)
{
{
size_t
nbytes
=
reader
.
Read
(
ptr
,
read_size
);
size_t
nbytes
;
{
const
ScopeUnlock
unlock
(
mutex
);
nbytes
=
reader
.
Read
(
ptr
,
read_size
);
}
offset
+=
nbytes
;
offset
+=
nbytes
;
return
nbytes
;
return
nbytes
;
}
}
...
...
src/input/plugins/SmbclientInputPlugin.cxx
View file @
e2c81aa9
...
@@ -125,9 +125,14 @@ input_smbclient_open(const char *uri,
...
@@ -125,9 +125,14 @@ input_smbclient_open(const char *uri,
size_t
size_t
SmbclientInputStream
::
Read
(
void
*
ptr
,
size_t
read_size
)
SmbclientInputStream
::
Read
(
void
*
ptr
,
size_t
read_size
)
{
{
smbclient_mutex
.
lock
();
ssize_t
nbytes
;
ssize_t
nbytes
=
smbc_read
(
fd
,
ptr
,
read_size
);
smbclient_mutex
.
unlock
();
{
const
ScopeUnlock
unlock
(
mutex
);
const
std
::
lock_guard
<
Mutex
>
lock
(
smbclient_mutex
);
nbytes
=
smbc_read
(
fd
,
ptr
,
read_size
);
}
if
(
nbytes
<
0
)
if
(
nbytes
<
0
)
throw
MakeErrno
(
"smbc_read() failed"
);
throw
MakeErrno
(
"smbc_read() failed"
);
...
@@ -138,9 +143,14 @@ SmbclientInputStream::Read(void *ptr, size_t read_size)
...
@@ -138,9 +143,14 @@ SmbclientInputStream::Read(void *ptr, size_t read_size)
void
void
SmbclientInputStream
::
Seek
(
offset_type
new_offset
)
SmbclientInputStream
::
Seek
(
offset_type
new_offset
)
{
{
smbclient_mutex
.
lock
();
off_t
result
;
off_t
result
=
smbc_lseek
(
fd
,
new_offset
,
SEEK_SET
);
smbclient_mutex
.
unlock
();
{
const
ScopeUnlock
unlock
(
mutex
);
const
std
::
lock_guard
<
Mutex
>
lock
(
smbclient_mutex
);
result
=
smbc_lseek
(
fd
,
new_offset
,
SEEK_SET
);
}
if
(
result
<
0
)
if
(
result
<
0
)
throw
MakeErrno
(
"smbc_lseek() failed"
);
throw
MakeErrno
(
"smbc_lseek() failed"
);
...
...
src/output/plugins/httpd/HttpdOutputPlugin.cxx
View file @
e2c81aa9
...
@@ -387,6 +387,7 @@ HttpdOutput::SendTag(const Tag &tag)
...
@@ -387,6 +387,7 @@ HttpdOutput::SendTag(const Tag &tag)
try
{
try
{
encoder
->
SendTag
(
tag
);
encoder
->
SendTag
(
tag
);
encoder
->
Flush
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
const
std
::
runtime_error
&
)
{
/* ignore */
/* ignore */
}
}
...
...
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