Guest User

MPEG2TransportStreamFromESSource4iOS.hh

a guest
Dec 23rd, 2011
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.23 KB | None | 0 0
  1. /**********
  2. This library is free software; you can redistribute it and/or modify it under
  3. the terms of the GNU Lesser General Public License as published by the
  4. Free Software Foundation; either version 2.1 of the License, or (at your
  5. option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
  6.  
  7. This library is distributed in the hope that it will be useful, but WITHOUT
  8. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
  10. more details.
  11.  
  12. You should have received a copy of the GNU Lesser General Public License
  13. along with this library; if not, write to the Free Software Foundation, Inc.,
  14. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
  15. **********/
  16. // "liveMedia"
  17. // Copyright (c) 1996-2011 Live Networks, Inc.  All rights reserved.
  18. // A filter for converting one or more MPEG Elementary Streams
  19. // to a MPEG-2 Transport Stream
  20. // C++ header
  21.  
  22. #ifndef _MPEG2_TRANSPORT_STREAM_FROM_ES_SOURCE_4_IOS_HH
  23. #define _MPEG2_TRANSPORT_STREAM_FROM_ES_SOURCE_4_IOS_HH
  24.  
  25. #ifndef _MPEG2_TRANSPORT_STREAM_MULTIPLEXOR_HH
  26. #include "MPEG2TransportStreamMultiplexor4iOS.hh"
  27. #endif
  28.  
  29. class MPEG2TransportStreamFromESSource4iOS: public MPEG2TransportStreamMultiplexor4iOS {
  30. public:
  31.   static MPEG2TransportStreamFromESSource4iOS* createNew(UsageEnvironment& env);
  32.  
  33.   void addNewVideoSource(FramedSource* inputSource, int mpegVersion);
  34.       // Note: For MPEG-4 video, set "mpegVersion" to 4; for H.264 video, set "mpegVersion"to 5.
  35.   void addNewAudioSource(FramedSource* inputSource, int mpegVersion);
  36.  
  37. protected:
  38.   MPEG2TransportStreamFromESSource4iOS(UsageEnvironment& env);
  39.       // called only by createNew()
  40.   virtual ~MPEG2TransportStreamFromESSource4iOS();
  41.  
  42. private:
  43.   // Redefined virtual functions:
  44.   virtual void doStopGettingFrames();
  45.   virtual void awaitNewBuffer(unsigned char* oldBuffer);
  46.  
  47. private:
  48.   void addNewInputSource(FramedSource* inputSource,
  49.              u_int8_t streamId, int mpegVersion);
  50.   // used to implement addNew*Source() above
  51.  
  52. private:
  53.   friend class InputESSourceRecord4iOS;
  54.   class InputESSourceRecord4iOS* fInputSources;
  55.   unsigned fVideoSourceCounter, fAudioSourceCounter;
  56. };
  57.  
  58. #endif
Add Comment
Please, Sign In to add comment