netwerk/dash/mpd/IMPDManager.cpp
author David Zbarsky <dzbarsky@gmail.com>
Sun, 23 Dec 2012 03:22:22 -0500
changeset 126045 9f3051733fec0917d7d4bc30e4a8e7aaca4d7362
parent 113585 75fbed6e0eebdd00d20caa55a68cd3b4e736a778
permissions -rw-r--r--
Bug 823394 Part 1:Merge nsSVGStylableElement/nsSVGElement and nsIDOMSVGStylable/nsIDOMSVGElement r=bz

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/*
 * IMPDManager.cpp
 *****************************************************************************
 * Copyrigh(C) 2010 - 2011 Klagenfurt University
 *
 * Created on: Apr 20, 2011
 * Authors: Christopher Mueller <christopher.mueller@itec.uni-klu.ac.at>
 *          Christian Timmerer  <christian.timmerer@itec.uni-klu.ac.at>
 * Contributors:
 *          Steve Workman <sworkman@mozilla.com>
 *
 * 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 http://mozilla.org/MPL/2.0/.
 *****************************************************************************/

#include "nsIDOMElement.h"
#include "IMPDManager.h"
#include "nsDASHWebMODManager.h"
#include "nsDASHWebMODParser.h"


namespace mozilla {
namespace net {

/* static */
IMPDManager*
IMPDManager::Create(DASHMPDProfile aProfile, nsIDOMElement* aRoot)
{
  switch(aProfile)
  {
    case WebMOnDemand:
      return CreateWebMOnDemandManager(aRoot);
    default:
      return nullptr;
  }
}

/* static */
IMPDManager*
IMPDManager::CreateWebMOnDemandManager(nsIDOMElement* aRoot)
{
  // Parse DOM elements into MPD objects.
  nsDASHWebMODParser parser(aRoot);

  return new nsDASHWebMODManager(parser.Parse());
}



}//namespace net
}//namespace mozilla