Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Cortado
Commits
b8fdf59d
Commit
b8fdf59d
authored
Mar 14, 2010
by
ogg.k.ogg.k
Browse files
create Ogg payload classes by name, if they are found, as some
versions of Cortado may not have all of them.
parent
43fe0336
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/com/fluendo/plugin/OggDemux.java
View file @
b8fdf59d
...
...
@@ -39,10 +39,11 @@ public class OggDemux extends Element
private
static
final
int
TYPE_CMML
=
3
;
private
static
final
int
TYPE_MEDIA
=
4
;
private
static
final
String
payload_names
[]
=
{
"TheoraDec"
,
"VorbisDec"
,
"KateDec"
};
private
OggPayload
payloads
[]
=
{
new
TheoraDec
(),
new
VorbisDec
(),
new
KateDec
()
null
,
null
,
null
};
class
OggStream
extends
Pad
{
...
...
@@ -178,6 +179,7 @@ public class OggDemux extends Element
/* find out if it is a media payload */
for
(
i
=
0
;
i
<
payloads
.
length
;
i
++)
{
OggPayload
pl
=
payloads
[
i
];
if
(
pl
==
null
)
continue
;
if
(
pl
.
isType
(
op
))
{
try
{
...
...
@@ -578,7 +580,6 @@ public class OggDemux extends Element
return
ret
;
}
public
String
getFactoryName
()
{
return
"oggdemux"
;
...
...
@@ -598,6 +599,21 @@ public class OggDemux extends Element
public
OggDemux
()
{
super
();
/* Create the payloads we know about */
for
(
int
n
=
0
;
n
<
payload_names
.
length
;
++
n
)
{
String
name
=
"com.fluendo.plugin."
+
payload_names
[
n
];
try
{
Class
c
=
Class
.
forName
(
name
);
Debug
.
log
(
Debug
.
INFO
,
"Ogg payload "
+
name
+
" found"
);
payloads
[
n
]
=
(
OggPayload
)
c
.
newInstance
();
}
catch
(
Throwable
e
)
{
Debug
.
log
(
Debug
.
INFO
,
"Ogg payload "
+
name
+
" not found"
);
payloads
[
n
]
=
null
;
}
}
oy
=
new
SyncState
();
og
=
new
Page
();
op
=
new
Packet
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment