function DeleteCodec(req,res){
    logger.debug("DVP-UserService.DeleteCodec Internal method ");

    var jsonString;
    Codec.findOne({codec: req.params.codec}, function (err, codecObj) {
        if (err) {
            jsonString = messageFormatter.FormatMessage(err, "Get Codec Failed", false, undefined);
            res.end(jsonString);
        } else {
            if (codecObj) {
                codecObj.remove(function (err) {
                    if (err) {
                        jsonString = messageFormatter.FormatMessage(err, "Delete Codec Failed", false, undefined);
                    } else {
                        jsonString = messageFormatter.FormatMessage(undefined, "Codec successfully deleted", true, undefined);
                    }
                    res.end(jsonString);
                });
            } else {
                jsonString = messageFormatter.FormatMessage(undefined, "Delete Codec, Codec object is null", false, undefined);
                res.end(jsonString);
            }
        }
    });
}
function GetAllActiveCodec(req, res){
    logger.debug("DVP-UserService.GetAllActiveCodec Internal method ");
    var jsonString;
    Codec.find({active: true}, function(err, codecObj) {
        if (err) {
            jsonString = messageFormatter.FormatMessage(err, "Get Codec Failed", false, undefined);
        }else{
            jsonString = messageFormatter.FormatMessage(err, "Get Codec Successful", true, codecObj);
        }
        res.end(jsonString);
    });
}
function UpdateCodec(req, res){
    logger.debug("DVP-UserService.UpdateCodec Internal method ");

    var jsonString;

    req.body.codec = req.params.codec;
    Codec.findOneAndUpdate({codec: req.params.codec}, req.body, function(err, codecObj) {
        if (err) {
            jsonString = messageFormatter.FormatMessage(err, "Update Codec Failed", false, undefined);
        }else{
            jsonString = messageFormatter.FormatMessage(err, "Update Codec Successful", true, codecObj);
        }
        res.end(jsonString);
    });
}