• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * main_dev_manager.cpp - main device manager
3  *
4  *  Copyright (c) 2015 Intel Corporation
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * Author: John Ye <john.ye@intel.com>
19  * Author: Wind Yuan <feng.yuan@intel.com>
20  */
21 
22 #include "main_dev_manager.h"
23 
24 using namespace XCam;
25 
26 namespace GstXCam {
27 
MainDeviceManager()28 MainDeviceManager::MainDeviceManager()
29 {
30 }
31 
~MainDeviceManager()32 MainDeviceManager::~MainDeviceManager()
33 {
34 }
35 
36 void
handle_message(const SmartPtr<XCamMessage> & msg)37 MainDeviceManager::handle_message (const SmartPtr<XCamMessage> &msg)
38 {
39     XCAM_UNUSED (msg);
40 }
41 
42 void
handle_buffer(const SmartPtr<VideoBuffer> & buf)43 MainDeviceManager::handle_buffer (const SmartPtr<VideoBuffer> &buf)
44 {
45     XCAM_ASSERT (buf.ptr ());
46     _ready_buffers.push (buf);
47 }
48 
49 SmartPtr<VideoBuffer>
dequeue_buffer()50 MainDeviceManager::dequeue_buffer ()
51 {
52     SmartPtr<VideoBuffer> ret;
53     ret = _ready_buffers.pop (-1);
54     return ret;
55 }
56 
57 void
pause_dequeue()58 MainDeviceManager::pause_dequeue ()
59 {
60     return _ready_buffers.pause_pop ();
61 }
62 
63 void
resume_dequeue()64 MainDeviceManager::resume_dequeue ()
65 {
66     return _ready_buffers.resume_pop ();
67 }
68 
69 };
70