Skip to content

Commit

Permalink
Cherry pick PR #3842: Minor improvements on dependencies and decorati…
Browse files Browse the repository at this point in the history
…ons (#3848)

Refer to the original PR: #3842

1. Added include of "system.h" to jni_env_ext.h for
SbSystemBreakIntoDebugger().
2. Added final to MediaDecoder. It has virtual function but doesn't have
a virtual dtor, and deleting a pointer to it triggers warning otherwise.
3. Removed const from TestTask in MinRequiredFramesTester. The original
implementation was correct, but doesn't work with some stl
implementations where const allocator isn't available.
4. Added include of "configuration.h" They are required for the macro
SB_API_VERSION.

b/276483058

Co-authored-by: xiaomings <[email protected]>
  • Loading branch information
cobalt-github-releaser-bot and xiaomings authored Jul 17, 2024
1 parent 61382e3 commit 21e0b90
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class MinRequiredFramesTester {

::starboard::shared::starboard::ThreadChecker thread_checker_;

std::vector<const TestTask> test_tasks_;
std::vector<TestTask> test_tasks_;
AudioTrackAudioSink* audio_sink_ = nullptr;
int min_required_frames_;
std::atomic_bool has_error_;
Expand Down
1 change: 1 addition & 0 deletions starboard/android/shared/jni_env_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <string>

#include "starboard/common/log.h"
#include "starboard/system.h"

namespace starboard {
namespace android {
Expand Down
2 changes: 1 addition & 1 deletion starboard/android/shared/media_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace shared {

// TODO: Better encapsulation the MediaCodecBridge so the decoders no longer
// need to talk directly to the MediaCodecBridge.
class MediaDecoder
class MediaDecoder final
: private MediaCodecBridge::Handler,
protected ::starboard::shared::starboard::player::JobQueue::JobOwner {
public:
Expand Down
3 changes: 2 additions & 1 deletion starboard/common/condition_variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
#define STARBOARD_COMMON_CONDITION_VARIABLE_H_

#include <pthread.h>
#include "starboard/condition_variable.h"

#include "starboard/common/mutex.h"
#include "starboard/condition_variable.h"
#include "starboard/configuration.h"
#include "starboard/types.h"

namespace starboard {
Expand Down
2 changes: 2 additions & 0 deletions starboard/common/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

#include <pthread.h>

#include "starboard/configuration.h"

#if SB_API_VERSION < 16
#include "starboard/mutex.h"
#endif // SB_API_VERSION < 16
Expand Down
2 changes: 2 additions & 0 deletions starboard/condition_variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef STARBOARD_CONDITION_VARIABLE_H_
#define STARBOARD_CONDITION_VARIABLE_H_

#include "starboard/configuration.h"

#if SB_API_VERSION < 16

#include "starboard/export.h"
Expand Down

0 comments on commit 21e0b90

Please sign in to comment.