mirror of
https://github.com/horgh/videostreamer.git
synced 2025-09-26 20:41:31 +08:00

This works for streaming mp4 from rtsp. But only to the first client as it is unable to recognize discrete frames correctly. It needs further work.
28 lines
502 B
C
28 lines
502 B
C
#ifndef _VIDEOSTREAMER_H
|
|
#define _VIDEOSTREAMER_H
|
|
|
|
#include <libavformat/avformat.h>
|
|
#include <stdbool.h>
|
|
|
|
struct Videostreamer {
|
|
AVFormatContext * input_format_ctx;
|
|
AVFormatContext * output_format_ctx;
|
|
int video_stream_index;
|
|
};
|
|
|
|
void
|
|
vs_setup(void);
|
|
|
|
struct Videostreamer *
|
|
vs_open(const char * const, const char * const,
|
|
const char * const, const char * const,
|
|
const bool);
|
|
|
|
void
|
|
vs_destroy(struct Videostreamer * const);
|
|
|
|
int
|
|
vs_read_write(const struct Videostreamer *, const bool);
|
|
|
|
#endif
|