| 123456789101112131415161718192021222324252627282930 |
- #ifndef __DECODER_H__
- #define __DECODER_H__
- #include <stdint.h>
- typedef struct Decoder Decoder;
- typedef struct {
- int fd;
- int width;
- int height;
- int hor_stride;
- int ver_stride;
- int idx;
- int64_t pts;
- } DecodedFrame;
- Decoder *decoder_create(const char *url, int timeout_sec);
- void decoder_destroy(Decoder *dec);
- int decoder_get_codec(Decoder *dec);
- int decoder_get_width(Decoder *dec);
- int decoder_get_height(Decoder *dec);
- int decoder_get_stride(Decoder *dec);
- int decoder_get_frame(Decoder *dec, DecodedFrame *frame);
- int decoder_release_frame(Decoder *dec, int idx);
- int decoder_flush(Decoder *dec);
- #endif
|