Htsp » History » Revision 16
« Previous |
Revision 16/163
(diff)
| Next »
Andreas Smas, 2009-02-28 17:10
= Client to Server methods =
=== getChallenge ===
Request a 32 byte challenge used to generate a authentication digest.
Request message fields:
{{{
None
}}}
Reply message fields:
{{{
challenge bin required 32 bytes of random challenge to be used in next authentication request from client.
}}}
=== authenticate ===
Request message fields:
{{{
username str required Username.
digest bin required SHA-1 hash of [password (not including terminating NUL)] + [challenge]
}}}
Reply message fields:
{{{
noaccess int optional Set to '1' if access was denied.
challenge bin optional 32 bytes of random challenge to be used in next authentication request from client.
Always present if 'noaccess' is set. This is supplied so the client does not have
to issue an extra 'getChallenge' request.
}}}
=== setAsync ===
Switch the session into asynchronous mode.
When a session is in this mode the client will get continuous updates from the server about channels and tags.
This also includes creation and deletion of channels and tags.
An interactive application that presents the user with information about channels and tags would probably want to switch to this mode.
Request message fields:
{{{
None
}}}
Reply message fields:
{{{
None
}}}
=== getEvent ===
=== subscribe ===
Request subscription to the given channel. A request for a subscription is always successful.
When the server is ready to transmit data it will first send a 'subscriptionStart' message.
Request message fields:
{{{
channelId int required ID for channel.
subscriptionId int required Subscription ID. Selected by client. This value is not interpreted by the server in any form.
The value is used from now on in all messages related to the subscription.
}}}
Reply message fields:
{{{
None.
}}}
=== unsubscribe ===
Stop a subscription.
Attributes
{{{
subscriptionId int required Subscription ID.
}}}
Reply message fields:
{{{
None.
}}}
= Server to Client methods =
=== channelAdd ===
A new channel has been created on the server.
This message is only sent if session is in asynchronous mode.
Message fields:
{{{
channelId int required ID of channel.
channelName str required Name of channel.
channelIcon str required URL to an icon representative for the channel.
eventId int optional ID of the current (or next to be) event on this channel.
tags int[] optional Tags this channel is mapped to.
}}}
=== channelUpdate ===
A channel has been updated on the server. All fields will be sent even if they are not changed. Most clients can process this and the 'channelAdd' message
with the very same code.
This message is only sent if session is in asynchronous mode.
Message fields:
{{{
channelId int required ID of channel.
channelName str required Name of channel.
channelIcon str optioanl URL to an icon representative for the channel.
eventId int optional ID of the current (or next to be) event on this channel.
tags int[] required Tags this channel is mapped to.
}}}
=== channelDelete ===
A channel has been deleted on the server.
This message is only sent if session is in asynchronous mode.
Message fields:
{{{
channelId int required ID of channel.
}}}
=== tagAdd ===
A new tag has been created on the server.
This message is only sent if session is in asynchronous mode.
Message fields:
{{{
tagId int required ID of tag.
tagName str required Name of tag.
tagIcon str optional URL to an icon representative for the channel.
channels int[] required Channels this tag is mapped to.
}}}
=== tagUpdate ===
A tag has been updated on the server.
This message is only sent if session is in asynchronous mode.
Message fields:
{{{
tagId int required ID of tag.
tagName str required Name of tag.
tagIcon str optional URL to an icon representative for the channel.
channels int[] required Channels this tag is mapped to.
}}}
=== tagDelete ===
A tag has been deleted from the server.
This message is only sent if session is in asynchronous mode.
Message fields:
{{{
tagId str required ID of tag.
}}}
=== subscriptionStart ===
Message fields:
{{{
subscriptionId int required Subscription ID.
streams msg[] required Array of messages with stream information
'streams' message:
index int required Index for this stream
type str required Type of stream
language str optional Language for stream
Stream types:
AC3 AC3 audio
MPEG2AUDIO MPEG2 audio (MP2)
MPEG2VIDEO MPEG2 video
H264 H264 video
}}}
=== subscriptionStop ===
Message fields:
{{{
subscriptionId int required Subscription ID.
reason str optional Reason for subscription stop.
}}}
=== subscriptionStatus ===
Message fields:
{{{
subscriptionId int required Subscription ID.
status str optional English clear text of status. Absence of this field means that the status is OK.
}}}
=== queueStatus ===
The queueStatus message is sent every second during normal data delivery.
The transmit scheduler have different drop thresholds for different frame types.
If congestion occurs it will favor dropping B-frames before P-frames before I-frames.
All audio is recognized as I-frames.
Message fields:
{{{
subscriptionId int required Subscription ID.
packets int required Number of data packets in queue.
bytes int required Number of bytes in queue.
delay int required Estimated delay of queue (in µs)
Bdrops int required Number of B-frames dropped
Pdrops int required Number of P-frames dropped
Idrops int required Number of I-frames dropped
}}}
=== muxpkt ===
Streaming data.
Message fields:
{{{
subscriptionId int required Subscription ID.
frametype int required Type of frame as ASCII value: 'I', 'P', 'B'
stream int required Stream index. Corresponds to the streams reported in the subscriptionStart message.
dts int required Decode Time Stamp in µs.
pts int required Presentation Time Stamp in µs.
duration int required Duration of frame in µs.
payload bin required Actual frame data.
}}}
Updated by Andreas Smas over 15 years ago · 16 revisions