mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 07:23:11 +02:00
libtriple: improve audio stream handling in cPlayback()
use a c++ map instead of arrays to store audio stream data Side effect: audio streams as returned by findAllPids() are now sorted by pid, helping default selection for MPEG and VDR streams
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
/* almost 256kB */
|
||||
@@ -70,10 +71,12 @@ class cPlayback
|
||||
uint16_t vpid;
|
||||
uint16_t apid;
|
||||
bool ac3;
|
||||
uint16_t apids[10];
|
||||
unsigned short ac3flags[10];
|
||||
std::string alang[10];
|
||||
uint16_t numpida;
|
||||
struct AStream {
|
||||
// uint16_t pid;
|
||||
bool ac3;
|
||||
std::string lang; /* not yet really used */
|
||||
};
|
||||
std::map<uint16_t, AStream> astreams; /* stores AStream sorted by pid */
|
||||
|
||||
int64_t pts_start;
|
||||
int64_t pts_end;
|
||||
|
Reference in New Issue
Block a user