[Red5commits] [1123] Made FileConsumer? aware of absolute/relative timestamp mark.

sgong luke at codegent.com
Sat Jul 8 08:40:17 EDT 2006


Made FileConsumer? aware of absolute/relative timestamp mark.


Timestamp: 07/08/06 22:36:04 (less than one hour ago) 
Change: 1123 
Author: sgong

Files (see diff or trac for details): 
java/server/trunk/src/org/red5/server/stream/consumer/FileConsumer.java


Trac: http://mirror1.cvsdude.com/trac/osflash/red5/changeset/1123

Index: /java/server/trunk/src/org/red5/server/stream/consumer/FileConsumer.java
===================================================================
--- /java/server/trunk/src/org/red5/server/stream/consumer/FileConsumer.java (revision 1087)
+++ /java/server/trunk/src/org/red5/server/stream/consumer/FileConsumer.java (revision 1123)
@@ -82,15 +82,27 @@
 		switch (msg.getDataType()) {
 			case TYPE_VIDEO_DATA:
-				videoTimestamp += msg.getTimestamp();
+				if (rtmpMsg.isTimerRelative()) {
+					videoTimestamp += msg.getTimestamp();
+				} else {
+					videoTimestamp = msg.getTimestamp();
+				}
 				tag.setTimestamp(videoTimestamp);
 				break;
 			
 			case TYPE_AUDIO_DATA:
-				audioTimestamp += msg.getTimestamp();
+				if (rtmpMsg.isTimerRelative()) {
+					audioTimestamp += msg.getTimestamp();
+				} else {
+					audioTimestamp = msg.getTimestamp();
+				}
 				tag.setTimestamp(audioTimestamp);
 				break;
 				
 			default:
-				dataTimestamp += msg.getTimestamp();
+				if (rtmpMsg.isTimerRelative()) {
+					dataTimestamp += msg.getTimestamp();
+				} else {
+					dataTimestamp = msg.getTimestamp();
+				}
 				tag.setTimestamp(dataTimestamp);
 		}


Note:
Diffs are chopped if more than 25k.
This is to get past the limit on the mailing list.



More information about the Red5commits mailing list