Quantcast
Channel: MediaSPIP
Viewing all articles
Browse latest Browse all 118042

How to send AVPacket through a QTcpSocket.write() with all of its data?

$
0
0

I want to send an AVPacket though a QTcpSocket.write() I tried to cast the avpacket pointer to an char * but it only shows 8 bytes of the avpacket and without the avpacket.data.

enter image description here

here is my code

void DisplayStreamServer::sendDataToClient(AVPacket* packet) {
 if (client == nullptr) {
 return;
 }


 client->write((char*) packet);
 client->waitForBytesWritten();

 av_packet_unref(packet);
 av_packet_free(&packet);
}

I can see that my packet.data has data inside it using the visual studio memory viewer. but it seems like when i convert the packet to char * the data is not included

enter image description here

-- enter image description here, enter image description here

Viewing all articles
Browse latest Browse all 118042

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>