live
MPEG1or2FileServerDemux.hh
Go to the documentation of this file.
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 3 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-2021 Live Networks, Inc. All rights reserved.
18 // A server demultiplexer for a MPEG 1 or 2 Program Stream
19 // C++ header
20 
21 #ifndef _MPEG_1OR2_FILE_SERVER_DEMUX_HH
22 #define _MPEG_1OR2_FILE_SERVER_DEMUX_HH
23 
24 #ifndef _SERVER_MEDIA_SESSION_HH
25 #include "ServerMediaSession.hh"
26 #endif
27 #ifndef _MPEG_1OR2_DEMUXED_ELEMENTARY_STREAM_HH
29 #endif
30 
32 public:
34  createNew(UsageEnvironment& env, char const* fileName, Boolean reuseFirstSource);
35 
38  double vshPeriod = 5.0
39  /* how often (in seconds) to inject a Video_Sequence_Header,
40  if one doesn't already appear in the stream */);
42 
43  unsigned fileSize() const { return fFileSize; }
44  float fileDuration() const { return fFileDuration; }
45 
46 private:
47  MPEG1or2FileServerDemux(UsageEnvironment& env, char const* fileName,
48  Boolean reuseFirstSource);
49  // called only by createNew();
51 
52 private:
55  u_int8_t streamIdTag);
56 
57  static void onDemuxDeletion(void* clientData, MPEG1or2Demux* demuxBeingDeleted);
58  void onDemuxDeletion(MPEG1or2Demux* demuxBeingDeleted);
59 
60 private:
61  char const* fFileName;
62  unsigned fFileSize;
68 };
69 
70 #endif
const Boolean False
Definition: Boolean.hh:28
unsigned char Boolean
Definition: Boolean.hh:25
ServerMediaSubsession * newAC3AudioServerMediaSubsession()
void onDemuxDeletion(MPEG1or2Demux *demuxBeingDeleted)
static void onDemuxDeletion(void *clientData, MPEG1or2Demux *demuxBeingDeleted)
MPEG1or2DemuxedElementaryStream * newElementaryStream(unsigned clientSessionId, u_int8_t streamIdTag)
ServerMediaSubsession * newVideoServerMediaSubsession(Boolean iFramesOnly=False, double vshPeriod=5.0)
static MPEG1or2FileServerDemux * createNew(UsageEnvironment &env, char const *fileName, Boolean reuseFirstSource)
MPEG1or2FileServerDemux(UsageEnvironment &env, char const *fileName, Boolean reuseFirstSource)
ServerMediaSubsession * newAudioServerMediaSubsession()
virtual ~MPEG1or2FileServerDemux()
Definition: Media.hh:50