Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DSD configuration #327

Merged
merged 1 commit into from Jul 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/config/config_generator.cc
Expand Up @@ -280,6 +280,8 @@ Ref<Element> ConfigGenerator::generateMappings() {
ext2mt->appendElementChild(map_from_to("flv", "video/x-flv"));
ext2mt->appendElementChild(map_from_to("mkv", "video/x-matroska"));
ext2mt->appendElementChild(map_from_to("mka", "audio/x-matroska"));
ext2mt->appendElementChild(map_from_to("dsf", "audio/x-dsd"));
ext2mt->appendElementChild(map_from_to("dff", "audio/x-dsd"));

Ref<Comment> ps3info(new Comment(_(" Uncomment the line below for PS3 divx support "), true));
Ref<Comment> ps3avi(new Comment(_(" <map from=\"avi\" to=\"video/divx\"/> "), true));
Expand Down Expand Up @@ -317,6 +319,7 @@ Ref<Element> ConfigGenerator::generateMappings() {
mtcontent->appendElementChild(treat_as("audio/mp4", CONTENT_TYPE_MP4));
mtcontent->appendElementChild(treat_as("video/x-matroska", CONTENT_TYPE_MKV));
mtcontent->appendElementChild(treat_as("audio/x-matroska", CONTENT_TYPE_MKA));
mtcontent->appendElementChild(treat_as("audio/x-dsd", CONTENT_TYPE_DSD));
mappings->appendElementChild(mtcontent);

return mappings;
Expand Down
1 change: 1 addition & 0 deletions src/metadata_handler.h
Expand Up @@ -64,6 +64,7 @@
#define CONTENT_TYPE_MKV "mkv"
#define CONTENT_TYPE_MKA "mka"
#define CONTENT_TYPE_AIFF "aiff"
#define CONTENT_TYPE_DSD "dsd"

#define OGG_THEORA "t"

Expand Down
3 changes: 3 additions & 0 deletions test/test_config/fixtures/mock-config-all.xml
Expand Up @@ -96,6 +96,8 @@
<map from="flv" to="video/x-flv"/>
<map from="mkv" to="video/x-matroska"/>
<map from="mka" to="audio/x-matroska"/>
<map from="dsf" to="audio/x-dsd"/>
<map from="dff" to="audio/x-dsd"/>
<!-- Uncomment the line below for PS3 divx support -->
<!-- <map from="avi" to="video/divx"/> -->
<!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
Expand Down Expand Up @@ -125,6 +127,7 @@
<treat mimetype="audio/mp4" as="mp4"/>
<treat mimetype="video/x-matroska" as="mkv"/>
<treat mimetype="audio/x-matroska" as="mka"/>
<treat mimetype="audio/x-dsd" as="dsd"/>
</mimetype-contenttype>
</mappings>
<online-content>
Expand Down
3 changes: 3 additions & 0 deletions test/test_config/fixtures/mock-config-minimal.xml
Expand Up @@ -84,6 +84,8 @@
<map from="flv" to="video/x-flv"/>
<map from="mkv" to="video/x-matroska"/>
<map from="mka" to="audio/x-matroska"/>
<map from="dsf" to="audio/x-dsd"/>
<map from="dff" to="audio/x-dsd"/>
<!-- Uncomment the line below for PS3 divx support -->
<!-- <map from="avi" to="video/divx"/> -->
<!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
Expand Down Expand Up @@ -113,6 +115,7 @@
<treat mimetype="audio/mp4" as="mp4"/>
<treat mimetype="video/x-matroska" as="mkv"/>
<treat mimetype="audio/x-matroska" as="mka"/>
<treat mimetype="audio/x-dsd" as="dsd"/>
</mimetype-contenttype>
</mappings>
<online-content>
Expand Down
3 changes: 3 additions & 0 deletions test/test_config/fixtures/mock-import-magic-js-online.xml
Expand Up @@ -28,6 +28,8 @@
<map from="flv" to="video/x-flv"/>
<map from="mkv" to="video/x-matroska"/>
<map from="mka" to="audio/x-matroska"/>
<map from="dsf" to="audio/x-dsd"/>
<map from="dff" to="audio/x-dsd"/>
<!-- Uncomment the line below for PS3 divx support -->
<!-- <map from="avi" to="video/divx"/> -->
<!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
Expand Down Expand Up @@ -57,6 +59,7 @@
<treat mimetype="audio/mp4" as="mp4"/>
<treat mimetype="video/x-matroska" as="mkv"/>
<treat mimetype="audio/x-matroska" as="mka"/>
<treat mimetype="audio/x-dsd" as="dsd"/>
</mimetype-contenttype>
</mappings>
<online-content>
Expand Down
3 changes: 3 additions & 0 deletions test/test_config/fixtures/mock-import-magic-js.xml
Expand Up @@ -28,6 +28,8 @@
<map from="flv" to="video/x-flv"/>
<map from="mkv" to="video/x-matroska"/>
<map from="mka" to="audio/x-matroska"/>
<map from="dsf" to="audio/x-dsd"/>
<map from="dff" to="audio/x-dsd"/>
<!-- Uncomment the line below for PS3 divx support -->
<!-- <map from="avi" to="video/divx"/> -->
<!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
Expand Down Expand Up @@ -57,6 +59,7 @@
<treat mimetype="audio/mp4" as="mp4"/>
<treat mimetype="video/x-matroska" as="mkv"/>
<treat mimetype="audio/x-matroska" as="mka"/>
<treat mimetype="audio/x-dsd" as="dsd"/>
</mimetype-contenttype>
</mappings>
</import>
3 changes: 3 additions & 0 deletions test/test_config/fixtures/mock-import-mappings.xml
Expand Up @@ -19,6 +19,8 @@
<map from="flv" to="video/x-flv"/>
<map from="mkv" to="video/x-matroska"/>
<map from="mka" to="audio/x-matroska"/>
<map from="dsf" to="audio/x-dsd"/>
<map from="dff" to="audio/x-dsd"/>
<!-- Uncomment the line below for PS3 divx support -->
<!-- <map from="avi" to="video/divx"/> -->
<!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
Expand Down Expand Up @@ -48,5 +50,6 @@
<treat mimetype="audio/mp4" as="mp4"/>
<treat mimetype="video/x-matroska" as="mkv"/>
<treat mimetype="audio/x-matroska" as="mka"/>
<treat mimetype="audio/x-dsd" as="dsd"/>
</mimetype-contenttype>
</mappings>
3 changes: 3 additions & 0 deletions test/test_config/fixtures/mock-import-none.xml
Expand Up @@ -23,6 +23,8 @@
<map from="flv" to="video/x-flv"/>
<map from="mkv" to="video/x-matroska"/>
<map from="mka" to="audio/x-matroska"/>
<map from="dsf" to="audio/x-dsd"/>
<map from="dff" to="audio/x-dsd"/>
<!-- Uncomment the line below for PS3 divx support -->
<!-- <map from="avi" to="video/divx"/> -->
<!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
Expand Down Expand Up @@ -52,6 +54,7 @@
<treat mimetype="audio/mp4" as="mp4"/>
<treat mimetype="video/x-matroska" as="mkv"/>
<treat mimetype="audio/x-matroska" as="mka"/>
<treat mimetype="audio/x-dsd" as="dsd"/>
</mimetype-contenttype>
</mappings>
</import>