|
From: <mar...@us...> - 2003-03-14 02:17:58
|
Update of /cvsroot/madsserv/madsserv/src/server/processor
In directory sc8-pr-cvs1:/tmp/cvs-serv12458
Modified Files:
ThreadReencode.java
Log Message:
Fin des fichiers implementee
Index: ThreadReencode.java
===================================================================
RCS file: /cvsroot/madsserv/madsserv/src/server/processor/ThreadReencode.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ThreadReencode.java 13 Mar 2003 23:47:26 -0000 1.4
--- ThreadReencode.java 14 Mar 2003 02:17:55 -0000 1.5
***************
*** 38,41 ****
--- 38,42 ----
private VideoFormat reencodingVideoFormat = null; // Format video de reencodage.
private Time startTime; // Instant de debut du reencodage.
+ private Boolean endOfMediaSent = null; // Indique que le fichier est termine.
/**
***************
*** 53,56 ****
--- 54,58 ----
this.startTime = startTime;
this.reencodeRef = reencodeRef;
+ endOfMediaSent = Boolean.valueOf(false);
}
***************
*** 72,75 ****
--- 74,78 ----
this.startTime = startTime;
this.reencodeRef = reencodeRef;
+ endOfMediaSent = Boolean.valueOf(false);
}
***************
*** 86,90 ****
resultat = this.startProcessing();
reencodeRef.reencoding = true;
! System.err.println("Résultat : " + resultat);
}
--- 89,93 ----
resultat = this.startProcessing();
reencodeRef.reencoding = true;
! System.err.println("Resultat : " + resultat);
}
***************
*** 139,142 ****
--- 142,146 ----
Format supported[];
Format chosen;
+ Format finalchosen;
boolean atLeastOneTrack = false;
***************
*** 153,164 ****
if (supported.length > 0) {
if (supported[0] instanceof VideoFormat) {
// For video formats, we should double check the
// sizes since not all formats work in all sizes.
chosen = checkForVideoSizes(tracks[i].getFormat(),
! supported[0]); //FIXME mettre reencodingVideoFormat
! } else
! //chosen = reencodingAudioFormat;
chosen = supported[0];
tracks[i].setFormat(chosen);
System.err.println("Track " + i + " is set to transmit as:");
--- 157,170 ----
if (supported.length > 0) {
+ for(int j=0;j<supported.length;j++)
+ System.out.println("Format supporte n" + j + " : " + supported[j].toString());
if (supported[0] instanceof VideoFormat) {
// For video formats, we should double check the
// sizes since not all formats work in all sizes.
chosen = checkForVideoSizes(tracks[i].getFormat(),
! supported[0]);
! } else {
chosen = supported[0];
+ }
tracks[i].setFormat(chosen);
System.err.println("Track " + i + " is set to transmit as:");
***************
*** 175,179 ****
if (!atLeastOneTrack)
return "Couldn't set any of the tracks to a valid RTP format";
! System.out.println("C'est pas encore planté ! l. 176");
// Realize the processor. This will internally create a flow
// graph and attempt to create an output datasource for JPEG/RTP
--- 181,185 ----
if (!atLeastOneTrack)
return "Couldn't set any of the tracks to a valid RTP format";
!
// Realize the processor. This will internally create a flow
// graph and attempt to create an output datasource for JPEG/RTP
***************
*** 336,340 ****
p.configure();
} else if (state == Processor.Realized) {
! System.out.println("On va réaliser le processor");
p.realize();
System.out.println("Le processor est realized");
--- 342,346 ----
p.configure();
} else if (state == Processor.Realized) {
! System.out.println("On va realiser le processor");
p.realize();
System.out.println("Le processor est realized");
***************
*** 380,385 ****
}
}
}
}
!
! }
--- 386,403 ----
}
}
+ if (ce instanceof DataStarvedEvent || ce instanceof EndOfMediaEvent) {
+ System.out.println("J'ai un evenement DataStarved");
+ synchronized (endOfMediaSent) {
+ System.out.println("Evenement DataStarved traite");
+ if (!endOfMediaSent.booleanValue())
+ endOfMediaSent = Boolean.valueOf(true);
+ try {
+ Thread.sleep(4000);
+ reencodeRef.streamingRef.endOfMedia();
+ }
+ catch (Exception e) {}
+ }
+ }
}
}
! }
\ No newline at end of file
|