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

◆ plm_demux_decode()

plm_packet_t * fl::third_party::plm_demux_decode ( plm_demux_t * self)

Definition at line 1517 of file pl_mpeg.hpp.

1517 {
1518 if (!plm_demux_has_headers(self)) {
1519 return NULL;
1520 }
1521
1522 if (self->current_packet.length) {
1523 size_t bits_till_next_packet = self->current_packet.length << 3;
1524 if (!plm_buffer_has(self->buffer, bits_till_next_packet)) {
1525 return NULL;
1526 }
1527 plm_buffer_skip(self->buffer, bits_till_next_packet);
1528 self->current_packet.length = 0;
1529 }
1530
1531 // Pending packet waiting for data?
1532 if (self->next_packet.length) {
1533 return plm_demux_get_packet(self);
1534 }
1535
1536 // Pending packet waiting for header?
1537 if (self->start_code != -1) {
1538 return plm_demux_decode_packet(self, self->start_code);
1539 }
1540
1541 do {
1543 if (
1548 )
1549 ) {
1550 return plm_demux_decode_packet(self, self->start_code);
1551 }
1552 } while (self->start_code != -1);
1553
1554 return NULL;
1555}
#define NULL
static const int PLM_DEMUX_PACKET_PRIVATE
Definition pl_mpeg.h:589
static const int PLM_DEMUX_PACKET_AUDIO_1
Definition pl_mpeg.h:590
plm_packet_t * plm_demux_get_packet(plm_demux_t *self) FL_NOEXCEPT
Definition pl_mpeg.hpp:1608
static const int PLM_DEMUX_PACKET_VIDEO_1
Definition pl_mpeg.h:594
int plm_buffer_has(plm_buffer_t *self, size_t count) FL_NOEXCEPT
Definition pl_mpeg.hpp:998
int plm_buffer_next_start_code(plm_buffer_t *self) FL_NOEXCEPT
Definition pl_mpeg.hpp:1060
plm_packet_t * plm_demux_decode_packet(plm_demux_t *self, int type) FL_NOEXCEPT
Definition pl_mpeg.hpp:1567
int plm_demux_has_headers(plm_demux_t *self) FL_NOEXCEPT
Definition pl_mpeg.hpp:1181
void plm_buffer_skip(plm_buffer_t *self, size_t count) FL_NOEXCEPT
Definition pl_mpeg.hpp:1044
static const int PLM_DEMUX_PACKET_AUDIO_4
Definition pl_mpeg.h:593

References FL_NOEXCEPT, NULL, plm_buffer_has(), plm_buffer_next_start_code(), plm_buffer_skip(), plm_demux_decode_packet(), plm_demux_get_packet(), plm_demux_has_headers(), PLM_DEMUX_PACKET_AUDIO_1, PLM_DEMUX_PACKET_AUDIO_4, PLM_DEMUX_PACKET_PRIVATE, and PLM_DEMUX_PACKET_VIDEO_1.

Referenced by plm_demux_get_duration(), plm_demux_get_start_time(), plm_read_packets(), and plm_seek().

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