当前位置: 首页>>代码示例>>Java>>正文


Java FrameFilter类代码示例

本文整理汇总了Java中org.bytedeco.javacv.FrameFilter的典型用法代码示例。如果您正苦于以下问题:Java FrameFilter类的具体用法?Java FrameFilter怎么用?Java FrameFilter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FrameFilter类属于org.bytedeco.javacv包,在下文中一共展示了FrameFilter类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: FilterImageTransform

import org.bytedeco.javacv.FrameFilter; //导入依赖的package包/类
/**
 * Constructs a filtergraph out of the filter specification.
 *
 * @param filters  to use
 * @param width    of the input images
 * @param height   of the input images
 * @param channels of the input images
 */
public FilterImageTransform(@JsonProperty("filters") String filters, @JsonProperty("width") int width,
                @JsonProperty("height") int height, @JsonProperty("channels") int channels) {
    super(null);

    this.filters = filters;
    this.width = width;
    this.height = height;
    this.channels = channels;

    int pixelFormat = channels == 1 ? AV_PIX_FMT_GRAY8
                    : channels == 3 ? AV_PIX_FMT_BGR24 : channels == 4 ? AV_PIX_FMT_RGBA : AV_PIX_FMT_NONE;
    if (pixelFormat == AV_PIX_FMT_NONE) {
        throw new IllegalArgumentException("Unsupported number of channels: " + channels);
    }
    try {
        filter = new FFmpegFrameFilter(filters, width, height);
        filter.setPixelFormat(pixelFormat);
        filter.start();
    } catch (FrameFilter.Exception e) {
        throw new RuntimeException(e);
    }
}
 
开发者ID:deeplearning4j,项目名称:DataVec,代码行数:31,代码来源:FilterImageTransform.java

示例2: releaseFrameFilter

import org.bytedeco.javacv.FrameFilter; //导入依赖的package包/类
private void releaseFrameFilter()
{
    if (frameFilter != null)
    {
        try
        {
            frameFilter.release();
        }
        catch (FrameFilter.Exception e)
        {
            e.printStackTrace();
        }
    }
    frameFilter = null;
}
 
开发者ID:a3349384,项目名称:AndroidVideoRecordEx,代码行数:16,代码来源:VideoRecorderEx.java

示例3: releaseFrameFilter

import org.bytedeco.javacv.FrameFilter; //导入依赖的package包/类
/**
 * 释放帧过滤器
 */
private void releaseFrameFilter() {
    if (null != mFrameFilter) {
        try {
            mFrameFilter.release();
        } catch (FrameFilter.Exception e) {
            e.printStackTrace();
        }
    }
    mFrameFilter = null;
}
 
开发者ID:Grrsun,项目名称:meipaiAll,代码行数:14,代码来源:WXLikeVideoRecorder.java

示例4: recordFrame

import org.bytedeco.javacv.FrameFilter; //导入依赖的package包/类
/**
 * 录制帧
 * @throws FrameRecorder.Exception
 */
private void recordFrame(Frame frame) throws FrameRecorder.Exception, FrameFilter.Exception {
    mFrameFilter.push(frame);
    Frame filteredFrame;
    while ((filteredFrame = mFrameFilter.pull()) != null) {
        recorder.record(filteredFrame);
    }
}
 
开发者ID:Grrsun,项目名称:meipaiAll,代码行数:12,代码来源:WXLikeVideoRecorder.java


注:本文中的org.bytedeco.javacv.FrameFilter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。