libmoldeo (Moldeo 1.0 Core)  1.0
libmoldeo es el conjunto de objetos y funciones, que permiten ejecutar las operaciones básicas de la plataforma Moldeo, y que compone su núcleo.
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Amigas 'defines' Grupos Páginas
moVdpauGraph.h
Ir a la documentación de este archivo.
1 /*******************************************************************************
2 
3  moGsGraph.h
4 
5  ****************************************************************************
6  * *
7  * This source is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This code is distributed in the hope that it will be useful, but *
13  * WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
15  * General Public License for more details. *
16  * *
17  * A copy of the GNU General Public License is available on the World *
18  * Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
19  * obtain it by writing to the Free Software Foundation, *
20  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21  * *
22  ****************************************************************************
23 
24  Copyright(C) 2006 Fabricio Costa
25 
26  Authors:
27  Fabricio Costa
28 
29 *******************************************************************************/
30 
31 /*==============================================
32 
33 
34 Class: moVdpauGraph
35 
36 Description: DirectShow Device.
37 
38 Todo:
39 
40 Example:
41 
42 
43 ==============================================*/
44 
45 #include "moConfig.h"
46 #include "moTypes.h"
47 
48 #include "moThread.h"
49 #include "moBuckets.h"
50 
51 #include "moVideoGraph.h"
52 
53 #ifndef __MO_VDPAUGRAPH_H
54 #define __MO_VDPAUGRAPH_H
55 
56 #ifdef MO_VDPAU
57 
58 typedef void moVdpDevice;
59 typedef void moVdpDecoder;
60 typedef void moVdpVideoMixer;
61 typedef void moVdpPresentationQueueDisplay;
62 typedef void moVdpPresentationQueue;
63 
64 typedef void moVdpDecoderProfile;
65 
66 typedef void moVdpVideoSurface;
67 typedef void moVdpOutputSurface;
68 typedef void moVdpBitmapSurface;
69 
70 typedef void moVdpTime;
71 typedef void moVdpPictureInfo;
72 typedef void moVdpBitstreamBuffer;
73 
74 class LIBMOLDEO_API moVdpauFramework : public moVideoFramework {
75 
76  public:
77 
78  moVdpauFramework();
79  virtual ~moVdpauFramework();
80 
81  virtual moCaptureDevices* LoadCaptureDevices();
82  virtual moCaptureDevices* UpdateCaptureDevices();
83 
84  virtual bool CheckCaptureDevice( int i );
85  virtual bool AddCaptureDevice( moCaptureDevice& p_capdev );
86 
87 
88 
89  private:
90 
91  #ifdef MO_WIN32
92  //ICreateDevEnum *m_pDevEnum;
93  //IEnumMoniker *m_pEnum;
94  #endif
95 
96 };
97 
98 /***
99  VDPAU Graph Class for video filters and video reproduction: you don't have to link to vdpau to use
100  This is C++ wrapper to some VDPAU basic functions...
101 
102 */
103 
104 class LIBMOLDEO_API moVdpauGraph : public moVideoGraph {
105 
106 public:
107 
108  moVdpauGraph();
109  virtual ~moVdpauGraph();
110 
111 //================================================
112 // INITIALIZATION AND FINALIZATION METHODS
113 //================================================
114  virtual bool InitGraph();
115  virtual bool FinishGraph();
116 
117  virtual bool BuildLiveGraph( moBucketsPool* bpool, moCaptureDevice cdev );
118 
119  virtual bool BuildLiveVideoGraph( moText livevid, moBucketsPool* bpool );
120 
121  virtual bool BuildLiveQTVideoGraph( moText tx, moBucketsPool* bpool );
122 
123  virtual bool BuildRecordGraph( moText tx, moBucketsPool* bpool );
124 
125 //================================================
126 // FILTER METHODS CONSTRUCTION
127 //================================================
128  bool SetCaptureDevice( moText deviceport , MOint idevice = 0);
129 
130 
131 //================================================
132 // CONTROL METHODS
133 //================================================
134 
135  virtual moStreamState GetState();
136 
137  void Play();
138  void Stop();
139  void Pause();
140  void Seek( MOuint frame );
141  bool IsRunning();
143  MObyte* GetFrameBuffer(MOlong *size);
144  MOulong GetDuration();
145  MOulong GetPosition();
147 //================================================
148 // MISC METHODS
149 //================================================
150 
151 private:
152 
153  moBucketsPool *m_pBucketsPool;
154 
155  moVdpauFramework* m_pVdpauFramework;
156 
157  moCaptureDevice m_CaptureDevice;
158 
160  moVdpDevice *m_pVdpauDevice;
172  MOulong m_Duration;
173  MOulong m_FramesLength;
174 
175 
176 };
177 
178 #endif
179 
180 #endif
181 
182 
virtual bool CheckCaptureDevice(int i)=0
Chequea si el dispositivos de video disponible está aún disponible.
#define MOulong
Definition: moTypes.h:392
Plataforma de reproducción de video, actualmente GStreamer para todas las plataformas.
Definition: moVideoGraph.h:496
virtual bool IsRunning()=0
Está corriendo.
#define MObyte
Definition: moTypes.h:400
virtual bool AddCaptureDevice(moCaptureDevice &p_capdev)=0
Agrega un dispositivo de video.
#define LIBMOLDEO_API
Definition: moTypes.h:180
virtual bool FinishGraph()=0
Finalización del grafo.
clase de para manejar textos
Definition: moText.h:75
#define MOlong
Definition: moTypes.h:391
virtual MOulong GetPosition()=0
La posición del stream en cuadros.
Grafo de reproducción de video.
Definition: moVideoGraph.h:584
moTypes MOint moText moParamIndex moParamReference int iRow int int i int i
Definition: all_f.js:18
virtual bool BuildLiveGraph(moBucketsPool *pBucketsPool, moCaptureDevice p_capdev)=0
Grafo de captura de video.
virtual MOulong GetFramesLength()=0
La cantidad de frames, el largo del stream.
moStreamState
Definition: moVideoGraph.h:140
virtual moStreamState GetState()
Estado de la reproducción.
virtual bool BuildRecordGraph(moText filename, moBucketsPool *pBucketsPool)=0
Grafo de grabación.
#define MOint
Definition: moTypes.h:388
virtual bool BuildLiveVideoGraph(moText filename, moBucketsPool *pBucketsPool)=0
Grafo de reproducción de video en modo vivo, asyncronicamente reproducido en función del clock...
Administrador de moBucket 's.
Definition: moBuckets.h:152
virtual moCaptureDevices * LoadCaptureDevices()=0
Carga los dispositivos de video disponibles.
virtual void Stop()=0
Detener la reproducción del video.
virtual void Play()=0
Reproducir el video.
virtual bool BuildLiveQTVideoGraph(moText filename, moBucketsPool *pBucketsPool)=0
Definición de un dispositivo de video, generalmente uno de captura de video, o camara.
Definition: moVideoGraph.h:336
#define MOuint
Definition: moTypes.h:387
virtual bool InitGraph()=0
Inicialización del grafo.
virtual MObyte * GetFrameBuffer(MOlong *size)=0
Puntero al frame buffer.
virtual void Seek(MOuint frame, float rate=1.0)=0
Busca y posiciona.
virtual void Pause()=0
Pausa la reproducción del video.
virtual moCaptureDevices * UpdateCaptureDevices()=0
Actualiza los dispositivos de video disponibles.
virtual MOulong GetDuration()=0
La duración total del stream en nanosegundos.