Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
55 user(s) are online (36 user(s) are browsing Forums)

Members: 1
Guests: 54

samo79, more...

Support us!

Recent OS4 Files
OS4Depot.net




(1) 2 3 4 ... 15 »


Odyssey's MediaPlayer thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6325
@All

It's time for everyone who ask for sources to do some real help :) Or anyone who not ask for sources , but can bring any kind of developer's help. That will be apprecated.

So, we have currently 2 issues:

1). MediaPlayer itself is buggy much. For example just moving of position slider offten loose audio (and not only in odyssey, but in whole system and reset need it). That one will be pretty nice to fix. It can be something about programming of AHI itself and differences with the way how it should be done for OS4 and how it was done for MORPHOS. I only replace there necessary stuff to made it compiles. There is files files in question:
https://github.com/kas1e/Odyssey/tree/ ... BAL/Media/WebCore/MorphOS

Main one is BCMediaPlayerPrivateMorphOS.cpp. There also acinerella.c which used too, but its usuall file from Acinerella for some basic functions to use with ffmpeg, so that one no big worry probabaly.

2). While first issue is important to fix, things still will be kind of slow, so we want things to be harware accelerated when we go to fullscreen mode (as there we will have no browser anymore, so no cairo limitations and things can be fast, same as done on MorphOS).

I think that we first need to go "composition" way for fullscreen, and later can add overlay for older cards (if there will be real needs in as if i remember right, even old Radeon9200 support compositing as well?).

File in question just one: owbbrowserclass.cpp. File placed there: https://github.com/kas1e/Odyssey/blob/ ... rphOS/owbbrowserclass.cpp

The relevant part which currently only handle CGX5 overlay (so of no use for us) placed in one single method
"DEFSMETHOD(OWBBrowser_VideoEnterFullPage)":

https://github.com/kas1e/Odyssey/blob/ ... owbbrowserclass.cpp#L3795

Relevant code which we "just" need to rewrite on compositing usage are placed inside of if(CGXVideoBase).

Whole "video-related" code are in #if ENABLE(VIDEO), but probabaly all what we need it just rewrite that part on compositing:

if(CGXVideoBase)
        {
            
struct Window *window = (struct Window *) getv(_win(obj), MUIA_Window);

            if(
window)
            {
                
IntSize size element->player()->naturalSize();
                
//kprintf("naturalsize %dx%dn", size.width(), size.height());

                
ULONG vlayer_width  size.width() & -8;
                
ULONG vlayer_height size.height() & -2;

                
data->video_mode SRCFMT_YCbCr420;

                
data->video_handle CreateVLayerHandleTags(window->WScreen,
                                        
VOA_SrcType,      data->video_mode,
                                        
VOA_UseColorKey,  TRUE,
                                        
VOA_UseBackfill,  FALSE,
                                        
VOA_SrcWidth,     vlayer_width,
                                        
VOA_SrcHeight,    vlayer_height,
                                        
VOA_DoubleBufferTRUE,
                                        
TAG_DONE);

                if(!
data->video_handle)
                {
                    
DoMethod(appMM_OWBApp_AddConsoleMessage"[MediaPlayer] Couldn't create planar overlay layer, trying chunky instead");

                    
data->video_mode SRCFMT_YCbCr16;

                    
data->video_handle CreateVLayerHandleTags(window->WScreen,
                                            
VOA_SrcType,      data->video_mode,
                                            
VOA_UseColorKey,  TRUE,
                                            
VOA_UseBackfill,  FALSE,
                                            
VOA_SrcWidth,     vlayer_width,
                                            
VOA_SrcHeight,    vlayer_height,
                                            
VOA_DoubleBufferTRUE,
                                            
TAG_DONE);
                }

                if(
data->video_handle)
                {
                    if ( ( (float) 
size.width() / (float) size.height()) < ( (float) _mwidth(obj) / (float) _mheight(obj)) )
                    {
                        
// Width is too big
                        
data->video_y_offset 0;
                        
data->video_x_offset _mwidth(obj) - (ULONG) (_mheight(obj) * ( (float) size.width() / (float) size.height()));
                        
data->video_x_offset /= 2;
                    }
                    else
                    {
                        
// Height too big
                        
data->video_y_offset _mheight(obj) - (ULONG) (_mwidth(obj) * ( (float) size.height() / (float) size.width()));
                        
data->video_y_offset /= 2;
                        
data->video_x_offset 0;
                    }

                    if(
== AttachVLayerTags(data->video_handlewindow,
                                              
VOA_LeftIndent,   _mleft(obj) - window->BorderLeft data->video_x_offset,
                                              
VOA_RightIndent,  window->Width window->BorderRight _mright(obj) + data->video_x_offset,
                                               
VOA_TopIndent,    _mtop(obj) - window->BorderTop data->video_y_offset,
                                              
VOA_BottomIndentwindow->Height window->BorderBottom -_mbottom(obj) + data->video_y_offset,
                                              
TAG_DONE))
                    {
                        
data->video_fullscreen msg->fullscreen;
                        
data->video_element    element;
                        
data->video_colorkey   GetVLayerAttr(data->video_handleVOA_ColorKey);

                        
enable_blanker(_screen(obj), FALSE);

                        
// Change backfill behaviour
                        
set(objMUIA_FillArea,       TRUE);
                        
set(objMUIA_CustomBackfillTRUE);
                        
DoMethod(objMUIM_Backfill_mleft(obj), _mtop(obj), _mright(obj), _mbottom(obj), 000);

                        if(
data->video_mode == SRCFMT_YCbCr16)
                        {
                            
element->player()->setOutputPixelFormat(AC_OUTPUT_YUV422);
                        }
                        else if(
data->video_mode == SRCFMT_YCbCr420)
                        {                            
                            
element->player()->setOutputPixelFormat(AC_OUTPUT_YUV420P);
                        }

                        
set(data->hbargroupMUIA_ShowMeFALSE);
                        
set(data->vbarMUIA_ShowMeFALSE);

                        
Object *mediacontrolsgroup = (Object *) getv(_parent(_parent(obj)), MA_OWBGroup_MediaControlsGroup);
                        if(
mediacontrolsgroup)
                        {
                            
set(mediacontrolsgroupMA_MediaControlsGroup_Browserobj);
                            
set(mediacontrolsgroupMUIA_ShowMeTRUE);
                        }
                    }
                    else
                    {
                        
DeleteVLayerHandle(data->video_handle);
                        
data->video_handle NULL;
                    }             
                }
                else
                {
                    
DoMethod(appMM_OWBApp_AddConsoleMessage"[MediaPlayer] Couldn't create overlay layer");
                }
            }     
        }


And that all. Probabaly there will be needs to a bit touch other fucntions inside of VIDEO part.. But after we will have full-screen mediaplayer in fullspeed and all stuff.

As i not a coder, there need some work done by someone skilled who works already with compositing before, and know how to replace it.

There no needs you to write everything and have working stuff , just something to start with. Maybe pure initialisation of compositing, and render something to it in that place, and then step by step. Even put there code, and i will myself compile it and giving results right away, so we can do it all even if you have no amiga to test, or at work, etc :)



Edited by kas1e on 2020/3/16 21:25:49
Edited by kas1e on 2020/3/17 18:02:33
   Report Go to top

Re: Odyssey's MediaPlayer help need it
Home away from home
Joined:
2007/1/26 21:48
From New Zealand
Posts: 2310
@all
I was hoping to take a small look at this, but I'm pretty swamped with other stuff...

For anyone wanting to add composited video support. Have a look at the CompositeYUVBlitStream example that's downloadable from this page (down the bottom). That example shows you how you can take advantage of DMA on systems that have it.

Hans

   Report Go to top

Re: Odyssey's MediaPlayer help need it
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1069
@kas1e

1) Have you enabled debug prints? Do you see this print https://github.com/kas1e/Odyssey/blob/ ... rPrivateMorphOS.cpp#L1675 ?

How this issue can be reproduced? Some page needed? Some file needed to play?

2) I can try help with compositing later.

   Report Go to top

Re: Odyssey's MediaPlayer help need it
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6325
@Capehill
Quote:


1) Have you enabled debug prints? Do you see this print https://github.com/kas1e/Odyssey/blob/ ... rPrivateMorphOS.cpp#L1675 ?


Yes, there is debug output when I just go to http://www.html5videoplayer.net/html5video/mp4-h-264-video-test/ and press "play", and then move time-slider (and have lost audio, and video start to be slower much).

supportsType(video/mp4, ) 1
supportsType
(video/mp4, ) 1
supportsType
(video/mp4, ) 1
[MediaPlayerMediaPlayerPrivate()
[
MediaPlayerAdd media instance 0x625A1E18
[MediaPlayerMediaPlayerPrivate() OK
[MediaPlayer ThreadHello
[MediaPlayer ThreadWait for command
[MediaPlayerLoad http://www.html5videoplayer.net/videos/toystory.mp4
[MediaPlayercancelLoad()
[
MediaPlayerfetchData(0)
[
MediaPlayer ThreadWait for command (0 in queue) (task 0x0x6148A850)
[
MediaPlayer ThreadWait for signal (task 0x0x6148A850)
[
MediaPlayernetworkState 2
[MediaPlayernetworkState 2
[MediaPlayerSend command <IPC_CMD_LOAD>
[
MediaPlayer ThreadReceived new command <IPC_CMD_LOAD> (task 0x0x6148A850)
[
MediaPlayer ThreadLoad
[MediaPlayerfetchData(33397902)
[
MediaPlayerDidReceiveResponserange: <bytes 33397902-33505478/33505479>
[
MediaPlayerdidFinishLoadingeof 0
Count of Datastreams
:  2
File duration
149
File bitrate
1787554
Title
:
Author:
Album:

Information about stream 1:
Stream is an audio stream.
--------------------------

  * 
Samples per Second44100
  
Channel count     2
  
Bit depth         32
  
Duration          149.861587
  
Decoder           0x0x618A6FB0

Information about stream 0
:
Stream is an video stream.
--------------------------

 * 
Width            640
 
Height           360
 
Pixel aspect     1.000000
 
Frames per second29.970030
 
Duration         149.949800
 
Decoder          0x0x60DAC0A0
Duration
149.000000 Bitrate1787554
[MediaPlayerreadyState 1
[Video ThreadHello
[Audio ThreadHello
[MediaPlayer ThreadLoad OK
[MediaPlayer ThreadWait for command
[MediaPlayer ThreadWait for command (0 in queue) (task 0x0x6148A850)
[
MediaPlayer ThreadWait for signal (task 0x0x6148A850)
[
MediaPlayerPreparetoPlay
[MediaPlayerPlay
[MediaPlayerSend command <IPC_CMD_PLAY>
[
MediaPlayer ThreadReceived new command <IPC_CMD_PLAY> (task 0x0x6148A850)
[
MediaPlayer ThreadPlay
[Audio Output ThreadHello
[MediaPlayer ThreadResume audio
[MediaPlayerfetchData(32816)
[
MediaPlayerDidReceiveResponserange: <bytes 32816-33505478/33505479>
[
MediaPlayerreadyState 2
[MediaPlayerPause
[MediaPlayerSend command <IPC_CMD_PAUSE>
[
MediaPlayerreadyState 3
[MediaPlayerreadyState 3
[MediaPlayer Thread] New command to process
[MediaPlayer ThreadWait for command
[MediaPlayer ThreadWait for command (1 in queue) (task 0x0x6148A850)
[
MediaPlayer ThreadFound command <IPC_CMD_PAUSEin queue
[MediaPlayer ThreadPause
[MediaPlayer ThreadPause audio
[MediaPlayer ThreadWait for command
[MediaPlayer ThreadWait for command (0 in queue) (task 0x0x6148A850)
[
MediaPlayer ThreadWait for signal (task 0x0x6148A850)
supportsType(text/xml, ) 0
supportsType
(text/xml, ) 0
supportsType
(text/xml, ) 0
supportsType
(text/xml, ) 0
supportsType
(text/xml, ) 0
[MediaPlayerreadyState 4
[MediaPlayerreadyState 4
[MediaPlayerSet rate to 1.000000
[MediaPlayer ThreadSet volume 1.000000
[MediaPlayerPlay
[MediaPlayerSend command <IPC_CMD_PLAY>
[
MediaPlayer ThreadReceived new command <IPC_CMD_PLAY> (task 0x0x6148A850)
[
MediaPlayer ThreadPlay
[MediaPlayer ThreadResume audio
[MediaPlayerreadyState 4
[MediaPlayerSeek to 14.345733
[MediaPlayerSend command <IPC_CMD_SEEK>
[
MediaPlayer Thread] New command to process
[MediaPlayer ThreadWait for command
[MediaPlayer ThreadWait for command (1 in queue) (task 0x0x6148A850)
[
MediaPlayer ThreadFound command <IPC_CMD_SEEKin queue
[MediaPlayer ThreadSeek to 14.345733 currentTime 8.903220
[MediaPlayer ThreadSeek really needed
[MediaPlayer ThreadSeek Video OK
[MediaPlayer ThreadReset audio buffers
[MediaPlayer ThreadSeek Audio OK
[MediaPlayer ThreadSeekcalling updateStates
[MediaPlayer ThreadSeekcalling timeChanged
[MediaPlayer ThreadSeekcalling playerAdvance
[Audio ThreadFlush packet received
[MediaPlayerreadyState 4
[Video ThreadFlush packet received
[MediaPlayerSend command <IPC_CMD_PLAY>
[
MediaPlayerreadyState 4
[MediaPlayer ThreadWait for command
[MediaPlayer ThreadWait for command (1 in queue) (task 0x0x6148A850)
[
MediaPlayerreadyState 4
[MediaPlayer ThreadFound command <IPC_CMD_PLAYin queue
[MediaPlayer ThreadPlay
[MediaPlayer ThreadResume audio



Quote:

How this issue can be reproduced? Some page needed? Some file needed to play?


Just that one: http://www.html5videoplayer.net/html5video/mp4-h-264-video-test/ is good for tests.

I may try also to recompile FFmpeg, maybe it will be somehow related to. Maybe AHI code (flushing of buffers, initialization, etc) fail... Because it's not just a player die, but audio disappears in the whole system and reboot must, which mean something weird happens with AHI.

And such bug may happen not all the time right from the beginning, but its enough 1-2-3 times move time slider in some different positions to loose audio completely in the system and made the whole player act like slideshow :)

Maybe IPC_CMD_SEEK code fails as well...

There also AROS version: https://github.com/deadw00d/OdysseyWeb ... aPlayerPrivateMorphOS.cpp

In this one DeadW00d do 2 fixes since :

1. improve audio/video sync code (That one I added too and it didn't change a thing for us):
https://github.com/deadw00d/OdysseyWeb ... 39163ffef87367d9658eb3e85


2. add explicit 0.2 second A/V delay for AROS (that one I do not know why added and didn't try if this will make any sense for us yet):
https://github.com/deadw00d/OdysseyWeb ... aa2adac4fe3fbcd92c0bf0ed3


Quote:

2) I can try help with compositing later.


Awesome!


Edited by kas1e on 2020/3/17 7:28:46
Edited by kas1e on 2020/3/17 7:30:07
Edited by kas1e on 2020/3/17 7:46:05
   Report Go to top

Re: Odyssey's MediaPlayer help need it
Quite a regular
Joined:
2008/10/29 10:20
From Uppsala, Sweden
Posts: 749
@kas1e
I was about to suggest Emotion player but you have already talked to Thomas and Frank. I hope they can help with browser and mediaplayer.

   Report Go to top

Re: Odyssey's MediaPlayer help need it
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1069
@kas1e

EDIT: never mind, the ampersand seems to be optional.

But I can't reproduce the audio issue here.


Edited by Capehill on 2020/3/17 17:01:49
   Report Go to top

Re: Odyssey's MediaPlayer help need it
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6325
@Capehill
Are you able to play exactly that video, wait let's say 10 seconds, then grab time slide over video move it at begining, again wait while it plays (with audio), then again move slider somewhere else, etc. So repeat it 5-10 times. I will try on pegasos2 as well now (so different HW and different audio card). But then you also on x5000 with the same onboard sound card (right?)

Also i always on debug kernel with "munge" enabled.

@All
Anyone else able to reproduce issues with loosing audio when play a videos in mediaplayer and move time slider from time to time ?

What other issues you have with mediaplayer?


Edited by kas1e on 2020/3/17 18:02:53
   Report Go to top

Re: Odyssey's MediaPlayer thread
Just popping in
Joined:
2017/10/28 11:03
From Netherlands
Posts: 51
@All
Anyone else able to reproduce issues with loosing audio when play a videos in mediaplayer and move time slider from time to time ?

I have been playing the movie on Beta3 for quite a while now...
Have been sliding around with no issues so far. X5K with M-Audio (envy based) soundcard and Radeon R7 250






Edited by Skateman on 2020/3/17 18:44:44
   Report Go to top

Re: Odyssey's MediaPlayer thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6325
@Skateman
I can easyly reproduce it with video from there http://www.html5videoplayer.net/html5video/mp4-h-264-video-test/

The way how i reprduce it are:

1). play on video.
2). when it plays, hit the pause.
3). move time slider back on some position
4). hit again play button

at this point no sound, and video start to be choppy.

To note, video is not fully loaded at this moment (maybe that somehow related).

   Report Go to top

Re: Odyssey's MediaPlayer thread
Just popping in
Joined:
2006/11/29 7:57
Posts: 163
@kas1e

I'm sorry to say it but the mediaplayer actually works quite good :D
I can not reproduce your audio problem.
Tested with both debug & non-debug kernel on my X5k with emu10kx card.

I'm not on youtube so often but lately i have been using it more and more since a couple of months since i have no other computer that is easy to access at home and i have not had any audio problems, but sometimes i do get a crash.

   Report Go to top

Re: Odyssey's MediaPlayer thread
Just popping in
Joined:
2017/10/28 11:03
From Netherlands
Posts: 51
@kas1e

Tried with the same videolink and no issues yet..
I will try to make a video of it


   Report Go to top

Re: Odyssey's MediaPlayer thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6325
@Skateman
No needs for video, i of course trust to what you say :)

@smf
That quite strange then ! For me its really easy reproducable. Maybe some dockies running in background may cause it..

Expectually when i heard in last years how buggy mediaplayer is :)

Quote:

X5k with emu10kx card.


That not one which is builtin on x5k motherboard ? Some other one ?

   Report Go to top

Re: Odyssey's MediaPlayer thread
Just popping in
Joined:
2017/10/28 11:03
From Netherlands
Posts: 51
@kas1e

I do run the beta3 just next to my standard odyssey... So downloaded, and extracted it.. .


   Report Go to top

Re: Odyssey's MediaPlayer thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6325
@Skateman
So SMF use emu10kx, you use M-Audio (envy based), in my case i have some "cmi8738" based, in ranger shows as "C-Media Electronics Inc", and driver version is 5.18 (22.11.2015). Maybe just my card faulty or driver for it ?

@Capehill
What sound card you use ?

   Report Go to top

Re: Odyssey's MediaPlayer thread
Just popping in
Joined:
2017/10/28 11:03
From Netherlands
Posts: 51
@kas1e

It seems that the only difference is the sound card...If this is the case i can always send you the Soundblaster EMU that came with my X5K.

   Report Go to top

Re: Odyssey's MediaPlayer thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6325
@Skateman
Quote:

It seems that the only difference is the sound card...


That should be my card/driver indeed.. I tried to install version of driver from os4depot (5.16 one), and i even can't start pay a movie with it, it just loose audio from the begining and everything choppy. With 5.18 (beta) version of driver , i at least was able to start.

Strange that the first time i have issues with sound it's Odyssey's mediaplayer.

Quote:

If this is the case i can always send you the Soundblaster EMU that came with my X5K.

Nah, thanks , i will buy one faster in some local shop, if of course those which we support still can be buyed in local shops ?:)

   Report Go to top

Re: Odyssey's MediaPlayer thread
Not too shy to talk
Joined:
2018/1/4 10:56
From Italy
Posts: 260
I report here my test with the H.264 video with Odyssey, I hope it will be useful in some way.

Side note:
The capture program I use is software, so it affects some real performance.
But the test works perfectly.
I used spoffing with "Opera Browser"
I unchecked "Fast Seeking" otherwise the video doesn't start.
In this case I had to modify the video capture software to not conflict with the audio, so in some cases it seems not synchronized, but in reality without the capture software everything works perfectly even by moving the video back and forth the audio works.

With this spoffing I can also access Youtube to upload a video, if it can be useful.

I hope it is useful, thanks again for your work.
here the video:
https://www.youtube.com/watch?v=yxawMkh_G2A

while here a video where you can see that beta 03 works perfectly with Youtube:
https://www.youtube.com/watch?v=XrGxHv7fZAU

   Report Go to top

Re: Odyssey's MediaPlayer thread
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1069
@kas1e

Soundblaster EMU10K. Don't remember all the details but can update info later.

   Report Go to top

Re: Odyssey's MediaPlayer thread
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6325
@Capehill
That mean that i am the only one using cmi8738 with c-media card on my x5k and having such a problems. And seeing that with version from os4depot everything loose audio and start to crawl just when i press pure "play", but with beta version few versions above i can play at least while not start moving slider, it all point out on issues with driver, probabaly.

Will check other card firstly to be sure, hope that it.

   Report Go to top

Re: Odyssey's MediaPlayer thread
Just popping in
Joined:
2006/11/29 7:57
Posts: 163
@kas1e

Have you ever used the Asmediatest tool?
https://forum.hyperion-entertainment.c ... b40d01653dd15494d3b725717

From this thread
https://forum.hyperion-entertainment.c ... .php?f=57&t=3625&start=10

I have a CMI8378 card somewhere in my drawers that i could test with if i can find it.
It was only used briefly in the early days of the X5k but it could atleast play mp3's for hours without a lockup.

*EDIT
After reading the thread it seems to be safer to just avoid having a sound card at all ;)



Edited by smf on 2020/3/18 9:20:09
   Report Go to top


(1) 2 3 4 ... 15 »



[Advanced Search]



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project