mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-11 22:40:17 -05:00
[xcode/daap/rsp] Default transcode to 320 kbps mp3 instead of wav
- Calculate size for both formats (+ move the return to transcode_encode_query) - Let transcode_needed() decide what format to output - Determine content-type from transcoding type - Add transcode-dependent ability to override file metadata in rsp/daap - Send file size matching format
This commit is contained in:
@@ -1153,7 +1153,7 @@ master_session_make(struct media_quality *quality)
|
||||
goto error;
|
||||
}
|
||||
|
||||
rms->encode_ctx = transcode_encode_setup(XCODE_ALAC, quality, decode_ctx, NULL, 0, 0);
|
||||
rms->encode_ctx = transcode_encode_setup(XCODE_ALAC, quality, decode_ctx, 0, 0);
|
||||
transcode_decode_cleanup(&decode_ctx);
|
||||
if (!rms->encode_ctx)
|
||||
{
|
||||
|
||||
@@ -2399,7 +2399,7 @@ cast_init(void)
|
||||
goto out_tls_deinit;
|
||||
}
|
||||
|
||||
cast_encode_ctx = transcode_encode_setup(XCODE_OPUS, &cast_quality_default, decode_ctx, NULL, 0, 0);
|
||||
cast_encode_ctx = transcode_encode_setup(XCODE_OPUS, &cast_quality_default, decode_ctx, 0, 0);
|
||||
transcode_decode_cleanup(&decode_ctx);
|
||||
if (!cast_encode_ctx)
|
||||
{
|
||||
|
||||
@@ -1888,7 +1888,7 @@ master_session_make(struct media_quality *quality, bool encrypt)
|
||||
goto error;
|
||||
}
|
||||
|
||||
rms->encode_ctx = transcode_encode_setup(XCODE_ALAC, quality, decode_ctx, NULL, 0, 0);
|
||||
rms->encode_ctx = transcode_encode_setup(XCODE_ALAC, quality, decode_ctx, 0, 0);
|
||||
transcode_decode_cleanup(&decode_ctx);
|
||||
if (!rms->encode_ctx)
|
||||
{
|
||||
|
||||
@@ -133,7 +133,7 @@ encoder_setup(enum player_format format, struct media_quality *quality)
|
||||
}
|
||||
|
||||
if (format == PLAYER_FORMAT_MP3)
|
||||
encode_ctx = transcode_encode_setup(XCODE_MP3, quality, decode_ctx, NULL, 0, 0);
|
||||
encode_ctx = transcode_encode_setup(XCODE_MP3, quality, decode_ctx, 0, 0);
|
||||
|
||||
if (!encode_ctx)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user