diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-23 06:35:36 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-23 13:48:38 +0300 |
commit | f518cf7ea99e9282508f551ecb43892f6aabcbc4 (patch) | |
tree | 76c85c7cdbb4d1e10679faf86c4bf8336598d6bc /stream/stream.h | |
parent | 9e7dfe3fa34ca05fb63cd34369f7c847b777516d (diff) | |
download | mpv-f518cf7ea99e9282508f551ecb43892f6aabcbc4.tar.bz2 mpv-f518cf7ea99e9282508f551ecb43892f6aabcbc4.tar.xz |
Add option pointer to stream struct (at least temporarily)
The stream code does not access many option variables directly, but it
does access some such as audio_id and network_bandwidth (and does that
without including proper headers for them). Add option pointer to the
stream struct to allow access to those variables. Remove the unused
(always NULL) and clumsy-looking char** options parameter in the
open_stream call and replace it with the option pointer. The parameter
is currently only set in the main open_stream() call in MPlayer.c and
not in any other locations that can open a stream.
In the long term it might be better to pass a more limited set of
values somehow, but this should do for now.
Diffstat (limited to 'stream/stream.h')
-rw-r--r-- | stream/stream.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/stream/stream.h b/stream/stream.h index e53d0f971b..f7c8c018e7 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -112,6 +112,7 @@ typedef struct stream_st { void* cache_data; void* priv; // used for DVD, TV, RTSP etc char* url; // strdup() of filename/url + struct MPOpts *opts; #ifdef MPLAYER_NETWORK streaming_ctrl_t *streaming_ctrl; #endif @@ -288,14 +289,15 @@ inline static int stream_skip(stream_t *s,off_t len){ return 1; } +struct MPOpts; void stream_reset(stream_t *s); int stream_control(stream_t *s, int cmd, void *arg); stream_t* new_stream(int fd,int type); void free_stream(stream_t *s); stream_t* new_memory_stream(unsigned char* data,int len); -stream_t* open_stream(char* filename,char** options,int* file_format); -stream_t* open_stream_full(char* filename,int mode, char** options, int* file_format); -stream_t* open_output_stream(char* filename,char** options); +stream_t* open_stream(char* filename, struct MPOpts *options,int* file_format); +stream_t* open_stream_full(char* filename,int mode, struct MPOpts *options, int* file_format); +stream_t* open_output_stream(char* filename,struct MPOpts *options); /// Set the callback to be used by libstream to check for user /// interruption during long blocking operations (cache filling, etc). void stream_set_interrupt_callback(int (*cb)(int)); |