]> git.sesse.net Git - casparcg/blob - source/amcp/introduction.rst
(no commit message)
[casparcg] / source / amcp / introduction.rst
1 .. _introduction:\r
2 \r
3 *************\r
4 Communication\r
5 *************\r
6 \r
7 * All communication is presumed to be encoded in UTF-8.\r
8 * Each command has to be terminated with both a carriage return and a linefeed character. For example:\r
9         * \\r\\n\r
10         * <CR><LF>\r
11         * <0x0D><0x0A>\r
12         * <13><10>\r
13 * The whole command string is case insensitive.\r
14 * Since the parameters in a command is separated by spaces, you need to enclose the parameter with quotation marks if you want it to contain spaces.\r
15 \r
16 \r
17 ***********************\r
18 Backwards Compatibility\r
19 ***********************\r
20 \r
21 The AMCP 2.0 protocol implementation is mostly backward compatible with the previous CasparCG 1.7.1 AMCP Protocol and CasparCG 1.8.0 AMCP Protocol. This is achieved by providing default values for parameters used by the AMCP 2.0 protocol.\r
22 \r
23 ================\r
24 Breaking Changes\r
25 ================\r
26 \r
27 * The ''CLEAR'' command will also clear any visible template graphic in the specified container.\r
28 \r
29 *****************\r
30 Special sequences\r
31 *****************\r
32 \r
33 Since bare quotation marks are used to keep parameters with spaces in one piece, there has to be another way to indicate a quotation mark in a string. Enter special sequences. They behave as in most programming languages. The escape character is the backslash \ character. In order to get a quotation mark you enter \" in the command.\r
34 Valid sequences:\r
35 \r
36 * \\" Quotation mark\r
37 * \\\\ Backslash\r
38 * \\n New line  \r
39 \r
40 These sequences apply to all parameters, it doesn\'t matter if it\'s a file name or a long string of xml-data.\r
41 \r
42 ************\r
43 Return codes\r
44 ************\r
45 \r
46 ===========\r
47 Information\r
48 ===========\r
49 * 100 [action] - Information about an event.\r
50 * 101 [action] - Information about an event. A line of data is being returned.\r
51 \r
52 ==========\r
53 Successful\r
54 ==========\r
55 * 200 [command] OK       - The command has been executed and several lines of data are being returned (terminated by an empty line).\r
56 * 201 [command] OK       - The command has been executed and a line of data is being returned\r
57 * 202 [command] OK       - The command has been executed\r
58 \r
59 ============\r
60 Client Error\r
61 ============\r
62 * 400 ERROR      - Command not understood\r
63 * 401 [command] ERROR    - Illegal video_channel\r
64 * 402 [command] ERROR    - Parameter missing\r
65 * 403 [command] ERROR    - Illegal parameter\r
66 * 404 [command] ERROR    - Media file not found\r
67 \r
68 ============\r
69 Server Error\r
70 ============\r
71 * 500 FAILED     - Internal server error\r
72 * 501 [command] FAILED  - Internal server error\r
73 * 502 [command] FAILED  - Media file unreadable\r
74         \r
75         \r
76         \r
77