语言

Menu
Sites
Language
RTSP streaming

I am not able to do rtsp streaming. The player fails to prepare giving error code -38. Does anybody have any idea what this means?

响应

8 回复
eunhae choi

-38 means simply TIZEN_ERROR_INVALID_OPERATION.

There can be many reasons to get that error from player_prepare() api.

- kind of connection failure, decoding failure, etc.

Heechul Jeon

Can you please share your environment? (Platform version & Target). Also if you can share the logs, It will be very helpful to us to find problem.

ilyas barr

Hi.

I'm currently having this issues right now.

In the log that's what I'm having :

02-09 23:43:38.599 : ERROR / TIZEN_N_PLAYER ( 3938 : 3938 ) : player.c: player_prepare(1433) > [player_prepare] Failed to realize - 0x80000409
02-09 23:43:38.599 : ERROR / TIZEN_N_PLAYER ( 3938 : 3938 ) : player.c: __player_convert_error_code(301) > [player_prepare] PLAYER_ERROR_INVALID_OPERATION(0xffffffda) : core fw error(0x80000409)
02-09 23:43:38.599 : ERROR / player ( 3938 : 3938 ) : player_prepare error : ERROR_INVALID_OPERATION

Here is the extract of my code:

player_h player;
int error_code;

error_code = player_create(&player);
/* ... Error checking  here ...*/

error_code = player_set_uri(player, "rtsp://192.168.1.2/live");
/* ... Error checking  here ...*/

error_code = player_prepare(ad->player); //crash happens here
/* ... Error checking  here ...*/

 

Additional info:

- I can display the rtsp stream on VLC (on my computer)

- I'm testing the app on a samsung gear S3

- I'm using Tizen wearable-2.3.2

Any idea ?

Phil rzr

Can you make it run on simulator ? or on Tizen:2.4:Mobile ?


 

ilyas barr

I need the wifi in order to connect to the stream (the device is a camera). I think that the emulator does not support WiFI connection.

I don't have Tizen mobile. Only the  Samsung Gear S3.

More information about the issue:

- If i replace the URI by something like "http:// 192.168.1.2/file.mp4" player_prepare() returns with no error.

- It looks like player_prepare() calls the library libmm-player. I've checked the code and may identified where the method returns:

int
_mmplayer_realize(MMHandleType hplayer) // @
{
    mm_player_t* player =  (mm_player_t*)hplayer;
/* ... truncated ... */
	attrs = MMPLAYER_GET_ATTRS(player); 
	if ( !attrs )
	{
		debug_error("fail to get attributes.\n");
		return MM_ERROR_PLAYER_INTERNAL; // method returns here 
	}

/* ... truncated ...*/
}

The macro is define like this :

#define MMPLAYER_GET_ATTRS(x_player)    	((mm_player_t*)x_player)->attrs

I'm not totally sure about that but it looks like the macro returns NULL.

Phil rzr

Try wired first, btw I can test on any sample project or vlc on tizen mobile if you share a public RSTP stream if needed

ilyas barr

Sorry i don't got the "try wired first".

Here is the sample of code I'm using (I replaced the URI by a stream available online. which gives me the same error):

typedef struct player {
   player_h player;
} t_player;

void
init_base_player(t_player *ad)
{
    player_state_e st;
    int error_code = 0;

    // Create player handler
    error_code = player_create(&(ad->player));
    if(error_code)
    {
      /* ... error checking ... */
    }

    // Set URI
    error_code = player_set_uri(ad->player, "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov");
    if(error_code)
    {
      /* ... error checking ... */
    }

    // Prepare
    error_code = player_prepare(ad->player);
    if(error_code)
    {
      /* ... error checking ... */
    }

}

This method is called like this :

typedef struct appdata {
    /* ... others statements ... */
    t_player player_helper;
} appdata_s;

static void
app_control(app_control_h app_control, void *data)
{
    appdata_s *ad = data;
    init_base_player(&ad->player_helper);
}

 

 

ilyas barr

Ok guys I've found why is not working.

I asked Samsung about this behaviour and the reply is quite clear.

RTSP stream is not supported on Samsung Gear S2/S3 with Tizen 2.3.2. The API will be updated in order to remove the rtsp from support protocol for wearable-2.3.2.

This features should be available soon in the next release (3.x).