2021-11-30 21:29:18 -06:00
|
|
|
#ifndef DATASTREAM_H
|
|
|
|
#define DATASTREAM_H
|
|
|
|
|
2022-02-06 10:14:57 -06:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <pl_mpeg.h>
|
2022-07-19 15:13:15 -05:00
|
|
|
|
|
|
|
struct soundstream;
|
2021-11-30 21:29:18 -06:00
|
|
|
|
|
|
|
struct datastream {
|
|
|
|
plm_t *plm;
|
|
|
|
struct mShader *shader;
|
|
|
|
double last_time;
|
|
|
|
int playing;
|
2022-02-06 10:14:57 -06:00
|
|
|
int audio_device;
|
2021-11-30 21:29:18 -06:00
|
|
|
uint32_t texture_y;
|
|
|
|
uint32_t texture_cb;
|
|
|
|
uint32_t texture_cr;
|
2022-07-19 15:13:15 -05:00
|
|
|
struct soundstream *astream;
|
2021-11-30 21:29:18 -06:00
|
|
|
};
|
|
|
|
|
2022-07-02 03:40:50 -05:00
|
|
|
struct Texture;
|
|
|
|
|
|
|
|
extern struct mShader *vid_shader;
|
|
|
|
|
2022-06-27 15:16:16 -05:00
|
|
|
struct datastream *MakeDatastream();
|
2022-07-02 03:40:50 -05:00
|
|
|
void ds_openvideo(struct datastream *ds, const char *path, const char *adriver);
|
|
|
|
struct Texture *ds_maketexture(struct datastream*);
|
|
|
|
void ds_advance(struct datastream *ds, double);
|
|
|
|
void ds_seek(struct datastream *ds, double);
|
2022-01-19 16:43:21 -06:00
|
|
|
void ds_advanceframes(struct datastream *ds, int frames);
|
2021-11-30 21:29:18 -06:00
|
|
|
void ds_pause(struct datastream *ds);
|
|
|
|
void ds_stop(struct datastream *ds);
|
|
|
|
int ds_videodone(struct datastream *ds);
|
|
|
|
double ds_remainingtime(struct datastream *ds);
|
2022-01-19 16:43:21 -06:00
|
|
|
double ds_length(struct datastream *ds);
|
2021-11-30 21:29:18 -06:00
|
|
|
|
|
|
|
#endif
|