• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 
19 #ifndef STILL_IMAGE_MEDIAINFO_H
20 #define STILL_IMAGE_MEDIAINFO_H
21 
22 #include "sdp_memory.h"
23 #include "media_info.h"
24 
25 class still_image_mediaInfo : public mediaInfo
26 {
27     private:
28         int bitRate;
29         OSCL_HeapString<SDPParserAlloc> payload;
30     public:
still_image_mediaInfo()31         still_image_mediaInfo()
32         {
33             mediaInfo();
34             setMIMEType("X-MP4V-IMAGE");
35             bitRate = -1;
36             payload = NULL;
37             totalStringLength = oscl_strlen("m=application 0 RTSP/GET_PARAMETER IMAGE");
38         };
39 
still_image_mediaInfo(const still_image_mediaInfo & pSource)40         still_image_mediaInfo(const still_image_mediaInfo &pSource) : mediaInfo(pSource)
41         {
42             setBitRate(pSource.bitRate);
43             setPayload(pSource.payload);
44         }
45 
~still_image_mediaInfo()46         ~still_image_mediaInfo() {};
47 
setBitRate(int bRate)48         inline void setBitRate(int bRate)
49         {
50             bitRate = bRate;
51         };
setPayload(char * pload)52         inline void setPayload(char* pload)
53         {
54             payload = pload;
55         };
setPayload(OSCL_HeapString<SDPParserAlloc> pload)56         inline void setPayload(OSCL_HeapString<SDPParserAlloc> pload)
57         {
58             payload = pload;
59         };
60 
getBitRate()61         inline int getBitRate()
62         {
63             return bitRate;
64         };
getPayload()65         inline char* getPayload()
66         {
67             return (char *)payload.get_cstr();
68         };
69 };
70 
71 #endif
72