Mercurial > libavformat.hg
comparison aviobuf.c @ 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 | e89500ae1608 |
children | f51675f78402 |
comparison
equal
deleted
inserted
replaced
2838:6bea49ef18b1 | 2839:b51319dd86e5 |
---|---|
53 s->update_checksum= NULL; | 53 s->update_checksum= NULL; |
54 if(!read_packet && !write_flag){ | 54 if(!read_packet && !write_flag){ |
55 s->pos = buffer_size; | 55 s->pos = buffer_size; |
56 s->buf_end = s->buffer + buffer_size; | 56 s->buf_end = s->buffer + buffer_size; |
57 } | 57 } |
58 s->read_play = NULL; | |
59 s->read_pause = NULL; | 58 s->read_pause = NULL; |
60 s->read_seek = NULL; | 59 s->read_seek = NULL; |
61 return 0; | 60 return 0; |
62 } | 61 } |
63 | 62 |
530 return AVERROR(EIO); | 529 return AVERROR(EIO); |
531 } | 530 } |
532 (*s)->is_streamed = h->is_streamed; | 531 (*s)->is_streamed = h->is_streamed; |
533 (*s)->max_packet_size = max_packet_size; | 532 (*s)->max_packet_size = max_packet_size; |
534 if(h->prot) { | 533 if(h->prot) { |
535 (*s)->read_play = (int (*)(void *))h->prot->url_read_play; | 534 (*s)->read_pause = (int (*)(void *, int))h->prot->url_read_pause; |
536 (*s)->read_pause = (int (*)(void *))h->prot->url_read_pause; | |
537 (*s)->read_seek = (int (*)(void *, int, int64_t, int))h->prot->url_read_seek; | 535 (*s)->read_seek = (int (*)(void *, int, int64_t, int))h->prot->url_read_seek; |
538 } | 536 } |
539 return 0; | 537 return 0; |
540 } | 538 } |
541 | 539 |
639 int url_fget_max_packet_size(ByteIOContext *s) | 637 int url_fget_max_packet_size(ByteIOContext *s) |
640 { | 638 { |
641 return s->max_packet_size; | 639 return s->max_packet_size; |
642 } | 640 } |
643 | 641 |
644 int av_url_read_fplay(ByteIOContext *s) | 642 int av_url_read_fpause(ByteIOContext *s, int pause) |
645 { | |
646 if (!s->read_play) | |
647 return AVERROR(ENOSYS); | |
648 return s->read_play(s->opaque); | |
649 } | |
650 | |
651 int av_url_read_fpause(ByteIOContext *s) | |
652 { | 643 { |
653 if (!s->read_pause) | 644 if (!s->read_pause) |
654 return AVERROR(ENOSYS); | 645 return AVERROR(ENOSYS); |
655 return s->read_pause(s->opaque); | 646 return s->read_pause(s->opaque, pause); |
656 } | 647 } |
657 | 648 |
658 int av_url_read_fseek(ByteIOContext *s, | 649 int av_url_read_fseek(ByteIOContext *s, |
659 int stream_index, int64_t timestamp, int flags) | 650 int stream_index, int64_t timestamp, int flags) |
660 { | 651 { |