mirror of
https://github.com/mpv-player/mpv
synced 2025-03-30 22:09:20 +02:00
various: reduce the include scope of some public headers
This commit is contained in:
parent
b848ffad12
commit
77313f73a2
@ -1,6 +1,8 @@
|
||||
#include <stdatomic.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <libmpv/client.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "global.h"
|
||||
#include "misc/linked_list.h"
|
||||
|
@ -23,8 +23,6 @@
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <libmpv/client.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
|
@ -20,8 +20,6 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <libmpv/client.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
|
@ -15,8 +15,6 @@
|
||||
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libmpv/client.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
|
@ -28,6 +28,8 @@
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <libmpv/client.h>
|
||||
|
||||
#include "osdep/io.h"
|
||||
#include "misc/rendezvous.h"
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libmpv/client.h>
|
||||
|
||||
#include "common/msg.h"
|
||||
#include "input/input.h"
|
||||
#include "misc/json.h"
|
||||
|
@ -48,6 +48,8 @@
|
||||
#include <inttypes.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <libmpv/client.h>
|
||||
|
||||
#include "common/common.h"
|
||||
#include "misc/bstr.h"
|
||||
#include "misc/ctype.h"
|
||||
|
@ -18,12 +18,10 @@
|
||||
#ifndef MP_JSON_H
|
||||
#define MP_JSON_H
|
||||
|
||||
// We reuse mpv_node.
|
||||
#include "libmpv/client.h"
|
||||
|
||||
#define MAX_JSON_DEPTH 50
|
||||
|
||||
struct bstr;
|
||||
struct mpv_node;
|
||||
|
||||
int json_parse(void *ta_parent, struct mpv_node *dst, char **src, int max_depth);
|
||||
int json_append(struct bstr *b, const struct mpv_node *src, int indent);
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include "common/common.h"
|
||||
|
||||
#include "node.h"
|
||||
|
||||
#include <libmpv/client.h>
|
||||
|
||||
#include "common/common.h"
|
||||
#include "bstr.h"
|
||||
|
||||
// Init a node with the given format. If parent is not NULL, it is set as
|
||||
// parent allocation according to m_option_type_node rules (which means
|
||||
// the mpv_node_list allocs are used for chaining the TA allocations).
|
||||
@ -117,7 +120,7 @@ mpv_node *node_map_bget(mpv_node *src, struct bstr key)
|
||||
|
||||
// Note: for MPV_FORMAT_NODE_MAP, this (incorrectly) takes the order into
|
||||
// account, instead of treating it as set.
|
||||
bool equal_mpv_value(const void *a, const void *b, mpv_format format)
|
||||
bool equal_mpv_value(const void *a, const void *b, int format)
|
||||
{
|
||||
switch (format) {
|
||||
case MPV_FORMAT_NONE:
|
||||
|
15
misc/node.h
15
misc/node.h
@ -1,21 +1,24 @@
|
||||
#ifndef MP_MISC_NODE_H_
|
||||
#define MP_MISC_NODE_H_
|
||||
|
||||
#include "libmpv/client.h"
|
||||
#include "misc/bstr.h"
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct bstr;
|
||||
struct mpv_node;
|
||||
|
||||
void node_init(struct mpv_node *dst, int format, struct mpv_node *parent);
|
||||
struct mpv_node *node_array_add(struct mpv_node *dst, int format);
|
||||
struct mpv_node *node_map_add(struct mpv_node *dst, const char *key, int format);
|
||||
struct mpv_node *node_map_badd(struct mpv_node *dst, struct bstr key, int format);
|
||||
void node_map_add_string(struct mpv_node *dst, const char *key, const char *val);
|
||||
void node_map_add_bstr(struct mpv_node *dst, const char *key, bstr val);
|
||||
void node_map_add_bstr(struct mpv_node *dst, const char *key, struct bstr val);
|
||||
void node_map_add_int64(struct mpv_node *dst, const char *key, int64_t v);
|
||||
void node_map_add_double(struct mpv_node *dst, const char *key, double v);
|
||||
void node_map_add_flag(struct mpv_node *dst, const char *key, bool v);
|
||||
mpv_node *node_map_get(mpv_node *src, const char *key);
|
||||
mpv_node *node_map_bget(mpv_node *src, struct bstr key);
|
||||
bool equal_mpv_value(const void *a, const void *b, mpv_format format);
|
||||
struct mpv_node *node_map_get(struct mpv_node *src, const char *key);
|
||||
struct mpv_node *node_map_bget(struct mpv_node *src, struct bstr key);
|
||||
bool equal_mpv_value(const void *a, const void *b, int format);
|
||||
bool equal_mpv_node(const struct mpv_node *a, const struct mpv_node *b);
|
||||
|
||||
#endif
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "libmpv/client.h"
|
||||
#include "libmpv/stream_cb.h"
|
||||
#include "misc/bstr.h"
|
||||
|
||||
|
@ -21,8 +21,6 @@
|
||||
#include <stdatomic.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "libmpv/client.h"
|
||||
|
||||
#include "audio/aframe.h"
|
||||
#include "clipboard/clipboard.h"
|
||||
#include "common/common.h"
|
||||
|
@ -60,7 +60,6 @@
|
||||
|
||||
#include "core.h"
|
||||
#include "command.h"
|
||||
#include "libmpv/client.h"
|
||||
|
||||
// Called from the demuxer thread if a new packet is available, or other changes.
|
||||
static void wakeup_demux(void *pctx)
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include <libmpv/client.h>
|
||||
|
||||
#include "misc/json.h"
|
||||
#include "misc/node.h"
|
||||
#include "test_utils.h"
|
||||
|
@ -16,13 +16,14 @@
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <libmpv/client.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libmpv/client.h>
|
||||
|
||||
// Stolen from osdep/compiler.h
|
||||
#ifdef __GNUC__
|
||||
#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format(printf, a1, a2)))
|
||||
|
@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <libmpv/client.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -29,6 +28,8 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <libmpv/client.h>
|
||||
|
||||
// Stolen from osdep/compiler.h
|
||||
#ifdef __GNUC__
|
||||
#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format(printf, a1, a2)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user