FastLED 3.9.15
Loading...
Searching...
No Matches

◆ plm_demux_probe()

int fl::third_party::plm_demux_probe ( plm_demux_t * self,
size_t probesize )

Definition at line 1241 of file pl_mpeg.hpp.

1241 {
1242 int previous_pos = plm_buffer_tell(self->buffer);
1243
1244 int video_stream = FALSE;
1245 int audio_streams[4] = {FALSE, FALSE, FALSE, FALSE};
1246 do {
1248 if (self->start_code == PLM_DEMUX_PACKET_VIDEO_1) {
1249 video_stream = TRUE;
1250 }
1251 else if (
1254 ) {
1255 audio_streams[self->start_code - PLM_DEMUX_PACKET_AUDIO_1] = TRUE;
1256 }
1257 } while (
1258 self->start_code != -1 &&
1259 plm_buffer_tell(self->buffer) - previous_pos < probesize
1260 );
1261
1262 self->num_video_streams = video_stream ? 1 : 0;
1263 self->num_audio_streams = 0;
1264 for (int i = 0; i < 4; i++) {
1265 if (audio_streams[i]) {
1266 self->num_audio_streams++;
1267 }
1268 }
1269
1270 plm_demux_buffer_seek(self, previous_pos);
1271 return (self->num_video_streams || self->num_audio_streams);
1272}
void plm_demux_buffer_seek(plm_demux_t *self, size_t pos) FL_NOEXCEPT
Definition pl_mpeg.hpp:1297
static const int PLM_DEMUX_PACKET_AUDIO_1
Definition pl_mpeg.h:590
static const int PLM_DEMUX_PACKET_VIDEO_1
Definition pl_mpeg.h:594
int plm_buffer_next_start_code(plm_buffer_t *self) FL_NOEXCEPT
Definition pl_mpeg.hpp:1060
size_t plm_buffer_tell(plm_buffer_t *self) FL_NOEXCEPT
Definition pl_mpeg.hpp:945
static const int PLM_DEMUX_PACKET_AUDIO_4
Definition pl_mpeg.h:593
#define TRUE
Definition pl_mpeg.hpp:174
#define FALSE
Definition pl_mpeg.hpp:175

References FALSE, FL_NOEXCEPT, plm_buffer_next_start_code(), plm_buffer_tell(), plm_demux_buffer_seek(), PLM_DEMUX_PACKET_AUDIO_1, PLM_DEMUX_PACKET_AUDIO_4, PLM_DEMUX_PACKET_VIDEO_1, and TRUE.

Referenced by plm_probe().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: