64
65
return this->status;
67
static int demux_image_send_chunk (demux_plugin_t *this_gen) {
68
static int demux_image_next (demux_plugin_t *this_gen, int preview) {
68
69
demux_image_t *this = (demux_image_t *) this_gen;
69
70
buf_element_t *buf = this->video_fifo->buffer_pool_alloc (this->video_fifo);
71
72
buf->content = buf->mem;
72
buf->type = BUF_VIDEO_IMAGE;
73
buf->type = this->buf_type;
74
75
buf->size = this->input->read (this->input, buf->mem, buf->max_size-1);
76
77
if (buf->size <= 0) {
77
buf->free_buffer(buf);
78
xine_usec_sleep(250000);
79
buf->decoder_flags |= BUF_FLAG_FRAME_END;
80
this->status = DEMUX_FINISHED;
80
lprintf("got %i bytes\n", buf->size);
81
this->video_fifo->put (this->video_fifo, buf);
82
this->status = DEMUX_OK;
83
this->status = DEMUX_OK;
86
buf->decoder_flags = BUF_FLAG_PREVIEW;
88
this->video_fifo->put (this->video_fifo, buf);
84
90
return this->status;
93
static int demux_image_send_chunk (demux_plugin_t *this_gen) {
94
return demux_image_next(this_gen, 0);
87
97
static void demux_image_send_headers (demux_plugin_t *this_gen) {
88
98
demux_image_t *this = (demux_image_t *) this_gen;
90
100
this->video_fifo = this->stream->video_fifo;
102
_x_demux_control_start(this->stream);
104
this->input->seek (this->input, 0, SEEK_SET);
106
/* we can send everything here. this makes image decoder a lot easier */
107
while (demux_image_next(this_gen,1) == DEMUX_OK);
92
109
this->status = DEMUX_OK;
94
111
_x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
95
112
_x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
97
this->input->seek (this->input, 0, SEEK_SET);
100
115
static int demux_image_seek (demux_plugin_t *this_gen,