Skip to content

Commit

Permalink
[media] Minor clean up without functional changes
Browse files Browse the repository at this point in the history
We are working on tool to snapshot media implementation in
  #4056
to allow a media implementation snapshot to run side by side with the
default media implementation on Android TV.

The change in drm_system.cc fixes a link conflict when the snapshot and
the default media implementation both have the operator== defined in
global namespace.

The change in player_write_samples.cc reduces the complexity of parsing
function prototype in the tool.

b/327287075
  • Loading branch information
xiaomings committed Oct 7, 2024
1 parent e1fe8e8 commit 325f138
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion starboard/android/shared/drm_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ SbDrmSessionRequestType SbDrmSessionRequestTypeFromMediaDrmKeyRequestType(

// This has to be defined outside the above anonymous namespace to be picked up
// by the comparison of std::vector<SbDrmKeyId>.
bool operator==(const SbDrmKeyId& left, const SbDrmKeyId& right) {
inline bool operator==(const SbDrmKeyId& left, const SbDrmKeyId& right) {
if (left.identifier_size != right.identifier_size) {
return false;
}
Expand Down
5 changes: 4 additions & 1 deletion starboard/shared/starboard/player/player_write_samples.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@

#if SB_API_VERSION >= 15
void SbPlayerWriteSamples(SbPlayer player,
SbMediaType sample_type,
const SbPlayerSampleInfo* sample_infos,
int number_of_sample_infos) {
#else // SB_API_VERSION >= 15
void SbPlayerWriteSample2(SbPlayer player,
#endif // SB_API_VERSION >= 15
SbMediaType sample_type,
const SbPlayerSampleInfo* sample_infos,
int number_of_sample_infos) {
#endif // SB_API_VERSION >= 15
if (!SbPlayerIsValid(player)) {
SB_LOG(WARNING) << "player is invalid.";
return;
Expand Down

0 comments on commit 325f138

Please sign in to comment.