audiovisualinterfaces.h

来自「一个语言识别引擎」· C头文件 代码 · 共 72 行

H
72
字号
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-

/*
 * Copyright (C) 2006 Paul Fitzpatrick
 * CopyPolicy: Released under the terms of the GNU GPL v2.0.
 *
 */


#ifndef YARP2_AUDIO_VISUAL_INTERFACES
#define YARP2_AUDIO_VISUAL_INTERFACES

#include <yarp/dev/FrameGrabberInterfaces.h>
#include <yarp/dev/AudioGrabberInterfaces.h>
#include <yarp/os/PortablePair.h>

namespace yarp{
    namespace dev {
        class IAudioVisualGrabber;
        class IAudioVisualStream;
        typedef yarp::os::PortablePair<yarp::sig::ImageOf<yarp::sig::PixelRgb>,
                                       yarp::sig::Sound> ImageRgbSound;
    }
}

/**
 * @ingroup dev_iface_media
 *
 * Read a YARP-format image and sound from a device.
 */
class yarp::dev::IAudioVisualGrabber
{
public:
    /**
     * Destructor.
     */
    virtual ~IAudioVisualGrabber(){}

    /**
     * Get an image and sound
     * 
     * @param image the image to be filled
     * @param sound the sound to be filled
     * @return true/false upon success/failure
     */
    virtual bool getAudioVisual(yarp::sig::ImageOf<yarp::sig::PixelRgb>& image,
                                yarp::sig::Sound& sound) = 0;    
};


/**
 * @ingroup dev_iface_media
 *
 * For streams capable of holding different kinds of content,
 * check what they actually have.
 *
 */
class yarp::dev::IAudioVisualStream {
public:
    /**
     * Destructor.
     */
    virtual ~IAudioVisualStream(){}

    virtual bool hasAudio() = 0;

    virtual bool hasVideo() = 0;
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?