Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef __LIVE_SOURCE_WITH_X264_H
- #define __LIVE_XOURCE_WITH_X264_H
- #include "x264Encoder.h"
- #include <iostream>
- #include <queue>
- #include <FramedSource.hh>
- #include <assert.h>
- #include "IRIS_EXT.h"
- using namespace std;
- class LiveSourceWithx264:public FramedSource
- {
- public:
- static LiveSourceWithx264* createNew(UsageEnvironment& env);
- static EventTriggerId eventTriggerId;
- char* rawImage;
- bool state_copy;
- protected:
- LiveSourceWithx264(UsageEnvironment& env);
- virtual ~LiveSourceWithx264(void);
- private:
- virtual void doGetNextFrame();
- static void deliverFrame0(void* clientData);
- void deliverFrame();
- void encodeNewFrame();
- static unsigned referenceCount;
- std::queue<x264_nal_t> nalQueue;
- timeval currentTime;
- // videoCaptureDevice is my BGR data source. You can have according to your need
- // Remember the x264 encoder wrapper we wrote in the start
- x264Encoder *encoder;
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement