Index: trunk/extensions/OggHandler/cortado-truncation-bugfix.diff |
— | — | @@ -1,57 +0,0 @@ |
2 | | -Index: src/com/fluendo/plugin/AudioSink.java
|
3 | | -===================================================================
|
4 | | -+++ src/com/fluendo/plugin/AudioSink.java (working copy)
|
5 | | -@@ -200,6 +200,9 @@
|
6 | | -
|
7 | | - return res;
|
8 | | - }
|
9 | | -+ public synchronized boolean isAcquired() {
|
10 | | -+ return opened;
|
11 | | -+ }
|
12 | | - public boolean release() {
|
13 | | - stop();
|
14 | | -
|
15 | | -@@ -430,6 +433,8 @@
|
16 | | - case Event.NEWSEGMENT:
|
17 | | - break;
|
18 | | - case Event.EOS:
|
19 | | -+ // wait for completion, perform blocking drain of buffers
|
20 | | -+ drain();
|
21 | | - break;
|
22 | | - }
|
23 | | - return true;
|
24 | | -@@ -498,6 +503,32 @@
|
25 | | - return result;
|
26 | | - }
|
27 | | -
|
28 | | -+ /*
|
29 | | -+ * Block until audio playback is finished
|
30 | | -+ */
|
31 | | -+ protected void drain() {
|
32 | | -+ if (ringBuffer.rate <= 0) {
|
33 | | -+ return;
|
34 | | -+ }
|
35 | | -+
|
36 | | -+ /* need to start playback before we can drain, but only when
|
37 | | -+ * we have successfully negotiated a format and thus acquired the
|
38 | | -+ * ringbuffer. */
|
39 | | -+ if (!ringBuffer.isAcquired()) {
|
40 | | -+ // FIXME make it work like it does in GstBaseAudioSink
|
41 | | -+ // ringBuffer.acquire(...);
|
42 | | -+ return;
|
43 | | -+ }
|
44 | | -+
|
45 | | -+ if (ringBuffer.nextSample != -1) {
|
46 | | -+ long time = ringBuffer.nextSample * Clock.SECOND / ringBuffer.rate;
|
47 | | -+ Clock.ClockID id = audioClock.newSingleShotID(time);
|
48 | | -+ Debug.log(Debug.DEBUG, this+" waiting until t=" + ((double)time / Clock.SECOND) + "s for playback to finish");
|
49 | | -+ id.waitID();
|
50 | | -+ ringBuffer.nextSample = -1;
|
51 | | -+ }
|
52 | | -+ }
|
53 | | -+
|
54 | | - protected abstract RingBuffer createRingBuffer();
|
55 | | - protected abstract boolean open (RingBuffer ring);
|
56 | | - protected abstract boolean close (RingBuffer ring);
|
57 | | -
|
Index: trunk/extensions/OggHandler/cortado-tweak.diff |
— | — | @@ -1,37 +0,0 @@ |
2 | | -Index: src/com/fluendo/player/Cortado.java |
3 | | -=================================================================== |
4 | | -+++ src/com/fluendo/player/Cortado.java (working copy) |
5 | | -@@ -30,8 +30,8 @@ |
6 | | - MouseListener, ComponentListener, BusHandler, StatusListener, ActionListener { |
7 | | - private static final long serialVersionUID = 1L; |
8 | | - |
9 | | -- private static Cortado cortado; |
10 | | -- private static CortadoPipeline pipeline; |
11 | | -+ private Cortado cortado; |
12 | | -+ private CortadoPipeline pipeline; |
13 | | - |
14 | | - private String urlString; |
15 | | - private boolean audio; |
16 | | -@@ -192,10 +192,10 @@ |
17 | | - return res; |
18 | | - } |
19 | | - |
20 | | -- public static void shutDown(Throwable error) { |
21 | | -+ public void shutDown(Throwable error) { |
22 | | - Debug.log(Debug.INFO, "shutting down: reason: " + error.getMessage()); |
23 | | - error.printStackTrace(); |
24 | | -- cortado.stop(); |
25 | | -+ stop(); |
26 | | - } |
27 | | - |
28 | | - public synchronized void init() { |
29 | | -@@ -341,7 +341,7 @@ |
30 | | - try { |
31 | | - realRun(); |
32 | | - } catch (Throwable t) { |
33 | | -- Cortado.shutDown(t); |
34 | | -+ shutDown(t); |
35 | | - } |
36 | | - } |
37 | | - |
Index: trunk/extensions/OggHandler/README |
— | — | @@ -32,14 +32,16 @@ |
33 | 33 | Cortado |
34 | 34 | ------- |
35 | 35 | |
36 | | -The bundled Cortado player is licensed under the GPL, the source is available from: |
| 36 | +The cortado directory contains a fork of the Cortado Java applet by Fluendo. For |
| 37 | +information about the original project see: |
37 | 38 | |
38 | 39 | http://www.flumotion.net/cortado/ |
39 | 40 | |
40 | | -We have patched Cortado to allow multiple instances to exist on the one page, |
41 | | -the patch is in cortado-tweak.diff. The recompiled binary is at |
42 | | -cortado-ovt-stripped-0.2.2.1-patched.jar . |
| 41 | +See LICENSE.cortado, LICENSE.jheora and LICENSE.smoke for license information. |
43 | 42 | |
| 43 | +Our fork contains bug fixes and feature additions which we hope will be |
| 44 | +incorporated into the official Cortado release. |
| 45 | + |
44 | 46 | PEAR File_Ogg |
45 | 47 | ------------- |
46 | 48 | |