Hello,
I am working with video packets and know that MPEG4 packets begin with hex values 00 00 01 B6. I want to know if I am working with mp4 or not. How can I read information from packet to equal these values? m->payload gives only payload of packet without any headers.
Full code: http://pastebin.com/raw.php?i=c2UgZkEjCode:case IPQM_PACKET: { // take packets from buffer here ipq_packet_msg_t *m = ipq_get_packet(buf); int x; if(value in m->payload[x] == value) ?? { printf("MPEG packet"); x++; } // and put them back here status = ipq_set_verdict(h, m->packet_id,NF_ACCEPT, 0, NULL); break; }
MC