live
MPEG1or2FileServerDemux.hh
Go to the documentation of this file.
1/**********
2This library is free software; you can redistribute it and/or modify it under
3the terms of the GNU Lesser General Public License as published by the
4Free Software Foundation; either version 3 of the License, or (at your
5option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
6
7This library is distributed in the hope that it will be useful, but WITHOUT
8ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10more details.
11
12You should have received a copy of the GNU Lesser General Public License
13along with this library; if not, write to the Free Software Foundation, Inc.,
1451 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15**********/
16// "liveMedia"
17// Copyright (c) 1996-2024 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
32public:
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
46private:
47 MPEG1or2FileServerDemux(UsageEnvironment& env, char const* fileName,
48 Boolean reuseFirstSource);
49 // called only by createNew();
51
52private:
55 u_int8_t streamIdTag);
56
57 static void onDemuxDeletion(void* clientData, MPEG1or2Demux* demuxBeingDeleted);
58 void onDemuxDeletion(MPEG1or2Demux* demuxBeingDeleted);
59
60private:
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
MPEG1or2DemuxedElementaryStream * newElementaryStream(unsigned clientSessionId, u_int8_t streamIdTag)
ServerMediaSubsession * newAudioServerMediaSubsession()
ServerMediaSubsession * newAC3AudioServerMediaSubsession()
void onDemuxDeletion(MPEG1or2Demux *demuxBeingDeleted)
static void onDemuxDeletion(void *clientData, MPEG1or2Demux *demuxBeingDeleted)
MPEG1or2FileServerDemux(UsageEnvironment &env, char const *fileName, Boolean reuseFirstSource)
ServerMediaSubsession * newVideoServerMediaSubsession(Boolean iFramesOnly=False, double vshPeriod=5.0)
static MPEG1or2FileServerDemux * createNew(UsageEnvironment &env, char const *fileName, Boolean reuseFirstSource)
virtual ~MPEG1or2FileServerDemux()
Definition: Media.hh:50