Shaka Player Embedded
shaka
src
js
mse
media_error.h
Go to the documentation of this file.
1
// Copyright 2018 Google LLC
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// https://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#ifndef SHAKA_EMBEDDED_JS_MSE_MEDIA_ERROR_H_
16
#define SHAKA_EMBEDDED_JS_MSE_MEDIA_ERROR_H_
17
18
#include <string>
19
20
#include "
src/mapping/backing_object.h
"
21
#include "
src/mapping/backing_object_factory.h
"
22
#include "
src/mapping/enum.h
"
23
24
namespace
shaka
{
25
namespace
js {
26
namespace
mse {
27
28
enum
MediaErrorCode
{
29
MEDIA_ERR_ABORTED
= 1,
30
MEDIA_ERR_NETWORK
= 2,
31
MEDIA_ERR_DECODE
= 3,
32
MEDIA_ERR_SRC_NOT_SUPPORTED
= 4,
33
};
34
39
class
MediaError
:
public
BackingObject
{
40
DECLARE_TYPE_INFO(
MediaError
);
41
42
public
:
43
MediaError
(
MediaErrorCode
code
,
const
std::string&
message
);
44
45
const
MediaErrorCode
code
;
46
const
std::string
message
;
47
};
48
49
class
MediaErrorFactory
:
public
BackingObjectFactory
<MediaError> {
50
public
:
51
MediaErrorFactory
();
52
};
53
54
}
// namespace mse
55
}
// namespace js
56
}
// namespace shaka
57
58
CONVERT_ENUM_AS_NUMBER
(
shaka::js::mse
,
MediaErrorCode
);
59
60
#endif // SHAKA_EMBEDDED_JS_MSE_MEDIA_ERROR_H_
shaka::js::mse::MediaErrorFactory
Definition:
media_error.h:49
shaka::js::mse::MEDIA_ERR_SRC_NOT_SUPPORTED
Definition:
media_error.h:32
shaka::js::mse
Definition:
media_element.cc:30
shaka::BackingObjectFactory
Definition:
backing_object_factory.h:406
shaka
Definition:
async_results.h:25
shaka::js::mse::MediaError
Definition:
media_error.h:39
enum.h
backing_object.h
backing_object_factory.h
shaka::js::mse::MediaError::MediaError
MediaError(MediaErrorCode code, const std::string &message)
Definition:
media_error.cc:21
shaka::js::mse::MediaError::message
const std::string message
Definition:
media_error.h:46
shaka::BackingObject
Definition:
backing_object.h:56
shaka::js::mse::MEDIA_ERR_NETWORK
Definition:
media_error.h:30
shaka::js::mse::MediaError::code
const MediaErrorCode code
Definition:
media_error.h:45
shaka::js::mse::MediaErrorCode
MediaErrorCode
Definition:
media_error.h:28
shaka::js::mse::MEDIA_ERR_DECODE
Definition:
media_error.h:31
CONVERT_ENUM_AS_NUMBER
CONVERT_ENUM_AS_NUMBER(shaka::js::mse, MediaErrorCode)
shaka::js::mse::MEDIA_ERR_ABORTED
Definition:
media_error.h:29
Generated by
1.8.13