playing RTP/TCP/AVP video stream (RTSP over HTTP tunnel)

by Andrč°Šs Turi » Wed, 08 Dec 2010 16:27:12 GMT


Sponsored Links
 Hello!

We are trying to play a video stream on the Android platform, with no
success.
Using the VideoView, we are able to play youtube mobile videos (e.g.
this url works just fine:
rtsp://v3.cache7.c.youtube.com/CjYLENy73wIaLQnMYzt2FtQmqxMYESARFEIJbXYtZ29vZ2xlSARSBXdhdGNoYI6vr52RlLW1Sww=/0/0/0/video.3gp
)

However, we need to play a given stream from an RTSP url, over which
we have no control.
The RTSP server delivers RTP/TCP/AVP packets interleaved over RTSP.
RTSP itself is supported via HTTP tunnelling over port 80.
The video format is MPEG4-Part2 (H.263).
Moreover, the rtsp url can be used one time only; built with a key-
string every time. On a desktop system, quicktime could play the
stream, VLC could not.

Is it possible to play back such a stream on an Android device
somehow?

I read googling around that the builtin (openCore?) RTP stack only
supports RTP over UDP, not TCP. Is this (still) true?
Can I somehow bypass this problem?

Thanks!
Turi Andrs

-- 



Other Threads

1. Integrate ImageButton with ListActivity failed - List no longer selectable.

Hi,

I have a working ListActivity class. Each of the list item consists of
an ImageView and a TextView.

However, when I try to replace the ImageView with ImageButton, The
list becomes unselectable. The onListItemClick or any other function
no longer get called when press a list item (Although the track ball
can still focus a list item, but nothing more can be done).

I have searched the forum and also the internet and failed to find any
such working example, apart from one guy reporting a similar problem
but with no answer.

The following is my code:

1.      The list_item.xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:layout_width="fill_parent"
    android:layout_height="?android:attr/listPreferredItemHeight">

    <ImageButton
        android:id="@+id/refresh"

        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_alignParentTop="true"
        android:layout_alignParentBottom="true"
        android:src="@drawable/refresh" />
    <TextView
        android:id="@+id/title"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
                android:layout_toRightOf="@id/refresh"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:singleLine="true"/>
</RelativeLayout>

2.      the Main ListActivity class:

import android.app.Dialog;
import android.app.ListActivity;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

public class TestListActivity extends ListActivity implements
Constants {


        @Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setListAdapter(new EfficientAdapter(this));
        }

        @Override
        protected void onListItemClick(ListView l, View v, int index, long
id) {
                Log.i("", "onListitemClick");
        }

        public boolean onContextItemSelected(MenuItem item) {
                Log.i("", "onContextItemSelected");
                return false;
        }

        private class EfficientAdapter extends BaseAdapter implements
Constants {
                private LayoutInflater layoutInflater;

                Context ctx;
                public EfficientAdapter(Context context) {
                        // Cache the LayoutInflate to avoid asking for a new 
one each time.
                        layoutInflater = LayoutInflater.from(context);
                        ctx = context;
                }


                @Override
                public int getCount() {
                        Log.i("", "getCount");
                        return SIZE;
                }

                @Override
                public Object getItem(int position) {
                        Log.i("", "getItem");
                        return "TBD";           }

                @Override
                public long getItemId(int positin) {
                        Log.i("", "getItemId");
                        return positin;
                }

                public void update(int position) {
                        notifyDataSetChanged(); // triggers the view data to be 
refreshed!
                }

                /**
                 * Make a view to hold each list item
                 */
                @Override
                public View getView(int position, View convertView, ViewGroup
parent) {
                        Log.i("", "getView");
                        ViewHolder holder;
                        if (convertView == null) {
                                convertView = 
this.layoutInflater.inflate(R.layout.list_item,
parent, false);

                                holder = new ViewHolder();
                                holder.title = (TextView) 
convertView.findViewById(R.id.title);
                                convertView.setTag(holder);
                        } else {
                                holder = (ViewHolder) convertView.getTag();
                        }

                        holder.title.setText(R.string.title);
                        parent.focusableViewAvailable(convertView); // 
originally without
this. Added for testing, still not working!
                        return convertView;
                }

                private class ViewHolder {
                        //ImageButton imageButton;
                        TextView title;
                }
        }
}

Is there any way to make ListActivity working with ImageButton or this
actually can not be achieved (iPhone can this)?

Any help would be most appreciated.


-- 

2. Layout problems: AbsoluteLayout deprecated, how to do it now?

Hi!

For my game "Leonard Frog - Beta" in the market, I use an
AbsoluteLayout to place all the buttons in the correct position like
in the following image:
http://digle.de/friends/LeonardFrogBig.jpg

Now the AbsoluteLayout is deprecated. How can I place these buttons
now in the right position like in the image without using the
AbsoluteLayout? (I don't want to cover the frog and other things of my
background image).

The other problem with my AbsoluteLayout was that my main page of the
game looks like this on smaller devices:
http://digle.de/friends/LeonardFrogSmall.jpg

I hope, there is a solution for this.

Greetings, Martin

-- 

3. HTC Hero Album app source code, anyone ?

4. (x,y) co-ordinates of touched area ?

5. (x,y) co-ordinates of touched area ?

6. DELL 5

7. cyrket sudah normal