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
e12cc01a
Commit
e12cc01a
authored
Jan 04, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder_*: convert to C++
parent
71c69728
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
45 additions
and
38 deletions
+45
-38
Makefile.am
Makefile.am
+4
-6
DecoderAPI.cxx
src/DecoderAPI.cxx
+11
-9
DecoderControl.cxx
src/DecoderControl.cxx
+6
-3
DecoderControl.hxx
src/DecoderControl.hxx
+3
-3
DecoderInternal.cxx
src/DecoderInternal.cxx
+8
-4
DecoderInternal.hxx
src/DecoderInternal.hxx
+3
-3
DecoderThread.cxx
src/DecoderThread.cxx
+2
-2
PlayerControl.cxx
src/PlayerControl.cxx
+7
-7
PlayerThread.cxx
src/PlayerThread.cxx
+1
-1
No files found.
Makefile.am
View file @
e12cc01a
...
...
@@ -70,13 +70,11 @@ mpd_headers = \
src/idle.h
\
src/conf.h
\
src/crossfade.h
\
src/decoder_control.h
\
src/decoder_plugin.h
\
src/decoder_command.h
\
src/decoder_buffer.h
\
src/decoder_api.h
\
src/decoder_plugin.h
\
src/decoder_internal.h
\
src/encoder_plugin.h
\
src/encoder_list.h
\
src/encoder_api.h
\
...
...
@@ -207,9 +205,9 @@ src_mpd_SOURCES = \
src/cue/cue_parser.c src/cue/cue_parser.h
\
src/decoder_error.h
\
src/DecoderThread.cxx src/DecoderThread.hxx
\
src/
decoder_control.c
\
src/
decoder_api.c
\
src/
decoder_internal.c
\
src/
DecoderControl.cxx src/DecoderControl.hxx
\
src/
DecoderAPI.cxx
\
src/
DecoderInternal.cxx src/DecoderInternal.hxx
\
src/DecoderPrint.cxx src/DecoderPrint.hxx
\
src/Directory.cxx src/Directory.hxx
\
src/DirectorySave.cxx src/DirectorySave.hxx
\
...
...
@@ -274,7 +272,7 @@ src_mpd_SOURCES = \
src/page.c
\
src/Permission.cxx src/Permission.hxx
\
src/PlayerThread.cxx src/PlayerThread.hxx
\
src/
player_control.c
\
src/
PlayerControl.cxx
\
src/playlist.c
\
src/playlist_global.c
\
src/playlist_control.c
\
...
...
src/
decoder_api.c
→
src/
DecoderAPI.cxx
View file @
e12cc01a
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -18,15 +18,19 @@
*/
#include "config.h"
extern
"C"
{
#include "decoder_api.h"
#include "decoder_internal.h"
#include "decoder_control.h"
#include "audio_config.h"
#include "song.h"
#include "buffer.h"
#include "pipe.h"
#include "chunk.h"
#include "replay_gain_config.h"
}
#include "DecoderControl.hxx"
#include "DecoderInternal.hxx"
#include "song.h"
#include <glib.h>
...
...
@@ -362,11 +366,10 @@ update_stream_tag(struct decoder *decoder, struct input_stream *is)
enum
decoder_command
decoder_data
(
struct
decoder
*
decoder
,
struct
input_stream
*
is
,
const
void
*
_
data
,
size_t
length
,
const
void
*
data
,
size_t
length
,
uint16_t
kbit_rate
)
{
struct
decoder_control
*
dc
=
decoder
->
dc
;
const
char
*
data
=
_data
;
GError
*
error
=
NULL
;
enum
decoder_command
cmd
;
...
...
@@ -417,7 +420,6 @@ decoder_data(struct decoder *decoder,
while
(
length
>
0
)
{
struct
music_chunk
*
chunk
;
char
*
dest
;
size_t
nbytes
;
bool
full
;
...
...
@@ -427,7 +429,7 @@ decoder_data(struct decoder *decoder,
return
dc
->
command
;
}
dest
=
music_chunk_write
(
chunk
,
&
dc
->
out_audio_format
,
void
*
dest
=
music_chunk_write
(
chunk
,
&
dc
->
out_audio_format
,
decoder
->
timestamp
-
dc
->
song
->
start_ms
/
1000.0
,
kbit_rate
,
&
nbytes
);
...
...
@@ -456,7 +458,7 @@ decoder_data(struct decoder *decoder,
g_cond_signal
(
dc
->
client_cond
);
}
data
+=
nbytes
;
data
=
(
const
uint8_t
*
)
data
+
nbytes
;
length
-=
nbytes
;
decoder
->
timestamp
+=
(
double
)
nbytes
/
...
...
src/
decoder_control.c
→
src/
DecoderControl.cxx
View file @
e12cc01a
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -18,10 +18,13 @@
*/
#include "config.h"
#include "decoder_control.h"
#include "pipe.h"
#include "DecoderControl.hxx"
#include "song.h"
extern
"C"
{
#include "pipe.h"
}
#include <assert.h>
#undef G_LOG_DOMAIN
...
...
src/
decoder_control.h
→
src/
DecoderControl.hxx
View file @
e12cc01a
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_DECODER_CONTROL_H
#define MPD_DECODER_CONTROL_H
#ifndef MPD_DECODER_CONTROL_H
XX
#define MPD_DECODER_CONTROL_H
XX
#include "decoder_command.h"
#include "audio_format.h"
...
...
src/
decoder_internal.c
→
src/
DecoderInternal.cxx
View file @
e12cc01a
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -18,11 +18,15 @@
*/
#include "config.h"
#include "decoder_internal.h"
#include "decoder_control.h"
#include "DecoderInternal.hxx"
#include "DecoderControl.hxx"
extern
"C"
{
#include "pipe.h"
#include "input_stream.h"
#include "buffer.h"
}
#include "input_stream.h"
#include "chunk.h"
#include <assert.h>
...
...
src/
decoder_internal.h
→
src/
DecoderInternal.hxx
View file @
e12cc01a
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_DECODER_INTERNAL_H
#define MPD_DECODER_INTERNAL_H
#ifndef MPD_DECODER_INTERNAL_H
XX
#define MPD_DECODER_INTERNAL_H
XX
#include "decoder_command.h"
#include "pcm_convert.h"
...
...
src/DecoderThread.cxx
View file @
e12cc01a
...
...
@@ -19,6 +19,8 @@
#include "config.h"
#include "DecoderThread.hxx"
#include "DecoderControl.hxx"
#include "DecoderInternal.hxx"
#include "decoder_error.h"
#include "decoder_plugin.h"
#include "song.h"
...
...
@@ -26,8 +28,6 @@
#include "Mapper.hxx"
extern
"C"
{
#include "decoder_control.h"
#include "decoder_internal.h"
#include "decoder_list.h"
#include "decoder_api.h"
#include "replay_gain_ape.h"
...
...
src/
player_control.c
→
src/
PlayerControl.cxx
View file @
e12cc01a
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -18,14 +18,14 @@
*/
#include "config.h"
extern
"C"
{
#include "player_control.h"
#include "decoder_control.h"
#include "path.h"
#include "log.h"
#include "tag.h"
#include "song.h"
#include "idle.h"
#include "pcm_volume.h"
}
#include "song.h"
#include "DecoderControl.hxx"
#include "Main.hxx"
#include <assert.h>
...
...
src/PlayerThread.cxx
View file @
e12cc01a
...
...
@@ -20,13 +20,13 @@
#include "config.h"
#include "PlayerThread.hxx"
#include "DecoderThread.hxx"
#include "DecoderControl.hxx"
#include "song.h"
#include "Main.hxx"
#include "mpd_error.h"
extern
"C"
{
#include "player_control.h"
#include "decoder_control.h"
#include "output_all.h"
#include "event_pipe.h"
#include "crossfade.h"
...
...
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