Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed javadocs and a couple issues on the tracker. Updated project.zi…

…p with newest build files.

git-svn-id: http://red5.googlecode.com/svn/java/server/trunk@4254 1b6495e4-3631-0410-8e05-8f51eee8b9cc
  • Loading branch information...
commit 3c64de4e82f8379331a4c80d91f80606c1ea71b8 1 parent fd399bc
mondain authored
View
9 build.xml
@@ -428,7 +428,7 @@
</manifest>
</war>
</target>
- <target name="javadoc" description="Generate JavaDoc">
+ <target name="javadoc" depends="-java6.check" description="Generate JavaDoc">
<condition property="available.envpath" value="Path: ${env.Path}" else="Not using env.Path">
<isset property="env.Path"/>
</condition>
@@ -437,6 +437,9 @@
<condition property="javadoc.loc" value="javase/6">
<equals arg1="${java6.installed}" arg2="true"/>
</condition>
+ <delete>
+ <fileset dir="${lib.dir}" includes="**/*sources*.jar"/>
+ </delete>
<javadoc useexternalfile="true" failonerror="false" verbose="false" classpathref="full.classpath"
destdir="${javadoc.dir}" author="true" version="true" use="true" splitindex="true"
windowtitle="${documentation.title}" stylesheetfile="${javadoc.style}">
@@ -453,11 +456,11 @@
<group title="Streaming" packages="org.red5.server.stream:org.red5.server.stream.*"/>
<group title="IO Packages" packages="org.red5.io:org.red5.io.*"/>
<group title="Scripting" packages="org.red5.server.script:org.red5.server.script.*"/>
- <link href="http://java.sun.com/${javadoc.loc}/docs/api"/>
+ <link href="http://download.oracle.com/${javadoc.loc}/docs/api"/>
<link href="http://jetty.codehaus.org/jetty/jetty-6/apidocs"/>
<link href="http://mina.apache.org/report/trunk/apidocs"/>
<link href="http://static.springsource.org/spring/docs/2.5.x/api"/>
- <link href="http://www.quartz-scheduler.org/docs/api"/>
+ <!-- <link href="http://www.quartz-scheduler.org/docs/api"/> -->
<link href="http://www.slf4j.org/api"/>
<link href="http://logging.apache.org/log4j/1.2/apidocs"/>
<link href="http://groovy.codehaus.org/api"/>
View
BIN  project.zip
Binary file not shown
View
12 src/org/red5/io/amf3/DataOutput.java
@@ -19,6 +19,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
@@ -131,9 +132,14 @@ public void writeUnsignedInt(long value) {
/** {@inheritDoc} */
public void writeUTF(String value) {
- buffer.putShort((short) value.length());
- final ByteBuffer strBuf = AMF3.CHARSET.encode(value);
- buffer.put(strBuf);
+ // fix from issue #97
+ try {
+ byte[] strBuf = value.getBytes(AMF3.CHARSET.name());
+ buffer.putShort((short) strBuf.length);
+ buffer.put(strBuf);
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
}
/** {@inheritDoc} */
View
8 src/org/red5/io/amf3/Input.java
@@ -161,7 +161,7 @@ public void resolveProperties(Object result) {
// list of string values found in the input stream
private List<String> stringReferences = new ArrayList<String>();
- private Map<Integer, Object> refMap = new HashMap<Integer, Object>();
+ private Map<Integer, Object> refMap = new HashMap<Integer, Object>(4);
}
/**
@@ -174,8 +174,11 @@ public void resolveProperties(Object result) {
*/
private int amf3_mode;
+ /**
+ * Stores references declared in this input of previous ones in the same message body
+ */
private RefStorage refStorage;
-
+
/**
* Creates Input object for AMF3 from byte buffer
*
@@ -885,6 +888,7 @@ public Object readReference(Type target) {
}
/**
+
* Parser of AMF3 "compressed" integer data type
*
* @return a converted integer value
View
2  src/org/red5/io/flv/meta/IMetaService.java
@@ -92,7 +92,7 @@
/**
* Returns the file being accessed
*
- * @return
+ * @return file
*/
public File getFile();
View
1  src/org/red5/io/mp3/impl/MP3Header.java
@@ -104,7 +104,6 @@ public MP3Header(int data) throws Exception {
if ((data & 0xffe00000) != 0xffe00000) {
throw new Exception("invalid frame sync word");
}
-
this.data = data;
// Strip signed bit
data &= 0x1fffff;
View
4 src/org/red5/io/mp4/impl/MP4Reader.java
@@ -1015,7 +1015,6 @@ private void createPreStreamingTags(int timestamp, boolean clear) {
if (hasVideo) {
//video tag #1
- //TODO: this data is only for backcountry bombshells - make this dynamic
body = IoBuffer.allocate(41);
body.setAutoExpand(true);
body.put(PREFIX_VIDEO_CONFIG_FRAME); //prefix
@@ -1037,7 +1036,8 @@ private void createPreStreamingTags(int timestamp, boolean clear) {
//add tag
firstTags.add(tag);
}
-
+ // TODO: Handle other mp4 container audio codecs like mp3
+ // mp3 header magic number ((int & 0xffe00000) == 0xffe00000)
if (hasAudio) {
//audio tag #1
//TODO: this data is only for backcountry bombshells - make this dynamic
View
2  src/org/red5/server/api/Red5.java
@@ -43,7 +43,7 @@
*
* @author The Red5 Project (red5@osflash.org)
* @author Luke Hubbard (luke@codegent.com)
- * @author Paul Gregoire (mondain@gmail.com)
+ * @author Paul Gregoire (mondain@gmail.com)
*/
public final class Red5 {
View
21 src/org/red5/server/net/rtmp/codec/RTMPProtocolEncoder.java
@@ -71,9 +71,6 @@
*/
public class RTMPProtocolEncoder implements Constants, IEventEncoder {
- /**
- * Logger.
- */
protected static Logger log = LoggerFactory.getLogger(RTMPProtocolEncoder.class);
/**
@@ -537,11 +534,9 @@ public IoBuffer encodeMessage(RTMP rtmp, Header header, IRTMPEvent message) {
return encodeAggregate((Aggregate) message);
case TYPE_AUDIO_DATA:
log.trace("Encode audio message");
-
return encodeAudioData((AudioData) message);
case TYPE_VIDEO_DATA:
log.trace("Encode video message");
-
return encodeVideoData((VideoData) message);
case TYPE_FLEX_SHARED_OBJECT:
return encodeFlexSharedObject((ISharedObjectMessage) message, rtmp);
@@ -619,8 +614,12 @@ public IoBuffer encodeSharedObject(ISharedObjectMessage so, RTMP rtmp) {
* @param out output buffer
*/
public void doEncodeSharedObject(ISharedObjectMessage so, RTMP rtmp, IoBuffer out) {
- final Output output = new org.red5.io.amf.Output(out);
-
+ final Output output;
+ if (rtmp.getEncoding() == Encoding.AMF3) {
+ output = new org.red5.io.amf3.Output(out);
+ } else {
+ output = new org.red5.io.amf.Output(out);
+ }
output.putString(so.getName());
// SO version
out.putInt(so.getVersion());
@@ -628,12 +627,9 @@ public void doEncodeSharedObject(ISharedObjectMessage so, RTMP rtmp, IoBuffer ou
out.putInt(so.isPersistent() ? 2 : 0);
// unknown field
out.putInt(0);
-
int mark, len;
-
for (ISharedObjectEvent event : so.getEvents()) {
byte type = SharedObjectTypeMapping.toByte(event.getType());
-
switch (event.getType()) {
case SERVER_CONNECT:
case CLIENT_INITIAL_DATA:
@@ -659,15 +655,12 @@ public void doEncodeSharedObject(ISharedObjectMessage so, RTMP rtmp, IoBuffer ou
// Update multiple attributes in one request
Map<?, ?> initialData = (Map<?, ?>) event.getValue();
for (Object o : initialData.keySet()) {
-
out.put(type);
mark = out.position();
out.skip(4); // we will be back
-
String key = (String) o;
output.putString(key);
serializer.serialize(output, initialData.get(key));
-
len = out.position() - mark - 4;
out.putInt(mark, len);
}
@@ -675,10 +668,8 @@ public void doEncodeSharedObject(ISharedObjectMessage so, RTMP rtmp, IoBuffer ou
out.put(type);
mark = out.position();
out.skip(4); // we will be back
-
output.putString(event.getKey());
serializer.serialize(output, event.getValue());
-
len = out.position() - mark - 4;
out.putInt(mark, len);
}
View
4 src/org/red5/server/service/ConversionUtils.java
@@ -289,7 +289,7 @@ public static Object convertNumberToWrapper(Number num, Class<?> wrapper) {
LinkedList<Method> list = new LinkedList<Method>();
Method[] methods = object.getClass().getMethods();
for (Method m : methods) {
- log.debug("Method name: {}", m.getName());
+ log.trace("Method name: {}", m.getName());
//check parameter length first since this should speed things up
if (m.getParameterTypes().length != numParam) {
log.debug("Param length not the same");
@@ -297,7 +297,7 @@ public static Object convertNumberToWrapper(Number num, Class<?> wrapper) {
}
//now try to match the name
if (!m.getName().equals(method)) {
- log.debug("Method name not the same");
+ log.trace("Method name not the same");
continue;
}
list.add(m);
View
12 src/org/red5/server/stream/StreamService.java
@@ -369,9 +369,14 @@ public void play(Boolean dontStop) {
}
/**
- * Dynamic streaming play method. This is a convenience method.
- *
- * @param playOptions
+ * Dynamic streaming play method. This is a convenience method.
+ *
+ * @param oldStreamName
+ * @param start
+ * @param transition
+ * @param length
+ * @param offset
+ * @param streamName
*/
public void play2(String oldStreamName, int start, String transition, int length, double offset, String streamName) {
Map<String, Object> playOptions = new HashMap<String, Object>();
@@ -429,6 +434,7 @@ public void play2(ObjectMap params) {
SWITCH : String = "switch" - Switches from playing one stream to another stream, typically with streams of the same content.
</pre>
@see <a href="http://www.adobe.com/devnet/flashmediaserver/articles/dynstream_actionscript.html">ActionScript guide to dynamic streaming</a>
+ @see <a href="http://www.adobe.com/devnet/flashmediaserver/articles/dynstream_advanced_pt1.html">Dynamic streaming in Flash Media Server 3.5 – Part 1: Overview of the new capabilities</a>
@see <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStreamPlayTransitions.html">NetStreamPlayTransitions</a>
*/
public void play2(Map<String, ?> playOptions) {
View
4 src/org/red5/server/util/HttpConnectionUtil.java
@@ -63,7 +63,8 @@
/**
* Returns a client with all our selected properties / params.
- * @return
+ *
+ * @return client
*/
public static final DefaultHttpClient getClient() {
// create a singular HttpClient object
@@ -90,7 +91,6 @@ public static final DefaultHttpClient getClient() {
* Logs details about the request error.
*
* @param response
- * @param entity
* @throws IOException
* @throws ParseException
*/
Please sign in to comment.
Something went wrong with that request. Please try again.