Revert "[M120 Migration]Fix for crash during chrome exit"
[platform/framework/web/chromium-efl.git] / media / filters / hls_demuxer_status.h
1 // Copyright 2023 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_FILTERS_HLS_DEMUXER_STATUS_H_
6 #define MEDIA_FILTERS_HLS_DEMUXER_STATUS_H_
7
8 #include "base/functional/callback.h"
9 #include "media/base/status.h"
10
11 namespace media {
12
13 struct HlsDemuxerStatusTraits {
14   enum class Codes : StatusCodeType {
15     // Bitstream / codec / container statuses
16     kPlaylistUrlInvalid,
17     kInvalidBitstream,
18     kUnsupportedContainer,
19     kUnsupportedCodec,
20     kEncryptedMediaNotSupported,
21
22     // Manifest and playlist statuses
23     kRecursiveMultivariantPlaylists,
24     kNoRenditions,
25     kInvalidManifest,
26     kInvalidSegmentUri,
27   };
28   static constexpr StatusGroupType Group() { return "HlsDemuxerStatus"; }
29 };
30
31 using HlsDemuxerStatus = TypedStatus<HlsDemuxerStatusTraits>;
32
33 template <typename T>
34 using HlsDemuxerStatusCb = base::OnceCallback<void(HlsDemuxerStatus::Or<T>)>;
35
36 }  // namespace media
37
38 #endif  // MEDIA_FILTERS_HLS_DEMUXER_STATUS_H_