Not sure but you don't want to do this in general since it is messy. If you pass a SMIL file to mmsbox, it will build the corresponding mms for you by fetching all the content referenced within the SMIL file. Much cleaner.
On Sep 17, 2009, at 15:06, Thilani Abeysinghe wrote:



Hi,
I'm hacking the mms_submit_req.and trying to add another media type(text) and send to mmsc.
For that I studied about mms pdu encoding/decoding documents.

I tried to modify the mms pdu after studing mms encodig/decoding


First modified the number of parts filed in mms-pdu.
Modified the smil file
encoded new media
and then forwarded to Mbuni mmsc

Following is the part of incomming  mms_submit_req trace

Smil befor modified.
In this smil file header length is =2e =46
Data length is 82 7a =378
                                                                              2e
1db0 82 7a 1e 61 70 70 6c 69 63 61 74 69 6f 6e 2f 73 .z.application/s 1dc0 6d 69 6c 00 81 ea 85 70 72 65 73 2e 73 6d 69 6c mil....pres.smil 1dd0 00 c0 22 3c 31 32 33 32 32 39 37 33 30 36 3e 00 .."<1232297306>. 1de0 0d 0a 3c 73 6d 69 6c 3e 0d 0a 3c 68 65 61 64 3e ..<smil>..<head> 1df0 0d 0a 3c 6c 61 79 6f 75 74 3e 0d 0a 3c 72 6f 6f ..<layout>..<roo 1e00 74 2d 6c 61 79 6f 75 74 20 77 69 64 74 68 3d 22 t-layout width=" 1e10 31 37 36 22 20 68 65 69 67 68 74 3d 22 32 30 38 176" height="208 1e20 22 2f 3e 0d 0a 3c 72 65 67 69 6f 6e 20 69 64 3d "/>..<region id= 1e30 22 49 6d 61 67 65 22 20 77 69 64 74 68 3d 22 31 "Image" width="1 1e40 36 30 22 20 68 65 69 67 68 74 3d 22 31 32 30 22 60" height="120" 1e50 20 74 6f 70 3d 22 38 33 22 20 6c 65 66 74 3d 22 top="83" left=" 1e60 38 22 20 66 69 74 3d 22 6d 65 65 74 22 2f 3e 0d 8" fit="meet"/>. 1e70 0a 3c 72 65 67 69 6f 6e 20 69 64 3d 22 54 65 78 .<region id="Tex 1e80 74 22 20 77 69 64 74 68 3d 22 31 36 30 22 20 68 t" width="160" h 1e90 65 69 67 68 74 3d 22 37 33 22 20 74 6f 70 3d 22 eight="73" top=" 1ea0 35 22 20 6c 65 66 74 3d 22 38 22 20 66 69 74 3d 5" left="8" fit= 1eb0 22 73 63 72 6f 6c 6c 22 2f 3e 0d 0a 3c 2f 6c 61 "scroll"/ >..</la 1ec0 79 6f 75 74 3e 0d 0a 3c 2f 68 65 61 64 3e 0d 0a yout>..</ head>.. 1ed0 3c 62 6f 64 79 3e 0d 0a 3c 70 61 72 20 64 75 72 <body>..<par dur 1ee0 3d 22 35 30 30 30 6d 73 22 3e 0d 0a 3c 69 6d 67 ="5000ms">..<img 1ef0 20 72 65 67 69 6f 6e 3d 22 49 6d 61 67 65 22 20 region="Image" 1f00 73 72 63 3d 22 49 6d 61 67 65 5f 31 36 2e 6a 70 src="Image_16.jp 1f10 67 22 2f 3e 0d 0a 3c 74 65 78 74 20 72 65 67 69 g"/>..<text regi 1f20 6f 6e 3d 22 54 65 78 74 22 20 73 72 63 3d 22 4d on="Text" src="M 1f30 6d 73 5f 70 72 6f 78 2e 74 78 74 22 2f 3e 0d 0a ms_prox.txt"/ >.. 1f40 3c 2f 70 61 72 3e 0d 0a 3c 2f 62 6f 64 79 3e 0d </par>..</ body>.
1f50   0a 3c 2f 73 6d 69 6c 3e 0d 0a                    .</smil>..


This is the smile Im getting with mms_submit_req

<smil>

<head>

<layout>

<root-layout width="176" height="208"/>

<region id="Image" width="160" height="120" top="83" left="8" fit="meet"/>

<region id="Text" width="160" height="73" top="5" left="8" fit="scroll"/>

</layout>

</head>

<body>

<par dur="5000ms">

<img region="Image" src="Image_16.jpg"/>

<text region="Text" src="Mms_prox.txt"/>

</par>

</body>

</smil>










Modified smil


In this smil file header length is =2e =46
Data length is encoded as uint var when decoded
Data length is 82 70  = 496

1da0    2e 83 70 1e 61 70 70 6c 69 63 61 74 69 6f 6e  y..p.application
1db0 2f 73 6d 69 6c 00 81 ea 85 70 72 65 73 2e 73 6d / smil....pres.sm 1dc0 69 6c 00 c0 22 3c 31 32 33 32 32 39 37 33 30 36 il.."<1232297306 1dd0 3e 00 0d 0a 3c 73 6d 69 6c 3e 0d 0a 3c 68 65 61 >...<smil>..<hea 1de0 64 3e 0d 0a 3c 6c 61 79 6f 75 74 3e 0d 0a 3c 72 d>..<layout>..<r 1df0 6f 6f 74 2d 6c 61 79 6f 75 74 20 77 69 64 74 68 oot-layout width 1e00 3d 22 31 37 36 22 20 68 65 69 67 68 74 3d 22 32 ="176" height="2 1e10 30 38 22 2f 3e 0d 0a 3c 72 65 67 69 6f 6e 20 69 08"/ >..<region i 1e20 64 20 3d 22 61 64 6c 69 76 65 22 20 77 69 64 74 d ="adlive" widt 1e30 68 3d 22 31 36 30 22 20 68 65 69 67 68 74 3d 22 h="160" height=" 1e40 31 32 30 22 66 69 74 20 3d 22 6d 65 65 74 22 2f 120"fit ="meet"/ 1e50 3e 0d 0a 3c 72 65 67 69 6f 6e 20 69 64 3d 22 49 >..<region id="I 1e60 6d 61 67 65 22 20 77 69 64 74 68 3d 22 31 36 30 mage" width="160 1e70 22 20 68 65 69 67 68 74 3d 22 31 32 30 22 20 74 " height="120" t 1e80 6f 70 3d 22 38 33 22 20 6c 65 66 74 3d 22 38 22 op="83" left="8" 1e90 20 66 69 74 3d 22 6d 65 65 74 22 2f 3e 0d 0a 3c fit="meet"/ >..< 1ea0 72 65 67 69 6f 6e 20 69 64 3d 22 54 65 78 74 22 region id="Text" 1eb0 20 77 69 64 74 68 3d 22 31 36 30 22 20 68 65 69 width="160" hei 1ec0 67 68 74 3d 22 37 33 22 20 74 6f 70 3d 22 35 22 ght="73" top="5" 1ed0 20 6c 65 66 74 3d 22 38 22 20 66 69 74 3d 22 73 left="8" fit="s 1ee0 63 72 6f 6c 6c 22 2f 3e 0d 0a 3c 2f 6c 61 79 6f croll"/>..</ layo 1ef0 75 74 3e 0d 0a 3c 2f 68 65 61 64 3e 0d 0a 3c 62 ut>..</ head>..<b 1f00 6f 64 79 3e 0d 0a 3c 70 61 72 3e 0d 0a 3c 74 65 ody>..<par>..<te 1f10 78 74 20 72 65 67 69 6f 6e 3d 22 61 64 6c 69 76 xt region="adliv 1f20 65 22 20 73 72 63 3d 22 54 6d 67 5f 67 6d 74 2e e" src="Tmg_gmt. 1f30 74 78 74 22 2f 3e 0d 0a 3c 2f 70 61 72 3e 0d 0a txt"/>..</ par>.. 1f40 3c 70 61 72 20 64 75 72 3d 22 35 30 30 30 6d 73 <par dur="5000ms 1f50 22 3e 0d 0a 3c 69 6d 67 20 72 65 67 69 6f 6e 3d ">..<img region= 1f60 22 49 6d 61 67 65 22 20 73 72 63 3d 22 49 6d 61 "Image" src="Ima 1f70 67 65 5f 31 36 2e 6a 70 67 22 2f 3e 0d 0a 3c 74 ge_16.jpg"/ >..<t 1f80 65 78 74 20 72 65 67 69 6f 6e 3d 22 54 65 78 74 ext region="Text 1f90 22 20 73 72 63 3d 22 4d 6d 73 5f 70 72 6f 78 2e " src="Mms_prox. 1fa0 74 78 74 22 2f 3e 0d 0a 3c 2f 70 61 72 3e 0d 0a txt"/>..</ par>.. 1fb0 3c 2f 62 6f 64 79 3e 0d 0a 3c 2f 73 6d 69 6c 3e </body>..</ smil>
1fc0   0d 0a                                            ..


Modified Smil
<smil>

<head>

<layout>

<root-layout width="176" height="208"/>

<region id ="adlive" width="160" height="120"fit ="meet"/>

<region id="Image" width="160" height="120" top="83" left="8" fit="meet"/>

<region id="Text" width="160" height="73" top="5" left="8" fit="scroll"/>

</layout>

</head>

<body>

<par>

<text region="adlive" src="Tmg_gmt.txt"/>

</par>

<par dur="5000ms">

<img region="Image" src="Image_16.jpg"/>

<text region="Text" src="Mms_prox.txt"/>

</par>

</body>
</smil>

I submit modified mms_send_req to mbuni mmsc.Then in logs it says that

  Content-Type: application/smil; charset=utf-8; name="pres.smil"
2009-09-17 11:21:38 [18816] [10] DEBUG: Content-ID: <1232297306>
2009-09-17 11:21:38 [18816] [10] DEBUG: WSP: End of decoded headers.
2009-09-17 11:21:38 [18816] [10] WARNING: Parse error reading mime body [hlen=46, dlen=496, left=378]! 2009-09-17 11:21:38 [18816] [10] DEBUG: Parse error on incoming message.


And I'm getting a response as Malformed MMS
It says that there is a parse error incoming message.
Is there anything I have missed out.?
Any suggestions.?

Thanks
Thilani

_______________________________________________
Users mailing list
Users@mbuni.org
http://lists.mbuni.org/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@mbuni.org
http://lists.mbuni.org/mailman/listinfo/users

Reply via email to