aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2020-02-20 11:35:16 +0100
committerKostya Shishkov <kostya.shishkov@gmail.com>2020-02-20 11:35:16 +0100
commit32f7cbe538d71574f7ac05aa51599d2678f5db3f (patch)
tree27ada919c11200139c5fee4f2f299dde373476fa
parentb4d5b8515e75383b4fc59ea2813c90c615d59a96 (diff)
downloadnihav-32f7cbe538d71574f7ac05aa51599d2678f5db3f.tar.gz
split nihav-registry from nihav-core
-rw-r--r--nihav-allstuff/Cargo.toml5
-rw-r--r--nihav-allstuff/src/lib.rs5
-rw-r--r--nihav-commonfmt/Cargo.toml3
-rw-r--r--nihav-commonfmt/src/demuxers/avi.rs2
-rw-r--r--nihav-commonfmt/src/lib.rs1
-rw-r--r--nihav-core/src/lib.rs3
-rw-r--r--nihav-registry/Cargo.toml8
-rw-r--r--nihav-registry/src/detect.rs (renamed from nihav-core/src/detect.rs)2
-rw-r--r--nihav-registry/src/lib.rs6
-rw-r--r--nihav-registry/src/register.rs (renamed from nihav-core/src/register.rs)0
10 files changed, 28 insertions, 7 deletions
diff --git a/nihav-allstuff/Cargo.toml b/nihav-allstuff/Cargo.toml
index 023aaa4..b8ef869 100644
--- a/nihav-allstuff/Cargo.toml
+++ b/nihav-allstuff/Cargo.toml
@@ -11,4 +11,7 @@ nihav_duck = { path = "../nihav-duck" }
nihav_game = { path = "../nihav-game" }
nihav_indeo = { path = "../nihav-indeo" }
nihav_rad = { path = "../nihav-rad" }
-nihav_realmedia = { path = "../nihav-realmedia" } \ No newline at end of file
+nihav_realmedia = { path = "../nihav-realmedia" }
+
+[dev-dependencies]
+nihav_registry = { path = "../nihav-registry" }
diff --git a/nihav-allstuff/src/lib.rs b/nihav-allstuff/src/lib.rs
index 2438f89..4c2214a 100644
--- a/nihav-allstuff/src/lib.rs
+++ b/nihav-allstuff/src/lib.rs
@@ -45,9 +45,12 @@ pub fn nihav_register_all_demuxers(rd: &mut RegisteredDemuxers) {
}
#[cfg(test)]
+extern crate nihav_registry;
+
+#[cfg(test)]
mod test {
use super::*;
- use nihav_core::register::get_codec_description;
+ use nihav_registry::register::get_codec_description;
#[test]
fn test_descriptions() {
diff --git a/nihav-commonfmt/Cargo.toml b/nihav-commonfmt/Cargo.toml
index 396f189..5c0b460 100644
--- a/nihav-commonfmt/Cargo.toml
+++ b/nihav-commonfmt/Cargo.toml
@@ -7,6 +7,9 @@ edition = "2018"
[dependencies.nihav_core]
path = "../nihav-core"
+[dependencies.nihav_registry]
+path = "../nihav-registry"
+
[dependencies.nihav_codec_support]
path = "../nihav-codec-support"
features = ["h263", "mdct", "fft", "dsp_window"]
diff --git a/nihav-commonfmt/src/demuxers/avi.rs b/nihav-commonfmt/src/demuxers/avi.rs
index ec326ff..9b53d14 100644
--- a/nihav-commonfmt/src/demuxers/avi.rs
+++ b/nihav-commonfmt/src/demuxers/avi.rs
@@ -1,5 +1,5 @@
use nihav_core::demuxers::*;
-use nihav_core::register;
+use nihav_registry::register;
use nihav_core::demuxers::DemuxerError::*;
macro_rules! mktag {
diff --git a/nihav-commonfmt/src/lib.rs b/nihav-commonfmt/src/lib.rs
index cdb70ec..7896f12 100644
--- a/nihav-commonfmt/src/lib.rs
+++ b/nihav-commonfmt/src/lib.rs
@@ -1,5 +1,6 @@
extern crate nihav_core;
extern crate nihav_codec_support;
+extern crate nihav_registry;
#[cfg(feature="decoders")]
#[allow(clippy::unreadable_literal)]
diff --git a/nihav-core/src/lib.rs b/nihav-core/src/lib.rs
index a53f304..cf97841 100644
--- a/nihav-core/src/lib.rs
+++ b/nihav-core/src/lib.rs
@@ -15,9 +15,6 @@ pub mod frame;
#[allow(clippy::too_many_arguments)]
pub mod io;
pub mod refs;
-pub mod register;
-#[allow(clippy::unreadable_literal)]
-pub mod detect;
pub mod reorder;
pub mod scale;
pub mod soundcvt;
diff --git a/nihav-registry/Cargo.toml b/nihav-registry/Cargo.toml
new file mode 100644
index 0000000..0eb6b8c
--- /dev/null
+++ b/nihav-registry/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "nihav_registry"
+version = "0.1.0"
+authors = ["Kostya Shishkov <kostya.shishkov@gmail.com>"]
+edition = "2018"
+
+[dependencies]
+nihav_core = { path = "../nihav-core" }
diff --git a/nihav-core/src/detect.rs b/nihav-registry/src/detect.rs
index a693124..44b6e54 100644
--- a/nihav-core/src/detect.rs
+++ b/nihav-registry/src/detect.rs
@@ -21,7 +21,7 @@
//! }
//! ```
use std::io::SeekFrom;
-use crate::io::byteio::ByteReader;
+use nihav_core::io::byteio::ByteReader;
/// Format detection score.
#[derive(Debug,Clone,Copy,PartialEq)]
diff --git a/nihav-registry/src/lib.rs b/nihav-registry/src/lib.rs
new file mode 100644
index 0000000..915f763
--- /dev/null
+++ b/nihav-registry/src/lib.rs
@@ -0,0 +1,6 @@
+//! Single place for storing information about container and codec formats.
+extern crate nihav_core;
+
+#[allow(clippy::unreadable_literal)]
+pub mod detect;
+pub mod register; \ No newline at end of file
diff --git a/nihav-core/src/register.rs b/nihav-registry/src/register.rs
index c54ce58..c54ce58 100644
--- a/nihav-core/src/register.rs
+++ b/nihav-registry/src/register.rs