blob: f39e29838979dd95c3109850efb25fe760484353 [file] [log] [blame]
/* ------------------------------------------------------------------
* Copyright (C) 2008 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied.
* See the License for the specific language governing permissions
* and limitations under the License.
* -------------------------------------------------------------------
*/
/* */
/* ===================================================================== */
/* File: still_imageMediaInfoParser.cpp */
/* Description: */
/* */
/* */
/* Rev: */
/* Created: 05/24/01 */
/* ===================================================================== */
/* */
/* Revision History: */
/* */
/* Rev: */
/* Date: */
/* Description: */
/* */
/* //////////////////////////////////////////////////////////////////////// */
#include "still_image_media_info_parser.h"
#include "oscl_string_utils.h"
/* ========================================================================== */
/* Function : parsePayload(char *buff,mediaInfo* still_imageI,int index) */
/* Date : 05/24/2001 */
/* Purpose : Parses still image text and fills out the still image structure*/
/* In/out : */
/* Return : */
/* Modified : */
/* ========================================================================== */
SDP_ERROR_CODE
SDPStillImageMediaInfoParser::parseMediaInfo(const char *buff, const int index, SDPInfo *sdp, payloadVector payload_vec, bool isSipSdp, int alt_id, bool alt_def_id)
{
OSCL_UNUSED_ARG(buff);
OSCL_UNUSED_ARG(index);
OSCL_UNUSED_ARG(payload_vec);
OSCL_UNUSED_ARG(isSipSdp);
OSCL_UNUSED_ARG(alt_id);
OSCL_UNUSED_ARG(alt_def_id);
void *memory = sdp->alloc(sizeof(still_image_mediaInfo), 0);
if (NULL == memory)
{
PVMF_SDP_PARSER_LOGERROR((0, "SDPStillImageMediaInfoParser::parseMediaInfo - Unable to allocate memory"));
return SDP_NO_MEMORY;
}
else
{
still_image_mediaInfo *still_imageI = OSCL_PLACEMENT_NEW(memory, still_image_mediaInfo());
still_imageI->setMediaInfoID(sdp->getMediaObjectIndex());
if (NULL == still_imageI)
return SDP_FAILURE;
return SDP_SUCCESS;
}
}