mirror of https://github.com/mpv-player/mpv
demux: minor cleanups
This commit is contained in:
parent
2224ac5190
commit
0208ad4f3b
|
@ -1,6 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* DEMUXER v2.5
|
|
||||||
*
|
|
||||||
* This file is part of MPlayer.
|
* This file is part of MPlayer.
|
||||||
*
|
*
|
||||||
* MPlayer is free software; you can redistribute it and/or modify
|
* MPlayer is free software; you can redistribute it and/or modify
|
||||||
|
@ -17,7 +15,6 @@
|
||||||
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
|
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
#define DEMUX_PRIV(x) x
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -80,9 +77,6 @@ const demuxer_desc_t *const demuxer_list[] = {
|
||||||
&demuxer_desc_playlist,
|
&demuxer_desc_playlist,
|
||||||
// Pretty aggressive, so should be last.
|
// Pretty aggressive, so should be last.
|
||||||
&demuxer_desc_subreader,
|
&demuxer_desc_subreader,
|
||||||
/* Please do not add any new demuxers here. If you want to implement a new
|
|
||||||
* demuxer, add it to libavformat, except for wrappers around external
|
|
||||||
* libraries and demuxers requiring binary support. */
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -227,10 +227,6 @@ void demux_packet_shorten(struct demux_packet *dp, size_t len);
|
||||||
void free_demux_packet(struct demux_packet *dp);
|
void free_demux_packet(struct demux_packet *dp);
|
||||||
struct demux_packet *demux_copy_packet(struct demux_packet *dp);
|
struct demux_packet *demux_copy_packet(struct demux_packet *dp);
|
||||||
|
|
||||||
#ifndef SIZE_MAX
|
|
||||||
#define SIZE_MAX ((size_t)-1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void free_demuxer(struct demuxer *demuxer);
|
void free_demuxer(struct demuxer *demuxer);
|
||||||
|
|
||||||
int demuxer_add_packet(demuxer_t *demuxer, struct sh_stream *stream,
|
int demuxer_add_packet(demuxer_t *demuxer, struct sh_stream *stream,
|
||||||
|
|
|
@ -37,10 +37,6 @@
|
||||||
#include "compat/mpbswap.h"
|
#include "compat/mpbswap.h"
|
||||||
#include "common/msg.h"
|
#include "common/msg.h"
|
||||||
|
|
||||||
#ifndef SIZE_MAX
|
|
||||||
#define SIZE_MAX ((size_t)-1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Whether the id is a known Matroska level 1 element (allowed as element on
|
// Whether the id is a known Matroska level 1 element (allowed as element on
|
||||||
// global file level, after the level 0 MATROSKA_ID_SEGMENT).
|
// global file level, after the level 0 MATROSKA_ID_SEGMENT).
|
||||||
// This (intentionally) doesn't include "global" elements.
|
// This (intentionally) doesn't include "global" elements.
|
||||||
|
|
12
demux/ebml.h
12
demux/ebml.h
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
struct mp_log;
|
struct mp_log;
|
||||||
|
|
||||||
|
|
||||||
/* EBML version supported */
|
/* EBML version supported */
|
||||||
#define EBML_VERSION 1
|
#define EBML_VERSION 1
|
||||||
|
|
||||||
|
@ -69,7 +68,6 @@ struct ebml_parse_ctx {
|
||||||
|
|
||||||
#define EBML_ID_INVALID 0xffffffff
|
#define EBML_ID_INVALID 0xffffffff
|
||||||
|
|
||||||
|
|
||||||
/* matroska track types */
|
/* matroska track types */
|
||||||
#define MATROSKA_TRACK_VIDEO 0x01 /* rectangle-shaped pictures aka video */
|
#define MATROSKA_TRACK_VIDEO 0x01 /* rectangle-shaped pictures aka video */
|
||||||
#define MATROSKA_TRACK_AUDIO 0x02 /* anything you can hear */
|
#define MATROSKA_TRACK_AUDIO 0x02 /* anything you can hear */
|
||||||
|
@ -78,18 +76,8 @@ struct ebml_parse_ctx {
|
||||||
#define MATROSKA_TRACK_SUBTITLE 0x11 /* text-subtitles */
|
#define MATROSKA_TRACK_SUBTITLE 0x11 /* text-subtitles */
|
||||||
#define MATROSKA_TRACK_CONTROL 0x20 /* control-codes for menu or other stuff*/
|
#define MATROSKA_TRACK_CONTROL 0x20 /* control-codes for menu or other stuff*/
|
||||||
|
|
||||||
#ifndef UINT64_MAX
|
|
||||||
#define UINT64_MAX 18446744073709551615ULL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef INT64_MAX
|
|
||||||
#define INT64_MAX 9223372036854775807LL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define EBML_UINT_INVALID UINT64_MAX
|
#define EBML_UINT_INVALID UINT64_MAX
|
||||||
#define EBML_INT_INVALID INT64_MAX
|
#define EBML_INT_INVALID INT64_MAX
|
||||||
#define EBML_FLOAT_INVALID -1000000000.0
|
|
||||||
|
|
||||||
|
|
||||||
bool ebml_is_mkv_level1_id(uint32_t id);
|
bool ebml_is_mkv_level1_id(uint32_t id);
|
||||||
uint32_t ebml_read_id (stream_t *s);
|
uint32_t ebml_read_id (stream_t *s);
|
||||||
|
|
Loading…
Reference in New Issue