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
1b58bd64
Commit
1b58bd64
authored
Feb 23, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/thread: use typedef InputStreamPtr
parent
196de8c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
DecoderThread.cxx
src/decoder/DecoderThread.cxx
+7
-10
No files found.
src/decoder/DecoderThread.cxx
View file @
1b58bd64
...
...
@@ -55,11 +55,10 @@ static constexpr Domain decoder_thread_domain("decoder_thread");
* @return an InputStream on success or if #DecoderCommand::STOP is
* received, nullptr on error
*/
static
std
::
unique_ptr
<
InputStream
>
static
InputStreamPtr
decoder_input_stream_open
(
DecoderControl
&
dc
,
const
char
*
uri
,
Error
&
error
)
{
std
::
unique_ptr
<
InputStream
>
is
(
InputStream
::
Open
(
uri
,
dc
.
mutex
,
dc
.
cond
,
error
));
auto
is
=
InputStream
::
Open
(
uri
,
dc
.
mutex
,
dc
.
cond
,
error
);
if
(
is
==
nullptr
)
return
nullptr
;
...
...
@@ -82,11 +81,10 @@ decoder_input_stream_open(DecoderControl &dc, const char *uri, Error &error)
return
is
;
}
static
std
::
unique_ptr
<
InputStream
>
static
InputStreamPtr
decoder_input_stream_open
(
DecoderControl
&
dc
,
Path
path
,
Error
&
error
)
{
std
::
unique_ptr
<
InputStream
>
is
(
OpenLocalInputStream
(
path
,
dc
.
mutex
,
dc
.
cond
,
error
));
auto
is
=
OpenLocalInputStream
(
path
,
dc
.
mutex
,
dc
.
cond
,
error
);
if
(
is
==
nullptr
)
return
nullptr
;
...
...
@@ -263,8 +261,7 @@ decoder_run_stream(Decoder &decoder, const char *uri)
{
DecoderControl
&
dc
=
decoder
.
dc
;
std
::
unique_ptr
<
InputStream
>
input_stream
=
decoder_input_stream_open
(
dc
,
uri
,
decoder
.
error
);
auto
input_stream
=
decoder_input_stream_open
(
dc
,
uri
,
decoder
.
error
);
if
(
input_stream
==
nullptr
)
return
false
;
...
...
@@ -312,8 +309,8 @@ TryDecoderFile(Decoder &decoder, Path path_fs, const char *suffix,
const
ScopeLock
protect
(
dc
.
mutex
);
return
decoder_file_decode
(
plugin
,
decoder
,
path_fs
);
}
else
if
(
plugin
.
stream_decode
!=
nullptr
)
{
std
::
unique_ptr
<
InputStream
>
input_stream
=
decoder_input_stream_open
(
dc
,
path_fs
,
decoder
.
error
);
auto
input_stream
=
decoder_input_stream_open
(
dc
,
path_fs
,
decoder
.
error
);
if
(
input_stream
==
nullptr
)
/* returning true to stop the search for
another decoder plugin */
...
...
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