TizenRT Public API
v2.0 M2
Main Page
Modules
Data Structures
Files
File List
Globals
FileInputDataSource.h
1
/* ****************************************************************
2
*
3
* Copyright 2018 Samsung Electronics All Rights Reserved.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
******************************************************************/
18
29
#ifndef __MEDIA_FILEINPUTDATASOURCE_H
30
#define __MEDIA_FILEINPUTDATASOURCE_H
31
32
#include <media/InputDataSource.h>
33
34
namespace
media
{
35
namespace
stream {
42
class
FileInputDataSource
:
public
InputDataSource
43
{
44
public
:
50
FileInputDataSource
();
56
virtual
~FileInputDataSource
();
63
FileInputDataSource
(
const
std::string &dataPath);
69
FileInputDataSource
(
const
FileInputDataSource
&source);
75
FileInputDataSource
&
operator=
(
const
FileInputDataSource
&source);
76
83
bool
isPrepare
()
override
;
90
bool
open
()
override
;
97
bool
close
()
override
;
106
ssize_t
read
(
unsigned
char
*buf,
size_t
size)
override
;
107
108
private
:
109
std::string mDataPath;
110
FILE *mFp;
111
};
112
}
// namespace stream
113
}
// namespace media
114
115
#endif
116
// end of MEDIA group
media::stream::FileInputDataSource::operator=
FileInputDataSource & operator=(const FileInputDataSource &source)
Operator= for FileInputDataSource.
media::stream::FileInputDataSource::close
bool close() override
Close the file.
media::stream::InputDataSource
Definition:
InputDataSource.h:44
media::stream::FileInputDataSource::FileInputDataSource
FileInputDataSource()
Constructs an empty FileInputDataSource.
media::stream::FileInputDataSource::~FileInputDataSource
virtual ~FileInputDataSource()
Deconstructs an empty FileInputDataSource.
media::stream::FileInputDataSource::open
bool open() override
Open the file.
media::stream::FileInputDataSource
Definition:
FileInputDataSource.h:42
media::stream::FileInputDataSource::isPrepare
bool isPrepare() override
Whether file is ready to be read.
media
Definition:
BufferObserverInterface.h:32
media::stream::FileInputDataSource::read
ssize_t read(unsigned char *buf, size_t size) override
Read the file.
framework
include
media
FileInputDataSource.h
Generated by
1.8.11