Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cAVBuilder.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cAVBuilder_H
7 #define _INC_cAVBuilder_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "cAVSink.h"
14 
15 namespace GrayLib
16 {
17  struct IVideoCompress;
18 
20  {
23  private:
24  cAVSink* m_pAVSink;
25 
26  public:
27  cAVBuilder(cAVSink* pAVSink);
28  ~cAVBuilder();
29 
30  bool isOpen() const noexcept
31  {
32  return(m_pAVSink != nullptr);
33  }
34 
35  HRESULT OpenAV(float fFrameRate, AV_QUALITY_t wVideoQuality, const cSurfaceBitmapInfo* pVideoFormat, const cWaveFormatEx* pAudioFormat);
36  HRESULT AddFrameVideo(const void* pVideoData, size_t nSize, bool bKeyFrame);
37  HRESULT AddFrameAudio(const void* pAudioData, size_t nSize);
38  // Other streams ? AddFrameX()
39  HRESULT CloseAV();
40 
41  void AttachAV(cAVSink* pAVSink) noexcept
42  {
43  m_pAVSink = pAVSink;
44  }
45  void DetachAV() noexcept
46  {
47  m_pAVSink = nullptr;
48  }
49 
51  };
52 };
53 
54 #endif // _INC_cAVBuilder_H
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
Definition: cAVBuilder.h:20
void AttachAV(cAVSink *pAVSink) noexcept
Definition: cAVBuilder.h:41
bool isOpen() const noexcept
Definition: cAVBuilder.h:30
UNITTEST_FRIEND(cAVBuilder)
void DetachAV() noexcept
Definition: cAVBuilder.h:45
Definition: cAVSink.h:130
Definition: cSurfaceInfo.h:308
Definition: cWaveFormat.h:73
Definition: cMesh.h:22
short AV_QUALITY_t
0 to 10000 e.g. 9900 = 99%. same as ICQUALITY_LOW,ICQUALITY_HIGH
Definition: cAVSink.h:21