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
a0a26d33
Commit
a0a26d33
authored
Jan 18, 2010
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge release 0.15.8 from branch 'v0.15.x
Conflicts: Makefile.am NEWS configure.ac src/decoder/ffmpeg_decoder_plugin.c src/decoder_thread.c
parents
9d4b7ab1
760569fc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
8 deletions
+45
-8
NEWS
NEWS
+5
-1
dbUtils.c
src/dbUtils.c
+4
-1
ffmpeg_decoder_plugin.c
src/decoder/ffmpeg_decoder_plugin.c
+34
-4
queue.c
src/queue.c
+2
-2
No files found.
NEWS
View file @
a0a26d33
...
...
@@ -88,11 +88,15 @@ ver 0.16 (20??/??/??)
* require GLib 2.12
ver 0.15.8 (20
09/??/??
)
ver 0.15.8 (20
10/01/17
)
* input:
- curl: allow rewinding with Icy-Metadata
* decoders:
- ffmpeg, flac, vorbis: added more flac/vorbis MIME types
- ffmpeg: enabled libavformat's file name extension detection
* dbUtils: return empty tag value only if no value was found
* decoder_thread: fix CUE track playback
* queue: don't repeat current song in consume mode
ver 0.15.7 (2009/12/27)
...
...
src/dbUtils.c
View file @
a0a26d33
...
...
@@ -256,6 +256,7 @@ visitTag(struct client *client, struct strset *set,
struct
song
*
song
,
enum
tag_type
tagType
)
{
struct
tag
*
tag
=
song
->
tag
;
bool
found
=
false
;
if
(
tagType
==
LOCATE_TAG_FILE_TYPE
)
{
song_print_uri
(
client
,
song
);
...
...
@@ -268,10 +269,12 @@ visitTag(struct client *client, struct strset *set,
for
(
unsigned
i
=
0
;
i
<
tag
->
num_items
;
i
++
)
{
if
(
tag
->
items
[
i
]
->
type
==
tagType
)
{
strset_add
(
set
,
tag
->
items
[
i
]
->
value
);
found
=
true
;
}
}
strset_add
(
set
,
""
);
if
(
!
found
)
strset_add
(
set
,
""
);
}
struct
list_tags_data
{
...
...
src/decoder/ffmpeg_decoder_plugin.c
View file @
a0a26d33
...
...
@@ -56,7 +56,7 @@ struct ffmpeg_context {
struct
ffmpeg_stream
{
/** hack - see url_to_struct() */
char
url
[
8
];
char
url
[
64
];
struct
decoder
*
decoder
;
struct
input_stream
*
input
;
...
...
@@ -141,8 +141,28 @@ ffmpeg_find_audio_stream(const AVFormatContext *format_context)
return
-
1
;
}
/**
* Append the suffix of the original URI to the virtual stream URI.
* Without this, libavformat cannot detect some of the codecs
* (e.g. "shorten").
*/
static
void
append_uri_suffix
(
struct
ffmpeg_stream
*
stream
,
const
char
*
uri
)
{
assert
(
stream
!=
NULL
);
assert
(
uri
!=
NULL
);
char
*
base
=
g_path_get_basename
(
uri
);
const
char
*
suffix
=
strrchr
(
base
,
'.'
);
if
(
suffix
!=
NULL
&&
suffix
[
1
]
!=
0
)
g_strlcat
(
stream
->
url
,
suffix
,
sizeof
(
stream
->
url
));
g_free
(
base
);
}
static
bool
ffmpeg_helper
(
struct
input_stream
*
input
,
ffmpeg_helper
(
const
char
*
uri
,
struct
input_stream
*
input
,
bool
(
*
callback
)(
struct
ffmpeg_context
*
ctx
),
struct
ffmpeg_context
*
ctx
)
{
...
...
@@ -155,6 +175,9 @@ ffmpeg_helper(struct input_stream *input,
};
bool
ret
;
if
(
uri
!=
NULL
)
append_uri_suffix
(
&
stream
,
uri
);
stream
.
input
=
input
;
if
(
ctx
&&
ctx
->
decoder
)
{
stream
.
decoder
=
ctx
->
decoder
;
//are we in decoding loop ?
...
...
@@ -362,7 +385,8 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
ctx
.
input
=
input
;
ctx
.
decoder
=
decoder
;
ffmpeg_helper
(
input
,
ffmpeg_decode_internal
,
&
ctx
);
ffmpeg_helper
(
decoder_get_uri
(
decoder
),
input
,
ffmpeg_decode_internal
,
&
ctx
);
}
#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(31<<8)+0)
...
...
@@ -435,7 +459,7 @@ ffmpeg_stream_tag(struct input_stream *is)
ctx
.
decoder
=
NULL
;
ctx
.
tag
=
tag_new
();
ret
=
ffmpeg_helper
(
is
,
ffmpeg_tag_internal
,
&
ctx
);
ret
=
ffmpeg_helper
(
NULL
,
is
,
ffmpeg_tag_internal
,
&
ctx
);
if
(
!
ret
)
{
tag_free
(
ctx
.
tag
);
ctx
.
tag
=
NULL
;
...
...
@@ -469,6 +493,7 @@ static const char *const ffmpeg_suffixes[] = {
};
static
const
char
*
const
ffmpeg_mime_types
[]
=
{
"application/m4a"
,
"application/mp4"
,
"application/octet-stream"
,
"application/ogg"
,
...
...
@@ -481,9 +506,12 @@ static const char *const ffmpeg_mime_types[] = {
"audio/16sv"
,
"audio/aac"
,
"audio/ac3"
,
"audio/aiff"
"audio/amr"
,
"audio/basic"
,
"audio/flac"
,
"audio/m4a"
,
"audio/mp4"
,
"audio/mpeg"
,
"audio/musepack"
,
"audio/ogg"
,
...
...
@@ -502,6 +530,7 @@ static const char *const ffmpeg_mime_types[] = {
"audio/x-flac"
,
"audio/x-gsm"
,
"audio/x-mace"
,
"audio/x-matroska"
,
"audio/x-monkeys-audio"
,
"audio/x-mpeg"
,
"audio/x-ms-wma"
,
...
...
@@ -514,6 +543,7 @@ static const char *const ffmpeg_mime_types[] = {
"audio/x-pn-multirate-realaudio"
,
"audio/x-speex"
,
"audio/x-tta"
"audio/x-voc"
,
"audio/x-wav"
,
"audio/x-wma"
,
"audio/x-wv"
,
...
...
src/queue.c
View file @
a0a26d33
...
...
@@ -46,14 +46,14 @@ queue_next_order(const struct queue *queue, unsigned order)
if
(
queue
->
single
)
{
if
(
queue
->
repeat
)
if
(
queue
->
repeat
&&
!
queue
->
consume
)
return
order
;
else
return
-
1
;
}
if
(
order
+
1
<
queue
->
length
)
return
order
+
1
;
else
if
(
queue
->
repeat
)
else
if
(
queue
->
repeat
&&
(
order
>
0
||
!
queue
->
consume
)
)
/* restart at first song */
return
0
;
else
...
...
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