XBMC on Boxeebox
#46
quarnster,

2.1 - DVDVideoCodecXXX implements the CDVDVideoCodec interface. The actual code interfacing with the hardware in usually inside one or more specific classes.

The rest of your description is correct. In SMD (and other hardware SoC), the video decoder is connected directly to the renderer, so you don't actually get a "picture" to render, nor do you use any renderers to actually render it.
DVDPlayer was not meant to work this way, so some changes were required. Since both audio and video outputs from the demuxer are running in different threads, we take the demux video packet and move it into the decoder input. If the decoder is full, we block the thread. However we cannot block too long, since the system is waiting for picture and buffer events (VC_PICTURE & VC_BUFFER). So we block for a short time and then return.

This is not optimal, however XBMC was designed with software decoders, so the entire interface is biased toward this.

So the correct sequence when working with SMD should be:
- get the demuxed video packet
- push in into SMD pipeline. If the pipeline is full wait for some short time and try again (if you need to wait too long, something is probably wrong)
- report back to the player VC_PICTURE and VC_BUFFER to keep the system flowing. you can assume there will never be any dropped frames with the hardware decoder.
#47
Will this enable airplay on boxee?

Cause then you are my hero Smile
#48
Quote:In SMD (and other hardware SoC), the video decoder is connected directly to the renderer, so you don't actually get a "picture" to render, nor do you use any renderers to actually render it.

I'm quite aware of this, you do realize I've been working from the register level and up for one of the major players in video/graphics hardware, right? This however, does nothing to prevent the dvdplayer from stalling the whole pipeline.

Quote: - push in into SMD pipeline. If the pipeline is full wait for some short time and try again (if you need to wait too long, something is probably wrong)

It never gets past 1 frame in the pipe at any stage, because:

Quote: - report back to the player VC_PICTURE and VC_BUFFER to keep the system flowing

That's exactly what keeps the system from not flowing. If I report back VC_PICTURE, I won't get a new demux package until 1/fps ms or so later, pretty much guaranteeing that every frame is late.

Yes, there's no actual renderer, and again this fact does not prevent dvdplayer from stalling the whole pipeline as if there was one if I report back VC_PICTURE.

The original Boxee sources got away with this since it completely ignored all timestamps and synchronization code in XBMC and used its own timing and avsync mechanisms, meaning you could always just set the SMD base time to some point in the future to queue up work. That method requires quite a lot of custom code just for the BoxeeBox with ifdefs sprinkled everywhere to make it work. The port has moved quite a bit away from this model to one where the SMD specific bits are as non-invasive as possible.
#49
(2013-09-03, 10:50)quarnster Wrote: I have a couple of questions I hope you guys can answer.


My understanding of the DVDPlayer video pipe is roughly:

1. Player receives a demuxer package
2. The demuxer package is sent to the Video Codec for decoding.
2.1 The Video Codec is split into two components, DVDVideoCodecXXX and XXXVideo where the former in many cases is nothing but a thin wrapper around the latter. Is there any particular reason for this split? Should I intentionally not merge the two components into a single one?
3. The Video Codec absorbs the data and optionally responds that a Picture is available.
4. If a Picture is available, the Renderer is configured for handling pictures of that type if it isn't already.
5. The Picture is forwarded to the Renderer
6. Huh Rendering UI (and waiting for vsync)Huh Sleeping for time left in frameHuh


This is quite an inefficient use of the hardware leading to pipeline bubbles and choppy framerates. What's the recommended way to keep the hardware busy?

Currently I query the status of the hardware and if it's less busy than some threshold the Video Codec reports a "dropped" frame just to avoid steps 4-6 until the hw queue is somewhat full again. The pipeline respects pts' so there's no adverse effect of feeding it lots of data in bursts, but this does mean that there are a lot of non VC_PICTURE returns from the Video Codec's Decode function. Is there any issue with that? I was told this reports a low video frame rate somewhere despite that it is actually silky smooth.

The hardware video pipe is its own state machine and should be told when playback is paused, resumed, fast forwarded or rewinding. What's the recommended way of hooking that up?

if you can help, same information:

http://www.boxeeboxwiki.org/hardware
"The GPU is an Imagination Technologies PowerVR SGX535, the same GPU that is used in the iPhone 4. The decoder is a member of the PowerVR VXD series, which means that hardware acceleration exists for the decoding of two simultaneous HD streams, as well as JPEG processing."

SGX535:
DirectX 9.0c
OpenGL 2.1
OpenGL ES 2.0

PowerVR VXD:
http://www.imgtec.com/powervr/powervr-vxd.asp
LG OLED 55E8 - M9702(oppo 203) -  Dinobot U5PVR(Enigma 2) - Meccol KI pro(COREelec) - Sony PS5
AndroidPremiumPlayer blog - HI - Frequency Switcher 
#50
- Are you using VC_BUFFER as well? If I remember correctly, this is required in order for DVDPlayer to send another packet
- Are you signaling the video input with ismd_tag_set_newsegment_position? if you don't the pipeline will stall after a few seconds.

You can use XBMC internal AV sync instead of SMD. You can use SMD global clock for this. I'm not sure how well this will work (never tried this).
I can definitely understand the need for a cleaner code.

BTW I've tested the build (one of the builds published here), and it worked pretty well, including AV sync. So what issues are you seeing?

[EDIT] I just noticed in you post that the playback is smooth but the system reports low fps. (probably in codecinfo).
#51
If it was a build before yesterday, try:

1. Video -> Files -> Start a video.
2. Hit back to go back to the video list.
3. Hit left to open up the side bar thingie
4. Select the "full screen" option to go back to the video. It'll now be out of sync.


After yesterday, it handles that scenario much better where it currently returns either "VC_BUFFER" (which makes dvdplayer think it is dropped, but in reality we just queue it up) or "VC_BUFFER | VC_PICTURE". Yes, the new segment position is sent.

(2013-09-03, 16:55)looun Wrote: decoding of two simultaneous HD streams

I've never claimed the hardware isn't capable of this, but what the hardware is capable of is irrelevant when the software is essentially forcing a flush inbetween frames. You don't draw a single triangle, then swap frames, then draw the next triangle, then swap frames if the scene you want to draw consists of thousands of triangles, but that's pretty much how the dvdplayer component seems to treat video hardware by default.
#52
IMHO, using the hardware clock for AV sync is the right way. I remember I've tried using software sync, but there were just too many issues with this, so I gave up.
I'm not saying it's impossible, but it's definitely tricky. Maybe you can solve this in a more elegant way.

I can see that other hardware players (e.g OMX), created a dedicated player for this, so I believe this is the best route, but it'll require much more work.

Video decoding is not done on the graphics chip. There is a dedicated DSP for this.
#53
Quote:Video decoding is not done on the graphics chip.

I didn't say it was.
#54
how can I test a build? there is a wiki installation? xbmc is an app or a os boot image?

Boxee box I discovered a few days ago (i bought used for only 60eur), do not understand why it was not taken into cosider sign up first by the team of XBMC?
hardware is much better than a appletv, rasp and many more box Android (coming very close to a PC), it is cheap and supports well the HD streams, has a good supply input / output port, the remote controller is not bad,in meadows missing only Harddisk inside could be a worthy successor to the legendary first Xbox?
LG OLED 55E8 - M9702(oppo 203) -  Dinobot U5PVR(Enigma 2) - Meccol KI pro(COREelec) - Sony PS5
AndroidPremiumPlayer blog - HI - Frequency Switcher 
#55
New build online fe6de75.

Changelog : xbmc13.alpha7.boxeebox2013.09.02.early_alpha_fe6de75
Tweaked a/v sync
Fixed subtitles


Please report any problems @ https://github.com/quarnster/boxeebox-xbmc
Download builds @ http://www.devil-strike.com
#56
Thanks for the build devilstrike. Playback is working but still not optimized. Slows down then speeds up with pause. Subtitles also seem to make it worse. But continue the hard work everyone!
#57
Who wants a boxee box anyway.. they hardly sold one and that ce4100 was DOA in 2010.
#58
I have several Intel_CE4100 development boards which developed based on intel CE4100,it has rich hardware interface and lots of software resources, provides a very good development platform for the majority of embedded enthusiast, intel platform lovers, HTPC/XBMC/BOXEE or other open source software enthusiasts .
If you really need it or them,Please contact me.
Email:[email protected]

Intel_CE4100 development board specifications
Product Name Intel_CE4100 Devolopment Board
Power Source DC12V (3A)
OS Linux(intel PDK21.0)
Hardware CPU:Intel Atom processor CE4100
Clock:1.2GHZ
Momery:8 x 1GBit DDR3 SDRAM
Hard disk:8G ssd
Wireless Lan:support 802.11b/g/n wireless protocol
MCU:Microchip pic24
Standby power consumption:0.5W
Video Output HDMI,YPBBR
Audio Output L/R stereo, optical , coaxial
Interface USB, HDMI,YPBBR,optical,LAN,coaxial,mic,ESATA

Video Format MPEG4 AVI、MP4/H.264、DIVX4,DIVX5,XVID
MPEG1/2 MPG、MPE、VOB、DAT、TRP、TS
Windows Media Video Windows Media Video 7/8 (WMV1/2)
Windows Media Video 9 (WMV3) (using x86 DLL)
RealVideo -RealVideo 1.0, 2.0 (G2)
-RealVideo 3.0 (RP8), 4.0 (RP9) (using Real libraries)
Intel Indeo -Intel Indeo3 (3.1, 3.2)
-Intel Indeo 4.1 and 5.0 (using x86 DLL or XAnim codecs)
Other -Sorenson v1/v3 (SVQ1/SVQ3), Cinepak, RPZA and other QuickTime codecs
-DV video
-VIVO 1.0, 2.0, I263 and other H.263(+) variants (using x86 DLL)
-MJPEG, AVID, VCR2, ASV2 and other hardware formats
- FLI/FLC
- HuffYUV
-various old simple RLE-like formats
Picture Format BMP、JPG、JPE、PNG、GIF、TIF/TIFF、TGA、PCX、ICO、

Audio Format QuickTime Qclp, Q-Design QDMC/QDM2, MACE
3/6 (using QT libraries), ALAC
RealAudio RealAudio: DNET and older codecs
RealAudio: COOK, SIPRO, ATRAC3 (using Real libraries)
MP3 MPEG layer 1, 2, and 3 (MP3) audio
WMA -WMA (DivX Audio) v1, v2
-WMA 9 (WMAv3), Voxware audio, ACELP.net etc (using x86 DLLs)
AAC M4A、AAC/DTS
Other -Ogg Vorbis audio
-VIVO audio (g723, Vivo Siren) (using x86 DLL)
-alaw/ulaw, (ms)gsm, pcm, *adpcm and other simple old audio formats
Support external USB、SATA、WIFI
Support external mouse and keyboard

SDK specifications

SDK name Pdk21.0
Display driver(GDL) Intel Media Processor CE 4100 GDL 3.0 API Specification
EGL, OpenGL* ES, and OpenVG* A new OpenGL ES 2.0 sample is available. This sample shows how to use video as a texture with a color conversion shader program. See the Graphics User’s Guide for details.
DirectFB* Intel Media Processor CE 4100 DirectFB Users Guide
Intel Media Processor CE 4100 DirectFB Programming Guide
•Added DirectFB USB keyboard and mouse input provider support. There is no support for
virtual terminal switching. The necessary device nodes are automatically created via a
script during boot and during hot-plug of these USB devices.
• Many defects related to multi-threaded DirectFB API usage were fixed. These fixes
include:
• pthreads multiple-reader-single-writer (MRSW) lock usage in which the writer thread would not wake up (resolved by implementing a custom MRSW lock for the drivers to use).
• Surface destruction race condition resulting in GDL surface unmapping failures.
• Display layer and mixer configuration race condition causing a display layer to sometimes not become enabled/visible.
• Subsurface destruction and flipping related deadlock.
• Surface destruction deadlock scenario involving DirectFB multi-app usage model.
• Updated the default directfbrc configuration file so that it no longer disables cursor usage.
Streaming Media Drivers • TS_out:
• Buffer monitor
• Frame Advance:
• Client ID “tags” through the video sub-system pipeline
•LBR Decoder
•MxN mixer
• Metadata Enabled Mixer
• Bass Management (Low Pass Filters)
• Core Message Management
• AC3 in MPEG2 stream System B format:
• TS playback over IP network:
• Server Side Trick Mode
• Simultaneous audio and karaoke support:
• Message information base:
• Field Polarity:
• DPE control and configuration options:
• Demux indexing for MPEG-2 streams:
• Video Decoder support for stream statistics:
Platform and Toolchain CEFDK
REDBOOT
toolchain
Advanced Access Content System • SEC AACS Driver
• AACS software framework library
• Intel signed AACS firmware module
• AACS Initialization tool
• AACS Utility - Key Provisioning
Xpsm Intel media player
Quick Bootable TargetFS Images In previous releases, target FS images were built as part of an entire SDK build. This process takes about 15-20 minutes. In this release the TargetFS component has added a new script, quick_create.sh, which can produce bootable TargetFS images in as little as 20-30 seconds. It does this by using the binaries provided in component target packages (the
target/ subdirectory of each component directory), and the TargetFS build system.
Open Source Components • GCC compiler version 4.1.1
• glibc version 2.7 (packaged with gcc 4.1.2)
• GDB version 6.8
• RedBoot* boot loader
• Linux* kernel 2.6.23/28
• BusyBox Environment 1.10.2
• GStreamer 0.10.17
• patch 2.5.4
• Bison 1.875
• m4 1.4..9
• autoconf 2.59
• automake 1.9.6
• freeType 2.1.10
• udev 120
• libusb 0.1.12
• libmtp 0.2.6
• ALSA (Advanced Linux Sound Architecture)
• ncurses 5.5
• DirectFB* 1.0.1 with changes for the Intel Media •Processor CE 4100, and Intel Media
•Processor CE 4100 specific drivers
• DirectFB 1.0.0 examples with changes for the Intel •Media Processor CE 4100
• SGX graphics kernel module
• UDF patch 2.5
•Mplayer
•XBMC
•BOXEE

Giveaway
Development board preloads transplanted BOXEE system, we provide you gift STB shell, infrared remote control, HDMI cable and power adapter to provide you with a complete STB solution, you can also transplant other open source software such as XBMC to create your own STB products according to your own preferences.
#59
see.. even giveaways nowadays..
#60
New build out. 0f3428a


Changelog: xbmc13.alpha7.boxeebox2013.09.06.early_alpha_0f3428a
Fixed a black video issue on some mp4/mkv files.
Fixed black video whene starting video

Please report any problems @ https://github.com/quarnster/boxeebox-xbmc
Download builds @ http://www.devil-strike.com

Giveaway's always nice Smile

Logout Mark Read Team Forum Stats Members Help
XBMC on Boxeebox1