[Libav-user] Sending AVpacket data over socket

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Libav-user] Sending AVpacket data over socket

Philippe Noël
Hello,

I'm trying to send the "data" field of AVpacket over a socket. When I get the size field, it tells me about 22,000 (which makes sense), but when I reference the data field (with packet->data) I only get about 8, which seems to be only be pointer. How can I access the uint8_t array so I can send it over my socket?

Here's a code snippet to illustrate:

Screen Shot 2019-12-08 at 16.35.26.png

Thanks a lot for your help!

Philippe

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Sending AVpacket data over socket

Nicolas George
Philippe Noël (12019-12-08):
> Here's a code snippet to illustrate:
>
> [image: Screen Shot 2019-12-08 at 16.35.26.png]

1. Don't send screenshots of text, copy-paste the text. This should be
obvious already.

2. AVPacket.data is not a string.

Regards,

--
  Nicolas George

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Sending AVpacket data over socket

Philippe Noël
Sorry about this, this was my first post on the mailing list.

Is there a way to send the data directly without converting it to a string? I could serialize it but I worry this will impact performance.

Cheers,

Phil

On Sun., Dec. 8, 2019, 17:42 Nicolas George, <[hidden email]> wrote:
Philippe Noël (12019-12-08):
> Here's a code snippet to illustrate:
>
> [image: Screen Shot 2019-12-08 at 16.35.26.png]

1. Don't send screenshots of text, copy-paste the text. This should be
obvious already.

2. AVPacket.data is not a string.

Regards,

--
  Nicolas George
_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Sending AVpacket data over socket

Nicolas George
Philippe Noël (12019-12-08):
> Sorry about this, this was my first post on the mailing list.

Then read about the rules. For example about top-posting. If you do not
understand words, look them up.

> Is there a way to send the data directly without converting it to a string?
> I could serialize it but I worry this will impact performance.

It seems to me you are trying to run before you can walk. This question
has nothing to do with FFmpeg and all to do with basic programming.

Regards,

--
  Nicolas George

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

signature.asc (849 bytes) Download Attachment