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
fd1b0493
Commit
fd1b0493
authored
May 11, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InputStream: remove attribute "plugin"
parent
d4b625b4
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
21 additions
and
63 deletions
+21
-63
Bzip2ArchivePlugin.cxx
src/archive/plugins/Bzip2ArchivePlugin.cxx
+1
-10
Iso9660ArchivePlugin.cxx
src/archive/plugins/Iso9660ArchivePlugin.cxx
+1
-10
ZzipArchivePlugin.cxx
src/archive/plugins/ZzipArchivePlugin.cxx
+1
-10
InputStream.hxx
src/input/InputStream.hxx
+2
-13
ThreadInputStream.cxx
src/input/ThreadInputStream.cxx
+1
-1
ThreadInputStream.hxx
src/input/ThreadInputStream.hxx
+5
-2
AlsaInputPlugin.cxx
src/input/plugins/AlsaInputPlugin.cxx
+1
-1
CdioParanoiaInputPlugin.cxx
src/input/plugins/CdioParanoiaInputPlugin.cxx
+1
-1
CurlInputPlugin.cxx
src/input/plugins/CurlInputPlugin.cxx
+1
-1
DespotifyInputPlugin.cxx
src/input/plugins/DespotifyInputPlugin.cxx
+1
-1
FfmpegInputPlugin.cxx
src/input/plugins/FfmpegInputPlugin.cxx
+1
-1
FileInputPlugin.cxx
src/input/plugins/FileInputPlugin.cxx
+1
-1
MmsInputPlugin.cxx
src/input/plugins/MmsInputPlugin.cxx
+1
-1
NfsInputPlugin.cxx
src/input/plugins/NfsInputPlugin.cxx
+1
-1
RewindInputPlugin.cxx
src/input/plugins/RewindInputPlugin.cxx
+1
-8
SmbclientInputPlugin.cxx
src/input/plugins/SmbclientInputPlugin.cxx
+1
-1
No files found.
src/archive/plugins/Bzip2ArchivePlugin.cxx
View file @
fd1b0493
...
...
@@ -108,8 +108,6 @@ struct Bzip2InputStream final : public InputStream {
size_t
Read
(
void
*
ptr
,
size_t
size
,
Error
&
error
)
override
;
};
extern
const
InputPlugin
bz2_inputplugin
;
static
constexpr
Domain
bz2_domain
(
"bz2"
);
/* single archive handling allocation helpers */
...
...
@@ -155,7 +153,7 @@ bz2_open(Path pathname, Error &error)
Bzip2InputStream
::
Bzip2InputStream
(
Bzip2ArchiveFile
&
_context
,
const
char
*
_uri
,
Mutex
&
_mutex
,
Cond
&
_cond
)
:
InputStream
(
bz2_inputplugin
,
_uri
,
_mutex
,
_cond
),
:
InputStream
(
_uri
,
_mutex
,
_cond
),
archive
(
&
_context
),
eof
(
false
)
{
archive
->
Ref
();
...
...
@@ -251,13 +249,6 @@ static const char *const bz2_extensions[] = {
nullptr
};
const
InputPlugin
bz2_inputplugin
=
{
nullptr
,
nullptr
,
nullptr
,
nullptr
,
};
const
ArchivePlugin
bz2_archive_plugin
=
{
"bz2"
,
nullptr
,
...
...
src/archive/plugins/Iso9660ArchivePlugin.cxx
View file @
fd1b0493
...
...
@@ -79,8 +79,6 @@ public:
Error
&
error
)
override
;
};
extern
const
InputPlugin
iso9660_input_plugin
;
static
constexpr
Domain
iso9660_domain
(
"iso9660"
);
/* archive open && listing routine */
...
...
@@ -149,7 +147,7 @@ public:
Iso9660InputStream
(
Iso9660ArchiveFile
&
_archive
,
const
char
*
_uri
,
Mutex
&
_mutex
,
Cond
&
_cond
,
iso9660_stat_t
*
_statbuf
)
:
InputStream
(
iso9660_input_plugin
,
_uri
,
_mutex
,
_cond
),
:
InputStream
(
_uri
,
_mutex
,
_cond
),
archive
(
_archive
),
statbuf
(
_statbuf
)
{
size
=
statbuf
->
size
;
SetReady
();
...
...
@@ -231,13 +229,6 @@ static const char *const iso9660_archive_extensions[] = {
nullptr
};
const
InputPlugin
iso9660_input_plugin
=
{
nullptr
,
nullptr
,
nullptr
,
nullptr
,
};
const
ArchivePlugin
iso9660_archive_plugin
=
{
"iso"
,
nullptr
,
...
...
src/archive/plugins/ZzipArchivePlugin.cxx
View file @
fd1b0493
...
...
@@ -64,8 +64,6 @@ public:
Error
&
error
)
override
;
};
extern
const
InputPlugin
zzip_input_plugin
;
static
constexpr
Domain
zzip_domain
(
"zzip"
);
/* archive open && listing routine */
...
...
@@ -105,7 +103,7 @@ struct ZzipInputStream final : public InputStream {
ZzipInputStream
(
ZzipArchiveFile
&
_archive
,
const
char
*
_uri
,
Mutex
&
_mutex
,
Cond
&
_cond
,
ZZIP_FILE
*
_file
)
:
InputStream
(
zzip_input_plugin
,
_uri
,
_mutex
,
_cond
),
:
InputStream
(
_uri
,
_mutex
,
_cond
),
archive
(
&
_archive
),
file
(
_file
)
{
//we are seekable (but its not recommendent to do so)
seekable
=
true
;
...
...
@@ -185,13 +183,6 @@ static const char *const zzip_archive_extensions[] = {
nullptr
};
const
InputPlugin
zzip_input_plugin
=
{
nullptr
,
nullptr
,
nullptr
,
nullptr
,
};
const
ArchivePlugin
zzip_archive_plugin
=
{
"zzip"
,
nullptr
,
...
...
src/input/InputStream.hxx
View file @
fd1b0493
...
...
@@ -32,7 +32,6 @@
class
Cond
;
class
Error
;
struct
Tag
;
struct
InputPlugin
;
class
InputStream
{
public
:
...
...
@@ -40,11 +39,6 @@ public:
private
:
/**
* the plugin which implements this input stream
*/
const
InputPlugin
&
plugin
;
/**
* The absolute URI which was used to open this stream.
*/
std
::
string
uri
;
...
...
@@ -99,9 +93,8 @@ private:
std
::
string
mime
;
public
:
InputStream
(
const
InputPlugin
&
_plugin
,
const
char
*
_uri
,
Mutex
&
_mutex
,
Cond
&
_cond
)
:
plugin
(
_plugin
),
uri
(
_uri
),
InputStream
(
const
char
*
_uri
,
Mutex
&
_mutex
,
Cond
&
_cond
)
:
uri
(
_uri
),
mutex
(
_mutex
),
cond
(
_cond
),
ready
(
false
),
seekable
(
false
),
size
(
-
1
),
offset
(
0
)
{
...
...
@@ -140,10 +133,6 @@ public:
Mutex
&
mutex
,
Cond
&
cond
,
Error
&
error
);
const
InputPlugin
&
GetPlugin
()
const
{
return
plugin
;
}
/**
* The absolute URI which was used to open this stream.
*
...
...
src/input/ThreadInputStream.cxx
View file @
fd1b0493
...
...
@@ -67,7 +67,7 @@ ThreadInputStream::Start(Error &error)
inline
void
ThreadInputStream
::
ThreadFunc
()
{
FormatThreadName
(
"input:%s"
,
GetPlugin
().
name
);
FormatThreadName
(
"input:%s"
,
plugin
);
Lock
();
if
(
!
Open
(
postponed_error
))
{
...
...
src/input/ThreadInputStream.hxx
View file @
fd1b0493
...
...
@@ -40,6 +40,8 @@ template<typename T> class CircularBuffer;
* This works only for "streams": unknown length, no seeking, no tags.
*/
class
ThreadInputStream
:
public
InputStream
{
const
char
*
const
plugin
;
Thread
thread
;
/**
...
...
@@ -65,10 +67,11 @@ class ThreadInputStream : public InputStream {
bool
eof
;
public
:
ThreadInputStream
(
const
InputPlugin
&
_plugin
,
ThreadInputStream
(
const
char
*
_plugin
,
const
char
*
_uri
,
Mutex
&
_mutex
,
Cond
&
_cond
,
size_t
_buffer_size
)
:
InputStream
(
_plugin
,
_uri
,
_mutex
,
_cond
),
:
InputStream
(
_uri
,
_mutex
,
_cond
),
plugin
(
_plugin
),
buffer_size
(
_buffer_size
),
buffer
(
nullptr
),
close
(
false
),
eof
(
false
)
{}
...
...
src/input/plugins/AlsaInputPlugin.cxx
View file @
fd1b0493
...
...
@@ -84,7 +84,7 @@ public:
AlsaInputStream
(
EventLoop
&
loop
,
const
char
*
_uri
,
Mutex
&
_mutex
,
Cond
&
_cond
,
snd_pcm_t
*
_handle
,
int
_frame_size
)
:
InputStream
(
input_plugin_alsa
,
_uri
,
_mutex
,
_cond
),
:
InputStream
(
_uri
,
_mutex
,
_cond
),
MultiSocketMonitor
(
loop
),
DeferredMonitor
(
loop
),
capture_handle
(
_handle
),
...
...
src/input/plugins/CdioParanoiaInputPlugin.cxx
View file @
fd1b0493
...
...
@@ -65,7 +65,7 @@ struct CdioParanoiaInputStream final : public InputStream {
CdioParanoiaInputStream
(
const
char
*
_uri
,
Mutex
&
_mutex
,
Cond
&
_cond
,
int
_trackno
)
:
InputStream
(
input_plugin_cdio_paranoia
,
_uri
,
_mutex
,
_cond
),
:
InputStream
(
_uri
,
_mutex
,
_cond
),
drv
(
nullptr
),
cdio
(
nullptr
),
para
(
nullptr
),
trackno
(
_trackno
)
{
...
...
src/input/plugins/CurlInputPlugin.cxx
View file @
fd1b0493
...
...
@@ -106,7 +106,7 @@ struct CurlInputStream final : public InputStream {
CurlInputStream
(
const
char
*
_url
,
Mutex
&
_mutex
,
Cond
&
_cond
,
void
*
_buffer
)
:
InputStream
(
input_plugin_curl
,
_url
,
_mutex
,
_cond
),
:
InputStream
(
_url
,
_mutex
,
_cond
),
request_headers
(
nullptr
),
buffer
((
uint8_t
*
)
_buffer
,
CURL_MAX_BUFFERED
),
paused
(
false
),
...
...
src/input/plugins/DespotifyInputPlugin.cxx
View file @
fd1b0493
...
...
@@ -48,7 +48,7 @@ class DespotifyInputStream final : public InputStream {
Mutex
&
_mutex
,
Cond
&
_cond
,
despotify_session
*
_session
,
ds_track
*
_track
)
:
InputStream
(
input_plugin_despotify
,
_uri
,
_mutex
,
_cond
),
:
InputStream
(
_uri
,
_mutex
,
_cond
),
session
(
_session
),
track
(
_track
),
tag
(
mpd_despotify_tag_from_track
(
*
track
)),
len_available
(
0
),
eof
(
false
)
{
...
...
src/input/plugins/FfmpegInputPlugin.cxx
View file @
fd1b0493
...
...
@@ -40,7 +40,7 @@ struct FfmpegInputStream final : public InputStream {
FfmpegInputStream
(
const
char
*
_uri
,
Mutex
&
_mutex
,
Cond
&
_cond
,
AVIOContext
*
_h
)
:
InputStream
(
input_plugin_ffmpeg
,
_uri
,
_mutex
,
_cond
),
:
InputStream
(
_uri
,
_mutex
,
_cond
),
h
(
_h
),
eof
(
false
)
{
seekable
=
(
h
->
seekable
&
AVIO_SEEKABLE_NORMAL
)
!=
0
;
size
=
avio_size
(
h
);
...
...
src/input/plugins/FileInputPlugin.cxx
View file @
fd1b0493
...
...
@@ -38,7 +38,7 @@ struct FileInputStream final : public InputStream {
FileInputStream
(
const
char
*
path
,
int
_fd
,
off_t
_size
,
Mutex
&
_mutex
,
Cond
&
_cond
)
:
InputStream
(
input_plugin_file
,
path
,
_mutex
,
_cond
),
:
InputStream
(
path
,
_mutex
,
_cond
),
fd
(
_fd
)
{
size
=
_size
;
seekable
=
true
;
...
...
src/input/plugins/MmsInputPlugin.cxx
View file @
fd1b0493
...
...
@@ -34,7 +34,7 @@ class MmsInputStream final : public ThreadInputStream {
public
:
MmsInputStream
(
const
char
*
_uri
,
Mutex
&
_mutex
,
Cond
&
_cond
)
:
ThreadInputStream
(
input_plugin_mms
,
_uri
,
_mutex
,
_cond
,
:
ThreadInputStream
(
input_plugin_mms
.
name
,
_uri
,
_mutex
,
_cond
,
MMS_BUFFER_SIZE
)
{
}
...
...
src/input/plugins/NfsInputPlugin.cxx
View file @
fd1b0493
...
...
@@ -42,7 +42,7 @@ public:
Mutex
&
_mutex
,
Cond
&
_cond
,
nfs_context
*
_ctx
,
nfsfh
*
_fh
,
InputStream
::
offset_type
_size
)
:
InputStream
(
input_plugin_nfs
,
_uri
,
_mutex
,
_cond
),
:
InputStream
(
_uri
,
_mutex
,
_cond
),
ctx
(
_ctx
),
fh
(
_fh
)
{
seekable
=
true
;
size
=
_size
;
...
...
src/input/plugins/RewindInputPlugin.cxx
View file @
fd1b0493
...
...
@@ -26,13 +26,6 @@
#include <string.h>
#include <stdio.h>
static
const
InputPlugin
rewind_input_plugin
=
{
nullptr
,
nullptr
,
nullptr
,
nullptr
,
};
class
RewindInputStream
final
:
public
InputStream
{
InputStream
*
input
;
...
...
@@ -59,7 +52,7 @@ class RewindInputStream final : public InputStream {
public
:
RewindInputStream
(
InputStream
*
_input
)
:
InputStream
(
rewind_input_plugin
,
_input
->
GetURI
(),
:
InputStream
(
_input
->
GetURI
(),
_input
->
mutex
,
_input
->
cond
),
input
(
_input
),
tail
(
0
)
{
}
...
...
src/input/plugins/SmbclientInputPlugin.cxx
View file @
fd1b0493
...
...
@@ -36,7 +36,7 @@ public:
SmbclientInputStream
(
const
char
*
_uri
,
Mutex
&
_mutex
,
Cond
&
_cond
,
SMBCCTX
*
_ctx
,
int
_fd
,
const
struct
stat
&
st
)
:
InputStream
(
input_plugin_smbclient
,
_uri
,
_mutex
,
_cond
),
:
InputStream
(
_uri
,
_mutex
,
_cond
),
ctx
(
_ctx
),
fd
(
_fd
)
{
seekable
=
true
;
size
=
st
.
st_size
;
...
...
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