mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-05-20 17:28:49 +00:00
750b29b76c
- Implemented a simple gif encoder based on the rust crate "gif". - Currently supported input pixel formats are RGB and RGBA - The encoder dynamically changes frame delays to approximate the actual input framerate - For the moment, each frame uses its own local colorpalette, leading to good image quality, but big files - Every frame is currently a full frame. No incremental frames for now - The produced GIF is currently compressed (LZW)
31 lines
837 B
Rust
31 lines
837 B
Rust
// Copyright (C) 2020 Markus Ebner <info@ebner-markus.de>
|
|
//
|
|
// 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.
|
|
|
|
#[macro_use]
|
|
extern crate glib;
|
|
#[macro_use]
|
|
extern crate gstreamer as gst;
|
|
|
|
mod gifenc;
|
|
|
|
fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
|
gifenc::register(plugin)
|
|
}
|
|
|
|
gst_plugin_define!(
|
|
gifenc,
|
|
env!("CARGO_PKG_DESCRIPTION"),
|
|
plugin_init,
|
|
concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),
|
|
"MIT/X11",
|
|
env!("CARGO_PKG_NAME"),
|
|
env!("CARGO_PKG_NAME"),
|
|
env!("CARGO_PKG_REPOSITORY"),
|
|
env!("BUILD_REL_DATE")
|
|
);
|