|
Packit |
1244b8 |
/*
|
|
Packit |
1244b8 |
* Copyright 2016 Intel Corporation
|
|
Packit |
1244b8 |
*
|
|
Packit |
1244b8 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
Packit |
1244b8 |
* you may not use this file except in compliance with the License.
|
|
Packit |
1244b8 |
* You may obtain a copy of the License at
|
|
Packit |
1244b8 |
*
|
|
Packit |
1244b8 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
Packit |
1244b8 |
*
|
|
Packit |
1244b8 |
* Unless required by applicable law or agreed to in writing, software
|
|
Packit |
1244b8 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
Packit |
1244b8 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
Packit |
1244b8 |
* See the License for the specific language governing permissions and
|
|
Packit |
1244b8 |
* limitations under the License.
|
|
Packit |
1244b8 |
*/
|
|
Packit |
1244b8 |
|
|
Packit |
1244b8 |
#ifdef HAVE_CONFIG_H
|
|
Packit |
1244b8 |
#include "config.h"
|
|
Packit |
1244b8 |
#endif
|
|
Packit |
1244b8 |
|
|
Packit |
1244b8 |
//
|
|
Packit |
1244b8 |
// The unittest header must be included before va_x11.h (which might be included
|
|
Packit |
1244b8 |
// indirectly). The va_x11.h includes Xlib.h and X.h. And the X headers
|
|
Packit |
1244b8 |
// define 'Bool' and 'None' preprocessor types. Gtest uses the same names
|
|
Packit |
1244b8 |
// to define some struct placeholders. Thus, this creates a compile conflict
|
|
Packit |
1244b8 |
// if X defines them before gtest. Hence, the include order requirement here
|
|
Packit |
1244b8 |
// is the only fix for this right now.
|
|
Packit |
1244b8 |
//
|
|
Packit |
1244b8 |
// See bug filed on gtest at https://github.com/google/googletest/issues/371
|
|
Packit |
1244b8 |
// for more details.
|
|
Packit |
1244b8 |
//
|
|
Packit |
1244b8 |
#include "common/factory_unittest.h"
|
|
Packit |
1244b8 |
|
|
Packit |
1244b8 |
// primary header
|
|
Packit |
1244b8 |
#include "vaapiencoder_vp8.h"
|
|
Packit |
1244b8 |
|
|
Packit |
1244b8 |
namespace YamiMediaCodec {
|
|
Packit |
1244b8 |
|
|
Packit |
1244b8 |
class VaapiEncoderVP8Test
|
|
Packit |
1244b8 |
: public FactoryTest<IVideoEncoder, VaapiEncoderVP8>
|
|
Packit |
1244b8 |
{
|
|
Packit |
1244b8 |
protected:
|
|
Packit |
1244b8 |
/* invoked by gtest before the test */
|
|
Packit |
1244b8 |
virtual void SetUp() {
|
|
Packit |
1244b8 |
return;
|
|
Packit |
1244b8 |
}
|
|
Packit |
1244b8 |
|
|
Packit |
1244b8 |
/* invoked by gtest after the test */
|
|
Packit |
1244b8 |
virtual void TearDown() {
|
|
Packit |
1244b8 |
return;
|
|
Packit |
1244b8 |
}
|
|
Packit |
1244b8 |
};
|
|
Packit |
1244b8 |
|
|
Packit |
1244b8 |
#define VAAPIENCODER_VP8_TEST(name) \
|
|
Packit |
1244b8 |
TEST_F(VaapiEncoderVP8Test, name)
|
|
Packit |
1244b8 |
|
|
Packit |
1244b8 |
VAAPIENCODER_VP8_TEST(Factory) {
|
|
Packit |
1244b8 |
FactoryKeys mimeTypes;
|
|
Packit |
1244b8 |
mimeTypes.push_back(YAMI_MIME_VP8);
|
|
Packit |
1244b8 |
doFactoryTest(mimeTypes);
|
|
Packit |
1244b8 |
}
|
|
Packit |
1244b8 |
|
|
Packit |
1244b8 |
}
|