media

package module
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

README

media

媒体资源协议(Protobuf),功能有

  • 类型
  • 格式
  • 分辨率

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Format_name = map[int32]string{
		0: "FORMAT_UNSPECIFIED",
		1: "MP3",
		2: "MP4",
	}
	Format_value = map[string]int32{
		"FORMAT_UNSPECIFIED": 0,
		"MP3":                1,
		"MP4":                2,
	}
)

Enum value maps for Format.

View Source
var (
	Resolution_name = map[int32]string{
		0:   "RESOLUTION_UNSPECIFIED",
		1:   "P360",
		2:   "P480",
		3:   "P720",
		4:   "P1080",
		5:   "K2",
		6:   "K4",
		7:   "K8",
		15:  "ORIGINAL",
		127: "CUSTOMIZE",
	}
	Resolution_value = map[string]int32{
		"RESOLUTION_UNSPECIFIED": 0,
		"P360":                   1,
		"P480":                   2,
		"P720":                   3,
		"P1080":                  4,
		"K2":                     5,
		"K4":                     6,
		"K8":                     7,
		"ORIGINAL":               15,
		"CUSTOMIZE":              127,
	}
)

Enum value maps for Resolution.

View Source
var (
	Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "VIDEO",
		2: "AUDIO",
	}
	Type_value = map[string]int32{
		"TYPE_UNSPECIFIED": 0,
		"VIDEO":            1,
		"AUDIO":            2,
	}
)

Enum value maps for Type.

View Source
var File_storezhang_media_format_proto protoreflect.FileDescriptor
View Source
var File_storezhang_media_resolution_proto protoreflect.FileDescriptor
View Source
var File_storezhang_media_type_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Format

type Format int32

格式

const (
	// 未知,不要使用
	Format_FORMAT_UNSPECIFIED Format = 0
	// 音频
	Format_MP3 Format = 1
	// 视频
	Format_MP4 Format = 2
)

func (Format) Descriptor

func (Format) Descriptor() protoreflect.EnumDescriptor

func (Format) Enum

func (x Format) Enum() *Format

func (Format) EnumDescriptor deprecated

func (Format) EnumDescriptor() ([]byte, []int)

Deprecated: Use Format.Descriptor instead.

func (Format) Name added in v0.0.6

func (f Format) Name() (name string)

func (Format) Number

func (x Format) Number() protoreflect.EnumNumber

func (Format) String

func (x Format) String() string

func (Format) Type

func (Format) Type() protoreflect.EnumType

type Resolution

type Resolution int32

分辨率

const (
	// 未知,不要使用
	Resolution_RESOLUTION_UNSPECIFIED Resolution = 0
	// 最低档,尽量不要使用
	Resolution_P360 Resolution = 1
	// 标清
	Resolution_P480 Resolution = 2
	// 高清
	Resolution_P720 Resolution = 3
	// 超高清
	Resolution_P1080 Resolution = 4
	// 2K
	Resolution_K2 Resolution = 5
	// 4K
	Resolution_K4 Resolution = 6
	// 8K
	Resolution_K8 Resolution = 7
	// 原始分辨率
	Resolution_ORIGINAL Resolution = 15
	// 自定义分辨率
	// 尽量不使用自定义分辨率,也许相应的库并没有实现自定义分辨率功能
	Resolution_CUSTOMIZE Resolution = 127
)

func (Resolution) Descriptor

func (Resolution) Descriptor() protoreflect.EnumDescriptor

func (Resolution) Enum

func (x Resolution) Enum() *Resolution

func (Resolution) EnumDescriptor deprecated

func (Resolution) EnumDescriptor() ([]byte, []int)

Deprecated: Use Resolution.Descriptor instead.

func (Resolution) Height added in v0.0.3

func (r Resolution) Height() (height int)

func (Resolution) Name added in v0.0.6

func (r Resolution) Name() (name string)

func (Resolution) Number

func (x Resolution) Number() protoreflect.EnumNumber

func (Resolution) String

func (x Resolution) String() string

func (Resolution) Type

func (Resolution) Width added in v0.0.3

func (r Resolution) Width() (width int)

type Type

type Type int32

类型

const (
	// 未知,不要使用
	Type_TYPE_UNSPECIFIED Type = 0
	// 视频
	Type_VIDEO Type = 1
	// 音频
	Type_AUDIO Type = 2
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

func (Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL