1
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 07:33:46 +01:00

Finally rename the STREAM_SEEK define to MP_STREAM_SEEK, there are just too many

name clashes, in particular with Windows headers (which define STREAM_SEEK as an enum type).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29962 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-11-22 15:18:21 +00:00
parent 302527a111
commit af2988cbce
14 changed files with 23 additions and 23 deletions

View File

@ -346,7 +346,7 @@ static int demux_audio_open(demuxer_t* demuxer) {
sh_audio->i_bps = sh_audio->wf->nAvgBytesPerSec;
free(mp3_found);
mp3_found = NULL;
if(s->end_pos && (s->flags & STREAM_SEEK) == STREAM_SEEK) {
if(s->end_pos && (s->flags & MP_STREAM_SEEK) == MP_STREAM_SEEK) {
char tag[4];
stream_seek(s,s->end_pos-128);
stream_read(s,tag,3);

View File

@ -237,7 +237,7 @@ do{
}
pos = (off_t)priv->idx_offset+AVI_IDX_OFFSET(idx);
if((pos<demux->movi_start || pos>=demux->movi_end) && (demux->movi_end>demux->movi_start) && (demux->stream->flags & STREAM_SEEK)){
if((pos<demux->movi_start || pos>=demux->movi_end) && (demux->movi_end>demux->movi_start) && (demux->stream->flags & MP_STREAM_SEEK)){
mp_msg(MSGT_DEMUX,MSGL_V,"ChunkOffset out of range! idx=0x%"PRIX64" \n",(int64_t)pos);
continue;
}
@ -262,7 +262,7 @@ do{
if(!(idx->dwFlags&AVIIF_KEYFRAME)) flags=0;
} else {
demux->filepos=stream_tell(demux->stream);
if(demux->filepos>=demux->movi_end && demux->movi_end>demux->movi_start && (demux->stream->flags & STREAM_SEEK)){
if(demux->filepos>=demux->movi_end && demux->movi_end>demux->movi_start && (demux->stream->flags & MP_STREAM_SEEK)){
demux->stream->eof=1;
return 0;
}
@ -442,7 +442,7 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){
demuxer->priv=(void*)priv;
//---- AVI header:
read_avi_header(demuxer,(demuxer->stream->flags & STREAM_SEEK_BW)?index_mode:-2);
read_avi_header(demuxer,(demuxer->stream->flags & MP_STREAM_SEEK_BW)?index_mode:-2);
if(demuxer->audio->id>=0 && !demuxer->a_streams[demuxer->audio->id]){
mp_msg(MSGT_DEMUX,MSGL_WARN,MSGTR_InvalidAudioStreamNosound,demuxer->audio->id);

View File

@ -465,7 +465,7 @@ static demuxer_t* demux_open_lavf(demuxer_t *demuxer){
priv->pb = av_alloc_put_byte(priv->buffer, BIO_BUFFER_SIZE, 0,
demuxer->stream, mp_read, NULL, mp_seek);
priv->pb->is_streamed = !demuxer->stream->end_pos || (demuxer->stream->flags & STREAM_SEEK) != STREAM_SEEK;
priv->pb->is_streamed = !demuxer->stream->end_pos || (demuxer->stream->flags & MP_STREAM_SEEK) != MP_STREAM_SEEK;
if(av_open_input_stream(&avfc, priv->pb, mp_filename, priv->avif, &ap)<0){
mp_msg(MSGT_HEADER,MSGL_ERR,"LAVF_header: av_open_input_stream() failed\n");

View File

@ -391,7 +391,7 @@ int muxer_init_muxer_lavf(muxer_t *muxer)
}
priv->oc->pb = av_alloc_put_byte(priv->buffer, BIO_BUFFER_SIZE, 1, muxer, NULL, mp_write, mp_seek);
if ((muxer->stream->flags & STREAM_SEEK) != STREAM_SEEK)
if ((muxer->stream->flags & MP_STREAM_SEEK) != MP_STREAM_SEEK)
priv->oc->pb->is_streamed = 1;
muxer->priv = (void *) priv;

View File

@ -891,7 +891,7 @@ static int fixup_open(stream_t *stream,int seekable) {
stream->type = STREAMTYPE_STREAM;
if(!is_icy && !is_ultravox && seekable)
{
stream->flags |= STREAM_SEEK;
stream->flags |= MP_STREAM_SEEK;
stream->seek = http_seek;
}
stream->streaming_ctrl->bandwidth = network_bandwidth;

View File

@ -174,10 +174,10 @@ stream_t* open_stream_plugin(const stream_info_t* sinfo,char* filename,int mode,
}
if(s->type <= -2)
mp_msg(MSGT_OPEN,MSGL_WARN, "Warning streams need a type !!!!\n");
if(s->flags & STREAM_SEEK && !s->seek)
s->flags &= ~STREAM_SEEK;
if(s->seek && !(s->flags & STREAM_SEEK))
s->flags |= STREAM_SEEK;
if(s->flags & MP_STREAM_SEEK && !s->seek)
s->flags &= ~MP_STREAM_SEEK;
if(s->seek && !(s->flags & MP_STREAM_SEEK))
s->flags |= MP_STREAM_SEEK;
s->mode = mode;

View File

@ -37,10 +37,10 @@
#define STREAM_READ 0
#define STREAM_WRITE 1
/// Seek flags, if not mannualy set and s->seek isn't NULL
/// STREAM_SEEK is automaticly set
#define STREAM_SEEK_BW 2
#define STREAM_SEEK_FW 4
#define STREAM_SEEK (STREAM_SEEK_BW|STREAM_SEEK_FW)
/// MP_STREAM_SEEK is automaticly set
#define MP_STREAM_SEEK_BW 2
#define MP_STREAM_SEEK_FW 4
#define MP_STREAM_SEEK (MP_STREAM_SEEK_BW|MP_STREAM_SEEK_FW)
/** This is a HACK for live555 that does not respect the
separation between stream an demuxer and thus is not
actually a stream cache can not be used */
@ -276,7 +276,7 @@ inline static int stream_seek(stream_t *s,off_t pos){
}
inline static int stream_skip(stream_t *s,off_t len){
if( (len<0 && (s->flags & STREAM_SEEK_BW)) || (len>2*STREAM_BUFFER_SIZE && (s->flags & STREAM_SEEK_FW)) ) {
if( (len<0 && (s->flags & MP_STREAM_SEEK_BW)) || (len>2*STREAM_BUFFER_SIZE && (s->flags & MP_STREAM_SEEK_FW)) ) {
// negative or big skip!
return stream_seek(s,stream_tell(s)+len);
}

View File

@ -578,7 +578,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
stream->fd = f;
stream->type = STREAMTYPE_VCDBINCUE;
stream->sector_size = VCD_SECTOR_DATA;
stream->flags = STREAM_READ | STREAM_SEEK_FW;
stream->flags = STREAM_READ | MP_STREAM_SEEK_FW;
stream->start_pos = ret;
stream->end_pos = ret2;
stream->fill_buffer = cue_vcd_read;

View File

@ -978,7 +978,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
// return NULL;
stream->type = STREAMTYPE_DVD;
stream->sector_size = 2048;
stream->flags = STREAM_READ | STREAM_SEEK;
stream->flags = STREAM_READ | MP_STREAM_SEEK;
stream->fill_buffer = fill_buffer;
stream->seek = seek;
stream->control = control;

View File

@ -596,7 +596,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
dvdnav_angle_change(priv->dvdnav, dvd_angle);
stream->sector_size = 2048;
stream->flags = STREAM_READ | STREAM_SEEK;
stream->flags = STREAM_READ | MP_STREAM_SEEK;
stream->fill_buffer = fill_buffer;
stream->seek = seek;
stream->control = control;

View File

@ -159,7 +159,7 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
#endif
if(mode == STREAM_READ) stream->seek = seek_forward;
stream->type = STREAMTYPE_STREAM; // Must be move to STREAMTYPE_FILE
stream->flags |= STREAM_SEEK_FW;
stream->flags |= MP_STREAM_SEEK_FW;
} else if(len >= 0) {
stream->seek = seek;
stream->end_pos = len;

View File

@ -279,7 +279,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
stream->fill_buffer = fill_buffer;
stream->control = control;
if(stream->flags & STREAM_SEEK)
if(stream->flags & MP_STREAM_SEEK)
stream->seek = seek;
stream->close = close_s;

View File

@ -138,7 +138,7 @@ static int open_f (stream_t *stream, int mode, void *opts, int* file_format) {
smbc_lseek (fd, 0, SEEK_SET);
}
if(len > 0 || mode == STREAM_WRITE) {
stream->flags |= STREAM_SEEK;
stream->flags |= MP_STREAM_SEEK;
stream->seek = seek;
if(mode == STREAM_READ) stream->end_pos = len;
}

View File

@ -1085,7 +1085,7 @@ void subcp_open (stream_t *st)
char enca_lang[3], enca_fallback[100];
if (sscanf(sub_cp, "enca:%2s:%99s", enca_lang, enca_fallback) == 2
|| sscanf(sub_cp, "ENCA:%2s:%99s", enca_lang, enca_fallback) == 2) {
if (st && st->flags & STREAM_SEEK ) {
if (st && st->flags & MP_STREAM_SEEK ) {
cp_tmp = guess_cp(st, enca_lang, enca_fallback);
} else {
cp_tmp = enca_fallback;