parse metadata and send to output when playing another stream
git-svn-id: https://svn.musicpd.org/mpd/trunk@2338 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
@@ -405,8 +405,6 @@ static void shout_sendMetadata(AudioOutput * audioOutput, MpdTag * tag) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG("shout: got tag\n");
|
|
||||||
|
|
||||||
vorbis_analysis_headerout(&(sd->vd), &(sd->vc), &(sd->header_main),
|
vorbis_analysis_headerout(&(sd->vd), &(sd->vc), &(sd->header_main),
|
||||||
&(sd->header_comments), &(sd->header_codebooks));
|
&(sd->header_comments), &(sd->header_codebooks));
|
||||||
|
|
||||||
|
10
src/decode.c
10
src/decode.c
@@ -159,9 +159,7 @@ int waitOnDecode(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb,
|
|||||||
|
|
||||||
if((tag = metadataChunkToMpdTagDup(&(pc->fileMetadataChunk)))) {
|
if((tag = metadataChunkToMpdTagDup(&(pc->fileMetadataChunk)))) {
|
||||||
sendMetdataToAudioDevice(tag);
|
sendMetdataToAudioDevice(tag);
|
||||||
printMpdTag(stdout, tag);
|
|
||||||
freeMpdTag(tag);
|
freeMpdTag(tag);
|
||||||
tag = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pc->totalTime = pc->fileTime;
|
pc->totalTime = pc->fileTime;
|
||||||
@@ -428,7 +426,15 @@ void handleMetadata(OutputBuffer * cb, PlayerControl * pc, int * previous,
|
|||||||
if(!(*currentChunkSent) && pc->metadataState ==
|
if(!(*currentChunkSent) && pc->metadataState ==
|
||||||
PLAYER_METADATA_STATE_WRITE)
|
PLAYER_METADATA_STATE_WRITE)
|
||||||
{
|
{
|
||||||
|
MpdTag * tag = NULL;
|
||||||
|
|
||||||
*currentChunkSent = 1;
|
*currentChunkSent = 1;
|
||||||
|
|
||||||
|
if((tag = metadataChunkToMpdTagDup(currentChunk))) {
|
||||||
|
sendMetdataToAudioDevice(tag);
|
||||||
|
freeMpdTag(tag);
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(&(pc->metadataChunk), currentChunk,
|
memcpy(&(pc->metadataChunk), currentChunk,
|
||||||
sizeof(MetadataChunk));
|
sizeof(MetadataChunk));
|
||||||
pc->metadataState = PLAYER_METADATA_STATE_READ;
|
pc->metadataState = PLAYER_METADATA_STATE_READ;
|
||||||
|
Reference in New Issue
Block a user