forked from havlenapetr/FFMpeg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add decoder interface which must all decoders inherit
- Loading branch information
1 parent
69d00b3
commit 4479902
Showing
3 changed files
with
34 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef FFMPEG_DECODER_H | ||
#define FFMPEG_DECODER_H | ||
|
||
#include <pthread.h> | ||
|
||
// map system drivers methods | ||
#include <drivers_map.h> | ||
|
||
#include "packetqueue.h" | ||
|
||
class IDecoder | ||
{ | ||
public: | ||
virtual bool start(const char* err); | ||
virtual bool startAsync(const char* err); | ||
virtual int wait(); | ||
virtual void stop(); | ||
|
||
protected: | ||
PacketQueue* mQueue; | ||
AVCodecContext* mCodecCtx; | ||
bool mDecoding; | ||
pthread_t mThread; | ||
|
||
virtual bool prepare(const char *err); | ||
virtual bool decode(void* ptr); | ||
virtual bool process(AVPacket *packet); | ||
}; | ||
|
||
#endif //FFMPEG_DECODER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters