netwerk/protocol/rtsp/controller/RtspController.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/protocol/rtsp/controller/RtspController.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,52 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim: set sw=2 ts=8 et tw=80 : */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef RtspController_h
    1.11 +#define RtspController_h
    1.12 +
    1.13 +#include "nsIStreamingProtocolController.h"
    1.14 +#include "nsIChannel.h"
    1.15 +#include "nsCOMPtr.h"
    1.16 +#include "nsString.h"
    1.17 +#include "RTSPSource.h"
    1.18 +
    1.19 +namespace mozilla {
    1.20 +namespace net {
    1.21 +
    1.22 +class RtspController : public nsIStreamingProtocolController
    1.23 +                     , public nsIStreamingProtocolListener
    1.24 +{
    1.25 +public:
    1.26 +  NS_DECL_THREADSAFE_ISUPPORTS
    1.27 +  NS_DECL_NSISTREAMINGPROTOCOLCONTROLLER
    1.28 +  NS_DECL_NSISTREAMINGPROTOCOLLISTENER
    1.29 +
    1.30 +  RtspController(nsIChannel *channel);
    1.31 +  ~RtspController();
    1.32 +
    1.33 +private:
    1.34 +  enum State {
    1.35 +    INIT,
    1.36 +    CONNECTED,
    1.37 +    DISCONNECTED
    1.38 +  };
    1.39 +
    1.40 +  // RTSP URL refer to a stream or an aggregate of streams.
    1.41 +  nsCOMPtr<nsIURI> mURI;
    1.42 +  // The nsIStreamingProtocolListener implementation.
    1.43 +  nsCOMPtr<nsIStreamingProtocolListener> mListener;
    1.44 +  // ASCII encoded URL spec.
    1.45 +  nsCString mSpec;
    1.46 +  // Indicate the connection state between the
    1.47 +  // media streaming server and the Rtsp client.
    1.48 +  State mState;
    1.49 +  // Rtsp Streaming source.
    1.50 +  android::sp<android::RTSPSource> mRtspSource;
    1.51 +};
    1.52 +
    1.53 +}
    1.54 +} // namespace mozilla::net
    1.55 +#endif

mercurial