-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Refer to the original PR: #3011 b/311035005 --------- Co-authored-by: Jason <[email protected]>
- Loading branch information
1 parent
638ef66
commit 160902e
Showing
5 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Copyright 2024 The Cobalt Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef STARBOARD_EXTENSION_PLAYER_CONFIGURATION_H_ | ||
#define STARBOARD_EXTENSION_PLAYER_CONFIGURATION_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#define kStarboardExtensionPlayerConfigurationName \ | ||
"dev.starboard.extension.PlayerConfiguration" | ||
|
||
typedef struct StarboardExtensionPlayerConfigurationApi { | ||
// Name should be the string kStarboardExtensionPlayerConfigurationName. | ||
// This helps to validate that the extension API is correct. | ||
const char* name; | ||
|
||
// This specifies the version of the API that is implemented. | ||
uint32_t version; | ||
|
||
// The fields below this point were added in version 1 or later. | ||
|
||
// This is used to ask the underlying starboard player using decode | ||
// to texture mode to render video frames when it's available, no matter | ||
// what output mode is passed in SbPlayerCreate(). This function can be | ||
// null. | ||
void (*SetDecodeToTexturePreferred)(bool preferred); | ||
|
||
// This is used to ask the underlying starboard player using tunnel mode | ||
// when it's available. This function can be null. | ||
void (*SetTunnelModePreferred)(bool preferred); | ||
|
||
} StarboardExtensionPlayerConfigurationApi; | ||
|
||
#ifdef __cplusplus | ||
} // extern "C" | ||
#endif | ||
|
||
#endif // STARBOARD_EXTENSION_PLAYER_CONFIGURATION_H_ |