author Phil Ringnalda <>
Mon, 08 Dec 2014 20:53:07 -0800
changeset 218811 960303b07c909e69db87467d0b499351d65c82af
permissions -rw-r--r--
Backed out 10 changesets (bug 1091242) for Android/b2g non-unified build bustage CLOSED TREE Backed out changeset 7f72b55c5de7 (bug 1091242) Backed out changeset f1501aa24397 (bug 1091242) Backed out changeset 7fde5994aee5 (bug 1091242) Backed out changeset 59b415714087 (bug 1091242) Backed out changeset dadb65fedc08 (bug 1091242) Backed out changeset 21be81424e4e (bug 1091242) Backed out changeset 498fb1dafba5 (bug 1091242) Backed out changeset 8d0653eb85ab (bug 1091242) Backed out changeset c82d484e135a (bug 1091242) Backed out changeset 3e0c8932f1b1 (bug 1091242)

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */


extern "C"
#include "ccapi_types.h"

#include "mozIGeckoMediaPluginService.h"

class nsIThread;
class nsIEventTarget;
class nsIPrefBranch;

namespace mozilla {
    class NrIceMediaStream;

namespace CSF
    class AudioTermination;
    class VideoTermination;
    class AudioControl;
    class VideoControl;
    class MediaProvider;
    class MediaProviderObserver;

    class StreamObserver
    	  virtual void registerStream(cc_call_handle_t call, int streamId, bool isVideo) = 0;
    	  virtual void deregisterStream(cc_call_handle_t call, int streamId) = 0;
    	  virtual void dtmfBurst(int digit, int direction, int duration) = 0;
    	  virtual void sendIFrame(cc_call_handle_t call) = 0;

    class VcmSIPCCBinding
        VcmSIPCCBinding ();
        virtual ~VcmSIPCCBinding();

        // The getter is only for use by the vcm_* impl functions.
        void setStreamObserver(StreamObserver*);
        static StreamObserver* getStreamObserver();

        static AudioTermination * getAudioTermination();
        static VideoTermination * getVideoTermination();

        static AudioControl * getAudioControl();
        static VideoControl * getVideoControl();

        void setMediaProviderObserver(MediaProviderObserver* obs);
        static MediaProviderObserver * getMediaProviderObserver();

        static void setAudioCodecs(int codecMask);
        static void setVideoCodecs(int codecMask);

        static int getAudioCodecs();
        static int getVideoCodecs();
        static int getVideoCodecsGmp();
        static int getVideoCodecsHw();

        static void setMainThread(nsIThread *thread);
        static nsIThread *getMainThread();

        static nsCOMPtr<nsIPrefBranch> getPrefBranch();

        static int gVideoCodecGmpMask;
        nsCOMPtr<mozIGeckoMediaPluginService> mGMPService;
        static VcmSIPCCBinding * gSelf;
        StreamObserver* streamObserver;
        MediaProviderObserver *mediaProviderObserver;
        static bool gInitGmpCodecs;
        static int gAudioCodecMask;
        static int gVideoCodecMask;
        static nsIThread *gMainThread;
        static nsIEventTarget *gSTSThread;
        static nsCOMPtr<nsIPrefBranch> gBranch;