6 return zmpeg3_t::zmajor();
12 return zmpeg3_t::zminor();
18 return zmpeg3_t::zrelease();
22 mpeg3_check_sig(char *path)
24 return zmpeg3_t::check_sig(path);
28 mpeg3_open(const char *path, int *error_return)
30 zmpeg3_t *src = new zmpeg3_t(path, *error_return);
31 if( *error_return ) { delete src; src = 0; }
36 mpeg3_open_title(const char *title_path, const char *path, int *error_return)
38 zmpeg3_t *src = new zmpeg3_t(path, *error_return, ZIO_UNBUFFERED, title_path);
39 if( *error_return ) { delete src; src = 0; }
44 mpeg3_zopen(const char *title_path, const char *path, int *error_return, int access)
46 zmpeg3_t *src = new zmpeg3_t(path, *error_return, access, title_path);
47 if( *error_return ) { delete src; src = 0; }
52 mpeg3_close(zmpeg3_t *zsrc)
59 mpeg3_open_copy(const char *path, zmpeg3_t *old_src, int *error_return)
65 mpeg3_set_pts_padding(zmpeg3_t *zsrc, int v)
67 return zsrc->set_pts_padding(v);
71 mpeg3_set_cpus(zmpeg3_t *zsrc, int cpus)
73 return zsrc->set_cpus(cpus);
77 mpeg3_has_audio(zmpeg3_t *zsrc)
79 return zsrc->has_audio();
84 mpeg3_total_astreams(zmpeg3_t *zsrc)
86 return zsrc->total_astreams();
91 mpeg3_audio_channels(zmpeg3_t *zsrc, int stream)
93 return zsrc->audio_channels(stream);
98 mpeg3_sample_rate(zmpeg3_t *zsrc, int stream)
100 return zsrc->sample_rate(stream);
104 extern "C" const char *
105 mpeg3_audio_format(zmpeg3_t *zsrc, int stream)
107 return zsrc->audio_format(stream);
111 mpeg3_get_audio_nudge(zmpeg3_t *zsrc, int stream)
113 return zsrc->audio_nudge(stream);
117 mpeg3_audio_samples(zmpeg3_t *zsrc, int stream)
119 return zsrc->audio_samples(stream);
124 mpeg3_set_sample(zmpeg3_t *zsrc, long sample, int stream)
126 return zsrc->set_sample(sample, stream);
130 mpeg3_get_sample(zmpeg3_t *zsrc, int stream)
132 return zsrc->get_sample(stream);
136 mpeg3_read_audio_d(zmpeg3_t *zsrc,double *output_d,
137 int channel, long samples, int stream)
139 return zsrc->read_audio(output_d, channel, samples, stream);
143 mpeg3_read_audio_f(zmpeg3_t *zsrc,float *output_f,
144 int channel, long samples, int stream)
146 return zsrc->read_audio(output_f, channel, samples, stream);
150 mpeg3_read_audio_i(zmpeg3_t *zsrc,int *output_i,
151 int channel, long samples, int stream)
153 return zsrc->read_audio(output_i, channel, samples, stream);
157 mpeg3_read_audio_s(zmpeg3_t *zsrc,short *output_s,
158 int channel, long samples, int stream)
160 return zsrc->read_audio(output_s, channel, samples, stream);
164 mpeg3_read_audio(zmpeg3_t *zsrc,float *output_f, short *output_i,
165 int channel, long samples, int stream)
168 return zsrc->read_audio(output_f, channel, samples, stream);
170 return zsrc->read_audio(output_i, channel, samples, stream);
175 mpeg3_reread_audio(zmpeg3_t *zsrc,float *output_f, short *output_i,
176 int channel, long samples, int stream)
179 return zsrc->reread_audio(output_f, channel, samples, stream);
181 return zsrc->reread_audio(output_i, channel, samples, stream);
186 mpeg3_reread_audio_d(zmpeg3_t *zsrc,double *output_d,
187 int channel, long samples, int stream)
189 return zsrc->reread_audio(output_d, channel, samples, stream);
193 mpeg3_reread_audio_f(zmpeg3_t *zsrc,float *output_f,
194 int channel, long samples, int stream)
196 return zsrc->reread_audio(output_f, channel, samples, stream);
200 mpeg3_reread_audio_i(zmpeg3_t *zsrc,int *output_i,
201 int channel, long samples, int stream)
203 return zsrc->reread_audio(output_i, channel, samples, stream);
207 mpeg3_reread_audio_s(zmpeg3_t *zsrc,short *output_s,
208 int channel, long samples, int stream)
210 return zsrc->reread_audio(output_s, channel, samples, stream);
214 mpeg3_read_audio_chunk(zmpeg3_t *zsrc,unsigned char *output,
215 long *size, long max_size, int stream)
217 return zsrc->read_audio_chunk(output, size, max_size, stream);
221 mpeg3_has_video(zmpeg3_t *zsrc)
223 return zsrc->has_video();
227 mpeg3_total_vstreams(zmpeg3_t *zsrc)
229 return zsrc->total_vstreams();
233 mpeg3_video_width(zmpeg3_t *zsrc, int stream)
235 return zsrc->video_width(stream);
239 mpeg3_video_height(zmpeg3_t *zsrc, int stream)
241 return zsrc->video_height(stream);
245 mpeg3_coded_width(zmpeg3_t *zsrc, int stream)
247 return zsrc->coded_width(stream);
251 mpeg3_coded_height(zmpeg3_t *zsrc, int stream)
253 return zsrc->coded_height(stream);
257 mpeg3_video_pid(zmpeg3_t *zsrc, int stream)
259 return zsrc->video_pid(stream);
263 mpeg3_aspect_ratio(zmpeg3_t *zsrc, int stream)
265 return zsrc->aspect_ratio(stream);
269 mpeg3_frame_rate(zmpeg3_t *zsrc, int stream)
271 return zsrc->frame_rate(stream);
275 mpeg3_video_frames(zmpeg3_t *zsrc, int stream)
277 return zsrc->video_frames(stream);
282 mpeg3_set_frame(zmpeg3_t *zsrc, long frame, int stream)
284 return zsrc->set_frame(frame, stream);
289 mpeg3_skip_frames(zmpeg3_t *zsrc)
291 return zsrc->skip_frames();
296 mpeg3_get_frame(zmpeg3_t *zsrc, int stream)
298 return zsrc->get_frame(stream);
302 mpeg3_get_bytes(zmpeg3_t *zsrc)
304 return zsrc->get_bytes();
308 mpeg3_seek_byte(zmpeg3_t *zsrc, int64_t byte)
310 return zsrc->seek_byte(byte);
315 mpeg3_tell_byte(zmpeg3_t *zsrc)
317 return zsrc->tell_byte();
321 mpeg3_previous_frame(zmpeg3_t *zsrc, int stream)
323 return zsrc->previous_frame(stream);
328 mpeg3_end_of_audio(zmpeg3_t *zsrc, int stream)
330 return zsrc->end_of_audio(stream);
335 mpeg3_end_of_video(zmpeg3_t *zsrc, int stream)
337 return zsrc->end_of_video(stream);
341 mpeg3_get_time(zmpeg3_t *zsrc)
343 return zsrc->get_time();
347 mpeg3_get_audio_time(zmpeg3_t* zsrc, int stream)
349 return zsrc->get_audio_time(stream);
353 mpeg3_get_cell_time(zmpeg3_t *zsrc, int no, double *time)
355 return zsrc->get_cell_time(no, *time);
359 mpeg3_get_video_time(zmpeg3_t* zsrc, int stream)
361 return zsrc->get_video_time(stream);
365 mpeg3_read_frame(zmpeg3_t *zsrc, unsigned char **output_rows,
366 int in_x, int in_y, int in_w, int in_h,
367 int out_w, int out_h, int color_model, int stream)
369 return zsrc->read_frame(output_rows, in_x, in_y, in_w, in_h,
370 out_w, out_h, color_model, stream);
374 mpeg3_colormodel(zmpeg3_t *zsrc, int stream)
376 return zsrc->colormodel(stream);
380 mpeg3_set_rowspan(zmpeg3_t *zsrc, int bytes, int stream)
382 return zsrc->set_rowspan(bytes, stream);
386 mpeg3_read_yuvframe(zmpeg3_t *zsrc,
387 char *y_output, char *u_output, char *v_output,
388 int in_x, int in_y, int in_w, int in_h, int stream)
390 return zsrc->read_yuvframe(y_output, u_output, v_output,
391 in_x, in_y, in_w, in_h, stream);
395 mpeg3_read_yuvframe_ptr(zmpeg3_t *zsrc,
396 char **y_output, char **u_output, char **v_output, int stream)
398 return zsrc->read_yuvframe_ptr(y_output, u_output, v_output, stream);
402 mpeg3_drop_frames(zmpeg3_t *zsrc, long frames, int stream)
404 return zsrc->drop_frames(frames, stream);
408 mpeg3_read_video_chunk(zmpeg3_t *zsrc, unsigned char *output,
409 long *size, long max_size, int stream)
411 return zsrc->read_video_chunk(output, size, max_size, stream);
415 mpeg3_get_total_vts_titles(zmpeg3_t *zsrc)
417 return zsrc->get_total_vts_titles();
421 mpeg3_set_vts_title(zmpeg3_t *zsrc,int title)
423 return zsrc->set_vts_title(title);
427 mpeg3_get_total_interleaves(zmpeg3_t *zsrc)
429 return zsrc->get_total_interleaves();
433 mpeg3_set_interleave(zmpeg3_t *zsrc,int no)
435 return zsrc->set_interleave(no);
439 mpeg3_set_angle(zmpeg3_t *zsrc,int a)
441 return zsrc->set_angle(a);
445 mpeg3_set_program(zmpeg3_t *zsrc,int no)
447 return zsrc->set_program(no);
451 mpeg3_memory_usage(zmpeg3_t *zsrc)
453 return zsrc->memory_usage();
457 mpeg3_get_thumbnail(zmpeg3_t *zsrc,
458 int trk, int64_t *frn, uint8_t **t, int *w, int *h)
460 return zsrc->get_thumbnail(trk, *frn, *t, *w, *h);
464 mpeg3_set_thumbnail_callback(zmpeg3_t *zsrc, int trk,
465 int skim, int thumb, zthumbnail_cb fn, void *p)
467 return zsrc->set_thumbnail_callback(trk, skim, thumb, fn, p);
471 mpeg3_set_cc_text_callback(zmpeg3_t *zsrc, int trk, zcc_text_cb fn)
473 return zsrc->set_cc_text_callback(trk, fn);
477 mpeg3_subtitle_tracks(zmpeg3_t *zsrc)
479 return zsrc->subtitle_tracks();
483 mpeg3_show_subtitle(zmpeg3_t *zsrc, int vtrk, int strk)
485 return zsrc->show_subtitle(vtrk, strk);
489 mpeg3_display_subtitle(zmpeg3_t *zsrc, int stream, int sid, int id,
490 uint8_t *yp, uint8_t *up, uint8_t *vp, uint8_t *ap,
491 int x, int y, int w, int h, double start_msecs, double stop_msecs)
493 return zsrc->display_subtitle(stream, sid, id, yp, up, vp, ap,
494 x, y, w, h, start_msecs, stop_msecs);
498 mpeg3_delete_subtitle(zmpeg3_t *zsrc, int stream, int sid, int id)
500 return zsrc->delete_subtitle(stream, sid, id);
504 mpeg3_start_toc(char *path, char *toc_path, int program, int64_t *total_bytes)
506 return zmpeg3_t::start_toc(path, toc_path, program, total_bytes);
510 mpeg3_set_index_bytes(zmpeg3_t *zsrc, int64_t bytes)
512 return zsrc->set_index_bytes(bytes);
516 mpeg3_do_toc(zmpeg3_t *zsrc, int64_t *bytes_processed)
518 return zsrc->do_toc(bytes_processed);
522 mpeg3_stop_toc(zmpeg3_t *zsrc)
524 return zsrc->stop_toc();
528 mpeg3_get_source_date(zmpeg3_t *zsrc)
530 return zsrc->get_source_date();
534 mpeg3_calculate_source_date(char *path)
536 return zmpeg3_t::calculate_source_date(path);
540 mpeg3_index_tracks(zmpeg3_t *zsrc)
542 return zsrc->index_tracks();
546 mpeg3_index_channels(zmpeg3_t *zsrc, int track)
548 return zsrc->index_channels(track);
552 mpeg3_index_zoom(zmpeg3_t *zsrc)
554 return zsrc->index_zoom();
558 mpeg3_index_size(zmpeg3_t *zsrc, int track)
560 return zsrc->index_size(track);
564 mpeg3_index_data(zmpeg3_t *zsrc, int track, int channel)
566 return zsrc->index_data(track, channel);
570 mpeg3_has_toc(zmpeg3_t *zsrc)
572 return zsrc->has_toc();
576 mpeg3_title_path(zmpeg3_t *zsrc, int number)
578 return zsrc->title_path(number);
582 mpeg3_is_program_stream(zmpeg3_t * zsrc)
584 return zsrc->is_program_stream() ? 1 : 0;
588 mpeg3_is_transport_stream(zmpeg3_t * zsrc)
590 return zsrc->is_transport_stream() ? 1 : 0;
594 mpeg3_is_video_stream(zmpeg3_t * zsrc)
596 return zsrc->is_video_stream() ? 1 : 0;
600 mpeg3_is_audio_stream(zmpeg3_t * zsrc)
602 return zsrc->is_audio_stream() ? 1 : 0;
606 mpeg3_is_ifo_file(zmpeg3_t * zsrc)
608 return zsrc->is_ifo_file() ? 1 : 0;
612 mpeg3_create_title(zmpeg3_t * zsrc, int full_scan)
614 return zsrc->demuxer->create_title(full_scan);
618 mpeg3audio_dolayer3(mpeg3_layer_t *zaudio,
619 char *frame, int frame_size, float **output, int render)
621 zaudio_decoder_layer_t *audio = (zaudio_decoder_layer_t *)zaudio;
622 return audio->do_layer3((uint8_t*)frame, frame_size, output, render);
626 mpeg3_layer_reset(mpeg3_layer_t *zlayer_data)
628 zaudio_decoder_layer_t *layer_data = (zaudio_decoder_layer_t *)zlayer_data;
629 layer_data->layer_reset();
633 mpeg3_layer_header(mpeg3_layer_t *zlayer_data, unsigned char *data)
635 zaudio_decoder_layer_t *layer_data = (zaudio_decoder_layer_t *)zlayer_data;
636 return layer_data->layer3_header(data);
639 extern "C" mpeg3_layer_t*
642 return (mpeg3_layer_t*) new zaudio_decoder_layer_t();
646 mpeg3_delete_layer(mpeg3_layer_t *zaudio)
648 zaudio_decoder_layer_t *audio = (zaudio_decoder_layer_t *)zaudio;
653 mpeg3_skip_video_frame(mpeg3_t *zsrc,int stream)
655 zsrc->vtrack[stream]->demuxer->skip_video_frame();
659 mpeg3_video_tell_byte(mpeg3_t *zsrc, int stream)
661 return zsrc->vtrack[stream]->demuxer->absolute_position();
665 mpeg3_audio_tell_byte(mpeg3_t *zsrc, int stream)
667 return zsrc->atrack[stream]->demuxer->absolute_position();
673 mpeg3_dvb_channel_count(zmpeg3_t *zsrc)
676 zsrc->demuxer->create_title();
677 return zsrc->dvb.channel_count();
681 mpeg3_dvb_get_channel(zmpeg3_t *zsrc,int n, int *major, int *minor)
683 return zsrc->dvb.get_channel(n, *major, *minor);
687 mpeg3_dvb_get_station_id(zmpeg3_t *zsrc,int n, char *name)
689 return zsrc->dvb.get_station_id(n, name);
693 mpeg3_dvb_total_astreams(zmpeg3_t *zsrc,int n, int *count)
695 return zsrc->dvb.total_astreams(n, *count);
699 mpeg3_dvb_astream_number(zmpeg3_t *zsrc,int n, int ord, int *stream, char *enc)
701 return zsrc->dvb.astream_number(n, ord, *stream, enc);
705 mpeg3_dvb_total_vstreams(zmpeg3_t *zsrc,int n, int *count)
707 return zsrc->dvb.total_vstreams(n, *count);
711 mpeg3_dvb_vstream_number(zmpeg3_t *zsrc,int n, int ord, int *stream)
713 return zsrc->dvb.vstream_number(n, ord, *stream);
717 mpeg3_dvb_get_chan_info(mpeg3_t *zsrc,int n, int ord, int i, char *cp, int len)
719 return zsrc->dvb.get_chan_info(n, ord, i, cp, len);
722 int mpeg3_dvb_get_system_time(mpeg3_t *zsrc, int64_t *tm)
724 return (*tm=zsrc->dvb.get_system_time()) >= 0 ? 0 : 1;