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

◆ plm_read_packets()

void fl::third_party::plm_read_packets ( plm_t * self,
int requested_type )

Definition at line 592 of file pl_mpeg.hpp.

592 {
593 plm_packet_t *packet;
594 while ((packet = plm_demux_decode(self->demux))) {
595 if (packet->type == self->video_packet_type) {
596 plm_buffer_write(self->video_buffer, packet->data, packet->length);
597 }
598 else if (packet->type == self->audio_packet_type) {
599 plm_buffer_write(self->audio_buffer, packet->data, packet->length);
600 }
601
602 if (packet->type == requested_type) {
603 return;
604 }
605 }
606
607 if (plm_demux_has_ended(self->demux)) {
608 if (self->video_buffer) {
610 }
611 if (self->audio_buffer) {
613 }
614 }
615}
plm_packet_t * plm_demux_decode(plm_demux_t *self) FL_NOEXCEPT
Definition pl_mpeg.hpp:1517
void plm_buffer_signal_end(plm_buffer_t *self) FL_NOEXCEPT
Definition pl_mpeg.hpp:910
size_t plm_buffer_write(plm_buffer_t *self, uint8_t *bytes, size_t length) FL_NOEXCEPT
Definition pl_mpeg.hpp:877
int plm_demux_has_ended(plm_demux_t *self) FL_NOEXCEPT
Definition pl_mpeg.hpp:1293
plm_buffer_t * audio_buffer
Definition pl_mpeg.hpp:211
plm_demux_t * demux
Definition pl_mpeg.hpp:196
plm_buffer_t * video_buffer
Definition pl_mpeg.hpp:204

References fl::third_party::plm_packet_t::data, FL_NOEXCEPT, fl::third_party::plm_packet_t::length, plm_buffer_signal_end(), plm_buffer_write(), plm_demux_decode(), plm_demux_has_ended(), and fl::third_party::plm_packet_t::type.

Referenced by plm_read_audio_packet(), and plm_read_video_packet().

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