Bug 4375

Summary: [sugarbay] Unable to play .mpg files
Product: [Build System, Metadata & Runtime] BSPs Reporter: Stoicescu Cornel <corneliux.stoicescu>
Component: bsps-meta-intelAssignee: Nitin Kamble <nitin.a.kamble>
Status: VERIFIED NOTABUG QA Contact:
Severity: normal    
Priority: Medium CC: bluelightning, nitin.a.kamble, sgw, tom.zanussi
Version: 1.4   
Target Milestone: 1.5 M1   
Hardware: Other   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
.mpg file used in test none

Description Stoicescu Cornel 2013-04-22 10:03:04 UTC
Created attachment 1195 [details]
.mpg file used in test

As per bug 3704, Sugarbay BSP should be able to play .mpg files.

When trying to play a .mpg file 2 error window appear with the following messages:

"Your GStreamer installation is missing a plugin"

"A MPEG-1 Video decoder is required to play this stream, but not installed."

dylan:789b2b7e0cca404ff8ba8ed5ba823d215e6ba5b4
meta-intel:76f70c337e5daa9593153dfdf5107aec08610a44
Comment 1 Tom Zanussi 2013-04-22 13:07:14 UTC
Is this a regression and if so, can you point to the test case and .mpg file that failed?

I'm sure this worked very recently, unless it's something we haven't tested before.

Is this with or without the 'commercial' setting?
Comment 2 Stoicescu Cornel 2013-04-22 13:17:58 UTC
This is not a 1.4 regression. Until bug 3704 we actually tested against BSPs playing .mpg files as we understood they should not be able to do so.

Here is the test case we used:
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=263
Comment 3 Stoicescu Cornel 2013-04-22 13:20:10 UTC
these images are noemgd
Comment 4 Stoicescu Cornel 2013-04-22 13:22:55 UTC
Also the images are from the autobuilder so I believe they have no "commercial" license flags whitelisted.
Comment 5 Tom Zanussi 2013-04-22 13:34:12 UTC
This is confusing - bug 3704 says they can be played, this says they can't, and also says they're noemgd, but sugarbay doesn't use emgd..
Comment 6 Stoicescu Cornel 2013-04-22 13:41:05 UTC
-bug 3704 was closed as NOTABUG so these 2 bugs can coexist
-I think the noemgd comment was not needed; please ignore it
Comment 7 Tom Zanussi 2013-04-22 14:11:13 UTC
Yes, just trying to clear one thing up - 3704 says it could be played last week, this week it cannot.  So there was a regression from last week?

Also, I'm starting to think this confusion is coming from misinterpreting the tests - I don't believe MPEG-1 is one of the hardware-accelerated formats - if that's the case, then not having 'commercial' I would expect this result.
Comment 8 Stoicescu Cornel 2013-04-22 14:27:44 UTC
- bug 3704 does not say it could be played last week. It was actually reported on denzil a few months ago. 

- The same format(MPEG-1) could be played on a denzil branch Sugarbay BSP so:
1) either the format(MPEG-1) is wrong and bug 3704 should not have been closed as NOTABUG because MPEG-1 should not have been played using hardware acceleration and this bug is invalid

2) or the format(MPEG-1) is correct, it can be played using hardware acceleration, bug 3704 is closed correctly as NOTABUG and this bug valid.
Comment 9 Tom Zanussi 2013-04-22 14:40:55 UTC
(In reply to comment #8)
> - bug 3704 does not say it could be played last week. It was actually
> reported on denzil a few months ago. 
> 
> - The same format(MPEG-1) could be played on a denzil branch Sugarbay BSP so:
> 1) either the format(MPEG-1) is wrong and bug 3704 should not have been
> closed as NOTABUG because MPEG-1 should not have been played using hardware
> acceleration and this bug is invalid
> 

OK, assuming the MPEG-1 test is there to check that commercial video codecs cannot be used if 'commercial' is not set, then indeed bug 3704 shouldn't have been closed.  Apparently the situation then is that the commercial codec is being used in denzil even without the 'commercial' setting, but in master this isn't the case, and things work as expected in master (someone should also check danny then too).

As a related question, which test checks that video acceleration is being used when 'commercial' is turned on?

> 2) or the format(MPEG-1) is correct, it can be played using hardware
> acceleration, bug 3704 is closed correctly as NOTABUG and this bug valid.
Comment 10 Stoicescu Cornel 2013-04-22 14:50:52 UTC
We don't have a test for commercial drivers on BSPs. We only test default settings BSPs built by the autobuilder and for the BSPs that support emgd we use the noemgd versions.

If you believe we should test video acceleration with commercial drivers, I would like to take this over to IRC so we can come up with some testing scenarios.
Comment 11 Tom Zanussi 2013-04-22 15:16:38 UTC
Yes, I think you should be testing video acceleration - our basic smoke testing includes testing .h264 videos, which we know is hardware accelerated, on both crownbay and sugarbay - if video acceleration isn't enabled, it's extremely obvious that its not - you get about 2 frames per minute.  On sugarbay that isn't obvious except in top, since the processor is so much faster.  I thought that was also being tested by QA.

It sounds like the QA tests are designed to catch if the commercial codecs are being used if 'commercial' is not set i.e. in sugarbay with no 'commercial' and MPEG-1.  If so, I don't understand why denzil passed in the first place and just started failing a few months ago.  A regression with the point release?
Comment 12 Nitin Kamble 2013-04-22 16:43:49 UTC
FYI,

The vaapi package for provides hardware acceleration for these encoded formats: MPEG2	MPEG4	H.264	VC1	WMV3

Rest of the encoded formats will be dealt with software codec plugins. And some of them will need commercial license like MPEG codes.
Comment 13 Stoicescu Cornel 2013-04-23 07:52:17 UTC
So MPEG-1 needs commercial license right? That means we should close this  bug as INVALID and reopen bub 3704?
Comment 14 Stoicescu Cornel 2013-04-23 07:58:09 UTC
The issue here is: should non-commercial sugarbay image be able to play MPEG-1 files or not?

As I understand danny and denzil latest stable builds can play them but current master can not. I will test images from each today by building core-image-sato and using the attached file.
Comment 15 Tom Zanussi 2013-04-23 14:00:37 UTC
I believe that MPEG-1 would require software codecs supplied by gst-ffmpeg.  master and danny (but not denzil) contain these oe-core and meta-intel commits to add 'commercial' to the gst-ffmpeg LICENSE_FLAGS:

commit b616c9461da221d99086b6cc4f30d6f3745a91f1
Author: Paul Eggleton <paul.eggleton@linux.intel.com>
Date:   Thu Sep 13 12:03:01 2012 +0100

    gst-ffmpeg: add LICENSE_FLAGS

commit 8341ed1b28a91b184547e62449ecbedabffa1ab3
Author: Paul Eggleton <paul.eggleton@linux.intel.com>
Date:   Mon Oct 15 11:30:01 2012 +0100

    ffmpeg: set LICENSE_FLAGS

Therefore, if 'commercial' is not set for those BSPs, the MPEG-1 codec would not be present and therefore not be decoded, unless something else is providing the codec.
Comment 16 Stoicescu Cornel 2013-04-24 12:16:20 UTC
The MPEG-1 video file plays on Denzil Sugarbay BSP and does not play on Danny and Dylan Sugarbay BSP.

I believe that Danny and Dylan work as intended and Denzil did not catch Paul's patch. 

I propose we close this bug as NOTABUG. We could reopen bug 3704 and close that as WONTFIX rather than NOTABUG of you think it's more appropriate.
Comment 17 Nitin Kamble 2013-04-29 16:31:08 UTC
I am confused by the conflicting information in this bug. Can you please open a new bug with just the relevant information about the bug.

provide information like this:

Scenario 1:
-----------

BSP: Sugarbay

Build Configuration: build a core-sato-image "with" Commercial in the license white list

Test: Play attached MPEG1 file with this command: ???

Result: ???

Expected Result: ???




Scenario 2:
-----------

BSP: Sugarbay

Build Configuration: build a core-sato-image "without" Commercial in the license white list

Test: Play attached MPEG1 file with this command: ???

Result: ???

Expected Result: ???
Comment 18 Nitin Kamble 2013-05-06 21:34:58 UTC
Here are my findings:

1. When built with this line in local.conf, The image is able to play the attached MELT.MPG file fine. And also it can play the H.256 video fine.
  LICENSE_FLAGS_WHITELIST += "commercial"

2. Ahen When built with out the "commercial" flag line in local.conf, The image is able to play the the H.256 video fine. But it can not play the attached MELT.MPG file.


That means the commercial flag is working as expected. The H.256 decoding is done by the Hardware, so there are no software codecs are needed for that. And the MPEG-1 video file need software codec, which is built only when the "commercial" flag is mentioned in the local.conf.

So these no issue here.
Comment 19 Stoicescu Cornel 2013-05-07 07:47:49 UTC
Hello Nitin,

Thank you for your work on clearing this issue. 
Ir order do completely close these discussions,
can you please provide for QA the following:

1) A list of BSPs that should be able to play a H.256 file using hardware acceleration(from the officially supported BSPs and the meta-intel ones)

2) Does using the emgd-driver-bin flag affect your results? (ex: Emenlow,, Crownbay)

3) Would it suffice to test the commercial flag on one BSP or should we test it on all of them? Also, if question nr.2 is valid, should we consider mixing the commercial flag with emgd-driver-bin one? 

Thank you in advance! 

I saw there are more bugs opened on this issue in the past but not clarified properly. Is there some clear documentation on BSP capabilities documented somewhere(like a specification sheet)? Do you think it would be useful to have such a documentation(at least for the officially supported ones)?
Comment 20 Nitin Kamble 2013-05-07 16:18:39 UTC
1) A list of BSPs that should be able to play a H.256 file using hardware acceleration(from the officially supported BSPs and the meta-intel ones)

A: These are the BSPs we manage crownbay, emenlow, fri2, sys940x, nuc, chiefriver, sugarbay. There may be more BSPs from ISG, you can check with Song about those.


2) Does using the emgd-driver-bin flag affect your results? (ex: Emenlow,, Crownbay)

A: Yes, without that you will not get the accelerated Graphics Driver for these BSPs.


3) Would it suffice to test the commercial flag on one BSP or should we test it on all of them? Also, if question nr.2 is valid, should we consider mixing the commercial flag with emgd-driver-bin one? 

A: Testing on one BSP should be enough. emgd & commercial flags are separate things. commercial flag is to get non accelerated software plugins. and EMGD flag is to get accelerated graphics driver, which is needed for all the EMGD enabled BSPs.
Comment 21 Stoicescu Cornel 2013-05-10 12:51:55 UTC
Bug filed for test case update: bug 4483
Comment 22 Stoicescu Cornel 2013-10-01 14:11:22 UTC
Sugarbay non-commercial image should not be able to play mpeg1 files. This is not a bug.