From 15d0c49e85159b9e27870aff5280c0cd95b103c4 Mon Sep 17 00:00:00 2001 From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674> Date: 星期四, 04 五月 2017 17:16:56 +0800 Subject: [PATCH] --- VisitFace/RtspNativeCodec/app/libs/live555/include/liveMedia/MPEG1or2DemuxedElementaryStream.hh | 69 ++++++++++++++++++++++++++++++++++ 1 files changed, 69 insertions(+), 0 deletions(-) diff --git a/VisitFace/RtspNativeCodec/app/libs/live555/include/liveMedia/MPEG1or2DemuxedElementaryStream.hh b/VisitFace/RtspNativeCodec/app/libs/live555/include/liveMedia/MPEG1or2DemuxedElementaryStream.hh new file mode 100644 index 0000000..cc09d99 --- /dev/null +++ b/VisitFace/RtspNativeCodec/app/libs/live555/include/liveMedia/MPEG1or2DemuxedElementaryStream.hh @@ -0,0 +1,69 @@ +/********** +This library is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the +Free Software Foundation; either version 3 of the License, or (at your +option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.) + +This library is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for +more details. + +You should have received a copy of the GNU Lesser General Public License +along with this library; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +**********/ +// "liveMedia" +// Copyright (c) 1996-2017 Live Networks, Inc. All rights reserved. +// A MPEG 1 or 2 Elementary Stream, demultiplexed from a Program Stream +// C++ header + +#ifndef _MPEG_1OR2_DEMUXED_ELEMENTARY_STREAM_HH +#define _MPEG_1OR2_DEMUXED_ELEMENTARY_STREAM_HH + +#ifndef _MPEG_1OR2_DEMUX_HH +#include "MPEG1or2Demux.hh" +#endif + +class MPEG1or2DemuxedElementaryStream: public FramedSource { +public: + MPEG1or2Demux::SCR lastSeenSCR() const { return fLastSeenSCR; } + + unsigned char mpegVersion() const { return fMPEGversion; } + + MPEG1or2Demux& sourceDemux() const { return fOurSourceDemux; } + +private: // We are created only by a MPEG1or2Demux (a friend) + MPEG1or2DemuxedElementaryStream(UsageEnvironment& env, + u_int8_t streamIdTag, + MPEG1or2Demux& sourceDemux); + virtual ~MPEG1or2DemuxedElementaryStream(); + +private: + // redefined virtual functions: + virtual void doGetNextFrame(); + virtual void doStopGettingFrames(); + virtual char const* MIMEtype() const; + virtual unsigned maxFrameSize() const; + +private: + static void afterGettingFrame(void* clientData, + unsigned frameSize, unsigned numTruncatedBytes, + struct timeval presentationTime, + unsigned durationInMicroseconds); + + void afterGettingFrame1(unsigned frameSize, unsigned numTruncatedBytes, + struct timeval presentationTime, + unsigned durationInMicroseconds); + +private: + u_int8_t fOurStreamIdTag; + MPEG1or2Demux& fOurSourceDemux; + char const* fMIMEtype; + MPEG1or2Demux::SCR fLastSeenSCR; + unsigned char fMPEGversion; + + friend class MPEG1or2Demux; +}; + +#endif -- Gitblit v1.8.0