view stream/freesdp/errorlist.c @ 33644:c15dabfa2380

Do a proper calculation of free RAM to be used as V4L buffers. The code uses sysinfo to query the available RAM, however it used ancient form available is some early development 2.3.x kernels. Newer form reports the size in memory units (usually same as page size), as result the code would fallback to 2 buffers even on multi GB system. The commit does: Improve the check in configure to ensure that we do use sysinfo struct with present mem_unit. Use free ram instead of total ram (to avoid swapping). Tweak memory constants and simplify code.
author iive
date Sun, 26 Jun 2011 14:42:35 +0000
parents 3baf6a2283da
children 08a90b0e44e1
line wrap: on
line source

/*
  This file is part of FreeSDP
  Copyright (C) 2001, 2002 Federico Montesino Pouzols <fedemp@suidzer0.org>

  FreeSDP is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

/**
 * @file errorlist.c
 *
 * @short Translation table for error numbers
 *
 */

#ifndef FSDP_ERRORLIST_C
#define FSDP_ERRORLIST_C

#include "common.h"

const char *fsdp_error_t_s[] = {
  "No error",/** FSDPE_OK **/
  "Illegal character detected",/** FSDPE_ILLEGAL_CHARACTER **/
  "Missing version item", /** FSDPE_MISSING_VERSION **/
  "Invalid version item", /** FSDPE_INVALID_VERSION **/
  "Owner item not present", /** FSDPE_MISSING_OWNER **/
  "Parse error in owner item", /** FSDPE_INVALID_OWNER **/
  "Session name not present", /** FSDPE_MISSING_NAME **/
  "Empty session name item", /** FSDPE_EMPTY_NAME **/
  "Syntax error in connection item", /** FSDPE_INVALID_CONNECTION **/
  "Unrecognized address type in connection item", /** FSDPE_INVALID_CONNECTION_ADDRTYPE **/
  "Unrecognized network type in connection item", /** FSDPE_INVALID_CONNECTION_NETTYPE **/
  "Parse error in bandwith item", /** FSDPE_INVALID_BANDWIDTH **/
  "No time period for the session", /** FSDPE_MISSING_TIME **/
  "Parse error in time item", /** FSDPE_INVALID_TIME **/
  "Parse error in repeat time item", /** FSDPE_INVALID_REPEAT **/
  "Parse error in timezone item", /** FSDPE_INVALID_TIMEZONE **/
  "Unknown encryption method", /** FSDPE_INVALID_ENCRYPTION_METHOD **/
  "Syntax error in an attribute item", /** FSDPE_INVALID_ATTRIBUTE **/
  "Syntax error in an rtpmap attribute item", /** FSDPE_INVALID_ATTRIBUTE_RTPMAP **/
  "Unknown session type in a session-level attribute", /** FSDPE_INVALID_SESSION_TYPE **/
  "Parse error in media item", /** FSDPE_INVALID_MEDIA **/
  "Unknown media type in media item", /** FSDPE_UNKNOWN_MEDIA_TYPE **/
  "Unknown media transport", /** FSDPE_UNKNOWN_MEDIA_TRANSPORT **/
  "Unknown extra lines in description item", /** FSDPE_OVERFILLED **/
  "Unknown line found",	/** FSDPE_INVALID_LINE **/
  "No connection information provided",	/** FSDPE_MISSING_CONNECTION_INFO **/
  "Description item does not fit in MAXSIZE", /** FSDPE_INVALID_INDEX **/
  "Internal error", /** FSDPE_INTERNAL_ERROR **/
  "Invalid function parameters", /** FSDPE_INVALID_PARAMETER **/
  "Buffer overflow" /** FSDPE_BUFFER_OVERFLOW **/
};


const char *
fsdp_strerror (fsdp_error_t err_no)
{
  return (fsdp_error_t_s[err_no]);
}

#endif /* FSDP_ERRORLIST_C */