HTTPSink Class Reference

#include <HTTPSink.hh>

Inheritance diagram for HTTPSink:

Inheritance graph
[legend]
Collaboration diagram for HTTPSink:

Collaboration graph
[legend]

Public Types

typedef void( afterPlayingFunc )(void *clientData)

Public Member Functions

Boolean startPlaying (MediaSource &source, afterPlayingFunc *afterFunc, void *afterClientData)
virtual void stopPlaying ()
virtual Boolean isRTPSink () const
FramedSourcesource () const
UsageEnvironmentenvir () const
char const * name () const
virtual Boolean isSource () const
virtual Boolean isRTCPInstance () const
virtual Boolean isRTSPClient () const
virtual Boolean isRTSPServer () const
virtual Boolean isMediaSession () const
virtual Boolean isServerMediaSession () const
virtual Boolean isDarwinInjector () const

Static Public Member Functions

static HTTPSinkcreateNew (UsageEnvironment &env, Port ourPort)
static Boolean lookupByName (UsageEnvironment &env, char const *sinkName, MediaSink *&resultSink)
static Boolean lookupByName (UsageEnvironment &env, char const *mediumName, Medium *&resultMedium)
static void close (UsageEnvironment &env, char const *mediumName)
static void close (Medium *medium)

Protected Member Functions

 HTTPSink (UsageEnvironment &env, int ourSocket)
virtual ~HTTPSink ()
virtual Boolean isUseableFrame (unsigned char *framePtr, unsigned frameSize)
virtual Boolean sourceIsCompatibleWithUs (MediaSource &source)
TaskTokennextTask ()

Static Protected Member Functions

static int setUpOurSocket (UsageEnvironment &env, Port &ourPort)
static void appendPortNum (UsageEnvironment &env, Port const &port)
static void onSourceClosure (void *clientData)

Protected Attributes

FramedSourcefSource

Private Member Functions

virtual Boolean continuePlaying ()
void afterGettingFrame1 (unsigned frameSize, struct timeval presentationTime)

Static Private Member Functions

static void afterGettingFrame (void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
static void ourOnSourceClosure (void *clientData)

Private Attributes

int fSocket
unsigned char fBuffer [10000]
int fClientSocket

Detailed Description

Definition at line 31 of file HTTPSink.hh.


Member Typedef Documentation

typedef void( MediaSink::afterPlayingFunc)(void *clientData) [inherited]

Definition at line 33 of file MediaSink.hh.


Constructor & Destructor Documentation

HTTPSink::HTTPSink ( UsageEnvironment env,
int  ourSocket 
) [protected]

Definition at line 85 of file HTTPSink.cpp.

Referenced by createNew().

00086   : MediaSink(env), fSocket(ourSocket), fClientSocket(-1) {
00087 }

HTTPSink::~HTTPSink (  )  [protected, virtual]

Definition at line 89 of file HTTPSink.cpp.

References closeSocket, and fSocket.

00089                     {
00090   ::closeSocket(fSocket);
00091 }


Member Function Documentation

HTTPSink * HTTPSink::createNew ( UsageEnvironment env,
Port  ourPort 
) [static]

Reimplemented in MPEG1or2VideoHTTPSink.

Definition at line 31 of file HTTPSink.cpp.

References appendPortNum(), closeSocket, env, HTTPSink(), NULL, and setUpOurSocket().

00031                                                                  {
00032   int ourSocket = -1;
00033 
00034   do {
00035     int ourSocket = setUpOurSocket(env, ourPort);
00036     if (ourSocket == -1) break;
00037 
00038     HTTPSink* newSink = new HTTPSink(env, ourSocket);
00039     if (newSink == NULL) break;
00040     
00041     appendPortNum(env, ourPort);
00042     
00043     return newSink;
00044   } while (0);
00045 
00046   if (ourSocket != -1) ::closeSocket(ourSocket);
00047   return NULL;
00048 }

Boolean HTTPSink::isUseableFrame ( unsigned char *  framePtr,
unsigned  frameSize 
) [protected, virtual]

Reimplemented in MPEG1or2VideoHTTPSink.

Definition at line 93 of file HTTPSink.cpp.

References True.

Referenced by afterGettingFrame1().

00094                                                           {
00095   // default implementation
00096   return True;
00097 }

Boolean HTTPSink::continuePlaying (  )  [private, virtual]

Implements MediaSink.

Definition at line 99 of file HTTPSink.cpp.

References afterGettingFrame(), Medium::envir(), False, fBuffer, fClientSocket, fSocket, MediaSink::fSource, UsageEnvironment::getErrno(), FramedSource::getNextFrame(), MediaSource::MIMEtype(), NULL, ourOnSourceClosure(), UsageEnvironment::setResultErrMsg(), SOCKLEN_T, and True.

Referenced by afterGettingFrame1().

00099                                   {
00100   if (fSource == NULL) return False;
00101 
00102   if (fClientSocket < 0) {
00103     // We're still waiting for a connection from a client.
00104     // Try making one now.  (Recall that we're non-blocking)
00105     struct sockaddr_in clientAddr;
00106     SOCKLEN_T clientAddrLen = sizeof clientAddr;
00107     fClientSocket = accept(fSocket, (struct sockaddr*)&clientAddr,
00108                            &clientAddrLen);
00109     if (fClientSocket < 0) {
00110       int err = envir().getErrno();
00111       if (err != EWOULDBLOCK) {
00112         envir().setResultErrMsg("accept() failed: ");
00113         return False;
00114       }
00115     } else {
00116       // We made a connection; so send back a HTTP "OK", followed by other
00117       // information (in particular, "Content-Type:") that will make
00118       // client player tools happy:
00119       char okResponse[400];
00120       const char* responseFmt = "HTTP/1.1 200 OK\r\nCache-Control: no-cache\r\nPragma: no-cache\r\nContent-Length: 2147483647\r\nContent-Type: %s\r\n\r\n";
00121 #if defined(IRIX) || defined(ALPHA) || defined(_QNX4) || defined(IMN_PIM) || defined(CRIS) || defined (VXWORKS)
00122       /* snprintf() isn't defined, so just use sprintf() - ugh! */
00123       sprintf(okResponse, responseFmt, fSource->MIMEtype());
00124 #else
00125       snprintf(okResponse, sizeof okResponse, responseFmt, fSource->MIMEtype());
00126 #endif 
00127       send(fClientSocket, okResponse, strlen(okResponse), 0);
00128     }
00129   }
00130   
00131   fSource->getNextFrame(fBuffer, sizeof fBuffer,
00132                         afterGettingFrame, this,
00133                         ourOnSourceClosure, this);
00134 
00135   return True;
00136 }

int HTTPSink::setUpOurSocket ( UsageEnvironment env,
Port ourPort 
) [static, protected]

Definition at line 50 of file HTTPSink.cpp.

References closeSocket, env, getSourcePort(), increaseSendBufferTo(), Port::num(), UsageEnvironment::setResultErrMsg(), and setupStreamSocket().

Referenced by MPEG1or2VideoHTTPSink::createNew(), and createNew().

00050                                                                  {
00051   int ourSocket = -1;
00052 
00053   do {
00054     ourSocket = setupStreamSocket(env, ourPort);
00055     if (ourSocket < 0) break;
00056 
00057     // Make sure we have a big send buffer:
00058     if (!increaseSendBufferTo(env, ourSocket, 50*1024)) break;
00059     
00060     if (listen(ourSocket, 1) < 0) { // we allow only one connection
00061       env.setResultErrMsg("listen() failed: ");
00062       break;
00063     }
00064 
00065     if (ourPort.num() == 0) {
00066       // bind() will have chosen a port for us; return it also:
00067       if (!getSourcePort(env, ourSocket, ourPort)) break;
00068     }
00069 
00070     return ourSocket;
00071   } while (0);  
00072 
00073   if (ourSocket != -1) ::closeSocket(ourSocket);
00074   return -1;
00075 }

void HTTPSink::appendPortNum ( UsageEnvironment env,
Port const &  port 
) [static, protected]

Definition at line 77 of file HTTPSink.cpp.

References UsageEnvironment::appendToResultMsg(), env, and Port::num().

Referenced by MPEG1or2VideoHTTPSink::createNew(), and createNew().

00078                                                {
00079   char tmpBuf[10]; // large enough to hold a port # string
00080   sprintf(tmpBuf, " %d", ntohs(port.num()));
00081   env.appendToResultMsg(tmpBuf);
00082 }

void HTTPSink::afterGettingFrame ( void *  clientData,
unsigned  frameSize,
unsigned  numTruncatedBytes,
struct timeval  presentationTime,
unsigned  durationInMicroseconds 
) [static, private]

Definition at line 146 of file HTTPSink.cpp.

References afterGettingFrame1().

Referenced by continuePlaying().

00149                                                                       {
00150   HTTPSink* sink = (HTTPSink*)clientData;
00151   sink->afterGettingFrame1(frameSize, presentationTime);
00152 }

void HTTPSink::afterGettingFrame1 ( unsigned  frameSize,
struct timeval  presentationTime 
) [private]

Definition at line 154 of file HTTPSink.cpp.

References continuePlaying(), Medium::envir(), fBuffer, fClientSocket, UsageEnvironment::getErrno(), isUseableFrame(), and ourOnSourceClosure().

Referenced by afterGettingFrame().

00155                                                                       {
00156   // Write the data back to our client socket (if we have one):
00157   if (fClientSocket >= 0 && isUseableFrame(fBuffer, frameSize)) {
00158     int sendResult
00159       = send(fClientSocket, (char*)(&fBuffer[0]), frameSize, 0);
00160     if (sendResult < 0) {
00161       int err = envir().getErrno();
00162       if (err != EWOULDBLOCK) {
00163         // The client appears to have gone; close him down,
00164         // and consider ourselves done:
00165         ourOnSourceClosure(this);
00166         return;
00167       }
00168     }
00169   }
00170 
00171   // Then try getting the next frame:
00172   continuePlaying();
00173 }

void HTTPSink::ourOnSourceClosure ( void *  clientData  )  [static, private]

Definition at line 138 of file HTTPSink.cpp.

References closeSocket, fClientSocket, and MediaSink::onSourceClosure().

Referenced by afterGettingFrame1(), and continuePlaying().

00138                                                   {
00139   // No more input frames - we're done:
00140   HTTPSink* sink = (HTTPSink*) clientData;
00141   ::closeSocket(sink->fClientSocket);
00142   sink->fClientSocket = -1;
00143   onSourceClosure(sink);
00144 }

Boolean MediaSink::lookupByName ( UsageEnvironment env,
char const *  sinkName,
MediaSink *&  resultSink 
) [static, inherited]

Definition at line 39 of file MediaSink.cpp.

References env, False, Medium::isSink(), Medium::lookupByName(), NULL, and True.

Referenced by RTPSink::lookupByName().

00040                                                         {
00041   resultSink = NULL; // unless we succeed
00042 
00043   Medium* medium;
00044   if (!Medium::lookupByName(env, sinkName, medium)) return False;
00045 
00046   if (!medium->isSink()) {
00047     env.setResultMsg(sinkName, " is not a media sink");
00048     return False;
00049   }
00050 
00051   resultSink = (MediaSink*)medium;
00052   return True;
00053 }

Boolean Medium::lookupByName ( UsageEnvironment env,
char const *  mediumName,
Medium *&  resultMedium 
) [static, inherited]

Definition at line 65 of file Media.cpp.

References env, False, MediaLookupTable::lookup(), NULL, MediaLookupTable::ourMedia(), UsageEnvironment::setResultMsg(), and True.

Referenced by ServerMediaSession::lookupByName(), RTSPServer::lookupByName(), RTSPClient::lookupByName(), RTCPInstance::lookupByName(), MediaSource::lookupByName(), MediaSink::lookupByName(), MediaSession::lookupByName(), and DarwinInjector::lookupByName().

00066                                                          {
00067   resultMedium = MediaLookupTable::ourMedia(env)->lookup(mediumName);
00068   if (resultMedium == NULL) {
00069     env.setResultMsg("Medium ", mediumName, " does not exist");
00070     return False;
00071   }
00072 
00073   return True;
00074 }

Boolean MediaSink::startPlaying ( MediaSource source,
afterPlayingFunc afterFunc,
void *  afterClientData 
) [inherited]

Definition at line 60 of file MediaSink.cpp.

References MediaSink::continuePlaying(), Medium::envir(), MediaSink::fAfterClientData, MediaSink::fAfterFunc, False, MediaSink::fSource, NULL, UsageEnvironment::setResultMsg(), MediaSink::source(), and MediaSink::sourceIsCompatibleWithUs().

Referenced by MPEG4VideoFileServerMediaSubsession::getAuxSDPLine(), getMPEG1or2TimeCode(), main(), play(), and StreamState::startPlaying().

00062                                                        {
00063   // Make sure we're not already being played:
00064   if (fSource != NULL) {
00065     envir().setResultMsg("This sink is already being played");
00066     return False;
00067   }
00068 
00069   // Make sure our source is compatible:
00070   if (!sourceIsCompatibleWithUs(source)) {
00071     envir().setResultMsg("MediaSink::startPlaying(): source is not compatible!");
00072     return False;
00073   }
00074   fSource = (FramedSource*)&source;
00075 
00076   fAfterFunc = afterFunc;
00077   fAfterClientData = afterClientData;
00078   return continuePlaying();
00079 }

void MediaSink::stopPlaying (  )  [virtual, inherited]

Reimplemented in H264VideoRTPSink, and MultiFramedRTPSink.

Definition at line 81 of file MediaSink.cpp.

References Medium::envir(), MediaSink::fAfterFunc, MediaSink::fSource, Medium::nextTask(), NULL, FramedSource::stopGettingFrames(), UsageEnvironment::taskScheduler(), and TaskScheduler::unscheduleDelayedTask().

Referenced by FileSink::afterGettingFrame1(), afterPlaying(), StreamState::pause(), MultiFramedRTPSink::stopPlaying(), and MediaSink::~MediaSink().

00081                             {
00082   // First, tell the source that we're no longer interested:
00083   if (fSource != NULL) fSource->stopGettingFrames();
00084 
00085   // Cancel any pending tasks:
00086   envir().taskScheduler().unscheduleDelayedTask(nextTask());
00087   nextTask() = NULL;
00088 
00089   fSource = NULL; // indicates that we can be played again
00090   fAfterFunc = NULL;
00091 }

Boolean MediaSink::isRTPSink (  )  const [virtual, inherited]

Reimplemented in RTPSink.

Definition at line 101 of file MediaSink.cpp.

References False.

Referenced by RTPSink::lookupByName().

00101                                    {
00102   return False; // default implementation
00103 }

FramedSource* MediaSink::source (  )  const [inline, inherited]

Definition at line 42 of file MediaSink.hh.

References MediaSink::fSource.

Referenced by AMRAudioFileSink::afterGettingFrame1(), JPEGVideoRTPSink::doSpecialFrameHandling(), MPEG4ESVideoRTPSink::sourceIsCompatibleWithUs(), MPEG1or2VideoRTPSink::sourceIsCompatibleWithUs(), MediaSink::sourceIsCompatibleWithUs(), JPEGVideoRTPSink::sourceIsCompatibleWithUs(), H264VideoRTPSink::sourceIsCompatibleWithUs(), AMRAudioRTPSink::sourceIsCompatibleWithUs(), AMRAudioFileSink::sourceIsCompatibleWithUs(), JPEGVideoRTPSink::specialHeaderSize(), and MediaSink::startPlaying().

00042 {return fSource;}

Boolean MediaSink::sourceIsCompatibleWithUs ( MediaSource source  )  [protected, virtual, inherited]

Reimplemented in AMRAudioFileSink, AMRAudioRTPSink, H264VideoFileSink, H264VideoRTPSink, JPEGVideoRTPSink, MPEG1or2VideoRTPSink, and MPEG4ESVideoRTPSink.

Definition at line 55 of file MediaSink.cpp.

References FramedSource::isFramedSource(), and MediaSink::source().

Referenced by MediaSink::startPlaying().

00055                                                                {
00056   // We currently support only framed sources.
00057   return source.isFramedSource();
00058 }

void MediaSink::onSourceClosure ( void *  clientData  )  [static, protected, inherited]

Definition at line 93 of file MediaSink.cpp.

References MediaSink::fAfterClientData, MediaSink::fAfterFunc, MediaSink::fSource, and NULL.

Referenced by DummySink::afterGettingFrame1(), FileSink::afterGettingFrame1(), DummySink::continuePlaying(), FileSink::continuePlaying(), BasicUDPSink::continuePlaying1(), ourOnSourceClosure(), and MultiFramedRTPSink::sendPacketIfNecessary().

00093                                                 {
00094   MediaSink* sink = (MediaSink*)clientData;
00095   sink->fSource = NULL; // indicates that we can be played again
00096   if (sink->fAfterFunc != NULL) {
00097     (*(sink->fAfterFunc))(sink->fAfterClientData);
00098   }
00099 }

void Medium::close ( UsageEnvironment env,
char const *  mediumName 
) [static, inherited]

Definition at line 76 of file Media.cpp.

References env, MediaLookupTable::ourMedia(), and MediaLookupTable::remove().

Referenced by afterPlaying(), Medium::close(), closeMediaSinks(), OnDemandServerMediaSubsession::closeStreamSource(), WAVAudioFileSource::createNew(), QCELPAudioRTPSource::createNew(), MP3HTTPSource::createNew(), MP3FileSource::createNew(), AMRAudioRTPSource::createNew(), WAVAudioFileServerMediaSubsession::createNewStreamSource(), MPEG1or2DemuxedServerMediaSubsession::createNewStreamSource(), MediaSubsession::deInitiate(), MediaSubsession::initiate(), MPEG1or2ProgramStreamFileDuration(), MPEG1or2Demux::noteElementaryStreamDeletion(), ByteStreamMultiFileSource::onSourceClosure1(), StreamState::reclaim(), RTSPServer::removeServerMediaSession(), OnDemandServerMediaSubsession::sdpLines(), shutdown(), H264VideoRTPSink::stopPlaying(), subsessionAfterPlaying(), ClientTrickPlayState::updateStateOnScaleChange(), AMRDeinterleaver::~AMRDeinterleaver(), ByteStreamMultiFileSource::~ByteStreamMultiFileSource(), DarwinInjector::~DarwinInjector(), FramedFilter::~FramedFilter(), H264VideoRTPSink::~H264VideoRTPSink(), InputESSourceRecord::~InputESSourceRecord(), MPEG1or2Demux::~MPEG1or2Demux(), MPEG1or2FileServerDemux::~MPEG1or2FileServerDemux(), MPEG2TransportFileServerMediaSubsession::~MPEG2TransportFileServerMediaSubsession(), MPEG2TransportStreamFromPESSource::~MPEG2TransportStreamFromPESSource(), ServerMediaSession::~ServerMediaSession(), and ServerMediaSubsession::~ServerMediaSubsession().

00076                                                           {
00077   MediaLookupTable::ourMedia(env)->remove(name);
00078 }

void Medium::close ( Medium medium  )  [static, inherited]

Definition at line 80 of file Media.cpp.

References Medium::close(), Medium::envir(), Medium::name(), and NULL.

00080                                  {
00081   if (medium == NULL) return;
00082 
00083   close(medium->envir(), medium->name());
00084 }

UsageEnvironment& Medium::envir (  )  const [inline, inherited]

Definition at line 59 of file Media.hh.

References Medium::fEnviron.

Referenced by QuickTimeFileSink::addArbitraryString(), FileSink::addData(), MPEG2IFrameIndexFromTransportStream::addToTail(), StreamParser::afterGettingBytes(), MultiFramedRTPSink::afterGettingFrame1(), InputESSourceRecord::afterGettingFrame1(), MPEG2TransportStreamFramer::afterGettingFrame1(), MPEG2IFrameIndexFromTransportStream::afterGettingFrame1(), afterGettingFrame1(), BasicUDPSink::afterGettingFrame1(), MPEG4VideoFileServerMediaSubsession::afterPlayingDummy1(), MPEG4VideoStreamParser::analyzeVOLHeader(), RTSPClient::announceSDPDescription(), announceStream(), MPEG4VideoFileServerMediaSubsession::checkForAuxSDPLine1(), Medium::close(), MPEG2IFrameIndexFromTransportStream::compactParseBuffer(), QuickTimeFileSink::continuePlaying(), continuePlaying(), H264VideoRTPSink::continuePlaying(), AVIFileSink::continuePlaying(), MPEG4VideoFileServerMediaSubsession::createNewRTPSink(), MPEG2TransportFileServerMediaSubsession::createNewRTPSink(), MPEG1or2VideoFileServerMediaSubsession::createNewRTPSink(), MPEG1or2DemuxedServerMediaSubsession::createNewRTPSink(), H263plusVideoFileServerMediaSubsession::createNewRTPSink(), AMRAudioFileServerMediaSubsession::createNewRTPSink(), ADTSAudioFileServerMediaSubsession::createNewRTPSink(), MPEG4VideoFileServerMediaSubsession::createNewStreamSource(), MPEG2TransportFileServerMediaSubsession::createNewStreamSource(), MPEG1or2VideoFileServerMediaSubsession::createNewStreamSource(), MPEG1or2DemuxedServerMediaSubsession::createNewStreamSource(), H263plusVideoFileServerMediaSubsession::createNewStreamSource(), AMRAudioFileServerMediaSubsession::createNewStreamSource(), ADTSAudioFileServerMediaSubsession::createNewStreamSource(), MPEG2IFrameIndexFromTransportStream::deliverIndexRecord(), SegmentQueue::dequeue(), RTSPClient::describeURL(), WAVAudioFileSource::doGetNextFrame(), MPEG2IFrameIndexFromTransportStream::doGetNextFrame(), MP3FileSource::doGetNextFrame(), H264FUAFragmenter::doGetNextFrame(), ByteStreamMultiFileSource::doGetNextFrame(), ByteStreamFileSource::doGetNextFrame(), BasicUDPSource::doGetNextFrame(), AMRAudioFileSource::doGetNextFrame(), ADTSAudioFileSource::doGetNextFrame(), MultiFramedRTPSource::doGetNextFrame1(), MP3FileSource::doGetNextFrame1(), ADUFromMP3Source::doGetNextFrame1(), SIPClient::doInviteStateMachine(), ByteStreamFileSource::doReadFromFile(), MPEG1or2VideoRTPSink::doSpecialFrameHandling(), MP3ADURTPSink::doSpecialFrameHandling(), H263plusVideoRTPSink::doSpecialFrameHandling(), ByteStreamFileSource::doStopGettingFrames(), BasicUDPSource::doStopGettingFrames(), SegmentQueue::enqueueNewSegment(), StreamParser::ensureValidBytes1(), MediaSubsession::env(), SubsessionIOState::envir(), RTSPServer::RTSPClientSession::envir(), RTSPOverHTTPServer::HTTPClientConnection::envir(), RTPInterface::envir(), AVISubsessionIOState::envir(), ServerMediaSession::generateSDPDescription(), RTPSource::getAttributes(), MP3FileSource::getAttributes(), MP3ADUTranscoder::getAttributes(), MediaSource::getAttributes(), MPEG4VideoFileServerMediaSubsession::getAuxSDPLine(), RTSPClient::getMediaSessionParameter(), getMPEG1or2TimeCode(), FramedSource::getNextFrame(), getOptionsResponse(), SIPClient::getResponse(), RTSPClient::getResponse(), RTSPClient::getResponse1(), SIPClient::getResponseCode(), getSDPDescriptionFromURL(), OnDemandServerMediaSubsession::getStreamParameters(), RTSPServer::incomingConnectionHandler1(), RTSPOverHTTPServer::incomingConnectionHandler1(), RTCPInstance::incomingReportHandler1(), RTSPClient::incomingRequestHandler1(), MP3FileSource::initializeStream(), MediaSession::initializeWithSDP(), MediaSession::initiateByMediaType(), SIPClient::invite1(), DynamicRTSPServer::lookupServerMediaSession(), MPEG4GenericRTPSource::MPEG4GenericRTPSource(), MPEG1or2FileServerDemux::newElementaryStream(), MPEG1or2Demux::newElementaryStream(), MPEG4GenericBufferedPacket::nextEnclosedFrameSize(), AMRBufferedPacket::nextEnclosedFrameSize(), RTSPClient::openConnectionFromURL(), MPEG2TransportStreamIndexFile::openFid(), MPEG2IFrameIndexFromTransportStream::parseFrame(), AC3AudioStreamParser::parseFrame(), RTSPClient::parseGetParameterHeader(), MPEGProgramStreamParser::parsePackHeader(), MPEGProgramStreamParser::parsePESPacket(), SIPClient::parseResponseCode(), RTSPClient::parseResponseCode(), MediaSession::parseSDPLine(), MPEG1or2VideoStreamParser::parseSlice(), MPEGProgramStreamParser::parseSystemHeader(), MPEG4VideoStreamParser::parseVideoObjectLayer(), MPEG4VideoStreamParser::parseVideoObjectPlane(), MPEG4VideoStreamParser::parseVisualObject(), RTSPClient::pauseMediaSession(), RTSPClient::pauseMediaSubsession(), RTSPClient::playMediaSession(), RTSPClient::playMediaSubsession(), AC3AudioRTPSource::processSpecialHeader(), SIPClient::processURL(), AC3AudioStreamParser::readAndSaveAFrame(), RTSPClient::recordMediaSubsession(), MPEG1or2Demux::registerReadInterest(), RTCPInstance::reschedule(), RTSPServer::rtspURLPrefix(), RTCPInstance::schedule(), OnDemandServerMediaSubsession::sdpLines(), SIPClient::sendACK(), SIPClient::sendBYE(), SIPClient::sendINVITE(), RTSPClient::sendOptionsCmd(), MultiFramedRTPSink::sendPacketIfNecessary(), SIPClient::sendRequest(), RTSPClient::sendRequest(), DarwinInjector::setDestination(), RTSPClient::setMediaSessionParameter(), RTSPClient::setupHTTPTunneling(), RTSPClient::setupMediaSubsession(), QuickTimeFileSink::setWord(), AVIFileSink::setWord(), SIPClient::SIPClient(), AMRAudioRTPSink::sourceIsCompatibleWithUs(), QuickTimeFileSink::startPlaying(), StreamState::startPlaying(), MediaSink::startPlaying(), AVIFileSink::startPlaying(), MediaSink::stopPlaying(), RTSPClient::teardownMediaSession(), RTSPClient::teardownMediaSubsession(), SIPClient::timerAHandler(), SIPClient::timerBHandler(), SIPClient::timerDHandler(), ClientTrickPlayState::updateStateOnScaleChange(), MPEG2TransportStreamFramer::updateTSPacketDurationEstimate(), BasicUDPSource::~BasicUDPSource(), ByteStreamFileSource::~ByteStreamFileSource(), RTSPOverHTTPServer::HTTPClientConnection::~HTTPClientConnection(), RTSPClient::~RTSPClient(), and RTSPServer::~RTSPServer().

00059 {return fEnviron;}

char const* Medium::name (  )  const [inline, inherited]

Definition at line 61 of file Media.hh.

References Medium::fMediumName.

Referenced by QuickTimeFileSink::addAtom_hdlr2(), Medium::close(), MP3ADUTranscoder::createNew(), MP3FromADUSource::createNew(), ADUFromMP3Source::createNew(), and MP3FileSource::initializeStream().

00061 {return fMediumName;}

Boolean Medium::isSource (  )  const [virtual, inherited]

Reimplemented in MediaSource.

Definition at line 86 of file Media.cpp.

References False.

Referenced by MediaSource::lookupByName().

00086                                {
00087   return False; // default implementation
00088 }

Boolean Medium::isRTCPInstance (  )  const [virtual, inherited]

Reimplemented in RTCPInstance.

Definition at line 94 of file Media.cpp.

References False.

Referenced by RTCPInstance::lookupByName().

00094                                      {
00095   return False; // default implementation
00096 }

Boolean Medium::isRTSPClient (  )  const [virtual, inherited]

Reimplemented in RTSPClient.

Definition at line 98 of file Media.cpp.

References False.

Referenced by RTSPClient::lookupByName().

00098                                    {
00099   return False; // default implementation
00100 }

Boolean Medium::isRTSPServer (  )  const [virtual, inherited]

Reimplemented in RTSPServer.

Definition at line 102 of file Media.cpp.

References False.

Referenced by RTSPServer::lookupByName().

00102                                    {
00103   return False; // default implementation
00104 }

Boolean Medium::isMediaSession (  )  const [virtual, inherited]

Reimplemented in MediaSession.

Definition at line 106 of file Media.cpp.

References False.

Referenced by MediaSession::lookupByName().

00106                                      {
00107   return False; // default implementation
00108 }

Boolean Medium::isServerMediaSession (  )  const [virtual, inherited]

Reimplemented in ServerMediaSession.

Definition at line 110 of file Media.cpp.

References False.

Referenced by ServerMediaSession::lookupByName().

00110                                            {
00111   return False; // default implementation
00112 }

Boolean Medium::isDarwinInjector (  )  const [virtual, inherited]

Reimplemented in DarwinInjector.

Definition at line 114 of file Media.cpp.

References False.

Referenced by DarwinInjector::lookupByName().

00114                                        {
00115   return False; // default implementation
00116 }

TaskToken& Medium::nextTask (  )  [inline, protected, inherited]

Definition at line 77 of file Media.hh.

References Medium::fNextTask.

Referenced by BasicUDPSink::afterGettingFrame1(), MPEG4VideoFileServerMediaSubsession::afterPlayingDummy1(), MPEG4VideoFileServerMediaSubsession::checkForAuxSDPLine1(), WAVAudioFileSource::doGetNextFrame(), MP3FileSource::doGetNextFrame(), AMRAudioFileSource::doGetNextFrame(), ADTSAudioFileSource::doGetNextFrame(), MultiFramedRTPSource::doGetNextFrame1(), ByteStreamFileSource::doReadFromFile(), RTCPInstance::reschedule(), RTCPInstance::schedule(), MultiFramedRTPSink::sendPacketIfNecessary(), and MediaSink::stopPlaying().

00077                         {
00078         return fNextTask;
00079   }


Field Documentation

int HTTPSink::fSocket [private]

Definition at line 60 of file HTTPSink.hh.

Referenced by continuePlaying(), and ~HTTPSink().

unsigned char HTTPSink::fBuffer[10000] [private]

Definition at line 61 of file HTTPSink.hh.

Referenced by afterGettingFrame1(), and continuePlaying().

int HTTPSink::fClientSocket [private]

Definition at line 62 of file HTTPSink.hh.

Referenced by afterGettingFrame1(), continuePlaying(), and ourOnSourceClosure().

FramedSource* MediaSink::fSource [protected, inherited]

Definition at line 57 of file MediaSink.hh.

Referenced by AMRAudioFileSink::afterGettingFrame1(), MPEG4ESVideoRTPSink::auxSDPLine(), DummySink::continuePlaying(), continuePlaying(), H264VideoRTPSink::continuePlaying(), FileSink::continuePlaying(), BasicUDPSink::continuePlaying1(), MPEG4ESVideoRTPSink::doSpecialFrameHandling(), MPEG1or2VideoRTPSink::doSpecialFrameHandling(), JPEGVideoRTPSink::doSpecialFrameHandling(), AMRAudioRTPSink::doSpecialFrameHandling(), MediaSink::onSourceClosure(), MultiFramedRTPSink::packFrame(), MediaSink::source(), JPEGVideoRTPSink::specialHeaderSize(), MediaSink::startPlaying(), MediaSink::stopPlaying(), H264VideoRTPSink::stopPlaying(), and H264VideoRTPSink::~H264VideoRTPSink().


The documentation for this class was generated from the following files:
Generated on Tue Jul 22 06:40:46 2008 for live by  doxygen 1.5.2