summaryrefslogtreecommitdiffstats
path: root/stream/stream.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-02-02 18:24:27 +0100
committerwm4 <wm4@nowhere>2017-02-02 18:26:58 +0100
commitfb9a32977d6abf4c83a92d993af58e393819c062 (patch)
treedaa8fac391c393560588ce8653943a8259f59815 /stream/stream.h
parente13a62fc346867450cd41d02cffbdaf477a3fec4 (diff)
downloadmpv-fb9a32977d6abf4c83a92d993af58e393819c062.tar.bz2
mpv-fb9a32977d6abf4c83a92d993af58e393819c062.tar.xz
stream: get rid of streamtype enum
Because it's kind of dumb. (But not sure if it was worth the trouble.) For stream_file.c, we add new explicit fields. The rest are rather special uses and can be killed by comparing the stream impl. name. The changes to DVD/BD/CD/TV are entirely untested.
Diffstat (limited to 'stream/stream.h')
-rw-r--r--stream/stream.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/stream/stream.h b/stream/stream.h
index b6fcc3a6fa..cc47184ea6 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -28,20 +28,6 @@
#include "misc/bstr.h"
-enum streamtype {
- STREAMTYPE_GENERIC = 0,
- STREAMTYPE_FILE,
- STREAMTYPE_DIR,
- STREAMTYPE_DVB,
- STREAMTYPE_DVD,
- STREAMTYPE_BLURAY,
- STREAMTYPE_TV,
- STREAMTYPE_MF,
- STREAMTYPE_EDL,
- STREAMTYPE_AVDEVICE,
- STREAMTYPE_CDDA,
-};
-
#define STREAM_BUFFER_SIZE 2048
#define STREAM_MAX_SECTOR_SIZE (8 * 1024)
@@ -178,8 +164,6 @@ typedef struct stream {
// Close
void (*close)(struct stream *s);
- enum streamtype type; // see STREAMTYPE_*
- enum streamtype uncached_type; // if stream is cache, type of wrapped str.
int sector_size; // sector size (seek will be aligned on this size if non 0)
int read_chunk; // maximum amount of data to read at once to limit latency
unsigned int buf_pos, buf_len;
@@ -198,6 +182,8 @@ typedef struct stream {
bool is_network : 1; // original stream_info_t.is_network flag
bool allow_caching : 1; // stream cache makes sense
bool caching : 1; // is a cache, or accesses a cache
+ bool is_local_file : 1; // from the filesystem
+ bool is_directory : 1; // directory on the filesystem
bool access_references : 1; // open other streams
struct mp_log *log;
struct mpv_global *global;