• 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 #include "still_image_media_info_parser.h"
19 #include "oscl_string_utils.h"
20 
21 SDP_ERROR_CODE
parseMediaInfo(const char * buff,const int index,SDPInfo * sdp,payloadVector payload_vec,bool isSipSdp,int alt_id,bool alt_def_id)22 SDPStillImageMediaInfoParser::parseMediaInfo(const char *buff, const int index, SDPInfo *sdp, payloadVector payload_vec, bool isSipSdp, int alt_id, bool alt_def_id)
23 {
24 
25     OSCL_UNUSED_ARG(buff);
26     OSCL_UNUSED_ARG(index);
27     OSCL_UNUSED_ARG(payload_vec);
28     OSCL_UNUSED_ARG(isSipSdp);
29     OSCL_UNUSED_ARG(alt_id);
30     OSCL_UNUSED_ARG(alt_def_id);
31 
32     void *memory = sdp->alloc(sizeof(still_image_mediaInfo), 0);
33     if (NULL == memory)
34     {
35         PVMF_SDP_PARSER_LOGERROR((0, "SDPStillImageMediaInfoParser::parseMediaInfo - Unable to allocate memory"));
36         return SDP_NO_MEMORY;
37     }
38     else
39     {
40         still_image_mediaInfo *still_imageI = OSCL_PLACEMENT_NEW(memory, still_image_mediaInfo());
41 
42         still_imageI->setMediaInfoID(sdp->getMediaObjectIndex());
43 
44         if (NULL == still_imageI)
45             return SDP_FAILURE;
46         return SDP_SUCCESS;
47     }
48 
49 }
50 
51