annotate libmpcodecs/ad_ra1428.c @ 12614:d873777f0acf

Prefer libavcodec for cvid files
author rtognimp
date Sun, 20 Jun 2004 22:11:28 +0000
parents d51610530481
children 815f03b7cee5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10261
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
1 // SAMPLE audio decoder - you can use this file as template when creating new codec!
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
2
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
3 #include <stdio.h>
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
4 #include <stdlib.h>
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
5 #include <unistd.h>
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
6
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
7 #include "config.h"
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
8 #include "ad_internal.h"
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
9
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
10 static ad_info_t info = {
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
11 "RealAudio 1.0 and 2.0 native decoder",
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
12 "ra1428",
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
13 "Roberto Togni",
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
14 "http://www.honeypot.net/audio",
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
15 "Decoders taken from a public domain Amiga player"
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
16 };
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
17
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
18 LIBAD_EXTERN(ra1428)
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
19
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
20 #include "native/common1428.h"
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
21
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
22
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
23
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
24 static int preinit(sh_audio_t *sh) {
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
25 sh->samplerate=sh->wf->nSamplesPerSec;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
26 sh->samplesize=sh->wf->wBitsPerSample/8;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
27 sh->channels=sh->wf->nChannels;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
28 sh->sample_format=AFMT_S16_LE;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
29
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
30 switch (sh->format) {
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
31 case mmioFOURCC('1','4','_','4'):
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
32 mp_msg(MSGT_DECAUDIO,MSGL_INFO,"[ra1428] RealAudio 1.0 (14_4)\n");
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
33 sh->i_bps=1800;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
34 break;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
35 case mmioFOURCC('2','8','_','8'):
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
36 mp_msg(MSGT_DECAUDIO,MSGL_INFO,"[ra1428] RealAudio 2.0 (28_8)\n");
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
37 sh->i_bps=1200;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
38 break;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
39 default:
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
40 mp_msg(MSGT_DECAUDIO,MSGL_ERR,"[ra1428] Unhandled format in preinit: %x\n", sh->format);
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
41 return 0;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
42 }
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
43
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
44 sh->audio_out_minsize=128000; // no idea how to get... :(
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
45 sh->audio_in_minsize=((short*)(sh->wf+1))[1]*sh->wf->nBlockAlign;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
46
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
47 return 1; // return values: 1=OK 0=ERROR
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
48 }
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
49
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
50
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
51
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
52 static int init(sh_audio_t *sh) {
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
53 switch (sh->format) {
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
54 case mmioFOURCC('1','4','_','4'):
12377
d51610530481 more lvalue casts
rfelker
parents: 10261
diff changeset
55 sh->context = init_144();
10261
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
56 break;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
57 case mmioFOURCC('2','8','_','8'):
12377
d51610530481 more lvalue casts
rfelker
parents: 10261
diff changeset
58 sh->context = init_288();
10261
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
59 break;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
60 default:
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
61 mp_msg(MSGT_DECAUDIO,MSGL_ERR,"[ra1428] Unhandled format in init: %x\n", sh->format);
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
62 return 0;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
63 }
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
64
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
65 return 1; // return values: 1=OK 0=ERROR
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
66 }
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
67
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
68
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
69
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
70 static void uninit(sh_audio_t *sh) {
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
71 switch (sh->format) {
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
72 case mmioFOURCC('1','4','_','4'):
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
73 free_144((Real_144*)sh->context);
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
74 break;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
75 case mmioFOURCC('2','8','_','8'):
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
76 free_288((Real_288*)sh->context);
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
77 break;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
78 default:
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
79 mp_msg(MSGT_DECAUDIO,MSGL_ERR,"[ra1428] Unhandled format in uninit: %x\n", sh->format);
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
80 return;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
81 }
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
82 }
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
83
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
84
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
85
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
86 static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen) {
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
87 int w=sh->wf->nBlockAlign;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
88 int h=((short*)(sh->wf+1))[1];
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
89 int cfs=((short*)(sh->wf+1))[3];
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
90 int i,j;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
91
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
92 if(sh->a_in_buffer_len<=0){
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
93 switch (sh->format) {
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
94 case mmioFOURCC('1','4','_','4'):
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
95 demux_read_data(sh->ds, sh->a_in_buffer, sh->wf->nBlockAlign);
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
96 sh->a_in_buffer_size=
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
97 sh->a_in_buffer_len=sh->wf->nBlockAlign;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
98 break;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
99 case mmioFOURCC('2','8','_','8'):
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
100 for (j = 0; j < h; j++)
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
101 for (i = 0; i < h/2; i++)
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
102 demux_read_data(sh->ds, sh->a_in_buffer+i*2*w+j*cfs, cfs);
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
103 sh->a_in_buffer_size=
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
104 sh->a_in_buffer_len=sh->wf->nBlockAlign*h;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
105 break;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
106 default:
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
107 mp_msg(MSGT_DECAUDIO,MSGL_ERR,"[ra1428] Unhandled format in decode_audio: %x\n", sh->format);
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
108 return 0;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
109 }
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
110 }
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
111
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
112 switch (sh->format) {
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
113 case mmioFOURCC('1','4','_','4'):
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
114 decode_144((Real_144*)sh->context,sh->a_in_buffer+sh->a_in_buffer_size-sh->a_in_buffer_len,(signed short*)buf);
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
115 break;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
116 case mmioFOURCC('2','8','_','8'):
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
117 decode_288((Real_288*)sh->context,sh->a_in_buffer+sh->a_in_buffer_size-sh->a_in_buffer_len,(signed short*)buf);
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
118 break;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
119 default:
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
120 mp_msg(MSGT_DECAUDIO,MSGL_ERR,"[ra1428] Unhandled format in init: %x\n", sh->format);
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
121 return 0;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
122 }
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
123
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
124 sh->a_in_buffer_len-=cfs;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
125
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
126 return AUDIOBLOCK*2; // return value: number of _bytes_ written to output buffer,
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
127 // or -1 for EOF (or uncorrectable error)
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
128 }
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
129
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
130 static int control(sh_audio_t *sh,int cmd,void* arg, ...){
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
131 // various optional functions you MAY implement:
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
132 switch(cmd){
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
133 case ADCTRL_RESYNC_STREAM:
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
134 // it is called once after seeking, to resync.
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
135 // Note: sh_audio->a_in_buffer_len=0; is done _before_ this call!
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
136 // ...
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
137 return CONTROL_TRUE;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
138 case ADCTRL_SKIP_FRAME:
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
139 // it is called to skip (jump over) small amount (1/10 sec or 1 frame)
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
140 // of audio data - used to sync audio to video after seeking
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
141 // if you don't return CONTROL_TRUE, it will defaults to:
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
142 // ds_fill_buffer(sh_audio->ds); // skip 1 demux packet
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
143 // ...
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
144 return CONTROL_TRUE;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
145 }
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
146 return CONTROL_UNKNOWN;
05a50c0ce239 RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
rtognimp
parents:
diff changeset
147 }