public function zencoderArray($obj)
    {
        if (is_array($obj)) {
            return $obj;
        }

        if (is_a($obj, 'Services_Zencoder_Object')) {
            return get_object_vars($obj);
        }

        throw new Exception('Unexpected object: '.get_class($obj));
    }