Instrument Neutral Distributed Interface INDI 2.2.5
encoderinterface.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2017 by Jasem Mutlaq <[email protected]>
3
4 Encoder Interface
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
20*/
21
22#pragma once
23
24#include "indidevapi.h"
25#include "indibasetypes.h"
26#include "indiwidgetview.h"
27
28#include <stdio.h>
29#include <cstdlib>
30#include <stdint.h>
31
32#include <vector>
33
34namespace INDI
35{
36
37class DefaultDevice;
38class CCD;
39class Detector;
40
45{
46 public:
47 EncoderInterface() = default;
48 virtual ~EncoderInterface() = default;
49
50 virtual void init(INDI::DefaultDevice *mainDevice);
51
53
54 virtual bool setSize(uint16_t width, uint16_t height);
55
56 virtual bool upload(INDI::WidgetViewBlob *bp, const uint8_t *buffer, uint32_t nbytes, bool isCompressed = false) = 0;
57
58 const char *getName();
59
60 protected:
62 const char *name;
63 INDI_PIXEL_FORMAT pixelFormat; // INDI Pixel Format
64 uint8_t pixelDepth = 8; // Bits per Pixels
66};
67
68}
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
The EncoderInterface class is the base class for video streaming encoders.
virtual bool setSize(uint16_t width, uint16_t height)
INDI::DefaultDevice * currentDevice
virtual bool setPixelFormat(INDI_PIXEL_FORMAT pixelFormat, uint8_t pixelDepth)
INDI_PIXEL_FORMAT pixelFormat
virtual ~EncoderInterface()=default
virtual bool upload(INDI::WidgetViewBlob *bp, const uint8_t *buffer, uint32_t nbytes, bool isCompressed=false)=0
INDI_PIXEL_FORMAT
Interface to the reference INDI C API device implementation on the Device Driver side.
Namespace to encapsulate INDI client, drivers, and mediator classes.