Skip to main content

player_plugin/
lib.rs

1#![deny(unsafe_code)]
2
3mod audio;
4mod benchmark;
5mod capability;
6mod catalog;
7mod decoder;
8mod frame_processor;
9mod hook;
10mod invocation;
11mod native_frame;
12mod plan;
13mod plugin_reference;
14mod processor;
15mod protocol;
16mod resolver;
17mod scope;
18mod sdk;
19pub mod source_normalizer;
20
21pub use player_plugin_macros::export;
22
23pub use audio::{
24    AudioPitchMode, AudioPlaybackPolicy, AudioProcessorCapabilities, AudioProcessorChain,
25    AudioProcessorError, AudioProcessorOperationStatus, AudioProcessorPluginFactory,
26    AudioProcessorSession, AudioProcessorSessionConfig, AudioProcessorSessionInfo,
27    AudioProcessorSubmitStatus,
28};
29pub use benchmark::{
30    BenchmarkEvent, BenchmarkEventBatch, BenchmarkSink, BenchmarkSinkError, BenchmarkSinkFailure,
31    BenchmarkSinkReport, BenchmarkSinkStatus, BenchmarkThresholdViolation,
32    MAX_BENCHMARK_BATCH_EVENTS, MAX_BENCHMARK_THRESHOLD_VIOLATIONS, PluginBenchmarkSink,
33};
34pub use capability::ProcessorCapabilities;
35pub use catalog::{
36    CanonicalPluginArtifactDescriptor, MAX_PLUGIN_ARCHITECTURE_BYTES,
37    MAX_PLUGIN_ARTIFACT_CAPABILITIES, MAX_PLUGIN_ARTIFACT_PATH_BYTES,
38    MAX_PLUGIN_CATALOG_DIAGNOSTICS, MAX_PLUGIN_CATALOG_RECORDS, MAX_PLUGIN_CATALOG_SOURCE_BYTES,
39    MAX_PLUGIN_PROVISIONS, MAX_PLUGIN_REQUIREMENTS, MAX_PLUGIN_RUNTIME_DEPENDENCIES,
40    MAX_PLUGIN_TARGET_BYTES, PLUGIN_CATALOG_MIGRATION_VERSION, PLUGIN_CATALOG_SCHEMA_VERSION,
41    PluginArtifactCapability, PluginArtifactDescriptor, PluginArtifactFormat,
42    PluginArtifactTransport, PluginCatalog, PluginCatalogDiagnostic, PluginCatalogError,
43    PluginCatalogRecord, PluginCatalogSource, PluginProvision, PluginRequirement,
44    PluginResourcePolicy, PluginRuntimeDependency, PluginRuntimeLinkage,
45    validate_plugin_provisions, validate_plugin_requirements,
46};
47pub use decoder::{
48    DecoderBitstreamFormat, DecoderCapabilities, DecoderCodecCapability, DecoderError,
49    DecoderFrameFormat, DecoderMediaKind, DecoderNativeDeviceContext,
50    DecoderNativeDeviceContextKind, DecoderNativeFrame, DecoderNativeFrameMetadata,
51    DecoderNativeFrameReleaseTracking, DecoderNativeHandleKind, DecoderNativeRequirements,
52    DecoderOperationStatus, DecoderPacket, DecoderPacketResult, DecoderPcmFrame,
53    DecoderPcmFrameMetadata, DecoderPcmSampleLayout, DecoderReceiveFrameStatus,
54    DecoderReceiveNativeFrameMetadata, DecoderReceiveNativeFrameOutput,
55    DecoderReceivePcmFrameMetadata, DecoderReceivePcmFrameOutput, DecoderSessionConfig,
56    DecoderSessionInfo, DecoderSessionRequirements, DecoderVisibleRect, NativeDecoderPluginFactory,
57    NativeDecoderSession, normalize_decoder_codec_identifier,
58};
59pub use frame_processor::{
60    FrameProcessorCapabilities, FrameProcessorError, FrameProcessorFrameTimings,
61    FrameProcessorInputFrame, FrameProcessorOperationStatus, FrameProcessorOutputFrame,
62    FrameProcessorPluginFactory, FrameProcessorReceiveFrameMetadata, FrameProcessorReceiveOutput,
63    FrameProcessorReceiveStatus, FrameProcessorSession, FrameProcessorSessionConfig,
64    FrameProcessorSessionInfo, FrameProcessorSessionRequirements, FrameProcessorSubmitFrame,
65    FrameProcessorSubmitResult, FrameProcessorSubmitStatus,
66};
67pub use hook::{
68    PipelineEvent, PipelineEventHook, PipelineEventHookError, PipelineEventHookFailure,
69    PipelineEventHookOutcome, PluginEventHook,
70};
71pub use invocation::{
72    PluginInvocationPolicy, PluginInvocationPolicyError, PluginInvocationWorkload,
73};
74pub use native_frame::{
75    NativeFrame, NativeFrameColorMetadata, NativeFrameContentLightMetadata,
76    NativeFrameDolbyVisionMetadata, NativeFrameHdrMetadata, NativeFrameLeaseToken,
77    NativeFrameMasteringDisplayMetadata, NativeFrameMetadata, NativeFramePipelineProfile,
78    NativeFrameReleaseTracking, NativeFrameSyncInfo, NativeFrameTransform, NativeHandleKind,
79    VisibleRect,
80};
81pub use plan::{
82    MAX_PLUGIN_PLAN_PROVIDERS, PLUGIN_PLAN_SCHEMA_VERSION, PluginPlan, PluginPlanError,
83    PluginPlanPolicy, PluginPlanProvider,
84};
85pub use plugin_reference::{PluginReference, PluginReferenceError, PluginTransport};
86pub use processor::{
87    AssemblyMode, CompletedContentFormat, CompletedDownloadInfo, CompletedStream,
88    ContentFormatKind, DownloadMetadata, OutputFormat, PostDownloadProcessor, ProcessorError,
89    ProcessorOutput, ProcessorProgress, StreamKind,
90};
91pub use protocol::{
92    MAX_PIPELINE_EVENT_INPUT_BYTES, MAX_PLUGIN_ATTRIBUTE_KEY_BYTES,
93    MAX_PLUGIN_ATTRIBUTE_VALUE_BYTES, MAX_PLUGIN_ATTRIBUTES, MAX_PLUGIN_DIAGNOSTIC_MESSAGE_BYTES,
94    MAX_PLUGIN_DIAGNOSTICS, MAX_PLUGIN_ERROR_MESSAGE_BYTES, MAX_PLUGIN_EVENT_ID_BYTES,
95    MAX_PLUGIN_EVENT_NAME_BYTES, MAX_PLUGIN_MEASUREMENTS, MAX_PLUGIN_PLATFORM_BYTES,
96    MAX_PLUGIN_PROTOCOL_BYTES, MAX_PLUGIN_RESOURCE_IDENTITY_BYTES, MAX_PLUGIN_THREAD_BYTES,
97    MAX_SOURCE_NORMALIZER_PACKET_BYTES, PluginDiagnostic, PluginDiagnosticSeverity,
98    PluginMeasurement, PluginProtocolViolation,
99};
100pub use resolver::{
101    MAX_PLUGIN_RESOLUTION_CONSTRAINTS, MAX_PLUGIN_RESOLUTION_STATES, PluginResolution,
102    PluginResolutionError, PluginResolvedProvider, PluginResolver, PluginResolverPolicy,
103};
104pub use scope::{
105    DEFAULT_PLUGIN_RUNTIME_SHUTDOWN_TIMEOUT, DEFAULT_PLUGIN_SCOPE_CLOSE_TIMEOUT,
106    MAX_PLUGIN_CORRELATION_ID_BYTES, MAX_PLUGIN_RUNTIME_OWNER_REGISTRATIONS,
107    MAX_PLUGIN_RUNTIME_SCOPE_REGISTRATIONS, MAX_PLUGIN_SCOPE_CHILDREN, MAX_PLUGIN_SCOPE_DEPTH,
108    MAX_PLUGIN_SCOPE_OWNERS, MAX_PLUGIN_SCOPE_QUARANTINE_RECORDS, MAX_PLUGIN_SCOPE_REASON_BYTES,
109    PluginActivePlaybackCorrelation, PluginNextPrewarmCorrelation, PluginOwnerDisposalError,
110    PluginOwnerToken, PluginPlaybackAttachment, PluginPlaybackAttachmentToken,
111    PluginPlaybackAuthority, PluginPlaybackError, PluginPlaybackRole,
112    PluginPlaybackTransitionReport, PluginRuntime, PluginScope, PluginScopeCloseReport,
113    PluginScopeError, PluginScopeKind, PluginScopeQuarantine, PluginScopeQuarantineReason,
114    PluginScopeResource, PluginScopeState, PluginSessionCorrelation,
115};
116pub use sdk::{Plugin, PluginBuildError, PluginBuilder, PluginCapability};
117pub use source_normalizer::{
118    SourceNormalizerError, SourceNormalizerNormalizeLevel, SourceNormalizerOperationStatus,
119    SourceNormalizerOutputRoute, SourceNormalizerPacket, SourceNormalizerPacketCapabilities,
120    SourceNormalizerPacketLease, SourceNormalizerPacketMediaKind,
121    SourceNormalizerPacketPluginFactory, SourceNormalizerPacketSeek, SourceNormalizerPacketSession,
122    SourceNormalizerPacketSessionConfig, SourceNormalizerPacketSessionRequirements,
123    SourceNormalizerPacketStreamInfo, SourceNormalizerPacketTrackInfo,
124    SourceNormalizerReadPacketMetadata, SourceNormalizerReadPacketStatus,
125    SourceNormalizerRequiredCapabilities, SourceNormalizerResourceCachePolicy,
126    SourceNormalizerResourceCapabilities, SourceNormalizerResourceInfo,
127    SourceNormalizerResourcePluginFactory, SourceNormalizerResourceSession,
128    SourceNormalizerResourceSessionConfig, SourceNormalizerResourceSessionInfo,
129    SourceNormalizerResourceSessionRequirements, SourceNormalizerResourceSessionState,
130    SourceNormalizerResourceSessionStatus, SourceNormalizerResourceSessionWaitStatus,
131    SourceNormalizerSessionCapabilities, SourceNormalizerSessionRequirements,
132    validate_source_normalizer_plugin_input,
133};
134
135#[doc(hidden)]
136pub mod __private {
137    pub use player_plugin_abi::VesperPluginRoot;
138
139    pub fn export_plugin<R>(factory: fn() -> R) -> *const VesperPluginRoot
140    where
141        R: crate::sdk::PluginFactoryResult,
142    {
143        crate::sdk::export_plugin(factory)
144    }
145}