RD_Export
7
October 2015
Rivendell C Library Manual

# rd_export

Rivendell Export Audio C Library Function
Todd
Baker
bakert@rfa.org
Rivendell C Library Author

        #include <rivwebcapi/rd_export.h>

        int RD_Export
          const char hostname[]
          const char username[]
          const char passwd[]
          const char ticket[]
          const unsigned cartnumber
          const unsigned cutnumber
          const int format
          const int channels
          const int sample_rate
          const int bit_rate
          const int quality
          const int start_point
          const int end_point
          const int normalization_level
          const int enable_metadata
          const char filename[]
          const char user_agent[]

## Description

`RD_Export` is the function to use to export PCM/MPEG data from the audio store.

### RD_Export function call fields

FIELD NAME | FIELD TYPE | MEANING | REMARKS
--- | --- | --- | ---
hostname | Character Array | Name Of Rivendell DB Host | Mandatory
username | Character Array | Rivendell User Name | Mandatory When NO Ticket Provided
passwd | Character Array | Rivendell User Password | Mandatory When NO Ticket Provided
ticket | Character Array | Rivendell Authentification Ticket | Mandatory When NO User/Password Pair Provided.
cartnumber | unsigned integer | Cart Number | Mandatory
cutnumber | unsigned integer | Cut Number | Mandatory
format | integer | Format | Mandatory
channels | integer | Number of Channels | Mandatory
sample_rate | integer | Sample Rate | Mandatory
bit_rate | integer | Bit Rate | Mandatory
quality | integer | Quality | Mandatory
start_point | integer | Start Point | Mandatory
end_point | integer | End Point | Mandatory
normalization_level | integer | Normalization Level | Mandatory
enable_metadata | integer | Flag for whether to enable Meta Data | Mandatory
filename | character array | File Name For Audio | Mandatory
user_agent | Character Array | User Agent Value put into HTTP request | Optional (default is Rivendell-C-API/x.x.x)

## RETURN VALUE

On success, zero is returned.

If a server error occurs a -1 is returned. If a client error occurs a specific error number is returned.

## ERRORS

400 Invalid Input Parameter(s).

403 User Authentification Error.

404 No Source Audio Present.

404 Unauthorized or No Such Cart / Cut.

415 Invalid Settings.

500 Conversion Error.

nnn Unknown Error Occurred.