mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1061046. Part 1.5: Expose MediaStream::GraphRate(). r=karlt
This is guaranteed to work even if the stream has been disconnected from the graph, so it's preferred to Graph()->GraphRate(). --HG-- extra : rebase_source : e12fe80b3d95eea5f63e460bf557518a5bdcd42c
This commit is contained in:
parent
3bc8c5ea49
commit
5b856f8678
@ -334,6 +334,11 @@ public:
|
||||
void SetGraphImpl(MediaStreamGraphImpl* aGraph);
|
||||
void SetGraphImpl(MediaStreamGraph* aGraph);
|
||||
|
||||
/**
|
||||
* Returns sample rate of the graph.
|
||||
*/
|
||||
TrackRate GraphRate() { return mBuffer.GraphRate(); }
|
||||
|
||||
// Control API.
|
||||
// Since a stream can be played multiple ways, we need to combine independent
|
||||
// volume settings. The aKey parameter is used to keep volume settings
|
||||
|
@ -71,6 +71,8 @@ class Fake_MediaStream {
|
||||
public:
|
||||
Fake_MediaStream () : mListeners(), mMutex("Fake MediaStream") {}
|
||||
|
||||
uint32_t GraphRate() { return 16000; }
|
||||
|
||||
void AddListener(Fake_MediaStreamListener *aListener) {
|
||||
mozilla::MutexAutoLock lock(mMutex);
|
||||
mListeners.insert(aListener);
|
||||
|
Loading…
Reference in New Issue
Block a user