mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-01-17 12:44:28 +01:00
Improved manually with the help of neovim LSP warnings and iwyu:
iwyu -Ibuilddir/app/ -Iapp/src/ app/src/XXX.c
44 lines
951 B
C
44 lines
951 B
C
#ifndef SC_PACKET_SOURCE_H
|
|
#define SC_PACKET_SOURCE_H
|
|
|
|
#include "common.h"
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "trait/packet_sink.h"
|
|
|
|
#define SC_PACKET_SOURCE_MAX_SINKS 2
|
|
|
|
/**
|
|
* Packet source trait
|
|
*
|
|
* Component able to send AVPackets should implement this trait.
|
|
*/
|
|
struct sc_packet_source {
|
|
struct sc_packet_sink *sinks[SC_PACKET_SOURCE_MAX_SINKS];
|
|
unsigned sink_count;
|
|
};
|
|
|
|
void
|
|
sc_packet_source_init(struct sc_packet_source *source);
|
|
|
|
void
|
|
sc_packet_source_add_sink(struct sc_packet_source *source,
|
|
struct sc_packet_sink *sink);
|
|
|
|
bool
|
|
sc_packet_source_sinks_open(struct sc_packet_source *source,
|
|
AVCodecContext *ctx);
|
|
|
|
void
|
|
sc_packet_source_sinks_close(struct sc_packet_source *source);
|
|
|
|
bool
|
|
sc_packet_source_sinks_push(struct sc_packet_source *source,
|
|
const AVPacket *packet);
|
|
|
|
void
|
|
sc_packet_source_sinks_disable(struct sc_packet_source *source);
|
|
|
|
#endif
|