live
ByteStreamMultiFileSource.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 source that consists of multiple byte-stream files, read sequentially.
19// (The input is an array of file names, with a terminating 'file name' of NULL.)
20// C++ header
21
22#ifndef _BYTE_STREAM_MULTI_FILE_SOURCE_HH
23#define _BYTE_STREAM_MULTI_FILE_SOURCE_HH
24
25#ifndef _BYTE_STREAM_FILE_SOURCE_HH
27#endif
28
30public:
32 createNew(UsageEnvironment& env, char const** fileNameArray,
33 unsigned preferredFrameSize = 0, unsigned playTimePerFrame = 0);
34 // "fileNameArray" is a pointer to an array of (char const*) file names, with
35 // A 'file name' of NULL indicating the end of the array
36
38 // True iff the most recently delivered frame was the first from a newly-opened file
39
40protected:
41 ByteStreamMultiFileSource(UsageEnvironment& env, char const** fileNameArray,
42 unsigned preferredFrameSize, unsigned playTimePerFrame);
43 // called only by createNew()
44
46
47private:
48 // redefined virtual functions:
49 virtual void doGetNextFrame();
50
51private:
52 static void onSourceClosure(void* clientData);
54 static void afterGettingFrame(void* clientData,
55 unsigned frameSize, unsigned numTruncatedBytes,
56 struct timeval presentationTime,
57 unsigned durationInMicroseconds);
58
59private:
62 unsigned fNumSources;
65 char const** fFileNameArray;
67};
68
69#endif
unsigned char Boolean
Definition: Boolean.hh:25
ByteStreamFileSource ** fSourceArray
static ByteStreamMultiFileSource * createNew(UsageEnvironment &env, char const **fileNameArray, unsigned preferredFrameSize=0, unsigned playTimePerFrame=0)
virtual ~ByteStreamMultiFileSource()
static void onSourceClosure(void *clientData)
virtual void doGetNextFrame()
static void afterGettingFrame(void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
ByteStreamMultiFileSource(UsageEnvironment &env, char const **fileNameArray, unsigned preferredFrameSize, unsigned playTimePerFrame)