PJSIP and HD video

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



NO, NO and once more NO!
Guys, it is not look like ADVANCED development!
1. First of all - this code is not workable inside method
pj_status_t app_init(int argc, char *argv[])( file pjsua_app.c line 5388
version 2.0 beta). I pasted method code after pjsua_init call(file
pjsua_app.c line 5446, the same pjproject version):
I have compiller errors like these:

Error 1 error C2275: 'pj_str_t' : illegal use of this type as an
expression \pjsip-apps\src\pjsua\pjsua_app.c 5455
Error 2 error C2146: syntax error : missing ';' before identifier
'codec_id_str' \pjsip-apps\src\pjsua\pjsua_app.c 5455
Error 3 error C2065: 'codec_id_str' : undeclared
identifier \pjsip-apps\src\pjsua\pjsua_app.c 5455
Error 4 error C2440: '=' : cannot convert from 'pj_str_t' to
'int' \pjsip-apps\src\pjsua\pjsua_app.c 5456
Error 5 error C2275: 'pjmedia_vid_codec_param' : illegal use of this type
as an expression \pjsip-apps\src\pjsua\pjsua_app.c 5457
Error 6 error C2146: syntax error : missing ';' before identifier
'param' \pjsip-apps\src\pjsua\pjsua_app.c 5457
Error 7 error C2065: 'param' : undeclared
identifier \pjsip-apps\src\pjsua\pjsua_app.c 5457
Error 10 error C2224: left of '.enc_fmt' must have struct/union
type \pjsip-apps\src\pjsua\pjsua_app.c 5465
Error 11 error C2224: left of '.enc_fmt' must have struct/union
type \pjsip-apps\src\pjsua\pjsua_app.c 5466
Error 12 error C2224: left of '.dec_fmtp' must have struct/union
type \pjsip-apps\src\pjsua\pjsua_app.c 5468
Error 13 error C2224: left of '.dec_fmtp' must have struct/union
type pjsip-apps\src\pjsua\pjsua_app.c 5469

2. Secondly - MENTIONED CODE - HAD NEVER BEEN COMPILED. Because THESE
TWO LINES ARE NOT CORRECT:

param.enc_fmt.vid.size.w = 1921; // if i have exalcly 1920 then I don't see
video between two client
param.enc_fmt.vid.size.h = 1081; // / if i have exalcly 1080 then I don't
see video between two client

BECAUSE OF fact - enc_fmt (type pjmedia_format) has UNION "det", and only
this UNION has members "vid" and "aud". You miss one hierarchy element :-)
- so you 100% never build this code.
Correct variant of code:

param.enc_fmt.det.vid.size.w = 1921;
param.enc_fmt.det.vid.size.h = 1081;

2.1 next code had never been compiled too:

param.dec_fmtp.param[0].name = pj_str("profile-level-id");
param.dec_fmtp.param[0].value = pj_str("42e033"); // it can beetween level
4.0 to 5.1, (33 is 5.1 level)

BECAUSE of fact - struct pjmedia_codec_fmtp has substruct
    struct param {
 pj_str_t    name;     /**< Parameter name.  */
 pj_str_t    val;     /**< Parameter value.  */
    } param [PJMEDIA_CODEC_MAX_FMTP_CNT]; /**< The parameters.  */

value variable called "val", BUT NOT "value", as mentioned in posted code.
Correct variant of code:

param.dec_fmtp.param[0].name = pj_str("profile-level-id");
param.dec_fmtp.param[0].val = pj_str("42e033");


3. The worst thing is that the same code posted at help:
https://trac.pjsip.org/repos/wiki/Video_Users_Guide#modvcodec

So I make a conclusion - code from help and code from your post - never
been build with last version of PJ PROJECT(2.0 beta).

it is a pity, guys. I spend more time to explore not correct mistakes, then
pj project code.

4. Finally. I sucessfully used posted code (with me fixed, described above)
in my method (with UI under MFC) initPjsipStack.
I past code after

 status = pjsua_init(&ua_cfg, &log_cfg, &med_cfg);
 if (status != PJ_SUCCESS) {
  showError("pjsua_init", status);
  goto on_error;
 }

and before

 status = pjsua_transport_create(PJSIP_TRANSPORT_UDP,
  &udp_cfg, &udp_id);

And this code compilled successfully. But video resolution wasn't work and
as I suspect - was used this code:

    if (h264_fmtp->profile_idc == 0) {
 h264_fmtp->profile_idc = 0x42;
 h264_fmtp->profile_iop = 0x00;
 h264_fmtp->level = 0x0A;//default
    }

becouse of this code - I have wrong resolution.

SO PLEASE, GUYS - I found some your mistakes - please help me with mine
problems :-)

Sorry for my defiant tone.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120330/9b9f24ba/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux