[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:
ejurgensen
2023-10-21 00:17:20 +02:00
parent 9394d45de1
commit 3ee9204ff8
17 changed files with 359 additions and 276 deletions

View File

@@ -38,7 +38,7 @@ setup(struct input_source *source)
{
struct transcode_ctx *ctx;
ctx = transcode_setup(XCODE_PCM_NATIVE, NULL, source->data_kind, source->path, source->len_ms, NULL);
ctx = transcode_setup(XCODE_PCM_NATIVE, NULL, source->data_kind, source->path, source->len_ms);
if (!ctx)
return -1;

View File

@@ -304,7 +304,7 @@ setup(struct input_source *source)
free(source->path);
source->path = url;
ctx = transcode_setup(XCODE_PCM_NATIVE, NULL, source->data_kind, source->path, source->len_ms, NULL);
ctx = transcode_setup(XCODE_PCM_NATIVE, NULL, source->data_kind, source->path, source->len_ms);
if (!ctx)
return -1;

View File

@@ -404,7 +404,7 @@ download_xcode_setup(struct download_ctx *download)
if (!xcode->decode_ctx)
goto error;
xcode->encode_ctx = transcode_encode_setup(XCODE_PCM16, NULL, xcode->decode_ctx, NULL, 0, 0);
xcode->encode_ctx = transcode_encode_setup(XCODE_PCM16, NULL, xcode->decode_ctx, 0, 0);
if (!xcode->encode_ctx)
goto error;