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-2020 Live Networks, Inc. All rights reserved. |
18 | // A filter that breaks up an H263 video elementary stream into frames. |
19 | // Author Benhard Feiten |
20 | |
21 | #ifndef _H263PLUS_VIDEO_STREAM_FRAMER_HH |
22 | #define _H263PLUS_VIDEO_STREAM_FRAMER_HH |
23 | |
24 | #ifndef _FRAMED_FILTER_HH |
25 | #include "FramedFilter.hh" |
26 | #endif |
27 | |
28 | |
29 | class H263plusVideoStreamFramer: public FramedFilter { |
30 | public: |
31 | |
32 | static H263plusVideoStreamFramer* createNew(UsageEnvironment& env, FramedSource* inputSource); |
33 | |
34 | Boolean& pictureEndMarker() { return fPictureEndMarker; } // a hack for implementing the RTP 'M' bit |
35 | |
36 | protected: |
37 | // Constructor called only by createNew(), or by subclass constructors |
38 | H263plusVideoStreamFramer(UsageEnvironment& env, |
39 | FramedSource* inputSource, |
40 | Boolean createParser = True); |
41 | virtual ~H263plusVideoStreamFramer(); |
42 | |
43 | |
44 | public: |
45 | static void continueReadProcessing(void* clientData, |
46 | unsigned char* ptr, unsigned size, |
47 | struct timeval presentationTime); |
48 | void continueReadProcessing(); |
49 | |
50 | private: |
51 | virtual void doGetNextFrame(); |
52 | virtual Boolean isH263plusVideoStreamFramer() const; |
53 | |
54 | protected: |
55 | double fFrameRate; |
56 | unsigned fPictureCount; // hack used to implement doGetNextFrame() ?? |
57 | Boolean fPictureEndMarker; |
58 | |
59 | private: |
60 | class H263plusVideoStreamParser* fParser; |
61 | struct timeval fPresentationTimeBase; |
62 | }; |
63 | |
64 | #endif |
65 | |