Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.8, 0.9
-
None
-
Compile this files:
namespace c_glib Kms namespace * com.kurento.commons.mediaspec include "payload.thrift" include "transport.thrift" enum MediaType { AUDIO, VIDEO } enum Direction { SENDONLY, RECVONVLY, SENDRECV, INACTIVE, } struct MediaSpec { 1: required list<payload.Payload> payloads, 2: required set<MediaType> type, 3: required transport.Transport transport, 4: required Direction direction, }
namespace c_glib Kms namespace * com.kurento.commons.mediaspec struct PayloadRtp { 1: required i32 id, 2: required string codecName, 3: required i32 clockRate, 4: optional i32 channels, 5: optional i32 width, 6: optional i32 height, 7: optional i32 bitrate, 50: optional map<string, string> extraParams, } struct Payload { 1: optional PayloadRtp rtp, }
namespace c_glib Kms namespace * com.kurento.commons.mediaspec include "mediaSpec.thrift" struct SessionSpec { 1: required list<mediaSpec.MediaSpec> medias, 2: required string id; 3: optional string version; }
namespace c_glib Kms namespace * com.kurento.commons.mediaspec struct TransportRtp { 1: string address, 2: i32 port, } struct Transport { 1: optional TransportRtp rtp, }
Compile this files: namespace c_glib Kms namespace * com.kurento.commons.mediaspec include "payload.thrift" include "transport.thrift" enum MediaType { AUDIO, VIDEO } enum Direction { SENDONLY, RECVONVLY, SENDRECV, INACTIVE, } struct MediaSpec { 1: required list<payload.Payload> payloads, 2: required set<MediaType> type, 3: required transport.Transport transport, 4: required Direction direction, } namespace c_glib Kms namespace * com.kurento.commons.mediaspec struct PayloadRtp { 1: required i32 id, 2: required string codecName, 3: required i32 clockRate, 4: optional i32 channels, 5: optional i32 width, 6: optional i32 height, 7: optional i32 bitrate, 50: optional map<string, string> extraParams, } struct Payload { 1: optional PayloadRtp rtp, } namespace c_glib Kms namespace * com.kurento.commons.mediaspec include "mediaSpec.thrift" struct SessionSpec { 1: required list<mediaSpec.MediaSpec> medias, 2: required string id; 3: optional string version; } namespace c_glib Kms namespace * com.kurento.commons.mediaspec struct TransportRtp { 1: string address, 2: i32 port, } struct Transport { 1: optional TransportRtp rtp, }
-
Patch Available
Description
The generated code has memory leaks if you create and destroy an object.
I've fixed the main problem on this git repo on branch c_glib_0.8.x but commits can be moved to trunk easily.
https://github.com/jcaden/thrift
There are still some errors to control on generated code (there are comments in the code). I'm planning to fix in a short term if you validate the current patches.
This git repository has also the patches sent on issues 1582 and 1578 that are also related:
https://issues.apache.org/jira/browse/THRIFT-1582
https://issues.apache.org/jira/browse/THRIFT-1578