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
9cb7760c
Commit
9cb7760c
authored
Jan 18, 2010
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input_stream: added attribute "uri"
parent
fb9bd533
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
10 deletions
+18
-10
bz2_archive_plugin.c
src/archive/bz2_archive_plugin.c
+2
-3
iso9660_archive_plugin.c
src/archive/iso9660_archive_plugin.c
+1
-1
zzip_archive_plugin.c
src/archive/zzip_archive_plugin.c
+1
-1
curl_input_plugin.c
src/input/curl_input_plugin.c
+1
-1
file_input_plugin.c
src/input/file_input_plugin.c
+1
-1
mms_input_plugin.c
src/input/mms_input_plugin.c
+1
-1
rewind_input_plugin.c
src/input/rewind_input_plugin.c
+1
-1
input_stream.h
src/input_stream.h
+10
-1
No files found.
src/archive/bz2_archive_plugin.c
View file @
9cb7760c
...
@@ -168,13 +168,12 @@ bz2_close(struct archive_file *file)
...
@@ -168,13 +168,12 @@ bz2_close(struct archive_file *file)
/* single archive handling */
/* single archive handling */
static
struct
input_stream
*
static
struct
input_stream
*
bz2_open_stream
(
struct
archive_file
*
file
,
bz2_open_stream
(
struct
archive_file
*
file
,
const
char
*
path
,
GError
**
error_r
)
G_GNUC_UNUSED
const
char
*
path
,
GError
**
error_r
)
{
{
struct
bz2_archive_file
*
context
=
(
struct
bz2_archive_file
*
)
file
;
struct
bz2_archive_file
*
context
=
(
struct
bz2_archive_file
*
)
file
;
struct
bz2_input_stream
*
bis
=
g_new
(
struct
bz2_input_stream
,
1
);
struct
bz2_input_stream
*
bis
=
g_new
(
struct
bz2_input_stream
,
1
);
input_stream_init
(
&
bis
->
base
,
&
bz2_inputplugin
);
input_stream_init
(
&
bis
->
base
,
&
bz2_inputplugin
,
path
);
bis
->
archive
=
context
;
bis
->
archive
=
context
;
...
...
src/archive/iso9660_archive_plugin.c
View file @
9cb7760c
...
@@ -180,7 +180,7 @@ iso9660_archive_open_stream(struct archive_file *file,
...
@@ -180,7 +180,7 @@ iso9660_archive_open_stream(struct archive_file *file,
struct
iso9660_input_stream
*
iis
;
struct
iso9660_input_stream
*
iis
;
iis
=
g_new
(
struct
iso9660_input_stream
,
1
);
iis
=
g_new
(
struct
iso9660_input_stream
,
1
);
input_stream_init
(
&
iis
->
base
,
&
iso9660_input_plugin
);
input_stream_init
(
&
iis
->
base
,
&
iso9660_input_plugin
,
pathname
);
iis
->
archive
=
context
;
iis
->
archive
=
context
;
iis
->
statbuf
=
iso9660_ifs_stat_translate
(
context
->
iso
,
pathname
);
iis
->
statbuf
=
iso9660_ifs_stat_translate
(
context
->
iso
,
pathname
);
...
...
src/archive/zzip_archive_plugin.c
View file @
9cb7760c
...
@@ -141,7 +141,7 @@ zzip_archive_open_stream(struct archive_file *file,
...
@@ -141,7 +141,7 @@ zzip_archive_open_stream(struct archive_file *file,
ZZIP_STAT
z_stat
;
ZZIP_STAT
z_stat
;
zis
=
g_new
(
struct
zzip_input_stream
,
1
);
zis
=
g_new
(
struct
zzip_input_stream
,
1
);
input_stream_init
(
&
zis
->
base
,
&
zzip_input_plugin
);
input_stream_init
(
&
zis
->
base
,
&
zzip_input_plugin
,
pathname
);
zis
->
archive
=
context
;
zis
->
archive
=
context
;
zis
->
file
=
zzip_file_open
(
context
->
dir
,
pathname
,
0
);
zis
->
file
=
zzip_file_open
(
context
->
dir
,
pathname
,
0
);
...
...
src/input/curl_input_plugin.c
View file @
9cb7760c
...
@@ -801,7 +801,7 @@ input_curl_open(const char *url, GError **error_r)
...
@@ -801,7 +801,7 @@ input_curl_open(const char *url, GError **error_r)
return
NULL
;
return
NULL
;
c
=
g_new0
(
struct
input_curl
,
1
);
c
=
g_new0
(
struct
input_curl
,
1
);
input_stream_init
(
&
c
->
base
,
&
input_plugin_curl
);
input_stream_init
(
&
c
->
base
,
&
input_plugin_curl
,
url
);
c
->
url
=
g_strdup
(
url
);
c
->
url
=
g_strdup
(
url
);
c
->
buffers
=
g_queue_new
();
c
->
buffers
=
g_queue_new
();
...
...
src/input/file_input_plugin.c
View file @
9cb7760c
...
@@ -84,7 +84,7 @@ input_file_open(const char *filename, GError **error_r)
...
@@ -84,7 +84,7 @@ input_file_open(const char *filename, GError **error_r)
#endif
#endif
fis
=
g_new
(
struct
file_input_stream
,
1
);
fis
=
g_new
(
struct
file_input_stream
,
1
);
input_stream_init
(
&
fis
->
base
,
&
input_plugin_file
);
input_stream_init
(
&
fis
->
base
,
&
input_plugin_file
,
filename
);
fis
->
base
.
size
=
st
.
st_size
;
fis
->
base
.
size
=
st
.
st_size
;
fis
->
base
.
seekable
=
true
;
fis
->
base
.
seekable
=
true
;
...
...
src/input/mms_input_plugin.c
View file @
9cb7760c
...
@@ -56,7 +56,7 @@ input_mms_open(const char *url, GError **error_r)
...
@@ -56,7 +56,7 @@ input_mms_open(const char *url, GError **error_r)
return
NULL
;
return
NULL
;
m
=
g_new
(
struct
input_mms
,
1
);
m
=
g_new
(
struct
input_mms
,
1
);
input_stream_init
(
&
m
->
base
,
&
input_plugin_mms
);
input_stream_init
(
&
m
->
base
,
&
input_plugin_mms
,
url
);
m
->
mms
=
mmsx_connect
(
NULL
,
NULL
,
url
,
128
*
1024
);
m
->
mms
=
mmsx_connect
(
NULL
,
NULL
,
url
,
128
*
1024
);
if
(
m
->
mms
==
NULL
)
{
if
(
m
->
mms
==
NULL
)
{
...
...
src/input/rewind_input_plugin.c
View file @
9cb7760c
...
@@ -227,7 +227,7 @@ input_rewind_open(struct input_stream *is)
...
@@ -227,7 +227,7 @@ input_rewind_open(struct input_stream *is)
return
is
;
return
is
;
c
=
g_new
(
struct
input_rewind
,
1
);
c
=
g_new
(
struct
input_rewind
,
1
);
input_stream_init
(
&
c
->
base
,
&
rewind_input_plugin
);
input_stream_init
(
&
c
->
base
,
&
rewind_input_plugin
,
is
->
uri
);
c
->
tail
=
0
;
c
->
tail
=
0
;
c
->
input
=
is
;
c
->
input
=
is
;
...
...
src/input_stream.h
View file @
9cb7760c
...
@@ -39,6 +39,12 @@ struct input_stream {
...
@@ -39,6 +39,12 @@ struct input_stream {
const
struct
input_plugin
*
plugin
;
const
struct
input_plugin
*
plugin
;
/**
/**
* The absolute URI which was used to open this stream. May
* be NULL if this is unknown.
*/
char
*
uri
;
/**
* indicates whether the stream is ready for reading and
* indicates whether the stream is ready for reading and
* whether the other attributes in this struct are valid
* whether the other attributes in this struct are valid
*/
*/
...
@@ -66,9 +72,11 @@ struct input_stream {
...
@@ -66,9 +72,11 @@ struct input_stream {
};
};
static
inline
void
static
inline
void
input_stream_init
(
struct
input_stream
*
is
,
const
struct
input_plugin
*
plugin
)
input_stream_init
(
struct
input_stream
*
is
,
const
struct
input_plugin
*
plugin
,
const
char
*
uri
)
{
{
is
->
plugin
=
plugin
;
is
->
plugin
=
plugin
;
is
->
uri
=
g_strdup
(
uri
);
is
->
ready
=
false
;
is
->
ready
=
false
;
is
->
seekable
=
false
;
is
->
seekable
=
false
;
is
->
size
=
-
1
;
is
->
size
=
-
1
;
...
@@ -79,6 +87,7 @@ input_stream_init(struct input_stream *is, const struct input_plugin *plugin)
...
@@ -79,6 +87,7 @@ input_stream_init(struct input_stream *is, const struct input_plugin *plugin)
static
inline
void
static
inline
void
input_stream_deinit
(
struct
input_stream
*
is
)
input_stream_deinit
(
struct
input_stream
*
is
)
{
{
g_free
(
is
->
uri
);
g_free
(
is
->
mime
);
g_free
(
is
->
mime
);
}
}
...
...
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