[Red5commits] [2390] made easier to subclass
jbauch
luke at codegent.com
Thu Oct 11 17:20:11 PDT 2007
made easier to subclass
Timestamp: 10/11/07 19:16:38 EST (less than one hour ago)
Change: 2390
Author: jbauch
Files (see diff or trac for details):
java/server/trunk/src/org/red5/server/stream/ServerStream.java
Trac: http://mirror1.cvsdude.com/trac/osflash/red5/changeset/2390
Index: /java/server/trunk/src/org/red5/server/stream/ServerStream.java
===================================================================
--- /java/server/trunk/src/org/red5/server/stream/ServerStream.java (revision 2389)
+++ /java/server/trunk/src/org/red5/server/stream/ServerStream.java (revision 2390)
@@ -82,5 +82,5 @@
* Enumeration for states
*/
- private enum State {
+ protected enum State {
UNINIT, CLOSED, STOPPED, PLAYING, PAUSED
}
@@ -89,21 +89,21 @@
* Current state
*/
- private State state;
+ protected State state;
/**
* Stream published name
*/
- private String publishedName;
+ protected String publishedName;
/**
* Actual playlist controller
*/
- private IPlaylistController controller;
+ protected IPlaylistController controller;
/**
* Default playlist controller
*/
- private IPlaylistController defaultController;
+ protected IPlaylistController defaultController;
/**
* Rewind flag state
*/
- private boolean isRewind;
+ private boolean isRewind;
/**
* Random flag state
@@ -117,5 +117,5 @@
* List of items in this playlist
*/
- private List<IPlayItem> items;
+ protected List<IPlayItem> items;
/**
@@ -126,5 +126,5 @@
* Current item
*/
- private IPlayItem currentItem;
+ protected IPlayItem currentItem;
/**
* Message input
@@ -142,5 +142,5 @@
* The filename we are recording to.
*/
- private String recordingFilename;
+ protected String recordingFilename;
/**
* Scheduling service
@@ -547,5 +547,5 @@
* @param item Item to play
*/
- private void play(IPlayItem item) {
+ protected void play(IPlayItem item) {
// Return if already playing
if (state != State.STOPPED) {
@@ -601,5 +601,5 @@
* Play next item on item end
*/
- private void onItemEnd() {
+ protected void onItemEnd() {
nextItem();
}
@@ -643,5 +643,5 @@
* Begin VOD broadcasting
*/
- private void startBroadcastVOD() {
+ protected void startBroadcastVOD() {
nextVideoTS = nextAudioTS = nextDataTS = 0;
nextRTMPMessage = null;
@@ -663,5 +663,5 @@
* Notifies handler on stream broadcast stop
*/
- private void notifyBroadcastClose() {
+ protected void notifyBroadcastClose() {
IStreamAwareScopeHandler handler = getStreamAwareHandler();
if (handler != null) {
@@ -677,5 +677,5 @@
* Notifies handler on stream broadcast start
*/
- private void notifyBroadcastStart() {
+ protected void notifyBroadcastStart() {
IStreamAwareScopeHandler handler = getStreamAwareHandler();
if (handler != null) {
@@ -692,5 +692,5 @@
* it for push according to the timestamp.
*/
- private void scheduleNextMessage() {
+ protected void scheduleNextMessage() {
boolean first = nextRTMPMessage == null;
@@ -747,10 +747,12 @@
}
vodJobName = null;
- try {
- pushMessage(nextRTMPMessage);
- } catch (IOException err) {
- log.error("Error while sending message.", err);
- }
- nextRTMPMessage.getBody().release();
+ if (nextRTMPMessage != null) {
+ try {
+ pushMessage(nextRTMPMessage);
+ } catch (IOException err) {
+ log.error("Error while sending message.", err);
+ }
+ nextRTMPMessage.getBody().release();
+ }
long start = currentItem.getStart();
if (start < 0) {
@@ -860,5 +862,5 @@
* Should be called in synchronized context.
*/
- private void moveToNext() {
+ protected void moveToNext() {
if (currentItemIndex >= items.size()) {
currentItemIndex = items.size() - 1;
@@ -876,5 +878,5 @@
* Should be called in synchronized context.
*/
- private void moveToPrevious() {
+ protected void moveToPrevious() {
if (currentItemIndex >= items.size()) {
currentItemIndex = items.size() - 1;
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