/usr/include/ptclib/pffvdev.h is in libpt-dev 2.10.11~dfsg-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | /*
* pffvdev.cxx
*
* Video device for ffmpeg
*
* Portable Windows Library
*
* Copyright (C) 2008 Post Increment
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Portable Windows Library.
*
* The Initial Developer of the Original Code is
* Craig Southeren <craigs@postincrement.com>
*
* All Rights Reserved.
*
* Contributor(s): ______________________________________.
*
* $Revision: 24867 $
* $Author: rjongbloed $
* $Date: 2010-11-10 01:29:17 -0600 (Wed, 10 Nov 2010) $
*/
#ifndef PTLIB_PFFVDEV_H
#define PTLIB_PFFVDEV_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
#include <ptlib.h>
#if P_VIDEO
#if P_FFVDEV
#include <ptlib/pipechan.h>
#include <ptclib/delaychan.h>
///////////////////////////////////////////////////////////////////////////////////////////
//
// This class defines a video capture (input) device that reads video from an FFMpeg command
//
class PVideoInputDevice_FFMPEG : public PVideoInputDevice
{
PCLASSINFO(PVideoInputDevice_FFMPEG, PVideoInputDevice);
public:
/** Create a new file based video input device.
*/
PVideoInputDevice_FFMPEG();
/** Destroy video input device.
*/
~PVideoInputDevice_FFMPEG();
/**Open the device given the device name.
*/
PBoolean Open(
const PString & deviceName, /// Device name to open
PBoolean startImmediate = true /// Immediately start device
);
/**Determine of the device is currently open.
*/
PBoolean IsOpen() ;
/**Close the device.
*/
PBoolean Close();
/**Start the video device I/O.
*/
PBoolean Start();
/**Stop the video device I/O capture.
*/
PBoolean Stop();
/**Determine if the video device I/O capture is in progress.
*/
PBoolean IsCapturing();
/**Get a list of all of the drivers available.
*/
static PStringArray GetInputDeviceNames();
virtual PStringArray GetDeviceNames() const
{ return GetInputDeviceNames(); }
/**Retrieve a list of Device Capabilities
*/
static bool GetDeviceCapabilities(
const PString & /*deviceName*/, ///< Name of device
Capabilities * /*caps*/ ///< List of supported capabilities
) { return false; }
/**Get the maximum frame size in bytes.
Note a particular device may be able to provide variable length
frames (eg motion JPEG) so will be the maximum size of all frames.
*/
virtual PINDEX GetMaxFrameBytes();
/**Grab a frame.
There will be a delay in returning, as specified by frame rate.
*/
virtual PBoolean GetFrameData(
BYTE * buffer, /// Buffer to receive frame
PINDEX * bytesReturned = NULL /// Optional bytes returned.
);
/**Grab a frame.
Do not delay according to the current frame rate.
*/
virtual PBoolean GetFrameDataNoDelay(
BYTE * buffer, /// Buffer to receive frame
PINDEX * bytesReturned = NULL /// OPtional bytes returned.
);
/**Set the video format to be used.
Default behaviour sets the value of the videoFormat variable and then
returns the IsOpen() status.
*/
virtual PBoolean SetVideoFormat(
VideoFormat videoFormat /// New video format
);
/**Get the number of video channels available on the device.
Default behaviour returns 1.
*/
virtual int GetNumChannels() ;
/**Set the video channel to be used on the device.
*/
virtual PBoolean SetChannel(
int channelNumber /// New channel number for device.
);
/**Set the colour format to be used.
Default behaviour sets the value of the colourFormat variable and then
returns the IsOpen() status.
*/
virtual PBoolean SetColourFormat(
const PString & colourFormat // New colour format for device.
);
/**Set the video frame rate to be used on the device.
Default behaviour sets the value of the frameRate variable and then
return the IsOpen() status.
*/
virtual PBoolean SetFrameRate(
unsigned rate /// Frames per second
);
/**Get the minimum & maximum size of a frame on the device.
Default behaviour returns the value 1 to UINT_MAX for both and returns
false.
*/
virtual PBoolean GetFrameSizeLimits(
unsigned & minWidth, /// Variable to receive minimum width
unsigned & minHeight, /// Variable to receive minimum height
unsigned & maxWidth, /// Variable to receive maximum width
unsigned & maxHeight /// Variable to receive maximum height
) ;
/**Set the frame size to be used.
Default behaviour sets the frameWidth and frameHeight variables and
returns the IsOpen() status.
*/
virtual PBoolean SetFrameSize(
unsigned width, /// New width of frame
unsigned height /// New height of frame
);
void ClearMapping() { return ; }
protected:
unsigned m_ffmpegFrameWidth;
unsigned m_ffmpegFrameHeight;
unsigned m_ffmpegFrameRate;
unsigned m_ffmpegFrameSize;
PPipeChannel m_command;
PINDEX m_videoFrameSize;
unsigned grabCount;
PAdaptiveDelay pacing;
};
#endif // P_FFVDEV
#endif
#endif // PTLIB_PVFILEDEV_H
// End Of File ///////////////////////////////////////////////////////////////
|