Giter Site home page Giter Site logo

Comments (2)

pdeljanov avatar pdeljanov commented on May 27, 2024

I agree with this general request.

CodecType isn't an enum because the whole system is designed to be extended out-of-tree. For example, you can implement your own Decoder for some codec and assign it a custom CodecType. Likewise, you could implement a Demuxer for a format that encapsulates a track encoded with some unknown codec. So it's not possible for Symphonia to map a codec type to media type by itself.

I was thinking of doing a bit of a clean-up of Track and CodecParameters since some things are in the wrong place (e.g., timing info. in CodeParameters). Part of that was adding a TrackType to each track. This should be possible since the demuxer knows what it's encapsulating.

#[non_exhaustive]
enum TrackType {
    Audio,
    Video,
    Subtitle,
    Data,  // Maybe
}

from symphonia.

voidentente avatar voidentente commented on May 27, 2024

Or, instead of a structural change, simply add a bulk of non-audio codec types?

pub(crate) fn codec_id_to_type(track: &TrackElement) -> Option<CodecType> {
    // ..

    match track.codec_id.as_str() {
        "V_AV1" => Some(codecs::CODEC_TYPE_AV1),
        // ..
    }
}

Edit: I'd be willing to simply go through (for example) https://www.matroska.org/technical/codec_specs.html and add the missing codecs.

Edit 2: Have a look at this? voidentente@da50d26

from symphonia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.