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
af9092df
Commit
af9092df
authored
Dec 26, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EncoderPlugin: pass Tag reference to method tag()
parent
58a5da33
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
8 deletions
+8
-8
EncoderPlugin.hxx
src/encoder/EncoderPlugin.hxx
+2
-2
VorbisEncoderPlugin.cxx
src/encoder/plugins/VorbisEncoderPlugin.cxx
+2
-2
RecorderOutputPlugin.cxx
src/output/plugins/RecorderOutputPlugin.cxx
+1
-1
ShoutOutputPlugin.cxx
src/output/plugins/ShoutOutputPlugin.cxx
+1
-1
HttpdOutputPlugin.cxx
src/output/plugins/httpd/HttpdOutputPlugin.cxx
+1
-1
test_vorbis_encoder.cxx
test/test_vorbis_encoder.cxx
+1
-1
No files found.
src/encoder/EncoderPlugin.hxx
View file @
af9092df
...
...
@@ -65,7 +65,7 @@ struct EncoderPlugin {
bool
(
*
pre_tag
)(
Encoder
*
encoder
,
Error
&
error
);
bool
(
*
tag
)(
Encoder
*
encoder
,
const
Tag
*
tag
,
bool
(
*
tag
)(
Encoder
*
encoder
,
const
Tag
&
tag
,
Error
&
error
);
bool
(
*
write
)(
Encoder
*
encoder
,
...
...
@@ -240,7 +240,7 @@ encoder_pre_tag(Encoder *encoder, Error &error)
* @return true on success
*/
static
inline
bool
encoder_tag
(
Encoder
*
encoder
,
const
Tag
*
tag
,
Error
&
error
)
encoder_tag
(
Encoder
*
encoder
,
const
Tag
&
tag
,
Error
&
error
)
{
assert
(
encoder
->
open
);
assert
(
!
encoder
->
pre_tag
);
...
...
src/encoder/plugins/VorbisEncoderPlugin.cxx
View file @
af9092df
...
...
@@ -279,7 +279,7 @@ copy_tag_to_vorbis_comment(vorbis_comment *vc, const Tag &tag)
}
static
bool
vorbis_encoder_tag
(
Encoder
*
_encoder
,
const
Tag
*
tag
,
vorbis_encoder_tag
(
Encoder
*
_encoder
,
const
Tag
&
tag
,
gcc_unused
Error
&
error
)
{
struct
vorbis_encoder
&
encoder
=
*
(
struct
vorbis_encoder
*
)
_encoder
;
...
...
@@ -288,7 +288,7 @@ vorbis_encoder_tag(Encoder *_encoder, const Tag *tag,
/* write the vorbis_comment object */
vorbis_comment_init
(
&
comment
);
copy_tag_to_vorbis_comment
(
&
comment
,
*
tag
);
copy_tag_to_vorbis_comment
(
&
comment
,
tag
);
/* reset ogg_stream_state and begin a new stream */
...
...
src/output/plugins/RecorderOutputPlugin.cxx
View file @
af9092df
...
...
@@ -252,7 +252,7 @@ RecorderOutput::SendTag(const Tag &tag)
Error
error
;
if
(
!
encoder_pre_tag
(
encoder
,
error
)
||
!
EncoderToFile
(
error
)
||
!
encoder_tag
(
encoder
,
&
tag
,
error
))
!
encoder_tag
(
encoder
,
tag
,
error
))
LogError
(
error
);
}
...
...
src/output/plugins/ShoutOutputPlugin.cxx
View file @
af9092df
...
...
@@ -498,7 +498,7 @@ static void my_shout_set_tag(AudioOutput *ao,
Error
error
;
if
(
!
encoder_pre_tag
(
sd
->
encoder
,
error
)
||
!
write_page
(
sd
,
error
)
||
!
encoder_tag
(
sd
->
encoder
,
&
tag
,
error
))
{
!
encoder_tag
(
sd
->
encoder
,
tag
,
error
))
{
LogError
(
error
);
return
;
}
...
...
src/output/plugins/httpd/HttpdOutputPlugin.cxx
View file @
af9092df
...
...
@@ -512,7 +512,7 @@ HttpdOutput::SendTag(const Tag &tag)
/* send the tag to the encoder - which starts a new
stream now */
encoder_tag
(
encoder
,
&
tag
,
IgnoreError
());
encoder_tag
(
encoder
,
tag
,
IgnoreError
());
/* the first page generated by the encoder will now be
used as the new "header" page, which is sent to all
...
...
test/test_vorbis_encoder.cxx
View file @
af9092df
...
...
@@ -90,7 +90,7 @@ main(gcc_unused int argc, gcc_unused char **argv)
tag_builder
.
Commit
(
tag
);
}
success
=
encoder_tag
(
encoder
,
&
tag
,
IgnoreError
());
success
=
encoder_tag
(
encoder
,
tag
,
IgnoreError
());
assert
(
success
);
encoder_to_stdout
(
*
encoder
);
...
...
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