|
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* vim: set sw=2 ts=8 et tw=80 ft=cpp : */ |
|
3 |
|
4 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
7 |
|
8 include protocol PNecko; |
|
9 include URIParams; |
|
10 |
|
11 namespace mozilla { |
|
12 namespace net { |
|
13 |
|
14 /** |
|
15 * Defined meta data format. |
|
16 */ |
|
17 union RtspMetaValue |
|
18 { |
|
19 bool; |
|
20 uint8_t; |
|
21 uint32_t; |
|
22 uint64_t; |
|
23 nsCString; |
|
24 }; |
|
25 |
|
26 /** |
|
27 * Key-value pair. |
|
28 */ |
|
29 struct RtspMetadataParam |
|
30 { |
|
31 nsCString name; |
|
32 RtspMetaValue value; |
|
33 }; |
|
34 |
|
35 async protocol PRtspController |
|
36 { |
|
37 manager PNecko; |
|
38 |
|
39 parent: |
|
40 AsyncOpen(URIParams aURI); |
|
41 Play(); |
|
42 Pause(); |
|
43 Resume(); |
|
44 Suspend(); |
|
45 Seek(uint64_t offset); |
|
46 Stop(); |
|
47 __delete__(); |
|
48 |
|
49 child: |
|
50 OnMediaDataAvailable(uint8_t index, |
|
51 nsCString data, |
|
52 uint32_t length, |
|
53 uint32_t offset, |
|
54 RtspMetadataParam[] meta); |
|
55 OnConnected(uint8_t index, |
|
56 RtspMetadataParam[] meta); |
|
57 OnDisconnected(uint8_t index, |
|
58 nsresult reason); |
|
59 AsyncOpenFailed(nsresult reason); |
|
60 }; |
|
61 |
|
62 } //namespace net |
|
63 } //namespace mozilla |