PInputVideoStream.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2018 Digital Barriers. All rights reserved.
3  * Contact: http://www.digitalbarriers.com/
4  *
5  * This file is part of the Papillon SDK.
6  *
7  * You can't use, modify or distribute any part of this file without
8  * the explicit written agreements of Digital Barriers.
9  */
10 
17 #pragma once
18 #include <PPluginInstance.h>
19 
20 PAPILLON_BEGIN_NAMESPACE
21 
22 class PFrame;
23 class PPlugin;
24 class PSizei;
25 class PUri;
26 
34 class PAPILLON_API_CORE PInputVideoStream : public PPluginInstance
35 {
36 public:
40 
47 
48 public:
80  static PResult Open(const PString& uri, PInputVideoStream& inputVideoStream);
81 
86  static PResult Open(const PPlugin& plugin, const PUri& uri, PInputVideoStream& inputVideoStream);
87 
96 
100  PInputVideoStream(const PInputVideoStream& other);
101 
105  virtual ~PInputVideoStream();
106 
111 
115  bool IsEmpty() const;
116 
121  bool IsOpened() const;
122 
126  PUri GetUri() const;
127 
136  PResult OpenVideoStream();
137 
147  PResult Close();
148 
166  PResult GetFrame(PFrame& frame, papillon::int32 timeOutMs = 10000);
167 
175  void SetCheckPeriod(papillon::int32 timeMs);
176 
182  bool IsFrozen() const;
183 
192  bool CanSeek() const;
193 
204  PResult GoToFrame(papillon::int32 frameNumber);
205 
212  PSizei GetResolution() const;
213 
219  double GetFrameratePerSecond() const;
220 
226  papillon::int32 GetCurrentFrameNumber() const;
227 
233  papillon::int32 GetNumberOfFrames() const;
234 };
235 
236 PAPILLON_END_NAMESPACE
static const PString C_PROPERTY_INT32_STREAM_HEIGHT
A string constant holding the name of the property "stream height" (in pixels)
The PUri class represents an Unified Resource Identifier (URI), this class can also be used to handle...
Definition: PUri.h:43
PPluginInstance & operator=(const PPluginInstance &other)
Performs a shared copy of other to this object.
The PString class provides an Unicode character strings.
Definition: PString.h:37
static const PString C_DEFAULT_RSTP_PLUGIN
A string constant holding the default plugin to be used to open a RTSP video stream.
The PFrame class represents any 2D-image (RGB, gray-scale, ...) with a container of additional data p...
Definition: PFrame.h:50
static const PString C_DEFAULT_FILE_PLUGIN
A string constant holding the default plugin to be used to open a video file.
The PSizei class represents the size of an image or a rectangle: width (int) and height (int); PSizei...
Definition: PSizei.h:27
static const PString C_PROPERTY_DOUBLE_STREAM_FPS
A string constant holding the name of the property "stream framerate per second". ...
The PResult class represents the result returned by most of Papillon functions; this class is used to...
Definition: PResult.h:159
static const PString C_PROPERTY_INT32_GO_TO_FRAME
A string constant holding the name of the property "go to frame".
static const PString C_DEFAULT_EDGEVIS_PLUGIN
A string constant holding the default plugin to be used to open an edge-vis video stream...
The PPlugin class represents a Papillon plugin (input video source, detector, describer, ...); thread-safe.
Definition: PPlugin.h:45
static const PString C_PROPERTY_INT32_STREAM_WIDTH
A string constant holding the name of the property "stream width" (in pixels)
static const PString C_PROPERTY_INT32_FRAME_NUMBER
A string constant holding the name of the property "frame number".
The PInputVideoStream class represents an input video streams like a video file, a webcam or a RTSP s...
Class PPluginInstance: super class for PAnalytics, PDetector, PDescriber, etc.
static const PString C_PROPERTY_INT32_FRAME_COUNT
A string constant holding the name of the property "frame count".
The PPluginInstance class is the super class for PAnalytics, PDetector, PDescriber which handle the d...