Skip to content
Snippets Groups Projects
Select Git revision
  • a92f3288cb6cbba33e296f256dccbf227470f18c
  • master default protected
  • release/202005
  • release/202001
  • release/201912
  • release/201911
  • release/releaseWindowsTestOne
  • release/releaseTest
  • release/releaseWindowsTest
  • release/windowsReleaseTest
  • release/201910
  • release/qt/201910
  • release/windows-test/201910
  • release/201908
  • release/201906
  • release/201905
  • release/201904
  • release/201903
  • release/201902
  • release/201901
  • release/201812
  • 1.0.0
  • 0.3.0
  • 0.2.1
  • 0.2.0
  • 0.1.0
26 results

videorenderermanager.h

Blame
  • Emmanuel Lepage Vallee's avatar
    Emmanuel Lepage Vallée authored and Nicolas Jager committed
    All other variable and argument names start with a lower case
    letter.
    
    Change-Id: I3b57208dab0f7afa7969d65ecdc0e098a5d7a48c
    Reviewed-by: default avatarNicolas Jäger <nicolas.jager@savoirfairelinux.com>
    a92f3288
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    videorenderermanager.h 2.62 KiB
    /******************************************************************************
     *   Copyright (C) 2012-2016 by Savoir-faire Linux                            *
     *   Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>   *
     *                                                                            *
     *   This library is free software; you can redistribute it and/or            *
     *   modify it under the terms of the GNU Lesser General Public               *
     *   License as published by the Free Software Foundation; either             *
     *   version 2.1 of the License, or (at your option) any later version.       *
     *                                                                            *
     *   This library is distributed in the hope that it will be useful,          *
     *   but WITHOUT ANY WARRANTY; without even the implied warranty of           *
     *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        *
     *   Lesser General Public License for more details.                          *
     *                                                                            *
     *   You should have received a copy of the Lesser GNU General Public License *
     *   along with this program.  If not, see <http://www.gnu.org/licenses/>.    *
     *****************************************************************************/
    #pragma once
    
    //Base
    #include <typedefs.h>
    #include <QtCore/QThread>
    
    //Qt
    #include <QtCore/QHash>
    
    //Ring
    #include "video/device.h"
    namespace Video {
       class Renderer;
    }
    class Call;
    class QMutex;
    struct SHMHeader;
    
    
    class VideoRendererManagerPrivate;
    
    ///VideoModel: Video event dispatcher
    class VideoRendererManager final : public QObject
    {
       #pragma GCC diagnostic push
       #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
       Q_OBJECT
       #pragma GCC diagnostic pop
    public:
        //Singleton
        static VideoRendererManager& instance();
    
       //Getters
       bool             isPreviewing   () const;
       Video::Renderer* previewRenderer()      ;
       int              size           () const;
    
       //Helpers
       Video::Renderer* getRenderer(const Call* call) const;
       void setBufferSize(uint size);
       void switchDevice(const Video::Device* device) const;
    
    private:
       //Constructor
       explicit VideoRendererManager();
       virtual ~VideoRendererManager();
    
       QScopedPointer<VideoRendererManagerPrivate> d_ptr;
       Q_DECLARE_PRIVATE(VideoRendererManager)
    
    
    public Q_SLOTS:
       void stopPreview ();
       void startPreview();
    
    Q_SIGNALS:
       ///The preview started/stopped
       void previewStateChanged(bool startStop);
       void previewStarted(Video::Renderer* renderer);
       void previewStopped(Video::Renderer* renderer);
    
    };