[Red5devs] [red5 commit] r3107 - in java/server: branches/paulg_mp4/src/org/red5/io/mp4/impl trunk/conf
codesite-noreply at google.com
codesite-noreply at google.com
Thu Sep 25 19:08:46 PDT 2008
Author: mondain
Date: Thu Sep 25 19:08:38 2008
New Revision: 3107
Modified:
java/server/branches/paulg_mp4/src/org/red5/io/mp4/impl/MP4Reader.java
java/server/trunk/conf/logback.xml
Log:
reenabled onmetadata and added more notes
Modified:
java/server/branches/paulg_mp4/src/org/red5/io/mp4/impl/MP4Reader.java
==============================================================================
--- java/server/branches/paulg_mp4/src/org/red5/io/mp4/impl/MP4Reader.java
(original)
+++ java/server/branches/paulg_mp4/src/org/red5/io/mp4/impl/MP4Reader.java
Thu Sep 25 19:08:38 2008
@@ -211,7 +211,7 @@
//build the keyframe meta data
analyzeKeyFrames();
//add meta data
- //firstTags.add(createFileMeta());
+ firstTags.add(createFileMeta());
//create / add the pre-streaming tags
createPreStreamingTags();
}
@@ -846,6 +846,7 @@
if (hasVideo) {
//video tag #1
+ //TODO: this data is only for backcountry bombshells - make this
dynamic
tag = new Tag(IoConstants.TYPE_VIDEO, 0, 43, null, 0);
body = ByteBuffer.allocate(tag.getBodySize());
body.put(new byte[]{(byte) 0x17, (byte) 0, (byte) 0, (byte) 0,
(byte) 0,
@@ -877,6 +878,7 @@
if (hasAudio) {
//audio tag #1
+ //TODO: this data is only for backcountry bombshells - make this
dynamic
tag = new Tag(IoConstants.TYPE_AUDIO, 0, 5, null, tag.getBodySize());
body = ByteBuffer.allocate(tag.getBodySize());
body.put(new byte[]{(byte) 0xaf, (byte) 0, (byte) 0x12, (byte) 0x10,
(byte) 0x06});
@@ -889,7 +891,8 @@
}
/**
- *
+ * Packages media data for return to providers.
+ *
*/
public synchronized ITag readTag() {
log.debug("Read tag");
@@ -907,6 +910,7 @@
int sampleSize = frame.getSize();
+ //time routines are based on izumi code
double frameTs = (frame.getTime() - baseTs) * 1000.0;
int time = (int) Math.round(frameTs);
log.debug("Read tag - dst: {} base: {} time: {}", new Object[]{frameTs,
baseTs, time});
@@ -970,7 +974,8 @@
/**
* Performs frame analysis and generates metadata for use in seeking.
The
- * method name is a little misleading since it analyzes all the frames.
+ * method name is a little misleading since it analyzes all the
frames. Additionally
+ * the frames are sorted together based on time and offset.
*
* @return Keyframe metadata
*/
@@ -1079,6 +1084,9 @@
keyframeMeta = new KeyFrameMeta();
keyframeMeta.duration = duration;
/*
+ * TODO: keyframes are handled differently with h.264 media so we will
need
+ * some tweaking here. For one thing our timestamps are doubles instead
of longs.
+ *
posTimeMap = new HashMap<Long, Long>();
keyframeMeta.positions = new long[positionList.size()];
Modified: java/server/trunk/conf/logback.xml
==============================================================================
--- java/server/trunk/conf/logback.xml (original)
+++ java/server/trunk/conf/logback.xml Thu Sep 25 19:08:38 2008
@@ -10,7 +10,7 @@
</layout>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
- <File>../log/red5.log</File>
+ <File>log/red5.log</File>
<Append>false</Append>
<Encoding>UTF-8</Encoding>
<BufferedIO>false</BufferedIO>
@@ -20,7 +20,7 @@
</layout>
</appender>
<appender name="ERRORFILE" class="ch.qos.logback.core.FileAppender">
- <File>../log/error.log</File>
+ <File>log/error.log</File>
<Append>false</Append>
<Encoding>UTF-8</Encoding>
<BufferedIO>false</BufferedIO>
More information about the Red5devs
mailing list