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
ca0d09c5
Commit
ca0d09c5
authored
Aug 04, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EncoderPlugin: pass config_param reference
parent
81c32240
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
47 additions
and
49 deletions
+47
-49
EncoderPlugin.hxx
src/EncoderPlugin.hxx
+2
-2
FlacEncoderPlugin.cxx
src/encoder/FlacEncoderPlugin.cxx
+4
-5
LameEncoderPlugin.cxx
src/encoder/LameEncoderPlugin.cxx
+10
-10
NullEncoderPlugin.cxx
src/encoder/NullEncoderPlugin.cxx
+1
-1
OpusEncoderPlugin.cxx
src/encoder/OpusEncoderPlugin.cxx
+5
-6
TwolameEncoderPlugin.cxx
src/encoder/TwolameEncoderPlugin.cxx
+10
-10
VorbisEncoderPlugin.cxx
src/encoder/VorbisEncoderPlugin.cxx
+9
-9
WaveEncoderPlugin.cxx
src/encoder/WaveEncoderPlugin.cxx
+1
-1
HttpdOutputPlugin.cxx
src/output/HttpdOutputPlugin.cxx
+1
-1
RecorderOutputPlugin.cxx
src/output/RecorderOutputPlugin.cxx
+1
-1
ShoutOutputPlugin.cxx
src/output/ShoutOutputPlugin.cxx
+1
-1
run_encoder.cxx
test/run_encoder.cxx
+1
-1
test_vorbis_encoder.cxx
test/test_vorbis_encoder.cxx
+1
-1
No files found.
src/EncoderPlugin.hxx
View file @
ca0d09c5
...
@@ -49,7 +49,7 @@ struct Encoder {
...
@@ -49,7 +49,7 @@ struct Encoder {
struct
EncoderPlugin
{
struct
EncoderPlugin
{
const
char
*
name
;
const
char
*
name
;
Encoder
*
(
*
init
)(
const
struct
config_param
*
param
,
Encoder
*
(
*
init
)(
const
config_param
&
param
,
GError
**
error
);
GError
**
error
);
void
(
*
finish
)(
Encoder
*
encoder
);
void
(
*
finish
)(
Encoder
*
encoder
);
...
@@ -87,7 +87,7 @@ struct EncoderPlugin {
...
@@ -87,7 +87,7 @@ struct EncoderPlugin {
* @return an encoder object on success, NULL on failure
* @return an encoder object on success, NULL on failure
*/
*/
static
inline
Encoder
*
static
inline
Encoder
*
encoder_init
(
const
EncoderPlugin
&
plugin
,
const
config_param
*
param
,
encoder_init
(
const
EncoderPlugin
&
plugin
,
const
config_param
&
param
,
GError
**
error_r
)
GError
**
error_r
)
{
{
return
plugin
.
init
(
param
,
error_r
);
return
plugin
.
init
(
param
,
error_r
);
...
...
src/encoder/FlacEncoderPlugin.cxx
View file @
ca0d09c5
...
@@ -63,17 +63,16 @@ flac_encoder_quark(void)
...
@@ -63,17 +63,16 @@ flac_encoder_quark(void)
}
}
static
bool
static
bool
flac_encoder_configure
(
struct
flac_encoder
*
encoder
,
flac_encoder_configure
(
struct
flac_encoder
*
encoder
,
const
config_param
&
param
,
const
struct
config_param
*
param
,
G_GNUC_UNUSED
GError
**
error
)
gcc_unused
GError
**
error
)
{
{
encoder
->
compression
=
config_get_block_unsigned
(
param
,
encoder
->
compression
=
param
.
GetBlockValue
(
"compression"
,
5u
);
"compression"
,
5
);
return
true
;
return
true
;
}
}
static
Encoder
*
static
Encoder
*
flac_encoder_init
(
const
struct
config_param
*
param
,
GError
**
error
)
flac_encoder_init
(
const
config_param
&
param
,
GError
**
error
)
{
{
flac_encoder
*
encoder
=
new
flac_encoder
();
flac_encoder
*
encoder
=
new
flac_encoder
();
...
...
src/encoder/LameEncoderPlugin.cxx
View file @
ca0d09c5
...
@@ -43,7 +43,7 @@ struct LameEncoder final {
...
@@ -43,7 +43,7 @@ struct LameEncoder final {
LameEncoder
()
:
encoder
(
lame_encoder_plugin
)
{}
LameEncoder
()
:
encoder
(
lame_encoder_plugin
)
{}
bool
Configure
(
const
config_param
*
param
,
GError
**
error
);
bool
Configure
(
const
config_param
&
param
,
GError
**
error
);
};
};
static
inline
GQuark
static
inline
GQuark
...
@@ -53,12 +53,12 @@ lame_encoder_quark(void)
...
@@ -53,12 +53,12 @@ lame_encoder_quark(void)
}
}
bool
bool
LameEncoder
::
Configure
(
const
config_param
*
param
,
GError
**
error
)
LameEncoder
::
Configure
(
const
config_param
&
param
,
GError
**
error
)
{
{
const
char
*
value
;
const
char
*
value
;
char
*
endptr
;
char
*
endptr
;
value
=
config_get_block_string
(
param
,
"quality"
,
nullptr
);
value
=
param
.
GetBlockValue
(
"quality"
);
if
(
value
!=
nullptr
)
{
if
(
value
!=
nullptr
)
{
/* a quality was configured (VBR) */
/* a quality was configured (VBR) */
...
@@ -68,26 +68,26 @@ LameEncoder::Configure(const config_param *param, GError **error)
...
@@ -68,26 +68,26 @@ LameEncoder::Configure(const config_param *param, GError **error)
g_set_error
(
error
,
lame_encoder_quark
(),
0
,
g_set_error
(
error
,
lame_encoder_quark
(),
0
,
"quality
\"
%s
\"
is not a number in the "
"quality
\"
%s
\"
is not a number in the "
"range -1 to 10, line %i"
,
"range -1 to 10, line %i"
,
value
,
param
->
line
);
value
,
param
.
line
);
return
false
;
return
false
;
}
}
if
(
config_get_block_string
(
param
,
"bitrate"
,
nullptr
)
!=
nullptr
)
{
if
(
param
.
GetBlockValue
(
"bitrate"
)
!=
nullptr
)
{
g_set_error
(
error
,
lame_encoder_quark
(),
0
,
g_set_error
(
error
,
lame_encoder_quark
(),
0
,
"quality and bitrate are "
"quality and bitrate are "
"both defined (line %i)"
,
"both defined (line %i)"
,
param
->
line
);
param
.
line
);
return
false
;
return
false
;
}
}
}
else
{
}
else
{
/* a bit rate was configured */
/* a bit rate was configured */
value
=
config_get_block_string
(
param
,
"bitrate"
,
nullptr
);
value
=
param
.
GetBlockValue
(
"bitrate"
);
if
(
value
==
nullptr
)
{
if
(
value
==
nullptr
)
{
g_set_error
(
error
,
lame_encoder_quark
(),
0
,
g_set_error
(
error
,
lame_encoder_quark
(),
0
,
"neither bitrate nor quality defined "
"neither bitrate nor quality defined "
"at line %i"
,
"at line %i"
,
param
->
line
);
param
.
line
);
return
false
;
return
false
;
}
}
...
@@ -97,7 +97,7 @@ LameEncoder::Configure(const config_param *param, GError **error)
...
@@ -97,7 +97,7 @@ LameEncoder::Configure(const config_param *param, GError **error)
if
(
*
endptr
!=
'\0'
||
bitrate
<=
0
)
{
if
(
*
endptr
!=
'\0'
||
bitrate
<=
0
)
{
g_set_error
(
error
,
lame_encoder_quark
(),
0
,
g_set_error
(
error
,
lame_encoder_quark
(),
0
,
"bitrate at line %i should be a positive integer"
,
"bitrate at line %i should be a positive integer"
,
param
->
line
);
param
.
line
);
return
false
;
return
false
;
}
}
}
}
...
@@ -106,7 +106,7 @@ LameEncoder::Configure(const config_param *param, GError **error)
...
@@ -106,7 +106,7 @@ LameEncoder::Configure(const config_param *param, GError **error)
}
}
static
Encoder
*
static
Encoder
*
lame_encoder_init
(
const
struct
config_param
*
param
,
GError
**
error_r
)
lame_encoder_init
(
const
config_param
&
param
,
GError
**
error_r
)
{
{
LameEncoder
*
encoder
=
new
LameEncoder
();
LameEncoder
*
encoder
=
new
LameEncoder
();
...
...
src/encoder/NullEncoderPlugin.cxx
View file @
ca0d09c5
...
@@ -40,7 +40,7 @@ struct NullEncoder final {
...
@@ -40,7 +40,7 @@ struct NullEncoder final {
};
};
static
Encoder
*
static
Encoder
*
null_encoder_init
(
gcc_unused
const
struct
config_param
*
param
,
null_encoder_init
(
gcc_unused
const
config_param
&
param
,
gcc_unused
GError
**
error
)
gcc_unused
GError
**
error
)
{
{
NullEncoder
*
encoder
=
new
NullEncoder
();
NullEncoder
*
encoder
=
new
NullEncoder
();
...
...
src/encoder/OpusEncoderPlugin.cxx
View file @
ca0d09c5
...
@@ -75,9 +75,9 @@ opus_encoder_quark(void)
...
@@ -75,9 +75,9 @@ opus_encoder_quark(void)
static
bool
static
bool
opus_encoder_configure
(
struct
opus_encoder
*
encoder
,
opus_encoder_configure
(
struct
opus_encoder
*
encoder
,
const
struct
config_param
*
param
,
GError
**
error_r
)
const
config_param
&
param
,
GError
**
error_r
)
{
{
const
char
*
value
=
config_get_block_string
(
param
,
"bitrate"
,
"auto"
);
const
char
*
value
=
param
.
GetBlockValue
(
"bitrate"
,
"auto"
);
if
(
strcmp
(
value
,
"auto"
)
==
0
)
if
(
strcmp
(
value
,
"auto"
)
==
0
)
encoder
->
bitrate
=
OPUS_AUTO
;
encoder
->
bitrate
=
OPUS_AUTO
;
else
if
(
strcmp
(
value
,
"max"
)
==
0
)
else
if
(
strcmp
(
value
,
"max"
)
==
0
)
...
@@ -93,15 +93,14 @@ opus_encoder_configure(struct opus_encoder *encoder,
...
@@ -93,15 +93,14 @@ opus_encoder_configure(struct opus_encoder *encoder,
}
}
}
}
encoder
->
complexity
=
config_get_block_unsigned
(
param
,
"complexity"
,
encoder
->
complexity
=
param
.
GetBlockValue
(
"complexity"
,
10u
);
10
);
if
(
encoder
->
complexity
>
10
)
{
if
(
encoder
->
complexity
>
10
)
{
g_set_error
(
error_r
,
opus_encoder_quark
(),
0
,
g_set_error
(
error_r
,
opus_encoder_quark
(),
0
,
"Invalid complexity"
);
"Invalid complexity"
);
return
false
;
return
false
;
}
}
value
=
config_get_block_string
(
param
,
"signal"
,
"auto"
);
value
=
param
.
GetBlockValue
(
"signal"
,
"auto"
);
if
(
strcmp
(
value
,
"auto"
)
==
0
)
if
(
strcmp
(
value
,
"auto"
)
==
0
)
encoder
->
signal
=
OPUS_AUTO
;
encoder
->
signal
=
OPUS_AUTO
;
else
if
(
strcmp
(
value
,
"voice"
)
==
0
)
else
if
(
strcmp
(
value
,
"voice"
)
==
0
)
...
@@ -118,7 +117,7 @@ opus_encoder_configure(struct opus_encoder *encoder,
...
@@ -118,7 +117,7 @@ opus_encoder_configure(struct opus_encoder *encoder,
}
}
static
Encoder
*
static
Encoder
*
opus_encoder_init
(
const
struct
config_param
*
param
,
GError
**
error
)
opus_encoder_init
(
const
config_param
&
param
,
GError
**
error
)
{
{
opus_encoder
*
encoder
=
new
opus_encoder
();
opus_encoder
*
encoder
=
new
opus_encoder
();
...
...
src/encoder/TwolameEncoderPlugin.cxx
View file @
ca0d09c5
...
@@ -48,7 +48,7 @@ struct TwolameEncoder final {
...
@@ -48,7 +48,7 @@ struct TwolameEncoder final {
TwolameEncoder
()
:
encoder
(
twolame_encoder_plugin
)
{}
TwolameEncoder
()
:
encoder
(
twolame_encoder_plugin
)
{}
bool
Configure
(
const
config_param
*
param
,
GError
**
error
);
bool
Configure
(
const
config_param
&
param
,
GError
**
error
);
};
};
static
inline
GQuark
static
inline
GQuark
...
@@ -58,12 +58,12 @@ twolame_encoder_quark(void)
...
@@ -58,12 +58,12 @@ twolame_encoder_quark(void)
}
}
bool
bool
TwolameEncoder
::
Configure
(
const
config_param
*
param
,
GError
**
error
)
TwolameEncoder
::
Configure
(
const
config_param
&
param
,
GError
**
error
)
{
{
const
char
*
value
;
const
char
*
value
;
char
*
endptr
;
char
*
endptr
;
value
=
config_get_block_string
(
param
,
"quality"
,
nullptr
);
value
=
param
.
GetBlockValue
(
"quality"
);
if
(
value
!=
nullptr
)
{
if
(
value
!=
nullptr
)
{
/* a quality was configured (VBR) */
/* a quality was configured (VBR) */
...
@@ -73,26 +73,26 @@ TwolameEncoder::Configure(const config_param *param, GError **error)
...
@@ -73,26 +73,26 @@ TwolameEncoder::Configure(const config_param *param, GError **error)
g_set_error
(
error
,
twolame_encoder_quark
(),
0
,
g_set_error
(
error
,
twolame_encoder_quark
(),
0
,
"quality
\"
%s
\"
is not a number in the "
"quality
\"
%s
\"
is not a number in the "
"range -1 to 10, line %i"
,
"range -1 to 10, line %i"
,
value
,
param
->
line
);
value
,
param
.
line
);
return
false
;
return
false
;
}
}
if
(
config_get_block_string
(
param
,
"bitrate"
,
nullptr
)
!=
nullptr
)
{
if
(
param
.
GetBlockValue
(
"bitrate"
)
!=
nullptr
)
{
g_set_error
(
error
,
twolame_encoder_quark
(),
0
,
g_set_error
(
error
,
twolame_encoder_quark
(),
0
,
"quality and bitrate are "
"quality and bitrate are "
"both defined (line %i)"
,
"both defined (line %i)"
,
param
->
line
);
param
.
line
);
return
false
;
return
false
;
}
}
}
else
{
}
else
{
/* a bit rate was configured */
/* a bit rate was configured */
value
=
config_get_block_string
(
param
,
"bitrate"
,
nullptr
);
value
=
param
.
GetBlockValue
(
"bitrate"
);
if
(
value
==
nullptr
)
{
if
(
value
==
nullptr
)
{
g_set_error
(
error
,
twolame_encoder_quark
(),
0
,
g_set_error
(
error
,
twolame_encoder_quark
(),
0
,
"neither bitrate nor quality defined "
"neither bitrate nor quality defined "
"at line %i"
,
"at line %i"
,
param
->
line
);
param
.
line
);
return
false
;
return
false
;
}
}
...
@@ -102,7 +102,7 @@ TwolameEncoder::Configure(const config_param *param, GError **error)
...
@@ -102,7 +102,7 @@ TwolameEncoder::Configure(const config_param *param, GError **error)
if
(
*
endptr
!=
'\0'
||
bitrate
<=
0
)
{
if
(
*
endptr
!=
'\0'
||
bitrate
<=
0
)
{
g_set_error
(
error
,
twolame_encoder_quark
(),
0
,
g_set_error
(
error
,
twolame_encoder_quark
(),
0
,
"bitrate at line %i should be a positive integer"
,
"bitrate at line %i should be a positive integer"
,
param
->
line
);
param
.
line
);
return
false
;
return
false
;
}
}
}
}
...
@@ -111,7 +111,7 @@ TwolameEncoder::Configure(const config_param *param, GError **error)
...
@@ -111,7 +111,7 @@ TwolameEncoder::Configure(const config_param *param, GError **error)
}
}
static
Encoder
*
static
Encoder
*
twolame_encoder_init
(
const
struct
config_param
*
param
,
GError
**
error_r
)
twolame_encoder_init
(
const
config_param
&
param
,
GError
**
error_r
)
{
{
g_debug
(
"libtwolame version %s"
,
get_twolame_version
());
g_debug
(
"libtwolame version %s"
,
get_twolame_version
());
...
...
src/encoder/VorbisEncoderPlugin.cxx
View file @
ca0d09c5
...
@@ -62,9 +62,9 @@ vorbis_encoder_quark(void)
...
@@ -62,9 +62,9 @@ vorbis_encoder_quark(void)
static
bool
static
bool
vorbis_encoder_configure
(
struct
vorbis_encoder
*
encoder
,
vorbis_encoder_configure
(
struct
vorbis_encoder
*
encoder
,
const
struct
config_param
*
param
,
GError
**
error
)
const
config_param
&
param
,
GError
**
error
)
{
{
const
char
*
value
=
config_get_block_string
(
param
,
"quality"
,
nullptr
);
const
char
*
value
=
param
.
GetBlockValue
(
"quality"
);
if
(
value
!=
nullptr
)
{
if
(
value
!=
nullptr
)
{
/* a quality was configured (VBR) */
/* a quality was configured (VBR) */
...
@@ -76,26 +76,26 @@ vorbis_encoder_configure(struct vorbis_encoder *encoder,
...
@@ -76,26 +76,26 @@ vorbis_encoder_configure(struct vorbis_encoder *encoder,
g_set_error
(
error
,
vorbis_encoder_quark
(),
0
,
g_set_error
(
error
,
vorbis_encoder_quark
(),
0
,
"quality
\"
%s
\"
is not a number in the "
"quality
\"
%s
\"
is not a number in the "
"range -1 to 10, line %i"
,
"range -1 to 10, line %i"
,
value
,
param
->
line
);
value
,
param
.
line
);
return
false
;
return
false
;
}
}
if
(
config_get_block_string
(
param
,
"bitrate"
,
nullptr
)
!=
nullptr
)
{
if
(
param
.
GetBlockValue
(
"bitrate"
)
!=
nullptr
)
{
g_set_error
(
error
,
vorbis_encoder_quark
(),
0
,
g_set_error
(
error
,
vorbis_encoder_quark
(),
0
,
"quality and bitrate are "
"quality and bitrate are "
"both defined (line %i)"
,
"both defined (line %i)"
,
param
->
line
);
param
.
line
);
return
false
;
return
false
;
}
}
}
else
{
}
else
{
/* a bit rate was configured */
/* a bit rate was configured */
value
=
config_get_block_string
(
param
,
"bitrate"
,
nullptr
);
value
=
param
.
GetBlockValue
(
"bitrate"
);
if
(
value
==
nullptr
)
{
if
(
value
==
nullptr
)
{
g_set_error
(
error
,
vorbis_encoder_quark
(),
0
,
g_set_error
(
error
,
vorbis_encoder_quark
(),
0
,
"neither bitrate nor quality defined "
"neither bitrate nor quality defined "
"at line %i"
,
"at line %i"
,
param
->
line
);
param
.
line
);
return
false
;
return
false
;
}
}
...
@@ -106,7 +106,7 @@ vorbis_encoder_configure(struct vorbis_encoder *encoder,
...
@@ -106,7 +106,7 @@ vorbis_encoder_configure(struct vorbis_encoder *encoder,
if
(
*
endptr
!=
'\0'
||
encoder
->
bitrate
<=
0
)
{
if
(
*
endptr
!=
'\0'
||
encoder
->
bitrate
<=
0
)
{
g_set_error
(
error
,
vorbis_encoder_quark
(),
0
,
g_set_error
(
error
,
vorbis_encoder_quark
(),
0
,
"bitrate at line %i should be a positive integer"
,
"bitrate at line %i should be a positive integer"
,
param
->
line
);
param
.
line
);
return
false
;
return
false
;
}
}
}
}
...
@@ -115,7 +115,7 @@ vorbis_encoder_configure(struct vorbis_encoder *encoder,
...
@@ -115,7 +115,7 @@ vorbis_encoder_configure(struct vorbis_encoder *encoder,
}
}
static
Encoder
*
static
Encoder
*
vorbis_encoder_init
(
const
struct
config_param
*
param
,
GError
**
error
)
vorbis_encoder_init
(
const
config_param
&
param
,
GError
**
error
)
{
{
vorbis_encoder
*
encoder
=
new
vorbis_encoder
();
vorbis_encoder
*
encoder
=
new
vorbis_encoder
();
...
...
src/encoder/WaveEncoderPlugin.cxx
View file @
ca0d09c5
...
@@ -83,7 +83,7 @@ fill_wave_header(struct wave_header *header, int channels, int bits,
...
@@ -83,7 +83,7 @@ fill_wave_header(struct wave_header *header, int channels, int bits,
}
}
static
Encoder
*
static
Encoder
*
wave_encoder_init
(
gcc_unused
const
struct
config_param
*
param
,
wave_encoder_init
(
gcc_unused
const
config_param
&
param
,
gcc_unused
GError
**
error
)
gcc_unused
GError
**
error
)
{
{
WaveEncoder
*
encoder
=
new
WaveEncoder
();
WaveEncoder
*
encoder
=
new
WaveEncoder
();
...
...
src/output/HttpdOutputPlugin.cxx
View file @
ca0d09c5
...
@@ -123,7 +123,7 @@ HttpdOutput::Configure(const config_param ¶m, GError **error_r)
...
@@ -123,7 +123,7 @@ HttpdOutput::Configure(const config_param ¶m, GError **error_r)
/* initialize encoder */
/* initialize encoder */
encoder
=
encoder_init
(
*
encoder_plugin
,
&
param
,
error_r
);
encoder
=
encoder_init
(
*
encoder_plugin
,
param
,
error_r
);
if
(
encoder
==
nullptr
)
if
(
encoder
==
nullptr
)
return
false
;
return
false
;
...
...
src/output/RecorderOutputPlugin.cxx
View file @
ca0d09c5
...
@@ -108,7 +108,7 @@ RecorderOutput::Configure(const config_param ¶m, GError **error_r)
...
@@ -108,7 +108,7 @@ RecorderOutput::Configure(const config_param ¶m, GError **error_r)
/* initialize encoder */
/* initialize encoder */
encoder
=
encoder_init
(
*
encoder_plugin
,
&
param
,
error_r
);
encoder
=
encoder_init
(
*
encoder_plugin
,
param
,
error_r
);
if
(
encoder
==
nullptr
)
if
(
encoder
==
nullptr
)
return
false
;
return
false
;
...
...
src/output/ShoutOutputPlugin.cxx
View file @
ca0d09c5
...
@@ -185,7 +185,7 @@ ShoutOutput::Configure(const config_param ¶m, GError **error_r)
...
@@ -185,7 +185,7 @@ ShoutOutput::Configure(const config_param ¶m, GError **error_r)
return
false
;
return
false
;
}
}
encoder
=
encoder_init
(
*
encoder_plugin
,
&
param
,
error_r
);
encoder
=
encoder_init
(
*
encoder_plugin
,
param
,
error_r
);
if
(
encoder
==
nullptr
)
if
(
encoder
==
nullptr
)
return
false
;
return
false
;
...
...
test/run_encoder.cxx
View file @
ca0d09c5
...
@@ -71,7 +71,7 @@ int main(int argc, char **argv)
...
@@ -71,7 +71,7 @@ int main(int argc, char **argv)
config_param
param
;
config_param
param
;
param
.
AddBlockParam
(
"quality"
,
"5.0"
,
-
1
);
param
.
AddBlockParam
(
"quality"
,
"5.0"
,
-
1
);
const
auto
encoder
=
encoder_init
(
*
plugin
,
&
param
,
&
error
);
const
auto
encoder
=
encoder_init
(
*
plugin
,
param
,
&
error
);
if
(
encoder
==
NULL
)
{
if
(
encoder
==
NULL
)
{
g_printerr
(
"Failed to initialize encoder: %s
\n
"
,
g_printerr
(
"Failed to initialize encoder: %s
\n
"
,
error
->
message
);
error
->
message
);
...
...
test/test_vorbis_encoder.cxx
View file @
ca0d09c5
...
@@ -56,7 +56,7 @@ main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
...
@@ -56,7 +56,7 @@ main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
config_param
param
;
config_param
param
;
param
.
AddBlockParam
(
"quality"
,
"5.0"
,
-
1
);
param
.
AddBlockParam
(
"quality"
,
"5.0"
,
-
1
);
const
auto
encoder
=
encoder_init
(
*
plugin
,
&
param
,
NULL
);
const
auto
encoder
=
encoder_init
(
*
plugin
,
param
,
NULL
);
assert
(
encoder
!=
NULL
);
assert
(
encoder
!=
NULL
);
/* open the encoder */
/* open the 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