playing video from browser in android running on beagle board

by susanner » Thu, 12 Mar 2009 01:33:07 GMT


Sponsored Links
 orry, I know nothing about beagle, I can only tell you a little suggestion 
according to my knowledge about media player of android up to now. I am working
on imx27 (from freescale) which integrates hardware codecs, and I am trying to
utilize these hardware codecs and I am trying to know more about omx (I think
you may need to search for this key words with android on internet), It seems
this framework will be help(but I am not a little sure about this), meanwhile I
am trying to find whether there is already some patches for android opencore
(not kernel ) or to utilize imx27 hardware codec(as long as your hardware can
successfully boot and your hardware codec has been successfully driven, the
problem should not from the kernel level, so I won't search patches for kernel).
I think (just my personal idea)/dev/pmem and /dev/pmem_adsp can't be created,
it depends on your hardware whether support it. (once again , I am not so sure
about this).
best regards.


009-03-11quot;Harishkumar V" <harishpres...@gmail.com> Susanner,

Thanks, it worked.

But, is there any chance of using hardware codec (ie) how to create /dev/pmem
and /dev/pmem_adsp interface.

Any patch available for beagle kernel.

Regards,
HarishKumar.V


2009/3/11 susanner <zsusan...@163.com>



Ah, I am not sure but you may need to correct the program:
external/opencore/android/android_surface_*.cpp
change mEmulation=true to use software codec.



009-03-11quot;Harishkumar V" <harishpres...@gmail.com>
Dear All,

I have android running on beagle board.
Using browser, when i play video from m.youtube.com, i get following messages
and video does not play and screen becomes blank.

V/ActivityThread( 995): Resuming ActivityRecord{436f6480
token=android.os.binderpr...@436f6090 {com.android.camera/com.ande
I/MediaPlayer-JNI( 995): prepareAsync: surface=0xc8808 (id=1)
I/ActivityManager( 814): Displayed activity com.android.camera/.MovieView:
2708 ms
D/dalvikvm( 814): GC freed 3287 objects / 182488 bytes in 62ms
D/dalvikvm( 964): GC freed 2953 objects / 451800 bytes in 58ms
W/PlayerDriver( 789): Using generic video MIO
V/VideoMIO( 789): CloseFrameBuf
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): iVideoWidth=176
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): iVideoHeight=144
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): iVideoDisplayWidth=176
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): iVideoDisplayHeight=144
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): VIDEO SUBFORMAT SET TO X-YUV-420-PLANAR
V/VideoMIO( 789): CloseFrameBuf
V/VideoMIO( 789): using software codec
E/MemoryHeapBase( 789): error opening /dev/pmem_adsp: No such file or directory
E/VideoMIO( 789): Error creating frame buffer heap
E/ALSALib ( 789): external/alsa-lib/src/pcm/pcm.c:2144:(snd_pcm_open_noupdate)
Unknown PCM AndroidPlayback_Speaker_normal
E/ALSALib ( 789): external/alsa-lib/src/pcm/pcm.c:2144:(snd_pcm_open_noupdate)
Unknown PCM AndroidPlayback_Speaker
E/ALSALib ( 789): external/alsa-lib/src/pcm/pcm.c:2144:(snd_pcm_open_noupdate)
Unknown PCM AndroidPlayback
I/AudioHardwareALSA( 789): Initialized ALSA PLAYBACK device AndroidPlayback
D/AudioHardwareALSA( 789): Set PLAYBACK PCM format to S16_LE (Signed 16 bit
Little E



playing video from browser in android running on beagle board

by susanner » Thu, 12 Mar 2009 01:43:41 GMT


  think when you run on emulator ,you need to set some parameters to let it 
know whether you want it vertically or horizontally.

emulator -skin HVGA-L
check this
android-sdk-linux_x86-1.0_r1/tools/lib/images/skins/
In eclipse, you need to set
run configurations-->target-->additional emulator command line options:
emulator -skin HVGA-L
(you can set other skins as you like)
I don't know how to set on real hardware, maybe have relationships of
framebuffer parameters.


009-03-11quot;Harishkumar V" <harishpres...@gmail.com> Susanner,

But the video plays vertically.

Between android running in emulator and running in beagle board (on LCD), the
main screen is different.

in emulator -> it is vertical.
in beagle -> it is horizontal.

Regards,
HarishKumar.V


2009/3/11 Harishkumar V <harishpres...@gmail.com>
Susanner,

Thanks, it worked.

But, is there any chance of using hardware codec (ie) how to create /dev/pmem
and /dev/pmem_adsp interface.

Any patch available for beagle kernel.

Regards,
HarishKumar.V


2009/3/11 susanner <zsusan...@163.com>




Ah, I am not sure but you may need to correct the program:
external/opencore/android/android_surface_*.cpp
change mEmulation=true to use software codec.



009-03-11quot;Harishkumar V" <harishpres...@gmail.com>
Dear All,

I have android running on beagle board.
Using browser, when i play video from m.youtube.com, i get following messages
and video does not play and screen becomes blank.

V/ActivityThread( 995): Resuming ActivityRecord{436f6480
token=android.os.binderpr...@436f6090 {com.android.camera/com.ande
I/MediaPlayer-JNI( 995): prepareAsync: surface=0xc8808 (id=1)
I/ActivityManager( 814): Displayed activity com.android.camera/.MovieView:
2708 ms
D/dalvikvm( 814): GC freed 3287 objects / 182488 bytes in 62ms
D/dalvikvm( 964): GC freed 2953 objects / 451800 bytes in 58ms
W/PlayerDriver( 789): Using generic video MIO
V/VideoMIO( 789): CloseFrameBuf
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): iVideoWidth=176
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): iVideoHeight=144
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): iVideoDisplayWidth=176
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): iVideoDisplayHeight=144
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): VIDEO SUBFORMAT SET TO X-YUV-420-PLANAR
V/VideoMIO( 789): CloseFrameBuf
V/VideoMIO( 789): using software codec
E/MemoryHeapBase( 789): error opening /dev/pmem_adsp: No such file or directory
E/VideoMIO( 789): Error creating frame buffer heap
E/ALSALib ( 789): external/alsa-lib/src/pcm/pcm.c:2144:(snd_pcm_open_noupdate)
Unknown PCM AndroidPlayback_Speaker_normal
E/ALSALib ( 789): external/alsa-lib/src/pcm/pcm.c:2144:(snd_pcm_open_noupdate)
Unknown PCM AndroidPlayback_Speaker
E/ALSALib ( 789): external/alsa-lib/src/pcm/pcm.c:2144:(snd_pcm_open_noupdate)
Unknown PCM AndroidPlayback
I/AudioHardwareALSA( 789): Initialized ALSA PLAYBACK device AndroidPlayback
D/AudioHardwareALSA( 789): Set PLAYBACK PCM format to S16_LE (Signed 16 bit
Little Endian)
D/AudioHardwareALSA( 789): Using 2 channels for PLAYBACK.
D/AudioHardwareALSA( 789): Set PLAYBACK sample rate to 44100 HZ
V/VideoMIO( 789): initializing for hardware

Wha


Sponsored Links


playing video from browser in android running on beagle board

by susanner » Thu, 12 Mar 2009 02:27:18 GMT


 h. in eclipse
run-->run configurations-->target
input
-skin HVGA-L


009-03-11quot;Harishkumar V" <harishpres...@gmail.com> Susanner,

But the video plays vertically.

Between android running in emulator and running in beagle board (on LCD), the
main screen is different.

in emulator -> it is vertical.
in beagle -> it is horizontal.

Regards,
HarishKumar.V


2009/3/11 Harishkumar V <harishpres...@gmail.com>
Susanner,

Thanks, it worked.

But, is there any chance of using hardware codec (ie) how to create /dev/pmem
and /dev/pmem_adsp interface.

Any patch available for beagle kernel.

Regards,
HarishKumar.V


2009/3/11 susanner <zsusan...@163.com>




Ah, I am not sure but you may need to correct the program:
external/opencore/android/android_surface_*.cpp
change mEmulation=true to use software codec.



009-03-11quot;Harishkumar V" <harishpres...@gmail.com>
Dear All,

I have android running on beagle board.
Using browser, when i play video from m.youtube.com, i get following messages
and video does not play and screen becomes blank.

V/ActivityThread( 995): Resuming ActivityRecord{436f6480
token=android.os.binderpr...@436f6090 {com.android.camera/com.ande
I/MediaPlayer-JNI( 995): prepareAsync: surface=0xc8808 (id=1)
I/ActivityManager( 814): Displayed activity com.android.camera/.MovieView:
2708 ms
D/dalvikvm( 814): GC freed 3287 objects / 182488 bytes in 62ms
D/dalvikvm( 964): GC freed 2953 objects / 451800 bytes in 58ms
W/PlayerDriver( 789): Using generic video MIO
V/VideoMIO( 789): CloseFrameBuf
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): iVideoWidth=176
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): iVideoHeight=144
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): iVideoDisplayWidth=176
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): iVideoDisplayHeight=144
V/VideoMIO( 789): setParametersSync
V/VideoMIO( 789): VIDEO SUBFORMAT SET TO X-YUV-420-PLANAR
V/VideoMIO( 789): CloseFrameBuf
V/VideoMIO( 789): using software codec
E/MemoryHeapBase( 789): error opening /dev/pmem_adsp: No such file or directory
E/VideoMIO( 789): Error creating frame buffer heap
E/ALSALib ( 789): external/alsa-lib/src/pcm/pcm.c:2144:(snd_pcm_open_noupdate)
Unknown PCM AndroidPlayback_Speaker_normal
E/ALSALib ( 789): external/alsa-lib/src/pcm/pcm.c:2144:(snd_pcm_open_noupdate)
Unknown PCM AndroidPlayback_Speaker
E/ALSALib ( 789): external/alsa-lib/src/pcm/pcm.c:2144:(snd_pcm_open_noupdate)
Unknown PCM AndroidPlayback
I/AudioHardwareALSA( 789): Initialized ALSA PLAYBACK device AndroidPlayback
D/AudioHardwareALSA( 789): Set PLAYBACK PCM format to S16_LE (Signed 16 bit
Little Endian)
D/AudioHardwareALSA( 789): Using 2 channels for PLAYBACK.
D/AudioHardwareALSA( 789): Set PLAYBACK sample rate to 44100 HZ
V/VideoMIO( 789): initializing for hardware

What is this /dev/pmem_adsp and how to create it.
Is there anything related with beagle kernel (2.6.27 from git mentioned in
beagle wiki) or related with android framework.

Using software codec means what, it will open which codec.
Also initializing hardware what it means.

Regards,
HarishKumar.V













--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----



Other Threads

1. Error playing YouTube video in my application

I'm trying to play streaming video(*.3gp) with android SDK 1.5 pre.
I have customized the APIDemo -> VideoViewDemo.java.
Specify the "path" to the URL of rtsp.
I got the URL from the following URL.
--http://gdata.youtube.com/feeds/api/videos?vq=8ZsML4uWoiw
I used the following URL(*.3gp)
--
path = "rtsp://rtsp2.youtube.com/
CiILENy73wIaGQksopaLLwyb8RMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp"

But following error has occur.
Please help me what is happen.

----
04-27 07:10:24.238: WARN/ActivityManager(587): Launch timeout has
expired, giving up wake lock!
04-27 07:10:24.265: WARN/ActivityManager(587): Activity idle timeout
for HistoryRecord{43603ba0 {com.example.android.apis/
com.example.android.apis.media.VideoViewDemo}}
04-27 07:10:27.975: ERROR/PlayerDriver(972): HandleInformationalEvent:
type=28 UNHANDLED
04-27 07:10:28.584: WARN/PlayerDriver(972): Using generic video MIO
04-27 07:10:44.975: ERROR/PlayerDriver(972): Command PLAYER_PREPARE
completed with an error or info PVMFFailure
04-27 07:10:44.985: ERROR/MediaPlayer(1095): error (1, -1)
04-27 07:10:44.995: ERROR/MediaPlayer(1095): Error (1,-1)
04-27 07:10:45.515: WARN/PlayerDriver(972):
PVMFInfoErrorHandlingComplete
----

I have confirmed the local *.3gp file is enable to play with this
code.
path = "/sdcard/747.3gp"

--~--~---------~--~----~------------~-------~--~----~

2. SDK1.5 AudioRecord sample rate problem

I was trying to record sound using the MIC with the AudioRecord class:

mRecord = new AudioRecord(
                        MediaRecorder.AudioSource.MIC,
                        SAMPLE_RATE,
                        AudioFormat.CHANNEL_CONFIGURATION_DEFAULT,
                        AudioFormat.ENCODING_DEFAULT,
                        BUFFERSIZE
                        );

This call results in:

ERROR/AudioRecord(1120): Recording parameters are not supported:
sampleRate 11025, channelCount 1, format 1
ERROR/AudioRecord-JNI(1120): Error creating AudioRecord instance:
initialization check failed.
ERROR/AudioRecord-Java(1120): [ android.media.AudioRecord ] Error code
-20 when initializing native AudioRecord object.

whenever the SAMPLE_RATE is some value other than
AudioRecord::DEFAULT_SAMPLE_RATE (8000) declared in ./frameworks/base/
include/media/AudioRecord.h from GIT.
The documentation says 11025/22050/44100 should be ok too.

Am I missing something?

Thank you for your help,

-Szabolcs

--~--~---------~--~----~------------~-------~--~----~

3. how can i open the jd file under developments/pdk/docs

4. Why corsor need to call setNotificationUri when query from content provider?

5. why no Horizontal GridView/ListView ?

6. Compiling against a *REAL* android.jar in eclipse???

7. G1 detected as 'offline' by Eclipse plugin