comparison avio.h @ 2839:b51319dd86e5 libavformat

Merge recently added and still unused play and pause functions.
author michael
date Wed, 19 Dec 2007 20:57:13 +0000
parents 63fda6ba2173
children f51675f78402
comparison
equal deleted inserted replaced
2838:6bea49ef18b1 2839:b51319dd86e5
80 void url_set_interrupt_cb(URLInterruptCB *interrupt_cb); 80 void url_set_interrupt_cb(URLInterruptCB *interrupt_cb);
81 81
82 /* not implemented */ 82 /* not implemented */
83 int url_poll(URLPollEntry *poll_table, int n, int timeout); 83 int url_poll(URLPollEntry *poll_table, int n, int timeout);
84 84
85 /** Start playing or resume paused playout. Only meaningful if using a network 85 /**
86 * streaming protocol (e.g. MMS). */ 86 * Pause and resume playing - only meaningful if using a network streaming
87 int av_url_read_play(URLContext *h); 87 * protocol (e.g. MMS).
88 /** Pause playing - only meaningful if using a network streaming protocol 88 * @param pause 1 for pause, 0 for resume
89 * (e.g. MMS). */ 89 */
90 int av_url_read_pause(URLContext *h); 90 int av_url_read_pause(URLContext *h, int pause);
91 /** 91 /**
92 * Seek to a given timestamp relative to some component stream. 92 * Seek to a given timestamp relative to some component stream.
93 * Only meaningful if using a network streaming protocol (e.g. MMS.) 93 * Only meaningful if using a network streaming protocol (e.g. MMS.)
94 * @param stream_index The stream index that the timestamp is relative to. 94 * @param stream_index The stream index that the timestamp is relative to.
95 * If stream_index is (-1) the timestamp should be in AV_TIME_BASE 95 * If stream_index is (-1) the timestamp should be in AV_TIME_BASE
121 int (*url_read)(URLContext *h, unsigned char *buf, int size); 121 int (*url_read)(URLContext *h, unsigned char *buf, int size);
122 int (*url_write)(URLContext *h, unsigned char *buf, int size); 122 int (*url_write)(URLContext *h, unsigned char *buf, int size);
123 offset_t (*url_seek)(URLContext *h, offset_t pos, int whence); 123 offset_t (*url_seek)(URLContext *h, offset_t pos, int whence);
124 int (*url_close)(URLContext *h); 124 int (*url_close)(URLContext *h);
125 struct URLProtocol *next; 125 struct URLProtocol *next;
126 int (*url_read_play)(URLContext *h); 126 int (*url_read_pause)(URLContext *h, int pause);
127 int (*url_read_pause)(URLContext *h);
128 int (*url_read_seek)(URLContext *h, 127 int (*url_read_seek)(URLContext *h,
129 int stream_index, int64_t timestamp, int flags); 128 int stream_index, int64_t timestamp, int flags);
130 } URLProtocol; 129 } URLProtocol;
131 130
132 extern URLProtocol *first_protocol; 131 extern URLProtocol *first_protocol;
152 int max_packet_size; 151 int max_packet_size;
153 unsigned long checksum; 152 unsigned long checksum;
154 unsigned char *checksum_ptr; 153 unsigned char *checksum_ptr;
155 unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size); 154 unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size);
156 int error; ///< contains the error code or 0 if no error happened 155 int error; ///< contains the error code or 0 if no error happened
157 int (*read_play)(void *opaque); 156 int (*read_pause)(void *opaque, int pause);
158 int (*read_pause)(void *opaque);
159 int (*read_seek)(void *opaque, 157 int (*read_seek)(void *opaque,
160 int stream_index, int64_t timestamp, int flags); 158 int stream_index, int64_t timestamp, int flags);
161 } ByteIOContext; 159 } ByteIOContext;
162 160
163 int init_put_byte(ByteIOContext *s, 161 int init_put_byte(ByteIOContext *s,
188 offset_t url_ftell(ByteIOContext *s); 186 offset_t url_ftell(ByteIOContext *s);
189 offset_t url_fsize(ByteIOContext *s); 187 offset_t url_fsize(ByteIOContext *s);
190 int url_feof(ByteIOContext *s); 188 int url_feof(ByteIOContext *s);
191 int url_ferror(ByteIOContext *s); 189 int url_ferror(ByteIOContext *s);
192 190
193 int av_url_read_fplay(ByteIOContext *h); 191 int av_url_read_fpause(ByteIOContext *h, int pause);
194 int av_url_read_fpause(ByteIOContext *h);
195 int av_url_read_fseek(ByteIOContext *h, 192 int av_url_read_fseek(ByteIOContext *h,
196 int stream_index, int64_t timestamp, int flags); 193 int stream_index, int64_t timestamp, int flags);
197 194
198 #define URL_EOF (-1) 195 #define URL_EOF (-1)
199 /** @note return URL_EOF (-1) if EOF */ 196 /** @note return URL_EOF (-1) if EOF */