PlayerEndPoint::PlayerEndPoint (MediaSet &mediaSet, std::shared_ptr<MediaPipeline> parent, const std::map<std::string, KmsMediaParam> ¶ms) throw (KmsMediaServerException) : UriEndPoint (mediaSet, parent, g_KmsMediaPlayerEndPointType_constants.TYPE_NAME, params) { const KmsMediaParam *p; KmsMediaUriEndPointConstructorParams uriEpParams; p = getParam (params, g_KmsMediaUriEndPointType_constants.CONSTRUCTOR_PARAMS_DATA_TYPE); if (p == NULL) { KmsMediaServerException except; createKmsMediaServerException (except, g_KmsMediaErrorCodes_constants.MEDIA_OBJECT_ILLEGAL_PARAM_ERROR, "Param '" + g_KmsMediaUriEndPointType_constants.CONSTRUCTOR_PARAMS_DATA_TYPE + "' not found"); throw except; } unmarshalKmsMediaUriEndPointConstructorParams (uriEpParams, p->data); init (parent, uriEpParams.uri); }
RecorderEndPoint::RecorderEndPoint (MediaSet &mediaSet, std::shared_ptr<MediaPipeline> parent, const std::map<std::string, KmsMediaParam> ¶ms) throw (KmsMediaServerException) : UriEndPoint (mediaSet, parent, g_KmsMediaRecorderEndPointType_constants.TYPE_NAME, params) { const KmsMediaParam *p; KmsMediaUriEndPointConstructorParams uriEpParams; KmsMediaRecoderEndPointConstructorParams recorderParams; KmsMediaProfile profile; p = getParam (params, g_KmsMediaUriEndPointType_constants.CONSTRUCTOR_PARAMS_DATA_TYPE); if (p == NULL) { KmsMediaServerException except; createKmsMediaServerException (except, g_KmsMediaErrorCodes_constants.MEDIA_OBJECT_ILLEGAL_PARAM_ERROR, "Param '" + g_KmsMediaUriEndPointType_constants.CONSTRUCTOR_PARAMS_DATA_TYPE + "' not found"); throw except; } unmarshalKmsMediaUriEndPointConstructorParams (uriEpParams, p->data); //unmarshal KmsMediaRecoderEndPointConstructorParams p = getParam (params, g_KmsMediaRecorderEndPointType_constants.CONSTRUCTOR_PARAMS_DATA_TYPE); profile.mediaMuxer = KmsMediaMuxer::WEBM; if (p != NULL) { unmarshalStruct (recorderParams, p->data); if (recorderParams.__isset.profileType) { profile = recorderParams.profileType; } } init (parent, uriEpParams.uri, profile); }