netwerk/protocol/rtsp/controller/RtspController.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* vim: set sw=2 ts=8 et tw=80 : */
michael@0 3 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #ifndef RtspController_h
michael@0 8 #define RtspController_h
michael@0 9
michael@0 10 #include "nsIStreamingProtocolController.h"
michael@0 11 #include "nsIChannel.h"
michael@0 12 #include "nsCOMPtr.h"
michael@0 13 #include "nsString.h"
michael@0 14 #include "RTSPSource.h"
michael@0 15
michael@0 16 namespace mozilla {
michael@0 17 namespace net {
michael@0 18
michael@0 19 class RtspController : public nsIStreamingProtocolController
michael@0 20 , public nsIStreamingProtocolListener
michael@0 21 {
michael@0 22 public:
michael@0 23 NS_DECL_THREADSAFE_ISUPPORTS
michael@0 24 NS_DECL_NSISTREAMINGPROTOCOLCONTROLLER
michael@0 25 NS_DECL_NSISTREAMINGPROTOCOLLISTENER
michael@0 26
michael@0 27 RtspController(nsIChannel *channel);
michael@0 28 ~RtspController();
michael@0 29
michael@0 30 private:
michael@0 31 enum State {
michael@0 32 INIT,
michael@0 33 CONNECTED,
michael@0 34 DISCONNECTED
michael@0 35 };
michael@0 36
michael@0 37 // RTSP URL refer to a stream or an aggregate of streams.
michael@0 38 nsCOMPtr<nsIURI> mURI;
michael@0 39 // The nsIStreamingProtocolListener implementation.
michael@0 40 nsCOMPtr<nsIStreamingProtocolListener> mListener;
michael@0 41 // ASCII encoded URL spec.
michael@0 42 nsCString mSpec;
michael@0 43 // Indicate the connection state between the
michael@0 44 // media streaming server and the Rtsp client.
michael@0 45 State mState;
michael@0 46 // Rtsp Streaming source.
michael@0 47 android::sp<android::RTSPSource> mRtspSource;
michael@0 48 };
michael@0 49
michael@0 50 }
michael@0 51 } // namespace mozilla::net
michael@0 52 #endif

mercurial