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
b83fbad6
Commit
b83fbad6
authored
Nov 10, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/httpd: use C++11 initializers
parent
ec207840
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
23 deletions
+13
-23
HttpdClient.cxx
src/output/plugins/httpd/HttpdClient.cxx
+1
-9
HttpdClient.hxx
src/output/plugins/httpd/HttpdClient.hxx
+9
-9
HttpdInternal.hxx
src/output/plugins/httpd/HttpdInternal.hxx
+2
-2
HttpdOutputPlugin.cxx
src/output/plugins/httpd/HttpdOutputPlugin.cxx
+1
-3
No files found.
src/output/plugins/httpd/HttpdClient.cxx
View file @
b83fbad6
...
...
@@ -191,15 +191,7 @@ HttpdClient::HttpdClient(HttpdOutput &_httpd, UniqueSocketDescriptor _fd,
bool
_metadata_supported
)
:
BufferedSocket
(
_fd
.
Release
(),
_loop
),
httpd
(
_httpd
),
state
(
REQUEST
),
queue_size
(
0
),
head_method
(
false
),
dlna_streaming_requested
(
false
),
metadata_supported
(
_metadata_supported
),
metadata_requested
(
false
),
metadata_sent
(
true
),
metaint
(
8192
),
/*TODO: just a std value */
metadata
(
nullptr
),
metadata_current_position
(
0
),
metadata_fill
(
0
)
metadata_supported
(
_metadata_supported
)
{
}
...
...
src/output/plugins/httpd/HttpdClient.hxx
View file @
b83fbad6
...
...
@@ -55,7 +55,7 @@ class HttpdClient final
/** sending the HTTP response */
RESPONSE
,
}
state
;
}
state
=
REQUEST
;
/**
* A queue of #Page objects to be sent to the client.
...
...
@@ -65,7 +65,7 @@ class HttpdClient final
/**
* The sum of all page sizes in #pages.
*/
size_t
queue_size
;
size_t
queue_size
=
0
;
/**
* The #page which is currently being sent to the client.
...
...
@@ -81,12 +81,12 @@ class HttpdClient final
/**
* Is this a HEAD request?
*/
bool
head_method
;
bool
head_method
=
false
;
/**
* If DLNA streaming was an option.
*/
bool
dlna_streaming_requested
;
bool
dlna_streaming_requested
=
false
;
/* ICY */
...
...
@@ -99,17 +99,17 @@ class HttpdClient final
/**
* If we should sent icy metadata.
*/
bool
metadata_requested
;
bool
metadata_requested
=
false
;
/**
* If the current metadata was already sent to the client.
*/
bool
metadata_sent
;
bool
metadata_sent
=
false
;
/**
* The amount of streaming data between each metadata block
*/
unsigned
metaint
;
unsigned
metaint
=
8192
;
/*TODO: just a std value */
/**
* The metadata as #Page which is currently being sent to the client.
...
...
@@ -119,13 +119,13 @@ class HttpdClient final
/*
* The amount of bytes which were already sent from the metadata.
*/
size_t
metadata_current_position
;
size_t
metadata_current_position
=
0
;
/**
* The amount of streaming data sent to the client
* since the last icy information was sent.
*/
unsigned
metadata_fill
;
unsigned
metadata_fill
=
0
;
public
:
/**
...
...
src/output/plugins/httpd/HttpdInternal.hxx
View file @
b83fbad6
...
...
@@ -61,7 +61,7 @@ class HttpdOutput final : AudioOutput, ServerSocket, DeferredMonitor {
* The configured encoder plugin.
*/
PreparedEncoder
*
prepared_encoder
=
nullptr
;
Encoder
*
encoder
;
Encoder
*
encoder
=
nullptr
;
/**
* Number of bytes which were fed into the encoder, without
...
...
@@ -69,7 +69,7 @@ class HttpdOutput final : AudioOutput, ServerSocket, DeferredMonitor {
* whether MPD should manually flush the encoder, to avoid
* buffer underruns in the client.
*/
size_t
unflushed_input
;
size_t
unflushed_input
=
0
;
public
:
/**
...
...
src/output/plugins/httpd/HttpdOutputPlugin.cxx
View file @
b83fbad6
...
...
@@ -51,9 +51,7 @@ const Domain httpd_output_domain("httpd_output");
inline
HttpdOutput
::
HttpdOutput
(
EventLoop
&
_loop
,
const
ConfigBlock
&
block
)
:
AudioOutput
(
FLAG_ENABLE_DISABLE
|
FLAG_PAUSE
),
ServerSocket
(
_loop
),
DeferredMonitor
(
_loop
),
encoder
(
nullptr
),
unflushed_input
(
0
),
metadata
(
nullptr
)
ServerSocket
(
_loop
),
DeferredMonitor
(
_loop
)
{
/* read configuration */
name
=
block
.
GetBlockValue
(
"name"
,
"Set name in config"
);
...
...
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