| FFmpegKit Linux API 6.0

Loading...
Searching...
No Matches
ReturnCode.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Taner Sener
3 *
4 * This file is part of FFmpegKit.
5 *
6 * FFmpegKit is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * FFmpegKit is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General License
17 * along with FFmpegKit. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef FFMPEG_KIT_RETURN_CODE_H
21#define FFMPEG_KIT_RETURN_CODE_H
22
23#include <memory>
24#include <iostream>
25
26 namespace ffmpegkit {
27
28 class ReturnCode {
29 public:
30 static constexpr int Success = 0;
31 static constexpr int Cancel = 255;
32
33 static bool isSuccess(const std::shared_ptr<ffmpegkit::ReturnCode> value);
34 static bool isCancel(const std::shared_ptr<ffmpegkit::ReturnCode> value);
35
36 ReturnCode(const int value);
37 int getValue() const;
38 bool isValueSuccess() const;
39 bool isValueError() const;
40 bool isValueCancel() const;
41 friend std::ostream& operator<<(std::ostream& out, const std::shared_ptr<ffmpegkit::ReturnCode>& o);
42
43 private:
44 int _value;
45 };
46
47}
48
49#endif // FFMPEG_KIT_RETURN_CODE_H
ffmpegkit::ReturnCode
Definition ReturnCode.h:28
ffmpegkit::ReturnCode::isValueError
bool isValueError() const
Definition ReturnCode.cpp:41
ffmpegkit::ReturnCode::isCancel
static bool isCancel(const std::shared_ptr< ffmpegkit::ReturnCode > value)
Definition ReturnCode.cpp:26
ffmpegkit::ReturnCode::operator<<
friend std::ostream & operator<<(std::ostream &out, const std::shared_ptr< ffmpegkit::ReturnCode > &o)
Definition ReturnCode.cpp:51
ffmpegkit::ReturnCode::Success
static constexpr int Success
Definition ReturnCode.h:30
ffmpegkit::ReturnCode::isValueCancel
bool isValueCancel() const
Definition ReturnCode.cpp:45
ffmpegkit::ReturnCode::isSuccess
static bool isSuccess(const std::shared_ptr< ffmpegkit::ReturnCode > value)
Definition ReturnCode.cpp:22
ffmpegkit::ReturnCode::Cancel
static constexpr int Cancel
Definition ReturnCode.h:31
ffmpegkit::ReturnCode::_value
int _value
Definition ReturnCode.h:44
ffmpegkit::ReturnCode::isValueSuccess
bool isValueSuccess() const
Definition ReturnCode.cpp:37
ffmpegkit::ReturnCode::getValue
int getValue() const
Definition ReturnCode.cpp:33
ffmpegkit
Definition AbstractSession.h:25