mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-17 05:15:14 +00:00
cdg: factor out constants module
This commit is contained in:
parent
dc45b7f8ac
commit
79cef6cbf7
3 changed files with 17 additions and 6 deletions
|
@ -24,12 +24,7 @@ use image::GenericImageView;
|
|||
use muldiv::MulDiv;
|
||||
use std::sync::Mutex;
|
||||
|
||||
const CDG_PACKET_SIZE: i32 = 24;
|
||||
// 75 sectors/sec * 4 packets/sector = 300 packets/sec
|
||||
const CDG_PACKET_PERIOD: u64 = 300;
|
||||
|
||||
const CDG_WIDTH: u32 = 300;
|
||||
const CDG_HEIGHT: u32 = 216;
|
||||
use crate::constants::{CDG_HEIGHT, CDG_PACKET_PERIOD, CDG_PACKET_SIZE, CDG_WIDTH};
|
||||
|
||||
struct CdgDec {
|
||||
cat: gst::DebugCategory,
|
||||
|
|
15
gst-plugin-cdg/src/constants.rs
Normal file
15
gst-plugin-cdg/src/constants.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright (C) 2019 Guillaume Desmottes <guillaume.desmottes@collabora.com>
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
pub(crate) const CDG_PACKET_SIZE: i32 = 24;
|
||||
|
||||
// 75 sectors/sec * 4 packets/sector = 300 packets/sec
|
||||
pub(crate) const CDG_PACKET_PERIOD: u64 = 300;
|
||||
|
||||
pub(crate) const CDG_WIDTH: u32 = 300;
|
||||
pub(crate) const CDG_HEIGHT: u32 = 216;
|
|
@ -14,6 +14,7 @@ extern crate glib;
|
|||
extern crate gstreamer as gst;
|
||||
|
||||
mod cdgdec;
|
||||
mod constants;
|
||||
|
||||
fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
cdgdec::register(plugin)
|
||||
|
|
Loading…
Reference in a new issue