Mercurial > mplayer.hg
view stheader.h @ 1347:448d1bf28f5a
Solaris 2.6 and older do not support MAP_ANON, just fail the mmap MAP_ANON
attempt on such a system. The code tries mmap with /dev/zero and MIT-shm next.
Fix a possible filedesc leak, when the code tries to mmap shared memeory via
/dev/zero. Reuse the already open /dev/zero from a previous shmem_alloc call.
(same change; now without changing the indentation of the code)
author | jkeil |
---|---|
date | Thu, 19 Jul 2001 20:32:13 +0000 |
parents | 3f490fad9bdf |
children | 7a2f1881b776 |
line wrap: on
line source
// Stream headers: /* typedef struct { int driver; // codec descriptor from codec.conf } codecinfo_t; */ typedef struct { demux_stream_t *ds; unsigned int format; codecs_t *codec; // output format: int samplerate; int samplesize; int channels; int o_bps; // == samplerate*samplesize*channels (uncompr. bytes/sec) int i_bps; // == bitrate (compressed bytes/sec) // in buffers: char* a_in_buffer; int a_in_buffer_len; int a_in_buffer_size; // out buffers: char* a_buffer; int a_buffer_len; int a_buffer_size; int sample_format; // win32 codec stuff: AVIStreamHeader audio; WAVEFORMATEX *wf; // char wf_ext[64]; // in format WAVEFORMATEX o_wf; // out format HACMSTREAM srcstream; // handle int audio_in_minsize; int audio_out_minsize; // other codecs: // ac3_frame_t *ac3_frame; void* ac3_frame; int pcm_bswap; } sh_audio_t; typedef struct { demux_stream_t *ds; unsigned int format; codecs_t *codec; // output format: float fps; float frametime; // 1/fps int disp_w,disp_h; // display size (filled by fileformat parser) // int coded_w,coded_h; // coded size (filled by video codec) unsigned int outfmtidx; // unsigned int bitrate; // buffers: char *our_out_buffer; // win32 codec stuff: AVIStreamHeader video; BITMAPINFOHEADER *bih; // in format BITMAPINFOHEADER o_bih; // out format HIC hic; // handle } sh_video_t; sh_audio_t* new_sh_audio(demuxer_t *demuxer,int id); sh_video_t* new_sh_video(demuxer_t *demuxer,int id);